From 60cb4d1b04b6334cf9d56eb95d135546053db1fd Mon Sep 17 00:00:00 2001 From: Ruiyu Ni Date: Fri, 25 May 2018 17:00:16 +0800 Subject: [PATCH] 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 Reviewed-by: Eric Dong Cc: Ming Shao --- UefiCpuPkg/Library/CpuCommonFeaturesLib/LimitCpuIdMaxval.c | 4 ++-- 1 file 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.
+ Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
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); } /** -- 2.39.2