diff options
author | David Hu <david.hu@arm.com> | 2019-07-09 18:37:09 +0800 |
---|---|---|
committer | David Hu <david.hu@arm.com> | 2019-08-01 11:39:43 +0800 |
commit | cebca73fe0f9a55561ce39d095be52663d6c31fb (patch) | |
tree | 83260a0b28bd56cf7d59bc3b98449391971db117 | |
parent | 816610a374f1cd1ac58313c0b6cb871f14e58ff6 (diff) | |
download | trusted-firmware-m-cebca73fe0f9a55561ce39d095be52663d6c31fb.tar.gz |
Twincpu: Add dummy NS Client ID implementation
Add multi-core topology specific implementations of two NS client
ID management functions
- Add an empty tfm_nspm_configure_clients()
- Implement tfm_nspm_get_current_client_id() which returns a fixed
default ID value.
Exclude tfm_nspm.c from multi-core topology and remove directives
TFM_MULTI_CORE_TOPOLOGY from tfm_nspm.c.
Change-Id: I7be8cff7b04899cb6659e008da7a8b4b8c2796a1
Signed-off-by: David Hu <david.hu@arm.com>
-rw-r--r-- | secure_fw/core/ipc/CMakeLists.inc | 5 | ||||
-rw-r--r-- | secure_fw/core/ipc/tfm_multi_core.c | 11 | ||||
-rw-r--r-- | secure_fw/core/tfm_nspm.c | 2 |
3 files changed, 14 insertions, 4 deletions
diff --git a/secure_fw/core/ipc/CMakeLists.inc b/secure_fw/core/ipc/CMakeLists.inc index 7423927f0a..7a7290e1a2 100644 --- a/secure_fw/core/ipc/CMakeLists.inc +++ b/secure_fw/core/ipc/CMakeLists.inc @@ -47,7 +47,6 @@ elseif (TFM_PSA_API) "${SS_IPC_DIR}/../tfm_secure_api.c" "${SS_IPC_DIR}/../tfm_spm_services.c" "${SS_IPC_DIR}/../tfm_handler.c" - "${SS_IPC_DIR}/../tfm_nspm.c" "${SS_IPC_DIR}/../tfm_boot_data.c" ) @@ -56,7 +55,9 @@ elseif (TFM_PSA_API) list(APPEND SS_IPC_C_SRC "${SS_IPC_DIR}/tfm_rpc.c") list(APPEND SS_IPC_C_SRC "${SS_IPC_DIR}/tfm_spe_mailbox.c") list(APPEND SS_IPC_C_SRC "${SS_IPC_DIR}/tfm_multi_core.c") - endif () + else() + list(APPEND SS_IPC_C_SRC "${SS_IPC_DIR}/../tfm_nspm.c") + endif() endif() diff --git a/secure_fw/core/ipc/tfm_multi_core.c b/secure_fw/core/ipc/tfm_multi_core.c index 02e8778cc9..69b575b429 100644 --- a/secure_fw/core/ipc/tfm_multi_core.c +++ b/secure_fw/core/ipc/tfm_multi_core.c @@ -12,6 +12,17 @@ #include "tfm_nspm.h" #include "tfm_spe_mailbox.h" +#define DEFAULT_NS_CLIENT_ID (-1) + +void tfm_nspm_configure_clients(void) +{ +} + +int32_t tfm_nspm_get_current_client_id(void) +{ + return DEFAULT_NS_CLIENT_ID; +} + psa_status_t tfm_nspm_thread_entry(void) { #ifdef TFM_CORE_DEBUG diff --git a/secure_fw/core/tfm_nspm.c b/secure_fw/core/tfm_nspm.c index 6e3dfb6be8..6753dba77a 100644 --- a/secure_fw/core/tfm_nspm.c +++ b/secure_fw/core/tfm_nspm.c @@ -73,7 +73,6 @@ int32_t tfm_nspm_get_current_client_id() } } -#if !TFM_MULTI_CORE_TOPOLOGY /* TF-M implementation of the CMSIS TZ RTOS thread context management API */ /// Initialize secure context memory system @@ -323,4 +322,3 @@ psa_status_t tfm_nspm_thread_entry(void) return PSA_SUCCESS; } #endif -#endif |