summaryrefslogtreecommitdiff
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2015-09-02 03:15:20 +0000
committerhwu1225 <hwu1225@Edk2>2015-09-02 03:15:20 +0000
commit091269232629660ef5b1997d66658c94b58b009d (patch)
tree75defdcabb104314b8718a35108aa38b34724332 /UefiCpuPkg
parent1f90b7bf9346cfb1bd1a1a2c6d355106af53e090 (diff)
downloadedk2-platforms-091269232629660ef5b1997d66658c94b58b009d.tar.xz
UefiCpuPkg/CpuMpPei: Update the old/new BSP state in SwitchBsp()
(Sync patch r18372 from main trunk.) 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/branches/UDK2015@18380 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg')
-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;
}