Here is what I could find on Zephyr:

https://docs.zephyrproject.org/1.14.1/reference/power_management/index.html

 

Any thoughts from anybody on this topic.

 

thanks

Suresh Marisetty

Infineon Semiconductor Corporation

 

From: Anton Komlev <Anton.Komlev@arm.com>
Sent: Thursday, January 13, 2022 2:19 AM
To: Joseph Yiu <Joseph.Yiu@arm.com>; Marisetty Suresh (CYSC CSS ICW SW SSE) <Suresh.Marisetty@infineon.com>
Subject: RE: Power management and TFM

 

Caution: This e-mail originated outside Infineon Technologies. Do not click on links or open attachments unless you validate it is safe.

 

Hi Suresh,

 

As you noted, the power management topic is not covered by TF-M, leaving it for a platform or project level handling. Would you like to discuss the topic on TF-M Tech Forum and check what community thinks about it?

 

Best regards,

Anton

 

From: Joseph Yiu <Joseph.Yiu@arm.com>
Sent: Wednesday, January 12, 2022 8:52 PM
To: Suresh.Marisetty@infineon.com; Anton Komlev <Anton.Komlev@arm.com>
Subject: RE: Power management and TFM

 

Hi Suresh,

> Power management does have an impact on security flows and how it is done. 

Agree.

 

> Not sure if there is a standardized framework and application note on how it can be done on Corte-M with or without Secure Enclave model

Unfortunately there is no standardization of power management interface for Cortex-M systems today.

And given that the low power implementation varies between different vendors significantly, trying to define a power control interface is going to be very challenging.

 

By the way, I noticed you reply to me only. Is that intentional or would you want to have this conversation on the email list?

Regards,

Joseph

 

 

From: Suresh.Marisetty@infineon.com <Suresh.Marisetty@infineon.com>
Sent: 12 January 2022 18:58
To: Joseph Yiu <Joseph.Yiu@arm.com>
Cc: nd <nd@arm.com>
Subject: RE: Power management and TFM

 

HI Anton and Joseph,

 

Power management does have an impact on security flows and how it is done.  This is a town down architecture/implementation starting with NSPE and down with expected behavior of SPE (secure boot, TFM context management, etc.), cold boot, warm boot, deep-sleep, hibernate and active modes.

 

On the Cortex-A, there is PSCI framework couple with ACPI.  Not sure if there is a standardized framework and application note on how it can be done on Corte-M with or without Secure Enclave model.

 

thanks

Suresh Marisetty

Infineon Semiconductor Corporation

 

From: TF-M <tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Joseph Yiu via TF-M
Sent: Monday, December 20, 2021 8:04 AM
To: tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: Re: [TF-M] Power management and TFM

 

Caution: This e-mail originated outside Infineon Technologies. Do not click on links or open attachments unless you validate it is safe.

 

Hi Suresh, Anton,

 

This is an interesting topic :-)

Armv8-M processors has some power management registers that can be restricted to Secure world access only.

System Control Register (SCR)

- Bit 2 SLEEPDEEP – 0 = Normal Sleep, 1 = Deep Sleep (this can also enable WIC feature). Access permission depends on SLEEPDEEPS.

- Bit 3 SLEEPDEEPS – 0 – NS privileged world can r/w to SLEEPDEEP, 1 – SLEEPDEEP is RAZ/WI to NS privileged world

(This is applicable to Cortex-M23, Cortex-M33, Cortex-M35P, Cortex-M55)

 

Cortex-M55 also has Implementation defined power model control registers (CPDLPSTATE, DPDLPSTATE)

https://developer.arm.com/documentation/101273/0101/Cortex-M55-Processor-level-components-and-system-registers---Reference-Material/Implementation-defined-power-mode-control

If TrustZone is used (AIRCR.BFHFNMINS is 0), then these registers are Secure privileged access only.

 

So definitely Secure firmware should provide some APIs for Non-secure software for changing the power control settings. However, I would expect that power control APIs would likely to be at a higher level which also manage other system level power control functions (which, as Anton said, device specific). In such case having APIs for modifying SLEEPDEEP and power model control registers is not helpful (or might even end up with confusions – e.g. if a SW developer trying to use both low level and high level APIs at the same time).

 

Given that a Secure firmware can setup SLEEPDEEPS easily if it wants to allow/disallow access to SLEEPDEEP control, having an API for this might be overkill.

Access to Cortex-M55’s power model control registers is more tricky. Would an ‘optional’ reference API for updating power model control registers (CPDLPSTATE, DPDLPSTATE) be considered?

 

Regards,

Joseph

 

 

From: TF-M <tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Anton Komlev via TF-M
Sent: 20 December 2021 12:32
To: tf-m@lists.trustedfirmware.org
Cc: nd <nd@arm.com>
Subject: Re: [TF-M] Power management and TFM

 

Hi Suresh,

 

The power management is out of scope of TF-M core or any PSA service. Such functionality is HW platform specific and may vary depending on HW or SW adaptation capabilities. If you concern about a specific use case, where TF-M support is expected – let’s discuss it here.

 

Hope that helps,

Anton

 

 

From: TF-M <tf-m-bounces@lists.trustedfirmware.org> On Behalf Of Suresh Marisetty via TF-M
Sent: Friday, December 17, 2021 8:11 PM
To: tf-m@lists.trustedfirmware.org
Subject: [TF-M] Power management and TFM

 

Hi,

 

Wondering if anybody can throw some light on any ongoing efforts on power management on a system with TFM (deep sleep, etc).

 

 

thanks

Suresh Marisetty

Infineon Semiconductor Corporation

CYSC CSS ICW SW SSE

Mobile: +5103863997
Suresh.Marisetty@infineon.com

 

 

IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.