mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-27 07:15:20 +00:00
feat(psci): require validate_power_state to expose CPU_SUSPEND
psci_cpu_suspend unconditionally calls psci_validate_power_state, which asserts that the platform implements ops->validate_power_state. To avoid a failure at runtime, do not expose CPU_SUSPEND unless that callback is implemented. This also allows a platform to provide SYSTEM_SUSPEND without providing CPU_SUSPEND. Signed-off-by: Samuel Holland <samuel@sholland.org> Change-Id: I5dafb7845f482ab3af03a9de562def41dd70189e
This commit is contained in:
parent
02d36a92fc
commit
a1d5ac6a5a
1 changed files with 2 additions and 1 deletions
|
@ -250,6 +250,7 @@ int __init psci_setup(const psci_lib_args_t *lib_args)
|
|||
psci_caps |= define_psci_cap(PSCI_CPU_ON_AARCH64);
|
||||
if ((psci_plat_pm_ops->pwr_domain_suspend != NULL) &&
|
||||
(psci_plat_pm_ops->pwr_domain_suspend_finish != NULL)) {
|
||||
if (psci_plat_pm_ops->validate_power_state != NULL)
|
||||
psci_caps |= define_psci_cap(PSCI_CPU_SUSPEND_AARCH64);
|
||||
if (psci_plat_pm_ops->get_sys_suspend_power_state != NULL)
|
||||
psci_caps |= define_psci_cap(PSCI_SYSTEM_SUSPEND_AARCH64);
|
||||
|
|
Loading…
Add table
Reference in a new issue