aboutsummaryrefslogtreecommitdiff
path: root/secure_fw
diff options
context:
space:
mode:
authorDavid Hu <david.hu@arm.com>2020-05-11 15:37:54 +0800
committerDavid Hu <david.hu@arm.com>2020-08-12 14:49:40 +0800
commitf1e36e8f7a2268d912d06bdce850c33e9bd63a91 (patch)
tree09ca3dd7f67501261996415dae05ad305900eca6 /secure_fw
parent675286d6ffd8703ae7f0debf76f286abb89a0843 (diff)
downloadtrusted-firmware-m-f1e36e8f7a2268d912d06bdce850c33e9bd63a91.tar.gz
Test: Simplify dual-cpu lightweight NS multi-thread test
Call psa_framework_version() in lightweight NS multi-thread test case in dual-cpu test, instead of calling a dedicated test secure partition. It can simplify the test process and shorten the client call execution, which fit the lightweight test requirement more. It also decreases the memory footprint. Remove the dedicated test secure partition from SPE. Update the manifest files. Change-Id: Iedb2e1f83ab55c5040eca411e501c33588690d9b Signed-off-by: David Hu <david.hu@arm.com>
Diffstat (limited to 'secure_fw')
-rw-r--r--secure_fw/partitions/tfm_service_list.inc41
-rw-r--r--secure_fw/spm/cmsis_func/tfm_secure_irq_handlers.inc1
-rw-r--r--secure_fw/spm/cmsis_func/tfm_spm_db_func.inc49
-rw-r--r--secure_fw/spm/cmsis_func/tfm_veneers.c8
-rw-r--r--secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc1
-rw-r--r--secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc66
6 files changed, 0 insertions, 166 deletions
diff --git a/secure_fw/partitions/tfm_service_list.inc b/secure_fw/partitions/tfm_service_list.inc
index a0d4e72c04..a9fe93dd3e 100644
--- a/secure_fw/partitions/tfm_service_list.inc
+++ b/secure_fw/partitions/tfm_service_list.inc
@@ -24,7 +24,6 @@
#include "test/test_services/tfm_irq_test_service_1/psa_manifest/tfm_irq_test_service_1.h"
#include "test/test_services/tfm_ps_test_service/psa_manifest/tfm_ps_test_service.h"
#include "test/test_services/tfm_secure_client_2/psa_manifest/tfm_secure_client_2.h"
-#include "test/test_services/tfm_multi_core_test/psa_manifest/tfm_multi_core_test.h"
const struct tfm_spm_service_db_t service_db[] =
{
@@ -503,28 +502,6 @@ const struct tfm_spm_service_db_t service_db[] =
},
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
- /******** TFM_SP_MULTI_CORE_TEST ********/
- {
- .name = "MULTI_CORE_MULTI_CLIENT_CALL_TEST_0",
- .partition_id = TFM_SP_MULTI_CORE_TEST,
- .signal = MULTI_CORE_MULTI_CLIENT_CALL_TEST_0_SIGNAL,
- .sid = 0x0000F100,
- .non_secure_client = true,
- .version = 1,
- .version_policy = TFM_VERSION_POLICY_STRICT
- },
- {
- .name = "MULTI_CORE_MULTI_CLIENT_CALL_TEST_1",
- .partition_id = TFM_SP_MULTI_CORE_TEST,
- .signal = MULTI_CORE_MULTI_CLIENT_CALL_TEST_1_SIGNAL,
- .sid = 0x0000F101,
- .non_secure_client = true,
- .version = 1,
- .version_policy = TFM_VERSION_POLICY_STRICT
- },
-#endif /* TFM_MULTI_CORE_TEST */
-
};
/**************************************************************************/
@@ -913,24 +890,6 @@ struct tfm_spm_service_t service[] =
},
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
- /******** TFM_SP_MULTI_CORE_TEST ********/
- {
- .service_db = NULL,
- .partition = NULL,
- .handle_list = {0},
- .msg_queue = {0},
- .list = {0},
- },
- {
- .service_db = NULL,
- .partition = NULL,
- .handle_list = {0},
- .msg_queue = {0},
- .list = {0},
- },
-#endif /* TFM_MULTI_CORE_TEST */
-
};
#endif /* __TFM_SERVICE_LIST_INC__ */
diff --git a/secure_fw/spm/cmsis_func/tfm_secure_irq_handlers.inc b/secure_fw/spm/cmsis_func/tfm_secure_irq_handlers.inc
index 8c35661d3f..88997f237a 100644
--- a/secure_fw/spm/cmsis_func/tfm_secure_irq_handlers.inc
+++ b/secure_fw/spm/cmsis_func/tfm_secure_irq_handlers.inc
@@ -21,7 +21,6 @@
#include "test/test_services/tfm_irq_test_service_1/psa_manifest/tfm_irq_test_service_1.h"
#include "test/test_services/tfm_ps_test_service/psa_manifest/tfm_ps_test_service.h"
#include "test/test_services/tfm_secure_client_2/psa_manifest/tfm_secure_client_2.h"
-#include "test/test_services/tfm_multi_core_test/psa_manifest/tfm_multi_core_test.h"
#include "psa_manifest/pid.h"
/* Definitions of the signals of the IRQs */
diff --git a/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc b/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc
index d33a12d90d..369ef41dcf 100644
--- a/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc
+++ b/secure_fw/spm/cmsis_func/tfm_spm_db_func.inc
@@ -71,10 +71,6 @@
#define TFM_PARTITION_TFM_SP_SECURE_CLIENT_2_IRQ_COUNT 0
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
-#define TFM_PARTITION_TFM_SP_MULTI_CORE_TEST_IRQ_COUNT 0
-#endif /* TFM_MULTI_CORE_TEST */
-
/**************************************************************************/
/** Declarations of partition init functions */
/**************************************************************************/
@@ -134,10 +130,6 @@ extern void tfm_ps_test_init(void);
extern void tfm_secure_client_2_init(void);
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
-extern void multi_core_test_main(void);
-#endif /* TFM_MULTI_CORE_TEST */
-
/**************************************************************************/
/** Context stacks for IRQ handling */
/**************************************************************************/
@@ -282,15 +274,6 @@ static uint32_t ctx_stack_TFM_SP_SECURE_CLIENT_2[
)) / sizeof(uint32_t)];
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
-static uint32_t ctx_stack_TFM_SP_MULTI_CORE_TEST[
- (sizeof(struct interrupted_ctx_stack_frame_t) +
- (TFM_PARTITION_TFM_SP_MULTI_CORE_TEST_IRQ_COUNT) * (
- sizeof(struct interrupted_ctx_stack_frame_t) +
- sizeof(struct handler_ctx_stack_frame_t)
- )) / sizeof(uint32_t)];
-#endif /* TFM_MULTI_CORE_TEST */
-
uint32_t *ctx_stack_list[] =
{
ns_interrupt_ctx_stack,
@@ -337,9 +320,6 @@ uint32_t *ctx_stack_list[] =
#ifdef TFM_PARTITION_TEST_SECURE_SERVICES
ctx_stack_TFM_SP_SECURE_CLIENT_2,
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
- ctx_stack_TFM_SP_MULTI_CORE_TEST,
-#endif /* TFM_MULTI_CORE_TEST */
};
/**************************************************************************/
@@ -630,19 +610,6 @@ const struct spm_partition_static_data_t static_data_list[] =
},
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
- {
- .partition_id = TFM_SP_MULTI_CORE_TEST,
- .partition_flags = SPM_PART_FLAG_IPC
- | SPM_PART_FLAG_APP_ROT
- ,
- .partition_priority = TFM_PRIORITY(NORMAL),
- .partition_init = multi_core_test_main,
- .dependencies_num = 0,
- .p_dependencies = NULL,
- },
-#endif /* TFM_MULTI_CORE_TEST */
-
};
/**************************************************************************/
@@ -747,10 +714,6 @@ const struct tfm_spm_partition_platform_data_t **platform_data_list_list[] =
NULL,
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
- NULL,
-#endif /* TFM_MULTI_CORE_TEST */
-
};
/**************************************************************************/
@@ -929,18 +892,6 @@ static struct spm_partition_desc_t partition_list [] =
},
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
- /* -----------------------------------------------------------------------*/
- /* - Partition DB record for TFM_SP_MULTI_CORE_TEST */
- /* -----------------------------------------------------------------------*/
-#ifdef TFM_MULTI_CORE_TEST
- {
- /* Runtime data */
- .runtime_data = {0},
- .static_data = NULL,
- .platform_data_list = NULL,
- },
-#endif /* TFM_MULTI_CORE_TEST */
-
};
struct spm_partition_db_t g_spm_partition_db = {
diff --git a/secure_fw/spm/cmsis_func/tfm_veneers.c b/secure_fw/spm/cmsis_func/tfm_veneers.c
index b58fca5cda..315f752587 100644
--- a/secure_fw/spm/cmsis_func/tfm_veneers.c
+++ b/secure_fw/spm/cmsis_func/tfm_veneers.c
@@ -163,10 +163,6 @@ psa_status_t tfm_ps_test_prepare(psa_invec *, size_t, psa_outvec *, size_t);
psa_status_t tfm_secure_client_2_call(psa_invec *, size_t, psa_outvec *, size_t);
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
-/******** TFM_SP_MULTI_CORE_TEST ********/
-#endif /* TFM_MULTI_CORE_TEST */
-
#define TFM_VENEER_FUNCTION(partition_name, sfn_name) \
__tfm_secure_gateway_attributes__ \
@@ -336,7 +332,3 @@ TFM_VENEER_FUNCTION(TFM_SP_PS_TEST, tfm_ps_test_prepare)
TFM_VENEER_FUNCTION(TFM_SP_SECURE_CLIENT_2, tfm_secure_client_2_call)
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
-/******** TFM_SP_MULTI_CORE_TEST ********/
-#endif /* TFM_MULTI_CORE_TEST */
-
diff --git a/secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc b/secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc
index 65fba46272..5a5e7d04a0 100644
--- a/secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc
+++ b/secure_fw/spm/cmsis_psa/tfm_secure_irq_handlers_ipc.inc
@@ -21,7 +21,6 @@
#include "test/test_services/tfm_irq_test_service_1/psa_manifest/tfm_irq_test_service_1.h"
#include "test/test_services/tfm_ps_test_service/psa_manifest/tfm_ps_test_service.h"
#include "test/test_services/tfm_secure_client_2/psa_manifest/tfm_secure_client_2.h"
-#include "test/test_services/tfm_multi_core_test/psa_manifest/tfm_multi_core_test.h"
#include "cmsis_compiler.h"
/* Definitions of the signals of the IRQs (if any) */
diff --git a/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc b/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc
index c261578c17..51169fc2e5 100644
--- a/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc
+++ b/secure_fw/spm/cmsis_psa/tfm_spm_db_ipc.inc
@@ -71,10 +71,6 @@
#define TFM_PARTITION_TFM_SP_SECURE_CLIENT_2_IRQ_COUNT 0
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
-#define TFM_PARTITION_TFM_SP_MULTI_CORE_TEST_IRQ_COUNT 0
-#endif /* TFM_MULTI_CORE_TEST */
-
/**************************************************************************/
/** Declarations of partition init functions */
/**************************************************************************/
@@ -136,10 +132,6 @@ extern void tfm_ps_test_init(void);
extern void tfm_secure_client_2_init(void);
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
-extern void multi_core_test_main(void);
-#endif /* TFM_MULTI_CORE_TEST */
-
/**************************************************************************/
/** Memory region declarations */
/**************************************************************************/
@@ -328,19 +320,6 @@ REGION_DECLARE(Image$$, TFM_SP_SECURE_CLIENT_2_LINKER, _STACK$$ZI$$Base);
REGION_DECLARE(Image$$, TFM_SP_SECURE_CLIENT_2_LINKER, _STACK$$ZI$$Limit);
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
-REGION_DECLARE(Image$$, TFM_SP_MULTI_CORE_TEST_LINKER, $$Base);
-REGION_DECLARE(Image$$, TFM_SP_MULTI_CORE_TEST_LINKER, $$Limit);
-REGION_DECLARE(Image$$, TFM_SP_MULTI_CORE_TEST_LINKER, $$RO$$Base);
-REGION_DECLARE(Image$$, TFM_SP_MULTI_CORE_TEST_LINKER, $$RO$$Limit);
-REGION_DECLARE(Image$$, TFM_SP_MULTI_CORE_TEST_LINKER, _DATA$$RW$$Base);
-REGION_DECLARE(Image$$, TFM_SP_MULTI_CORE_TEST_LINKER, _DATA$$RW$$Limit);
-REGION_DECLARE(Image$$, TFM_SP_MULTI_CORE_TEST_LINKER, _DATA$$ZI$$Base);
-REGION_DECLARE(Image$$, TFM_SP_MULTI_CORE_TEST_LINKER, _DATA$$ZI$$Limit);
-REGION_DECLARE(Image$$, TFM_SP_MULTI_CORE_TEST_LINKER, _STACK$$ZI$$Base);
-REGION_DECLARE(Image$$, TFM_SP_MULTI_CORE_TEST_LINKER, _STACK$$ZI$$Limit);
-#endif /* TFM_MULTI_CORE_TEST */
-
/**************************************************************************/
/** Dependencies array for Secure Partition */
/**************************************************************************/
@@ -645,20 +624,6 @@ const struct partition_static_t static_data_list[] =
},
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
- {
- .psa_framework_version = 0x0100,
- .partition_id = TFM_SP_MULTI_CORE_TEST,
- .partition_flags = SPM_PART_FLAG_IPC
- | SPM_PART_FLAG_APP_ROT
- ,
- .partition_priority = TFM_PRIORITY(NORMAL),
- .partition_init = multi_core_test_main,
- .dependencies_num = 0,
- .p_dependencies = NULL,
- },
-#endif /* TFM_MULTI_CORE_TEST */
-
};
/**************************************************************************/
@@ -762,10 +727,6 @@ const struct tfm_spm_partition_platform_data_t **platform_data_list_list[] =
NULL,
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
- NULL,
-#endif /* TFM_MULTI_CORE_TEST */
-
};
/**************************************************************************/
@@ -988,21 +949,6 @@ const struct tfm_spm_partition_memory_data_t memory_data_list[] =
},
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
-#ifdef TFM_MULTI_CORE_TEST
- {
- .code_start = PART_REGION_ADDR(TFM_SP_MULTI_CORE_TEST_LINKER, $$Base),
- .code_limit = PART_REGION_ADDR(TFM_SP_MULTI_CORE_TEST_LINKER, $$Limit),
- .ro_start = PART_REGION_ADDR(TFM_SP_MULTI_CORE_TEST_LINKER, $$RO$$Base),
- .ro_limit = PART_REGION_ADDR(TFM_SP_MULTI_CORE_TEST_LINKER, $$RO$$Limit),
- .rw_start = PART_REGION_ADDR(TFM_SP_MULTI_CORE_TEST_LINKER, _DATA$$RW$$Base),
- .rw_limit = PART_REGION_ADDR(TFM_SP_MULTI_CORE_TEST_LINKER, _DATA$$RW$$Limit),
- .zi_start = PART_REGION_ADDR(TFM_SP_MULTI_CORE_TEST_LINKER, _DATA$$ZI$$Base),
- .zi_limit = PART_REGION_ADDR(TFM_SP_MULTI_CORE_TEST_LINKER, _DATA$$ZI$$Limit),
- .stack_bottom = PART_REGION_ADDR(TFM_SP_MULTI_CORE_TEST_LINKER, _STACK$$ZI$$Base),
- .stack_top = PART_REGION_ADDR(TFM_SP_MULTI_CORE_TEST_LINKER, _STACK$$ZI$$Limit),
- },
-#endif /* TFM_MULTI_CORE_TEST */
-
};
/**************************************************************************/
@@ -1180,18 +1126,6 @@ static struct partition_t partition_list [] =
},
#endif /* TFM_PARTITION_TEST_SECURE_SERVICES */
- /* -----------------------------------------------------------------------*/
- /* - Partition DB record for TFM_SP_MULTI_CORE_TEST */
- /* -----------------------------------------------------------------------*/
-#ifdef TFM_MULTI_CORE_TEST
- {
- /* Runtime data */
- .runtime_data = {0},
- .static_data = NULL,
- .platform_data_list = NULL,
- },
-#endif /* TFM_MULTI_CORE_TEST */
-
};
struct spm_partition_db_t g_spm_partition_db = {