Add CPUID check to see if the CPU supports the Machine Check
Architecture before accessing the Machine Check Architecture
related MSRs.
Cc: Michael Kinney <michael.d.kinney@intel.com>
Cc: Ruiyu Ni <ruiyu.ni@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Ruiyu Ni <ruiyu.ni@intel.com>
{\r
MSR_IA32_MCG_CAP_REGISTER McgCap;\r
\r
+ if (!McaSupport (ProcessorNumber, CpuInfo, ConfigData)) {\r
+ return FALSE;\r
+ }\r
+\r
McgCap.Uint64 = AsmReadMsr64 (MSR_IA32_MCG_CAP);\r
if (ProcessorNumber == 0) {\r
DEBUG ((EFI_D_INFO, "LMCE eanble = %x\n", (BOOLEAN) (McgCap.Bits.MCG_LMCE_P != 0)));\r