aboutsummaryrefslogtreecommitdiffstats
path: root/com32/gpllib/cpuid.c
diff options
context:
space:
mode:
Diffstat (limited to 'com32/gpllib/cpuid.c')
-rw-r--r--com32/gpllib/cpuid.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/com32/gpllib/cpuid.c b/com32/gpllib/cpuid.c
index fa212045..f33e8958 100644
--- a/com32/gpllib/cpuid.c
+++ b/com32/gpllib/cpuid.c
@@ -232,8 +232,10 @@ void generic_identify(struct cpuinfo_x86 *c)
}
break;
case X86_VENDOR_INTEL:
- cpuid(0x4, &eax, &ebx, &ecx, &edx);
- c->x86_num_cores = ((eax & 0xfc000000) >> 26) + 1;
+ if (c->cpuid_level >= 0x00000004) {
+ cpuid(0x4, &eax, &ebx, &ecx, &edx);
+ c->x86_num_cores = ((eax & 0xfc000000) >> 26) + 1;
+ }
break;
default:
c->x86_num_cores = 1;