juno_ethosn_tzmp1_def.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. /*
  2. * Copyright (c) 2023, Arm Limited. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef JUNO_ETHOSN_TZMP1_DEF_H
  7. #define JUNO_ETHOSN_TZMP1_DEF_H
  8. #define JUNO_ETHOSN_TZC400_NSAID_FW_PROT 7
  9. #define JUNO_ETHOSN_TZC400_NSAID_DATA_RW_PROT 8
  10. #define JUNO_ETHOSN_TZC400_NSAID_DATA_RO_PROT 13
  11. /* 0 is the default NSAID and is included in PLAT_ARM_TZC_NS_DEV_ACCESS */
  12. #define JUNO_ETHOSN_TZC400_NSAID_DATA_RW_NS 0
  13. #define JUNO_ETHOSN_TZC400_NSAID_DATA_RO_NS 14
  14. #define JUNO_ETHOSN_FW_TZC_PROT_DRAM2_SIZE UL(0x000400000) /* 4 MB */
  15. #define JUNO_ETHOSN_FW_TZC_PROT_DRAM2_BASE (ARM_DRAM2_BASE)
  16. #define JUNO_ETHOSN_FW_TZC_PROT_DRAM2_END (ARM_DRAM2_BASE + \
  17. JUNO_ETHOSN_FW_TZC_PROT_DRAM2_SIZE \
  18. - 1U)
  19. #define JUNO_ETHOSN_DATA_TZC_PROT_DRAM2_SIZE UL(0x004000000) /* 64 MB */
  20. #define JUNO_ETHOSN_DATA_TZC_PROT_DRAM2_BASE ( \
  21. JUNO_ETHOSN_FW_TZC_PROT_DRAM2_END + 1)
  22. #define JUNO_ETHOSN_DATA_TZC_PROT_DRAM2_END ( \
  23. JUNO_ETHOSN_DATA_TZC_PROT_DRAM2_BASE + \
  24. JUNO_ETHOSN_DATA_TZC_PROT_DRAM2_SIZE - 1U)
  25. #define JUNO_ETHOSN_NS_DRAM2_BASE (JUNO_ETHOSN_DATA_TZC_PROT_DRAM2_END + \
  26. 1)
  27. #define JUNO_ETHOSN_NS_DRAM2_END (ARM_DRAM2_END)
  28. #define JUNO_ETHOSN_NS_DRAM2_SIZE (ARM_DRAM2_SIZE - \
  29. JUNO_ETHOSN_DATA_TZC_PROT_DRAM2_END)
  30. #define JUNO_FW_TZC_PROT_ACCESS \
  31. (TZC_REGION_ACCESS_RDWR(JUNO_ETHOSN_TZC400_NSAID_FW_PROT))
  32. #define JUNO_DATA_TZC_PROT_ACCESS \
  33. (TZC_REGION_ACCESS_RDWR(JUNO_ETHOSN_TZC400_NSAID_DATA_RW_PROT) | \
  34. TZC_REGION_ACCESS_RD(JUNO_ETHOSN_TZC400_NSAID_DATA_RO_PROT))
  35. #define JUNO_DATA_TZC_NS_ACCESS \
  36. (PLAT_ARM_TZC_NS_DEV_ACCESS | \
  37. TZC_REGION_ACCESS_RD(JUNO_ETHOSN_TZC400_NSAID_DATA_RO_NS))
  38. #define JUNO_ETHOSN_TZMP_REGIONS_DEF \
  39. { ARM_AP_TZC_DRAM1_BASE, ARM_EL3_TZC_DRAM1_END + ARM_L1_GPT_SIZE, \
  40. TZC_REGION_S_RDWR, 0 }, \
  41. { ARM_NS_DRAM1_BASE, ARM_NS_DRAM1_END, \
  42. ARM_TZC_NS_DRAM_S_ACCESS, JUNO_DATA_TZC_NS_ACCESS}, \
  43. { JUNO_ETHOSN_FW_TZC_PROT_DRAM2_BASE, \
  44. JUNO_ETHOSN_FW_TZC_PROT_DRAM2_END, \
  45. TZC_REGION_S_RDWR, JUNO_FW_TZC_PROT_ACCESS }, \
  46. { JUNO_ETHOSN_DATA_TZC_PROT_DRAM2_BASE, \
  47. JUNO_ETHOSN_DATA_TZC_PROT_DRAM2_END, \
  48. TZC_REGION_S_NONE, JUNO_DATA_TZC_PROT_ACCESS }, \
  49. { JUNO_ETHOSN_NS_DRAM2_BASE, JUNO_ETHOSN_NS_DRAM2_END, \
  50. ARM_TZC_NS_DRAM_S_ACCESS, JUNO_DATA_TZC_NS_ACCESS}
  51. #endif /* JUNO_ETHOSN_TZMP1_DEF_H */