Revision: 19095
http://sourceforge.net/p/edk2/code/19095
Author: vanjeff
Date: 2015-12-02 03:26:24 +0000 (Wed, 02 Dec 2015)
Log Message:
-----------
UefiCpuPkg/CpuMpPei: Save/Restore CRx/DRx register for APs waking up
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.
(Sync patch r19089 from main trunk.)
Cc: Feng Tian <[email protected]>
Cc: Michael Kinney <[email protected]>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <[email protected]>
Reviewed-by: Feng Tian <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/19089
Modified Paths:
--------------
branches/UDK2015/UefiCpuPkg/CpuMpPei/CpuMpPei.c
Modified: branches/UDK2015/UefiCpuPkg/CpuMpPei/CpuMpPei.c
===================================================================
--- branches/UDK2015/UefiCpuPkg/CpuMpPei/CpuMpPei.c 2015-12-02 03:25:45 UTC
(rev 19094)
+++ branches/UDK2015/UefiCpuPkg/CpuMpPei/CpuMpPei.c 2015-12-02 03:26:24 UTC
(rev 19095)
@@ -259,6 +259,11 @@
// Execute AP function if AP is not disabled
//
GetProcessorNumber (PeiCpuMpData, &ProcessorNumber);
+ //
+ // Restore AP's volatile registers saved
+ //
+ RestoreVolatileRegisters
(&PeiCpuMpData->CpuData[ProcessorNumber].VolatileRegisters, TRUE);
+
if ((PeiCpuMpData->CpuData[ProcessorNumber].State != CpuStateDisabled) &&
(PeiCpuMpData->ApFunction != 0)) {
PeiCpuMpData->CpuData[ProcessorNumber].State = CpuStateBusy;
@@ -273,6 +278,11 @@
//
InterlockedIncrement ((UINT32 *)&PeiCpuMpData->FinishedCount);
+ //
+ // Save AP volatile registers
+ //
+ SaveVolatileRegisters
(&PeiCpuMpData->CpuData[ProcessorNumber].VolatileRegisters);
+
AsmCliHltLoop ();
}
------------------------------------------------------------------------------
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911&iu=/4140
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits