Module Name: src
Committed By: christos
Date: Mon Mar 24 19:31:40 UTC 2014
Modified Files:
src/sys/arch/pmax/pmax: dec_3100.c dec_3max.c dec_3maxplus.c dec_3min.c
dec_5100.c dec_maxine.c machdep.c
Log Message:
use cpu_{g,s}etmodel
To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/pmax/pmax/dec_3100.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/pmax/pmax/dec_3max.c
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/pmax/pmax/dec_3maxplus.c
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/pmax/pmax/dec_3min.c
cvs rdiff -u -r1.47 -r1.48 src/sys/arch/pmax/pmax/dec_5100.c
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/pmax/pmax/dec_maxine.c
cvs rdiff -u -r1.247 -r1.248 src/sys/arch/pmax/pmax/machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/pmax/pmax/dec_3100.c
diff -u src/sys/arch/pmax/pmax/dec_3100.c:1.53 src/sys/arch/pmax/pmax/dec_3100.c:1.54
--- src/sys/arch/pmax/pmax/dec_3100.c:1.53 Sat Oct 13 02:51:22 2012
+++ src/sys/arch/pmax/pmax/dec_3100.c Mon Mar 24 15:31:39 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3100.c,v 1.53 2012/10/13 06:51:22 tsutsui Exp $ */
+/* $NetBSD: dec_3100.c,v 1.54 2014/03/24 19:31:39 christos Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@@ -69,7 +69,7 @@
#define __INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.53 2012/10/13 06:51:22 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.54 2014/03/24 19:31:39 christos Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -141,7 +141,7 @@ dec_3100_init(void)
submodel = "2100 (PMIN)";
else
submodel = "3100 (PMAX)";
- sprintf(cpu_model, "DECstation %s", submodel);
+ cpu_setmodel("DECstation %s", submodel);
}
/*
Index: src/sys/arch/pmax/pmax/dec_3max.c
diff -u src/sys/arch/pmax/pmax/dec_3max.c:1.55 src/sys/arch/pmax/pmax/dec_3max.c:1.56
--- src/sys/arch/pmax/pmax/dec_3max.c:1.55 Sat Oct 13 02:51:22 2012
+++ src/sys/arch/pmax/pmax/dec_3max.c Mon Mar 24 15:31:39 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3max.c,v 1.55 2012/10/13 06:51:22 tsutsui Exp $ */
+/* $NetBSD: dec_3max.c,v 1.56 2014/03/24 19:31:39 christos Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@@ -70,7 +70,7 @@
#define __INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.55 2012/10/13 06:51:22 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.56 2014/03/24 19:31:39 christos Exp $");
#include "dzkbd.h"
@@ -155,7 +155,7 @@ dec_3max_init(void)
*(volatile uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr;
kn02_wbflush();
- strcpy(cpu_model, "DECstation 5000/200 (3MAX)");
+ cpu_setmodel("DECstation 5000/200 (3MAX)");
}
/*
Index: src/sys/arch/pmax/pmax/dec_3maxplus.c
diff -u src/sys/arch/pmax/pmax/dec_3maxplus.c:1.69 src/sys/arch/pmax/pmax/dec_3maxplus.c:1.70
--- src/sys/arch/pmax/pmax/dec_3maxplus.c:1.69 Sat Oct 13 02:51:22 2012
+++ src/sys/arch/pmax/pmax/dec_3maxplus.c Mon Mar 24 15:31:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3maxplus.c,v 1.69 2012/10/13 06:51:22 tsutsui Exp $ */
+/* $NetBSD: dec_3maxplus.c,v 1.70 2014/03/24 19:31:40 christos Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@@ -70,7 +70,7 @@
#define __INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.69 2012/10/13 06:51:22 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.70 2014/03/24 19:31:40 christos Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -180,10 +180,10 @@ dec_3maxplus_init(void)
prodtype &= KN03_INTR_PROD_JUMPER;
/* the bit persists even if INTR register is assigned value 0 */
if (prodtype)
- sprintf(cpu_model, "DECstation 5000/%s (3MAXPLUS)",
+ cpu_setmodel("DECstation 5000/%s (3MAXPLUS)",
(CPUISMIPS3) ? "260" : "240");
else
- sprintf(cpu_model, "DECsystem 5900%s (3MAXPLUS)",
+ cpu_setmodel("DECsystem 5900%s (3MAXPLUS)",
(CPUISMIPS3) ? "-260" : "");
}
Index: src/sys/arch/pmax/pmax/dec_3min.c
diff -u src/sys/arch/pmax/pmax/dec_3min.c:1.72 src/sys/arch/pmax/pmax/dec_3min.c:1.73
--- src/sys/arch/pmax/pmax/dec_3min.c:1.72 Sat Oct 13 02:51:23 2012
+++ src/sys/arch/pmax/pmax/dec_3min.c Mon Mar 24 15:31:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_3min.c,v 1.72 2012/10/13 06:51:23 tsutsui Exp $ */
+/* $NetBSD: dec_3min.c,v 1.73 2014/03/24 19:31:40 christos Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@@ -70,7 +70,7 @@
#define __INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.72 2012/10/13 06:51:23 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.73 2014/03/24 19:31:40 christos Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -183,7 +183,7 @@ dec_3min_init(void)
physmem_boardmax = physmem_boardmax >> 2;
physmem_boardmax = MIPS_PHYS_TO_KSEG1(physmem_boardmax);
- sprintf(cpu_model, "DECstation 5000/1%d (3MIN)", mips_options.mips_cpu_mhz);
+ cpu_setmodel("DECstation 5000/1%d (3MIN)", mips_options.mips_cpu_mhz);
}
/*
Index: src/sys/arch/pmax/pmax/dec_5100.c
diff -u src/sys/arch/pmax/pmax/dec_5100.c:1.47 src/sys/arch/pmax/pmax/dec_5100.c:1.48
--- src/sys/arch/pmax/pmax/dec_5100.c:1.47 Sat Oct 13 02:51:23 2012
+++ src/sys/arch/pmax/pmax/dec_5100.c Mon Mar 24 15:31:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_5100.c,v 1.47 2012/10/13 06:51:23 tsutsui Exp $ */
+/* $NetBSD: dec_5100.c,v 1.48 2014/03/24 19:31:40 christos Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: dec_5100.c,v 1.47 2012/10/13 06:51:23 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_5100.c,v 1.48 2014/03/24 19:31:40 christos Exp $");
#define __INTR_PRIVATE
#include <sys/param.h>
@@ -99,7 +99,7 @@ dec_5100_init(void)
/* calibrate cpu_mhz value */
mc_cpuspeed(MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK), MIPS_INT_MASK_2);
- sprintf(cpu_model, "DECsystem 5100 (MIPSMATE)");
+ cpu_setmodel("DECsystem 5100 (MIPSMATE)");
}
/*
Index: src/sys/arch/pmax/pmax/dec_maxine.c
diff -u src/sys/arch/pmax/pmax/dec_maxine.c:1.64 src/sys/arch/pmax/pmax/dec_maxine.c:1.65
--- src/sys/arch/pmax/pmax/dec_maxine.c:1.64 Sat Oct 13 02:51:23 2012
+++ src/sys/arch/pmax/pmax/dec_maxine.c Mon Mar 24 15:31:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: dec_maxine.c,v 1.64 2012/10/13 06:51:23 tsutsui Exp $ */
+/* $NetBSD: dec_maxine.c,v 1.65 2014/03/24 19:31:40 christos Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@@ -70,7 +70,7 @@
#define __INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.64 2012/10/13 06:51:23 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.65 2014/03/24 19:31:40 christos Exp $");
#include <sys/param.h>
#include <sys/cpu.h>
@@ -169,7 +169,7 @@ dec_maxine_init(void)
*(volatile uint32_t *)(ioasic_base + IOASIC_IMSK) = xine_tc3_imask;
kn02ca_wbflush();
- sprintf(cpu_model, "Personal DECstation 5000/%d (MAXINE)", mips_options.mips_cpu_mhz);
+ cpu_setmodel("Personal DECstation 5000/%d (MAXINE)", mips_options.mips_cpu_mhz);
}
/*
Index: src/sys/arch/pmax/pmax/machdep.c
diff -u src/sys/arch/pmax/pmax/machdep.c:1.247 src/sys/arch/pmax/pmax/machdep.c:1.248
--- src/sys/arch/pmax/pmax/machdep.c:1.247 Sun Nov 10 15:18:51 2013
+++ src/sys/arch/pmax/pmax/machdep.c Mon Mar 24 15:31:40 2014
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.247 2013/11/10 20:18:51 christos Exp $ */
+/* $NetBSD: machdep.c,v 1.248 2014/03/24 19:31:40 christos Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.247 2013/11/10 20:18:51 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.248 2014/03/24 19:31:40 christos Exp $");
#include "opt_ddb.h"
#include "opt_modular.h"
@@ -58,6 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v
#include <sys/proc.h>
#include <sys/reboot.h>
#include <sys/systm.h>
+#include <sys/cpu.h>
#include <uvm/uvm_extern.h>
@@ -386,7 +387,7 @@ cpu_startup(void)
* Good {morning,afternoon,evening,night}.
*/
printf("%s%s", copyright, version);
- printf("%s\n", cpu_model);
+ printf("%s\n", cpu_getmodel());
format_bytes(pbuf, sizeof(pbuf), ctob(physmem));
printf("total memory = %s\n", pbuf);