platform_def.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. /*
  2. * Copyright (c) 2014-2024, Arm Limited and Contributors. All rights reserved.
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef PLATFORM_DEF_H
  7. #define PLATFORM_DEF_H
  8. #include <drivers/arm/tzc400.h>
  9. #include <lib/utils_def.h>
  10. #include <plat/arm/board/common/v2m_def.h>
  11. #include <plat/arm/common/arm_def.h>
  12. #include <plat/arm/common/arm_spm_def.h>
  13. #include <plat/common/common_def.h>
  14. #include "../fvp_def.h"
  15. #if TRUSTED_BOARD_BOOT
  16. #include MBEDTLS_CONFIG_FILE
  17. #endif
  18. /* Required platform porting definitions */
  19. #define PLATFORM_CORE_COUNT (U(FVP_CLUSTER_COUNT) * \
  20. U(FVP_MAX_CPUS_PER_CLUSTER) * \
  21. U(FVP_MAX_PE_PER_CPU))
  22. #define PLAT_NUM_PWR_DOMAINS (U(FVP_CLUSTER_COUNT) + \
  23. PLATFORM_CORE_COUNT + U(1))
  24. #define PLAT_MAX_PWR_LVL ARM_PWR_LVL2
  25. #if PSCI_OS_INIT_MODE
  26. #define PLAT_MAX_CPU_SUSPEND_PWR_LVL ARM_PWR_LVL1
  27. #endif
  28. /*
  29. * Other platform porting definitions are provided by included headers
  30. */
  31. /*
  32. * Required ARM standard platform porting definitions
  33. */
  34. #define PLAT_ARM_CLUSTER_COUNT U(FVP_CLUSTER_COUNT)
  35. #define PLAT_ARM_TRUSTED_SRAM_SIZE (FVP_TRUSTED_SRAM_SIZE * UL(1024))
  36. #define PLAT_ARM_TRUSTED_ROM_BASE UL(0x00000000)
  37. #define PLAT_ARM_TRUSTED_ROM_SIZE UL(0x04000000) /* 64 MB */
  38. #define PLAT_ARM_TRUSTED_DRAM_BASE UL(0x06000000)
  39. #define PLAT_ARM_TRUSTED_DRAM_SIZE UL(0x02000000) /* 32 MB */
  40. #if ENABLE_RME
  41. #define PLAT_ARM_RMM_BASE (RMM_BASE)
  42. #define PLAT_ARM_RMM_SIZE (RMM_LIMIT - RMM_BASE)
  43. #endif
  44. /*
  45. * Max size of SPMC is 2MB for fvp. With SPMD enabled this value corresponds to
  46. * max size of BL32 image.
  47. */
  48. #if defined(SPD_spmd)
  49. #define PLAT_ARM_SPMC_BASE PLAT_ARM_TRUSTED_DRAM_BASE
  50. #define PLAT_ARM_SPMC_SIZE UL(0x200000) /* 2 MB */
  51. #endif
  52. /* virtual address used by dynamic mem_protect for chunk_base */
  53. #define PLAT_ARM_MEM_PROTEC_VA_FRAME UL(0xc0000000)
  54. /* No SCP in FVP */
  55. #define PLAT_ARM_SCP_TZC_DRAM1_SIZE UL(0x0)
  56. #define PLAT_ARM_DRAM2_BASE ULL(0x880000000) /* 36-bit range */
  57. #define PLAT_ARM_DRAM2_SIZE ULL(0x780000000) /* 30 GB */
  58. #define FVP_DRAM3_BASE ULL(0x8800000000) /* 40-bit range */
  59. #define FVP_DRAM3_SIZE ULL(0x7800000000) /* 480 GB */
  60. #define FVP_DRAM3_END (FVP_DRAM3_BASE + FVP_DRAM3_SIZE - 1U)
  61. #define FVP_DRAM4_BASE ULL(0x88000000000) /* 44-bit range */
  62. #define FVP_DRAM4_SIZE ULL(0x78000000000) /* 7.5 TB */
  63. #define FVP_DRAM4_END (FVP_DRAM4_BASE + FVP_DRAM4_SIZE - 1U)
  64. #define FVP_DRAM5_BASE ULL(0x880000000000) /* 48-bit range */
  65. #define FVP_DRAM5_SIZE ULL(0x780000000000) /* 120 TB */
  66. #define FVP_DRAM5_END (FVP_DRAM5_BASE + FVP_DRAM5_SIZE - 1U)
  67. #define FVP_DRAM6_BASE ULL(0x8800000000000) /* 52-bit range */
  68. #define FVP_DRAM6_SIZE ULL(0x7800000000000) /* 1920 TB */
  69. #define FVP_DRAM6_END (FVP_DRAM6_BASE + FVP_DRAM6_SIZE - 1U)
  70. /* Range of kernel DTB load address */
  71. #define FVP_DTB_DRAM_MAP_START ULL(0x82000000)
  72. #define FVP_DTB_DRAM_MAP_SIZE ULL(0x02000000) /* 32 MB */
  73. #define ARM_DTB_DRAM_NS MAP_REGION_FLAT( \
  74. FVP_DTB_DRAM_MAP_START, \
  75. FVP_DTB_DRAM_MAP_SIZE, \
  76. MT_MEMORY | MT_RO | MT_NS)
  77. /*
  78. * On the FVP platform when using the EL3 SPMC implementation allocate the
  79. * datastore for tracking shared memory descriptors in the TZC DRAM section
  80. * to ensure sufficient storage can be allocated.
  81. * Provide an implementation of the accessor method to allow the datastore
  82. * details to be retrieved by the SPMC.
  83. * The SPMC will take care of initializing the memory region.
  84. */
  85. #define PLAT_SPMC_SHMEM_DATASTORE_SIZE 512 * 1024
  86. /* Define memory configuration for device tree files. */
  87. #define PLAT_ARM_HW_CONFIG_SIZE U(0x4000)
  88. #if SPMC_AT_EL3
  89. /*
  90. * Number of Secure Partitions supported.
  91. * SPMC at EL3, uses this count to configure the maximum number of supported
  92. * secure partitions.
  93. */
  94. #define SECURE_PARTITION_COUNT 1
  95. /*
  96. * Number of Normal World Partitions supported.
  97. * SPMC at EL3, uses this count to configure the maximum number of supported
  98. * NWd partitions.
  99. */
  100. #define NS_PARTITION_COUNT 1
  101. /*
  102. * Number of Logical Partitions supported.
  103. * SPMC at EL3, uses this count to configure the maximum number of supported
  104. * logical partitions.
  105. */
  106. #define MAX_EL3_LP_DESCS_COUNT 1
  107. #endif /* SPMC_AT_EL3 */
  108. /*
  109. * Load address of BL33 for this platform port
  110. */
  111. #define PLAT_ARM_NS_IMAGE_BASE (ARM_DRAM1_BASE + UL(0x8000000))
  112. #if TRANSFER_LIST
  113. #define PLAT_ARM_FW_HANDOFF_SIZE U(0x5000)
  114. #define FW_NS_HANDOFF_BASE (PLAT_ARM_NS_IMAGE_BASE - PLAT_ARM_FW_HANDOFF_SIZE)
  115. #define PLAT_ARM_EL3_FW_HANDOFF_BASE ARM_BL_RAM_BASE
  116. #define PLAT_ARM_EL3_FW_HANDOFF_LIMIT PLAT_ARM_EL3_FW_HANDOFF_BASE + PLAT_ARM_FW_HANDOFF_SIZE
  117. #if RESET_TO_BL31
  118. #define PLAT_ARM_TRANSFER_LIST_DTB_OFFSET FW_NS_HANDOFF_BASE + TRANSFER_LIST_DTB_OFFSET
  119. #endif
  120. #else
  121. #define PLAT_ARM_FW_HANDOFF_SIZE U(0)
  122. #endif
  123. /*
  124. * PLAT_ARM_MMAP_ENTRIES depends on the number of entries in the
  125. * plat_arm_mmap array defined for each BL stage.
  126. */
  127. #if defined(IMAGE_BL31)
  128. # if SPM_MM
  129. # define PLAT_ARM_MMAP_ENTRIES 10
  130. # define MAX_XLAT_TABLES 9
  131. # define PLAT_SP_IMAGE_MMAP_REGIONS 30
  132. # define PLAT_SP_IMAGE_MAX_XLAT_TABLES 10
  133. # elif SPMC_AT_EL3
  134. # define PLAT_ARM_MMAP_ENTRIES 13
  135. # define MAX_XLAT_TABLES 11
  136. # else
  137. # define PLAT_ARM_MMAP_ENTRIES 9
  138. # if USE_DEBUGFS
  139. # if ENABLE_RME
  140. # define MAX_XLAT_TABLES 9
  141. # else
  142. # define MAX_XLAT_TABLES 8
  143. # endif
  144. # else
  145. # if ENABLE_RME
  146. # define MAX_XLAT_TABLES 8
  147. # elif DRTM_SUPPORT
  148. # define MAX_XLAT_TABLES 8
  149. # else
  150. # define MAX_XLAT_TABLES 7
  151. # endif
  152. # endif
  153. # endif
  154. #elif defined(IMAGE_BL32)
  155. # if SPMC_AT_EL3
  156. # define PLAT_ARM_MMAP_ENTRIES 270
  157. # define MAX_XLAT_TABLES 10
  158. # else
  159. # define PLAT_ARM_MMAP_ENTRIES 9
  160. # define MAX_XLAT_TABLES 6
  161. # endif
  162. #elif !USE_ROMLIB
  163. # if ENABLE_RME && defined(IMAGE_BL2)
  164. # define PLAT_ARM_MMAP_ENTRIES 12
  165. # define MAX_XLAT_TABLES 6
  166. # else
  167. # define PLAT_ARM_MMAP_ENTRIES 11
  168. # define MAX_XLAT_TABLES 5
  169. # endif /* (IMAGE_BL2 && ENABLE_RME) */
  170. #else
  171. # define PLAT_ARM_MMAP_ENTRIES 12
  172. # if (defined(SPD_tspd) || defined(SPD_opteed) || defined(SPD_spmd)) && \
  173. defined(IMAGE_BL2) && MEASURED_BOOT
  174. # define MAX_XLAT_TABLES 7
  175. # else
  176. # define MAX_XLAT_TABLES 6
  177. # endif /* (SPD_tspd || SPD_opteed || SPD_spmd) && IMAGE_BL2 && MEASURED_BOOT */
  178. #endif
  179. /*
  180. * PLAT_ARM_MAX_BL1_RW_SIZE is calculated using the current BL1 RW debug size
  181. * plus a little space for growth.
  182. * In case of PSA Crypto API, few algorithms like ECDSA needs bigger BL1 RW
  183. * area.
  184. */
  185. #if TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA_AND_ECDSA || PSA_CRYPTO
  186. #define PLAT_ARM_MAX_BL1_RW_SIZE UL(0xC000)
  187. #else
  188. #define PLAT_ARM_MAX_BL1_RW_SIZE UL(0xB000)
  189. #endif
  190. /*
  191. * PLAT_ARM_MAX_ROMLIB_RW_SIZE is define to use a full page
  192. */
  193. #if USE_ROMLIB
  194. #define PLAT_ARM_MAX_ROMLIB_RW_SIZE UL(0x1000)
  195. #define PLAT_ARM_MAX_ROMLIB_RO_SIZE UL(0xe000)
  196. #define FVP_BL2_ROMLIB_OPTIMIZATION UL(0x5000)
  197. #else
  198. #define PLAT_ARM_MAX_ROMLIB_RW_SIZE UL(0)
  199. #define PLAT_ARM_MAX_ROMLIB_RO_SIZE UL(0)
  200. #define FVP_BL2_ROMLIB_OPTIMIZATION UL(0)
  201. #endif
  202. /*
  203. * Set the maximum size of BL2 to be close to half of the Trusted SRAM.
  204. * Maximum size of BL2 increases as Trusted SRAM size increases.
  205. */
  206. #if CRYPTO_SUPPORT
  207. #if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA_AND_ECDSA) || COT_DESC_IN_DTB
  208. # define PLAT_ARM_MAX_BL2_SIZE ((PLAT_ARM_TRUSTED_SRAM_SIZE / 2) - \
  209. (2 * PAGE_SIZE) - \
  210. FVP_BL2_ROMLIB_OPTIMIZATION)
  211. #else
  212. # define PLAT_ARM_MAX_BL2_SIZE ((PLAT_ARM_TRUSTED_SRAM_SIZE / 2) - \
  213. (3 * PAGE_SIZE) - \
  214. FVP_BL2_ROMLIB_OPTIMIZATION)
  215. #endif
  216. #elif ARM_BL31_IN_DRAM
  217. /* When ARM_BL31_IN_DRAM is set, BL2 can use almost all of Trusted SRAM. */
  218. # define PLAT_ARM_MAX_BL2_SIZE (UL(0x1F000) - FVP_BL2_ROMLIB_OPTIMIZATION)
  219. #else
  220. /**
  221. * Default to just under half of SRAM to ensure there's enough room for really
  222. * large BL31 build configurations when using the default SRAM size (256 Kb).
  223. */
  224. #define PLAT_ARM_MAX_BL2_SIZE \
  225. (((PLAT_ARM_TRUSTED_SRAM_SIZE / 3) & ~PAGE_SIZE_MASK) - PAGE_SIZE - \
  226. FVP_BL2_ROMLIB_OPTIMIZATION)
  227. #endif
  228. #if RESET_TO_BL31
  229. /* Size of Trusted SRAM - the first 4KB of shared memory - GPT L0 Tables */
  230. #define PLAT_ARM_MAX_BL31_SIZE (PLAT_ARM_TRUSTED_SRAM_SIZE - \
  231. ARM_SHARED_RAM_SIZE - \
  232. ARM_L0_GPT_SIZE)
  233. #else
  234. /*
  235. * Since BL31 NOBITS overlays BL2 and BL1-RW, PLAT_ARM_MAX_BL31_SIZE is
  236. * calculated using the current BL31 PROGBITS debug size plus the sizes of
  237. * BL2 and BL1-RW.
  238. * Size of the BL31 PROGBITS increases as the SRAM size increases.
  239. */
  240. #if TRANSFER_LIST
  241. #define PLAT_ARM_MAX_BL31_SIZE \
  242. (PLAT_ARM_TRUSTED_SRAM_SIZE - ARM_SHARED_RAM_SIZE - \
  243. PLAT_ARM_FW_HANDOFF_SIZE - ARM_L0_GPT_SIZE)
  244. #else
  245. #define PLAT_ARM_MAX_BL31_SIZE (PLAT_ARM_TRUSTED_SRAM_SIZE - \
  246. ARM_SHARED_RAM_SIZE - \
  247. ARM_FW_CONFIGS_SIZE - ARM_L0_GPT_SIZE)
  248. #endif /* TRANSFER_LIST */
  249. #endif /* RESET_TO_BL31 */
  250. #ifndef __aarch64__
  251. #if RESET_TO_SP_MIN
  252. /* Size of Trusted SRAM - the first 4KB of shared memory */
  253. #define PLAT_ARM_MAX_BL32_SIZE (PLAT_ARM_TRUSTED_SRAM_SIZE - \
  254. ARM_SHARED_RAM_SIZE)
  255. #else
  256. /*
  257. * Since BL32 NOBITS overlays BL2 and BL1-RW, PLAT_ARM_MAX_BL32_SIZE is
  258. * calculated using the current SP_MIN PROGBITS debug size plus the sizes of
  259. * BL2 and BL1-RW
  260. */
  261. # define PLAT_ARM_MAX_BL32_SIZE (PLAT_ARM_TRUSTED_SRAM_SIZE - \
  262. ARM_SHARED_RAM_SIZE - \
  263. ARM_FW_CONFIGS_SIZE)
  264. #endif /* RESET_TO_SP_MIN */
  265. #endif
  266. /*
  267. * Size of cacheable stacks
  268. */
  269. #if defined(IMAGE_BL1)
  270. # if CRYPTO_SUPPORT
  271. # define PLATFORM_STACK_SIZE UL(0x1000)
  272. # else
  273. # define PLATFORM_STACK_SIZE UL(0x500)
  274. # endif /* CRYPTO_SUPPORT */
  275. #elif defined(IMAGE_BL2)
  276. # if CRYPTO_SUPPORT
  277. # define PLATFORM_STACK_SIZE UL(0x1000)
  278. # else
  279. # define PLATFORM_STACK_SIZE UL(0x600)
  280. # endif /* CRYPTO_SUPPORT */
  281. #elif defined(IMAGE_BL2U)
  282. # define PLATFORM_STACK_SIZE UL(0x400)
  283. #elif defined(IMAGE_BL31)
  284. # if DRTM_SUPPORT
  285. # define PLATFORM_STACK_SIZE UL(0x1000)
  286. # else
  287. # define PLATFORM_STACK_SIZE UL(0x800)
  288. # endif /* DRTM_SUPPORT */
  289. #elif defined(IMAGE_BL32)
  290. # if SPMC_AT_EL3
  291. # define PLATFORM_STACK_SIZE UL(0x1000)
  292. # else
  293. # define PLATFORM_STACK_SIZE UL(0x440)
  294. # endif /* SPMC_AT_EL3 */
  295. #elif defined(IMAGE_RMM)
  296. # define PLATFORM_STACK_SIZE UL(0x440)
  297. #endif
  298. #define MAX_IO_DEVICES 3
  299. #define MAX_IO_HANDLES 4
  300. /* Reserve the last block of flash for PSCI MEM PROTECT flag */
  301. #define PLAT_ARM_FLASH_IMAGE_BASE V2M_FLASH0_BASE
  302. #define PLAT_ARM_FLASH_IMAGE_MAX_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
  303. #if ARM_GPT_SUPPORT
  304. /*
  305. * Offset of the FIP in the GPT image. BL1 component uses this option
  306. * as it does not load the partition table to get the FIP base
  307. * address. At sector 34 by default (i.e. after reserved sectors 0-33)
  308. * Offset = 34 * 512(sector size) = 17408 i.e. 0x4400
  309. */
  310. #define PLAT_ARM_FIP_OFFSET_IN_GPT 0x4400
  311. #endif /* ARM_GPT_SUPPORT */
  312. #define PLAT_ARM_NVM_BASE V2M_FLASH0_BASE
  313. #define PLAT_ARM_NVM_SIZE (V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE)
  314. /*
  315. * PL011 related constants
  316. */
  317. #define PLAT_ARM_BOOT_UART_BASE V2M_IOFPGA_UART0_BASE
  318. #define PLAT_ARM_BOOT_UART_CLK_IN_HZ V2M_IOFPGA_UART0_CLK_IN_HZ
  319. #define PLAT_ARM_RUN_UART_BASE V2M_IOFPGA_UART1_BASE
  320. #define PLAT_ARM_RUN_UART_CLK_IN_HZ V2M_IOFPGA_UART1_CLK_IN_HZ
  321. #define PLAT_ARM_CRASH_UART_BASE PLAT_ARM_RUN_UART_BASE
  322. #define PLAT_ARM_CRASH_UART_CLK_IN_HZ PLAT_ARM_RUN_UART_CLK_IN_HZ
  323. #define PLAT_ARM_TSP_UART_BASE V2M_IOFPGA_UART2_BASE
  324. #define PLAT_ARM_TSP_UART_CLK_IN_HZ V2M_IOFPGA_UART2_CLK_IN_HZ
  325. #define PLAT_ARM_TRP_UART_BASE V2M_IOFPGA_UART3_BASE
  326. #define PLAT_ARM_TRP_UART_CLK_IN_HZ V2M_IOFPGA_UART3_CLK_IN_HZ
  327. #define PLAT_FVP_SMMUV3_BASE UL(0x2b400000)
  328. #define PLAT_ARM_SMMUV3_ROOT_REG_OFFSET UL(0x20000)
  329. /* CCI related constants */
  330. #define PLAT_FVP_CCI400_BASE UL(0x2c090000)
  331. #define PLAT_FVP_CCI400_CLUS0_SL_PORT 3
  332. #define PLAT_FVP_CCI400_CLUS1_SL_PORT 4
  333. /* CCI-500/CCI-550 on Base platform */
  334. #define PLAT_FVP_CCI5XX_BASE UL(0x2a000000)
  335. #define PLAT_FVP_CCI5XX_CLUS0_SL_PORT 5
  336. #define PLAT_FVP_CCI5XX_CLUS1_SL_PORT 6
  337. /* CCN related constants. Only CCN 502 is currently supported */
  338. #define PLAT_ARM_CCN_BASE UL(0x2e000000)
  339. #define PLAT_ARM_CLUSTER_TO_CCN_ID_MAP 1, 5, 7, 11
  340. /* System timer related constants */
  341. #define PLAT_ARM_NSTIMER_FRAME_ID U(1)
  342. /* Mailbox base address */
  343. #define PLAT_ARM_TRUSTED_MAILBOX_BASE ARM_TRUSTED_SRAM_BASE
  344. /* TrustZone controller related constants
  345. *
  346. * Currently only filters 0 and 2 are connected on Base FVP.
  347. * Filter 0 : CPU clusters (no access to DRAM by default)
  348. * Filter 1 : not connected
  349. * Filter 2 : LCDs (access to VRAM allowed by default)
  350. * Filter 3 : not connected
  351. * Programming unconnected filters will have no effect at the
  352. * moment. These filter could, however, be connected in future.
  353. * So care should be taken not to configure the unused filters.
  354. *
  355. * Allow only non-secure access to all DRAM to supported devices.
  356. * Give access to the CPUs and Virtio. Some devices
  357. * would normally use the default ID so allow that too.
  358. */
  359. #define PLAT_ARM_TZC_BASE UL(0x2a4a0000)
  360. #define PLAT_ARM_TZC_FILTERS TZC_400_REGION_ATTR_FILTER_BIT(0)
  361. #define PLAT_ARM_TZC_NS_DEV_ACCESS ( \
  362. TZC_REGION_ACCESS_RDWR(FVP_NSAID_DEFAULT) | \
  363. TZC_REGION_ACCESS_RDWR(FVP_NSAID_PCI) | \
  364. TZC_REGION_ACCESS_RDWR(FVP_NSAID_AP) | \
  365. TZC_REGION_ACCESS_RDWR(FVP_NSAID_VIRTIO) | \
  366. TZC_REGION_ACCESS_RDWR(FVP_NSAID_VIRTIO_OLD))
  367. /*
  368. * GIC related constants to cater for both GICv2 and GICv3 instances of an
  369. * FVP. They could be overridden at runtime in case the FVP implements the
  370. * legacy VE memory map.
  371. */
  372. #define PLAT_ARM_GICD_BASE BASE_GICD_BASE
  373. #define PLAT_ARM_GICR_BASE BASE_GICR_BASE
  374. #define PLAT_ARM_GICC_BASE BASE_GICC_BASE
  375. /*
  376. * Define a list of Group 1 Secure and Group 0 interrupts as per GICv3
  377. * terminology. On a GICv2 system or mode, the lists will be merged and treated
  378. * as Group 0 interrupts.
  379. */
  380. #define PLAT_ARM_G1S_IRQ_PROPS(grp) \
  381. ARM_G1S_IRQ_PROPS(grp), \
  382. INTR_PROP_DESC(FVP_IRQ_TZ_WDOG, GIC_HIGHEST_SEC_PRIORITY, (grp), \
  383. GIC_INTR_CFG_LEVEL), \
  384. INTR_PROP_DESC(FVP_IRQ_SEC_SYS_TIMER, GIC_HIGHEST_SEC_PRIORITY, (grp), \
  385. GIC_INTR_CFG_LEVEL)
  386. #define PLAT_ARM_G0_IRQ_PROPS(grp) ARM_G0_IRQ_PROPS(grp)
  387. #if SDEI_IN_FCONF
  388. #define PLAT_SDEI_DP_EVENT_MAX_CNT ARM_SDEI_DP_EVENT_MAX_CNT
  389. #define PLAT_SDEI_DS_EVENT_MAX_CNT ARM_SDEI_DS_EVENT_MAX_CNT
  390. #else
  391. #if PLATFORM_TEST_RAS_FFH || PLATFORM_TEST_FFH_LSP_RAS_SP
  392. #define PLAT_ARM_PRIVATE_SDEI_EVENTS \
  393. ARM_SDEI_PRIVATE_EVENTS, \
  394. SDEI_EXPLICIT_EVENT(5000, SDEI_MAPF_NORMAL), \
  395. SDEI_EXPLICIT_EVENT(5001, SDEI_MAPF_NORMAL), \
  396. SDEI_EXPLICIT_EVENT(5002, SDEI_MAPF_NORMAL), \
  397. SDEI_EXPLICIT_EVENT(5003, SDEI_MAPF_CRITICAL), \
  398. SDEI_EXPLICIT_EVENT(5004, SDEI_MAPF_CRITICAL)
  399. #else
  400. #define PLAT_ARM_PRIVATE_SDEI_EVENTS ARM_SDEI_PRIVATE_EVENTS
  401. #endif
  402. #define PLAT_ARM_SHARED_SDEI_EVENTS ARM_SDEI_SHARED_EVENTS
  403. #endif
  404. #define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \
  405. PLAT_SP_IMAGE_NS_BUF_SIZE)
  406. #define PLAT_SP_PRI 0x20
  407. /*
  408. * Physical and virtual address space limits for MMU in AARCH64 & AARCH32 modes
  409. */
  410. #ifdef __aarch64__
  411. #define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 36)
  412. #define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 36)
  413. #else
  414. #define PLAT_PHY_ADDR_SPACE_SIZE (1ULL << 32)
  415. #define PLAT_VIRT_ADDR_SPACE_SIZE (1ULL << 32)
  416. #endif
  417. /*
  418. * Maximum size of Event Log buffer used in Measured Boot Event Log driver
  419. */
  420. #if ENABLE_RME && (defined(SPD_tspd) || defined(SPD_opteed) || defined(SPD_spmd))
  421. /* Account for additional measurements of secure partitions and SPM. */
  422. #define PLAT_ARM_EVENT_LOG_MAX_SIZE UL(0x800)
  423. #else
  424. #define PLAT_ARM_EVENT_LOG_MAX_SIZE UL(0x400)
  425. #endif
  426. /*
  427. * Maximum size of Event Log buffer used for DRTM
  428. */
  429. #define PLAT_DRTM_EVENT_LOG_MAX_SIZE UL(0x300)
  430. /*
  431. * Number of MMAP entries used by DRTM implementation
  432. */
  433. #define PLAT_DRTM_MMAP_ENTRIES PLAT_ARM_MMAP_ENTRIES
  434. #endif /* PLATFORM_DEF_H */