Revision: 19085
          http://sourceforge.net/p/edk2/code/19085
Author:   vanjeff
Date:     2015-12-02 00:42:09 +0000 (Wed, 02 Dec 2015)
Log Message:
-----------
UefiCpuPkg/CpuMpPei: Exchange whole CPU data in SortApicId()

Current implementation only exchanges the APIC ID and BIST, this updating is to
exchange all CPU data.

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

Modified Paths:
--------------
    trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.c

Modified: trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.c
===================================================================
--- trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.c   2015-12-01 18:39:29 UTC (rev 
19084)
+++ trunk/edk2/UefiCpuPkg/CpuMpPei/CpuMpPei.c   2015-12-02 00:42:09 UTC (rev 
19085)
@@ -61,7 +61,7 @@
   UINTN             Index2;
   UINTN             Index3;
   UINT32            ApicId;
-  EFI_HEALTH_FLAGS  Health;
+  PEI_CPU_DATA      CpuData;
   UINT32            ApCount;
 
   ApCount = PeiCpuMpData->CpuCount - 1;
@@ -80,11 +80,13 @@
         }
       }
       if (Index3 != Index1) {
-        PeiCpuMpData->CpuData[Index3].ApicId = 
PeiCpuMpData->CpuData[Index1].ApicId;
-        PeiCpuMpData->CpuData[Index1].ApicId = ApicId;
-        Health = PeiCpuMpData->CpuData[Index3].Health;
-        PeiCpuMpData->CpuData[Index3].Health = 
PeiCpuMpData->CpuData[Index1].Health;
-        PeiCpuMpData->CpuData[Index1].Health = Health;
+        CopyMem (&CpuData, &PeiCpuMpData->CpuData[Index3], sizeof 
(PEI_CPU_DATA));
+        CopyMem (
+          &PeiCpuMpData->CpuData[Index3],
+          &PeiCpuMpData->CpuData[Index1],
+          sizeof (PEI_CPU_DATA)
+          );
+        CopyMem (&PeiCpuMpData->CpuData[Index1], &CpuData, sizeof 
(PEI_CPU_DATA));
       }
     }
 


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