PeiStartupAllAPs()/PeiStartupThisAP() will send INIT-SIPI-SIPI to wakeup APs to
execute AP function. However, some registers will be reset after APs received
INIT IPI. We need to restore some registers (For example, CRx/DRx) manually
after APs wakeup.
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/trunk/edk2@19089
6f19259b-4bc3-4df7-8a09-
765794883524
// Execute AP function if AP is not disabled\r
//\r
GetProcessorNumber (PeiCpuMpData, &ProcessorNumber);\r
+ //\r
+ // Restore AP's volatile registers saved\r
+ //\r
+ RestoreVolatileRegisters (&PeiCpuMpData->CpuData[ProcessorNumber].VolatileRegisters, TRUE);\r
+\r
if ((PeiCpuMpData->CpuData[ProcessorNumber].State != CpuStateDisabled) &&\r
(PeiCpuMpData->ApFunction != 0)) {\r
PeiCpuMpData->CpuData[ProcessorNumber].State = CpuStateBusy;\r
//\r
InterlockedIncrement ((UINT32 *)&PeiCpuMpData->FinishedCount);\r
\r
+ //\r
+ // Save AP volatile registers\r
+ //\r
+ SaveVolatileRegisters (&PeiCpuMpData->CpuData[ProcessorNumber].VolatileRegisters);\r
+\r
AsmCliHltLoop ();\r
}\r
\r