cortex_a65.S 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright (c) 2019-2024, Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #include <arch.h>
  7. #include <asm_macros.S>
  8. #include <common/bl_common.h>
  9. #include <common/debug.h>
  10. #include <cortex_a65.h>
  11. #include <cpu_macros.S>
  12. #include <plat_macros.S>
  13. /* Hardware handled coherency */
  14. #if !HW_ASSISTED_COHERENCY
  15. #error "Cortex-A65 must be compiled with HW_ASSISTED_COHERENCY enabled"
  16. #endif
  17. /* 64-bit only core */
  18. #if CTX_INCLUDE_AARCH32_REGS
  19. #error "Cortex-A65 supports only AArch64. Compile with CTX_INCLUDE_AARCH32_REGS=0"
  20. #endif
  21. /* -------------------------------------------------
  22. * The CPU Ops reset function for Cortex-A65.
  23. * Shall clobber: x0-x19
  24. * -------------------------------------------------
  25. */
  26. func cortex_a65_reset_func
  27. mov x19, x30
  28. #if ERRATA_DSU_936184
  29. bl errata_dsu_936184_wa
  30. #endif
  31. ret x19
  32. endfunc cortex_a65_reset_func
  33. func cortex_a65_cpu_pwr_dwn
  34. mrs x0, CORTEX_A65_CPUPWRCTLR_EL1
  35. orr x0, x0, #CORTEX_A65_CPUPWRCTLR_EL1_CORE_PWRDN_BIT
  36. msr CORTEX_A65_CPUPWRCTLR_EL1, x0
  37. isb
  38. ret
  39. endfunc cortex_a65_cpu_pwr_dwn
  40. .section .rodata.cortex_a65_regs, "aS"
  41. cortex_a65_regs: /* The ascii list of register names to be reported */
  42. .asciz "cpuectlr_el1", ""
  43. func cortex_a65_cpu_reg_dump
  44. adr x6, cortex_a65_regs
  45. mrs x8, CORTEX_A65_ECTLR_EL1
  46. ret
  47. endfunc cortex_a65_cpu_reg_dump
  48. declare_cpu_ops cortex_a65, CORTEX_A65_MIDR, \
  49. cortex_a65_reset_func, \
  50. cortex_a65_cpu_pwr_dwn