Hi Brian,

 

The TF-M release notes capture the TF-M memory usage on one of the Arm reference platforms. Refer - https://trustedfirmware-m.readthedocs.io/en/latest/releases/2.0.0.html

 

It is probably worth comparing the flash and RAM usage of individual components in ARoTless and Medium Profiles*. Both profile include almost identical services (except Protected Storage). However, ARoTless uses SFN Isolation level1 while medium profile uses IPC isolation level2.

From my understanding, SFN which is function call based is supposedly more light weight in terms of performance and memory compared to the IPC mode. Due to limited security guarantees provided by SFN, it is recommended to be used only in isolation level1. You might already know all this.

 

The PSA FF-M API calls are more expensive when in IPC mode compared to SFN model. The squad dashboard here tracks the cycle count for the various FF-M PSA API calls for IPC and SFN for various isolation levels.

https://qa-reports.linaro.org/tf/tf-m/metrics/?environment=CoreIPC&environment=Default&environment=CoreIPCTfmLevel2&environment=DefaultProfileM&environment=DefaultProfileS&metric=:summary:

 

The required build environment and API calls can be selected in the dashboard. I have selected a few for your reference - https://qa-reports.linaro.org/tf/tf-m/metrics/?environment=PERF-AN521-GCC-Level1-SFN-Release&environment=PERF-AN521-GCC-Level1-IPC-Release&environment=PERF-AN521-GCC-Level2-IPC-Release&metric=:summary:&metric=ns_psa_call&metric=ns_psa_connect&metric=ns_psa_close&metric=ns_psa_call_stateless&metric=s_psa_call&range_ns_psa_connect=96,100

 

Regards,

Shebu

 

 

* https://trustedfirmware-m.readthedocs.io/en/latest/configuration/profiles/tfm_profile_medium_arot-less.html

https://trustedfirmware-m.readthedocs.io/en/latest/configuration/profiles/tfm_profile_medium.html  

 

From: Antonio De Angelis via TF-M <tf-m@lists.trustedfirmware.org>
Sent: Thursday, January 18, 2024 9:34 AM
To: tf-m@lists.trustedfirmware.org; Quach, Brian <brian@ti.com>
Subject: [TF-M] Re: SFN vs IPC partition with IPC backend

 

Hi Brian,

 

some numbers have been shared in this presentation from a while ago:

 

Microsoft PowerPoint - TF-M Performance Improvement in v1.5.0.pptx (trustedfirmware.org)

I believe there should be more updated numbers on more recent  versions, but I don't seem to find them, maybe somebody else with more updated benchmarking can help here.

 

Thanks,

Antonio


From: Quach, Brian via TF-M <tf-m@lists.trustedfirmware.org>
Sent: Thursday, January 18, 2024 00:26
To: tf-m@lists.trustedfirmware.org <tf-m@lists.trustedfirmware.org>
Subject: [TF-M] SFN vs IPC partition with IPC backend

 

If using IPC backend, how much performance and/or memory savings is there when using SFN vs IPC partition model? 

 

I saw FF-M v1.1 recommended SFN partition model but it was not clear to me why it was preferred.

 

Regards,

 

Brian Quach

SimpleLink MCU

Texas Instruments Inc.

12500 TI Blvd, MS F-4000

Dallas, TX 75243

214-479-4076