summaryrefslogtreecommitdiff
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2015-12-02 00:42:09 +0000
committervanjeff <vanjeff@Edk2>2015-12-02 00:42:09 +0000
commit24930b5609f7de283b7b8ec16c0de3d54aa211de (patch)
treece11dc894f470f199047a671b1e7fa1772925c94 /UefiCpuPkg
parentce6aec3ea31270d40ceb64739c5558bee8a09b01 (diff)
downloadedk2-24930b5609f7de283b7b8ec16c0de3d54aa211de.zip
edk2-24930b5609f7de283b7b8ec16c0de3d54aa211de.tar.gz
edk2-24930b5609f7de283b7b8ec16c0de3d54aa211de.tar.bz2
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 <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@19085 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'UefiCpuPkg')
-rw-r--r--UefiCpuPkg/CpuMpPei/CpuMpPei.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/UefiCpuPkg/CpuMpPei/CpuMpPei.c b/UefiCpuPkg/CpuMpPei/CpuMpPei.c
index c222522..ae071ac 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));
}
}