summaryrefslogtreecommitdiffstats
path: root/ArmPkg
diff options
context:
space:
mode:
authorJeff Brasen via groups.io <jbrasen=nvidia.com@groups.io>2023-06-29 20:46:48 +0000
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-10-18 09:00:09 +0000
commit01e1bc28943a6bd66830e8af56665dc9e4647a08 (patch)
tree6039ca6294c783efe2da651bdd22d5f299af7b7f /ArmPkg
parent772ec92577a8c786b6c9f8643fa60f1cf893bcd9 (diff)
downloadedk2-01e1bc28943a6bd66830e8af56665dc9e4647a08.tar.gz
edk2-01e1bc28943a6bd66830e8af56665dc9e4647a08.tar.bz2
edk2-01e1bc28943a6bd66830e8af56665dc9e4647a08.zip
ArmPkg/ArmPsciMpServices: Add EFI_NOT_READY return
Add EFI_NOT_READY return if the CPU can not be enabled because the processor is already on. This can occur in normal use if the CPU is still being turned off from a previous call when this is called again. Signed-off-by: Jeff Brasen <jbrasen@nvidia.com> Reviewed-by: Rebecca Cran <rebecca@bsdio.com>
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
index f822a9877c..e7f4223513 100644
--- a/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
+++ b/ArmPkg/Drivers/ArmPsciMpServicesDxe/ArmPsciMpServicesDxe.c
@@ -103,7 +103,9 @@ DispatchCpu (
ArmCallSmc (&Args);
- if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
+ if (Args.Arg0 == ARM_SMC_PSCI_RET_ALREADY_ON) {
+ Status = EFI_NOT_READY;
+ } else if (Args.Arg0 != ARM_SMC_PSCI_RET_SUCCESS) {
DEBUG ((DEBUG_ERROR, "PSCI_CPU_ON call failed: %d\n", Args.Arg0));
Status = EFI_DEVICE_ERROR;
}