10 #ifndef __TFM_SPM_DB_FUNC_INC__
11 #define __TFM_SPM_DB_FUNC_INC__
18 #ifdef TFM_PARTITION_PROTECTED_STORAGE
19 #define TFM_PARTITION_TFM_SP_PS_IRQ_COUNT 0
22 #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
23 #define TFM_PARTITION_TFM_SP_ITS_IRQ_COUNT 0
26 #ifdef TFM_PARTITION_AUDIT_LOG
27 #define TFM_PARTITION_TFM_SP_AUDIT_LOG_IRQ_COUNT 0
30 #ifdef TFM_PARTITION_CRYPTO
31 #define TFM_PARTITION_TFM_SP_CRYPTO_IRQ_COUNT 0
34 #ifdef TFM_PARTITION_PLATFORM
35 #define TFM_PARTITION_TFM_SP_PLATFORM_IRQ_COUNT 0
38 #ifdef TFM_PARTITION_INITIAL_ATTESTATION
39 #define TFM_PARTITION_TFM_SP_INITIAL_ATTESTATION_IRQ_COUNT 0
42 #ifdef TFM_PARTITION_TEST_CORE
43 #define TFM_PARTITION_TFM_SP_CORE_TEST_IRQ_COUNT 0
46 #ifdef TFM_PARTITION_TEST_CORE
47 #define TFM_PARTITION_TFM_SP_CORE_TEST_2_IRQ_COUNT 0
50 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
51 #define TFM_PARTITION_TFM_SP_SECURE_TEST_PARTITION_IRQ_COUNT 0
54 #ifdef TFM_PARTITION_TEST_CORE_IPC
55 #define TFM_PARTITION_TFM_SP_IPC_SERVICE_TEST_IRQ_COUNT 0
58 #ifdef TFM_PARTITION_TEST_CORE_IPC
59 #define TFM_PARTITION_TFM_SP_IPC_CLIENT_TEST_IRQ_COUNT 0
62 #ifdef TFM_ENABLE_IRQ_TEST
63 #define TFM_PARTITION_TFM_IRQ_TEST_1_IRQ_COUNT 1
66 #ifdef TFM_PARTITION_TEST_PS
67 #define TFM_PARTITION_TFM_SP_PS_TEST_IRQ_COUNT 0
70 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
71 #define TFM_PARTITION_TFM_SP_SECURE_CLIENT_2_IRQ_COUNT 0
77 #ifdef TFM_PARTITION_PROTECTED_STORAGE
81 #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
85 #ifdef TFM_PARTITION_AUDIT_LOG
89 #ifdef TFM_PARTITION_CRYPTO
93 #ifdef TFM_PARTITION_PLATFORM
97 #ifdef TFM_PARTITION_INITIAL_ATTESTATION
101 #ifdef TFM_PARTITION_TEST_CORE
105 #ifdef TFM_PARTITION_TEST_CORE
109 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
113 #ifdef TFM_PARTITION_TEST_CORE_IPC
117 #ifdef TFM_PARTITION_TEST_CORE_IPC
121 #ifdef TFM_ENABLE_IRQ_TEST
125 #ifdef TFM_PARTITION_TEST_PS
129 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
145 static uint32_t ns_interrupt_ctx_stack[
148 static uint32_t tfm_core_interrupt_ctx_stack[
151 #ifdef TFM_PARTITION_PROTECTED_STORAGE
152 static uint32_t ctx_stack_TFM_SP_PS[
154 (TFM_PARTITION_TFM_SP_PS_IRQ_COUNT) * (
157 )) / sizeof(uint32_t)];
160 #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
161 static uint32_t ctx_stack_TFM_SP_ITS[
163 (TFM_PARTITION_TFM_SP_ITS_IRQ_COUNT) * (
166 )) / sizeof(uint32_t)];
169 #ifdef TFM_PARTITION_AUDIT_LOG
170 static uint32_t ctx_stack_TFM_SP_AUDIT_LOG[
172 (TFM_PARTITION_TFM_SP_AUDIT_LOG_IRQ_COUNT) * (
175 )) / sizeof(uint32_t)];
178 #ifdef TFM_PARTITION_CRYPTO
179 static uint32_t ctx_stack_TFM_SP_CRYPTO[
181 (TFM_PARTITION_TFM_SP_CRYPTO_IRQ_COUNT) * (
184 )) / sizeof(uint32_t)];
187 #ifdef TFM_PARTITION_PLATFORM
188 static uint32_t ctx_stack_TFM_SP_PLATFORM[
190 (TFM_PARTITION_TFM_SP_PLATFORM_IRQ_COUNT) * (
193 )) / sizeof(uint32_t)];
196 #ifdef TFM_PARTITION_INITIAL_ATTESTATION
197 static uint32_t ctx_stack_TFM_SP_INITIAL_ATTESTATION[
199 (TFM_PARTITION_TFM_SP_INITIAL_ATTESTATION_IRQ_COUNT) * (
202 )) / sizeof(uint32_t)];
205 #ifdef TFM_PARTITION_TEST_CORE
206 static uint32_t ctx_stack_TFM_SP_CORE_TEST[
208 (TFM_PARTITION_TFM_SP_CORE_TEST_IRQ_COUNT) * (
211 )) / sizeof(uint32_t)];
214 #ifdef TFM_PARTITION_TEST_CORE
215 static uint32_t ctx_stack_TFM_SP_CORE_TEST_2[
217 (TFM_PARTITION_TFM_SP_CORE_TEST_2_IRQ_COUNT) * (
220 )) / sizeof(uint32_t)];
223 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
224 static uint32_t ctx_stack_TFM_SP_SECURE_TEST_PARTITION[
226 (TFM_PARTITION_TFM_SP_SECURE_TEST_PARTITION_IRQ_COUNT) * (
229 )) / sizeof(uint32_t)];
232 #ifdef TFM_PARTITION_TEST_CORE_IPC
233 static uint32_t ctx_stack_TFM_SP_IPC_SERVICE_TEST[
235 (TFM_PARTITION_TFM_SP_IPC_SERVICE_TEST_IRQ_COUNT) * (
238 )) / sizeof(uint32_t)];
241 #ifdef TFM_PARTITION_TEST_CORE_IPC
242 static uint32_t ctx_stack_TFM_SP_IPC_CLIENT_TEST[
244 (TFM_PARTITION_TFM_SP_IPC_CLIENT_TEST_IRQ_COUNT) * (
247 )) / sizeof(uint32_t)];
250 #ifdef TFM_ENABLE_IRQ_TEST
251 static uint32_t ctx_stack_TFM_IRQ_TEST_1[
253 (TFM_PARTITION_TFM_IRQ_TEST_1_IRQ_COUNT) * (
256 )) / sizeof(uint32_t)];
259 #ifdef TFM_PARTITION_TEST_PS
260 static uint32_t ctx_stack_TFM_SP_PS_TEST[
262 (TFM_PARTITION_TFM_SP_PS_TEST_IRQ_COUNT) * (
265 )) / sizeof(uint32_t)];
268 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
269 static uint32_t ctx_stack_TFM_SP_SECURE_CLIENT_2[
271 (TFM_PARTITION_TFM_SP_SECURE_CLIENT_2_IRQ_COUNT) * (
274 )) / sizeof(uint32_t)];
279 ns_interrupt_ctx_stack,
280 tfm_core_interrupt_ctx_stack,
281 #ifdef TFM_PARTITION_PROTECTED_STORAGE
284 #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
285 ctx_stack_TFM_SP_ITS,
287 #ifdef TFM_PARTITION_AUDIT_LOG
288 ctx_stack_TFM_SP_AUDIT_LOG,
290 #ifdef TFM_PARTITION_CRYPTO
291 ctx_stack_TFM_SP_CRYPTO,
293 #ifdef TFM_PARTITION_PLATFORM
294 ctx_stack_TFM_SP_PLATFORM,
296 #ifdef TFM_PARTITION_INITIAL_ATTESTATION
297 ctx_stack_TFM_SP_INITIAL_ATTESTATION,
299 #ifdef TFM_PARTITION_TEST_CORE
300 ctx_stack_TFM_SP_CORE_TEST,
302 #ifdef TFM_PARTITION_TEST_CORE
303 ctx_stack_TFM_SP_CORE_TEST_2,
305 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
306 ctx_stack_TFM_SP_SECURE_TEST_PARTITION,
308 #ifdef TFM_PARTITION_TEST_CORE_IPC
309 ctx_stack_TFM_SP_IPC_SERVICE_TEST,
311 #ifdef TFM_PARTITION_TEST_CORE_IPC
312 ctx_stack_TFM_SP_IPC_CLIENT_TEST,
314 #ifdef TFM_ENABLE_IRQ_TEST
315 ctx_stack_TFM_IRQ_TEST_1,
317 #ifdef TFM_PARTITION_TEST_PS
318 ctx_stack_TFM_SP_PS_TEST,
320 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
321 ctx_stack_TFM_SP_SECURE_CLIENT_2,
328 #ifdef TFM_PARTITION_PROTECTED_STORAGE
329 static int32_t dependencies_TFM_SP_PS[] =
340 #ifdef TFM_PARTITION_CRYPTO
341 static int32_t dependencies_TFM_SP_CRYPTO[] =
350 #ifdef TFM_PARTITION_INITIAL_ATTESTATION
351 static int32_t dependencies_TFM_SP_INITIAL_ATTESTATION[] =
357 #ifdef TFM_PARTITION_TEST_CORE
358 static int32_t dependencies_TFM_SP_CORE_TEST[] =
366 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
367 static int32_t dependencies_TFM_SP_SECURE_TEST_PARTITION[] =
389 #ifdef TFM_PARTITION_TEST_CORE_IPC
390 static int32_t dependencies_TFM_SP_IPC_CLIENT_TEST[] =
399 #ifdef TFM_PARTITION_TEST_PS
400 static int32_t dependencies_TFM_SP_PS_TEST[] =
408 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
409 static int32_t dependencies_TFM_SP_SECURE_CLIENT_2[] =
423 .partition_flags = 0,
431 #ifdef TFM_PARTITION_PROTECTED_STORAGE
439 .dependencies_num = 6,
440 .p_dependencies = dependencies_TFM_SP_PS,
444 #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
452 .dependencies_num = 0,
453 .p_dependencies = NULL,
457 #ifdef TFM_PARTITION_AUDIT_LOG
465 .dependencies_num = 0,
466 .p_dependencies = NULL,
470 #ifdef TFM_PARTITION_CRYPTO
478 .dependencies_num = 4,
479 .p_dependencies = dependencies_TFM_SP_CRYPTO,
483 #ifdef TFM_PARTITION_PLATFORM
491 .dependencies_num = 0,
492 .p_dependencies = NULL,
496 #ifdef TFM_PARTITION_INITIAL_ATTESTATION
504 .dependencies_num = 1,
505 .p_dependencies = dependencies_TFM_SP_INITIAL_ATTESTATION,
509 #ifdef TFM_PARTITION_TEST_CORE
517 .dependencies_num = 3,
518 .p_dependencies = dependencies_TFM_SP_CORE_TEST,
522 #ifdef TFM_PARTITION_TEST_CORE
530 .dependencies_num = 0,
531 .p_dependencies = NULL,
535 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
543 .dependencies_num = 17,
544 .p_dependencies = dependencies_TFM_SP_SECURE_TEST_PARTITION,
548 #ifdef TFM_PARTITION_TEST_CORE_IPC
556 .dependencies_num = 0,
557 .p_dependencies = NULL,
561 #ifdef TFM_PARTITION_TEST_CORE_IPC
569 .dependencies_num = 4,
570 .p_dependencies = dependencies_TFM_SP_IPC_CLIENT_TEST,
574 #ifdef TFM_ENABLE_IRQ_TEST
582 .dependencies_num = 0,
583 .p_dependencies = NULL,
587 #ifdef TFM_PARTITION_TEST_PS
595 .dependencies_num = 3,
596 .p_dependencies = dependencies_TFM_SP_PS_TEST,
600 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
608 .dependencies_num = 2,
609 .p_dependencies = dependencies_TFM_SP_SECURE_CLIENT_2,
618 #ifdef TFM_PARTITION_AUDIT_LOG
619 const struct tfm_spm_partition_platform_data_t *
620 platform_data_list_TFM_SP_AUDIT_LOG[] =
622 #ifdef AUDIT_UART_REDIRECTION
623 TFM_PERIPHERAL_UART1,
629 #ifdef TFM_PARTITION_TEST_CORE
630 const struct tfm_spm_partition_platform_data_t *
631 platform_data_list_TFM_SP_CORE_TEST[] =
633 TFM_PERIPHERAL_FPGA_IO,
638 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
639 const struct tfm_spm_partition_platform_data_t *
640 platform_data_list_TFM_SP_SECURE_TEST_PARTITION[] =
642 TFM_PERIPHERAL_STD_UART,
647 #ifdef TFM_ENABLE_IRQ_TEST
648 const struct tfm_spm_partition_platform_data_t *
649 platform_data_list_TFM_IRQ_TEST_1[] =
651 TFM_PERIPHERAL_TIMER0,
661 #ifdef TFM_PARTITION_PROTECTED_STORAGE
665 #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
669 #ifdef TFM_PARTITION_AUDIT_LOG
670 platform_data_list_TFM_SP_AUDIT_LOG,
673 #ifdef TFM_PARTITION_CRYPTO
677 #ifdef TFM_PARTITION_PLATFORM
681 #ifdef TFM_PARTITION_INITIAL_ATTESTATION
685 #ifdef TFM_PARTITION_TEST_CORE
686 platform_data_list_TFM_SP_CORE_TEST,
689 #ifdef TFM_PARTITION_TEST_CORE
693 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
694 platform_data_list_TFM_SP_SECURE_TEST_PARTITION,
697 #ifdef TFM_PARTITION_TEST_CORE_IPC
701 #ifdef TFM_PARTITION_TEST_CORE_IPC
705 #ifdef TFM_ENABLE_IRQ_TEST
706 platform_data_list_TFM_IRQ_TEST_1,
709 #ifdef TFM_PARTITION_TEST_PS
713 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
730 #ifdef TFM_PARTITION_PROTECTED_STORAGE
735 .platform_data_list = NULL,
742 #ifdef TFM_PARTITION_INTERNAL_TRUSTED_STORAGE
747 .platform_data_list = NULL,
754 #ifdef TFM_PARTITION_AUDIT_LOG
759 .platform_data_list = NULL,
766 #ifdef TFM_PARTITION_CRYPTO
771 .platform_data_list = NULL,
778 #ifdef TFM_PARTITION_PLATFORM
783 .platform_data_list = NULL,
790 #ifdef TFM_PARTITION_INITIAL_ATTESTATION
795 .platform_data_list = NULL,
802 #ifdef TFM_PARTITION_TEST_CORE
807 .platform_data_list = NULL,
814 #ifdef TFM_PARTITION_TEST_CORE
819 .platform_data_list = NULL,
826 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
831 .platform_data_list = NULL,
838 #ifdef TFM_PARTITION_TEST_CORE_IPC
843 .platform_data_list = NULL,
850 #ifdef TFM_PARTITION_TEST_CORE_IPC
855 .platform_data_list = NULL,
862 #ifdef TFM_ENABLE_IRQ_TEST
867 .platform_data_list = NULL,
874 #ifdef TFM_PARTITION_TEST_PS
879 .platform_data_list = NULL,
886 #ifdef TFM_PARTITION_TEST_SECURE_SERVICES
891 .platform_data_list = NULL,
899 .partition_count =
sizeof(partition_list) /
sizeof(partition_list[0]),
900 .running_partition_idx = 0,
901 .partitions = partition_list,
#define TFM_PRIORITY(LEVEL)
int32_t tfm_secure_client_service_init(void)
Service initialisation function. No special initialisation is required.
psa_status_t tfm_crypto_init(void)
Initialise the service.
#define SPM_CORE_TEST_2_INVERT_SID
#define TFM_PS_REMOVE_SID
#define TFM_SP_PLATFORM_IOCTL_SID
#define IPC_SERVICE_TEST_PSA_ACCESS_APP_READ_ONLY_MEM_SID
#define TFM_SP_SECURE_CLIENT_2
const struct tfm_spm_partition_platform_data_t ** platform_data_list_list[]
#define TFM_ITS_REMOVE_SID
psa_status_t tfm_ps_req_mngr_init(void)
int32_t tfm_irq_test_1_init(void)
struct spm_partition_runtime_data_t runtime_data
#define IPC_SERVICE_TEST_APP_ACCESS_PSA_MEM_SID
#define TFM_PS_GET_SUPPORT_SID
psa_status_t tfm_ps_test_init(void)
#define TFM_SP_INITIAL_ATTESTATION
#define TFM_SP_CORE_TEST_2
#define IPC_SERVICE_TEST_PSA_ACCESS_APP_MEM_SID
#define TFM_ATTEST_GET_TOKEN_SIZE_SID
const struct spm_partition_static_data_t static_data_list[]
#define TFM_SP_IPC_SERVICE_TEST
#define TFM_ITS_GET_INFO_SID
psa_status_t tfm_its_req_mngr_init(void)
psa_status_t attest_partition_init(void)
psa_status_t core_test_init(void)
#define SPM_PART_FLAG_PSA_ROT
void ipc_service_test_main(void *param)
#define SPM_PART_FLAG_APP_ROT
#define TFM_SP_IPC_CLIENT_TEST
struct spm_partition_db_t g_spm_partition_db
#define TFM_SECURE_CLIENT_2_SID
#define SPM_CORE_TEST_2_SLAVE_SERVICE_SID
psa_status_t tfm_secure_client_2_init(void)
#define SPM_CORE_TEST_2_GET_EVERY_SECOND_BYTE_SID
#define TFM_PS_GET_INFO_SID
psa_status_t audit_core_init(void)
Initializes the Audit logging service during the TFM boot up process.
#define TFM_SP_SECURE_TEST_PARTITION
#define IPC_SERVICE_TEST_BASIC_SID
#define TFM_PS_TEST_PREPARE_SID
#define SPM_PART_FLAG_IPC
#define TFM_SP_NON_SECURE_ID
#define TFM_ATTEST_GET_PUBLIC_KEY_SID
#define TFM_ATTEST_GET_TOKEN_SID
#define TFM_SP_PLATFORM_SYSTEM_RESET_SID
psa_status_t core_test_2_init(void)
uint32_t * ctx_stack_list[]
#define TFM_SP_PLATFORM_NV_COUNTER_SID
void ipc_client_test_main(void)