]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
UefiCpuPkg/PiSmmCpuDxeSmm: Use public MSR_IA32_MISC_ENABLE definition
[mirror_edk2.git] / UefiCpuPkg / PiSmmCpuDxeSmm / SmmProfile.c
index 8ecc5415a341fe90b9a49b2dab10805283a5763d..f9cea55d9dcf6a781880fdbc45444992174b8399 100644 (file)
@@ -934,8 +934,9 @@ CheckFeatureSupported (
   IN OUT VOID   *Buffer\r
   )\r
 {\r
-  UINT32                 RegEax;\r
-  UINT32                 RegEdx;\r
+  UINT32                         RegEax;\r
+  UINT32                         RegEdx;\r
+  MSR_IA32_MISC_ENABLE_REGISTER  MiscEnableMsr;\r
 \r
   if (mXdSupported) {\r
     AsmCpuid (CPUID_EXTENDED_FUNCTION, &RegEax, NULL, NULL, NULL);\r
@@ -966,9 +967,10 @@ CheckFeatureSupported (
       //    BTINT bits in the MSR_DEBUGCTLA MSR.\r
       // 2. The IA32_DS_AREA MSR can be programmed to point to the DS save area.\r
       //\r
-      if (AsmMsrBitFieldRead64 (MSR_IA32_MISC_ENABLE, 11, 11) == 1) {\r
+      MiscEnableMsr.Uint64 = AsmReadMsr64 (MSR_IA32_MISC_ENABLE);\r
+      if (MiscEnableMsr.Bits.BTS == 1) {\r
         //\r
-        // BTS facilities is not supported if MSR_IA32_MISC_ENABLE BIT11 is set.\r
+        // BTS facilities is not supported if MSR_IA32_MISC_ENABLE.BTS bit is set.\r
         //\r
         mBtsSupported = FALSE;\r
       }\r