Revision: 19094
          http://sourceforge.net/p/edk2/code/19094
Author:   vanjeff
Date:     2015-12-02 03:25:45 +0000 (Wed, 02 Dec 2015)
Log Message:
-----------
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 <[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/19088

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:21 UTC 
(rev 19093)
+++ branches/UDK2015/UefiCpuPkg/CpuMpPei/CpuMpPei.c     2015-12-02 03:25:45 UTC 
(rev 19094)
@@ -230,6 +230,10 @@
   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 @@
   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));
 
   //


------------------------------------------------------------------------------
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

Reply via email to