mirror of https://github.com/ARMmbed/mbed-os.git
TFM: Change NS lock functions to weak
Default NS lock functions use mutex to guarantee serialization into secure world. But this mechanism doesn't support pre-rtos and interrupt-disabled. This commit changes these functions to weak so that platform can override them to provide another mechanism. This approach is just what TF-M repository is adopting. https://review.trustedfirmware.org/c/trusted-firmware-m/+/1460pull/10959/head
parent
7fd637b66b
commit
85dfc1a971
|
|
@ -42,6 +42,7 @@ static const osMutexAttr_t ns_lock_attrib = {
|
||||||
/**
|
/**
|
||||||
* \brief NS world, NS lock based dispatcher
|
* \brief NS world, NS lock based dispatcher
|
||||||
*/
|
*/
|
||||||
|
__attribute__((weak))
|
||||||
uint32_t tfm_ns_lock_dispatch(veneer_fn fn,
|
uint32_t tfm_ns_lock_dispatch(veneer_fn fn,
|
||||||
uint32_t arg0, uint32_t arg1,
|
uint32_t arg0, uint32_t arg1,
|
||||||
uint32_t arg2, uint32_t arg3)
|
uint32_t arg2, uint32_t arg3)
|
||||||
|
|
@ -70,6 +71,7 @@ uint32_t tfm_ns_lock_dispatch(veneer_fn fn,
|
||||||
/**
|
/**
|
||||||
* \brief NS world, Init NS lock
|
* \brief NS world, Init NS lock
|
||||||
*/
|
*/
|
||||||
|
__attribute__((weak))
|
||||||
enum tfm_status_e tfm_ns_lock_init()
|
enum tfm_status_e tfm_ns_lock_init()
|
||||||
{
|
{
|
||||||
if (ns_lock.init == false) {
|
if (ns_lock.init == false) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue