diff options
author | Guo Mang <mang.guo@intel.com> | 2017-04-12 13:00:59 +0800 |
---|---|---|
committer | Guo Mang <mang.guo@intel.com> | 2017-05-09 13:03:13 +0800 |
commit | d194e10a2a037e70c200cbfec96136b644a6428d (patch) | |
tree | 051b08d682aa34b037065a4e0689a288d26919e1 /Silicon/BroxtonSoC/BroxtonSiPkg | |
parent | 1b2556054aaccec7713ee35bd4bdbcde10560446 (diff) | |
download | edk2-platforms-d194e10a2a037e70c200cbfec96136b644a6428d.tar.xz |
Fix S3 resume failure
When restoring MSR for S3 setting, SmmStartupThisAp will return error if CPU index is BSP. This issue caused S3 resume failed sometimes. This patch is mainly fix this issue.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Guo Mang <mang.guo@intel.com>
Reviewed-by: zwei4 <david.wei@intel.com>
Diffstat (limited to 'Silicon/BroxtonSoC/BroxtonSiPkg')
-rw-r--r-- | Silicon/BroxtonSoC/BroxtonSiPkg/Cpu/PowerManagement/Smm/PowerMgmtS3.c | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/Silicon/BroxtonSoC/BroxtonSiPkg/Cpu/PowerManagement/Smm/PowerMgmtS3.c b/Silicon/BroxtonSoC/BroxtonSiPkg/Cpu/PowerManagement/Smm/PowerMgmtS3.c index 4385320544..eb36343c2c 100644 --- a/Silicon/BroxtonSoC/BroxtonSiPkg/Cpu/PowerManagement/Smm/PowerMgmtS3.c +++ b/Silicon/BroxtonSoC/BroxtonSiPkg/Cpu/PowerManagement/Smm/PowerMgmtS3.c @@ -1,7 +1,7 @@ /** @file
This is the SMM driver for saving and restoring the powermanagement related MSRs.
- Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
@@ -140,15 +140,18 @@ RunOnAllLogicalProcessors ( // Run the procedure on all logical processors.
//
(*Procedure) (Buffer);
- for (Index = 1; Index < gSmst->NumberOfCpus; Index++) {
- Status = EFI_NOT_READY;
- while (Status != EFI_SUCCESS) {
- Status = gSmst->SmmStartupThisAp (Procedure, Index, Buffer);
- if (Status != EFI_SUCCESS) {
- //
- // SmmStartupThisAp might return failure if AP is busy executing some other code. Let's wait for sometime and try again.
- //
- MicroSecondDelay (PPM_WAIT_PERIOD);
+ for (Index = 0; Index < gSmst->NumberOfCpus; Index++) {
+ if (Index != gSmst->CurrentlyExecutingCpu) {
+ Status = EFI_NOT_READY;
+ while (Status != EFI_SUCCESS) {
+ Status = gSmst->SmmStartupThisAp (Procedure, Index, Buffer);
+ ASSERT(Status != EFI_INVALID_PARAMETER);
+ if (Status != EFI_SUCCESS) {
+ //
+ // SmmStartupThisAp might return failure if AP is busy executing some other code. Let's wait for sometime and try again.
+ //
+ MicroSecondDelay (PPM_WAIT_PERIOD);
+ }
}
}
}
|