cortex_x925.S 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (c) 2023-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 <cortex_x925.h>
  10. #include <cpu_macros.S>
  11. #include <plat_macros.S>
  12. /* Hardware handled coherency */
  13. #if HW_ASSISTED_COHERENCY == 0
  14. #error "Cortex-X925 must be compiled with HW_ASSISTED_COHERENCY enabled"
  15. #endif
  16. /* 64-bit only core */
  17. #if CTX_INCLUDE_AARCH32_REGS == 1
  18. #error "Cortex-X925 supports only AArch64. Compile with CTX_INCLUDE_AARCH32_REGS=0"
  19. #endif
  20. /* Disable hardware page aggregation. Enables mitigation for `CVE-2024-5660` */
  21. workaround_reset_start cortex_x925, CVE(2024, 5660), WORKAROUND_CVE_2024_5660
  22. sysreg_bit_set CORTEX_X925_CPUECTLR_EL1, BIT(46)
  23. workaround_reset_end cortex_x925, CVE(2024, 5660)
  24. check_erratum_ls cortex_x925, CVE(2024, 5660), CPU_REV(0, 1)
  25. cpu_reset_func_start cortex_x925
  26. /* Disable speculative loads */
  27. msr SSBS, xzr
  28. cpu_reset_func_end cortex_x925
  29. /* ----------------------------------------------------
  30. * HW will do the cache maintenance while powering down
  31. * ----------------------------------------------------
  32. */
  33. func cortex_x925_core_pwr_dwn
  34. /* ---------------------------------------------------
  35. * Enable CPU power down bit in power control register
  36. * ---------------------------------------------------
  37. */
  38. sysreg_bit_set CORTEX_X925_CPUPWRCTLR_EL1, CORTEX_X925_CPUPWRCTLR_EL1_CORE_PWRDN_BIT
  39. isb
  40. ret
  41. endfunc cortex_x925_core_pwr_dwn
  42. /* ---------------------------------------------
  43. * This function provides Cortex-X925 specific
  44. * register information for crash reporting.
  45. * It needs to return with x6 pointing to
  46. * a list of register names in ascii and
  47. * x8 - x15 having values of registers to be
  48. * reported.
  49. * ---------------------------------------------
  50. */
  51. .section .rodata.cortex_x925_regs, "aS"
  52. cortex_x925_regs: /* The ascii list of register names to be reported */
  53. .asciz "cpuectlr_el1", ""
  54. func cortex_x925_cpu_reg_dump
  55. adr x6, cortex_x925_regs
  56. mrs x8, CORTEX_X925_CPUECTLR_EL1
  57. ret
  58. endfunc cortex_x925_cpu_reg_dump
  59. declare_cpu_ops cortex_x925, CORTEX_X925_MIDR, \
  60. cortex_x925_reset_func, \
  61. cortex_x925_core_pwr_dwn