diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-08-24 06:25:41 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2018-08-24 06:25:41 +0000 |
commit | 1c45986a99d166723fab8a17247686a092428bcf (patch) | |
tree | 93bd4556973fc67bbabbb714fa1e1bf7c6eb318f /sys | |
parent | b6fca095998757811b1a203bc3e7e07fa3f7d66d (diff) |
print cpu family/model/stepping in dmesg
discussed with deraadt@ bluhm@ and sthen@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/amd64/identcpu.c | 5 | ||||
-rw-r--r-- | sys/arch/i386/i386/machdep.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/sys/arch/amd64/amd64/identcpu.c b/sys/arch/amd64/amd64/identcpu.c index 184379b8a51..d21871bf464 100644 --- a/sys/arch/amd64/amd64/identcpu.c +++ b/sys/arch/amd64/amd64/identcpu.c @@ -1,4 +1,4 @@ -/* $OpenBSD: identcpu.c,v 1.107 2018/08/21 19:04:38 deraadt Exp $ */ +/* $OpenBSD: identcpu.c,v 1.108 2018/08/24 06:25:40 jsg Exp $ */ /* $NetBSD: identcpu.c,v 1.1 2003/04/26 18:39:28 fvdl Exp $ */ /* @@ -563,6 +563,9 @@ identifycpu(struct cpu_info *ci) cpu_cpuspeed = cpu_amd64speed; } + printf(", %02x-%02x-%02x", ci->ci_family, ci->ci_model, + ci->ci_signature & 0x0f); + printf("\n%s: ", ci->ci_dev->dv_xname); for (i = 0; i < nitems(cpu_cpuid_features); i++) diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c index b3c20696113..94a7107abc7 100644 --- a/sys/arch/i386/i386/machdep.c +++ b/sys/arch/i386/i386/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.626 2018/08/23 14:47:52 jsg Exp $ */ +/* $OpenBSD: machdep.c,v 1.627 2018/08/24 06:25:40 jsg Exp $ */ /* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */ /*- @@ -1742,8 +1742,6 @@ identifycpu(struct cpu_info *ci) ci->ci_model = model; step = ci->ci_signature & 15; #ifdef CPUDEBUG - printf("%s: family %x model %x step %x\n", cpu_device, family, - model, step); printf("%s: cpuid level %d cache eax %x ebx %x ecx %x edx %x\n", cpu_device, cpuid_level, cpu_cache_eax, cpu_cache_ebx, cpu_cache_ecx, cpu_cache_edx); @@ -1946,6 +1944,11 @@ identifycpu(struct cpu_info *ci) printf(" %d MHz", cpuspeed); } } + + if (cpuid_level != -1) + printf(", %02x-%02x-%02x", ci->ci_family, ci->ci_model, + step); + printf("\n"); if (ci->ci_feature_flags) { |