Hi Roman,

 

There are plans for 'critical-section' instead of a mutex - a lightweight solution for data synchronization.

 

FF-M proposes no device sharing between partitions, hence there were no explicit lock requirements before until the interrupt get involved - there are data to be shared between FLIH and partition threads.

 

If you have the requirements right now,  you can implement one and let's see if it can be a common runtime API. Currently, only a simple SPM 'critical-section' example is created, but not for partitions:

 

https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/11607

 

BR

 

/Ken

 

From: TF-M <tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Roman Mazurak via TF-M
Sent: Monday, October 11, 2021 9:18 PM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] Mutex in SPE

 

Hi all,

 

We need a mutex to protect access to a shared resource within Platform RoT Services. Is there any plan to add implementation of mutex in TF-M? Maybe it should be a platform specific implementation?

 

Thanks,

Roman.