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, |
TudorCretu | 1ad0937 | 2019-08-09 15:35:12 +0100 | [diff] [blame^] | 531 | TFM_ITS_SET_SID, |
| 532 | TFM_ITS_GET_SID, |
| 533 | TFM_ITS_GET_INFO_SID, |
| 534 | TFM_ITS_REMOVE_SID, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 535 | }; |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 536 | #endif /* TFM_PARTITION_SECURE_STORAGE */ |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 537 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 538 | #ifdef TFM_PARTITION_INITIAL_ATTESTATION |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 539 | static int32_t dependencies_TFM_SP_INITIAL_ATTESTATION[] = |
| 540 | { |
| 541 | TFM_CRYPTO_SID, |
| 542 | }; |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 543 | #endif /* TFM_PARTITION_INITIAL_ATTESTATION */ |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 544 | |
| 545 | #ifdef TFM_PARTITION_TEST_CORE |
| 546 | static int32_t dependencies_TFM_SP_CORE_TEST[] = |
| 547 | { |
| 548 | SPM_CORE_TEST_2_INVERT_SID, |
| 549 | SPM_CORE_TEST_2_GET_EVERY_SECOND_BYTE_SID, |
| 550 | SPM_CORE_TEST_2_SLAVE_SERVICE_SID, |
| 551 | }; |
| 552 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 553 | |
| 554 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 555 | static int32_t dependencies_TFM_SP_SECURE_TEST_PARTITION[] = |
| 556 | { |
Jamie Fox | 830ff76 | 2019-12-16 15:20:22 +0000 | [diff] [blame] | 557 | TFM_SECURE_CLIENT_2_SID, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 558 | TFM_CRYPTO_SID, |
| 559 | TFM_SST_SET_SID, |
| 560 | TFM_SST_GET_SID, |
| 561 | TFM_SST_GET_INFO_SID, |
| 562 | TFM_SST_REMOVE_SID, |
| 563 | TFM_SST_GET_SUPPORT_SID, |
| 564 | TFM_ITS_SET_SID, |
| 565 | TFM_ITS_GET_SID, |
| 566 | TFM_ITS_GET_INFO_SID, |
| 567 | TFM_ITS_REMOVE_SID, |
| 568 | TFM_ATTEST_GET_TOKEN_SID, |
| 569 | TFM_ATTEST_GET_TOKEN_SIZE_SID, |
| 570 | TFM_ATTEST_GET_PUBLIC_KEY_SID, |
| 571 | TFM_SST_TEST_PREPARE_SID, |
Edison Ai | a765f23 | 2019-12-06 15:41:38 +0800 | [diff] [blame] | 572 | TFM_SP_PLATFORM_SYSTEM_RESET_SID, |
| 573 | TFM_SP_PLATFORM_IOCTL_SID, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 574 | }; |
| 575 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 576 | |
| 577 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 578 | static int32_t dependencies_TFM_SP_IPC_CLIENT_TEST[] = |
| 579 | { |
| 580 | IPC_SERVICE_TEST_PSA_ACCESS_APP_READ_ONLY_MEM_SID, |
| 581 | IPC_SERVICE_TEST_PSA_ACCESS_APP_MEM_SID, |
| 582 | IPC_SERVICE_TEST_BASIC_SID, |
| 583 | IPC_SERVICE_TEST_APP_ACCESS_PSA_MEM_SID, |
| 584 | }; |
| 585 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 586 | |
| 587 | #ifdef TFM_PARTITION_TEST_SST |
| 588 | static int32_t dependencies_TFM_SP_SST_TEST[] = |
| 589 | { |
| 590 | TFM_CRYPTO_SID, |
TudorCretu | 1ad0937 | 2019-08-09 15:35:12 +0100 | [diff] [blame^] | 591 | TFM_ITS_GET_SID, |
| 592 | TFM_ITS_REMOVE_SID, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 593 | }; |
| 594 | #endif /* TFM_PARTITION_TEST_SST */ |
| 595 | |
Jamie Fox | fafeff7 | 2019-12-12 17:17:24 +0000 | [diff] [blame] | 596 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 597 | static int32_t dependencies_TFM_SP_SECURE_CLIENT_2[] = |
| 598 | { |
| 599 | TFM_ITS_GET_SID, |
Jamie Fox | c0b6685 | 2019-12-19 16:40:41 +0000 | [diff] [blame] | 600 | TFM_CRYPTO_SID, |
Jamie Fox | fafeff7 | 2019-12-12 17:17:24 +0000 | [diff] [blame] | 601 | }; |
| 602 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 603 | |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 604 | /**************************************************************************/ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 605 | /** The static data of the partition list */ |
| 606 | /**************************************************************************/ |
| 607 | const struct spm_partition_static_data_t static_data_list[] = |
| 608 | { |
| 609 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 610 | #ifdef TFM_PSA_API |
| 611 | .psa_framework_version = 0x0100, |
| 612 | #endif /* defined(TFM_PSA_API) */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 613 | .partition_id = TFM_SP_NON_SECURE_ID, |
| 614 | #ifdef TFM_PSA_API |
David Hu | 90128b7 | 2019-09-23 16:35:41 +0800 | [diff] [blame] | 615 | #if TFM_MULTI_CORE_TOPOLOGY |
| 616 | .partition_flags = SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_IPC, |
| 617 | #else |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 618 | .partition_flags = SPM_PART_FLAG_APP_ROT | SPM_PART_FLAG_IPC, |
David Hu | 90128b7 | 2019-09-23 16:35:41 +0800 | [diff] [blame] | 619 | #endif |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 620 | .partition_priority = TFM_PRIORITY_LOW, |
| 621 | .partition_init = tfm_nspm_thread_entry, |
| 622 | #else |
| 623 | .partition_flags = 0, |
| 624 | #endif |
| 625 | }, |
| 626 | |
| 627 | #ifndef TFM_PSA_API |
| 628 | { |
| 629 | .partition_id = TFM_SP_CORE_ID, |
| 630 | .partition_flags = SPM_PART_FLAG_APP_ROT | SPM_PART_FLAG_PSA_ROT, |
| 631 | }, |
| 632 | #endif |
| 633 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 634 | #ifdef TFM_PARTITION_SECURE_STORAGE |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 635 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 636 | #ifdef TFM_PSA_API |
| 637 | .psa_framework_version = 0x0100, |
| 638 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 639 | .partition_id = TFM_SP_STORAGE, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 640 | .partition_flags = SPM_PART_FLAG_IPC |
| 641 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 642 | , |
| 643 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 644 | .partition_init = tfm_sst_req_mngr_init, |
TudorCretu | 1ad0937 | 2019-08-09 15:35:12 +0100 | [diff] [blame^] | 645 | .dependencies_num = 5, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 646 | .p_dependencies = dependencies_TFM_SP_STORAGE, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 647 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 648 | #endif /* TFM_PARTITION_SECURE_STORAGE */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 649 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 650 | #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 651 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 652 | #ifdef TFM_PSA_API |
| 653 | .psa_framework_version = 0x0100, |
| 654 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 655 | .partition_id = TFM_SP_ITS, |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 656 | .partition_flags = SPM_PART_FLAG_IPC |
| 657 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 658 | , |
| 659 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 660 | .partition_init = tfm_its_req_mngr_init, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 661 | .dependencies_num = 0, |
| 662 | .p_dependencies = NULL, |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 663 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 664 | #endif /* TFM_PARTITION_INTERNAL_TRUSTED_STORAGE */ |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 665 | |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 666 | #ifdef TFM_PARTITION_AUDIT_LOG |
| 667 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 668 | #ifdef TFM_PSA_API |
| 669 | .psa_framework_version = 0x0100, |
| 670 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 671 | .partition_id = TFM_SP_AUDIT_LOG, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 672 | .partition_flags = 0 |
| 673 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 674 | , |
| 675 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 676 | .partition_init = audit_core_init, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 677 | .dependencies_num = 0, |
| 678 | .p_dependencies = NULL, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 679 | }, |
| 680 | #endif /* TFM_PARTITION_AUDIT_LOG */ |
| 681 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 682 | #ifdef TFM_PARTITION_CRYPTO |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 683 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 684 | #ifdef TFM_PSA_API |
| 685 | .psa_framework_version = 0x0100, |
| 686 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 687 | .partition_id = TFM_SP_CRYPTO, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 688 | .partition_flags = SPM_PART_FLAG_IPC |
| 689 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 690 | , |
| 691 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 692 | .partition_init = tfm_crypto_init, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 693 | .dependencies_num = 0, |
| 694 | .p_dependencies = NULL, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 695 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 696 | #endif /* TFM_PARTITION_CRYPTO */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 697 | |
| 698 | #ifdef TFM_PARTITION_PLATFORM |
| 699 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 700 | #ifdef TFM_PSA_API |
| 701 | .psa_framework_version = 0x0100, |
| 702 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 703 | .partition_id = TFM_SP_PLATFORM, |
Mate Toth-Pal | 179a156 | 2019-11-08 11:40:27 +0100 | [diff] [blame] | 704 | .partition_flags = SPM_PART_FLAG_IPC |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 705 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 706 | , |
| 707 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 708 | .partition_init = platform_sp_init, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 709 | .dependencies_num = 0, |
| 710 | .p_dependencies = NULL, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 711 | }, |
| 712 | #endif /* TFM_PARTITION_PLATFORM */ |
| 713 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 714 | #ifdef TFM_PARTITION_INITIAL_ATTESTATION |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 715 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 716 | #ifdef TFM_PSA_API |
| 717 | .psa_framework_version = 0x0100, |
| 718 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 719 | .partition_id = TFM_SP_INITIAL_ATTESTATION, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 720 | .partition_flags = SPM_PART_FLAG_IPC |
| 721 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 722 | , |
| 723 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 724 | .partition_init = attest_partition_init, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 725 | .dependencies_num = 1, |
| 726 | .p_dependencies = dependencies_TFM_SP_INITIAL_ATTESTATION, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 727 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 728 | #endif /* TFM_PARTITION_INITIAL_ATTESTATION */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 729 | |
| 730 | #ifdef TFM_PARTITION_TEST_CORE |
| 731 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 732 | #ifdef TFM_PSA_API |
| 733 | .psa_framework_version = 0x0100, |
| 734 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 735 | .partition_id = TFM_SP_CORE_TEST, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 736 | .partition_flags = SPM_PART_FLAG_IPC |
Mate Toth-Pal | acae8bd | 2019-09-10 16:47:11 +0200 | [diff] [blame] | 737 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 738 | , |
| 739 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 740 | .partition_init = core_test_init, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 741 | .dependencies_num = 3, |
| 742 | .p_dependencies = dependencies_TFM_SP_CORE_TEST, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 743 | }, |
| 744 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 745 | |
| 746 | #ifdef TFM_PARTITION_TEST_CORE |
| 747 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 748 | #ifdef TFM_PSA_API |
| 749 | .psa_framework_version = 0x0100, |
| 750 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 751 | .partition_id = TFM_SP_CORE_TEST_2, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 752 | .partition_flags = SPM_PART_FLAG_IPC |
| 753 | | SPM_PART_FLAG_APP_ROT |
| 754 | , |
| 755 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 756 | .partition_init = core_test_2_init, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 757 | .dependencies_num = 0, |
| 758 | .p_dependencies = NULL, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 759 | }, |
| 760 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 761 | |
| 762 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 763 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 764 | #ifdef TFM_PSA_API |
| 765 | .psa_framework_version = 0x0100, |
| 766 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 767 | .partition_id = TFM_SP_SECURE_TEST_PARTITION, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 768 | .partition_flags = SPM_PART_FLAG_IPC |
| 769 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 770 | , |
| 771 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 772 | .partition_init = tfm_secure_client_service_init, |
Jamie Fox | 830ff76 | 2019-12-16 15:20:22 +0000 | [diff] [blame] | 773 | .dependencies_num = 17, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 774 | .p_dependencies = dependencies_TFM_SP_SECURE_TEST_PARTITION, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 775 | }, |
| 776 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 777 | |
| 778 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 779 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 780 | #ifdef TFM_PSA_API |
| 781 | .psa_framework_version = 0x0100, |
| 782 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 783 | .partition_id = TFM_SP_IPC_SERVICE_TEST, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 784 | .partition_flags = SPM_PART_FLAG_IPC |
| 785 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 786 | , |
| 787 | .partition_priority = TFM_PRIORITY(HIGH), |
| 788 | .partition_init = ipc_service_test_main, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 789 | .dependencies_num = 0, |
| 790 | .p_dependencies = NULL, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 791 | }, |
| 792 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 793 | |
| 794 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 795 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 796 | #ifdef TFM_PSA_API |
| 797 | .psa_framework_version = 0x0100, |
| 798 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 799 | .partition_id = TFM_SP_IPC_CLIENT_TEST, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 800 | .partition_flags = SPM_PART_FLAG_IPC |
| 801 | | SPM_PART_FLAG_APP_ROT |
| 802 | , |
| 803 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 804 | .partition_init = ipc_client_test_main, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 805 | .dependencies_num = 4, |
| 806 | .p_dependencies = dependencies_TFM_SP_IPC_CLIENT_TEST, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 807 | }, |
| 808 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 809 | |
| 810 | #ifdef TFM_ENABLE_IRQ_TEST |
| 811 | { |
Edison Ai | f050170 | 2019-10-11 14:36:42 +0800 | [diff] [blame] | 812 | #ifdef TFM_PSA_API |
| 813 | .psa_framework_version = 0x0100, |
| 814 | #endif /* defined(TFM_PSA_API) */ |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 815 | .partition_id = TFM_IRQ_TEST_1, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 816 | .partition_flags = SPM_PART_FLAG_IPC |
| 817 | | SPM_PART_FLAG_APP_ROT |
| 818 | , |
| 819 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 820 | .partition_init = tfm_irq_test_1_init, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 821 | .dependencies_num = 0, |
| 822 | .p_dependencies = NULL, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 823 | }, |
| 824 | #endif /* TFM_ENABLE_IRQ_TEST */ |
| 825 | |
Jamie Fox | 0e823a0 | 2019-10-28 17:28:19 +0000 | [diff] [blame] | 826 | #ifdef TFM_PARTITION_TEST_SST |
| 827 | { |
| 828 | #ifdef TFM_PSA_API |
| 829 | .psa_framework_version = 0x0100, |
| 830 | #endif /* defined(TFM_PSA_API) */ |
| 831 | .partition_id = TFM_SP_SST_TEST, |
| 832 | .partition_flags = SPM_PART_FLAG_IPC |
| 833 | | SPM_PART_FLAG_PSA_ROT | SPM_PART_FLAG_APP_ROT |
| 834 | , |
| 835 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 836 | .partition_init = tfm_sst_test_init, |
TudorCretu | 1ad0937 | 2019-08-09 15:35:12 +0100 | [diff] [blame^] | 837 | .dependencies_num = 3, |
Edison Ai | e728fbf | 2019-11-13 09:37:12 +0800 | [diff] [blame] | 838 | .p_dependencies = dependencies_TFM_SP_SST_TEST, |
Jamie Fox | 0e823a0 | 2019-10-28 17:28:19 +0000 | [diff] [blame] | 839 | }, |
| 840 | #endif /* TFM_PARTITION_TEST_SST */ |
| 841 | |
Jamie Fox | 830ff76 | 2019-12-16 15:20:22 +0000 | [diff] [blame] | 842 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 843 | { |
| 844 | #ifdef TFM_PSA_API |
| 845 | .psa_framework_version = 0x0100, |
| 846 | #endif /* defined(TFM_PSA_API) */ |
| 847 | .partition_id = TFM_SP_SECURE_CLIENT_2, |
| 848 | .partition_flags = SPM_PART_FLAG_IPC |
| 849 | | SPM_PART_FLAG_APP_ROT |
| 850 | , |
| 851 | .partition_priority = TFM_PRIORITY(NORMAL), |
| 852 | .partition_init = tfm_secure_client_2_init, |
Jamie Fox | c0b6685 | 2019-12-19 16:40:41 +0000 | [diff] [blame] | 853 | .dependencies_num = 2, |
Jamie Fox | fafeff7 | 2019-12-12 17:17:24 +0000 | [diff] [blame] | 854 | .p_dependencies = dependencies_TFM_SP_SECURE_CLIENT_2, |
Jamie Fox | 830ff76 | 2019-12-16 15:20:22 +0000 | [diff] [blame] | 855 | }, |
| 856 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 857 | |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 858 | }; |
| 859 | |
| 860 | /**************************************************************************/ |
| 861 | /** The platform data of the partition list */ |
| 862 | /**************************************************************************/ |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 863 | #ifdef TFM_PARTITION_AUDIT_LOG |
| 864 | const struct tfm_spm_partition_platform_data_t * |
| 865 | platform_data_list_TFM_SP_AUDIT_LOG[] = |
| 866 | { |
| 867 | #ifdef AUDIT_UART_REDIRECTION |
| 868 | TFM_PERIPHERAL_UART1, |
| 869 | #endif /* AUDIT_UART_REDIRECTION */ |
| 870 | NULL |
| 871 | }; |
| 872 | #endif /* TFM_PARTITION_AUDIT_LOG */ |
| 873 | |
| 874 | #ifdef TFM_PARTITION_TEST_CORE |
| 875 | const struct tfm_spm_partition_platform_data_t * |
| 876 | platform_data_list_TFM_SP_CORE_TEST[] = |
| 877 | { |
| 878 | TFM_PERIPHERAL_FPGA_IO, |
| 879 | NULL |
| 880 | }; |
| 881 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 882 | |
| 883 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 884 | const struct tfm_spm_partition_platform_data_t * |
| 885 | platform_data_list_TFM_SP_SECURE_TEST_PARTITION[] = |
| 886 | { |
| 887 | TFM_PERIPHERAL_STD_UART, |
| 888 | NULL |
| 889 | }; |
| 890 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 891 | |
| 892 | #ifdef TFM_ENABLE_IRQ_TEST |
| 893 | const struct tfm_spm_partition_platform_data_t * |
| 894 | platform_data_list_TFM_IRQ_TEST_1[] = |
| 895 | { |
| 896 | TFM_PERIPHERAL_TIMER0, |
| 897 | NULL |
| 898 | }; |
| 899 | #endif /* TFM_ENABLE_IRQ_TEST */ |
| 900 | |
| 901 | const struct tfm_spm_partition_platform_data_t **platform_data_list_list[] = |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 902 | { |
| 903 | NULL, |
| 904 | |
| 905 | #ifndef TFM_PSA_API |
| 906 | NULL, |
| 907 | #endif |
| 908 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 909 | #ifdef TFM_PARTITION_SECURE_STORAGE |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 910 | NULL, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 911 | #endif /* TFM_PARTITION_SECURE_STORAGE */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 912 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 913 | #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 914 | NULL, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 915 | #endif /* TFM_PARTITION_INTERNAL_TRUSTED_STORAGE */ |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 916 | |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 917 | #ifdef TFM_PARTITION_AUDIT_LOG |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 918 | platform_data_list_TFM_SP_AUDIT_LOG, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 919 | #endif /* TFM_PARTITION_AUDIT_LOG */ |
| 920 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 921 | #ifdef TFM_PARTITION_CRYPTO |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 922 | NULL, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 923 | #endif /* TFM_PARTITION_CRYPTO */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 924 | |
| 925 | #ifdef TFM_PARTITION_PLATFORM |
| 926 | NULL, |
| 927 | #endif /* TFM_PARTITION_PLATFORM */ |
| 928 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 929 | #ifdef TFM_PARTITION_INITIAL_ATTESTATION |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 930 | NULL, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 931 | #endif /* TFM_PARTITION_INITIAL_ATTESTATION */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 932 | |
| 933 | #ifdef TFM_PARTITION_TEST_CORE |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 934 | platform_data_list_TFM_SP_CORE_TEST, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 935 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 936 | |
| 937 | #ifdef TFM_PARTITION_TEST_CORE |
| 938 | NULL, |
| 939 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 940 | |
| 941 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 942 | platform_data_list_TFM_SP_SECURE_TEST_PARTITION, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 943 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 944 | |
| 945 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 946 | NULL, |
| 947 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 948 | |
| 949 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 950 | NULL, |
| 951 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 952 | |
| 953 | #ifdef TFM_ENABLE_IRQ_TEST |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 954 | platform_data_list_TFM_IRQ_TEST_1, |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 955 | #endif /* TFM_ENABLE_IRQ_TEST */ |
| 956 | |
Jamie Fox | 0e823a0 | 2019-10-28 17:28:19 +0000 | [diff] [blame] | 957 | #ifdef TFM_PARTITION_TEST_SST |
| 958 | NULL, |
| 959 | #endif /* TFM_PARTITION_TEST_SST */ |
| 960 | |
Jamie Fox | 830ff76 | 2019-12-16 15:20:22 +0000 | [diff] [blame] | 961 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 962 | NULL, |
| 963 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 964 | |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 965 | }; |
| 966 | |
| 967 | /**************************************************************************/ |
| 968 | /** The memory data of the partition list */ |
| 969 | /**************************************************************************/ |
| 970 | #ifdef TFM_PSA_API |
| 971 | const struct tfm_spm_partition_memory_data_t memory_data_list[] = |
| 972 | { |
| 973 | { |
| 974 | .stack_bottom = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base), |
| 975 | .stack_top = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Limit), |
| 976 | .rw_start = PART_REGION_ADDR(ARM_LIB_STACK, $$ZI$$Base), |
| 977 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 978 | #ifdef TFM_PARTITION_SECURE_STORAGE |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 979 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 980 | .code_start = PART_REGION_ADDR(TFM_SP_STORAGE_LINKER, $$Base), |
| 981 | .code_limit = PART_REGION_ADDR(TFM_SP_STORAGE_LINKER, $$Limit), |
| 982 | .ro_start = PART_REGION_ADDR(TFM_SP_STORAGE_LINKER, $$RO$$Base), |
| 983 | .ro_limit = PART_REGION_ADDR(TFM_SP_STORAGE_LINKER, $$RO$$Limit), |
| 984 | .rw_start = PART_REGION_ADDR(TFM_SP_STORAGE_LINKER, _DATA$$RW$$Base), |
| 985 | .rw_limit = PART_REGION_ADDR(TFM_SP_STORAGE_LINKER, _DATA$$RW$$Limit), |
| 986 | .zi_start = PART_REGION_ADDR(TFM_SP_STORAGE_LINKER, _DATA$$ZI$$Base), |
| 987 | .zi_limit = PART_REGION_ADDR(TFM_SP_STORAGE_LINKER, _DATA$$ZI$$Limit), |
| 988 | .stack_bottom = PART_REGION_ADDR(TFM_SP_STORAGE_LINKER, _STACK$$ZI$$Base), |
| 989 | .stack_top = PART_REGION_ADDR(TFM_SP_STORAGE_LINKER, _STACK$$ZI$$Limit), |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 990 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 991 | #endif /* TFM_PARTITION_SECURE_STORAGE */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 992 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 993 | #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 994 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 995 | .code_start = PART_REGION_ADDR(TFM_SP_ITS_LINKER, $$Base), |
| 996 | .code_limit = PART_REGION_ADDR(TFM_SP_ITS_LINKER, $$Limit), |
| 997 | .ro_start = PART_REGION_ADDR(TFM_SP_ITS_LINKER, $$RO$$Base), |
| 998 | .ro_limit = PART_REGION_ADDR(TFM_SP_ITS_LINKER, $$RO$$Limit), |
| 999 | .rw_start = PART_REGION_ADDR(TFM_SP_ITS_LINKER, _DATA$$RW$$Base), |
| 1000 | .rw_limit = PART_REGION_ADDR(TFM_SP_ITS_LINKER, _DATA$$RW$$Limit), |
| 1001 | .zi_start = PART_REGION_ADDR(TFM_SP_ITS_LINKER, _DATA$$ZI$$Base), |
| 1002 | .zi_limit = PART_REGION_ADDR(TFM_SP_ITS_LINKER, _DATA$$ZI$$Limit), |
| 1003 | .stack_bottom = PART_REGION_ADDR(TFM_SP_ITS_LINKER, _STACK$$ZI$$Base), |
| 1004 | .stack_top = PART_REGION_ADDR(TFM_SP_ITS_LINKER, _STACK$$ZI$$Limit), |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 1005 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1006 | #endif /* TFM_PARTITION_INTERNAL_TRUSTED_STORAGE */ |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 1007 | |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1008 | #ifdef TFM_PARTITION_AUDIT_LOG |
| 1009 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 1010 | .code_start = PART_REGION_ADDR(TFM_SP_AUDIT_LOG_LINKER, $$Base), |
| 1011 | .code_limit = PART_REGION_ADDR(TFM_SP_AUDIT_LOG_LINKER, $$Limit), |
| 1012 | .ro_start = PART_REGION_ADDR(TFM_SP_AUDIT_LOG_LINKER, $$RO$$Base), |
| 1013 | .ro_limit = PART_REGION_ADDR(TFM_SP_AUDIT_LOG_LINKER, $$RO$$Limit), |
| 1014 | .rw_start = PART_REGION_ADDR(TFM_SP_AUDIT_LOG_LINKER, _DATA$$RW$$Base), |
| 1015 | .rw_limit = PART_REGION_ADDR(TFM_SP_AUDIT_LOG_LINKER, _DATA$$RW$$Limit), |
| 1016 | .zi_start = PART_REGION_ADDR(TFM_SP_AUDIT_LOG_LINKER, _DATA$$ZI$$Base), |
| 1017 | .zi_limit = PART_REGION_ADDR(TFM_SP_AUDIT_LOG_LINKER, _DATA$$ZI$$Limit), |
| 1018 | .stack_bottom = PART_REGION_ADDR(TFM_SP_AUDIT_LOG_LINKER, _STACK$$ZI$$Base), |
| 1019 | .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] | 1020 | }, |
| 1021 | #endif /* TFM_PARTITION_AUDIT_LOG */ |
| 1022 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1023 | #ifdef TFM_PARTITION_CRYPTO |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1024 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 1025 | .code_start = PART_REGION_ADDR(TFM_SP_CRYPTO_LINKER, $$Base), |
| 1026 | .code_limit = PART_REGION_ADDR(TFM_SP_CRYPTO_LINKER, $$Limit), |
| 1027 | .ro_start = PART_REGION_ADDR(TFM_SP_CRYPTO_LINKER, $$RO$$Base), |
| 1028 | .ro_limit = PART_REGION_ADDR(TFM_SP_CRYPTO_LINKER, $$RO$$Limit), |
| 1029 | .rw_start = PART_REGION_ADDR(TFM_SP_CRYPTO_LINKER, _DATA$$RW$$Base), |
| 1030 | .rw_limit = PART_REGION_ADDR(TFM_SP_CRYPTO_LINKER, _DATA$$RW$$Limit), |
| 1031 | .zi_start = PART_REGION_ADDR(TFM_SP_CRYPTO_LINKER, _DATA$$ZI$$Base), |
| 1032 | .zi_limit = PART_REGION_ADDR(TFM_SP_CRYPTO_LINKER, _DATA$$ZI$$Limit), |
| 1033 | .stack_bottom = PART_REGION_ADDR(TFM_SP_CRYPTO_LINKER, _STACK$$ZI$$Base), |
| 1034 | .stack_top = PART_REGION_ADDR(TFM_SP_CRYPTO_LINKER, _STACK$$ZI$$Limit), |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1035 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1036 | #endif /* TFM_PARTITION_CRYPTO */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1037 | |
| 1038 | #ifdef TFM_PARTITION_PLATFORM |
| 1039 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 1040 | .code_start = PART_REGION_ADDR(TFM_SP_PLATFORM_LINKER, $$Base), |
| 1041 | .code_limit = PART_REGION_ADDR(TFM_SP_PLATFORM_LINKER, $$Limit), |
| 1042 | .ro_start = PART_REGION_ADDR(TFM_SP_PLATFORM_LINKER, $$RO$$Base), |
| 1043 | .ro_limit = PART_REGION_ADDR(TFM_SP_PLATFORM_LINKER, $$RO$$Limit), |
| 1044 | .rw_start = PART_REGION_ADDR(TFM_SP_PLATFORM_LINKER, _DATA$$RW$$Base), |
| 1045 | .rw_limit = PART_REGION_ADDR(TFM_SP_PLATFORM_LINKER, _DATA$$RW$$Limit), |
| 1046 | .zi_start = PART_REGION_ADDR(TFM_SP_PLATFORM_LINKER, _DATA$$ZI$$Base), |
| 1047 | .zi_limit = PART_REGION_ADDR(TFM_SP_PLATFORM_LINKER, _DATA$$ZI$$Limit), |
| 1048 | .stack_bottom = PART_REGION_ADDR(TFM_SP_PLATFORM_LINKER, _STACK$$ZI$$Base), |
| 1049 | .stack_top = PART_REGION_ADDR(TFM_SP_PLATFORM_LINKER, _STACK$$ZI$$Limit), |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1050 | }, |
| 1051 | #endif /* TFM_PARTITION_PLATFORM */ |
| 1052 | |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1053 | #ifdef TFM_PARTITION_INITIAL_ATTESTATION |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1054 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 1055 | .code_start = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION_LINKER, $$Base), |
| 1056 | .code_limit = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION_LINKER, $$Limit), |
| 1057 | .ro_start = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION_LINKER, $$RO$$Base), |
| 1058 | .ro_limit = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION_LINKER, $$RO$$Limit), |
| 1059 | .rw_start = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION_LINKER, _DATA$$RW$$Base), |
| 1060 | .rw_limit = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION_LINKER, _DATA$$RW$$Limit), |
| 1061 | .zi_start = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION_LINKER, _DATA$$ZI$$Base), |
| 1062 | .zi_limit = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION_LINKER, _DATA$$ZI$$Limit), |
| 1063 | .stack_bottom = PART_REGION_ADDR(TFM_SP_INITIAL_ATTESTATION_LINKER, _STACK$$ZI$$Base), |
| 1064 | .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] | 1065 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1066 | #endif /* TFM_PARTITION_INITIAL_ATTESTATION */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1067 | |
| 1068 | #ifdef TFM_PARTITION_TEST_CORE |
| 1069 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 1070 | .code_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_LINKER, $$Base), |
| 1071 | .code_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_LINKER, $$Limit), |
| 1072 | .ro_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_LINKER, $$RO$$Base), |
| 1073 | .ro_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_LINKER, $$RO$$Limit), |
| 1074 | .rw_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_LINKER, _DATA$$RW$$Base), |
| 1075 | .rw_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_LINKER, _DATA$$RW$$Limit), |
| 1076 | .zi_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_LINKER, _DATA$$ZI$$Base), |
| 1077 | .zi_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_LINKER, _DATA$$ZI$$Limit), |
| 1078 | .stack_bottom = PART_REGION_ADDR(TFM_SP_CORE_TEST_LINKER, _STACK$$ZI$$Base), |
| 1079 | .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] | 1080 | }, |
| 1081 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 1082 | |
| 1083 | #ifdef TFM_PARTITION_TEST_CORE |
| 1084 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 1085 | .code_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_2_LINKER, $$Base), |
| 1086 | .code_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_2_LINKER, $$Limit), |
| 1087 | .ro_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_2_LINKER, $$RO$$Base), |
| 1088 | .ro_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_2_LINKER, $$RO$$Limit), |
| 1089 | .rw_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_2_LINKER, _DATA$$RW$$Base), |
| 1090 | .rw_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_2_LINKER, _DATA$$RW$$Limit), |
| 1091 | .zi_start = PART_REGION_ADDR(TFM_SP_CORE_TEST_2_LINKER, _DATA$$ZI$$Base), |
| 1092 | .zi_limit = PART_REGION_ADDR(TFM_SP_CORE_TEST_2_LINKER, _DATA$$ZI$$Limit), |
| 1093 | .stack_bottom = PART_REGION_ADDR(TFM_SP_CORE_TEST_2_LINKER, _STACK$$ZI$$Base), |
| 1094 | .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] | 1095 | }, |
| 1096 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 1097 | |
| 1098 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 1099 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 1100 | .code_start = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION_LINKER, $$Base), |
| 1101 | .code_limit = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION_LINKER, $$Limit), |
| 1102 | .ro_start = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION_LINKER, $$RO$$Base), |
| 1103 | .ro_limit = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION_LINKER, $$RO$$Limit), |
| 1104 | .rw_start = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION_LINKER, _DATA$$RW$$Base), |
| 1105 | .rw_limit = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION_LINKER, _DATA$$RW$$Limit), |
| 1106 | .zi_start = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION_LINKER, _DATA$$ZI$$Base), |
| 1107 | .zi_limit = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION_LINKER, _DATA$$ZI$$Limit), |
| 1108 | .stack_bottom = PART_REGION_ADDR(TFM_SP_SECURE_TEST_PARTITION_LINKER, _STACK$$ZI$$Base), |
| 1109 | .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] | 1110 | }, |
| 1111 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 1112 | |
| 1113 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 1114 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 1115 | .code_start = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST_LINKER, $$Base), |
| 1116 | .code_limit = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST_LINKER, $$Limit), |
| 1117 | .ro_start = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST_LINKER, $$RO$$Base), |
| 1118 | .ro_limit = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST_LINKER, $$RO$$Limit), |
| 1119 | .rw_start = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST_LINKER, _DATA$$RW$$Base), |
| 1120 | .rw_limit = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST_LINKER, _DATA$$RW$$Limit), |
| 1121 | .zi_start = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST_LINKER, _DATA$$ZI$$Base), |
| 1122 | .zi_limit = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST_LINKER, _DATA$$ZI$$Limit), |
| 1123 | .stack_bottom = PART_REGION_ADDR(TFM_SP_IPC_SERVICE_TEST_LINKER, _STACK$$ZI$$Base), |
| 1124 | .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] | 1125 | }, |
| 1126 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 1127 | |
| 1128 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 1129 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 1130 | .code_start = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST_LINKER, $$Base), |
| 1131 | .code_limit = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST_LINKER, $$Limit), |
| 1132 | .ro_start = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST_LINKER, $$RO$$Base), |
| 1133 | .ro_limit = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST_LINKER, $$RO$$Limit), |
| 1134 | .rw_start = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST_LINKER, _DATA$$RW$$Base), |
| 1135 | .rw_limit = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST_LINKER, _DATA$$RW$$Limit), |
| 1136 | .zi_start = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST_LINKER, _DATA$$ZI$$Base), |
| 1137 | .zi_limit = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST_LINKER, _DATA$$ZI$$Limit), |
| 1138 | .stack_bottom = PART_REGION_ADDR(TFM_SP_IPC_CLIENT_TEST_LINKER, _STACK$$ZI$$Base), |
| 1139 | .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] | 1140 | }, |
| 1141 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 1142 | |
| 1143 | #ifdef TFM_ENABLE_IRQ_TEST |
| 1144 | { |
Edison Ai | b2134e6 | 2019-10-11 18:24:47 +0800 | [diff] [blame] | 1145 | .code_start = PART_REGION_ADDR(TFM_IRQ_TEST_1_LINKER, $$Base), |
| 1146 | .code_limit = PART_REGION_ADDR(TFM_IRQ_TEST_1_LINKER, $$Limit), |
| 1147 | .ro_start = PART_REGION_ADDR(TFM_IRQ_TEST_1_LINKER, $$RO$$Base), |
| 1148 | .ro_limit = PART_REGION_ADDR(TFM_IRQ_TEST_1_LINKER, $$RO$$Limit), |
| 1149 | .rw_start = PART_REGION_ADDR(TFM_IRQ_TEST_1_LINKER, _DATA$$RW$$Base), |
| 1150 | .rw_limit = PART_REGION_ADDR(TFM_IRQ_TEST_1_LINKER, _DATA$$RW$$Limit), |
| 1151 | .zi_start = PART_REGION_ADDR(TFM_IRQ_TEST_1_LINKER, _DATA$$ZI$$Base), |
| 1152 | .zi_limit = PART_REGION_ADDR(TFM_IRQ_TEST_1_LINKER, _DATA$$ZI$$Limit), |
| 1153 | .stack_bottom = PART_REGION_ADDR(TFM_IRQ_TEST_1_LINKER, _STACK$$ZI$$Base), |
| 1154 | .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] | 1155 | }, |
| 1156 | #endif /* TFM_ENABLE_IRQ_TEST */ |
| 1157 | |
Jamie Fox | 0e823a0 | 2019-10-28 17:28:19 +0000 | [diff] [blame] | 1158 | #ifdef TFM_PARTITION_TEST_SST |
| 1159 | { |
| 1160 | .code_start = PART_REGION_ADDR(TFM_SP_SST_TEST_LINKER, $$Base), |
| 1161 | .code_limit = PART_REGION_ADDR(TFM_SP_SST_TEST_LINKER, $$Limit), |
| 1162 | .ro_start = PART_REGION_ADDR(TFM_SP_SST_TEST_LINKER, $$RO$$Base), |
| 1163 | .ro_limit = PART_REGION_ADDR(TFM_SP_SST_TEST_LINKER, $$RO$$Limit), |
| 1164 | .rw_start = PART_REGION_ADDR(TFM_SP_SST_TEST_LINKER, _DATA$$RW$$Base), |
| 1165 | .rw_limit = PART_REGION_ADDR(TFM_SP_SST_TEST_LINKER, _DATA$$RW$$Limit), |
| 1166 | .zi_start = PART_REGION_ADDR(TFM_SP_SST_TEST_LINKER, _DATA$$ZI$$Base), |
| 1167 | .zi_limit = PART_REGION_ADDR(TFM_SP_SST_TEST_LINKER, _DATA$$ZI$$Limit), |
| 1168 | .stack_bottom = PART_REGION_ADDR(TFM_SP_SST_TEST_LINKER, _STACK$$ZI$$Base), |
| 1169 | .stack_top = PART_REGION_ADDR(TFM_SP_SST_TEST_LINKER, _STACK$$ZI$$Limit), |
| 1170 | }, |
| 1171 | #endif /* TFM_PARTITION_TEST_SST */ |
| 1172 | |
Jamie Fox | 830ff76 | 2019-12-16 15:20:22 +0000 | [diff] [blame] | 1173 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 1174 | { |
| 1175 | .code_start = PART_REGION_ADDR(TFM_SP_SECURE_CLIENT_2_LINKER, $$Base), |
| 1176 | .code_limit = PART_REGION_ADDR(TFM_SP_SECURE_CLIENT_2_LINKER, $$Limit), |
| 1177 | .ro_start = PART_REGION_ADDR(TFM_SP_SECURE_CLIENT_2_LINKER, $$RO$$Base), |
| 1178 | .ro_limit = PART_REGION_ADDR(TFM_SP_SECURE_CLIENT_2_LINKER, $$RO$$Limit), |
| 1179 | .rw_start = PART_REGION_ADDR(TFM_SP_SECURE_CLIENT_2_LINKER, _DATA$$RW$$Base), |
| 1180 | .rw_limit = PART_REGION_ADDR(TFM_SP_SECURE_CLIENT_2_LINKER, _DATA$$RW$$Limit), |
| 1181 | .zi_start = PART_REGION_ADDR(TFM_SP_SECURE_CLIENT_2_LINKER, _DATA$$ZI$$Base), |
| 1182 | .zi_limit = PART_REGION_ADDR(TFM_SP_SECURE_CLIENT_2_LINKER, _DATA$$ZI$$Limit), |
| 1183 | .stack_bottom = PART_REGION_ADDR(TFM_SP_SECURE_CLIENT_2_LINKER, _STACK$$ZI$$Base), |
| 1184 | .stack_top = PART_REGION_ADDR(TFM_SP_SECURE_CLIENT_2_LINKER, _STACK$$ZI$$Limit), |
| 1185 | }, |
| 1186 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 1187 | |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1188 | }; |
| 1189 | #endif /* defined(TFM_PSA_API) */ |
| 1190 | |
| 1191 | /**************************************************************************/ |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1192 | /** The partition list for the DB */ |
| 1193 | /**************************************************************************/ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1194 | static struct spm_partition_desc_t partition_list [] = |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1195 | { |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1196 | {{}}, /* placeholder for Non-secure internal partition */ |
Mingyang Sun | da01a97 | 2019-07-12 17:32:59 +0800 | [diff] [blame] | 1197 | #ifndef TFM_PSA_API |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1198 | {{}}, /* placeholder for TF-M Core internal partition */ |
Mingyang Sun | da01a97 | 2019-07-12 17:32:59 +0800 | [diff] [blame] | 1199 | #endif /* !ifndefined(TFM_PSA_API) */ |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1200 | |
| 1201 | /* -----------------------------------------------------------------------*/ |
| 1202 | /* - Partition DB record for TFM_SP_STORAGE */ |
| 1203 | /* -----------------------------------------------------------------------*/ |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1204 | #ifdef TFM_PARTITION_SECURE_STORAGE |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1205 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1206 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1207 | .runtime_data = {}, |
| 1208 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1209 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1210 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1211 | #endif /* TFM_PARTITION_SECURE_STORAGE */ |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1212 | |
| 1213 | /* -----------------------------------------------------------------------*/ |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 1214 | /* - Partition DB record for TFM_SP_ITS */ |
| 1215 | /* -----------------------------------------------------------------------*/ |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1216 | #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 1217 | { |
| 1218 | /* Runtime data */ |
| 1219 | .runtime_data = {}, |
| 1220 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1221 | .platform_data_list = NULL, |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 1222 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1223 | #endif /* TFM_PARTITION_INTERNAL_TRUSTED_STORAGE */ |
TudorCretu | fb182bc | 2019-07-05 17:34:12 +0100 | [diff] [blame] | 1224 | |
| 1225 | /* -----------------------------------------------------------------------*/ |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1226 | /* - Partition DB record for TFM_SP_AUDIT_LOG */ |
| 1227 | /* -----------------------------------------------------------------------*/ |
| 1228 | #ifdef TFM_PARTITION_AUDIT_LOG |
| 1229 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1230 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1231 | .runtime_data = {}, |
| 1232 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1233 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1234 | }, |
| 1235 | #endif /* TFM_PARTITION_AUDIT_LOG */ |
| 1236 | |
| 1237 | /* -----------------------------------------------------------------------*/ |
| 1238 | /* - Partition DB record for TFM_SP_CRYPTO */ |
| 1239 | /* -----------------------------------------------------------------------*/ |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1240 | #ifdef TFM_PARTITION_CRYPTO |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1241 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1242 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1243 | .runtime_data = {}, |
| 1244 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1245 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1246 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1247 | #endif /* TFM_PARTITION_CRYPTO */ |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1248 | |
| 1249 | /* -----------------------------------------------------------------------*/ |
| 1250 | /* - Partition DB record for TFM_SP_PLATFORM */ |
| 1251 | /* -----------------------------------------------------------------------*/ |
| 1252 | #ifdef TFM_PARTITION_PLATFORM |
| 1253 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1254 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1255 | .runtime_data = {}, |
| 1256 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1257 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1258 | }, |
| 1259 | #endif /* TFM_PARTITION_PLATFORM */ |
| 1260 | |
| 1261 | /* -----------------------------------------------------------------------*/ |
| 1262 | /* - Partition DB record for TFM_SP_INITIAL_ATTESTATION */ |
| 1263 | /* -----------------------------------------------------------------------*/ |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1264 | #ifdef TFM_PARTITION_INITIAL_ATTESTATION |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1265 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1266 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1267 | .runtime_data = {}, |
| 1268 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1269 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1270 | }, |
Kevin Peng | c73130f | 2019-10-22 17:27:18 +0800 | [diff] [blame] | 1271 | #endif /* TFM_PARTITION_INITIAL_ATTESTATION */ |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1272 | |
| 1273 | /* -----------------------------------------------------------------------*/ |
| 1274 | /* - Partition DB record for TFM_SP_CORE_TEST */ |
| 1275 | /* -----------------------------------------------------------------------*/ |
| 1276 | #ifdef TFM_PARTITION_TEST_CORE |
| 1277 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1278 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1279 | .runtime_data = {}, |
| 1280 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1281 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1282 | }, |
| 1283 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 1284 | |
| 1285 | /* -----------------------------------------------------------------------*/ |
| 1286 | /* - Partition DB record for TFM_SP_CORE_TEST_2 */ |
| 1287 | /* -----------------------------------------------------------------------*/ |
| 1288 | #ifdef TFM_PARTITION_TEST_CORE |
| 1289 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1290 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1291 | .runtime_data = {}, |
| 1292 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1293 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1294 | }, |
| 1295 | #endif /* TFM_PARTITION_TEST_CORE */ |
| 1296 | |
| 1297 | /* -----------------------------------------------------------------------*/ |
| 1298 | /* - Partition DB record for TFM_SP_SECURE_TEST_PARTITION */ |
| 1299 | /* -----------------------------------------------------------------------*/ |
| 1300 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 1301 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1302 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1303 | .runtime_data = {}, |
| 1304 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1305 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1306 | }, |
| 1307 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 1308 | |
| 1309 | /* -----------------------------------------------------------------------*/ |
| 1310 | /* - Partition DB record for TFM_SP_IPC_SERVICE_TEST */ |
| 1311 | /* -----------------------------------------------------------------------*/ |
| 1312 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 1313 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1314 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1315 | .runtime_data = {}, |
| 1316 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1317 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1318 | }, |
| 1319 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 1320 | |
| 1321 | /* -----------------------------------------------------------------------*/ |
| 1322 | /* - Partition DB record for TFM_SP_IPC_CLIENT_TEST */ |
| 1323 | /* -----------------------------------------------------------------------*/ |
| 1324 | #ifdef TFM_PARTITION_TEST_CORE_IPC |
| 1325 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1326 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1327 | .runtime_data = {}, |
| 1328 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1329 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1330 | }, |
| 1331 | #endif /* TFM_PARTITION_TEST_CORE_IPC */ |
| 1332 | |
| 1333 | /* -----------------------------------------------------------------------*/ |
| 1334 | /* - Partition DB record for TFM_IRQ_TEST_1 */ |
| 1335 | /* -----------------------------------------------------------------------*/ |
David Hu | 33f2fd2 | 2019-08-16 15:32:39 +0800 | [diff] [blame] | 1336 | #ifdef TFM_ENABLE_IRQ_TEST |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1337 | { |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1338 | /* Runtime data */ |
Summer Qin | 423dbef | 2019-08-22 15:59:35 +0800 | [diff] [blame] | 1339 | .runtime_data = {}, |
| 1340 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1341 | .platform_data_list = NULL, |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1342 | }, |
David Hu | 33f2fd2 | 2019-08-16 15:32:39 +0800 | [diff] [blame] | 1343 | #endif /* TFM_ENABLE_IRQ_TEST */ |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1344 | |
Jamie Fox | 0e823a0 | 2019-10-28 17:28:19 +0000 | [diff] [blame] | 1345 | /* -----------------------------------------------------------------------*/ |
| 1346 | /* - Partition DB record for TFM_SP_SST_TEST */ |
| 1347 | /* -----------------------------------------------------------------------*/ |
| 1348 | #ifdef TFM_PARTITION_TEST_SST |
| 1349 | { |
| 1350 | /* Runtime data */ |
| 1351 | .runtime_data = {}, |
| 1352 | .static_data = NULL, |
Mate Toth-Pal | 8ac98a7 | 2019-11-21 17:30:10 +0100 | [diff] [blame] | 1353 | .platform_data_list = NULL, |
Jamie Fox | 0e823a0 | 2019-10-28 17:28:19 +0000 | [diff] [blame] | 1354 | }, |
| 1355 | #endif /* TFM_PARTITION_TEST_SST */ |
| 1356 | |
Jamie Fox | 830ff76 | 2019-12-16 15:20:22 +0000 | [diff] [blame] | 1357 | /* -----------------------------------------------------------------------*/ |
| 1358 | /* - Partition DB record for TFM_SP_SECURE_CLIENT_2 */ |
| 1359 | /* -----------------------------------------------------------------------*/ |
| 1360 | #ifdef TFM_PARTITION_TEST_SECURE_SERVICES |
| 1361 | { |
| 1362 | /* Runtime data */ |
| 1363 | .runtime_data = {}, |
| 1364 | .static_data = NULL, |
| 1365 | .platform_data_list = NULL, |
| 1366 | }, |
| 1367 | #endif /* TFM_PARTITION_TEST_SECURE_SERVICES */ |
| 1368 | |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1369 | }; |
| 1370 | |
| 1371 | struct spm_partition_db_t g_spm_partition_db = { |
| 1372 | .is_init = 0, |
| 1373 | .partition_count = sizeof(partition_list) / sizeof(partition_list[0]), |
Edison Ai | 66fbdf1 | 2019-07-08 16:05:07 +0800 | [diff] [blame] | 1374 | #ifndef TFM_PSA_API |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1375 | .running_partition_idx = 0, |
Edison Ai | 66fbdf1 | 2019-07-08 16:05:07 +0800 | [diff] [blame] | 1376 | #endif |
Mate Toth-Pal | 3ad2e3e | 2019-07-11 21:43:37 +0200 | [diff] [blame] | 1377 | .partitions = partition_list, |
| 1378 | }; |
| 1379 | |
| 1380 | #endif /* __TFM_SPM_DB_INC__ */ |