diff --git a/TESTS/psa/crypto_init/COMPONENT_SPE/psa_setup.c b/TESTS/psa/crypto_init/COMPONENT_SPE/psa_setup.c new file mode 100644 index 0000000000..e2fac75855 --- /dev/null +++ b/TESTS/psa/crypto_init/COMPONENT_SPE/psa_setup.c @@ -0,0 +1,83 @@ +/* Copyright (c) 2017-2018 ARM Limited + * + * SPDX-License-Identifier: Apache-2.0 + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*********************************************************************************************************************** + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * THIS FILE IS AN AUTO-GENERATED FILE - DO NOT MODIFY IT. + * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * Template Version 1.0 + * Generated by tools/spm/generate_partition_code.py Version 1.0 + **********************************************************************************************************************/ + +#include "spm_panic.h" +#include "spm_internal.h" +#include "handles_manager.h" +#include "cmsis.h" +#include "psa_psa_f_partition.h" +#include "psa_its_partition.h" + +extern const uint32_t psa_f_external_sids[4]; + +spm_partition_t g_partitions[2] = { + { + .partition_id = PSA_F_ID, + .thread_id = 0, + .flags_rot_srv = PSA_F_WAIT_ANY_SID_MSK, + .flags_interrupts = 0, + .rot_services = NULL, + .rot_services_count = PSA_F_ROT_SRV_COUNT, + .extern_sids = psa_f_external_sids, + .extern_sids_count = PSA_F_EXT_ROT_SRV_COUNT, + .irq_mapper = NULL, + }, + { + .partition_id = ITS_ID, + .thread_id = 0, + .flags_rot_srv = ITS_WAIT_ANY_SID_MSK, + .flags_interrupts = 0, + .rot_services = NULL, + .rot_services_count = ITS_ROT_SRV_COUNT, + .extern_sids = NULL, + .extern_sids_count = ITS_EXT_ROT_SRV_COUNT, + .irq_mapper = NULL, + }, +}; + +/* Check all the defined memory regions for overlapping. */ + +/* A list of all the memory regions. */ +const mem_region_t *mem_regions = NULL; + +const uint32_t mem_region_count = 0; + +// forward declaration of partition initializers +void psa_f_init(spm_partition_t *partition); +void its_init(spm_partition_t *partition); + +uint32_t init_partitions(spm_partition_t **partitions) +{ + if (NULL == partitions) { + SPM_PANIC("partitions is NULL!\n"); + } + + psa_f_init(&(g_partitions[0])); + its_init(&(g_partitions[1])); + + *partitions = g_partitions; + return 2; +} + diff --git a/TESTS/psa/entropy_inject/COMPONENT_SPE/psa_setup.c b/TESTS/psa/entropy_inject/COMPONENT_SPE/psa_setup.c index 71e2dc6f6c..a7d8c6722d 100644 --- a/TESTS/psa/entropy_inject/COMPONENT_SPE/psa_setup.c +++ b/TESTS/psa/entropy_inject/COMPONENT_SPE/psa_setup.c @@ -19,6 +19,8 @@ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * THIS FILE IS AN AUTO-GENERATED FILE - DO NOT MODIFY IT. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * Template Version 1.0 + * Generated by tools/spm/generate_partition_code.py Version 1.0 **********************************************************************************************************************/ #include "spm_panic.h" diff --git a/TESTS/psa/entropy_inject/its_reset/COMPONENT_SPE/psa_test_its_reset_partition.c b/TESTS/psa/entropy_inject/its_reset/COMPONENT_SPE/psa_test_its_reset_partition.c index 7f340853dd..88b3fc9307 100644 --- a/TESTS/psa/entropy_inject/its_reset/COMPONENT_SPE/psa_test_its_reset_partition.c +++ b/TESTS/psa/entropy_inject/its_reset/COMPONENT_SPE/psa_test_its_reset_partition.c @@ -19,6 +19,8 @@ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * THIS FILE IS AN AUTO-GENERATED FILE - DO NOT MODIFY IT. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * Template Version 1.0 + * Generated by tools/spm/generate_partition_code.py Version 1.0 **********************************************************************************************************************/ #include "cmsis.h" diff --git a/TESTS/psa/entropy_inject/its_reset/COMPONENT_SPE/psa_test_its_reset_partition.h b/TESTS/psa/entropy_inject/its_reset/COMPONENT_SPE/psa_test_its_reset_partition.h index 4e41e02655..58012ba0aa 100644 --- a/TESTS/psa/entropy_inject/its_reset/COMPONENT_SPE/psa_test_its_reset_partition.h +++ b/TESTS/psa/entropy_inject/its_reset/COMPONENT_SPE/psa_test_its_reset_partition.h @@ -19,6 +19,8 @@ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * THIS FILE IS AN AUTO-GENERATED FILE - DO NOT MODIFY IT. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * Template Version 1.0 + * Generated by tools/spm/generate_partition_code.py Version 1.0 **********************************************************************************************************************/ #ifndef PSA_TEST_ITS_RESET_PARTITION_H @@ -44,11 +46,5 @@ #define TEST_ITS_RESET_WAIT_ANY_SID_MSK (\ TEST_PSA_ITS_RESET_MSK) -/* -#define TEST_ITS_RESET_WAIT_ANY_MSK (\ - TEST_ITS_RESET_WAIT_ANY_SID_MSK) | \ - PSA_DOORBELL) -*/ - #endif // PSA_TEST_ITS_RESET_PARTITION_H diff --git a/TESTS/psa/entropy_inject/its_reset/psa_test_its_reset_ifs.h b/TESTS/psa/entropy_inject/its_reset/psa_test_its_reset_ifs.h index 4dccfa0284..e61ae5e349 100644 --- a/TESTS/psa/entropy_inject/its_reset/psa_test_its_reset_ifs.h +++ b/TESTS/psa/entropy_inject/its_reset/psa_test_its_reset_ifs.h @@ -19,6 +19,8 @@ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * THIS FILE IS AN AUTO-GENERATED FILE - DO NOT MODIFY IT. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * Template Version 1.0 + * Generated by tools/spm/generate_partition_code.py Version 1.0 **********************************************************************************************************************/ #ifndef PSA_TEST_ITS_RESET_PARTITION_ROT_SERVICES_H diff --git a/components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_psa_f_partition.c b/components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_psa_f_partition.c index 8a86d8cea0..534a49674a 100644 --- a/components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_psa_f_partition.c +++ b/components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_psa_f_partition.c @@ -19,6 +19,8 @@ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * THIS FILE IS AN AUTO-GENERATED FILE - DO NOT MODIFY IT. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * Template Version 1.0 + * Generated by tools/spm/generate_partition_code.py Version 1.0 **********************************************************************************************************************/ #include "cmsis.h" diff --git a/components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_psa_f_partition.h b/components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_psa_f_partition.h index 5eed0e4b20..b2d756e199 100644 --- a/components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_psa_f_partition.h +++ b/components/TARGET_PSA/services/crypto/COMPONENT_SPE/psa_psa_f_partition.h @@ -19,6 +19,8 @@ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * THIS FILE IS AN AUTO-GENERATED FILE - DO NOT MODIFY IT. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * Template Version 1.0 + * Generated by tools/spm/generate_partition_code.py Version 1.0 **********************************************************************************************************************/ #ifndef PSA_PSA_F_PARTITION_H @@ -74,11 +76,5 @@ PSA_GENERATOR | \ PSA_ENTROPY_INJECT) -/* -#define PSA_F_WAIT_ANY_MSK (\ - PSA_F_WAIT_ANY_SID_MSK) | \ - PSA_DOORBELL) -*/ - #endif // PSA_PSA_F_PARTITION_H diff --git a/components/TARGET_PSA/services/crypto/psa_psa_f_ifs.h b/components/TARGET_PSA/services/crypto/psa_psa_f_ifs.h index 36919c3687..c0e29c6424 100644 --- a/components/TARGET_PSA/services/crypto/psa_psa_f_ifs.h +++ b/components/TARGET_PSA/services/crypto/psa_psa_f_ifs.h @@ -19,6 +19,8 @@ * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! * THIS FILE IS AN AUTO-GENERATED FILE - DO NOT MODIFY IT. * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + * Template Version 1.0 + * Generated by tools/spm/generate_partition_code.py Version 1.0 **********************************************************************************************************************/ #ifndef PSA_PSA_F_PARTITION_ROT_SERVICES_H