Hi Bob,

 

It’s been a long time since I’ve worked with the SDS, so my information might be a bit out of date, but…

 

SDS structures use a one-shot single-writer/multiple-reader model. Readers may only read from an SDS structure after it has been finalised (which is indicated by the validity flag you mentioned), at which point the writer may make no further modifications to the structure – it becomes immutable. As such, once the structure has been finalised, mutual exclusion is no longer necessary and no further locking mechanism is needed.

 

At the region level, the signature serves as the equivalent of the validity flag – readers must not trust any data in the region until the signature has been correctly initialised.

 

Regards,

Chris

 

From: Deng Bob via TF-A <tf-a@lists.trustedfirmware.org>
Date: Friday, 27 September 2024 at 02:53
To: tf-a@lists.trustedfirmware.org <tf-a@lists.trustedfirmware.org>
Subject: [TF-A] About the SDS usage model

Hi all,

 

I am trying to raise a question about SDS.  

As you know, SDS (Shared data storage) is used to communicate or exhcange info among different  processor units like AP, SCP, RSE, etc.

 

So, do we need to add some lock mechanisms to protect the data when one processor entity is accessing it? After I reviewed the  open source Trusted Firmware and SCP firmware

it looks to me that  both Trusted Firmware and SCP directly access the shared memory region without any limitation. Currently, it just uses the 'valid' flag to identify if the data is ready to use,

is this good enough?

 

Looking forwared to your response!   Thank you!!!

 

 

Best Regards,

Bob