cci_macros.S 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef CCI_MACROS_S
  7. #define CCI_MACROS_S
  8. #include <drivers/arm/cci.h>
  9. #include <platform_def.h>
  10. .section .rodata.cci_reg_name, "aS"
  11. cci_iface_regs:
  12. .asciz "cci_snoop_ctrl_cluster0", "cci_snoop_ctrl_cluster1" , ""
  13. /* ------------------------------------------------
  14. * The below required platform porting macro prints
  15. * out relevant interconnect registers whenever an
  16. * unhandled exception is taken in BL31.
  17. * Clobbers: x0 - x9, sp
  18. * ------------------------------------------------
  19. */
  20. .macro print_cci_regs
  21. adr x6, cci_iface_regs
  22. /* Store in x7 the base address of the first interface */
  23. mov_imm x7, (PLAT_ARM_CCI_BASE + SLAVE_IFACE_OFFSET( \
  24. PLAT_ARM_CCI_CLUSTER0_SL_IFACE_IX))
  25. ldr w8, [x7, #SNOOP_CTRL_REG]
  26. /* Store in x7 the base address of the second interface */
  27. mov_imm x7, (PLAT_ARM_CCI_BASE + SLAVE_IFACE_OFFSET( \
  28. PLAT_ARM_CCI_CLUSTER1_SL_IFACE_IX))
  29. ldr w9, [x7, #SNOOP_CTRL_REG]
  30. /* Store to the crash buf and print to console */
  31. bl str_in_crash_buf_print
  32. .endm
  33. #endif /* CCI_MACROS_S */