summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg/Application
diff options
context:
space:
mode:
authorJeff Fan <jeff.fan@intel.com>2016-03-09 10:05:30 +0800
committerJeff Fan <jeff.fan@intel.com>2016-03-10 09:22:54 +0800
commit321ef72c92072eb2d40fac6fee70b94ccbc6e7c0 (patch)
tree460c486b43eacc6dc4be98dcba1f8f58be9f237b /UefiCpuPkg/Application
parent231ad7d8660d674d95fc4e03361338ac573c1f9f (diff)
downloadedk2-321ef72c92072eb2d40fac6fee70b94ccbc6e7c0.tar.gz
edk2-321ef72c92072eb2d40fac6fee70b94ccbc6e7c0.tar.bz2
edk2-321ef72c92072eb2d40fac6fee70b94ccbc6e7c0.zip
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>
Diffstat (limited to 'UefiCpuPkg/Application')
-rw-r--r--UefiCpuPkg/Application/Cpuid/Cpuid.c4
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);