summaryrefslogtreecommitdiffstats
path: root/sys/i386
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-01-08 01:23:16 +0000
committerjhb <jhb@FreeBSD.org>2003-01-08 01:23:16 +0000
commita331d8e0375791cf9ad202823d8afdc3dc4d02ba (patch)
treec34d3114b7f3f8befe7b024b64358c323634cb2c /sys/i386
parent47dd2b5659fde33fa7fdcf59f85ef8bbc783d89a (diff)
downloadFreeBSD-src-a331d8e0375791cf9ad202823d8afdc3dc4d02ba.zip
FreeBSD-src-a331d8e0375791cf9ad202823d8afdc3dc4d02ba.tar.gz
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.
Diffstat (limited to 'sys/i386')
-rw-r--r--sys/i386/i386/identcpu.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/i386/i386/identcpu.c b/sys/i386/i386/identcpu.c
index 59ed809..040fb6f 100644
--- a/sys/i386/i386/identcpu.c
+++ b/sys/i386/i386/identcpu.c
@@ -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)
OpenPOWER on IntegriCloud