Base on UEFI spec requirement, StartAllAPs function should not
use the APs which has been disabled before. This patch just
change current code to follow this rule.

Cc: Laszlo Ersek <[email protected]>
Cc: Ruiyu Ni <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <[email protected]>
---
 UefiCpuPkg/Library/MpInitLib/MpLib.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/UefiCpuPkg/Library/MpInitLib/MpLib.c 
b/UefiCpuPkg/Library/MpInitLib/MpLib.c
index 0e57cc86bf..69f69f2b79 100644
--- a/UefiCpuPkg/Library/MpInitLib/MpLib.c
+++ b/UefiCpuPkg/Library/MpInitLib/MpLib.c
@@ -1008,8 +1008,8 @@ WakeUpAP (
 
   if (Broadcast) {
     for (Index = 0; Index < CpuMpData->CpuCount; Index++) {
-      if (Index != CpuMpData->BspNumber) {
-        CpuData = &CpuMpData->CpuData[Index];
+      CpuData = &CpuMpData->CpuData[Index];
+      if (Index != CpuMpData->BspNumber && (GetApState (CpuData) != 
CpuStateDisabled)) {
         CpuData->ApFunction         = (UINTN) Procedure;
         CpuData->ApFunctionArgument = (UINTN) ProcedureArgument;
         SetApState (CpuData, CpuStateReady);
-- 
2.15.0.windows.1

_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to