summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/CpuMpPei
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2015-09-01 08:54:59 +0000
committervanjeff <vanjeff@Edk2>2015-09-01 08:54:59 +0000
commit44d2ec14d88c28af9fa6701cbc4544659e4bddbc (patch)
treeb0f40043a4b92b081a2d2394206277fd7e2a8c36 /UefiCpuPkg/CpuMpPei
parentbf0dfea6e76dcfbd1816cd6305bbd92aab3079d7 (diff)
downloadedk2-44d2ec14d88c28af9fa6701cbc4544659e4bddbc.tar.gz
edk2-44d2ec14d88c28af9fa6701cbc4544659e4bddbc.tar.bz2
edk2-44d2ec14d88c28af9fa6701cbc4544659e4bddbc.zip
UefiCpuPkg/CpuMpPei: Update the old/new BSP state in SwitchBsp()
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff.fan@intel.com> Reviewed-by: Feng Tian <feng.tian@intel.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18372 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/CpuMpPei')
-rw-r--r--UefiCpuPkg/CpuMpPei/PeiMpServices.c10
1 files changed, 10 insertions, 0 deletions
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;
}