Hi Roman,

 

Assuming you are referring to the 5 PSA client APIs.

The APIs implementations are totally different between NS/S sides.

And even also different within NS/S side.

For example, in the Secure side, depends on the isolation level and IPC/SFN backend, the APIs have 3 different implementations (SFN call, cross call and SVC call).

For NS side, if the platform’s using TrustZone, then the APIs go through the veneer sections.

And if it’s a multi-core platform, the APIs might go through the mailbox interfaces.

 

I don’t think they can be shared as a static library.

Even the code is the same between NS and S, it is still better to compile them separately as there could be compilation setting differences between NS and S.

Sometimes, NS and S even have different architectures which makes the compilation settings totally different.

 

-Kevin

 

From: Roman.Mazurak--- via TF-M <tf-m@lists.trustedfirmware.org>
Sent: Tuesday, July 11, 2023 11:26 PM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] Why client API is built with tfm_sprt target?

 

Hi all,

 

I’m wondering why client API is build with tfm_sprt target (Secure Partition Runtime Library)? Client API is used by non-secure clients and secure clients. It means that static library is built once, but used with two different images. And it’s expected that such images can use different types of cores, compilation settings, etc…

 

Probably it make sense to build this target in scope of psa_interface.

 

Regards,

Roman.