summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Library/CpuCommonFeaturesLib
diff options
context:
space:
mode:
authorRuiyu Ni <ruiyu.ni@intel.com>2018-05-25 17:00:16 +0800
committerRuiyu Ni <ruiyu.ni@intel.com>2018-05-28 14:59:19 +0800
commit60cb4d1b04b6334cf9d56eb95d135546053db1fd (patch)
tree02a4f428ef7a40ad8cc21b4996ac60da3d03b413 /UefiCpuPkg/Library/CpuCommonFeaturesLib
parent36dd3c781e204a97d548ce3595ef6f6b6337bc1f (diff)
downloadedk2-60cb4d1b04b6334cf9d56eb95d135546053db1fd.tar.gz
edk2-60cb4d1b04b6334cf9d56eb95d135546053db1fd.tar.bz2
edk2-60cb4d1b04b6334cf9d56eb95d135546053db1fd.zip
UefiCpuPkg/CpuCommonFeatures: Follow SDM for MAX CPUID feature detect
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>
Diffstat (limited to 'UefiCpuPkg/Library/CpuCommonFeaturesLib')
-rw-r--r--UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
index 40cc9d5fe0..3d41efe9e9 100644
--- a/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
+++ b/UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c
@@ -1,7 +1,7 @@
/** @file
LimitCpuidMaxval Feature.
- Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -41,7 +41,7 @@ LimitCpuidMaxvalSupport (
UINT32 Eax;
AsmCpuid (CPUID_SIGNATURE, &Eax, NULL, NULL, NULL);
- return (Eax > 3);
+ return (Eax > 2);
}
/**