Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-6]: src/usr.sbin/cpuctl/arch Pull up following revision(s) (reque...



details:   https://anonhg.NetBSD.org/src/rev/8b285edc8311
branches:  netbsd-6
changeset: 774018:8b285edc8311
user:      riz <riz%NetBSD.org@localhost>
date:      Thu Apr 19 20:04:37 2012 +0000

description:
Pull up following revision(s) (requested by cegger in ticket #187):
        usr.sbin/cpuctl/arch/i386.c: revision 1.31
print cpu family for AMD CPU families 0x12 - 0x15

diffstat:

 usr.sbin/cpuctl/arch/i386.c |  34 ++++++++++++++++------------------
 1 files changed, 16 insertions(+), 18 deletions(-)

diffs (57 lines):

diff -r 70b572bade1b -r 8b285edc8311 usr.sbin/cpuctl/arch/i386.c
--- a/usr.sbin/cpuctl/arch/i386.c       Thu Apr 19 20:03:00 2012 +0000
+++ b/usr.sbin/cpuctl/arch/i386.c       Thu Apr 19 20:04:37 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i386.c,v 1.27.2.3 2012/04/06 17:46:41 riz Exp $        */
+/*     $NetBSD: i386.c,v 1.27.2.4 2012/04/19 20:04:37 riz Exp $        */
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.27.2.3 2012/04/06 17:46:41 riz Exp $");
+__RCSID("$NetBSD: i386.c,v 1.27.2.4 2012/04/19 20:04:37 riz Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -959,24 +959,22 @@
                }
                break;
        case 0x01:
-               switch (model) {
-                       case 0x02:
-                               ret = "Family 10h";
-                               break;
-                       default:
-                               ret = "Unknown AMD64 CPU";
-                               break;
-               }
+               ret = "Family 10h";
                break;
        case 0x02:
-               switch (model) {
-                       case 0x03:
-                               ret = "Family 11h";
-                               break;
-                       default:
-                               ret = "Unknown AMD64 CPU";
-                               break;
-               }
+               ret = "Family 11h";
+               break;
+       case 0x03:
+               ret = "Family 12h";
+               break;
+       case 0x05:
+               ret = "Family 14h";
+               break;
+       case 0x06:
+               ret = "Family 15h";
+               break;
+       default:
+               ret = "Unknown AMD64 CPU";
                break;
        }
 



Home | Main Index | Thread Index | Old Index