Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 Output CPU manufacturer, implementa...



details:   https://anonhg.NetBSD.org/src/rev/235de31da8bf
branches:  trunk
changeset: 330959:235de31da8bf
user:      nakayama <nakayama%NetBSD.org@localhost>
date:      Fri Jul 25 18:29:45 2014 +0000

description:
Output CPU manufacturer, implementation and mask code.

diffstat:

 sys/arch/sparc64/sparc64/cpu.c |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (40 lines):

diff -r 8848285a8017 -r 235de31da8bf sys/arch/sparc64/sparc64/cpu.c
--- a/sys/arch/sparc64/sparc64/cpu.c    Fri Jul 25 18:28:03 2014 +0000
+++ b/sys/arch/sparc64/sparc64/cpu.c    Fri Jul 25 18:29:45 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.115 2014/07/25 17:54:50 nakayama Exp $ */
+/*     $NetBSD: cpu.c,v 1.116 2014/07/25 18:29:45 nakayama Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -52,7 +52,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.115 2014/07/25 17:54:50 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.116 2014/07/25 18:29:45 nakayama Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -284,6 +284,7 @@
        struct cpu_info *ci;
        const char *sep;
        register int i, l;
+       uint64_t ver;
        int bigcache, cachesize;
        char buf[100];
        int     totalsize = 0;
@@ -347,6 +348,13 @@
 
        aprint_normal(": %s, CPU id %d\n", buf, ci->ci_cpuid);
        aprint_naive("\n");
+       if (CPU_ISSUN4U || CPU_ISSUN4US) {
+               ver = getver();
+               aprint_normal_dev(dev, "manuf %x, impl %x, mask %x\n",
+                   (u_int)((ver & VER_MANUF) >> VER_MANUF_SHIFT),
+                   (u_int)((ver & VER_IMPL) >> VER_IMPL_SHIFT),
+                   (u_int)((ver & VER_MASK) >> VER_MASK_SHIFT));
+       }
 
        if (ci->ci_system_clockrate[0] != 0) {
                aprint_normal_dev(dev, "system tick frequency %s MHz\n",



Home | Main Index | Thread Index | Old Index