SPM: Enable NSPE managing client_id
TFM_NS_MANAGE_NSID build flag is added to enable NSPE
managing client_id both in library model and IPC model.
Signed-off-by: Sherry Zhnag <sherry.zhang2@arm.com>
Change-Id: I4e8d1bf8967de442787f4989d2bb8e371f78bef6
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.c b/secure_fw/spm/cmsis_psa/spm_ipc.c
old mode 100644
new mode 100755
index d78c49c..bf4fd36
--- a/secure_fw/spm/cmsis_psa/spm_ipc.c
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.c
@@ -35,6 +35,7 @@
#include "load/service_defs.h"
#include "load/asset_defs.h"
#include "load/spm_load_api.h"
+#include "tfm_nspm.h"
/* Partition and service runtime data list head/runtime data table */
static struct service_head_t services_listhead;
@@ -602,6 +603,11 @@
UNI_LISI_INIT_HEAD(PARTITION_LIST_ADDR);
UNI_LISI_INIT_HEAD(&services_listhead);
+ /* Init the nonsecure context. */
+#ifndef TFM_MULTI_CORE_TOPOLOGY
+ tfm_nspm_ctx_init();
+#endif
+
while (1) {
partition = load_a_partition_assuredly(PARTITION_LIST_ADDR);
if (partition == NO_MORE_PARTITION) {