mirror of https://github.com/ARMmbed/mbed-os.git
Delete autogenerated files
parent
ba429a88b5
commit
ab01bea46d
|
@ -1,75 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_CRYPTO_ACL_TEST_PARTITION_H
|
||||
#define PSA_CRYPTO_ACL_TEST_PARTITION_H
|
||||
|
||||
#define CRYPTO_ACL_TEST_ID 128
|
||||
|
||||
#define CRYPTO_ACL_TEST_ROT_SRV_COUNT (9UL)
|
||||
#define CRYPTO_ACL_TEST_EXT_ROT_SRV_COUNT (1UL)
|
||||
|
||||
/* CRYPTO_ACL_TEST event flags */
|
||||
#define CRYPTO_ACL_TEST_RESERVED1_POS (1UL)
|
||||
#define CRYPTO_ACL_TEST_RESERVED1_MSK (1UL << CRYPTO_ACL_TEST_RESERVED1_POS)
|
||||
|
||||
#define CRYPTO_ACL_TEST_RESERVED2_POS (2UL)
|
||||
#define CRYPTO_ACL_TEST_RESERVED2_MSK (1UL << CRYPTO_ACL_TEST_RESERVED2_POS)
|
||||
|
||||
|
||||
#define CRYPTO_ACL_TEST_WAIT_ANY_IRQ_MSK (0)
|
||||
|
||||
#define CRYPTO_CREATE_PERSISTENT_KEY_MSK_POS (4UL)
|
||||
#define CRYPTO_CREATE_PERSISTENT_KEY_MSK (1UL << CRYPTO_CREATE_PERSISTENT_KEY_MSK_POS)
|
||||
#define CRYPTO_GENERATE_KEY_MSK_POS (5UL)
|
||||
#define CRYPTO_GENERATE_KEY_MSK (1UL << CRYPTO_GENERATE_KEY_MSK_POS)
|
||||
#define CRYPTO_OPEN_PERSISTENT_KEY_MSK_POS (6UL)
|
||||
#define CRYPTO_OPEN_PERSISTENT_KEY_MSK (1UL << CRYPTO_OPEN_PERSISTENT_KEY_MSK_POS)
|
||||
#define CRYPTO_CLOSE_KEY_MSK_POS (7UL)
|
||||
#define CRYPTO_CLOSE_KEY_MSK (1UL << CRYPTO_CLOSE_KEY_MSK_POS)
|
||||
#define CRYPTO_SET_KEY_POLICY_MSK_POS (8UL)
|
||||
#define CRYPTO_SET_KEY_POLICY_MSK (1UL << CRYPTO_SET_KEY_POLICY_MSK_POS)
|
||||
#define CRYPTO_DESTROY_KEY_MSK_POS (9UL)
|
||||
#define CRYPTO_DESTROY_KEY_MSK (1UL << CRYPTO_DESTROY_KEY_MSK_POS)
|
||||
#define CRYPTO_GET_KEY_INFO_MSK_POS (10UL)
|
||||
#define CRYPTO_GET_KEY_INFO_MSK (1UL << CRYPTO_GET_KEY_INFO_MSK_POS)
|
||||
#define CRYPTO_GET_KEY_POLICY_MSK_POS (11UL)
|
||||
#define CRYPTO_GET_KEY_POLICY_MSK (1UL << CRYPTO_GET_KEY_POLICY_MSK_POS)
|
||||
#define CRYPTO_IMPORT_KEY_MSK_POS (12UL)
|
||||
#define CRYPTO_IMPORT_KEY_MSK (1UL << CRYPTO_IMPORT_KEY_MSK_POS)
|
||||
|
||||
#define CRYPTO_ACL_TEST_WAIT_ANY_SID_MSK (\
|
||||
CRYPTO_CREATE_PERSISTENT_KEY_MSK | \
|
||||
CRYPTO_GENERATE_KEY_MSK | \
|
||||
CRYPTO_OPEN_PERSISTENT_KEY_MSK | \
|
||||
CRYPTO_CLOSE_KEY_MSK | \
|
||||
CRYPTO_SET_KEY_POLICY_MSK | \
|
||||
CRYPTO_DESTROY_KEY_MSK | \
|
||||
CRYPTO_GET_KEY_INFO_MSK | \
|
||||
CRYPTO_GET_KEY_POLICY_MSK | \
|
||||
CRYPTO_IMPORT_KEY_MSK)
|
||||
|
||||
|
||||
#endif // PSA_CRYPTO_ACL_TEST_PARTITION_H
|
|
@ -1,202 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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 "cmsis.h"
|
||||
#include "mbed_toolchain.h" /* For using MBED_ALIGN macro */
|
||||
#include "rtx_os.h"
|
||||
#include "spm_panic.h"
|
||||
#include "spm_internal.h"
|
||||
#include "psa_crypto_acl_test_partition.h"
|
||||
#include "psa_manifest/sid.h"
|
||||
|
||||
|
||||
/* Threads stacks */
|
||||
MBED_ALIGN(8) uint8_t crypto_acl_test_thread_stack[512] = {0};
|
||||
|
||||
/* Threads control blocks */
|
||||
osRtxThread_t crypto_acl_test_thread_cb = {0};
|
||||
|
||||
/* Thread attributes - for thread initialization */
|
||||
osThreadAttr_t crypto_acl_test_thread_attr = {
|
||||
.name = "crypto_acl_test",
|
||||
.attr_bits = 0,
|
||||
.cb_mem = &crypto_acl_test_thread_cb,
|
||||
.cb_size = sizeof(crypto_acl_test_thread_cb),
|
||||
.stack_mem = crypto_acl_test_thread_stack,
|
||||
.stack_size = 512,
|
||||
.priority = osPriorityNormal,
|
||||
.tz_module = 0,
|
||||
.reserved = 0
|
||||
};
|
||||
|
||||
spm_rot_service_t crypto_acl_test_rot_services[CRYPTO_ACL_TEST_ROT_SRV_COUNT] = {
|
||||
{
|
||||
.sid = CRYPTO_CREATE_PERSISTENT_KEY,
|
||||
.mask = CRYPTO_CREATE_PERSISTENT_KEY_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = CRYPTO_GENERATE_KEY,
|
||||
.mask = CRYPTO_GENERATE_KEY_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = CRYPTO_OPEN_PERSISTENT_KEY,
|
||||
.mask = CRYPTO_OPEN_PERSISTENT_KEY_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = CRYPTO_CLOSE_KEY,
|
||||
.mask = CRYPTO_CLOSE_KEY_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = CRYPTO_SET_KEY_POLICY,
|
||||
.mask = CRYPTO_SET_KEY_POLICY_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = CRYPTO_DESTROY_KEY,
|
||||
.mask = CRYPTO_DESTROY_KEY_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = CRYPTO_GET_KEY_INFO,
|
||||
.mask = CRYPTO_GET_KEY_INFO_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = CRYPTO_GET_KEY_POLICY,
|
||||
.mask = CRYPTO_GET_KEY_POLICY_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = CRYPTO_IMPORT_KEY,
|
||||
.mask = CRYPTO_IMPORT_KEY_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/* External SIDs used by CRYPTO_ACL_TEST */
|
||||
const uint32_t crypto_acl_test_external_sids[1] = {
|
||||
PSA_KEY_MNG_ID,
|
||||
};
|
||||
|
||||
static osRtxMutex_t crypto_acl_test_mutex = {0};
|
||||
static const osMutexAttr_t crypto_acl_test_mutex_attr = {
|
||||
.name = "crypto_acl_test_mutex",
|
||||
.attr_bits = osMutexRecursive | osMutexPrioInherit | osMutexRobust,
|
||||
.cb_mem = &crypto_acl_test_mutex,
|
||||
.cb_size = sizeof(crypto_acl_test_mutex),
|
||||
};
|
||||
|
||||
|
||||
extern void test_partition_main(void *ptr);
|
||||
|
||||
void crypto_acl_test_init(spm_partition_t *partition)
|
||||
{
|
||||
if (NULL == partition) {
|
||||
SPM_PANIC("partition is NULL!\n");
|
||||
}
|
||||
|
||||
partition->mutex = osMutexNew(&crypto_acl_test_mutex_attr);
|
||||
if (NULL == partition->mutex) {
|
||||
SPM_PANIC("Failed to create mutex for secure partition crypto_acl_test!\n");
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < CRYPTO_ACL_TEST_ROT_SRV_COUNT; ++i) {
|
||||
crypto_acl_test_rot_services[i].partition = partition;
|
||||
}
|
||||
partition->rot_services = crypto_acl_test_rot_services;
|
||||
|
||||
partition->thread_id = osThreadNew(test_partition_main, NULL, &crypto_acl_test_thread_attr);
|
||||
if (NULL == partition->thread_id) {
|
||||
SPM_PANIC("Failed to create start main thread of partition crypto_acl_test!\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,123 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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_attest_srv_partition.h"
|
||||
#include "psa_crypto_srv_partition.h"
|
||||
#include "psa_platform_partition.h"
|
||||
#include "psa_its_partition.h"
|
||||
#include "psa_crypto_acl_test_partition.h"
|
||||
|
||||
extern const uint32_t attest_srv_external_sids[7];
|
||||
extern const uint32_t crypto_srv_external_sids[4];
|
||||
extern const uint32_t platform_external_sids[1];
|
||||
extern const uint32_t crypto_acl_test_external_sids[1];
|
||||
|
||||
spm_partition_t g_partitions[5] = {
|
||||
{
|
||||
.partition_id = ATTEST_SRV_ID,
|
||||
.thread_id = 0,
|
||||
.flags = ATTEST_SRV_WAIT_ANY_SID_MSK | ATTEST_SRV_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = ATTEST_SRV_ROT_SRV_COUNT,
|
||||
.extern_sids = attest_srv_external_sids,
|
||||
.extern_sids_count = ATTEST_SRV_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = CRYPTO_SRV_ID,
|
||||
.thread_id = 0,
|
||||
.flags = CRYPTO_SRV_WAIT_ANY_SID_MSK | CRYPTO_SRV_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = CRYPTO_SRV_ROT_SRV_COUNT,
|
||||
.extern_sids = crypto_srv_external_sids,
|
||||
.extern_sids_count = CRYPTO_SRV_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = PLATFORM_ID,
|
||||
.thread_id = 0,
|
||||
.flags = PLATFORM_WAIT_ANY_SID_MSK | PLATFORM_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = PLATFORM_ROT_SRV_COUNT,
|
||||
.extern_sids = platform_external_sids,
|
||||
.extern_sids_count = PLATFORM_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = ITS_ID,
|
||||
.thread_id = 0,
|
||||
.flags = ITS_WAIT_ANY_SID_MSK | ITS_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = ITS_ROT_SRV_COUNT,
|
||||
.extern_sids = NULL,
|
||||
.extern_sids_count = ITS_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = CRYPTO_ACL_TEST_ID,
|
||||
.thread_id = 0,
|
||||
.flags = CRYPTO_ACL_TEST_WAIT_ANY_SID_MSK | CRYPTO_ACL_TEST_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = CRYPTO_ACL_TEST_ROT_SRV_COUNT,
|
||||
.extern_sids = crypto_acl_test_external_sids,
|
||||
.extern_sids_count = CRYPTO_ACL_TEST_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 attest_srv_init(spm_partition_t *partition);
|
||||
void crypto_srv_init(spm_partition_t *partition);
|
||||
void platform_init(spm_partition_t *partition);
|
||||
void its_init(spm_partition_t *partition);
|
||||
void crypto_acl_test_init(spm_partition_t *partition);
|
||||
|
||||
uint32_t init_partitions(spm_partition_t **partitions)
|
||||
{
|
||||
if (NULL == partitions) {
|
||||
SPM_PANIC("partitions is NULL!\n");
|
||||
}
|
||||
|
||||
attest_srv_init(&(g_partitions[0]));
|
||||
crypto_srv_init(&(g_partitions[1]));
|
||||
platform_init(&(g_partitions[2]));
|
||||
its_init(&(g_partitions[3]));
|
||||
crypto_acl_test_init(&(g_partitions[4]));
|
||||
|
||||
*partitions = g_partitions;
|
||||
return 5;
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_CRYPTO_ACL_TEST_PARTITION_ROT_SERVICES_H
|
||||
#define PSA_CRYPTO_ACL_TEST_PARTITION_ROT_SERVICES_H
|
||||
|
||||
#define CRYPTO_CREATE_PERSISTENT_KEY 0x00000200
|
||||
#define CRYPTO_GENERATE_KEY 0x00000201
|
||||
#define CRYPTO_OPEN_PERSISTENT_KEY 0x00000202
|
||||
#define CRYPTO_CLOSE_KEY 0x00000203
|
||||
#define CRYPTO_SET_KEY_POLICY 0x00000204
|
||||
#define CRYPTO_DESTROY_KEY 0x00000205
|
||||
#define CRYPTO_GET_KEY_INFO 0x00000206
|
||||
#define CRYPTO_GET_KEY_POLICY 0x00000207
|
||||
#define CRYPTO_IMPORT_KEY 0x00000208
|
||||
|
||||
#endif // PSA_CRYPTO_ACL_TEST_PARTITION_ROT_SERVICES_H
|
|
@ -1,57 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_CLIENT_TESTS_PART1_PARTITION_H
|
||||
#define PSA_CLIENT_TESTS_PART1_PARTITION_H
|
||||
|
||||
#define CLIENT_TESTS_PART1_ID 1
|
||||
|
||||
#define CLIENT_TESTS_PART1_ROT_SRV_COUNT (3UL)
|
||||
#define CLIENT_TESTS_PART1_EXT_ROT_SRV_COUNT (0UL)
|
||||
|
||||
/* CLIENT_TESTS_PART1 event flags */
|
||||
#define CLIENT_TESTS_PART1_RESERVED1_POS (1UL)
|
||||
#define CLIENT_TESTS_PART1_RESERVED1_MSK (1UL << CLIENT_TESTS_PART1_RESERVED1_POS)
|
||||
|
||||
#define CLIENT_TESTS_PART1_RESERVED2_POS (2UL)
|
||||
#define CLIENT_TESTS_PART1_RESERVED2_MSK (1UL << CLIENT_TESTS_PART1_RESERVED2_POS)
|
||||
|
||||
|
||||
#define CLIENT_TESTS_PART1_WAIT_ANY_IRQ_MSK (0)
|
||||
|
||||
#define PART1_ROT_SRV1_MSK_POS (4UL)
|
||||
#define PART1_ROT_SRV1_MSK (1UL << PART1_ROT_SRV1_MSK_POS)
|
||||
#define DROP_CONN_MSK_POS (5UL)
|
||||
#define DROP_CONN_MSK (1UL << DROP_CONN_MSK_POS)
|
||||
#define SECURE_CLIENTS_ONLY_MSK_POS (6UL)
|
||||
#define SECURE_CLIENTS_ONLY_MSK (1UL << SECURE_CLIENTS_ONLY_MSK_POS)
|
||||
|
||||
#define CLIENT_TESTS_PART1_WAIT_ANY_SID_MSK (\
|
||||
PART1_ROT_SRV1_MSK | \
|
||||
DROP_CONN_MSK | \
|
||||
SECURE_CLIENTS_ONLY_MSK)
|
||||
|
||||
|
||||
#endif // PSA_CLIENT_TESTS_PART1_PARTITION_H
|
|
@ -1,126 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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 "cmsis.h"
|
||||
#include "mbed_toolchain.h" /* For using MBED_ALIGN macro */
|
||||
#include "rtx_os.h"
|
||||
#include "spm_panic.h"
|
||||
#include "spm_internal.h"
|
||||
#include "psa_client_tests_part1_partition.h"
|
||||
#include "psa_manifest/sid.h"
|
||||
|
||||
|
||||
/* Threads stacks */
|
||||
MBED_ALIGN(8) uint8_t client_tests_part1_thread_stack[1024] = {0};
|
||||
|
||||
/* Threads control blocks */
|
||||
osRtxThread_t client_tests_part1_thread_cb = {0};
|
||||
|
||||
/* Thread attributes - for thread initialization */
|
||||
osThreadAttr_t client_tests_part1_thread_attr = {
|
||||
.name = "client_tests_part1",
|
||||
.attr_bits = 0,
|
||||
.cb_mem = &client_tests_part1_thread_cb,
|
||||
.cb_size = sizeof(client_tests_part1_thread_cb),
|
||||
.stack_mem = client_tests_part1_thread_stack,
|
||||
.stack_size = 1024,
|
||||
.priority = osPriorityNormal,
|
||||
.tz_module = 0,
|
||||
.reserved = 0
|
||||
};
|
||||
|
||||
spm_rot_service_t client_tests_part1_rot_services[CLIENT_TESTS_PART1_ROT_SRV_COUNT] = {
|
||||
{
|
||||
.sid = CLIENT_TESTS_PART1_ROT_SRV1,
|
||||
.mask = PART1_ROT_SRV1_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 5,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = CLIENT_TESTS_PART1_DROP_CONN,
|
||||
.mask = DROP_CONN_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 5,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = CLIENT_TESTS_PART1_SECURE_CLIENTS_ONLY,
|
||||
.mask = SECURE_CLIENTS_ONLY_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 5,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = false,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
static osRtxMutex_t client_tests_part1_mutex = {0};
|
||||
static const osMutexAttr_t client_tests_part1_mutex_attr = {
|
||||
.name = "client_tests_part1_mutex",
|
||||
.attr_bits = osMutexRecursive | osMutexPrioInherit | osMutexRobust,
|
||||
.cb_mem = &client_tests_part1_mutex,
|
||||
.cb_size = sizeof(client_tests_part1_mutex),
|
||||
};
|
||||
|
||||
|
||||
extern void client_part_main(void *ptr);
|
||||
|
||||
void client_tests_part1_init(spm_partition_t *partition)
|
||||
{
|
||||
if (NULL == partition) {
|
||||
SPM_PANIC("partition is NULL!\n");
|
||||
}
|
||||
|
||||
partition->mutex = osMutexNew(&client_tests_part1_mutex_attr);
|
||||
if (NULL == partition->mutex) {
|
||||
SPM_PANIC("Failed to create mutex for secure partition client_tests_part1!\n");
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < CLIENT_TESTS_PART1_ROT_SRV_COUNT; ++i) {
|
||||
client_tests_part1_rot_services[i].partition = partition;
|
||||
}
|
||||
partition->rot_services = client_tests_part1_rot_services;
|
||||
|
||||
partition->thread_id = osThreadNew(client_part_main, NULL, &client_tests_part1_thread_attr);
|
||||
if (NULL == partition->thread_id) {
|
||||
SPM_PANIC("Failed to create start main thread of partition client_tests_part1!\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,122 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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_attest_srv_partition.h"
|
||||
#include "psa_crypto_srv_partition.h"
|
||||
#include "psa_platform_partition.h"
|
||||
#include "psa_its_partition.h"
|
||||
#include "psa_client_tests_part1_partition.h"
|
||||
|
||||
extern const uint32_t attest_srv_external_sids[7];
|
||||
extern const uint32_t crypto_srv_external_sids[4];
|
||||
extern const uint32_t platform_external_sids[1];
|
||||
|
||||
spm_partition_t g_partitions[5] = {
|
||||
{
|
||||
.partition_id = ATTEST_SRV_ID,
|
||||
.thread_id = 0,
|
||||
.flags = ATTEST_SRV_WAIT_ANY_SID_MSK | ATTEST_SRV_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = ATTEST_SRV_ROT_SRV_COUNT,
|
||||
.extern_sids = attest_srv_external_sids,
|
||||
.extern_sids_count = ATTEST_SRV_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = CRYPTO_SRV_ID,
|
||||
.thread_id = 0,
|
||||
.flags = CRYPTO_SRV_WAIT_ANY_SID_MSK | CRYPTO_SRV_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = CRYPTO_SRV_ROT_SRV_COUNT,
|
||||
.extern_sids = crypto_srv_external_sids,
|
||||
.extern_sids_count = CRYPTO_SRV_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = PLATFORM_ID,
|
||||
.thread_id = 0,
|
||||
.flags = PLATFORM_WAIT_ANY_SID_MSK | PLATFORM_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = PLATFORM_ROT_SRV_COUNT,
|
||||
.extern_sids = platform_external_sids,
|
||||
.extern_sids_count = PLATFORM_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = ITS_ID,
|
||||
.thread_id = 0,
|
||||
.flags = ITS_WAIT_ANY_SID_MSK | ITS_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = ITS_ROT_SRV_COUNT,
|
||||
.extern_sids = NULL,
|
||||
.extern_sids_count = ITS_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = CLIENT_TESTS_PART1_ID,
|
||||
.thread_id = 0,
|
||||
.flags = CLIENT_TESTS_PART1_WAIT_ANY_SID_MSK | CLIENT_TESTS_PART1_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = CLIENT_TESTS_PART1_ROT_SRV_COUNT,
|
||||
.extern_sids = NULL,
|
||||
.extern_sids_count = CLIENT_TESTS_PART1_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 attest_srv_init(spm_partition_t *partition);
|
||||
void crypto_srv_init(spm_partition_t *partition);
|
||||
void platform_init(spm_partition_t *partition);
|
||||
void its_init(spm_partition_t *partition);
|
||||
void client_tests_part1_init(spm_partition_t *partition);
|
||||
|
||||
uint32_t init_partitions(spm_partition_t **partitions)
|
||||
{
|
||||
if (NULL == partitions) {
|
||||
SPM_PANIC("partitions is NULL!\n");
|
||||
}
|
||||
|
||||
attest_srv_init(&(g_partitions[0]));
|
||||
crypto_srv_init(&(g_partitions[1]));
|
||||
platform_init(&(g_partitions[2]));
|
||||
its_init(&(g_partitions[3]));
|
||||
client_tests_part1_init(&(g_partitions[4]));
|
||||
|
||||
*partitions = g_partitions;
|
||||
return 5;
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_CLIENT_TESTS_PART1_PARTITION_ROT_SERVICES_H
|
||||
#define PSA_CLIENT_TESTS_PART1_PARTITION_ROT_SERVICES_H
|
||||
|
||||
#define CLIENT_TESTS_PART1_ROT_SRV1 0x00001A05
|
||||
#define CLIENT_TESTS_PART1_DROP_CONN 0x00001A06
|
||||
#define CLIENT_TESTS_PART1_SECURE_CLIENTS_ONLY 0x00001A07
|
||||
|
||||
#endif // PSA_CLIENT_TESTS_PART1_PARTITION_ROT_SERVICES_H
|
|
@ -1,54 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_SERVER_TESTS_PART1_PARTITION_H
|
||||
#define PSA_SERVER_TESTS_PART1_PARTITION_H
|
||||
|
||||
#define SERVER_TESTS_PART1_ID 2
|
||||
|
||||
#define SERVER_TESTS_PART1_ROT_SRV_COUNT (2UL)
|
||||
#define SERVER_TESTS_PART1_EXT_ROT_SRV_COUNT (2UL)
|
||||
|
||||
/* SERVER_TESTS_PART1 event flags */
|
||||
#define SERVER_TESTS_PART1_RESERVED1_POS (1UL)
|
||||
#define SERVER_TESTS_PART1_RESERVED1_MSK (1UL << SERVER_TESTS_PART1_RESERVED1_POS)
|
||||
|
||||
#define SERVER_TESTS_PART1_RESERVED2_POS (2UL)
|
||||
#define SERVER_TESTS_PART1_RESERVED2_MSK (1UL << SERVER_TESTS_PART1_RESERVED2_POS)
|
||||
|
||||
|
||||
#define SERVER_TESTS_PART1_WAIT_ANY_IRQ_MSK (0)
|
||||
|
||||
#define CONTROL_MSK_POS (4UL)
|
||||
#define CONTROL_MSK (1UL << CONTROL_MSK_POS)
|
||||
#define TEST_MSK_POS (5UL)
|
||||
#define TEST_MSK (1UL << TEST_MSK_POS)
|
||||
|
||||
#define SERVER_TESTS_PART1_WAIT_ANY_SID_MSK (\
|
||||
CONTROL_MSK | \
|
||||
TEST_MSK)
|
||||
|
||||
|
||||
#endif // PSA_SERVER_TESTS_PART1_PARTITION_H
|
|
@ -1,54 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_SERVER_TESTS_PART2_PARTITION_H
|
||||
#define PSA_SERVER_TESTS_PART2_PARTITION_H
|
||||
|
||||
#define SERVER_TESTS_PART2_ID 3
|
||||
|
||||
#define SERVER_TESTS_PART2_ROT_SRV_COUNT (2UL)
|
||||
#define SERVER_TESTS_PART2_EXT_ROT_SRV_COUNT (0UL)
|
||||
|
||||
/* SERVER_TESTS_PART2 event flags */
|
||||
#define SERVER_TESTS_PART2_RESERVED1_POS (1UL)
|
||||
#define SERVER_TESTS_PART2_RESERVED1_MSK (1UL << SERVER_TESTS_PART2_RESERVED1_POS)
|
||||
|
||||
#define SERVER_TESTS_PART2_RESERVED2_POS (2UL)
|
||||
#define SERVER_TESTS_PART2_RESERVED2_MSK (1UL << SERVER_TESTS_PART2_RESERVED2_POS)
|
||||
|
||||
|
||||
#define SERVER_TESTS_PART2_WAIT_ANY_IRQ_MSK (0)
|
||||
|
||||
#define ROT_SRV_REVERSE_MSK_POS (4UL)
|
||||
#define ROT_SRV_REVERSE_MSK (1UL << ROT_SRV_REVERSE_MSK_POS)
|
||||
#define ROT_SRV_DB_TST_MSK_POS (5UL)
|
||||
#define ROT_SRV_DB_TST_MSK (1UL << ROT_SRV_DB_TST_MSK_POS)
|
||||
|
||||
#define SERVER_TESTS_PART2_WAIT_ANY_SID_MSK (\
|
||||
ROT_SRV_REVERSE_MSK | \
|
||||
ROT_SRV_DB_TST_MSK)
|
||||
|
||||
|
||||
#endif // PSA_SERVER_TESTS_PART2_PARTITION_H
|
|
@ -1,119 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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 "cmsis.h"
|
||||
#include "mbed_toolchain.h" /* For using MBED_ALIGN macro */
|
||||
#include "rtx_os.h"
|
||||
#include "spm_panic.h"
|
||||
#include "spm_internal.h"
|
||||
#include "psa_server_tests_part1_partition.h"
|
||||
#include "psa_manifest/sid.h"
|
||||
|
||||
|
||||
/* Threads stacks */
|
||||
MBED_ALIGN(8) uint8_t server_tests_part1_thread_stack[1024] = {0};
|
||||
|
||||
/* Threads control blocks */
|
||||
osRtxThread_t server_tests_part1_thread_cb = {0};
|
||||
|
||||
/* Thread attributes - for thread initialization */
|
||||
osThreadAttr_t server_tests_part1_thread_attr = {
|
||||
.name = "server_tests_part1",
|
||||
.attr_bits = 0,
|
||||
.cb_mem = &server_tests_part1_thread_cb,
|
||||
.cb_size = sizeof(server_tests_part1_thread_cb),
|
||||
.stack_mem = server_tests_part1_thread_stack,
|
||||
.stack_size = 1024,
|
||||
.priority = osPriorityNormal,
|
||||
.tz_module = 0,
|
||||
.reserved = 0
|
||||
};
|
||||
|
||||
spm_rot_service_t server_tests_part1_rot_services[SERVER_TESTS_PART1_ROT_SRV_COUNT] = {
|
||||
{
|
||||
.sid = SERVER_TESTS_PART1_CONTROL,
|
||||
.mask = CONTROL_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 5,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = SERVER_TESTS_PART1_TEST,
|
||||
.mask = TEST_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 12,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/* External SIDs used by SERVER_TESTS_PART1 */
|
||||
const uint32_t server_tests_part1_external_sids[2] = {
|
||||
SERVER_TESTS_PART2_ROT_SRV_REVERSE,
|
||||
SERVER_TESTS_PART2_ROT_SRV_DB_TST,
|
||||
};
|
||||
|
||||
static osRtxMutex_t server_tests_part1_mutex = {0};
|
||||
static const osMutexAttr_t server_tests_part1_mutex_attr = {
|
||||
.name = "server_tests_part1_mutex",
|
||||
.attr_bits = osMutexRecursive | osMutexPrioInherit | osMutexRobust,
|
||||
.cb_mem = &server_tests_part1_mutex,
|
||||
.cb_size = sizeof(server_tests_part1_mutex),
|
||||
};
|
||||
|
||||
|
||||
extern void server_part1_main(void *ptr);
|
||||
|
||||
void server_tests_part1_init(spm_partition_t *partition)
|
||||
{
|
||||
if (NULL == partition) {
|
||||
SPM_PANIC("partition is NULL!\n");
|
||||
}
|
||||
|
||||
partition->mutex = osMutexNew(&server_tests_part1_mutex_attr);
|
||||
if (NULL == partition->mutex) {
|
||||
SPM_PANIC("Failed to create mutex for secure partition server_tests_part1!\n");
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < SERVER_TESTS_PART1_ROT_SRV_COUNT; ++i) {
|
||||
server_tests_part1_rot_services[i].partition = partition;
|
||||
}
|
||||
partition->rot_services = server_tests_part1_rot_services;
|
||||
|
||||
partition->thread_id = osThreadNew(server_part1_main, NULL, &server_tests_part1_thread_attr);
|
||||
if (NULL == partition->thread_id) {
|
||||
SPM_PANIC("Failed to create start main thread of partition server_tests_part1!\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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 "cmsis.h"
|
||||
#include "mbed_toolchain.h" /* For using MBED_ALIGN macro */
|
||||
#include "rtx_os.h"
|
||||
#include "spm_panic.h"
|
||||
#include "spm_internal.h"
|
||||
#include "psa_server_tests_part2_partition.h"
|
||||
#include "psa_manifest/sid.h"
|
||||
|
||||
|
||||
/* Threads stacks */
|
||||
MBED_ALIGN(8) uint8_t server_tests_part2_thread_stack[1024] = {0};
|
||||
|
||||
/* Threads control blocks */
|
||||
osRtxThread_t server_tests_part2_thread_cb = {0};
|
||||
|
||||
/* Thread attributes - for thread initialization */
|
||||
osThreadAttr_t server_tests_part2_thread_attr = {
|
||||
.name = "server_tests_part2",
|
||||
.attr_bits = 0,
|
||||
.cb_mem = &server_tests_part2_thread_cb,
|
||||
.cb_size = sizeof(server_tests_part2_thread_cb),
|
||||
.stack_mem = server_tests_part2_thread_stack,
|
||||
.stack_size = 1024,
|
||||
.priority = osPriorityNormal,
|
||||
.tz_module = 0,
|
||||
.reserved = 0
|
||||
};
|
||||
|
||||
spm_rot_service_t server_tests_part2_rot_services[SERVER_TESTS_PART2_ROT_SRV_COUNT] = {
|
||||
{
|
||||
.sid = SERVER_TESTS_PART2_ROT_SRV_REVERSE,
|
||||
.mask = ROT_SRV_REVERSE_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 5,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = false,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = SERVER_TESTS_PART2_ROT_SRV_DB_TST,
|
||||
.mask = ROT_SRV_DB_TST_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 5,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = false,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
static osRtxMutex_t server_tests_part2_mutex = {0};
|
||||
static const osMutexAttr_t server_tests_part2_mutex_attr = {
|
||||
.name = "server_tests_part2_mutex",
|
||||
.attr_bits = osMutexRecursive | osMutexPrioInherit | osMutexRobust,
|
||||
.cb_mem = &server_tests_part2_mutex,
|
||||
.cb_size = sizeof(server_tests_part2_mutex),
|
||||
};
|
||||
|
||||
|
||||
extern void server_part2_main(void *ptr);
|
||||
|
||||
void server_tests_part2_init(spm_partition_t *partition)
|
||||
{
|
||||
if (NULL == partition) {
|
||||
SPM_PANIC("partition is NULL!\n");
|
||||
}
|
||||
|
||||
partition->mutex = osMutexNew(&server_tests_part2_mutex_attr);
|
||||
if (NULL == partition->mutex) {
|
||||
SPM_PANIC("Failed to create mutex for secure partition server_tests_part2!\n");
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < SERVER_TESTS_PART2_ROT_SRV_COUNT; ++i) {
|
||||
server_tests_part2_rot_services[i].partition = partition;
|
||||
}
|
||||
partition->rot_services = server_tests_part2_rot_services;
|
||||
|
||||
partition->thread_id = osThreadNew(server_part2_main, NULL, &server_tests_part2_thread_attr);
|
||||
if (NULL == partition->thread_id) {
|
||||
SPM_PANIC("Failed to create start main thread of partition server_tests_part2!\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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_attest_srv_partition.h"
|
||||
#include "psa_crypto_srv_partition.h"
|
||||
#include "psa_platform_partition.h"
|
||||
#include "psa_its_partition.h"
|
||||
#include "psa_server_tests_part1_partition.h"
|
||||
#include "psa_server_tests_part2_partition.h"
|
||||
|
||||
extern const uint32_t attest_srv_external_sids[7];
|
||||
extern const uint32_t crypto_srv_external_sids[4];
|
||||
extern const uint32_t platform_external_sids[1];
|
||||
extern const uint32_t server_tests_part1_external_sids[2];
|
||||
|
||||
spm_partition_t g_partitions[6] = {
|
||||
{
|
||||
.partition_id = ATTEST_SRV_ID,
|
||||
.thread_id = 0,
|
||||
.flags = ATTEST_SRV_WAIT_ANY_SID_MSK | ATTEST_SRV_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = ATTEST_SRV_ROT_SRV_COUNT,
|
||||
.extern_sids = attest_srv_external_sids,
|
||||
.extern_sids_count = ATTEST_SRV_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = CRYPTO_SRV_ID,
|
||||
.thread_id = 0,
|
||||
.flags = CRYPTO_SRV_WAIT_ANY_SID_MSK | CRYPTO_SRV_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = CRYPTO_SRV_ROT_SRV_COUNT,
|
||||
.extern_sids = crypto_srv_external_sids,
|
||||
.extern_sids_count = CRYPTO_SRV_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = PLATFORM_ID,
|
||||
.thread_id = 0,
|
||||
.flags = PLATFORM_WAIT_ANY_SID_MSK | PLATFORM_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = PLATFORM_ROT_SRV_COUNT,
|
||||
.extern_sids = platform_external_sids,
|
||||
.extern_sids_count = PLATFORM_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = ITS_ID,
|
||||
.thread_id = 0,
|
||||
.flags = ITS_WAIT_ANY_SID_MSK | ITS_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = ITS_ROT_SRV_COUNT,
|
||||
.extern_sids = NULL,
|
||||
.extern_sids_count = ITS_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = SERVER_TESTS_PART1_ID,
|
||||
.thread_id = 0,
|
||||
.flags = SERVER_TESTS_PART1_WAIT_ANY_SID_MSK | SERVER_TESTS_PART1_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = SERVER_TESTS_PART1_ROT_SRV_COUNT,
|
||||
.extern_sids = server_tests_part1_external_sids,
|
||||
.extern_sids_count = SERVER_TESTS_PART1_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = SERVER_TESTS_PART2_ID,
|
||||
.thread_id = 0,
|
||||
.flags = SERVER_TESTS_PART2_WAIT_ANY_SID_MSK | SERVER_TESTS_PART2_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = SERVER_TESTS_PART2_ROT_SRV_COUNT,
|
||||
.extern_sids = NULL,
|
||||
.extern_sids_count = SERVER_TESTS_PART2_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 attest_srv_init(spm_partition_t *partition);
|
||||
void crypto_srv_init(spm_partition_t *partition);
|
||||
void platform_init(spm_partition_t *partition);
|
||||
void its_init(spm_partition_t *partition);
|
||||
void server_tests_part1_init(spm_partition_t *partition);
|
||||
void server_tests_part2_init(spm_partition_t *partition);
|
||||
|
||||
uint32_t init_partitions(spm_partition_t **partitions)
|
||||
{
|
||||
if (NULL == partitions) {
|
||||
SPM_PANIC("partitions is NULL!\n");
|
||||
}
|
||||
|
||||
attest_srv_init(&(g_partitions[0]));
|
||||
crypto_srv_init(&(g_partitions[1]));
|
||||
platform_init(&(g_partitions[2]));
|
||||
its_init(&(g_partitions[3]));
|
||||
server_tests_part1_init(&(g_partitions[4]));
|
||||
server_tests_part2_init(&(g_partitions[5]));
|
||||
|
||||
*partitions = g_partitions;
|
||||
return 6;
|
||||
}
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_SERVER_TESTS_PART1_PARTITION_ROT_SERVICES_H
|
||||
#define PSA_SERVER_TESTS_PART1_PARTITION_ROT_SERVICES_H
|
||||
|
||||
#define SERVER_TESTS_PART1_CONTROL 0x00001A01
|
||||
#define SERVER_TESTS_PART1_TEST 0x00001A02
|
||||
|
||||
#endif // PSA_SERVER_TESTS_PART1_PARTITION_ROT_SERVICES_H
|
|
@ -1,32 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_SERVER_TESTS_PART2_PARTITION_ROT_SERVICES_H
|
||||
#define PSA_SERVER_TESTS_PART2_PARTITION_ROT_SERVICES_H
|
||||
|
||||
#define SERVER_TESTS_PART2_ROT_SRV_REVERSE 0x00001A03
|
||||
#define SERVER_TESTS_PART2_ROT_SRV_DB_TST 0x00001A04
|
||||
|
||||
#endif // PSA_SERVER_TESTS_PART2_PARTITION_ROT_SERVICES_H
|
|
@ -1,51 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_SMOKE_TESTS_PART1_PARTITION_H
|
||||
#define PSA_SMOKE_TESTS_PART1_PARTITION_H
|
||||
|
||||
#define SMOKE_TESTS_PART1_ID 4
|
||||
|
||||
#define SMOKE_TESTS_PART1_ROT_SRV_COUNT (1UL)
|
||||
#define SMOKE_TESTS_PART1_EXT_ROT_SRV_COUNT (0UL)
|
||||
|
||||
/* SMOKE_TESTS_PART1 event flags */
|
||||
#define SMOKE_TESTS_PART1_RESERVED1_POS (1UL)
|
||||
#define SMOKE_TESTS_PART1_RESERVED1_MSK (1UL << SMOKE_TESTS_PART1_RESERVED1_POS)
|
||||
|
||||
#define SMOKE_TESTS_PART1_RESERVED2_POS (2UL)
|
||||
#define SMOKE_TESTS_PART1_RESERVED2_MSK (1UL << SMOKE_TESTS_PART1_RESERVED2_POS)
|
||||
|
||||
|
||||
#define SMOKE_TESTS_PART1_WAIT_ANY_IRQ_MSK (0)
|
||||
|
||||
#define ROT_SRV1_MSK_POS (4UL)
|
||||
#define ROT_SRV1_MSK (1UL << ROT_SRV1_MSK_POS)
|
||||
|
||||
#define SMOKE_TESTS_PART1_WAIT_ANY_SID_MSK (\
|
||||
ROT_SRV1_MSK)
|
||||
|
||||
|
||||
#endif // PSA_SMOKE_TESTS_PART1_PARTITION_H
|
|
@ -1,122 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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_attest_srv_partition.h"
|
||||
#include "psa_crypto_srv_partition.h"
|
||||
#include "psa_platform_partition.h"
|
||||
#include "psa_its_partition.h"
|
||||
#include "psa_smoke_tests_part1_partition.h"
|
||||
|
||||
extern const uint32_t attest_srv_external_sids[7];
|
||||
extern const uint32_t crypto_srv_external_sids[4];
|
||||
extern const uint32_t platform_external_sids[1];
|
||||
|
||||
spm_partition_t g_partitions[5] = {
|
||||
{
|
||||
.partition_id = ATTEST_SRV_ID,
|
||||
.thread_id = 0,
|
||||
.flags = ATTEST_SRV_WAIT_ANY_SID_MSK | ATTEST_SRV_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = ATTEST_SRV_ROT_SRV_COUNT,
|
||||
.extern_sids = attest_srv_external_sids,
|
||||
.extern_sids_count = ATTEST_SRV_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = CRYPTO_SRV_ID,
|
||||
.thread_id = 0,
|
||||
.flags = CRYPTO_SRV_WAIT_ANY_SID_MSK | CRYPTO_SRV_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = CRYPTO_SRV_ROT_SRV_COUNT,
|
||||
.extern_sids = crypto_srv_external_sids,
|
||||
.extern_sids_count = CRYPTO_SRV_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = PLATFORM_ID,
|
||||
.thread_id = 0,
|
||||
.flags = PLATFORM_WAIT_ANY_SID_MSK | PLATFORM_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = PLATFORM_ROT_SRV_COUNT,
|
||||
.extern_sids = platform_external_sids,
|
||||
.extern_sids_count = PLATFORM_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = ITS_ID,
|
||||
.thread_id = 0,
|
||||
.flags = ITS_WAIT_ANY_SID_MSK | ITS_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = ITS_ROT_SRV_COUNT,
|
||||
.extern_sids = NULL,
|
||||
.extern_sids_count = ITS_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = SMOKE_TESTS_PART1_ID,
|
||||
.thread_id = 0,
|
||||
.flags = SMOKE_TESTS_PART1_WAIT_ANY_SID_MSK | SMOKE_TESTS_PART1_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = SMOKE_TESTS_PART1_ROT_SRV_COUNT,
|
||||
.extern_sids = NULL,
|
||||
.extern_sids_count = SMOKE_TESTS_PART1_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 attest_srv_init(spm_partition_t *partition);
|
||||
void crypto_srv_init(spm_partition_t *partition);
|
||||
void platform_init(spm_partition_t *partition);
|
||||
void its_init(spm_partition_t *partition);
|
||||
void smoke_tests_part1_init(spm_partition_t *partition);
|
||||
|
||||
uint32_t init_partitions(spm_partition_t **partitions)
|
||||
{
|
||||
if (NULL == partitions) {
|
||||
SPM_PANIC("partitions is NULL!\n");
|
||||
}
|
||||
|
||||
attest_srv_init(&(g_partitions[0]));
|
||||
crypto_srv_init(&(g_partitions[1]));
|
||||
platform_init(&(g_partitions[2]));
|
||||
its_init(&(g_partitions[3]));
|
||||
smoke_tests_part1_init(&(g_partitions[4]));
|
||||
|
||||
*partitions = g_partitions;
|
||||
return 5;
|
||||
}
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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 "cmsis.h"
|
||||
#include "mbed_toolchain.h" /* For using MBED_ALIGN macro */
|
||||
#include "rtx_os.h"
|
||||
#include "spm_panic.h"
|
||||
#include "spm_internal.h"
|
||||
#include "psa_smoke_tests_part1_partition.h"
|
||||
#include "psa_manifest/sid.h"
|
||||
|
||||
|
||||
/* Threads stacks */
|
||||
MBED_ALIGN(8) uint8_t smoke_tests_part1_thread_stack[512] = {0};
|
||||
|
||||
/* Threads control blocks */
|
||||
osRtxThread_t smoke_tests_part1_thread_cb = {0};
|
||||
|
||||
/* Thread attributes - for thread initialization */
|
||||
osThreadAttr_t smoke_tests_part1_thread_attr = {
|
||||
.name = "smoke_tests_part1",
|
||||
.attr_bits = 0,
|
||||
.cb_mem = &smoke_tests_part1_thread_cb,
|
||||
.cb_size = sizeof(smoke_tests_part1_thread_cb),
|
||||
.stack_mem = smoke_tests_part1_thread_stack,
|
||||
.stack_size = 512,
|
||||
.priority = osPriorityNormal,
|
||||
.tz_module = 0,
|
||||
.reserved = 0
|
||||
};
|
||||
|
||||
spm_rot_service_t smoke_tests_part1_rot_services[SMOKE_TESTS_PART1_ROT_SRV_COUNT] = {
|
||||
{
|
||||
.sid = SMOKE_TESTS_PART1_ROT_SRV1,
|
||||
.mask = ROT_SRV1_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 5,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
static osRtxMutex_t smoke_tests_part1_mutex = {0};
|
||||
static const osMutexAttr_t smoke_tests_part1_mutex_attr = {
|
||||
.name = "smoke_tests_part1_mutex",
|
||||
.attr_bits = osMutexRecursive | osMutexPrioInherit | osMutexRobust,
|
||||
.cb_mem = &smoke_tests_part1_mutex,
|
||||
.cb_size = sizeof(smoke_tests_part1_mutex),
|
||||
};
|
||||
|
||||
|
||||
extern void smoke_part_main(void *ptr);
|
||||
|
||||
void smoke_tests_part1_init(spm_partition_t *partition)
|
||||
{
|
||||
if (NULL == partition) {
|
||||
SPM_PANIC("partition is NULL!\n");
|
||||
}
|
||||
|
||||
partition->mutex = osMutexNew(&smoke_tests_part1_mutex_attr);
|
||||
if (NULL == partition->mutex) {
|
||||
SPM_PANIC("Failed to create mutex for secure partition smoke_tests_part1!\n");
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < SMOKE_TESTS_PART1_ROT_SRV_COUNT; ++i) {
|
||||
smoke_tests_part1_rot_services[i].partition = partition;
|
||||
}
|
||||
partition->rot_services = smoke_tests_part1_rot_services;
|
||||
|
||||
partition->thread_id = osThreadNew(smoke_part_main, NULL, &smoke_tests_part1_thread_attr);
|
||||
if (NULL == partition->thread_id) {
|
||||
SPM_PANIC("Failed to create start main thread of partition smoke_tests_part1!\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_SMOKE_TESTS_PART1_PARTITION_ROT_SERVICES_H
|
||||
#define PSA_SMOKE_TESTS_PART1_PARTITION_ROT_SERVICES_H
|
||||
|
||||
#define SMOKE_TESTS_PART1_ROT_SRV1 0x00001A00
|
||||
|
||||
#endif // PSA_SMOKE_TESTS_PART1_PARTITION_ROT_SERVICES_H
|
|
@ -1,113 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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_attest_srv_partition.h"
|
||||
#include "psa_crypto_srv_partition.h"
|
||||
#include "psa_platform_partition.h"
|
||||
#include "psa_its_partition.h"
|
||||
|
||||
extern const uint32_t attest_srv_external_sids[7];
|
||||
extern const uint32_t crypto_srv_external_sids[4];
|
||||
extern const uint32_t platform_external_sids[1];
|
||||
|
||||
__attribute__((weak))
|
||||
spm_partition_t g_partitions[4] = {
|
||||
{
|
||||
.partition_id = ATTEST_SRV_ID,
|
||||
.thread_id = 0,
|
||||
.flags = ATTEST_SRV_WAIT_ANY_SID_MSK | ATTEST_SRV_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = ATTEST_SRV_ROT_SRV_COUNT,
|
||||
.extern_sids = attest_srv_external_sids,
|
||||
.extern_sids_count = ATTEST_SRV_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = CRYPTO_SRV_ID,
|
||||
.thread_id = 0,
|
||||
.flags = CRYPTO_SRV_WAIT_ANY_SID_MSK | CRYPTO_SRV_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = CRYPTO_SRV_ROT_SRV_COUNT,
|
||||
.extern_sids = crypto_srv_external_sids,
|
||||
.extern_sids_count = CRYPTO_SRV_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = PLATFORM_ID,
|
||||
.thread_id = 0,
|
||||
.flags = PLATFORM_WAIT_ANY_SID_MSK | PLATFORM_WAIT_ANY_IRQ_MSK,
|
||||
.rot_services = NULL,
|
||||
.rot_services_count = PLATFORM_ROT_SRV_COUNT,
|
||||
.extern_sids = platform_external_sids,
|
||||
.extern_sids_count = PLATFORM_EXT_ROT_SRV_COUNT,
|
||||
.irq_mapper = NULL,
|
||||
},
|
||||
{
|
||||
.partition_id = ITS_ID,
|
||||
.thread_id = 0,
|
||||
.flags = ITS_WAIT_ANY_SID_MSK | ITS_WAIT_ANY_IRQ_MSK,
|
||||
.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. */
|
||||
__attribute__((weak))
|
||||
const mem_region_t *mem_regions = NULL;
|
||||
|
||||
__attribute__((weak))
|
||||
const uint32_t mem_region_count = 0;
|
||||
|
||||
// forward declaration of partition initializers
|
||||
void attest_srv_init(spm_partition_t *partition);
|
||||
void crypto_srv_init(spm_partition_t *partition);
|
||||
void platform_init(spm_partition_t *partition);
|
||||
void its_init(spm_partition_t *partition);
|
||||
|
||||
__attribute__((weak))
|
||||
uint32_t init_partitions(spm_partition_t **partitions)
|
||||
{
|
||||
if (NULL == partitions) {
|
||||
SPM_PANIC("partitions is NULL!\n");
|
||||
}
|
||||
|
||||
attest_srv_init(&(g_partitions[0]));
|
||||
crypto_srv_init(&(g_partitions[1]));
|
||||
platform_init(&(g_partitions[2]));
|
||||
its_init(&(g_partitions[3]));
|
||||
|
||||
*partitions = g_partitions;
|
||||
return 4;
|
||||
}
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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.
|
||||
*/
|
||||
|
||||
/*********** WARNING: This is an auto-generated file. Do not edit! ***********/
|
||||
|
||||
#ifndef __TFM_PARTITION_DEFS_INC__
|
||||
#define __TFM_PARTITION_DEFS_INC__
|
||||
|
||||
/*************************** Service Partitions ******************************/
|
||||
|
||||
#define ATTEST_SRV_ID (TFM_SP_BASE + 0)
|
||||
#define CRYPTO_SRV_ID (TFM_SP_BASE + 1)
|
||||
#define PLATFORM_ID (TFM_SP_BASE + 2)
|
||||
#define ITS_ID (TFM_SP_BASE + 3)
|
||||
|
||||
/*************************** Test Partitions *********************************/
|
||||
|
||||
#ifdef USE_PSA_TEST_PARTITIONS
|
||||
|
||||
#ifdef USE_CRYPTO_ACL_TEST
|
||||
#define CRYPTO_ACL_TEST_ID (TFM_SP_BASE + 4 + 0)
|
||||
#endif
|
||||
|
||||
#ifdef USE_CLIENT_TESTS_PART1
|
||||
#define CLIENT_TESTS_PART1_ID (TFM_SP_BASE + 4 + 1)
|
||||
#endif
|
||||
|
||||
#ifdef USE_SERVER_TESTS_PART1
|
||||
#define SERVER_TESTS_PART1_ID (TFM_SP_BASE + 4 + 2)
|
||||
#endif
|
||||
|
||||
#ifdef USE_SERVER_TESTS_PART2
|
||||
#define SERVER_TESTS_PART2_ID (TFM_SP_BASE + 4 + 3)
|
||||
#endif
|
||||
|
||||
#ifdef USE_SMOKE_TESTS_PART1
|
||||
#define SMOKE_TESTS_PART1_ID (TFM_SP_BASE + 4 + 4)
|
||||
#endif
|
||||
|
||||
#endif // USE_PSA_TEST_PARTITIONS
|
||||
|
||||
#ifdef USE_PSA_TEST_PARTITIONS
|
||||
#define TFM_MAX_USER_PARTITIONS (4 + 5)
|
||||
#else
|
||||
#define TFM_MAX_USER_PARTITIONS (4)
|
||||
#endif
|
||||
|
||||
#endif // __TFM_PARTITION_DEFS_INC__
|
|
@ -1,81 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2019, Arm Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
*/
|
||||
|
||||
/*********** WARNING: This is an auto-generated file. Do not edit! ***********/
|
||||
|
||||
#ifndef __TFM_PARTITION_LIST_INC__
|
||||
#define __TFM_PARTITION_LIST_INC__
|
||||
|
||||
/******** ATTEST_SRV ********/
|
||||
PARTITION_DECLARE(ATTEST_SRV, 0
|
||||
| SPM_PART_FLAG_IPC
|
||||
, "APPLICATION-ROT", 37, NORMAL, 8192);
|
||||
PARTITION_ADD_INIT_FUNC(ATTEST_SRV, attest_main);
|
||||
|
||||
/******** CRYPTO_SRV ********/
|
||||
PARTITION_DECLARE(CRYPTO_SRV, 0
|
||||
| SPM_PART_FLAG_IPC
|
||||
, "APPLICATION-ROT", 35, NORMAL, 16384);
|
||||
PARTITION_ADD_INIT_FUNC(CRYPTO_SRV, crypto_main);
|
||||
|
||||
/******** PLATFORM ********/
|
||||
PARTITION_DECLARE(PLATFORM, 0
|
||||
| SPM_PART_FLAG_IPC
|
||||
, "APPLICATION-ROT", 8, NORMAL, 1024);
|
||||
PARTITION_ADD_INIT_FUNC(PLATFORM, platform_partition_entry);
|
||||
|
||||
/******** ITS ********/
|
||||
PARTITION_DECLARE(ITS, 0
|
||||
| SPM_PART_FLAG_IPC
|
||||
, "APPLICATION-ROT", 10, NORMAL, 2048);
|
||||
PARTITION_ADD_INIT_FUNC(ITS, its_entry);
|
||||
|
||||
#ifdef USE_PSA_TEST_PARTITIONS
|
||||
|
||||
#ifdef USE_CRYPTO_ACL_TEST
|
||||
/******** CRYPTO_ACL_TEST ********/
|
||||
PARTITION_DECLARE(CRYPTO_ACL_TEST, 0
|
||||
| SPM_PART_FLAG_IPC
|
||||
, "APPLICATION-ROT", 128, NORMAL, 512);
|
||||
PARTITION_ADD_INIT_FUNC(CRYPTO_ACL_TEST, test_partition_main);
|
||||
#endif // USE_CRYPTO_ACL_TEST
|
||||
|
||||
#ifdef USE_CLIENT_TESTS_PART1
|
||||
/******** CLIENT_TESTS_PART1 ********/
|
||||
PARTITION_DECLARE(CLIENT_TESTS_PART1, 0
|
||||
| SPM_PART_FLAG_IPC
|
||||
, "APPLICATION-ROT", 1, NORMAL, 1024);
|
||||
PARTITION_ADD_INIT_FUNC(CLIENT_TESTS_PART1, client_part_main);
|
||||
#endif // USE_CLIENT_TESTS_PART1
|
||||
|
||||
#ifdef USE_SERVER_TESTS_PART1
|
||||
/******** SERVER_TESTS_PART1 ********/
|
||||
PARTITION_DECLARE(SERVER_TESTS_PART1, 0
|
||||
| SPM_PART_FLAG_IPC
|
||||
, "APPLICATION-ROT", 2, NORMAL, 1024);
|
||||
PARTITION_ADD_INIT_FUNC(SERVER_TESTS_PART1, server_part1_main);
|
||||
#endif // USE_SERVER_TESTS_PART1
|
||||
|
||||
#ifdef USE_SERVER_TESTS_PART2
|
||||
/******** SERVER_TESTS_PART2 ********/
|
||||
PARTITION_DECLARE(SERVER_TESTS_PART2, 0
|
||||
| SPM_PART_FLAG_IPC
|
||||
, "APPLICATION-ROT", 3, NORMAL, 1024);
|
||||
PARTITION_ADD_INIT_FUNC(SERVER_TESTS_PART2, server_part2_main);
|
||||
#endif // USE_SERVER_TESTS_PART2
|
||||
|
||||
#ifdef USE_SMOKE_TESTS_PART1
|
||||
/******** SMOKE_TESTS_PART1 ********/
|
||||
PARTITION_DECLARE(SMOKE_TESTS_PART1, 0
|
||||
| SPM_PART_FLAG_IPC
|
||||
, "APPLICATION-ROT", 4, NORMAL, 512);
|
||||
PARTITION_ADD_INIT_FUNC(SMOKE_TESTS_PART1, smoke_part_main);
|
||||
#endif // USE_SMOKE_TESTS_PART1
|
||||
|
||||
#endif // USE_PSA_TEST_PARTITIONS
|
||||
|
||||
#endif // __TFM_PARTITION_LIST_INC__
|
|
@ -1,84 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2019, Arm Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
*/
|
||||
|
||||
/*********** WARNING: This is an auto-generated file. Do not edit! ***********/
|
||||
|
||||
#ifndef __TFM_SERVICE_LIST_INC__
|
||||
#define __TFM_SERVICE_LIST_INC__
|
||||
|
||||
/******** ATTEST_SRV ********/
|
||||
{"PSA_ATTEST_GET_TOKEN_ID", ATTEST_SRV_ID, PSA_ATTEST_GET_TOKEN, 0x00000F10, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_ATTEST_GET_TOKEN_SIZE_ID", ATTEST_SRV_ID, PSA_ATTEST_GET_TOKEN_SIZE, 0x00000F11, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_ATTEST_INJECT_KEY_ID", ATTEST_SRV_ID, PSA_ATTEST_INJECT_KEY, 0x00000F12, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
|
||||
/******** CRYPTO_SRV ********/
|
||||
{"PSA_CRYPTO_INIT_ID", CRYPTO_SRV_ID, PSA_CRYPTO_INIT, 0x00000F00, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_MAC_ID", CRYPTO_SRV_ID, PSA_MAC, 0x00000F01, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_HASH_ID", CRYPTO_SRV_ID, PSA_HASH, 0x00000F02, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_ASYMMETRIC_ID", CRYPTO_SRV_ID, PSA_ASYMMETRIC, 0x00000F03, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_SYMMETRIC_ID", CRYPTO_SRV_ID, PSA_SYMMETRIC, 0x00000F04, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_AEAD_ID", CRYPTO_SRV_ID, PSA_AEAD, 0x00000F05, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_KEY_MNG_ID", CRYPTO_SRV_ID, PSA_KEY_MNG, 0x00000F06, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_RNG_ID", CRYPTO_SRV_ID, PSA_RNG, 0x00000F07, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_CRYPTO_FREE_ID", CRYPTO_SRV_ID, PSA_CRYPTO_FREE, 0x00000F08, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_GENERATOR_ID", CRYPTO_SRV_ID, PSA_GENERATOR, 0x00000F09, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
{"PSA_ENTROPY_ID", CRYPTO_SRV_ID, PSA_ENTROPY_INJECT, 0x00000F0A, true, 1, TFM_VERSION_POLICY_STRICT},
|
||||
|
||||
/******** PLATFORM ********/
|
||||
{"PSA_PLATFORM_LC_GET", PLATFORM_ID, PSA_PLATFORM_LC_GET_MSK, 0x00011000, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"PSA_PLATFORM_LC_SET", PLATFORM_ID, PSA_PLATFORM_LC_SET_MSK, 0x00011001, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"PSA_PLATFORM_SYSTEM_RESET", PLATFORM_ID, PSA_PLATFORM_SYSTEM_RESET_MSK, 0x00011002, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
|
||||
/******** ITS ********/
|
||||
{"PSA_ITS_GET", ITS_ID, PSA_ITS_GET_MSK, 0x00011A00, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"PSA_ITS_SET", ITS_ID, PSA_ITS_SET_MSK, 0x00011A01, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"PSA_ITS_INFO", ITS_ID, PSA_ITS_INFO_MSK, 0x00011A02, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"PSA_ITS_REMOVE", ITS_ID, PSA_ITS_REMOVE_MSK, 0x00011A03, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"PSA_ITS_RESET", ITS_ID, PSA_ITS_RESET_MSK, 0x00011A04, false, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
|
||||
#ifdef USE_PSA_TEST_PARTITIONS
|
||||
|
||||
#ifdef USE_CRYPTO_ACL_TEST
|
||||
/******** CRYPTO_ACL_TEST ********/
|
||||
{"CRYPTO_CREATE_PERSISTENT_KEY", CRYPTO_ACL_TEST_ID, CRYPTO_CREATE_PERSISTENT_KEY_MSK, 0x00000200, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"CRYPTO_GENERATE_KEY", CRYPTO_ACL_TEST_ID, CRYPTO_GENERATE_KEY_MSK, 0x00000201, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"CRYPTO_OPEN_PERSISTENT_KEY", CRYPTO_ACL_TEST_ID, CRYPTO_OPEN_PERSISTENT_KEY_MSK, 0x00000202, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"CRYPTO_CLOSE_KEY", CRYPTO_ACL_TEST_ID, CRYPTO_CLOSE_KEY_MSK, 0x00000203, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"CRYPTO_SET_KEY_POLICY", CRYPTO_ACL_TEST_ID, CRYPTO_SET_KEY_POLICY_MSK, 0x00000204, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"CRYPTO_DESTROY_KEY", CRYPTO_ACL_TEST_ID, CRYPTO_DESTROY_KEY_MSK, 0x00000205, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"CRYPTO_GET_KEY_INFO", CRYPTO_ACL_TEST_ID, CRYPTO_GET_KEY_INFO_MSK, 0x00000206, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"CRYPTO_GET_KEY_POLICY", CRYPTO_ACL_TEST_ID, CRYPTO_GET_KEY_POLICY_MSK, 0x00000207, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
{"CRYPTO_IMPORT_KEY", CRYPTO_ACL_TEST_ID, CRYPTO_IMPORT_KEY_MSK, 0x00000208, true, 1, TFM_VERSION_POLICY_RELAXED},
|
||||
#endif // USE_CRYPTO_ACL_TEST
|
||||
|
||||
#ifdef USE_CLIENT_TESTS_PART1
|
||||
/******** CLIENT_TESTS_PART1 ********/
|
||||
{"CLIENT_TESTS_PART1_ROT_SRV1", CLIENT_TESTS_PART1_ID, PART1_ROT_SRV1_MSK, 0x00001A05, true, 5, TFM_VERSION_POLICY_RELAXED},
|
||||
{"CLIENT_TESTS_PART1_DROP_CONN", CLIENT_TESTS_PART1_ID, DROP_CONN_MSK, 0x00001A06, true, 5, TFM_VERSION_POLICY_RELAXED},
|
||||
{"CLIENT_TESTS_PART1_SECURE_CLIENTS_ONLY", CLIENT_TESTS_PART1_ID, SECURE_CLIENTS_ONLY_MSK, 0x00001A07, false, 5, TFM_VERSION_POLICY_RELAXED},
|
||||
#endif // USE_CLIENT_TESTS_PART1
|
||||
|
||||
#ifdef USE_SERVER_TESTS_PART1
|
||||
/******** SERVER_TESTS_PART1 ********/
|
||||
{"SERVER_TESTS_PART1_CONTROL", SERVER_TESTS_PART1_ID, CONTROL_MSK, 0x00001A01, true, 5, TFM_VERSION_POLICY_RELAXED},
|
||||
{"SERVER_TESTS_PART1_TEST", SERVER_TESTS_PART1_ID, TEST_MSK, 0x00001A02, true, 12, TFM_VERSION_POLICY_STRICT},
|
||||
#endif // USE_SERVER_TESTS_PART1
|
||||
|
||||
#ifdef USE_SERVER_TESTS_PART2
|
||||
/******** SERVER_TESTS_PART2 ********/
|
||||
{"SERVER_TESTS_PART2_ROT_SRV_REVERSE", SERVER_TESTS_PART2_ID, ROT_SRV_REVERSE_MSK, 0x00001A03, false, 5, TFM_VERSION_POLICY_STRICT},
|
||||
{"SERVER_TESTS_PART2_ROT_SRV_DB_TST", SERVER_TESTS_PART2_ID, ROT_SRV_DB_TST_MSK, 0x00001A04, false, 5, TFM_VERSION_POLICY_STRICT},
|
||||
#endif // USE_SERVER_TESTS_PART2
|
||||
|
||||
#ifdef USE_SMOKE_TESTS_PART1
|
||||
/******** SMOKE_TESTS_PART1 ********/
|
||||
{"SMOKE_TESTS_PART1_ROT_SRV1", SMOKE_TESTS_PART1_ID, ROT_SRV1_MSK, 0x00001A00, true, 5, TFM_VERSION_POLICY_RELAXED},
|
||||
#endif // USE_SMOKE_TESTS_PART1
|
||||
|
||||
#endif // USE_PSA_TEST_PARTITIONS
|
||||
|
||||
#endif // __TFM_SERVICE_LIST_INC__
|
|
@ -1,123 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2019, Arm Limited. All rights reserved.
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*
|
||||
*/
|
||||
|
||||
/*********** WARNING: This is an auto-generated file. Do not edit! ***********/
|
||||
|
||||
#ifndef __TFM_SPM_SIGNAL_DEFS_H__
|
||||
#define __TFM_SPM_SIGNAL_DEFS_H__
|
||||
|
||||
/******** ATTEST_SRV ********/
|
||||
#define PSA_ATTEST_GET_TOKEN_POS (4UL)
|
||||
#define PSA_ATTEST_GET_TOKEN (1UL << PSA_ATTEST_GET_TOKEN_POS)
|
||||
#define PSA_ATTEST_GET_TOKEN_SIZE_POS (5UL)
|
||||
#define PSA_ATTEST_GET_TOKEN_SIZE (1UL << PSA_ATTEST_GET_TOKEN_SIZE_POS)
|
||||
#define PSA_ATTEST_INJECT_KEY_POS (6UL)
|
||||
#define PSA_ATTEST_INJECT_KEY (1UL << PSA_ATTEST_INJECT_KEY_POS)
|
||||
|
||||
/******** CRYPTO_SRV ********/
|
||||
#define PSA_CRYPTO_INIT_POS (4UL)
|
||||
#define PSA_CRYPTO_INIT (1UL << PSA_CRYPTO_INIT_POS)
|
||||
#define PSA_MAC_POS (5UL)
|
||||
#define PSA_MAC (1UL << PSA_MAC_POS)
|
||||
#define PSA_HASH_POS (6UL)
|
||||
#define PSA_HASH (1UL << PSA_HASH_POS)
|
||||
#define PSA_ASYMMETRIC_POS (7UL)
|
||||
#define PSA_ASYMMETRIC (1UL << PSA_ASYMMETRIC_POS)
|
||||
#define PSA_SYMMETRIC_POS (8UL)
|
||||
#define PSA_SYMMETRIC (1UL << PSA_SYMMETRIC_POS)
|
||||
#define PSA_AEAD_POS (9UL)
|
||||
#define PSA_AEAD (1UL << PSA_AEAD_POS)
|
||||
#define PSA_KEY_MNG_POS (10UL)
|
||||
#define PSA_KEY_MNG (1UL << PSA_KEY_MNG_POS)
|
||||
#define PSA_RNG_POS (11UL)
|
||||
#define PSA_RNG (1UL << PSA_RNG_POS)
|
||||
#define PSA_CRYPTO_FREE_POS (12UL)
|
||||
#define PSA_CRYPTO_FREE (1UL << PSA_CRYPTO_FREE_POS)
|
||||
#define PSA_GENERATOR_POS (13UL)
|
||||
#define PSA_GENERATOR (1UL << PSA_GENERATOR_POS)
|
||||
#define PSA_ENTROPY_INJECT_POS (14UL)
|
||||
#define PSA_ENTROPY_INJECT (1UL << PSA_ENTROPY_INJECT_POS)
|
||||
|
||||
/******** PLATFORM ********/
|
||||
#define PSA_PLATFORM_LC_GET_MSK_POS (4UL)
|
||||
#define PSA_PLATFORM_LC_GET_MSK (1UL << PSA_PLATFORM_LC_GET_MSK_POS)
|
||||
#define PSA_PLATFORM_LC_SET_MSK_POS (5UL)
|
||||
#define PSA_PLATFORM_LC_SET_MSK (1UL << PSA_PLATFORM_LC_SET_MSK_POS)
|
||||
#define PSA_PLATFORM_SYSTEM_RESET_MSK_POS (6UL)
|
||||
#define PSA_PLATFORM_SYSTEM_RESET_MSK (1UL << PSA_PLATFORM_SYSTEM_RESET_MSK_POS)
|
||||
|
||||
/******** ITS ********/
|
||||
#define PSA_ITS_GET_MSK_POS (4UL)
|
||||
#define PSA_ITS_GET_MSK (1UL << PSA_ITS_GET_MSK_POS)
|
||||
#define PSA_ITS_SET_MSK_POS (5UL)
|
||||
#define PSA_ITS_SET_MSK (1UL << PSA_ITS_SET_MSK_POS)
|
||||
#define PSA_ITS_INFO_MSK_POS (6UL)
|
||||
#define PSA_ITS_INFO_MSK (1UL << PSA_ITS_INFO_MSK_POS)
|
||||
#define PSA_ITS_REMOVE_MSK_POS (7UL)
|
||||
#define PSA_ITS_REMOVE_MSK (1UL << PSA_ITS_REMOVE_MSK_POS)
|
||||
#define PSA_ITS_RESET_MSK_POS (8UL)
|
||||
#define PSA_ITS_RESET_MSK (1UL << PSA_ITS_RESET_MSK_POS)
|
||||
|
||||
#ifdef USE_PSA_TEST_PARTITIONS
|
||||
|
||||
#ifdef USE_CRYPTO_ACL_TEST
|
||||
/******** CRYPTO_ACL_TEST ********/
|
||||
#define CRYPTO_CREATE_PERSISTENT_KEY_MSK_POS (4UL)
|
||||
#define CRYPTO_CREATE_PERSISTENT_KEY_MSK (1UL << CRYPTO_CREATE_PERSISTENT_KEY_MSK_POS)
|
||||
#define CRYPTO_GENERATE_KEY_MSK_POS (5UL)
|
||||
#define CRYPTO_GENERATE_KEY_MSK (1UL << CRYPTO_GENERATE_KEY_MSK_POS)
|
||||
#define CRYPTO_OPEN_PERSISTENT_KEY_MSK_POS (6UL)
|
||||
#define CRYPTO_OPEN_PERSISTENT_KEY_MSK (1UL << CRYPTO_OPEN_PERSISTENT_KEY_MSK_POS)
|
||||
#define CRYPTO_CLOSE_KEY_MSK_POS (7UL)
|
||||
#define CRYPTO_CLOSE_KEY_MSK (1UL << CRYPTO_CLOSE_KEY_MSK_POS)
|
||||
#define CRYPTO_SET_KEY_POLICY_MSK_POS (8UL)
|
||||
#define CRYPTO_SET_KEY_POLICY_MSK (1UL << CRYPTO_SET_KEY_POLICY_MSK_POS)
|
||||
#define CRYPTO_DESTROY_KEY_MSK_POS (9UL)
|
||||
#define CRYPTO_DESTROY_KEY_MSK (1UL << CRYPTO_DESTROY_KEY_MSK_POS)
|
||||
#define CRYPTO_GET_KEY_INFO_MSK_POS (10UL)
|
||||
#define CRYPTO_GET_KEY_INFO_MSK (1UL << CRYPTO_GET_KEY_INFO_MSK_POS)
|
||||
#define CRYPTO_GET_KEY_POLICY_MSK_POS (11UL)
|
||||
#define CRYPTO_GET_KEY_POLICY_MSK (1UL << CRYPTO_GET_KEY_POLICY_MSK_POS)
|
||||
#define CRYPTO_IMPORT_KEY_MSK_POS (12UL)
|
||||
#define CRYPTO_IMPORT_KEY_MSK (1UL << CRYPTO_IMPORT_KEY_MSK_POS)
|
||||
#endif // USE_CRYPTO_ACL_TEST
|
||||
|
||||
#ifdef USE_CLIENT_TESTS_PART1
|
||||
/******** CLIENT_TESTS_PART1 ********/
|
||||
#define PART1_ROT_SRV1_MSK_POS (4UL)
|
||||
#define PART1_ROT_SRV1_MSK (1UL << PART1_ROT_SRV1_MSK_POS)
|
||||
#define DROP_CONN_MSK_POS (5UL)
|
||||
#define DROP_CONN_MSK (1UL << DROP_CONN_MSK_POS)
|
||||
#define SECURE_CLIENTS_ONLY_MSK_POS (6UL)
|
||||
#define SECURE_CLIENTS_ONLY_MSK (1UL << SECURE_CLIENTS_ONLY_MSK_POS)
|
||||
#endif // USE_CLIENT_TESTS_PART1
|
||||
|
||||
#ifdef USE_SERVER_TESTS_PART1
|
||||
/******** SERVER_TESTS_PART1 ********/
|
||||
#define CONTROL_MSK_POS (4UL)
|
||||
#define CONTROL_MSK (1UL << CONTROL_MSK_POS)
|
||||
#define TEST_MSK_POS (5UL)
|
||||
#define TEST_MSK (1UL << TEST_MSK_POS)
|
||||
#endif // USE_SERVER_TESTS_PART1
|
||||
|
||||
#ifdef USE_SERVER_TESTS_PART2
|
||||
/******** SERVER_TESTS_PART2 ********/
|
||||
#define ROT_SRV_REVERSE_MSK_POS (4UL)
|
||||
#define ROT_SRV_REVERSE_MSK (1UL << ROT_SRV_REVERSE_MSK_POS)
|
||||
#define ROT_SRV_DB_TST_MSK_POS (5UL)
|
||||
#define ROT_SRV_DB_TST_MSK (1UL << ROT_SRV_DB_TST_MSK_POS)
|
||||
#endif // USE_SERVER_TESTS_PART2
|
||||
|
||||
#ifdef USE_SMOKE_TESTS_PART1
|
||||
/******** SMOKE_TESTS_PART1 ********/
|
||||
#define ROT_SRV1_MSK_POS (4UL)
|
||||
#define ROT_SRV1_MSK (1UL << ROT_SRV1_MSK_POS)
|
||||
#endif // USE_SMOKE_TESTS_PART1
|
||||
|
||||
#endif // USE_PSA_TEST_PARTITIONS
|
||||
|
||||
#endif // __TFM_SPM_SIGNAL_DEFS_H__
|
|
@ -1,57 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_ATTEST_SRV_PARTITION_H
|
||||
#define PSA_ATTEST_SRV_PARTITION_H
|
||||
|
||||
#define ATTEST_SRV_ID 37
|
||||
|
||||
#define ATTEST_SRV_ROT_SRV_COUNT (3UL)
|
||||
#define ATTEST_SRV_EXT_ROT_SRV_COUNT (7UL)
|
||||
|
||||
/* ATTEST_SRV event flags */
|
||||
#define ATTEST_SRV_RESERVED1_POS (1UL)
|
||||
#define ATTEST_SRV_RESERVED1_MSK (1UL << ATTEST_SRV_RESERVED1_POS)
|
||||
|
||||
#define ATTEST_SRV_RESERVED2_POS (2UL)
|
||||
#define ATTEST_SRV_RESERVED2_MSK (1UL << ATTEST_SRV_RESERVED2_POS)
|
||||
|
||||
|
||||
#define ATTEST_SRV_WAIT_ANY_IRQ_MSK (0)
|
||||
|
||||
#define PSA_ATTEST_GET_TOKEN_POS (4UL)
|
||||
#define PSA_ATTEST_GET_TOKEN (1UL << PSA_ATTEST_GET_TOKEN_POS)
|
||||
#define PSA_ATTEST_GET_TOKEN_SIZE_POS (5UL)
|
||||
#define PSA_ATTEST_GET_TOKEN_SIZE (1UL << PSA_ATTEST_GET_TOKEN_SIZE_POS)
|
||||
#define PSA_ATTEST_INJECT_KEY_POS (6UL)
|
||||
#define PSA_ATTEST_INJECT_KEY (1UL << PSA_ATTEST_INJECT_KEY_POS)
|
||||
|
||||
#define ATTEST_SRV_WAIT_ANY_SID_MSK (\
|
||||
PSA_ATTEST_GET_TOKEN | \
|
||||
PSA_ATTEST_GET_TOKEN_SIZE | \
|
||||
PSA_ATTEST_INJECT_KEY)
|
||||
|
||||
|
||||
#endif // PSA_ATTEST_SRV_PARTITION_H
|
|
@ -1,136 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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 "cmsis.h"
|
||||
#include "mbed_toolchain.h" /* For using MBED_ALIGN macro */
|
||||
#include "rtx_os.h"
|
||||
#include "spm_panic.h"
|
||||
#include "spm_internal.h"
|
||||
#include "psa_attest_srv_partition.h"
|
||||
#include "psa_manifest/sid.h"
|
||||
|
||||
|
||||
/* Threads stacks */
|
||||
MBED_ALIGN(8) uint8_t attest_srv_thread_stack[8192] = {0};
|
||||
|
||||
/* Threads control blocks */
|
||||
osRtxThread_t attest_srv_thread_cb = {0};
|
||||
|
||||
/* Thread attributes - for thread initialization */
|
||||
osThreadAttr_t attest_srv_thread_attr = {
|
||||
.name = "attest_srv",
|
||||
.attr_bits = 0,
|
||||
.cb_mem = &attest_srv_thread_cb,
|
||||
.cb_size = sizeof(attest_srv_thread_cb),
|
||||
.stack_mem = attest_srv_thread_stack,
|
||||
.stack_size = 8192,
|
||||
.priority = osPriorityNormal,
|
||||
.tz_module = 0,
|
||||
.reserved = 0
|
||||
};
|
||||
|
||||
spm_rot_service_t attest_srv_rot_services[ATTEST_SRV_ROT_SRV_COUNT] = {
|
||||
{
|
||||
.sid = PSA_ATTEST_GET_TOKEN_ID,
|
||||
.mask = PSA_ATTEST_GET_TOKEN,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_ATTEST_GET_TOKEN_SIZE_ID,
|
||||
.mask = PSA_ATTEST_GET_TOKEN_SIZE,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_ATTEST_INJECT_KEY_ID,
|
||||
.mask = PSA_ATTEST_INJECT_KEY,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/* External SIDs used by ATTEST_SRV */
|
||||
const uint32_t attest_srv_external_sids[7] = {
|
||||
PSA_CRYPTO_INIT_ID,
|
||||
PSA_HASH_ID,
|
||||
PSA_ASYMMETRIC_ID,
|
||||
PSA_KEY_MNG_ID,
|
||||
PSA_CRYPTO_FREE_ID,
|
||||
PSA_GENERATOR_ID,
|
||||
PSA_PLATFORM_LC_GET,
|
||||
};
|
||||
|
||||
static osRtxMutex_t attest_srv_mutex = {0};
|
||||
static const osMutexAttr_t attest_srv_mutex_attr = {
|
||||
.name = "attest_srv_mutex",
|
||||
.attr_bits = osMutexRecursive | osMutexPrioInherit | osMutexRobust,
|
||||
.cb_mem = &attest_srv_mutex,
|
||||
.cb_size = sizeof(attest_srv_mutex),
|
||||
};
|
||||
|
||||
|
||||
extern void attest_main(void *ptr);
|
||||
|
||||
void attest_srv_init(spm_partition_t *partition)
|
||||
{
|
||||
if (NULL == partition) {
|
||||
SPM_PANIC("partition is NULL!\n");
|
||||
}
|
||||
|
||||
partition->mutex = osMutexNew(&attest_srv_mutex_attr);
|
||||
if (NULL == partition->mutex) {
|
||||
SPM_PANIC("Failed to create mutex for secure partition attest_srv!\n");
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < ATTEST_SRV_ROT_SRV_COUNT; ++i) {
|
||||
attest_srv_rot_services[i].partition = partition;
|
||||
}
|
||||
partition->rot_services = attest_srv_rot_services;
|
||||
|
||||
partition->thread_id = osThreadNew(attest_main, NULL, &attest_srv_thread_attr);
|
||||
if (NULL == partition->thread_id) {
|
||||
SPM_PANIC("Failed to create start main thread of partition attest_srv!\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_ATTEST_SRV_PARTITION_ROT_SERVICES_H
|
||||
#define PSA_ATTEST_SRV_PARTITION_ROT_SERVICES_H
|
||||
|
||||
#define PSA_ATTEST_GET_TOKEN_ID 0x00000F10
|
||||
#define PSA_ATTEST_GET_TOKEN_SIZE_ID 0x00000F11
|
||||
#define PSA_ATTEST_INJECT_KEY_ID 0x00000F12
|
||||
|
||||
#endif // PSA_ATTEST_SRV_PARTITION_ROT_SERVICES_H
|
|
@ -1,81 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_CRYPTO_SRV_PARTITION_H
|
||||
#define PSA_CRYPTO_SRV_PARTITION_H
|
||||
|
||||
#define CRYPTO_SRV_ID 35
|
||||
|
||||
#define CRYPTO_SRV_ROT_SRV_COUNT (11UL)
|
||||
#define CRYPTO_SRV_EXT_ROT_SRV_COUNT (4UL)
|
||||
|
||||
/* CRYPTO_SRV event flags */
|
||||
#define CRYPTO_SRV_RESERVED1_POS (1UL)
|
||||
#define CRYPTO_SRV_RESERVED1_MSK (1UL << CRYPTO_SRV_RESERVED1_POS)
|
||||
|
||||
#define CRYPTO_SRV_RESERVED2_POS (2UL)
|
||||
#define CRYPTO_SRV_RESERVED2_MSK (1UL << CRYPTO_SRV_RESERVED2_POS)
|
||||
|
||||
|
||||
#define CRYPTO_SRV_WAIT_ANY_IRQ_MSK (0)
|
||||
|
||||
#define PSA_CRYPTO_INIT_POS (4UL)
|
||||
#define PSA_CRYPTO_INIT (1UL << PSA_CRYPTO_INIT_POS)
|
||||
#define PSA_MAC_POS (5UL)
|
||||
#define PSA_MAC (1UL << PSA_MAC_POS)
|
||||
#define PSA_HASH_POS (6UL)
|
||||
#define PSA_HASH (1UL << PSA_HASH_POS)
|
||||
#define PSA_ASYMMETRIC_POS (7UL)
|
||||
#define PSA_ASYMMETRIC (1UL << PSA_ASYMMETRIC_POS)
|
||||
#define PSA_SYMMETRIC_POS (8UL)
|
||||
#define PSA_SYMMETRIC (1UL << PSA_SYMMETRIC_POS)
|
||||
#define PSA_AEAD_POS (9UL)
|
||||
#define PSA_AEAD (1UL << PSA_AEAD_POS)
|
||||
#define PSA_KEY_MNG_POS (10UL)
|
||||
#define PSA_KEY_MNG (1UL << PSA_KEY_MNG_POS)
|
||||
#define PSA_RNG_POS (11UL)
|
||||
#define PSA_RNG (1UL << PSA_RNG_POS)
|
||||
#define PSA_CRYPTO_FREE_POS (12UL)
|
||||
#define PSA_CRYPTO_FREE (1UL << PSA_CRYPTO_FREE_POS)
|
||||
#define PSA_GENERATOR_POS (13UL)
|
||||
#define PSA_GENERATOR (1UL << PSA_GENERATOR_POS)
|
||||
#define PSA_ENTROPY_INJECT_POS (14UL)
|
||||
#define PSA_ENTROPY_INJECT (1UL << PSA_ENTROPY_INJECT_POS)
|
||||
|
||||
#define CRYPTO_SRV_WAIT_ANY_SID_MSK (\
|
||||
PSA_CRYPTO_INIT | \
|
||||
PSA_MAC | \
|
||||
PSA_HASH | \
|
||||
PSA_ASYMMETRIC | \
|
||||
PSA_SYMMETRIC | \
|
||||
PSA_AEAD | \
|
||||
PSA_KEY_MNG | \
|
||||
PSA_RNG | \
|
||||
PSA_CRYPTO_FREE | \
|
||||
PSA_GENERATOR | \
|
||||
PSA_ENTROPY_INJECT)
|
||||
|
||||
|
||||
#endif // PSA_CRYPTO_SRV_PARTITION_H
|
|
@ -1,229 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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 "cmsis.h"
|
||||
#include "mbed_toolchain.h" /* For using MBED_ALIGN macro */
|
||||
#include "rtx_os.h"
|
||||
#include "spm_panic.h"
|
||||
#include "spm_internal.h"
|
||||
#include "psa_crypto_srv_partition.h"
|
||||
#include "psa_manifest/sid.h"
|
||||
|
||||
|
||||
/* Threads stacks */
|
||||
MBED_ALIGN(8) uint8_t crypto_srv_thread_stack[16384] = {0};
|
||||
|
||||
/* Threads control blocks */
|
||||
osRtxThread_t crypto_srv_thread_cb = {0};
|
||||
|
||||
/* Thread attributes - for thread initialization */
|
||||
osThreadAttr_t crypto_srv_thread_attr = {
|
||||
.name = "crypto_srv",
|
||||
.attr_bits = 0,
|
||||
.cb_mem = &crypto_srv_thread_cb,
|
||||
.cb_size = sizeof(crypto_srv_thread_cb),
|
||||
.stack_mem = crypto_srv_thread_stack,
|
||||
.stack_size = 16384,
|
||||
.priority = osPriorityNormal,
|
||||
.tz_module = 0,
|
||||
.reserved = 0
|
||||
};
|
||||
|
||||
spm_rot_service_t crypto_srv_rot_services[CRYPTO_SRV_ROT_SRV_COUNT] = {
|
||||
{
|
||||
.sid = PSA_CRYPTO_INIT_ID,
|
||||
.mask = PSA_CRYPTO_INIT,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_MAC_ID,
|
||||
.mask = PSA_MAC,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_HASH_ID,
|
||||
.mask = PSA_HASH,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_ASYMMETRIC_ID,
|
||||
.mask = PSA_ASYMMETRIC,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_SYMMETRIC_ID,
|
||||
.mask = PSA_SYMMETRIC,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_AEAD_ID,
|
||||
.mask = PSA_AEAD,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_KEY_MNG_ID,
|
||||
.mask = PSA_KEY_MNG,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_RNG_ID,
|
||||
.mask = PSA_RNG,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_CRYPTO_FREE_ID,
|
||||
.mask = PSA_CRYPTO_FREE,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_GENERATOR_ID,
|
||||
.mask = PSA_GENERATOR,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_ENTROPY_ID,
|
||||
.mask = PSA_ENTROPY_INJECT,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_STRICT,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/* External SIDs used by CRYPTO_SRV */
|
||||
const uint32_t crypto_srv_external_sids[4] = {
|
||||
PSA_ITS_GET,
|
||||
PSA_ITS_SET,
|
||||
PSA_ITS_INFO,
|
||||
PSA_ITS_REMOVE,
|
||||
};
|
||||
|
||||
static osRtxMutex_t crypto_srv_mutex = {0};
|
||||
static const osMutexAttr_t crypto_srv_mutex_attr = {
|
||||
.name = "crypto_srv_mutex",
|
||||
.attr_bits = osMutexRecursive | osMutexPrioInherit | osMutexRobust,
|
||||
.cb_mem = &crypto_srv_mutex,
|
||||
.cb_size = sizeof(crypto_srv_mutex),
|
||||
};
|
||||
|
||||
|
||||
extern void crypto_main(void *ptr);
|
||||
|
||||
void crypto_srv_init(spm_partition_t *partition)
|
||||
{
|
||||
if (NULL == partition) {
|
||||
SPM_PANIC("partition is NULL!\n");
|
||||
}
|
||||
|
||||
partition->mutex = osMutexNew(&crypto_srv_mutex_attr);
|
||||
if (NULL == partition->mutex) {
|
||||
SPM_PANIC("Failed to create mutex for secure partition crypto_srv!\n");
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < CRYPTO_SRV_ROT_SRV_COUNT; ++i) {
|
||||
crypto_srv_rot_services[i].partition = partition;
|
||||
}
|
||||
partition->rot_services = crypto_srv_rot_services;
|
||||
|
||||
partition->thread_id = osThreadNew(crypto_main, NULL, &crypto_srv_thread_attr);
|
||||
if (NULL == partition->thread_id) {
|
||||
SPM_PANIC("Failed to create start main thread of partition crypto_srv!\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_CRYPTO_SRV_PARTITION_ROT_SERVICES_H
|
||||
#define PSA_CRYPTO_SRV_PARTITION_ROT_SERVICES_H
|
||||
|
||||
#define PSA_CRYPTO_INIT_ID 0x00000F00
|
||||
#define PSA_MAC_ID 0x00000F01
|
||||
#define PSA_HASH_ID 0x00000F02
|
||||
#define PSA_ASYMMETRIC_ID 0x00000F03
|
||||
#define PSA_SYMMETRIC_ID 0x00000F04
|
||||
#define PSA_AEAD_ID 0x00000F05
|
||||
#define PSA_KEY_MNG_ID 0x00000F06
|
||||
#define PSA_RNG_ID 0x00000F07
|
||||
#define PSA_CRYPTO_FREE_ID 0x00000F08
|
||||
#define PSA_GENERATOR_ID 0x00000F09
|
||||
#define PSA_ENTROPY_ID 0x00000F0A
|
||||
|
||||
#endif // PSA_CRYPTO_SRV_PARTITION_ROT_SERVICES_H
|
|
@ -1,57 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_PLATFORM_PARTITION_H
|
||||
#define PSA_PLATFORM_PARTITION_H
|
||||
|
||||
#define PLATFORM_ID 8
|
||||
|
||||
#define PLATFORM_ROT_SRV_COUNT (3UL)
|
||||
#define PLATFORM_EXT_ROT_SRV_COUNT (1UL)
|
||||
|
||||
/* PLATFORM event flags */
|
||||
#define PLATFORM_RESERVED1_POS (1UL)
|
||||
#define PLATFORM_RESERVED1_MSK (1UL << PLATFORM_RESERVED1_POS)
|
||||
|
||||
#define PLATFORM_RESERVED2_POS (2UL)
|
||||
#define PLATFORM_RESERVED2_MSK (1UL << PLATFORM_RESERVED2_POS)
|
||||
|
||||
|
||||
#define PLATFORM_WAIT_ANY_IRQ_MSK (0)
|
||||
|
||||
#define PSA_PLATFORM_LC_GET_MSK_POS (4UL)
|
||||
#define PSA_PLATFORM_LC_GET_MSK (1UL << PSA_PLATFORM_LC_GET_MSK_POS)
|
||||
#define PSA_PLATFORM_LC_SET_MSK_POS (5UL)
|
||||
#define PSA_PLATFORM_LC_SET_MSK (1UL << PSA_PLATFORM_LC_SET_MSK_POS)
|
||||
#define PSA_PLATFORM_SYSTEM_RESET_MSK_POS (6UL)
|
||||
#define PSA_PLATFORM_SYSTEM_RESET_MSK (1UL << PSA_PLATFORM_SYSTEM_RESET_MSK_POS)
|
||||
|
||||
#define PLATFORM_WAIT_ANY_SID_MSK (\
|
||||
PSA_PLATFORM_LC_GET_MSK | \
|
||||
PSA_PLATFORM_LC_SET_MSK | \
|
||||
PSA_PLATFORM_SYSTEM_RESET_MSK)
|
||||
|
||||
|
||||
#endif // PSA_PLATFORM_PARTITION_H
|
|
@ -1,130 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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 "cmsis.h"
|
||||
#include "mbed_toolchain.h" /* For using MBED_ALIGN macro */
|
||||
#include "rtx_os.h"
|
||||
#include "spm_panic.h"
|
||||
#include "spm_internal.h"
|
||||
#include "psa_platform_partition.h"
|
||||
#include "psa_manifest/sid.h"
|
||||
|
||||
|
||||
/* Threads stacks */
|
||||
MBED_ALIGN(8) uint8_t platform_thread_stack[1024] = {0};
|
||||
|
||||
/* Threads control blocks */
|
||||
osRtxThread_t platform_thread_cb = {0};
|
||||
|
||||
/* Thread attributes - for thread initialization */
|
||||
osThreadAttr_t platform_thread_attr = {
|
||||
.name = "platform",
|
||||
.attr_bits = 0,
|
||||
.cb_mem = &platform_thread_cb,
|
||||
.cb_size = sizeof(platform_thread_cb),
|
||||
.stack_mem = platform_thread_stack,
|
||||
.stack_size = 1024,
|
||||
.priority = osPriorityNormal,
|
||||
.tz_module = 0,
|
||||
.reserved = 0
|
||||
};
|
||||
|
||||
spm_rot_service_t platform_rot_services[PLATFORM_ROT_SRV_COUNT] = {
|
||||
{
|
||||
.sid = PSA_PLATFORM_LC_GET,
|
||||
.mask = PSA_PLATFORM_LC_GET_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_PLATFORM_LC_SET,
|
||||
.mask = PSA_PLATFORM_LC_SET_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_PLATFORM_SYSTEM_RESET,
|
||||
.mask = PSA_PLATFORM_SYSTEM_RESET_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/* External SIDs used by PLATFORM */
|
||||
const uint32_t platform_external_sids[1] = {
|
||||
PSA_ITS_RESET,
|
||||
};
|
||||
|
||||
static osRtxMutex_t platform_mutex = {0};
|
||||
static const osMutexAttr_t platform_mutex_attr = {
|
||||
.name = "platform_mutex",
|
||||
.attr_bits = osMutexRecursive | osMutexPrioInherit | osMutexRobust,
|
||||
.cb_mem = &platform_mutex,
|
||||
.cb_size = sizeof(platform_mutex),
|
||||
};
|
||||
|
||||
|
||||
extern void platform_partition_entry(void *ptr);
|
||||
|
||||
void platform_init(spm_partition_t *partition)
|
||||
{
|
||||
if (NULL == partition) {
|
||||
SPM_PANIC("partition is NULL!\n");
|
||||
}
|
||||
|
||||
partition->mutex = osMutexNew(&platform_mutex_attr);
|
||||
if (NULL == partition->mutex) {
|
||||
SPM_PANIC("Failed to create mutex for secure partition platform!\n");
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < PLATFORM_ROT_SRV_COUNT; ++i) {
|
||||
platform_rot_services[i].partition = partition;
|
||||
}
|
||||
partition->rot_services = platform_rot_services;
|
||||
|
||||
partition->thread_id = osThreadNew(platform_partition_entry, NULL, &platform_thread_attr);
|
||||
if (NULL == partition->thread_id) {
|
||||
SPM_PANIC("Failed to create start main thread of partition platform!\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,33 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_PLATFORM_PARTITION_ROT_SERVICES_H
|
||||
#define PSA_PLATFORM_PARTITION_ROT_SERVICES_H
|
||||
|
||||
#define PSA_PLATFORM_LC_GET 0x00011000
|
||||
#define PSA_PLATFORM_LC_SET 0x00011001
|
||||
#define PSA_PLATFORM_SYSTEM_RESET 0x00011002
|
||||
|
||||
#endif // PSA_PLATFORM_PARTITION_ROT_SERVICES_H
|
|
@ -1,63 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_ITS_PARTITION_H
|
||||
#define PSA_ITS_PARTITION_H
|
||||
|
||||
#define ITS_ID 10
|
||||
|
||||
#define ITS_ROT_SRV_COUNT (5UL)
|
||||
#define ITS_EXT_ROT_SRV_COUNT (0UL)
|
||||
|
||||
/* ITS event flags */
|
||||
#define ITS_RESERVED1_POS (1UL)
|
||||
#define ITS_RESERVED1_MSK (1UL << ITS_RESERVED1_POS)
|
||||
|
||||
#define ITS_RESERVED2_POS (2UL)
|
||||
#define ITS_RESERVED2_MSK (1UL << ITS_RESERVED2_POS)
|
||||
|
||||
|
||||
#define ITS_WAIT_ANY_IRQ_MSK (0)
|
||||
|
||||
#define PSA_ITS_GET_MSK_POS (4UL)
|
||||
#define PSA_ITS_GET_MSK (1UL << PSA_ITS_GET_MSK_POS)
|
||||
#define PSA_ITS_SET_MSK_POS (5UL)
|
||||
#define PSA_ITS_SET_MSK (1UL << PSA_ITS_SET_MSK_POS)
|
||||
#define PSA_ITS_INFO_MSK_POS (6UL)
|
||||
#define PSA_ITS_INFO_MSK (1UL << PSA_ITS_INFO_MSK_POS)
|
||||
#define PSA_ITS_REMOVE_MSK_POS (7UL)
|
||||
#define PSA_ITS_REMOVE_MSK (1UL << PSA_ITS_REMOVE_MSK_POS)
|
||||
#define PSA_ITS_RESET_MSK_POS (8UL)
|
||||
#define PSA_ITS_RESET_MSK (1UL << PSA_ITS_RESET_MSK_POS)
|
||||
|
||||
#define ITS_WAIT_ANY_SID_MSK (\
|
||||
PSA_ITS_GET_MSK | \
|
||||
PSA_ITS_SET_MSK | \
|
||||
PSA_ITS_INFO_MSK | \
|
||||
PSA_ITS_REMOVE_MSK | \
|
||||
PSA_ITS_RESET_MSK)
|
||||
|
||||
|
||||
#endif // PSA_ITS_PARTITION_H
|
|
@ -1,150 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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 "cmsis.h"
|
||||
#include "mbed_toolchain.h" /* For using MBED_ALIGN macro */
|
||||
#include "rtx_os.h"
|
||||
#include "spm_panic.h"
|
||||
#include "spm_internal.h"
|
||||
#include "psa_its_partition.h"
|
||||
#include "psa_manifest/sid.h"
|
||||
|
||||
|
||||
/* Threads stacks */
|
||||
MBED_ALIGN(8) uint8_t its_thread_stack[2048] = {0};
|
||||
|
||||
/* Threads control blocks */
|
||||
osRtxThread_t its_thread_cb = {0};
|
||||
|
||||
/* Thread attributes - for thread initialization */
|
||||
osThreadAttr_t its_thread_attr = {
|
||||
.name = "its",
|
||||
.attr_bits = 0,
|
||||
.cb_mem = &its_thread_cb,
|
||||
.cb_size = sizeof(its_thread_cb),
|
||||
.stack_mem = its_thread_stack,
|
||||
.stack_size = 2048,
|
||||
.priority = osPriorityNormal,
|
||||
.tz_module = 0,
|
||||
.reserved = 0
|
||||
};
|
||||
|
||||
spm_rot_service_t its_rot_services[ITS_ROT_SRV_COUNT] = {
|
||||
{
|
||||
.sid = PSA_ITS_GET,
|
||||
.mask = PSA_ITS_GET_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_ITS_SET,
|
||||
.mask = PSA_ITS_SET_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_ITS_INFO,
|
||||
.mask = PSA_ITS_INFO_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_ITS_REMOVE,
|
||||
.mask = PSA_ITS_REMOVE_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = true,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
{
|
||||
.sid = PSA_ITS_RESET,
|
||||
.mask = PSA_ITS_RESET_MSK,
|
||||
.partition = NULL,
|
||||
.min_version = 1,
|
||||
.min_version_policy = PSA_MINOR_VERSION_POLICY_RELAXED,
|
||||
.allow_nspe = false,
|
||||
.queue = {
|
||||
.head = NULL,
|
||||
.tail = NULL
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
static osRtxMutex_t its_mutex = {0};
|
||||
static const osMutexAttr_t its_mutex_attr = {
|
||||
.name = "its_mutex",
|
||||
.attr_bits = osMutexRecursive | osMutexPrioInherit | osMutexRobust,
|
||||
.cb_mem = &its_mutex,
|
||||
.cb_size = sizeof(its_mutex),
|
||||
};
|
||||
|
||||
|
||||
extern void its_entry(void *ptr);
|
||||
|
||||
void its_init(spm_partition_t *partition)
|
||||
{
|
||||
if (NULL == partition) {
|
||||
SPM_PANIC("partition is NULL!\n");
|
||||
}
|
||||
|
||||
partition->mutex = osMutexNew(&its_mutex_attr);
|
||||
if (NULL == partition->mutex) {
|
||||
SPM_PANIC("Failed to create mutex for secure partition its!\n");
|
||||
}
|
||||
|
||||
for (uint32_t i = 0; i < ITS_ROT_SRV_COUNT; ++i) {
|
||||
its_rot_services[i].partition = partition;
|
||||
}
|
||||
partition->rot_services = its_rot_services;
|
||||
|
||||
partition->thread_id = osThreadNew(its_entry, NULL, &its_thread_attr);
|
||||
if (NULL == partition->thread_id) {
|
||||
SPM_PANIC("Failed to create start main thread of partition its!\n");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
/* Copyright (c) 2017-2019 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
|
||||
**********************************************************************************************************************/
|
||||
|
||||
#ifndef PSA_ITS_PARTITION_ROT_SERVICES_H
|
||||
#define PSA_ITS_PARTITION_ROT_SERVICES_H
|
||||
|
||||
#define PSA_ITS_GET 0x00011A00
|
||||
#define PSA_ITS_SET 0x00011A01
|
||||
#define PSA_ITS_INFO 0x00011A02
|
||||
#define PSA_ITS_REMOVE 0x00011A03
|
||||
#define PSA_ITS_RESET 0x00011A04
|
||||
|
||||
#endif // PSA_ITS_PARTITION_ROT_SERVICES_H
|
Loading…
Reference in New Issue