bl31_data.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /*
  2. * Copyright 2018-2020 NXP
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. *
  6. */
  7. #ifndef BL31_DATA_H
  8. #define BL31_DATA_H
  9. #define SECURE_DATA_BASE NXP_OCRAM_ADDR
  10. #define SECURE_DATA_SIZE NXP_OCRAM_SIZE
  11. #define SECURE_DATA_TOP (SECURE_DATA_BASE + SECURE_DATA_SIZE)
  12. #define SMC_REGION_SIZE 0x80
  13. #define SMC_GLBL_BASE (SECURE_DATA_TOP - SMC_REGION_SIZE)
  14. #define BC_PSCI_DATA_SIZE 0xC0
  15. #define BC_PSCI_BASE (SMC_GLBL_BASE - BC_PSCI_DATA_SIZE)
  16. #define SECONDARY_TOP BC_PSCI_BASE
  17. #define SEC_PSCI_DATA_SIZE 0xC0
  18. #define SEC_REGION_SIZE SEC_PSCI_DATA_SIZE
  19. /* SMC global data */
  20. #define BOOTLOC_OFFSET 0x0
  21. #define BOOT_SVCS_OSET 0x8
  22. /* offset to prefetch disable mask */
  23. #define PREFETCH_DIS_OFFSET 0x10
  24. /* must reference last smc global entry */
  25. #define LAST_SMC_GLBL_OFFSET 0x18
  26. #define SMC_TASK_OFFSET 0xC
  27. #define TSK_START_OFFSET 0x0
  28. #define TSK_DONE_OFFSET 0x4
  29. #define TSK_CORE_OFFSET 0x8
  30. #define SMC_TASK1_BASE (SMC_GLBL_BASE + 32)
  31. #define SMC_TASK2_BASE (SMC_TASK1_BASE + SMC_TASK_OFFSET)
  32. #define SMC_TASK3_BASE (SMC_TASK2_BASE + SMC_TASK_OFFSET)
  33. #define SMC_TASK4_BASE (SMC_TASK3_BASE + SMC_TASK_OFFSET)
  34. /* psci data area offsets */
  35. #define CORE_STATE_DATA 0x0
  36. #define SPSR_EL3_DATA 0x8
  37. #define CNTXT_ID_DATA 0x10
  38. #define START_ADDR_DATA 0x18
  39. #define LINK_REG_DATA 0x20
  40. #define GICC_CTLR_DATA 0x28
  41. #define ABORT_FLAG_DATA 0x30
  42. #define SCTLR_DATA 0x38
  43. #define CPUECTLR_DATA 0x40
  44. #define AUX_01_DATA 0x48 /* usage defined per SoC */
  45. #define AUX_02_DATA 0x50 /* usage defined per SoC */
  46. #define AUX_03_DATA 0x58 /* usage defined per SoC */
  47. #define AUX_04_DATA 0x60 /* usage defined per SoC */
  48. #define AUX_05_DATA 0x68 /* usage defined per SoC */
  49. #define AUX_06_DATA 0x70 /* usage defined per SoC */
  50. #define AUX_07_DATA 0x78 /* usage defined per SoC */
  51. #define SCR_EL3_DATA 0x80
  52. #define HCR_EL2_DATA 0x88
  53. #endif /* BL31_DATA_H */