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>
This commit is contained in:
Ruiyu Ni 2018-05-25 17:00:16 +08:00
parent 36dd3c781e
commit 60cb4d1b04
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
/**