Save BSP's volatile register and sync CRx register to APs when AP 1st wake up.
Cc: Feng Tian <feng.t...@intel.com> Cc: Michael Kinney <michael.d.kin...@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff....@intel.com> --- UefiCpuPkg/CpuMpPei/CpuMpPei.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c b/UefiCpuPkg/CpuMpPei/CpuMpPei.c index d058d14..53af948 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)); // -- 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel