mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-27 07:34:06 +02:00
UefiCpuPkg/PiSmmCpuDxeSmm: Avoid to access MCA_CAP if CPU does not support
Do not access MCA_CAP MSR unless the CPU supports the SmmRegFeatureControl Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com>
This commit is contained in:
parent
253b3d678a
commit
c047353a12
@ -889,15 +889,13 @@ CheckFeatureSupported (
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (mSmmCodeAccessCheckEnable) {
|
if (mSmmCodeAccessCheckEnable) {
|
||||||
if (!SmmCpuFeaturesIsSmmRegisterSupported (CpuIndex, SmmRegFeatureControl)) {
|
|
||||||
mSmmCodeAccessCheckEnable = FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check to see if the CPU supports the SMM Code Access Check feature
|
// Check to see if the CPU supports the SMM Code Access Check feature
|
||||||
// Do not access this MSR unless the CPU supports the SmmRegFeatureControl
|
// Do not access this MSR unless the CPU supports the SmmRegFeatureControl
|
||||||
//
|
//
|
||||||
if ((AsmReadMsr64 (EFI_MSR_SMM_MCA_CAP) & SMM_CODE_ACCESS_CHK_BIT) == 0) {
|
if (!SmmCpuFeaturesIsSmmRegisterSupported (CpuIndex, SmmRegFeatureControl) ||
|
||||||
|
((AsmReadMsr64 (EFI_MSR_SMM_MCA_CAP) & SMM_CODE_ACCESS_CHK_BIT) == 0))
|
||||||
|
{
|
||||||
mSmmCodeAccessCheckEnable = FALSE;
|
mSmmCodeAccessCheckEnable = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user