CPU Healthy state maybe changed by software. We should return Healthy state from Healthy bit instead of from CPU BIST hardware information.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jeff Fan <jeff....@intel.com> CC: Feng Tian <feng.t...@intel.com> --- UefiCpuPkg/CpuMpPei/CpuBist.c | 5 ++++- UefiCpuPkg/CpuMpPei/PeiMpServices.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/UefiCpuPkg/CpuMpPei/CpuBist.c b/UefiCpuPkg/CpuMpPei/CpuBist.c index 2bee7a4..5629245 100644 --- a/UefiCpuPkg/CpuMpPei/CpuBist.c +++ b/UefiCpuPkg/CpuMpPei/CpuBist.c @@ -226,7 +226,10 @@ CollectBistDataFromPpi ( CpuData->Health = CpuInstance[CpuIndex].InfoRecord.IA32HealthFlags; } } - if (CpuData->Health.Uint32 != 0) { + if (CpuData->Health.Uint32 == 0) { + CpuData->CpuHealthy = TRUE; + } else { + CpuData->CpuHealthy = FALSE; // // Report Status Code that self test is failed // diff --git a/UefiCpuPkg/CpuMpPei/PeiMpServices.c b/UefiCpuPkg/CpuMpPei/PeiMpServices.c index 8f1ec19..1ef2f5e 100644 --- a/UefiCpuPkg/CpuMpPei/PeiMpServices.c +++ b/UefiCpuPkg/CpuMpPei/PeiMpServices.c @@ -334,7 +334,7 @@ PeiGetProcessorInfo ( if (PeiCpuMpData->CpuData[ProcessorNumber].ApicId == GetInitialApicId()) { ProcessorInfoBuffer->StatusFlag |= PROCESSOR_AS_BSP_BIT; } - if (PeiCpuMpData->CpuData[ProcessorNumber].Health.Uint32 == 0) { + if (PeiCpuMpData->CpuData[ProcessorNumber].CpuHealthy) { ProcessorInfoBuffer->StatusFlag |= PROCESSOR_HEALTH_STATUS_BIT; } if (PeiCpuMpData->CpuData[ProcessorNumber].State == CpuStateDisabled) { -- 1.9.5.msysgit.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel