svn commit: r205645 - in stable/8/sys: amd64/amd64 i386/i386
John Baldwin
jhb at FreeBSD.org
Thu Mar 25 15:48:24 UTC 2010
Author: jhb
Date: Thu Mar 25 15:48:23 2010
New Revision: 205645
URL: http://svn.freebsd.org/changeset/base/205645
Log:
MFC 205013:
Print out the family and model from the cpu_id. This is especially useful
given the advent of the extended family and extended model fields. The
values are printed in hex to match their common usage in documentation.
Modified:
stable/8/sys/amd64/amd64/identcpu.c
stable/8/sys/i386/i386/identcpu.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
stable/8/sys/net/ (props changed)
Modified: stable/8/sys/amd64/amd64/identcpu.c
==============================================================================
--- stable/8/sys/amd64/amd64/identcpu.c Thu Mar 25 14:44:13 2010 (r205644)
+++ stable/8/sys/amd64/amd64/identcpu.c Thu Mar 25 15:48:23 2010 (r205645)
@@ -187,7 +187,9 @@ printcpuinfo(void)
if (cpu_vendor_id == CPU_VENDOR_INTEL ||
cpu_vendor_id == CPU_VENDOR_AMD ||
cpu_vendor_id == CPU_VENDOR_CENTAUR) {
- printf(" Stepping = %u", cpu_id & 0xf);
+ printf(" Family = %x", CPUID_TO_FAMILY(cpu_id));
+ printf(" Model = %x", CPUID_TO_MODEL(cpu_id));
+ printf(" Stepping = %u", cpu_id & CPUID_STEPPING);
if (cpu_high > 0) {
/*
Modified: stable/8/sys/i386/i386/identcpu.c
==============================================================================
--- stable/8/sys/i386/i386/identcpu.c Thu Mar 25 14:44:13 2010 (r205644)
+++ stable/8/sys/i386/i386/identcpu.c Thu Mar 25 15:48:23 2010 (r205645)
@@ -672,9 +672,11 @@ printcpuinfo(void)
cpu_vendor_id == CPU_VENDOR_NSC ||
(cpu_vendor_id == CPU_VENDOR_CYRIX &&
((cpu_id & 0xf00) > 0x500))) {
- printf(" Stepping = %u", cpu_id & 0xf);
+ printf(" Family = %x", CPUID_TO_FAMILY(cpu_id));
+ printf(" Model = %x", CPUID_TO_MODEL(cpu_id));
+ printf(" Stepping = %u", cpu_id & CPUID_STEPPING);
if (cpu_vendor_id == CPU_VENDOR_CYRIX)
- printf(" DIR=0x%04x", cyrix_did);
+ printf("\n DIR=0x%04x", cyrix_did);
if (cpu_high > 0) {
/*
More information about the svn-src-all
mailing list