Skip to content

Commit e89c1a6

Browse files
Michael SchwarczOren Cohen
authored andcommitted
TF-M patch: Fix tfm_ns_lock_init issue (TF-M issue #239)
- Link to bug tracking: https://developer.trustedfirmware.org/T239 (cherry picked from commit 5f2e4b3)
1 parent 185d286 commit e89c1a6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

components/TARGET_PSA/TARGET_TFM/COMPONENT_NSPE/interface/src/tfm_ns_lock_rtx.c

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
*/
77
#include <stdint.h>
88
#include <stdbool.h>
9-
9+
#include "cmsis.h"
10+
#include "rtx_os.h"
1011
#include "cmsis_os2.h"
11-
1212
#include "tfm_api.h"
1313
#include "tfm_ns_lock.h"
1414

@@ -29,9 +29,14 @@ static struct ns_lock_state ns_lock = {.init=false, .id=NULL};
2929
/**
3030
* \brief Mutex properties, NS lock
3131
*/
32+
33+
static osRtxMutex_t ns_lock_cb = { 0 };
34+
3235
static const osMutexAttr_t ns_lock_attrib = {
3336
.name = "ns_lock",
34-
.attr_bits = osMutexPrioInherit
37+
.attr_bits = osMutexPrioInherit,
38+
.cb_mem = &ns_lock_cb,
39+
.cb_size = sizeof(ns_lock_cb)
3540
};
3641

3742
/**

0 commit comments

Comments
 (0)