From 44d2ec14d88c28af9fa6701cbc4544659e4bddbc Mon Sep 17 00:00:00 2001 From: Jeff Fan Date: Tue, 1 Sep 2015 08:54:59 +0000 Subject: [PATCH] UefiCpuPkg/CpuMpPei: Update the old/new BSP state in SwitchBsp() Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan Reviewed-by: Feng Tian git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18372 6f19259b-4bc3-4df7-8a09-765794883524 --- UefiCpuPkg/CpuMpPei/PeiMpServices.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/UefiCpuPkg/CpuMpPei/PeiMpServices.c b/UefiCpuPkg/CpuMpPei/PeiMpServices.c index 503778fd93..625c24a6f4 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 = (UINT32) ProcessorNumber; return EFI_SUCCESS; }