Skip to content

Commit f6d5882

Browse files
Michael Schwarczadbridge
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 1f5fbef commit f6d5882

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

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

Lines changed: 7 additions & 4 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,11 +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",
3437
.attr_bits = osMutexPrioInherit,
35-
.cb_mem = NULL,
36-
.cb_size = 0U
38+
.cb_mem = &ns_lock_cb,
39+
.cb_size = sizeof(ns_lock_cb)
3740
};
3841

3942
/**

0 commit comments

Comments
 (0)