diff options
author | Jeff Fan <jeff.fan@intel.com> | 2015-12-02 03:24:17 +0000 |
---|---|---|
committer | vanjeff <vanjeff@Edk2> | 2015-12-02 03:24:17 +0000 |
commit | cbf0366ac7df84a768b173b730526c6282d751c8 (patch) | |
tree | 6b7316816509f378eeb728e1e8a3bb3ab4f0fc78 /UefiCpuPkg/CpuMpPei/CpuMpPei.c | |
parent | 76c092589ed74931ece00e3505979d80042f7b50 (diff) | |
download | edk2-platforms-cbf0366ac7df84a768b173b730526c6282d751c8.tar.xz |
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.
(Sync patch r19085 from main trunk.)
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/branches/UDK2015@19091 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg/CpuMpPei/CpuMpPei.c')
-rw-r--r-- | UefiCpuPkg/CpuMpPei/CpuMpPei.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c b/UefiCpuPkg/CpuMpPei/CpuMpPei.c index c222522203..ae071ac1f8 100644 --- a/UefiCpuPkg/CpuMpPei/CpuMpPei.c +++ b/UefiCpuPkg/CpuMpPei/CpuMpPei.c @@ -61,7 +61,7 @@ SortApicId ( UINTN Index2;
UINTN Index3;
UINT32 ApicId;
- EFI_HEALTH_FLAGS Health;
+ PEI_CPU_DATA CpuData;
UINT32 ApCount;
ApCount = PeiCpuMpData->CpuCount - 1;
@@ -80,11 +80,13 @@ SortApicId ( }
}
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));
}
}
|