diff options
author | Jeff Fan <jeff.fan@intel.com> | 2016-03-09 10:05:30 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-03-10 09:51:45 +0800 |
commit | b61c47582d0a48db76221acc2a3515b6abe94639 (patch) | |
tree | bf54c1a4435d71504dd1286b3224268f2d9c6927 | |
parent | dc6cc13bc2f9f928378c180bcdc4080991e5d343 (diff) | |
download | edk2-platforms-b61c47582d0a48db76221acc2a3515b6abe94639.tar.xz |
UefiCpuPkg/Application/Cpuid: Add check for gMaximumBasicFunction
Add check for gMaximumBasicFunction in CpuidVersionInfo () back.
Cc: Qiu Shumin <shumin.qiu@intel.com>
Cc: Michael Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
(cherry picked from commit 321ef72c92072eb2d40fac6fee70b94ccbc6e7c0)
-rw-r--r-- | UefiCpuPkg/Application/Cpuid/Cpuid.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/UefiCpuPkg/Application/Cpuid/Cpuid.c b/UefiCpuPkg/Application/Cpuid/Cpuid.c index 371df66994..f5268cd05e 100644 --- a/UefiCpuPkg/Application/Cpuid/Cpuid.c +++ b/UefiCpuPkg/Application/Cpuid/Cpuid.c @@ -213,6 +213,10 @@ CpuidVersionInfo ( UINT32 DisplayFamily;
UINT32 DisplayModel;
+ if (CPUID_VERSION_INFO > gMaximumBasicFunction) {
+ return;
+ }
+
AsmCpuid (CPUID_VERSION_INFO, &Eax.Uint32, &Ebx.Uint32, &Ecx.Uint32, &Edx.Uint32);
Print (L"CPUID_VERSION_INFO (Leaf %08x)\n", CPUID_VERSION_INFO);
|