]> git.proxmox.com Git - mirror_edk2.git/commitdiff
UefiCpuPkg/CpuCommonFeatures: Follow SDM for MAX CPUID feature detect
authorRuiyu Ni <ruiyu.ni@intel.com>
Fri, 25 May 2018 09:00:16 +0000 (17:00 +0800)
committerRuiyu Ni <ruiyu.ni@intel.com>
Mon, 28 May 2018 06:59:19 +0000 (14:59 +0800)
According to IA manual:
"Before setting this bit (MSR_IA32_MISC_ENABLE[22]) , BIOS must
execute the CPUID.0H and examine the maximum value returned in
EAX[7:0]. If the maximum value is greater than 2, this bit is
supported."

We need to fix our current detection logic to compare against 2.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
Cc: Ming Shao <ming.shao@intel.com>
UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c

index 40cc9d5fe0cf16d48f398d875663b52be2572c2a..3d41efe9e993804a2e05d2fe6fe7f9635999718e 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   LimitCpuidMaxval Feature.\r
 \r
-  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -41,7 +41,7 @@ LimitCpuidMaxvalSupport (
   UINT32  Eax;\r
 \r
   AsmCpuid (CPUID_SIGNATURE, &Eax, NULL, NULL, NULL);\r
-  return (Eax > 3);\r
+  return (Eax > 2);\r
 }\r
 \r
 /**\r