diff options
author | danh-arm <dan.handley@arm.com> | 2016-07-26 14:34:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-26 14:34:13 +0100 |
commit | fabd0a864a09ab6024db2cac0a4929b443a72640 (patch) | |
tree | fbddd292aacd76eef9490d8262879c382aa243fc /lib/psci/psci_main.c | |
parent | 3dd9835f8ab3c2e7f57ddc92505d6c800bbacd47 (diff) | |
parent | 7b6d330c92d31c82e2dce47ae1f9dccb95b8bbd7 (diff) |
Merge pull request #669 from sandrine-bailleux-arm/sb/tf-hardening
Minor improvements to harden TF code
Diffstat (limited to 'lib/psci/psci_main.c')
-rw-r--r-- | lib/psci/psci_main.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/psci/psci_main.c b/lib/psci/psci_main.c index d412be3c..3ad3dd40 100644 --- a/lib/psci/psci_main.c +++ b/lib/psci/psci_main.c @@ -97,6 +97,10 @@ int psci_cpu_suspend(unsigned int power_state, == PSCI_E_SUCCESS); target_pwrlvl = psci_find_target_suspend_lvl(&state_info); + if (target_pwrlvl == PSCI_INVALID_PWR_LVL) { + ERROR("Invalid target power level for suspend operation\n"); + panic(); + } /* Fast path for CPU standby.*/ if (is_cpu_standby_req(is_power_down_state, target_pwrlvl)) { |