Skip to content

Commit 5dbb8fe

Browse files
Oren CohenMichael Schwarcz
authored andcommitted
Call tfm_ns_lock_init() on TFM NSPE boot
1 parent cf3fd85 commit 5dbb8fe

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

rtos/TARGET_CORTEX/mbed_rtos_rtx.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
#include "spm_init.h"
2929
#include "spm_api.h"
3030
#endif
31+
#if defined(TARGET_TFM) && defined(COMPONENT_NSPE)
32+
#include "TARGET_TFM/interface/include/tfm_ns_lock.h"
33+
#endif
3134

3235
#if defined(COMPONENT_NSPE) && defined(COMPONENT_SPM_MAILBOX)
3336

@@ -98,9 +101,12 @@ MBED_NORETURN void mbed_rtos_start()
98101
MBED_ERROR1(MBED_MAKE_ERROR(MBED_MODULE_PLATFORM, MBED_ERROR_CODE_INITIALIZATION_FAILED), "Dispatcher thread not created", &psa_spm_dispatcher_th_attr);
99102
}
100103
#endif // defined(COMPONENT_NSPE) && defined(COMPONENT_SPM_MAILBOX)
101-
102104
#endif // defined(TARGET_MBED_SPM)
103105

106+
#if defined(TARGET_TFM) && defined(COMPONENT_NSPE)
107+
tfm_ns_lock_init();
108+
#endif // defined(TARGET_TFM) && defined(COMPONENT_NSPE)
109+
104110
singleton_mutex_id = osMutexNew(&singleton_mutex_attr);
105111
osThreadId_t result = osThreadNew((osThreadFunc_t)mbed_start, NULL, &_main_thread_attr);
106112
if ((void *)result == NULL) {

0 commit comments

Comments
 (0)