summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/CpuDxe/CpuMp.c
diff options
context:
space:
mode:
Diffstat (limited to 'UefiCpuPkg/CpuDxe/CpuMp.c')
-rw-r--r--UefiCpuPkg/CpuDxe/CpuMp.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/UefiCpuPkg/CpuDxe/CpuMp.c b/UefiCpuPkg/CpuDxe/CpuMp.c
index a619a2b0e3..3e4f83fac2 100644
--- a/UefiCpuPkg/CpuDxe/CpuMp.c
+++ b/UefiCpuPkg/CpuDxe/CpuMp.c
@@ -539,6 +539,7 @@ CollectBistDataFromHob (
UINTN ProcessorNumber;
EFI_PROCESSOR_INFORMATION ProcessorInfo;
EFI_HEALTH_FLAGS BistData;
+ UINTN CpuInstanceNumber;
SecPlatformInformation2 = NULL;
SecPlatformInformation = NULL;
@@ -578,25 +579,25 @@ CollectBistDataFromHob (
}
}
- while ((NumberOfData--) > 0) {
- for (ProcessorNumber = 0; ProcessorNumber < mNumberOfProcessors; ProcessorNumber++) {
- MpInitLibGetProcessorInfo (ProcessorNumber, &ProcessorInfo, &BistData);
- if (ProcessorInfo.ProcessorId == CpuInstance[NumberOfData].CpuLocation) {
+ for (ProcessorNumber = 0; ProcessorNumber < mNumberOfProcessors; ProcessorNumber++) {
+ MpInitLibGetProcessorInfo (ProcessorNumber, &ProcessorInfo, &BistData);
+ for (CpuInstanceNumber = 0; CpuInstanceNumber < NumberOfData; CpuInstanceNumber++) {
+ if (ProcessorInfo.ProcessorId == CpuInstance[CpuInstanceNumber].CpuLocation) {
//
// Update CPU health status for MP Services Protocol according to BIST data.
//
- BistData = CpuInstance[NumberOfData].InfoRecord.IA32HealthFlags;
- }
- if (BistData.Uint32 != 0) {
- //
- // Report Status Code that self test is failed
- //
- REPORT_STATUS_CODE (
- EFI_ERROR_CODE | EFI_ERROR_MAJOR,
- (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_SELF_TEST)
- );
+ BistData = CpuInstance[CpuInstanceNumber].InfoRecord.IA32HealthFlags;
}
}
+ if (BistData.Uint32 != 0) {
+ //
+ // Report Status Code that self test is failed
+ //
+ REPORT_STATUS_CODE (
+ EFI_ERROR_CODE | EFI_ERROR_MAJOR,
+ (EFI_COMPUTING_UNIT_HOST_PROCESSOR | EFI_CU_HP_EC_SELF_TEST)
+ );
+ }
}
}