UefiCpuPkg RegisterCpuFeaturesLib: Add error handling.

Disable CPU feature may return error, add error handling
code to handle it instead of assert it.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
This commit is contained in:
Eric Dong 2017-07-14 10:23:48 +08:00
parent 5fc3889bb3
commit 852b3935c9
1 changed files with 8 additions and 1 deletions

View File

@ -536,7 +536,14 @@ AnalysisProcessorFeatures (
} }
} else { } else {
Status = CpuFeatureInOrder->InitializeFunc (ProcessorNumber, CpuInfo, CpuFeatureInOrder->ConfigData, FALSE); Status = CpuFeatureInOrder->InitializeFunc (ProcessorNumber, CpuInfo, CpuFeatureInOrder->ConfigData, FALSE);
ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) {
if (CpuFeatureInOrder->FeatureName != NULL) {
DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature Name = %a.\n", CpuFeatureInOrder->FeatureName));
} else {
DEBUG ((DEBUG_WARN, "Warning :: Failed to enable Feature Mask = "));
DumpCpuFeatureMask (CpuFeatureInOrder->FeatureMask);
}
}
} }
Entry = Entry->ForwardLink; Entry = Entry->ForwardLink;
} }