summaryrefslogtreecommitdiff
path: root/UefiCpuPkg/Library
diff options
context:
space:
mode:
authorEric Dong <eric.dong@intel.com>2017-07-14 10:23:48 +0800
committerEric Dong <eric.dong@intel.com>2017-07-20 14:11:14 +0800
commit852b3935c9f21746d91d06f9f195e5969a302925 (patch)
tree7e41a0f0b2f66550875af3490908438b34971359 /UefiCpuPkg/Library
parent5fc3889bb3c64f8cd81d7d387f829f146a1998fd (diff)
downloadedk2-852b3935c9f21746d91d06f9f195e5969a302925.zip
edk2-852b3935c9f21746d91d06f9f195e5969a302925.tar.gz
edk2-852b3935c9f21746d91d06f9f195e5969a302925.tar.bz2
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>
Diffstat (limited to 'UefiCpuPkg/Library')
-rw-r--r--UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
index e91a438..7a76730 100644
--- a/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
+++ b/UefiCpuPkg/Library/RegisterCpuFeaturesLib/CpuFeaturesInitialize.c
@@ -536,7 +536,14 @@ AnalysisProcessorFeatures (
}
} else {
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;
}