Check if deterministic cache parameters leaf is valid before use.
This commit is contained in:
parent
e3ef44f73d
commit
6b218fc19f
@ -360,7 +360,8 @@ printcpuinfo(void)
|
||||
else if (strcmp(cpu_vendor, "GenuineIntel") == 0 &&
|
||||
(cpu_high >= 4)) {
|
||||
cpuid_count(4, 0, regs);
|
||||
cmp = ((regs[0] & 0xfc000000) >> 26) + 1;
|
||||
if ((regs[0] & 0x1f) != 0)
|
||||
cmp = ((regs[0] >> 26) & 0x3f) + 1;
|
||||
}
|
||||
if (cmp > 1)
|
||||
printf("\n Cores per package: %d", cmp);
|
||||
|
@ -856,7 +856,8 @@ printcpuinfo(void)
|
||||
else if (strcmp(cpu_vendor, "GenuineIntel") == 0 &&
|
||||
(cpu_high >= 4)) {
|
||||
cpuid_count(4, 0, regs);
|
||||
cmp = ((regs[0] & 0xfc000000) >> 26) + 1;
|
||||
if ((regs[0] & 0x1f) != 0)
|
||||
cmp = ((regs[0] >> 26) & 0x3f) + 1;
|
||||
}
|
||||
if (cmp > 1)
|
||||
printf("\n Cores per package: %d", cmp);
|
||||
|
Loading…
Reference in New Issue
Block a user