diff options
author | Jeff Fan <jeff.fan@intel.com> | 2015-12-02 03:25:45 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-12-02 03:25:45 +0000 |
commit | 5bdb31378999f8a061427a8903b469cf1d02b72e (patch) | |
tree | ef3878a41a2dec24eeb95171b0f9a929b6a98bbd /UefiCpuPkg/CpuMpPei/CpuMpPei.c | |
parent | cfe8be0f32d945a6b3cdc9096bfe11f50bb09447 (diff) | |
download | edk2-platforms-5bdb31378999f8a061427a8903b469cf1d02b72e.tar.xz |
UefiCpuPkg/CpuMpPei: Sync BSP's CRx to APs when initialization
Save BSP's volatile register and sync CRx register to APs when AP 1st wake up.
(Sync patch r19088 from main trunk.)
Cc: Feng Tian <feng.tian@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
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@19094 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/CpuMpPei/CpuMpPei.c')
-rw-r--r-- | UefiCpuPkg/CpuMpPei/CpuMpPei.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c b/UefiCpuPkg/CpuMpPei/CpuMpPei.c index d058d143ce..53af9489b2 100644 --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c @@ -230,6 +230,10 @@ ApCFunction ( if (PeiCpuMpData->InitFlag) {
ProcessorNumber = NumApsExecuting;
//
+ // Sync BSP's Control registers to APs
+ //
+ RestoreVolatileRegisters (&PeiCpuMpData->CpuData[0].VolatileRegisters, FALSE);
+ //
// This is first time AP wakeup, get BIST information from AP stack
//
BistData = *(UINTN *) (PeiCpuMpData->Buffer + ProcessorNumber * PeiCpuMpData->CpuApStackSize - sizeof (UINTN));
@@ -560,6 +564,7 @@ PrepareAPStartupVector ( PeiCpuMpData->CpuData[0].Health.Uint32 = 0;
PeiCpuMpData->EndOfPeiFlag = FALSE;
InitializeSpinLock(&PeiCpuMpData->MpLock);
+ SaveVolatileRegisters (&PeiCpuMpData->CpuData[0].VolatileRegisters);
CopyMem (&PeiCpuMpData->AddressMap, &AddressMap, sizeof (MP_ASSEMBLY_ADDRESS_MAP));
//
|