Hi Sebastian,

 

The specification writer looks not here these two days, let me try to explain it based on my understanding.

 

I think two specs both recommend clearing general runtime data while resetting. If the booting runtime clearing code can clear the RAM data for a specific platform, the memory clearing in the 'tfm_spm_hal_system_reset ' can be skipped. Basically, simple hardware reset triggering is just fine.

 

The special-purpose memory to be retained during resetting is not a generic runtime memory, hence they need to be treated specially, such as putting them in a special bank or region and skipping clearing them during booting. This special region can be treated as a private asset of one service, which could NOT be shared between components for direct access. The owner service provides the functionality around this asset.

 

Please put more comments or corrections, thanks.

 

/Ken

 

From: TF-M <tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Sebastian Bøe via TF-M
Sent: Monday, October 25, 2021 3:16 PM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] System reset

 

Hi,

 

I would like some clarification about system reset.

 

There are these two statements about it in the PSM and PSA-FF:

 

"No run-time state from before the reset should be retained or
used, except where necessary if suspend or hibernate are supported,
see section 4.6." -- PSM page 22.


"A Secure Partition may have state maintained on behalf of clients
that will be destroyed when restarting the service." -- PSA-FF page
47.

Is it the responsibility of tfm_spm_hal_system_reset to destroy this state

or is it OK to destroy it after reset as a part of the C runtime startup procedure?

 

I assume for instance that PRoT .bss is cleared as a part of the C runtime startup

procedure, but should it also have been destroyed

as a part of tfm_spm_hal_system_reset ?


PSM - Platform Security Model.
https://developer.arm.com/documentation/den0128/0100/

PSA-FF PSA Firmware Framework
https://armkeil.blob.core.windows.net/developer/Files/pdf/PlatformSecurityArchitecture/Architect/DEN0063-PSA_Firmware_Framework-1.0.0-2.pdf


Sebastian Bøe

Nordic Semiconductor