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