From owner-svn-src-head@FreeBSD.ORG Thu Mar 11 14:17:38 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CB9A106566C; Thu, 11 Mar 2010 14:17:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6A6398FC23; Thu, 11 Mar 2010 14:17:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o2BEHckN039683; Thu, 11 Mar 2010 14:17:38 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o2BEHcKU039680; Thu, 11 Mar 2010 14:17:38 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201003111417.o2BEHcKU039680@svn.freebsd.org> From: John Baldwin Date: Thu, 11 Mar 2010 14:17:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r205013 - in head/sys: amd64/amd64 i386/i386 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Mar 2010 14:17:38 -0000 Author: jhb Date: Thu Mar 11 14:17:37 2010 New Revision: 205013 URL: http://svn.freebsd.org/changeset/base/205013 Log: 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. Submitted by: Alexander Best MFC after: 1 week Modified: head/sys/amd64/amd64/identcpu.c head/sys/i386/i386/identcpu.c Modified: head/sys/amd64/amd64/identcpu.c ============================================================================== --- head/sys/amd64/amd64/identcpu.c Thu Mar 11 13:16:06 2010 (r205012) +++ head/sys/amd64/amd64/identcpu.c Thu Mar 11 14:17:37 2010 (r205013) @@ -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: head/sys/i386/i386/identcpu.c ============================================================================== --- head/sys/i386/i386/identcpu.c Thu Mar 11 13:16:06 2010 (r205012) +++ head/sys/i386/i386/identcpu.c Thu Mar 11 14:17:37 2010 (r205013) @@ -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) { /*