Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 1 | /* |
Rohit Mathew | 2fd5205 | 2021-12-13 15:40:25 +0000 | [diff] [blame] | 2 | * Copyright (c) 2018-2022, Arm Limited and Contributors. All rights reserved. |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Chandni Cherukuri | a3f6613 | 2018-08-10 11:17:58 +0530 | [diff] [blame] | 7 | #ifndef SGI_BASE_PLATFORM_DEF_H |
| 8 | #define SGI_BASE_PLATFORM_DEF_H |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 9 | |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 10 | #include <lib/utils_def.h> |
| 11 | #include <lib/xlat_tables/xlat_tables_defs.h> |
Antonio Nino Diaz | bd7b740 | 2019-01-25 14:30:04 +0000 | [diff] [blame] | 12 | #include <plat/arm/common/arm_def.h> |
| 13 | #include <plat/arm/common/arm_spm_def.h> |
| 14 | #include <plat/arm/css/common/css_def.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 15 | #include <plat/common/common_def.h> |
| 16 | |
Vijayenthiran Subramaniam | c4e68a4 | 2019-10-28 14:49:48 +0530 | [diff] [blame] | 17 | #define PLATFORM_CORE_COUNT (CSS_SGI_CHIP_COUNT * \ |
| 18 | PLAT_ARM_CLUSTER_COUNT * \ |
| 19 | CSS_SGI_MAX_CPUS_PER_CLUSTER * \ |
Vishwanatha HG | 64f0b6f | 2018-05-08 17:15:37 +0530 | [diff] [blame] | 20 | CSS_SGI_MAX_PE_PER_CPU) |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 21 | |
Antonio Nino Diaz | 48bfb54 | 2018-10-11 13:02:34 +0100 | [diff] [blame] | 22 | #define PLAT_ARM_TRUSTED_SRAM_SIZE 0x00040000 /* 256 KB */ |
| 23 | |
Vijayenthiran Subramaniam | 00cd080 | 2022-01-25 20:37:20 +0530 | [diff] [blame] | 24 | /* Remote chip address offset */ |
| 25 | #define CSS_SGI_REMOTE_CHIP_MEM_OFFSET(n) \ |
| 26 | ((ULL(1) << CSS_SGI_ADDR_BITS_PER_CHIP) * (n)) |
Vijayenthiran Subramaniam | 2478f8e | 2019-10-28 14:49:48 +0530 | [diff] [blame] | 27 | |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 28 | /* |
| 29 | * PLAT_ARM_MMAP_ENTRIES depends on the number of entries in the |
Aditya Angadi | ca14fb8 | 2021-02-17 18:39:32 +0530 | [diff] [blame] | 30 | * plat_arm_mmap array defined for each BL stage. In addition to that, on |
| 31 | * multi-chip platforms, address regions on each of the remote chips are |
| 32 | * also mapped. In BL31, for instance, three address regions on the remote |
| 33 | * chips are accessed - secure ram, css device and soc device regions. |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 34 | */ |
| 35 | #if defined(IMAGE_BL31) |
Paul Beesley | db4e25a | 2019-10-14 15:27:12 +0000 | [diff] [blame] | 36 | # if SPM_MM |
Aditya Angadi | ca14fb8 | 2021-02-17 18:39:32 +0530 | [diff] [blame] | 37 | # define PLAT_ARM_MMAP_ENTRIES (9 + ((CSS_SGI_CHIP_COUNT - 1) * 3)) |
| 38 | # define MAX_XLAT_TABLES (7 + ((CSS_SGI_CHIP_COUNT - 1) * 3)) |
Rohit Mathew | 9c07f60 | 2021-12-13 15:33:04 +0000 | [diff] [blame] | 39 | # define PLAT_SP_IMAGE_MMAP_REGIONS 10 |
| 40 | # define PLAT_SP_IMAGE_MAX_XLAT_TABLES 12 |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 41 | # else |
Aditya Angadi | d1608f1 | 2020-04-08 14:17:08 +0530 | [diff] [blame] | 42 | # define PLAT_ARM_MMAP_ENTRIES (5 + ((CSS_SGI_CHIP_COUNT - 1) * 3)) |
Sami Mujawar | a4f315c | 2020-04-30 15:50:34 +0100 | [diff] [blame] | 43 | # define MAX_XLAT_TABLES (6 + ((CSS_SGI_CHIP_COUNT - 1) * 3)) |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 44 | # endif |
| 45 | #elif defined(IMAGE_BL32) |
| 46 | # define PLAT_ARM_MMAP_ENTRIES 8 |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 47 | # define MAX_XLAT_TABLES 5 |
Aditya Angadi | ca14fb8 | 2021-02-17 18:39:32 +0530 | [diff] [blame] | 48 | #elif defined(IMAGE_BL2) |
| 49 | # define PLAT_ARM_MMAP_ENTRIES (11 + (CSS_SGI_CHIP_COUNT - 1)) |
| 50 | |
| 51 | /* |
| 52 | * MAX_XLAT_TABLES entries need to be doubled because when the address width |
| 53 | * exceeds 40 bits an additional level of translation is required. In case of |
| 54 | * multichip platforms peripherals also fall into address space with width |
| 55 | * > 40 bits |
| 56 | * |
| 57 | */ |
| 58 | # define MAX_XLAT_TABLES (7 + ((CSS_SGI_CHIP_COUNT - 1) * 2)) |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 59 | #elif !USE_ROMLIB |
| 60 | # define PLAT_ARM_MMAP_ENTRIES 11 |
Vijayenthiran Subramaniam | c4e68a4 | 2019-10-28 14:49:48 +0530 | [diff] [blame] | 61 | # define MAX_XLAT_TABLES 7 |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 62 | #else |
| 63 | # define PLAT_ARM_MMAP_ENTRIES 12 |
| 64 | # define MAX_XLAT_TABLES 6 |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 65 | #endif |
| 66 | |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 67 | /* |
| 68 | * PLAT_ARM_MAX_BL1_RW_SIZE is calculated using the current BL1 RW debug size |
| 69 | * plus a little space for growth. |
| 70 | */ |
Vijayenthiran Subramaniam | 061e372 | 2022-01-25 22:59:10 +0530 | [diff] [blame] | 71 | #define PLAT_ARM_MAX_BL1_RW_SIZE (64 * 1024) /* 64 KB */ |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 72 | |
| 73 | /* |
| 74 | * PLAT_ARM_MAX_ROMLIB_RW_SIZE is define to use a full page |
| 75 | */ |
| 76 | |
| 77 | #if USE_ROMLIB |
| 78 | #define PLAT_ARM_MAX_ROMLIB_RW_SIZE 0x1000 |
| 79 | #define PLAT_ARM_MAX_ROMLIB_RO_SIZE 0xe000 |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 80 | #else |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 81 | #define PLAT_ARM_MAX_ROMLIB_RW_SIZE 0 |
| 82 | #define PLAT_ARM_MAX_ROMLIB_RO_SIZE 0 |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 83 | #endif |
| 84 | |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 85 | /* |
| 86 | * PLAT_ARM_MAX_BL2_SIZE is calculated using the current BL2 debug size plus a |
Aditya Angadi | ca14fb8 | 2021-02-17 18:39:32 +0530 | [diff] [blame] | 87 | * little space for growth. Additional 8KiB space is added per chip in |
| 88 | * order to accommodate the additional level of translation required for "TZC" |
| 89 | * peripheral access which lies in >4TB address space. |
| 90 | * |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 91 | */ |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 92 | #if TRUSTED_BOARD_BOOT |
Vijayenthiran Subramaniam | 0e5ee5e | 2021-10-06 15:12:25 +0530 | [diff] [blame] | 93 | # define PLAT_ARM_MAX_BL2_SIZE (0x20000 + ((CSS_SGI_CHIP_COUNT - 1) * \ |
Aditya Angadi | ca14fb8 | 2021-02-17 18:39:32 +0530 | [diff] [blame] | 94 | 0x2000)) |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 95 | #else |
Aditya Angadi | ca14fb8 | 2021-02-17 18:39:32 +0530 | [diff] [blame] | 96 | # define PLAT_ARM_MAX_BL2_SIZE (0x14000 + ((CSS_SGI_CHIP_COUNT - 1) * \ |
| 97 | 0x2000)) |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 98 | #endif |
| 99 | |
Antonio Nino Diaz | 9202926 | 2018-09-28 16:39:26 +0100 | [diff] [blame] | 100 | /* |
| 101 | * Since BL31 NOBITS overlays BL2 and BL1-RW, PLAT_ARM_MAX_BL31_SIZE is |
| 102 | * calculated using the current BL31 PROGBITS debug size plus the sizes of |
| 103 | * BL2 and BL1-RW |
| 104 | */ |
Nishant Sharma | 5cfd675 | 2022-03-31 17:16:21 +0100 | [diff] [blame] | 105 | #define PLAT_ARM_MAX_BL31_SIZE 0x48000 |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 106 | |
Antonio Nino Diaz | 48bfb54 | 2018-10-11 13:02:34 +0100 | [diff] [blame] | 107 | /* |
| 108 | * Size of cacheable stacks |
| 109 | */ |
| 110 | #if defined(IMAGE_BL1) |
| 111 | # if TRUSTED_BOARD_BOOT |
| 112 | # define PLATFORM_STACK_SIZE 0x1000 |
| 113 | # else |
| 114 | # define PLATFORM_STACK_SIZE 0x440 |
| 115 | # endif |
| 116 | #elif defined(IMAGE_BL2) |
| 117 | # if TRUSTED_BOARD_BOOT |
| 118 | # define PLATFORM_STACK_SIZE 0x1000 |
| 119 | # else |
| 120 | # define PLATFORM_STACK_SIZE 0x400 |
| 121 | # endif |
| 122 | #elif defined(IMAGE_BL2U) |
| 123 | # define PLATFORM_STACK_SIZE 0x400 |
| 124 | #elif defined(IMAGE_BL31) |
Paul Beesley | db4e25a | 2019-10-14 15:27:12 +0000 | [diff] [blame] | 125 | # if SPM_MM |
Antonio Nino Diaz | 48bfb54 | 2018-10-11 13:02:34 +0100 | [diff] [blame] | 126 | # define PLATFORM_STACK_SIZE 0x500 |
| 127 | # else |
| 128 | # define PLATFORM_STACK_SIZE 0x400 |
| 129 | # endif |
| 130 | #elif defined(IMAGE_BL32) |
| 131 | # define PLATFORM_STACK_SIZE 0x440 |
| 132 | #endif |
| 133 | |
Rohit Mathew | 2fd5205 | 2021-12-13 15:40:25 +0000 | [diff] [blame] | 134 | /* PL011 UART related constants */ |
| 135 | #define SOC_CSS_SEC_UART_BASE UL(0x2A410000) |
| 136 | #define SOC_CSS_NSEC_UART_BASE UL(0x2A400000) |
| 137 | #define SOC_CSS_UART_SIZE UL(0x10000) |
| 138 | #define SOC_CSS_UART_CLK_IN_HZ UL(7372800) |
| 139 | |
| 140 | /* UART related constants */ |
| 141 | #define PLAT_ARM_BOOT_UART_BASE SOC_CSS_SEC_UART_BASE |
| 142 | #define PLAT_ARM_BOOT_UART_CLK_IN_HZ SOC_CSS_UART_CLK_IN_HZ |
| 143 | |
| 144 | #define PLAT_ARM_RUN_UART_BASE SOC_CSS_SEC_UART_BASE |
| 145 | #define PLAT_ARM_RUN_UART_CLK_IN_HZ SOC_CSS_UART_CLK_IN_HZ |
| 146 | |
| 147 | #define PLAT_ARM_CRASH_UART_BASE SOC_CSS_SEC_UART_BASE |
| 148 | #define PLAT_ARM_CRASH_UART_CLK_IN_HZ SOC_CSS_UART_CLK_IN_HZ |
Antonio Nino Diaz | 48bfb54 | 2018-10-11 13:02:34 +0100 | [diff] [blame] | 149 | |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 150 | #define PLAT_ARM_NSTIMER_FRAME_ID 0 |
| 151 | |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 152 | #define PLAT_ARM_TRUSTED_ROM_BASE 0x0 |
| 153 | #define PLAT_ARM_TRUSTED_ROM_SIZE 0x00080000 /* 512KB */ |
| 154 | |
Chris Kay | 42fbdfc | 2018-05-10 14:27:45 +0100 | [diff] [blame] | 155 | #define PLAT_ARM_NSRAM_BASE 0x06000000 |
| 156 | #define PLAT_ARM_NSRAM_SIZE 0x00080000 /* 512KB */ |
| 157 | |
Suyash Pathak | 00b9983 | 2020-02-12 10:36:20 +0530 | [diff] [blame] | 158 | #define PLAT_ARM_DRAM2_BASE ULL(0x8080000000) |
| 159 | #define PLAT_ARM_DRAM2_SIZE ULL(0x180000000) |
| 160 | |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 161 | #define PLAT_ARM_G1S_IRQ_PROPS(grp) CSS_G1S_IRQ_PROPS(grp) |
| 162 | #define PLAT_ARM_G0_IRQ_PROPS(grp) ARM_G0_IRQ_PROPS(grp) |
| 163 | |
| 164 | #define CSS_SGI_DEVICE_BASE (0x20000000) |
| 165 | #define CSS_SGI_DEVICE_SIZE (0x20000000) |
| 166 | #define CSS_SGI_MAP_DEVICE MAP_REGION_FLAT( \ |
| 167 | CSS_SGI_DEVICE_BASE, \ |
| 168 | CSS_SGI_DEVICE_SIZE, \ |
| 169 | MT_DEVICE | MT_RW | MT_SECURE) |
| 170 | |
Vijayenthiran Subramaniam | 2478f8e | 2019-10-28 14:49:48 +0530 | [diff] [blame] | 171 | #define ARM_MAP_SHARED_RAM_REMOTE_CHIP(n) \ |
| 172 | MAP_REGION_FLAT( \ |
| 173 | CSS_SGI_REMOTE_CHIP_MEM_OFFSET(n) + \ |
| 174 | ARM_SHARED_RAM_BASE, \ |
| 175 | ARM_SHARED_RAM_SIZE, \ |
Vijayenthiran Subramaniam | baa930c | 2020-03-11 15:05:49 +0530 | [diff] [blame] | 176 | MT_NON_CACHEABLE | MT_RW | MT_SECURE \ |
Vijayenthiran Subramaniam | 2478f8e | 2019-10-28 14:49:48 +0530 | [diff] [blame] | 177 | ) |
| 178 | |
| 179 | #define CSS_SGI_MAP_DEVICE_REMOTE_CHIP(n) \ |
| 180 | MAP_REGION_FLAT( \ |
| 181 | CSS_SGI_REMOTE_CHIP_MEM_OFFSET(n) + \ |
| 182 | CSS_SGI_DEVICE_BASE, \ |
| 183 | CSS_SGI_DEVICE_SIZE, \ |
| 184 | MT_DEVICE | MT_RW | MT_SECURE \ |
| 185 | ) |
| 186 | |
| 187 | #define SOC_CSS_MAP_DEVICE_REMOTE_CHIP(n) \ |
| 188 | MAP_REGION_FLAT( \ |
| 189 | CSS_SGI_REMOTE_CHIP_MEM_OFFSET(n) + \ |
| 190 | SOC_CSS_DEVICE_BASE, \ |
| 191 | SOC_CSS_DEVICE_SIZE, \ |
| 192 | MT_DEVICE | MT_RW | MT_SECURE \ |
| 193 | ) |
| 194 | |
Sughosh Ganu | e1579e0 | 2018-05-16 17:19:56 +0530 | [diff] [blame] | 195 | /* Map the secure region for access from S-EL0 */ |
| 196 | #define PLAT_ARM_SECURE_MAP_DEVICE MAP_REGION_FLAT( \ |
| 197 | SOC_CSS_DEVICE_BASE, \ |
| 198 | SOC_CSS_DEVICE_SIZE, \ |
| 199 | MT_DEVICE | MT_RW | MT_SECURE | MT_USER) |
| 200 | |
Sughosh Ganu | d284b57 | 2018-11-14 10:42:46 +0530 | [diff] [blame] | 201 | #define PLAT_SP_PRI PLAT_RAS_PRI |
| 202 | |
Thomas Abraham | a0aea1a | 2021-02-16 11:36:00 +0530 | [diff] [blame] | 203 | #if SPM_MM && RAS_EXTENSION |
| 204 | /* |
| 205 | * CPER buffer memory of 128KB is reserved and it is placed adjacent to the |
| 206 | * memory shared between EL3 and S-EL0. |
| 207 | */ |
| 208 | #define CSS_SGI_SP_CPER_BUF_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \ |
| 209 | PLAT_SP_IMAGE_NS_BUF_SIZE) |
| 210 | #define CSS_SGI_SP_CPER_BUF_SIZE ULL(0x20000) |
| 211 | #define CSS_SGI_SP_CPER_BUF_MMAP MAP_REGION2( \ |
| 212 | CSS_SGI_SP_CPER_BUF_BASE, \ |
| 213 | CSS_SGI_SP_CPER_BUF_BASE, \ |
| 214 | CSS_SGI_SP_CPER_BUF_SIZE, \ |
| 215 | MT_RW_DATA | MT_NS | MT_USER, \ |
Sughosh Ganu | 70661cf | 2018-05-16 17:26:40 +0530 | [diff] [blame] | 216 | PAGE_SIZE) |
Sughosh Ganu | 5f21294 | 2018-05-16 15:35:25 +0530 | [diff] [blame] | 217 | |
Thomas Abraham | a0aea1a | 2021-02-16 11:36:00 +0530 | [diff] [blame] | 218 | /* |
| 219 | * Secure partition stack follows right after the memory space reserved for |
| 220 | * CPER buffer memory. |
| 221 | */ |
| 222 | #define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \ |
| 223 | PLAT_SP_IMAGE_NS_BUF_SIZE + \ |
| 224 | CSS_SGI_SP_CPER_BUF_SIZE) |
| 225 | #elif SPM_MM |
| 226 | /* |
| 227 | * Secure partition stack follows right after the memory region that is shared |
| 228 | * between EL3 and S-EL0. |
| 229 | */ |
Ard Biesheuvel | 8b034fc | 2018-12-29 19:43:21 +0100 | [diff] [blame] | 230 | #define PLAT_ARM_SP_IMAGE_STACK_BASE (PLAT_SP_IMAGE_NS_BUF_BASE + \ |
| 231 | PLAT_SP_IMAGE_NS_BUF_SIZE) |
Thomas Abraham | a0aea1a | 2021-02-16 11:36:00 +0530 | [diff] [blame] | 232 | #endif /* SPM_MM && RAS_EXTENSION */ |
Sughosh Ganu | 5f21294 | 2018-05-16 15:35:25 +0530 | [diff] [blame] | 233 | |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 234 | /* Platform ID address */ |
| 235 | #define SSC_VERSION (SSC_REG_BASE + SSC_VERSION_OFFSET) |
Julius Werner | 53456fc | 2019-07-09 13:49:11 -0700 | [diff] [blame] | 236 | #ifndef __ASSEMBLER__ |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 237 | /* SSC_VERSION related accessors */ |
| 238 | /* Returns the part number of the platform */ |
| 239 | #define GET_SGI_PART_NUM \ |
| 240 | GET_SSC_VERSION_PART_NUM(mmio_read_32(SSC_VERSION)) |
| 241 | /* Returns the configuration number of the platform */ |
| 242 | #define GET_SGI_CONFIG_NUM \ |
| 243 | GET_SSC_VERSION_CONFIG(mmio_read_32(SSC_VERSION)) |
Julius Werner | 53456fc | 2019-07-09 13:49:11 -0700 | [diff] [blame] | 244 | #endif /* __ASSEMBLER__ */ |
Nariman Poushin | 0ece80f | 2018-02-26 06:52:04 +0000 | [diff] [blame] | 245 | |
Roberto Vargas | bcca6c6 | 2018-06-11 16:15:35 +0100 | [diff] [blame] | 246 | /******************************************************************************* |
| 247 | * Memprotect definitions |
| 248 | ******************************************************************************/ |
| 249 | /* PSCI memory protect definitions: |
| 250 | * This variable is stored in a non-secure flash because some ARM reference |
| 251 | * platforms do not have secure NVRAM. Real systems that provided MEM_PROTECT |
| 252 | * support must use a secure NVRAM to store the PSCI MEM_PROTECT definitions. |
| 253 | */ |
| 254 | #define PLAT_ARM_MEM_PROT_ADDR (V2M_FLASH0_BASE + \ |
| 255 | V2M_FLASH0_SIZE - V2M_FLASH_BLOCK_SIZE) |
| 256 | |
Aditya Angadi | 20b4841 | 2019-04-16 11:29:14 +0530 | [diff] [blame] | 257 | /*Secure Watchdog Constants */ |
| 258 | #define SBSA_SECURE_WDOG_BASE UL(0x2A480000) |
| 259 | #define SBSA_SECURE_WDOG_TIMEOUT UL(100) |
Roberto Vargas | bcca6c6 | 2018-06-11 16:15:35 +0100 | [diff] [blame] | 260 | |
Aditya Angadi | 7f8837b | 2019-12-31 14:23:53 +0530 | [diff] [blame] | 261 | /* Number of SCMI channels on the platform */ |
| 262 | #define PLAT_ARM_SCMI_CHANNEL_COUNT CSS_SGI_CHIP_COUNT |
| 263 | |
Aditya Angadi | 44224bd | 2020-05-14 17:00:07 +0530 | [diff] [blame] | 264 | /* |
| 265 | * Mapping definition of the TrustZone Controller for ARM SGI/RD platforms |
| 266 | * where both the DRAM regions are marked for non-secure access. This applies |
| 267 | * to multi-chip platforms. |
| 268 | */ |
| 269 | #define SGI_PLAT_TZC_NS_REMOTE_REGIONS_DEF(n) \ |
| 270 | {CSS_SGI_REMOTE_CHIP_MEM_OFFSET(n) + ARM_DRAM1_BASE, \ |
| 271 | CSS_SGI_REMOTE_CHIP_MEM_OFFSET(n) + ARM_DRAM1_END, \ |
| 272 | ARM_TZC_NS_DRAM_S_ACCESS, PLAT_ARM_TZC_NS_DEV_ACCESS}, \ |
| 273 | {CSS_SGI_REMOTE_CHIP_MEM_OFFSET(n) + ARM_DRAM2_BASE, \ |
| 274 | CSS_SGI_REMOTE_CHIP_MEM_OFFSET(n) + ARM_DRAM2_END, \ |
| 275 | ARM_TZC_NS_DRAM_S_ACCESS, PLAT_ARM_TZC_NS_DEV_ACCESS} |
| 276 | |
Rohit Mathew | 9c07f60 | 2021-12-13 15:33:04 +0000 | [diff] [blame] | 277 | #if SPM_MM |
| 278 | |
| 279 | /* |
| 280 | * Stand-alone MM logs would be routed via secure UART. Define page table |
| 281 | * entry for secure UART which would be common to all platforms. |
| 282 | */ |
| 283 | #define SOC_PLATFORM_SECURE_UART MAP_REGION_FLAT( \ |
| 284 | SOC_CSS_SEC_UART_BASE, \ |
| 285 | SOC_CSS_UART_SIZE, \ |
| 286 | MT_DEVICE | MT_RW | \ |
| 287 | MT_SECURE | MT_USER) |
| 288 | |
| 289 | #endif |
| 290 | |
Nishant Sharma | 289f782 | 2021-11-30 09:31:48 +0000 | [diff] [blame] | 291 | /* SDS ID for unusable CPU MPID list structure */ |
| 292 | #define SDS_ISOLATED_CPU_LIST_ID U(128) |
| 293 | |
Chandni Cherukuri | a3f6613 | 2018-08-10 11:17:58 +0530 | [diff] [blame] | 294 | #endif /* SGI_BASE_PLATFORM_DEF_H */ |