Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <[email protected]>
CC: Feng Tian <[email protected]>
---
 UefiCpuPkg/CpuMpPei/PeiMpServices.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/UefiCpuPkg/CpuMpPei/PeiMpServices.c 
b/UefiCpuPkg/CpuMpPei/PeiMpServices.c
index 503778f..6e69012 100644
--- a/UefiCpuPkg/CpuMpPei/PeiMpServices.c
+++ b/UefiCpuPkg/CpuMpPei/PeiMpServices.c
@@ -804,6 +804,16 @@ PeiSwitchBSP (
   ApicBaseMsr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE_ADDRESS);
   ApicBaseMsr.Bits.Bsp = 1;
   AsmWriteMsr64 (MSR_IA32_APIC_BASE_ADDRESS, ApicBaseMsr.Uint64);
+  //
+  // Set old BSP enable state
+  //
+  if (!EnableOldBSP) {
+    PeiCpuMpData->CpuData[PeiCpuMpData->BspNumber].State = CpuStateDisabled;
+  }
+  //
+  // Save new BSP number
+  //
+  PeiCpuMpData->BspNumber = ProcessorNumber;
 
   return EFI_SUCCESS;
 }
-- 
1.9.5.msysgit.0

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

Reply via email to