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