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
This commit is contained in:
Jeff Fan 2015-09-01 08:54:59 +00:00 committed by vanjeff
parent bf0dfea6e7
commit 44d2ec14d8
1 changed files with 10 additions and 0 deletions

View File

@ -804,6 +804,16 @@ PeiSwitchBSP (
ApicBaseMsr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE_ADDRESS); ApicBaseMsr.Uint64 = AsmReadMsr64 (MSR_IA32_APIC_BASE_ADDRESS);
ApicBaseMsr.Bits.Bsp = 1; ApicBaseMsr.Bits.Bsp = 1;
AsmWriteMsr64 (MSR_IA32_APIC_BASE_ADDRESS, ApicBaseMsr.Uint64); 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; return EFI_SUCCESS;
} }