Hello,
We have a use case where we want to deny the CPU power off from a certain PE. The current lib/psci does not provide a way for a platform to do this. We have support to return an error from svc_off, but this does not cover the scenario where svc_off is NULL.
There are multiple ways of handling this scenario.
1. Introduce a new platform function to check if CPU_OFF is allowed on the core 2. Return an error code from the pwr_domain_off() handler and unwind the CPU_OFF request 3. Something else.
Any suggestions?
-Varun
Hi,
If CPU power off info is already known when the PSCI SMC is received in EL3, adding a platform hook early in `psci_do_cpu_off()` [1] may save rolling back any activity. It can return PSCI_E_DENIED.
[1] https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+...
On Fri, Apr 21, 2023 at 1:43 PM Varun Wadekar via TF-A < tf-a@lists.trustedfirmware.org> wrote:
Hello,
We have a use case where we want to deny the CPU power off from a certain PE. The current lib/psci does not provide a way for a platform to do this. We have support to return an error from svc_off, but this does not cover the scenario where svc_off is NULL.
There are multiple ways of handling this scenario.
- Introduce a new platform function to check if CPU_OFF is allowed on
the core 2. Return an error code from the pwr_domain_off() handler and unwind the CPU_OFF request 3. Something else.
Any suggestions?
-Varun
TF-A mailing list -- tf-a@lists.trustedfirmware.org To unsubscribe send an email to tf-a-leave@lists.trustedfirmware.org
Thanks, Okash. Yes, that is doable.
From: Okash Khawaja okash@google.com Sent: Friday, April 21, 2023 3:25 PM To: Varun Wadekar vwadekar@nvidia.com Cc: tf-a@lists.trustedfirmware.org; Bo Yan byan@nvidia.com Subject: Re: [TF-A] Allow platforms to deny CPU power off request
External email: Use caution opening links or attachments
Hi,
If CPU power off info is already known when the PSCI SMC is received in EL3, adding a platform hook early in `psci_do_cpu_off()` [1] may save rolling back any activity. It can return PSCI_E_DENIED.
[1] https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+...
On Fri, Apr 21, 2023 at 1:43 PM Varun Wadekar via TF-A <tf-a@lists.trustedfirmware.orgmailto:tf-a@lists.trustedfirmware.org> wrote: Hello,
We have a use case where we want to deny the CPU power off from a certain PE. The current lib/psci does not provide a way for a platform to do this. We have support to return an error from svc_off, but this does not cover the scenario where svc_off is NULL.
There are multiple ways of handling this scenario.
1. Introduce a new platform function to check if CPU_OFF is allowed on the core 2. Return an error code from the pwr_domain_off() handler and unwind the CPU_OFF request 3. Something else.
Any suggestions?
-Varun -- TF-A mailing list -- tf-a@lists.trustedfirmware.orgmailto:tf-a@lists.trustedfirmware.org To unsubscribe send an email to tf-a-leave@lists.trustedfirmware.orgmailto:tf-a-leave@lists.trustedfirmware.org
Hi Varun,
Could you elaborate on the use case for denying a specific PE from being turned off using CPU_OFF call? The idea of introducing a new platform hook and invoking it early sounds like a safe approach to me.
Thanks, Madhukar
From: Varun Wadekar via TF-A tf-a@lists.trustedfirmware.org Sent: Friday, April 21, 2023 11:26 AM To: Okash Khawaja okash@google.com Cc: tf-a@lists.trustedfirmware.org; Bo Yan byan@nvidia.com Subject: [TF-A] Re: Allow platforms to deny CPU power off request
Thanks, Okash. Yes, that is doable.
From: Okash Khawaja <okash@google.commailto:okash@google.com> Sent: Friday, April 21, 2023 3:25 PM To: Varun Wadekar <vwadekar@nvidia.commailto:vwadekar@nvidia.com> Cc: tf-a@lists.trustedfirmware.orgmailto:tf-a@lists.trustedfirmware.org; Bo Yan <byan@nvidia.commailto:byan@nvidia.com> Subject: Re: [TF-A] Allow platforms to deny CPU power off request
External email: Use caution opening links or attachments
Hi,
If CPU power off info is already known when the PSCI SMC is received in EL3, adding a platform hook early in `psci_do_cpu_off()` [1] may save rolling back any activity. It can return PSCI_E_DENIED.
[1] https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+...
On Fri, Apr 21, 2023 at 1:43 PM Varun Wadekar via TF-A <tf-a@lists.trustedfirmware.orgmailto:tf-a@lists.trustedfirmware.org> wrote: Hello,
We have a use case where we want to deny the CPU power off from a certain PE. The current lib/psci does not provide a way for a platform to do this. We have support to return an error from svc_off, but this does not cover the scenario where svc_off is NULL.
There are multiple ways of handling this scenario.
1. Introduce a new platform function to check if CPU_OFF is allowed on the core 2. Return an error code from the pwr_domain_off() handler and unwind the CPU_OFF request 3. Something else.
Any suggestions?
-Varun -- TF-A mailing list -- tf-a@lists.trustedfirmware.orgmailto:tf-a@lists.trustedfirmware.org To unsubscribe send an email to tf-a-leave@lists.trustedfirmware.orgmailto:tf-a-leave@lists.trustedfirmware.org
Hi,
On some Tegra platforms, there are HW limitations which expect the boot CPU to be always on. We have some safeguards in the software that issues the CPU_OFF calls, but would like to implement the restriction within TF-A.
On one particular platform, the limitation applies to non-boot CPUs too.
-Varun
From: Madhukar Pappireddy Madhukar.Pappireddy@arm.com Sent: Friday, April 21, 2023 5:40 PM To: Varun Wadekar vwadekar@nvidia.com; Okash Khawaja okash@google.com Cc: tf-a@lists.trustedfirmware.org; Bo Yan byan@nvidia.com Subject: RE: [TF-A] Re: Allow platforms to deny CPU power off request
External email: Use caution opening links or attachments
Hi Varun,
Could you elaborate on the use case for denying a specific PE from being turned off using CPU_OFF call? The idea of introducing a new platform hook and invoking it early sounds like a safe approach to me.
Thanks, Madhukar
From: Varun Wadekar via TF-A <tf-a@lists.trustedfirmware.orgmailto:tf-a@lists.trustedfirmware.org> Sent: Friday, April 21, 2023 11:26 AM To: Okash Khawaja <okash@google.commailto:okash@google.com> Cc: tf-a@lists.trustedfirmware.orgmailto:tf-a@lists.trustedfirmware.org; Bo Yan <byan@nvidia.commailto:byan@nvidia.com> Subject: [TF-A] Re: Allow platforms to deny CPU power off request
Thanks, Okash. Yes, that is doable.
From: Okash Khawaja <okash@google.commailto:okash@google.com> Sent: Friday, April 21, 2023 3:25 PM To: Varun Wadekar <vwadekar@nvidia.commailto:vwadekar@nvidia.com> Cc: tf-a@lists.trustedfirmware.orgmailto:tf-a@lists.trustedfirmware.org; Bo Yan <byan@nvidia.commailto:byan@nvidia.com> Subject: Re: [TF-A] Allow platforms to deny CPU power off request
External email: Use caution opening links or attachments
Hi,
If CPU power off info is already known when the PSCI SMC is received in EL3, adding a platform hook early in `psci_do_cpu_off()` [1] may save rolling back any activity. It can return PSCI_E_DENIED.
[1] https://review.trustedfirmware.org/plugins/gitiles/TF-A/trusted-firmware-a/+...
On Fri, Apr 21, 2023 at 1:43 PM Varun Wadekar via TF-A <tf-a@lists.trustedfirmware.orgmailto:tf-a@lists.trustedfirmware.org> wrote: Hello,
We have a use case where we want to deny the CPU power off from a certain PE. The current lib/psci does not provide a way for a platform to do this. We have support to return an error from svc_off, but this does not cover the scenario where svc_off is NULL.
There are multiple ways of handling this scenario.
1. Introduce a new platform function to check if CPU_OFF is allowed on the core 2. Return an error code from the pwr_domain_off() handler and unwind the CPU_OFF request 3. Something else.
Any suggestions?
-Varun -- TF-A mailing list -- tf-a@lists.trustedfirmware.orgmailto:tf-a@lists.trustedfirmware.org To unsubscribe send an email to tf-a-leave@lists.trustedfirmware.orgmailto:tf-a-leave@lists.trustedfirmware.org
tf-a@lists.trustedfirmware.org