If the boot processor supports hyperthreading and contains more than one

logical CPU, display the number of logical CPUs per physical processor
underneath the list of CPU features.
This commit is contained in:
John Baldwin 2003-01-08 01:23:16 +00:00
parent fa896b7280
commit 5460753d55
2 changed files with 18 additions and 0 deletions

View File

@ -604,6 +604,15 @@ printcpuinfo(void)
"\037IA64" /* CPU can execute IA64 instructions */
"\040PBE" /* Pending Break Enable */
);
/*
* If this CPU supports hyperthreading then mention
* the number of logical CPU's it contains.
*/
if (cpu_feature & CPUID_HTT &&
(cpuid_cpuinfo & CPUID_HTT_CORES) > 0x100)
printf("\n Hyperthreading: %d logical CPUs",
(cpuid_cpuinfo & CPUID_HTT_CORES) >> 16);
}
if (strcmp(cpu_vendor, "AuthenticAMD") == 0 &&
nreg >= 0x80000001)

View File

@ -604,6 +604,15 @@ printcpuinfo(void)
"\037IA64" /* CPU can execute IA64 instructions */
"\040PBE" /* Pending Break Enable */
);
/*
* If this CPU supports hyperthreading then mention
* the number of logical CPU's it contains.
*/
if (cpu_feature & CPUID_HTT &&
(cpuid_cpuinfo & CPUID_HTT_CORES) > 0x100)
printf("\n Hyperthreading: %d logical CPUs",
(cpuid_cpuinfo & CPUID_HTT_CORES) >> 16);
}
if (strcmp(cpu_vendor, "AuthenticAMD") == 0 &&
nreg >= 0x80000001)