Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2019, Arm Limited. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | * |
| 6 | */ |
| 7 | |
| 8 | /*********** WARNING: This is an auto-generated file. Do not edit! ***********/ |
| 9 | |
| 10 | #ifndef __TFM_SPM_DB_INC__ |
| 11 | #define __TFM_SPM_DB_INC__ |
| 12 | |
| 13 | #include "spm_api.h" |
| 14 | |
| 15 | /**************************************************************************/ |
| 16 | /** IRQ count per partition */ |
| 17 | /**************************************************************************/ |
| 18 | #define TFM_PARTITION_TFM_SP_STORAGE_IRQ_COUNT 0 |
| 19 | |
| 20 | #ifdef TFM_PARTITION_AUDIT_LOG |
| 21 | #define TFM_PARTITION_TFM_SP_AUDIT_LOG_IRQ_COUNT 0 |
| 22 | #endif /* TFM_PARTITION_AUDIT_LOG */ |
| 23 | |
| 24 | #define TFM_PARTITION_TFM_SP_CRYPTO_IRQ_COUNT 0 |
| 25 | |
| 26 | #ifdef TFM_PARTITION_PLATFORM |
| 27 | #define TFM_PARTITION_TFM_SP_PLATFORM_IRQ_COUNT 0 |
| 28 | #endif /* TFM_PARTITION_PLATFORM */ |
| 29 | |
| 30 | #define TFM_PARTITION_TFM_SP_INITIAL_ATTESTATION_IRQ_COUNT 0 |
| 31 | |
| 32 | #ifdef TFM_PARTITION_TEST_CORE |
| 33 | #define TFM_PARTITION_TFM_SP_CORE_TEST_IRQ_COUNT 0 |
| 34 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 35 | |
| 36 | #ifdef TFM_PARTITION_TEST_CORE |
| 37 | #define TFM_PARTITION_TFM_SP_CORE_TEST_2_IRQ_COUNT 0 |
| 38 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 39 | |
| 40 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 41 | #define TFM_PARTITION_TFM_SP_SECURE_TEST_PARTITION_IRQ_COUNT 0 |
| 42 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 43 | |
| 44 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 45 | #define TFM_PARTITION_TFM_SP_IPC_SERVICE_TEST_IRQ_COUNT 0 |
| 46 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 47 | |
| 48 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 49 | #define TFM_PARTITION_TFM_SP_IPC_CLIENT_TEST_IRQ_COUNT 0 |
| 50 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 51 | |
| 52 | #ifdef TFM_PARTITION_TEST_CORE |
| 53 | #define TFM_PARTITION_TFM_IRQ_TEST_1_IRQ_COUNT 1 |
| 54 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 55 | |
| 56 | /**************************************************************************/ |
| 57 | /** Declarations of partition init functions */ |
| 58 | /**************************************************************************/ |
| 59 | extern int32_t tfm_sst_req_mngr_init(void); |
| 60 | |
| 61 | #ifdef TFM_PARTITION_AUDIT_LOG |
| 62 | extern int32_t audit_core_init(void); |
| 63 | #endif /* TFM_PARTITION_AUDIT_LOG */ |
| 64 | |
| 65 | extern int32_t tfm_crypto_init(void); |
| 66 | |
| 67 | #ifdef TFM_PARTITION_PLATFORM |
| 68 | extern int32_t platform_sp_init(void); |
| 69 | #endif /* TFM_PARTITION_PLATFORM */ |
| 70 | |
| 71 | extern int32_t attest_partition_init(void); |
| 72 | |
| 73 | #ifdef TFM_PARTITION_TEST_CORE |
| 74 | extern int32_t core_test_init(void); |
| 75 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 76 | |
| 77 | #ifdef TFM_PARTITION_TEST_CORE |
| 78 | extern int32_t core_test_2_init(void); |
| 79 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 80 | |
| 81 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 82 | extern int32_t tfm_secure_client_service_init(void); |
| 83 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 84 | |
| 85 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 86 | extern int32_t ipc_service_test_main(void); |
| 87 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 88 | |
| 89 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 90 | extern int32_t ipc_client_test_main(void); |
| 91 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 92 | |
| 93 | #ifdef TFM_PARTITION_TEST_CORE |
| 94 | extern int32_t tfm_irq_test_1_init(void); |
| 95 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 96 | |
| 97 | /**************************************************************************/ |
| 98 | /** Memory region declarations */ |
| 99 | /**************************************************************************/ |
| 100 | REGION_DECLARE(Image$$, TFM_SP_STORAGE, $$Base); |
| 101 | REGION_DECLARE(Image$$, TFM_SP_STORAGE, $$Limit); |
| 102 | REGION_DECLARE(Image$$, TFM_SP_STORAGE, $$RO$$Base); |
| 103 | REGION_DECLARE(Image$$, TFM_SP_STORAGE, $$RO$$Limit); |
| 104 | REGION_DECLARE(Image$$, TFM_SP_STORAGE, _DATA$$RW$$Base); |
| 105 | REGION_DECLARE(Image$$, TFM_SP_STORAGE, _DATA$$RW$$Limit); |
| 106 | REGION_DECLARE(Image$$, TFM_SP_STORAGE, _DATA$$ZI$$Base); |
| 107 | REGION_DECLARE(Image$$, TFM_SP_STORAGE, _DATA$$ZI$$Limit); |
| 108 | REGION_DECLARE(Image$$, TFM_SP_STORAGE, _STACK$$ZI$$Base); |
| 109 | REGION_DECLARE(Image$$, TFM_SP_STORAGE, _STACK$$ZI$$Limit); |
| 110 | |
| 111 | #ifdef TFM_PARTITION_AUDIT_LOG |
| 112 | REGION_DECLARE(Image$$, TFM_SP_AUDIT_LOG, $$Base); |
| 113 | REGION_DECLARE(Image$$, TFM_SP_AUDIT_LOG, $$Limit); |
| 114 | REGION_DECLARE(Image$$, TFM_SP_AUDIT_LOG, $$RO$$Base); |
| 115 | REGION_DECLARE(Image$$, TFM_SP_AUDIT_LOG, $$RO$$Limit); |
| 116 | REGION_DECLARE(Image$$, TFM_SP_AUDIT_LOG, _DATA$$RW$$Base); |
| 117 | REGION_DECLARE(Image$$, TFM_SP_AUDIT_LOG, _DATA$$RW$$Limit); |
| 118 | REGION_DECLARE(Image$$, TFM_SP_AUDIT_LOG, _DATA$$ZI$$Base); |
| 119 | REGION_DECLARE(Image$$, TFM_SP_AUDIT_LOG, _DATA$$ZI$$Limit); |
| 120 | REGION_DECLARE(Image$$, TFM_SP_AUDIT_LOG, _STACK$$ZI$$Base); |
| 121 | REGION_DECLARE(Image$$, TFM_SP_AUDIT_LOG, _STACK$$ZI$$Limit); |
| 122 | #endif /* TFM_PARTITION_AUDIT_LOG */ |
| 123 | |
| 124 | REGION_DECLARE(Image$$, TFM_SP_CRYPTO, $$Base); |
| 125 | REGION_DECLARE(Image$$, TFM_SP_CRYPTO, $$Limit); |
| 126 | REGION_DECLARE(Image$$, TFM_SP_CRYPTO, $$RO$$Base); |
| 127 | REGION_DECLARE(Image$$, TFM_SP_CRYPTO, $$RO$$Limit); |
| 128 | REGION_DECLARE(Image$$, TFM_SP_CRYPTO, _DATA$$RW$$Base); |
| 129 | REGION_DECLARE(Image$$, TFM_SP_CRYPTO, _DATA$$RW$$Limit); |
| 130 | REGION_DECLARE(Image$$, TFM_SP_CRYPTO, _DATA$$ZI$$Base); |
| 131 | REGION_DECLARE(Image$$, TFM_SP_CRYPTO, _DATA$$ZI$$Limit); |
| 132 | REGION_DECLARE(Image$$, TFM_SP_CRYPTO, _STACK$$ZI$$Base); |
| 133 | REGION_DECLARE(Image$$, TFM_SP_CRYPTO, _STACK$$ZI$$Limit); |
| 134 | |
| 135 | #ifdef TFM_PARTITION_PLATFORM |
| 136 | REGION_DECLARE(Image$$, TFM_SP_PLATFORM, $$Base); |
| 137 | REGION_DECLARE(Image$$, TFM_SP_PLATFORM, $$Limit); |
| 138 | REGION_DECLARE(Image$$, TFM_SP_PLATFORM, $$RO$$Base); |
| 139 | REGION_DECLARE(Image$$, TFM_SP_PLATFORM, $$RO$$Limit); |
| 140 | REGION_DECLARE(Image$$, TFM_SP_PLATFORM, _DATA$$RW$$Base); |
| 141 | REGION_DECLARE(Image$$, TFM_SP_PLATFORM, _DATA$$RW$$Limit); |
| 142 | REGION_DECLARE(Image$$, TFM_SP_PLATFORM, _DATA$$ZI$$Base); |
| 143 | REGION_DECLARE(Image$$, TFM_SP_PLATFORM, _DATA$$ZI$$Limit); |
| 144 | REGION_DECLARE(Image$$, TFM_SP_PLATFORM, _STACK$$ZI$$Base); |
| 145 | REGION_DECLARE(Image$$, TFM_SP_PLATFORM, _STACK$$ZI$$Limit); |
| 146 | #endif /* TFM_PARTITION_PLATFORM */ |
| 147 | |
| 148 | REGION_DECLARE(Image$$, TFM_SP_INITIAL_ATTESTATION, $$Base); |
| 149 | REGION_DECLARE(Image$$, TFM_SP_INITIAL_ATTESTATION, $$Limit); |
| 150 | REGION_DECLARE(Image$$, TFM_SP_INITIAL_ATTESTATION, $$RO$$Base); |
| 151 | REGION_DECLARE(Image$$, TFM_SP_INITIAL_ATTESTATION, $$RO$$Limit); |
| 152 | REGION_DECLARE(Image$$, TFM_SP_INITIAL_ATTESTATION, _DATA$$RW$$Base); |
| 153 | REGION_DECLARE(Image$$, TFM_SP_INITIAL_ATTESTATION, _DATA$$RW$$Limit); |
| 154 | REGION_DECLARE(Image$$, TFM_SP_INITIAL_ATTESTATION, _DATA$$ZI$$Base); |
| 155 | REGION_DECLARE(Image$$, TFM_SP_INITIAL_ATTESTATION, _DATA$$ZI$$Limit); |
| 156 | REGION_DECLARE(Image$$, TFM_SP_INITIAL_ATTESTATION, _STACK$$ZI$$Base); |
| 157 | REGION_DECLARE(Image$$, TFM_SP_INITIAL_ATTESTATION, _STACK$$ZI$$Limit); |
| 158 | |
| 159 | #ifdef TFM_PARTITION_TEST_CORE |
| 160 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST, $$Base); |
| 161 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST, $$Limit); |
| 162 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST, $$RO$$Base); |
| 163 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST, $$RO$$Limit); |
| 164 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST, _DATA$$RW$$Base); |
| 165 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST, _DATA$$RW$$Limit); |
| 166 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST, _DATA$$ZI$$Base); |
| 167 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST, _DATA$$ZI$$Limit); |
| 168 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST, _STACK$$ZI$$Base); |
| 169 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST, _STACK$$ZI$$Limit); |
| 170 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 171 | |
| 172 | #ifdef TFM_PARTITION_TEST_CORE |
| 173 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST_2, $$Base); |
| 174 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST_2, $$Limit); |
| 175 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST_2, $$RO$$Base); |
| 176 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST_2, $$RO$$Limit); |
| 177 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST_2, _DATA$$RW$$Base); |
| 178 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST_2, _DATA$$RW$$Limit); |
| 179 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST_2, _DATA$$ZI$$Base); |
| 180 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST_2, _DATA$$ZI$$Limit); |
| 181 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST_2, _STACK$$ZI$$Base); |
| 182 | REGION_DECLARE(Image$$, TFM_SP_CORE_TEST_2, _STACK$$ZI$$Limit); |
| 183 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 184 | |
| 185 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 186 | REGION_DECLARE(Image$$, TFM_SP_SECURE_TEST_PARTITION, $$Base); |
| 187 | REGION_DECLARE(Image$$, TFM_SP_SECURE_TEST_PARTITION, $$Limit); |
| 188 | REGION_DECLARE(Image$$, TFM_SP_SECURE_TEST_PARTITION, $$RO$$Base); |
| 189 | REGION_DECLARE(Image$$, TFM_SP_SECURE_TEST_PARTITION, $$RO$$Limit); |
| 190 | REGION_DECLARE(Image$$, TFM_SP_SECURE_TEST_PARTITION, _DATA$$RW$$Base); |
| 191 | REGION_DECLARE(Image$$, TFM_SP_SECURE_TEST_PARTITION, _DATA$$RW$$Limit); |
| 192 | REGION_DECLARE(Image$$, TFM_SP_SECURE_TEST_PARTITION, _DATA$$ZI$$Base); |
| 193 | REGION_DECLARE(Image$$, TFM_SP_SECURE_TEST_PARTITION, _DATA$$ZI$$Limit); |
| 194 | REGION_DECLARE(Image$$, TFM_SP_SECURE_TEST_PARTITION, _STACK$$ZI$$Base); |
| 195 | REGION_DECLARE(Image$$, TFM_SP_SECURE_TEST_PARTITION, _STACK$$ZI$$Limit); |
| 196 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 197 | |
| 198 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 199 | REGION_DECLARE(Image$$, TFM_SP_IPC_SERVICE_TEST, $$Base); |
| 200 | REGION_DECLARE(Image$$, TFM_SP_IPC_SERVICE_TEST, $$Limit); |
| 201 | REGION_DECLARE(Image$$, TFM_SP_IPC_SERVICE_TEST, $$RO$$Base); |
| 202 | REGION_DECLARE(Image$$, TFM_SP_IPC_SERVICE_TEST, $$RO$$Limit); |
| 203 | REGION_DECLARE(Image$$, TFM_SP_IPC_SERVICE_TEST, _DATA$$RW$$Base); |
| 204 | REGION_DECLARE(Image$$, TFM_SP_IPC_SERVICE_TEST, _DATA$$RW$$Limit); |
| 205 | REGION_DECLARE(Image$$, TFM_SP_IPC_SERVICE_TEST, _DATA$$ZI$$Base); |
| 206 | REGION_DECLARE(Image$$, TFM_SP_IPC_SERVICE_TEST, _DATA$$ZI$$Limit); |
| 207 | REGION_DECLARE(Image$$, TFM_SP_IPC_SERVICE_TEST, _STACK$$ZI$$Base); |
| 208 | REGION_DECLARE(Image$$, TFM_SP_IPC_SERVICE_TEST, _STACK$$ZI$$Limit); |
| 209 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 210 | |
| 211 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 212 | REGION_DECLARE(Image$$, TFM_SP_IPC_CLIENT_TEST, $$Base); |
| 213 | REGION_DECLARE(Image$$, TFM_SP_IPC_CLIENT_TEST, $$Limit); |
| 214 | REGION_DECLARE(Image$$, TFM_SP_IPC_CLIENT_TEST, $$RO$$Base); |
| 215 | REGION_DECLARE(Image$$, TFM_SP_IPC_CLIENT_TEST, $$RO$$Limit); |
| 216 | REGION_DECLARE(Image$$, TFM_SP_IPC_CLIENT_TEST, _DATA$$RW$$Base); |
| 217 | REGION_DECLARE(Image$$, TFM_SP_IPC_CLIENT_TEST, _DATA$$RW$$Limit); |
| 218 | REGION_DECLARE(Image$$, TFM_SP_IPC_CLIENT_TEST, _DATA$$ZI$$Base); |
| 219 | REGION_DECLARE(Image$$, TFM_SP_IPC_CLIENT_TEST, _DATA$$ZI$$Limit); |
| 220 | REGION_DECLARE(Image$$, TFM_SP_IPC_CLIENT_TEST, _STACK$$ZI$$Base); |
| 221 | REGION_DECLARE(Image$$, TFM_SP_IPC_CLIENT_TEST, _STACK$$ZI$$Limit); |
| 222 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 223 | |
| 224 | #ifdef TFM_PARTITION_TEST_CORE |
| 225 | REGION_DECLARE(Image$$, TFM_IRQ_TEST_1, $$Base); |
| 226 | REGION_DECLARE(Image$$, TFM_IRQ_TEST_1, $$Limit); |
| 227 | REGION_DECLARE(Image$$, TFM_IRQ_TEST_1, $$RO$$Base); |
| 228 | REGION_DECLARE(Image$$, TFM_IRQ_TEST_1, $$RO$$Limit); |
| 229 | REGION_DECLARE(Image$$, TFM_IRQ_TEST_1, _DATA$$RW$$Base); |
| 230 | REGION_DECLARE(Image$$, TFM_IRQ_TEST_1, _DATA$$RW$$Limit); |
| 231 | REGION_DECLARE(Image$$, TFM_IRQ_TEST_1, _DATA$$ZI$$Base); |
| 232 | REGION_DECLARE(Image$$, TFM_IRQ_TEST_1, _DATA$$ZI$$Limit); |
| 233 | REGION_DECLARE(Image$$, TFM_IRQ_TEST_1, _STACK$$ZI$$Base); |
| 234 | REGION_DECLARE(Image$$, TFM_IRQ_TEST_1, _STACK$$ZI$$Limit); |
| 235 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 236 | |
| 237 | /**************************************************************************/ |
| 238 | /** Context stacks for IRQ handling */ |
| 239 | /**************************************************************************/ |
| 240 | /* The max size of the context stack can be calculated as a function of the IRQ |
| 241 | * count of the secure partition: |
| 242 | * |
| 243 | * max_stack_size = intr_ctx_size + (IRQ_CNT * (intr_ctx_size + hndl_ctx_size)) |
| 244 | * |
| 245 | * where: |
| 246 | * intr_ctx: Frame pushed when the partition is interrupted |
| 247 | * hndl_ctx: Frame pushed when the partition is handling an interrupt |
| 248 | */ |
| 249 | static uint32_t ctx_stack_TFM_SP_STORAGE[ |
| 250 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 251 | (TFM_PARTITION_TFM_SP_STORAGE_IRQ_COUNT) * ( |
| 252 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 253 | sizeof(struct handler_ctx_stack_frame_t) |
| 254 | )) / sizeof(uint32_t)]; |
| 255 | |
| 256 | #ifdef TFM_PARTITION_AUDIT_LOG |
| 257 | static uint32_t ctx_stack_TFM_SP_AUDIT_LOG[ |
| 258 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 259 | (TFM_PARTITION_TFM_SP_AUDIT_LOG_IRQ_COUNT) * ( |
| 260 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 261 | sizeof(struct handler_ctx_stack_frame_t) |
| 262 | )) / sizeof(uint32_t)]; |
| 263 | #endif /* TFM_PARTITION_AUDIT_LOG */ |
| 264 | |
| 265 | static uint32_t ctx_stack_TFM_SP_CRYPTO[ |
| 266 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 267 | (TFM_PARTITION_TFM_SP_CRYPTO_IRQ_COUNT) * ( |
| 268 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 269 | sizeof(struct handler_ctx_stack_frame_t) |
| 270 | )) / sizeof(uint32_t)]; |
| 271 | |
| 272 | #ifdef TFM_PARTITION_PLATFORM |
| 273 | static uint32_t ctx_stack_TFM_SP_PLATFORM[ |
| 274 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 275 | (TFM_PARTITION_TFM_SP_PLATFORM_IRQ_COUNT) * ( |
| 276 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 277 | sizeof(struct handler_ctx_stack_frame_t) |
| 278 | )) / sizeof(uint32_t)]; |
| 279 | #endif /* TFM_PARTITION_PLATFORM */ |
| 280 | |
| 281 | static uint32_t ctx_stack_TFM_SP_INITIAL_ATTESTATION[ |
| 282 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 283 | (TFM_PARTITION_TFM_SP_INITIAL_ATTESTATION_IRQ_COUNT) * ( |
| 284 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 285 | sizeof(struct handler_ctx_stack_frame_t) |
| 286 | )) / sizeof(uint32_t)]; |
| 287 | |
| 288 | #ifdef TFM_PARTITION_TEST_CORE |
| 289 | static uint32_t ctx_stack_TFM_SP_CORE_TEST[ |
| 290 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 291 | (TFM_PARTITION_TFM_SP_CORE_TEST_IRQ_COUNT) * ( |
| 292 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 293 | sizeof(struct handler_ctx_stack_frame_t) |
| 294 | )) / sizeof(uint32_t)]; |
| 295 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 296 | |
| 297 | #ifdef TFM_PARTITION_TEST_CORE |
| 298 | static uint32_t ctx_stack_TFM_SP_CORE_TEST_2[ |
| 299 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 300 | (TFM_PARTITION_TFM_SP_CORE_TEST_2_IRQ_COUNT) * ( |
| 301 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 302 | sizeof(struct handler_ctx_stack_frame_t) |
| 303 | )) / sizeof(uint32_t)]; |
| 304 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 305 | |
| 306 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 307 | static uint32_t ctx_stack_TFM_SP_SECURE_TEST_PARTITION[ |
| 308 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 309 | (TFM_PARTITION_TFM_SP_SECURE_TEST_PARTITION_IRQ_COUNT) * ( |
| 310 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 311 | sizeof(struct handler_ctx_stack_frame_t) |
| 312 | )) / sizeof(uint32_t)]; |
| 313 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 314 | |
| 315 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 316 | static uint32_t ctx_stack_TFM_SP_IPC_SERVICE_TEST[ |
| 317 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 318 | (TFM_PARTITION_TFM_SP_IPC_SERVICE_TEST_IRQ_COUNT) * ( |
| 319 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 320 | sizeof(struct handler_ctx_stack_frame_t) |
| 321 | )) / sizeof(uint32_t)]; |
| 322 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 323 | |
| 324 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 325 | static uint32_t ctx_stack_TFM_SP_IPC_CLIENT_TEST[ |
| 326 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 327 | (TFM_PARTITION_TFM_SP_IPC_CLIENT_TEST_IRQ_COUNT) * ( |
| 328 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 329 | sizeof(struct handler_ctx_stack_frame_t) |
| 330 | )) / sizeof(uint32_t)]; |
| 331 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 332 | |
| 333 | #ifdef TFM_PARTITION_TEST_CORE |
| 334 | static uint32_t ctx_stack_TFM_IRQ_TEST_1[ |
| 335 | (sizeof(struct interrupted_ctx_stack_frame_t) + |
| 336 | (TFM_PARTITION_TFM_IRQ_TEST_1_IRQ_COUNT) * ( |
| 337 | sizeof(struct interrupted_ctx_stack_frame_t) + |
| 338 | sizeof(struct handler_ctx_stack_frame_t) |
| 339 | )) / sizeof(uint32_t)]; |
| 340 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 341 | |
| 342 | /**************************************************************************/ |
| 343 | /** The partition list for the DB */ |
| 344 | /**************************************************************************/ |
| 345 | struct spm_partition_desc_t partition_list [] = |
| 346 | { |
| 347 | {{0}}, /* placeholder for Non-secure internal partition */ |
| 348 | {{0}}, /* placeholder for TF-M Core internal partition */ |
| 349 | |
| 350 | /* -----------------------------------------------------------------------*/ |
| 351 | /* - Partition DB record for TFM_SP_STORAGE */ |
| 352 | /* -----------------------------------------------------------------------*/ |
| 353 | { |
| 354 | /* Static data */ |
| 355 | { |
| 356 | .partition_id = TFM_SP_STORAGE_ID, |
| 357 | .partition_flags = SPM_PART_FLAG_IPC |
| 358 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 359 | , |
| 360 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 361 | .partition_init = tfm_sst_req_mngr_init, |
| 362 | }, |
| 363 | |
| 364 | /* Runtime data */ |
| 365 | { |
| 366 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 367 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 368 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 369 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 370 | #if TFM_LVL != 1 |
| 371 | .stack_ptr = PART_REGION_ADDR(TFM_SP_STORAGE, _STACK$$ZI$$Limit) - |
| 372 | sizeof(struct iovec_args_t), |
| 373 | #else /* TFM_LVL != 1 */ |
| 374 | .stack_ptr = 0, |
| 375 | #endif /* TFM_LVL != 1 */ |
| 376 | .lr = 0, |
| 377 | .iovec_api = TFM_SFN_API_IOVEC, |
| 378 | .iovec_args = |
| 379 | { |
| 380 | .in_vec = {{0}}, |
| 381 | .in_len = 0, |
| 382 | .out_vec = {{0}}, |
| 383 | .out_len = 0, |
| 384 | }, |
| 385 | .orig_outvec = NULL, |
| 386 | .ctx_stack_ptr = ctx_stack_TFM_SP_STORAGE, |
| 387 | .signal_mask = 0, |
| 388 | }, |
| 389 | |
| 390 | .platform_data = NULL, |
| 391 | |
| 392 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 393 | /* memory_data */ |
| 394 | .memory_data = { |
| 395 | .code_start = PART_REGION_ADDR(TFM_SP_STORAGE, $$Base), |
| 396 | .code_limit = PART_REGION_ADDR(TFM_SP_STORAGE, $$Limit), |
| 397 | .ro_start = PART_REGION_ADDR(TFM_SP_STORAGE, $$RO$$Base), |
| 398 | .ro_limit = PART_REGION_ADDR(TFM_SP_STORAGE, $$RO$$Limit), |
| 399 | .rw_start = PART_REGION_ADDR(TFM_SP_STORAGE, _DATA$$RW$$Base), |
| 400 | .rw_limit = PART_REGION_ADDR(TFM_SP_STORAGE, _DATA$$RW$$Limit), |
| 401 | .zi_start = PART_REGION_ADDR(TFM_SP_STORAGE, _DATA$$ZI$$Base), |
| 402 | .zi_limit = PART_REGION_ADDR(TFM_SP_STORAGE, _DATA$$ZI$$Limit), |
| 403 | .stack_bottom = PART_REGION_ADDR(TFM_SP_STORAGE, _STACK$$ZI$$Base), |
| 404 | .stack_top = PART_REGION_ADDR(TFM_SP_STORAGE, _STACK$$ZI$$Limit), |
| 405 | }, |
| 406 | #endif |
| 407 | |
| 408 | #ifdef TFM_PSA_API |
| 409 | /* sp_thrd */ |
| 410 | .sp_thrd = { |
| 411 | .pfn = NULL, |
| 412 | .param = NULL, |
| 413 | .sp_base = NULL, |
| 414 | .sp_top = NULL, |
| 415 | .prior = THRD_PRIOR_LOWEST, |
| 416 | .status = THRD_STAT_INVALID, |
| 417 | .state_ctx = |
| 418 | { |
| 419 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 420 | }, |
| 421 | .next = NULL, |
| 422 | }, |
| 423 | #endif /* defined(TFM_PSA_API) */ |
| 424 | }, |
| 425 | |
| 426 | /* -----------------------------------------------------------------------*/ |
| 427 | /* - Partition DB record for TFM_SP_AUDIT_LOG */ |
| 428 | /* -----------------------------------------------------------------------*/ |
| 429 | #ifdef TFM_PARTITION_AUDIT_LOG |
| 430 | { |
| 431 | /* Static data */ |
| 432 | { |
| 433 | .partition_id = TFM_SP_AUDIT_LOG_ID, |
| 434 | .partition_flags = 0 |
| 435 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 436 | , |
| 437 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 438 | .partition_init = audit_core_init, |
| 439 | }, |
| 440 | |
| 441 | /* Runtime data */ |
| 442 | { |
| 443 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 444 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 445 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 446 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 447 | #if TFM_LVL != 1 |
| 448 | .stack_ptr = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, _STACK$$ZI$$Limit) - |
| 449 | sizeof(struct iovec_args_t), |
| 450 | #else /* TFM_LVL != 1 */ |
| 451 | .stack_ptr = 0, |
| 452 | #endif /* TFM_LVL != 1 */ |
| 453 | .lr = 0, |
| 454 | .iovec_api = TFM_SFN_API_IOVEC, |
| 455 | .iovec_args = |
| 456 | { |
| 457 | .in_vec = {{0}}, |
| 458 | .in_len = 0, |
| 459 | .out_vec = {{0}}, |
| 460 | .out_len = 0, |
| 461 | }, |
| 462 | .orig_outvec = NULL, |
| 463 | .ctx_stack_ptr = ctx_stack_TFM_SP_AUDIT_LOG, |
| 464 | .signal_mask = 0, |
| 465 | }, |
| 466 | |
| 467 | /* platform data */ |
| 468 | /* FIXME: Only adding the first mmio region */ |
| 469 | #ifdef AUDIT_UART_REDIRECTION |
| 470 | .platform_data = TFM_PERIPHERAL_UART1, |
| 471 | #else /* AUDIT_UART_REDIRECTION */ |
| 472 | .platform_data = NULL, |
| 473 | #endif /* AUDIT_UART_REDIRECTION */ |
| 474 | |
| 475 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 476 | /* memory_data */ |
| 477 | .memory_data = { |
| 478 | .code_start = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, $$Base), |
| 479 | .code_limit = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, $$Limit), |
| 480 | .ro_start = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, $$RO$$Base), |
| 481 | .ro_limit = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, $$RO$$Limit), |
| 482 | .rw_start = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, _DATA$$RW$$Base), |
| 483 | .rw_limit = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, _DATA$$RW$$Limit), |
| 484 | .zi_start = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, _DATA$$ZI$$Base), |
| 485 | .zi_limit = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, _DATA$$ZI$$Limit), |
| 486 | .stack_bottom = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, _STACK$$ZI$$Base), |
| 487 | .stack_top = PART_REGION_ADDR(TFM_SP_AUDIT_LOG, _STACK$$ZI$$Limit), |
| 488 | }, |
| 489 | #endif |
| 490 | |
| 491 | #ifdef TFM_PSA_API |
| 492 | /* sp_thrd */ |
| 493 | .sp_thrd = { |
| 494 | .pfn = NULL, |
| 495 | .param = NULL, |
| 496 | .sp_base = NULL, |
| 497 | .sp_top = NULL, |
| 498 | .prior = THRD_PRIOR_LOWEST, |
| 499 | .status = THRD_STAT_INVALID, |
| 500 | .state_ctx = |
| 501 | { |
| 502 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 503 | }, |
| 504 | .next = NULL, |
| 505 | }, |
| 506 | #endif /* defined(TFM_PSA_API) */ |
| 507 | }, |
| 508 | #endif /* TFM_PARTITION_AUDIT_LOG */ |
| 509 | |
| 510 | /* -----------------------------------------------------------------------*/ |
| 511 | /* - Partition DB record for TFM_SP_CRYPTO */ |
| 512 | /* -----------------------------------------------------------------------*/ |
| 513 | { |
| 514 | /* Static data */ |
| 515 | { |
| 516 | .partition_id = TFM_SP_CRYPTO_ID, |
| 517 | .partition_flags = SPM_PART_FLAG_IPC |
| 518 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 519 | , |
| 520 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 521 | .partition_init = tfm_crypto_init, |
| 522 | }, |
| 523 | |
| 524 | /* Runtime data */ |
| 525 | { |
| 526 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 527 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 528 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 529 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 530 | #if TFM_LVL != 1 |
| 531 | .stack_ptr = PART_REGION_ADDR(TFM_SP_CRYPTO, _STACK$$ZI$$Limit) - |
| 532 | sizeof(struct iovec_args_t), |
| 533 | #else /* TFM_LVL != 1 */ |
| 534 | .stack_ptr = 0, |
| 535 | #endif /* TFM_LVL != 1 */ |
| 536 | .lr = 0, |
| 537 | .iovec_api = TFM_SFN_API_IOVEC, |
| 538 | .iovec_args = |
| 539 | { |
| 540 | .in_vec = {{0}}, |
| 541 | .in_len = 0, |
| 542 | .out_vec = {{0}}, |
| 543 | .out_len = 0, |
| 544 | }, |
| 545 | .orig_outvec = NULL, |
| 546 | .ctx_stack_ptr = ctx_stack_TFM_SP_CRYPTO, |
| 547 | .signal_mask = 0, |
| 548 | }, |
| 549 | |
| 550 | .platform_data = NULL, |
| 551 | |
| 552 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 553 | /* memory_data */ |
| 554 | .memory_data = { |
| 555 | .code_start = PART_REGION_ADDR(TFM_SP_CRYPTO, $$Base), |
| 556 | .code_limit = PART_REGION_ADDR(TFM_SP_CRYPTO, $$Limit), |
| 557 | .ro_start = PART_REGION_ADDR(TFM_SP_CRYPTO, $$RO$$Base), |
| 558 | .ro_limit = PART_REGION_ADDR(TFM_SP_CRYPTO, $$RO$$Limit), |
| 559 | .rw_start = PART_REGION_ADDR(TFM_SP_CRYPTO, _DATA$$RW$$Base), |
| 560 | .rw_limit = PART_REGION_ADDR(TFM_SP_CRYPTO, _DATA$$RW$$Limit), |
| 561 | .zi_start = PART_REGION_ADDR(TFM_SP_CRYPTO, _DATA$$ZI$$Base), |
| 562 | .zi_limit = PART_REGION_ADDR(TFM_SP_CRYPTO, _DATA$$ZI$$Limit), |
| 563 | .stack_bottom = PART_REGION_ADDR(TFM_SP_CRYPTO, _STACK$$ZI$$Base), |
| 564 | .stack_top = PART_REGION_ADDR(TFM_SP_CRYPTO, _STACK$$ZI$$Limit), |
| 565 | }, |
| 566 | #endif |
| 567 | |
| 568 | #ifdef TFM_PSA_API |
| 569 | /* sp_thrd */ |
| 570 | .sp_thrd = { |
| 571 | .pfn = NULL, |
| 572 | .param = NULL, |
| 573 | .sp_base = NULL, |
| 574 | .sp_top = NULL, |
| 575 | .prior = THRD_PRIOR_LOWEST, |
| 576 | .status = THRD_STAT_INVALID, |
| 577 | .state_ctx = |
| 578 | { |
| 579 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 580 | }, |
| 581 | .next = NULL, |
| 582 | }, |
| 583 | #endif /* defined(TFM_PSA_API) */ |
| 584 | }, |
| 585 | |
| 586 | /* -----------------------------------------------------------------------*/ |
| 587 | /* - Partition DB record for TFM_SP_PLATFORM */ |
| 588 | /* -----------------------------------------------------------------------*/ |
| 589 | #ifdef TFM_PARTITION_PLATFORM |
| 590 | { |
| 591 | /* Static data */ |
| 592 | { |
| 593 | .partition_id = TFM_SP_PLATFORM_ID, |
| 594 | .partition_flags = 0 |
| 595 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 596 | , |
| 597 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 598 | .partition_init = platform_sp_init, |
| 599 | }, |
| 600 | |
| 601 | /* Runtime data */ |
| 602 | { |
| 603 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 604 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 605 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 606 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 607 | #if TFM_LVL != 1 |
| 608 | .stack_ptr = PART_REGION_ADDR(TFM_SP_PLATFORM, _STACK$$ZI$$Limit) - |
| 609 | sizeof(struct iovec_args_t), |
| 610 | #else /* TFM_LVL != 1 */ |
| 611 | .stack_ptr = 0, |
| 612 | #endif /* TFM_LVL != 1 */ |
| 613 | .lr = 0, |
| 614 | .iovec_api = TFM_SFN_API_IOVEC, |
| 615 | .iovec_args = |
| 616 | { |
| 617 | .in_vec = {{0}}, |
| 618 | .in_len = 0, |
| 619 | .out_vec = {{0}}, |
| 620 | .out_len = 0, |
| 621 | }, |
| 622 | .orig_outvec = NULL, |
| 623 | .ctx_stack_ptr = ctx_stack_TFM_SP_PLATFORM, |
| 624 | .signal_mask = 0, |
| 625 | }, |
| 626 | |
| 627 | .platform_data = NULL, |
| 628 | |
| 629 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 630 | /* memory_data */ |
| 631 | .memory_data = { |
| 632 | .code_start = PART_REGION_ADDR(TFM_SP_PLATFORM, $$Base), |
| 633 | .code_limit = PART_REGION_ADDR(TFM_SP_PLATFORM, $$Limit), |
| 634 | .ro_start = PART_REGION_ADDR(TFM_SP_PLATFORM, $$RO$$Base), |
| 635 | .ro_limit = PART_REGION_ADDR(TFM_SP_PLATFORM, $$RO$$Limit), |
| 636 | .rw_start = PART_REGION_ADDR(TFM_SP_PLATFORM, _DATA$$RW$$Base), |
| 637 | .rw_limit = PART_REGION_ADDR(TFM_SP_PLATFORM, _DATA$$RW$$Limit), |
| 638 | .zi_start = PART_REGION_ADDR(TFM_SP_PLATFORM, _DATA$$ZI$$Base), |
| 639 | .zi_limit = PART_REGION_ADDR(TFM_SP_PLATFORM, _DATA$$ZI$$Limit), |
| 640 | .stack_bottom = PART_REGION_ADDR(TFM_SP_PLATFORM, _STACK$$ZI$$Base), |
| 641 | .stack_top = PART_REGION_ADDR(TFM_SP_PLATFORM, _STACK$$ZI$$Limit), |
| 642 | }, |
| 643 | #endif |
| 644 | |
| 645 | #ifdef TFM_PSA_API |
| 646 | /* sp_thrd */ |
| 647 | .sp_thrd = { |
| 648 | .pfn = NULL, |
| 649 | .param = NULL, |
| 650 | .sp_base = NULL, |
| 651 | .sp_top = NULL, |
| 652 | .prior = THRD_PRIOR_LOWEST, |
| 653 | .status = THRD_STAT_INVALID, |
| 654 | .state_ctx = |
| 655 | { |
| 656 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 657 | }, |
| 658 | .next = NULL, |
| 659 | }, |
| 660 | #endif /* defined(TFM_PSA_API) */ |
| 661 | }, |
| 662 | #endif /* TFM_PARTITION_PLATFORM */ |
| 663 | |
| 664 | /* -----------------------------------------------------------------------*/ |
| 665 | /* - Partition DB record for TFM_SP_INITIAL_ATTESTATION */ |
| 666 | /* -----------------------------------------------------------------------*/ |
| 667 | { |
| 668 | /* Static data */ |
| 669 | { |
| 670 | .partition_id = TFM_SP_INITIAL_ATTESTATION_ID, |
| 671 | .partition_flags = SPM_PART_FLAG_IPC |
| 672 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 673 | , |
| 674 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 675 | .partition_init = attest_partition_init, |
| 676 | }, |
| 677 | |
| 678 | /* Runtime data */ |
| 679 | { |
| 680 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 681 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 682 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 683 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 684 | #if TFM_LVL != 1 |
| 685 | .stack_ptr = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, _STACK$$ZI$$Limit) - |
| 686 | sizeof(struct iovec_args_t), |
| 687 | #else /* TFM_LVL != 1 */ |
| 688 | .stack_ptr = 0, |
| 689 | #endif /* TFM_LVL != 1 */ |
| 690 | .lr = 0, |
| 691 | .iovec_api = TFM_SFN_API_IOVEC, |
| 692 | .iovec_args = |
| 693 | { |
| 694 | .in_vec = {{0}}, |
| 695 | .in_len = 0, |
| 696 | .out_vec = {{0}}, |
| 697 | .out_len = 0, |
| 698 | }, |
| 699 | .orig_outvec = NULL, |
| 700 | .ctx_stack_ptr = ctx_stack_TFM_SP_INITIAL_ATTESTATION, |
| 701 | .signal_mask = 0, |
| 702 | }, |
| 703 | |
| 704 | .platform_data = NULL, |
| 705 | |
| 706 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 707 | /* memory_data */ |
| 708 | .memory_data = { |
| 709 | .code_start = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, $$Base), |
| 710 | .code_limit = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, $$Limit), |
| 711 | .ro_start = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, $$RO$$Base), |
| 712 | .ro_limit = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, $$RO$$Limit), |
| 713 | .rw_start = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, _DATA$$RW$$Base), |
| 714 | .rw_limit = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, _DATA$$RW$$Limit), |
| 715 | .zi_start = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, _DATA$$ZI$$Base), |
| 716 | .zi_limit = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, _DATA$$ZI$$Limit), |
| 717 | .stack_bottom = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, _STACK$$ZI$$Base), |
| 718 | .stack_top = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION, _STACK$$ZI$$Limit), |
| 719 | }, |
| 720 | #endif |
| 721 | |
| 722 | #ifdef TFM_PSA_API |
| 723 | /* sp_thrd */ |
| 724 | .sp_thrd = { |
| 725 | .pfn = NULL, |
| 726 | .param = NULL, |
| 727 | .sp_base = NULL, |
| 728 | .sp_top = NULL, |
| 729 | .prior = THRD_PRIOR_LOWEST, |
| 730 | .status = THRD_STAT_INVALID, |
| 731 | .state_ctx = |
| 732 | { |
| 733 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 734 | }, |
| 735 | .next = NULL, |
| 736 | }, |
| 737 | #endif /* defined(TFM_PSA_API) */ |
| 738 | }, |
| 739 | |
| 740 | /* -----------------------------------------------------------------------*/ |
| 741 | /* - Partition DB record for TFM_SP_CORE_TEST */ |
| 742 | /* -----------------------------------------------------------------------*/ |
| 743 | #ifdef TFM_PARTITION_TEST_CORE |
| 744 | { |
| 745 | /* Static data */ |
| 746 | { |
| 747 | .partition_id = TFM_SP_CORE_TEST_ID, |
| 748 | .partition_flags = SPM_PART_FLAG_IPC |
| 749 | | SPM_PART_FLAG_APP_ROT |
| 750 | , |
| 751 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 752 | .partition_init = core_test_init, |
| 753 | }, |
| 754 | |
| 755 | /* Runtime data */ |
| 756 | { |
| 757 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 758 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 759 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 760 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 761 | #if TFM_LVL != 1 |
| 762 | .stack_ptr = PART_REGION_ADDR(TFM_SP_CORE_TEST, _STACK$$ZI$$Limit) - |
| 763 | sizeof(struct iovec_args_t), |
| 764 | #else /* TFM_LVL != 1 */ |
| 765 | .stack_ptr = 0, |
| 766 | #endif /* TFM_LVL != 1 */ |
| 767 | .lr = 0, |
| 768 | .iovec_api = TFM_SFN_API_IOVEC, |
| 769 | .iovec_args = |
| 770 | { |
| 771 | .in_vec = {{0}}, |
| 772 | .in_len = 0, |
| 773 | .out_vec = {{0}}, |
| 774 | .out_len = 0, |
| 775 | }, |
| 776 | .orig_outvec = NULL, |
| 777 | .ctx_stack_ptr = ctx_stack_TFM_SP_CORE_TEST, |
| 778 | .signal_mask = 0, |
| 779 | }, |
| 780 | |
| 781 | /* platform data */ |
| 782 | /* FIXME: Only adding the first mmio region */ |
| 783 | .platform_data = TFM_PERIPHERAL_FPGA_IO, |
| 784 | |
| 785 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 786 | /* memory_data */ |
| 787 | .memory_data = { |
| 788 | .code_start = PART_REGION_ADDR(TFM_SP_CORE_TEST, $$Base), |
| 789 | .code_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST, $$Limit), |
| 790 | .ro_start = PART_REGION_ADDR(TFM_SP_CORE_TEST, $$RO$$Base), |
| 791 | .ro_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST, $$RO$$Limit), |
| 792 | .rw_start = PART_REGION_ADDR(TFM_SP_CORE_TEST, _DATA$$RW$$Base), |
| 793 | .rw_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST, _DATA$$RW$$Limit), |
| 794 | .zi_start = PART_REGION_ADDR(TFM_SP_CORE_TEST, _DATA$$ZI$$Base), |
| 795 | .zi_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST, _DATA$$ZI$$Limit), |
| 796 | .stack_bottom = PART_REGION_ADDR(TFM_SP_CORE_TEST, _STACK$$ZI$$Base), |
| 797 | .stack_top = PART_REGION_ADDR(TFM_SP_CORE_TEST, _STACK$$ZI$$Limit), |
| 798 | }, |
| 799 | #endif |
| 800 | |
| 801 | #ifdef TFM_PSA_API |
| 802 | /* sp_thrd */ |
| 803 | .sp_thrd = { |
| 804 | .pfn = NULL, |
| 805 | .param = NULL, |
| 806 | .sp_base = NULL, |
| 807 | .sp_top = NULL, |
| 808 | .prior = THRD_PRIOR_LOWEST, |
| 809 | .status = THRD_STAT_INVALID, |
| 810 | .state_ctx = |
| 811 | { |
| 812 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 813 | }, |
| 814 | .next = NULL, |
| 815 | }, |
| 816 | #endif /* defined(TFM_PSA_API) */ |
| 817 | }, |
| 818 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 819 | |
| 820 | /* -----------------------------------------------------------------------*/ |
| 821 | /* - Partition DB record for TFM_SP_CORE_TEST_2 */ |
| 822 | /* -----------------------------------------------------------------------*/ |
| 823 | #ifdef TFM_PARTITION_TEST_CORE |
| 824 | { |
| 825 | /* Static data */ |
| 826 | { |
| 827 | .partition_id = TFM_SP_CORE_TEST_2_ID, |
| 828 | .partition_flags = SPM_PART_FLAG_IPC |
| 829 | | SPM_PART_FLAG_APP_ROT |
| 830 | , |
| 831 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 832 | .partition_init = core_test_2_init, |
| 833 | }, |
| 834 | |
| 835 | /* Runtime data */ |
| 836 | { |
| 837 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 838 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 839 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 840 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 841 | #if TFM_LVL != 1 |
| 842 | .stack_ptr = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, _STACK$$ZI$$Limit) - |
| 843 | sizeof(struct iovec_args_t), |
| 844 | #else /* TFM_LVL != 1 */ |
| 845 | .stack_ptr = 0, |
| 846 | #endif /* TFM_LVL != 1 */ |
| 847 | .lr = 0, |
| 848 | .iovec_api = TFM_SFN_API_IOVEC, |
| 849 | .iovec_args = |
| 850 | { |
| 851 | .in_vec = {{0}}, |
| 852 | .in_len = 0, |
| 853 | .out_vec = {{0}}, |
| 854 | .out_len = 0, |
| 855 | }, |
| 856 | .orig_outvec = NULL, |
| 857 | .ctx_stack_ptr = ctx_stack_TFM_SP_CORE_TEST_2, |
| 858 | .signal_mask = 0, |
| 859 | }, |
| 860 | |
| 861 | .platform_data = NULL, |
| 862 | |
| 863 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 864 | /* memory_data */ |
| 865 | .memory_data = { |
| 866 | .code_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, $$Base), |
| 867 | .code_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, $$Limit), |
| 868 | .ro_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, $$RO$$Base), |
| 869 | .ro_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, $$RO$$Limit), |
| 870 | .rw_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, _DATA$$RW$$Base), |
| 871 | .rw_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, _DATA$$RW$$Limit), |
| 872 | .zi_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, _DATA$$ZI$$Base), |
| 873 | .zi_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, _DATA$$ZI$$Limit), |
| 874 | .stack_bottom = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, _STACK$$ZI$$Base), |
| 875 | .stack_top = PART_REGION_ADDR(TFM_SP_CORE_TEST_2, _STACK$$ZI$$Limit), |
| 876 | }, |
| 877 | #endif |
| 878 | |
| 879 | #ifdef TFM_PSA_API |
| 880 | /* sp_thrd */ |
| 881 | .sp_thrd = { |
| 882 | .pfn = NULL, |
| 883 | .param = NULL, |
| 884 | .sp_base = NULL, |
| 885 | .sp_top = NULL, |
| 886 | .prior = THRD_PRIOR_LOWEST, |
| 887 | .status = THRD_STAT_INVALID, |
| 888 | .state_ctx = |
| 889 | { |
| 890 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 891 | }, |
| 892 | .next = NULL, |
| 893 | }, |
| 894 | #endif /* defined(TFM_PSA_API) */ |
| 895 | }, |
| 896 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 897 | |
| 898 | /* -----------------------------------------------------------------------*/ |
| 899 | /* - Partition DB record for TFM_SP_SECURE_TEST_PARTITION */ |
| 900 | /* -----------------------------------------------------------------------*/ |
| 901 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 902 | { |
| 903 | /* Static data */ |
| 904 | { |
| 905 | .partition_id = TFM_SP_SECURE_TEST_PARTITION_ID, |
| 906 | .partition_flags = SPM_PART_FLAG_IPC |
| 907 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 908 | , |
| 909 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 910 | .partition_init = tfm_secure_client_service_init, |
| 911 | }, |
| 912 | |
| 913 | /* Runtime data */ |
| 914 | { |
| 915 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 916 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 917 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 918 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 919 | #if TFM_LVL != 1 |
| 920 | .stack_ptr = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, _STACK$$ZI$$Limit) - |
| 921 | sizeof(struct iovec_args_t), |
| 922 | #else /* TFM_LVL != 1 */ |
| 923 | .stack_ptr = 0, |
| 924 | #endif /* TFM_LVL != 1 */ |
| 925 | .lr = 0, |
| 926 | .iovec_api = TFM_SFN_API_IOVEC, |
| 927 | .iovec_args = |
| 928 | { |
| 929 | .in_vec = {{0}}, |
| 930 | .in_len = 0, |
| 931 | .out_vec = {{0}}, |
| 932 | .out_len = 0, |
| 933 | }, |
| 934 | .orig_outvec = NULL, |
| 935 | .ctx_stack_ptr = ctx_stack_TFM_SP_SECURE_TEST_PARTITION, |
| 936 | .signal_mask = 0, |
| 937 | }, |
| 938 | |
| 939 | /* platform data */ |
| 940 | /* FIXME: Only adding the first mmio region */ |
| 941 | .platform_data = TFM_PERIPHERAL_STD_UART, |
| 942 | |
| 943 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 944 | /* memory_data */ |
| 945 | .memory_data = { |
| 946 | .code_start = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, $$Base), |
| 947 | .code_limit = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, $$Limit), |
| 948 | .ro_start = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, $$RO$$Base), |
| 949 | .ro_limit = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, $$RO$$Limit), |
| 950 | .rw_start = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, _DATA$$RW$$Base), |
| 951 | .rw_limit = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, _DATA$$RW$$Limit), |
| 952 | .zi_start = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, _DATA$$ZI$$Base), |
| 953 | .zi_limit = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, _DATA$$ZI$$Limit), |
| 954 | .stack_bottom = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, _STACK$$ZI$$Base), |
| 955 | .stack_top = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION, _STACK$$ZI$$Limit), |
| 956 | }, |
| 957 | #endif |
| 958 | |
| 959 | #ifdef TFM_PSA_API |
| 960 | /* sp_thrd */ |
| 961 | .sp_thrd = { |
| 962 | .pfn = NULL, |
| 963 | .param = NULL, |
| 964 | .sp_base = NULL, |
| 965 | .sp_top = NULL, |
| 966 | .prior = THRD_PRIOR_LOWEST, |
| 967 | .status = THRD_STAT_INVALID, |
| 968 | .state_ctx = |
| 969 | { |
| 970 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 971 | }, |
| 972 | .next = NULL, |
| 973 | }, |
| 974 | #endif /* defined(TFM_PSA_API) */ |
| 975 | }, |
| 976 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 977 | |
| 978 | /* -----------------------------------------------------------------------*/ |
| 979 | /* - Partition DB record for TFM_SP_IPC_SERVICE_TEST */ |
| 980 | /* -----------------------------------------------------------------------*/ |
| 981 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 982 | { |
| 983 | /* Static data */ |
| 984 | { |
| 985 | .partition_id = TFM_SP_IPC_SERVICE_TEST_ID, |
| 986 | .partition_flags = SPM_PART_FLAG_IPC |
| 987 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 988 | , |
| 989 | .partition_priority = TFM_PRIORITY(HIGH), |
| 990 | .partition_init = ipc_service_test_main, |
| 991 | }, |
| 992 | |
| 993 | /* Runtime data */ |
| 994 | { |
| 995 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 996 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 997 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 998 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 999 | #if TFM_LVL != 1 |
| 1000 | .stack_ptr = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, _STACK$$ZI$$Limit) - |
| 1001 | sizeof(struct iovec_args_t), |
| 1002 | #else /* TFM_LVL != 1 */ |
| 1003 | .stack_ptr = 0, |
| 1004 | #endif /* TFM_LVL != 1 */ |
| 1005 | .lr = 0, |
| 1006 | .iovec_api = TFM_SFN_API_IOVEC, |
| 1007 | .iovec_args = |
| 1008 | { |
| 1009 | .in_vec = {{0}}, |
| 1010 | .in_len = 0, |
| 1011 | .out_vec = {{0}}, |
| 1012 | .out_len = 0, |
| 1013 | }, |
| 1014 | .orig_outvec = NULL, |
| 1015 | .ctx_stack_ptr = ctx_stack_TFM_SP_IPC_SERVICE_TEST, |
| 1016 | .signal_mask = 0, |
| 1017 | }, |
| 1018 | |
| 1019 | .platform_data = NULL, |
| 1020 | |
| 1021 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 1022 | /* memory_data */ |
| 1023 | .memory_data = { |
| 1024 | .code_start = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, $$Base), |
| 1025 | .code_limit = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, $$Limit), |
| 1026 | .ro_start = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, $$RO$$Base), |
| 1027 | .ro_limit = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, $$RO$$Limit), |
| 1028 | .rw_start = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, _DATA$$RW$$Base), |
| 1029 | .rw_limit = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, _DATA$$RW$$Limit), |
| 1030 | .zi_start = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, _DATA$$ZI$$Base), |
| 1031 | .zi_limit = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, _DATA$$ZI$$Limit), |
| 1032 | .stack_bottom = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, _STACK$$ZI$$Base), |
| 1033 | .stack_top = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST, _STACK$$ZI$$Limit), |
| 1034 | }, |
| 1035 | #endif |
| 1036 | |
| 1037 | #ifdef TFM_PSA_API |
| 1038 | /* sp_thrd */ |
| 1039 | .sp_thrd = { |
| 1040 | .pfn = NULL, |
| 1041 | .param = NULL, |
| 1042 | .sp_base = NULL, |
| 1043 | .sp_top = NULL, |
| 1044 | .prior = THRD_PRIOR_LOWEST, |
| 1045 | .status = THRD_STAT_INVALID, |
| 1046 | .state_ctx = |
| 1047 | { |
| 1048 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 1049 | }, |
| 1050 | .next = NULL, |
| 1051 | }, |
| 1052 | #endif /* defined(TFM_PSA_API) */ |
| 1053 | }, |
| 1054 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 1055 | |
| 1056 | /* -----------------------------------------------------------------------*/ |
| 1057 | /* - Partition DB record for TFM_SP_IPC_CLIENT_TEST */ |
| 1058 | /* -----------------------------------------------------------------------*/ |
| 1059 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 1060 | { |
| 1061 | /* Static data */ |
| 1062 | { |
| 1063 | .partition_id = TFM_SP_IPC_CLIENT_TEST_ID, |
| 1064 | .partition_flags = SPM_PART_FLAG_IPC |
| 1065 | | SPM_PART_FLAG_APP_ROT |
| 1066 | , |
| 1067 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 1068 | .partition_init = ipc_client_test_main, |
| 1069 | }, |
| 1070 | |
| 1071 | /* Runtime data */ |
| 1072 | { |
| 1073 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 1074 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 1075 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 1076 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 1077 | #if TFM_LVL != 1 |
| 1078 | .stack_ptr = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, _STACK$$ZI$$Limit) - |
| 1079 | sizeof(struct iovec_args_t), |
| 1080 | #else /* TFM_LVL != 1 */ |
| 1081 | .stack_ptr = 0, |
| 1082 | #endif /* TFM_LVL != 1 */ |
| 1083 | .lr = 0, |
| 1084 | .iovec_api = TFM_SFN_API_IOVEC, |
| 1085 | .iovec_args = |
| 1086 | { |
| 1087 | .in_vec = {{0}}, |
| 1088 | .in_len = 0, |
| 1089 | .out_vec = {{0}}, |
| 1090 | .out_len = 0, |
| 1091 | }, |
| 1092 | .orig_outvec = NULL, |
| 1093 | .ctx_stack_ptr = ctx_stack_TFM_SP_IPC_CLIENT_TEST, |
| 1094 | .signal_mask = 0, |
| 1095 | }, |
| 1096 | |
| 1097 | .platform_data = NULL, |
| 1098 | |
| 1099 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 1100 | /* memory_data */ |
| 1101 | .memory_data = { |
| 1102 | .code_start = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, $$Base), |
| 1103 | .code_limit = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, $$Limit), |
| 1104 | .ro_start = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, $$RO$$Base), |
| 1105 | .ro_limit = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, $$RO$$Limit), |
| 1106 | .rw_start = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, _DATA$$RW$$Base), |
| 1107 | .rw_limit = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, _DATA$$RW$$Limit), |
| 1108 | .zi_start = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, _DATA$$ZI$$Base), |
| 1109 | .zi_limit = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, _DATA$$ZI$$Limit), |
| 1110 | .stack_bottom = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, _STACK$$ZI$$Base), |
| 1111 | .stack_top = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST, _STACK$$ZI$$Limit), |
| 1112 | }, |
| 1113 | #endif |
| 1114 | |
| 1115 | #ifdef TFM_PSA_API |
| 1116 | /* sp_thrd */ |
| 1117 | .sp_thrd = { |
| 1118 | .pfn = NULL, |
| 1119 | .param = NULL, |
| 1120 | .sp_base = NULL, |
| 1121 | .sp_top = NULL, |
| 1122 | .prior = THRD_PRIOR_LOWEST, |
| 1123 | .status = THRD_STAT_INVALID, |
| 1124 | .state_ctx = |
| 1125 | { |
| 1126 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 1127 | }, |
| 1128 | .next = NULL, |
| 1129 | }, |
| 1130 | #endif /* defined(TFM_PSA_API) */ |
| 1131 | }, |
| 1132 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 1133 | |
| 1134 | /* -----------------------------------------------------------------------*/ |
| 1135 | /* - Partition DB record for TFM_IRQ_TEST_1 */ |
| 1136 | /* -----------------------------------------------------------------------*/ |
| 1137 | #ifdef TFM_PARTITION_TEST_CORE |
| 1138 | { |
| 1139 | /* Static data */ |
| 1140 | { |
| 1141 | .partition_id = TFM_IRQ_TEST_1_ID, |
| 1142 | .partition_flags = SPM_PART_FLAG_IPC |
| 1143 | | SPM_PART_FLAG_APP_ROT |
| 1144 | , |
| 1145 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 1146 | .partition_init = tfm_irq_test_1_init, |
| 1147 | }, |
| 1148 | |
| 1149 | /* Runtime data */ |
| 1150 | { |
| 1151 | .partition_state = SPM_PARTITION_STATE_UNINIT, |
| 1152 | .caller_partition_idx = SPM_INVALID_PARTITION_IDX, |
| 1153 | .caller_client_id = TFM_INVALID_CLIENT_ID, |
| 1154 | .share = TFM_BUFFER_SHARE_DISABLE, |
| 1155 | #if TFM_LVL != 1 |
| 1156 | .stack_ptr = PART_REGION_ADDR(TFM_IRQ_TEST_1, _STACK$$ZI$$Limit) - |
| 1157 | sizeof(struct iovec_args_t), |
| 1158 | #else /* TFM_LVL != 1 */ |
| 1159 | .stack_ptr = 0, |
| 1160 | #endif /* TFM_LVL != 1 */ |
| 1161 | .lr = 0, |
| 1162 | .iovec_api = TFM_SFN_API_IOVEC, |
| 1163 | .iovec_args = |
| 1164 | { |
| 1165 | .in_vec = {{0}}, |
| 1166 | .in_len = 0, |
| 1167 | .out_vec = {{0}}, |
| 1168 | .out_len = 0, |
| 1169 | }, |
| 1170 | .orig_outvec = NULL, |
| 1171 | .ctx_stack_ptr = ctx_stack_TFM_IRQ_TEST_1, |
| 1172 | .signal_mask = 0, |
| 1173 | }, |
| 1174 | |
| 1175 | /* platform data */ |
| 1176 | /* FIXME: Only adding the first mmio region */ |
| 1177 | .platform_data = TFM_PERIPHERAL_TIMER0, |
| 1178 | |
| 1179 | #if (TFM_LVL != 1) || defined(TFM_PSA_API) |
| 1180 | /* memory_data */ |
| 1181 | .memory_data = { |
| 1182 | .code_start = PART_REGION_ADDR(TFM_IRQ_TEST_1, $$Base), |
| 1183 | .code_limit = PART_REGION_ADDR(TFM_IRQ_TEST_1, $$Limit), |
| 1184 | .ro_start = PART_REGION_ADDR(TFM_IRQ_TEST_1, $$RO$$Base), |
| 1185 | .ro_limit = PART_REGION_ADDR(TFM_IRQ_TEST_1, $$RO$$Limit), |
| 1186 | .rw_start = PART_REGION_ADDR(TFM_IRQ_TEST_1, _DATA$$RW$$Base), |
| 1187 | .rw_limit = PART_REGION_ADDR(TFM_IRQ_TEST_1, _DATA$$RW$$Limit), |
| 1188 | .zi_start = PART_REGION_ADDR(TFM_IRQ_TEST_1, _DATA$$ZI$$Base), |
| 1189 | .zi_limit = PART_REGION_ADDR(TFM_IRQ_TEST_1, _DATA$$ZI$$Limit), |
| 1190 | .stack_bottom = PART_REGION_ADDR(TFM_IRQ_TEST_1, _STACK$$ZI$$Base), |
| 1191 | .stack_top = PART_REGION_ADDR(TFM_IRQ_TEST_1, _STACK$$ZI$$Limit), |
| 1192 | }, |
| 1193 | #endif |
| 1194 | |
| 1195 | #ifdef TFM_PSA_API |
| 1196 | /* sp_thrd */ |
| 1197 | .sp_thrd = { |
| 1198 | .pfn = NULL, |
| 1199 | .param = NULL, |
| 1200 | .sp_base = NULL, |
| 1201 | .sp_top = NULL, |
| 1202 | .prior = THRD_PRIOR_LOWEST, |
| 1203 | .status = THRD_STAT_INVALID, |
| 1204 | .state_ctx = |
| 1205 | { |
| 1206 | .ctxb = {0}, /* Fields are not detailed as they are architecture dependent*/ |
| 1207 | }, |
| 1208 | .next = NULL, |
| 1209 | }, |
| 1210 | #endif /* defined(TFM_PSA_API) */ |
| 1211 | }, |
| 1212 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 1213 | |
| 1214 | }; |
| 1215 | |
| 1216 | struct spm_partition_db_t g_spm_partition_db = { |
| 1217 | .is_init = 0, |
| 1218 | .partition_count = sizeof(partition_list) / sizeof(partition_list[0]), |
| 1219 | .running_partition_idx = 0, |
| 1220 | .partitions = partition_list, |
| 1221 | }; |
| 1222 | |
| 1223 | #endif /* __TFM_SPM_DB_INC__ */ |