Set cpu_model in the dec_foo_init() functions, make them consistent and

descriptive, and print the model before reporting physical memory size.
This commit is contained in:
thorpej 1998-03-26 06:32:37 +00:00
parent b6fca1a9c8
commit 38d5126caf
7 changed files with 29 additions and 112 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dec_3100.c,v 1.1 1998/03/25 03:57:54 jonathan Exp $ */
/* $NetBSD: dec_3100.c,v 1.2 1998/03/26 06:32:37 thorpej Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@ -117,7 +117,6 @@ struct ifnet;
void dec_3100_init __P((void));
void dec_3100_os_init __P((void));
void dec_3100_bus_reset __P((void));
const char* dec_3100_model_name __P((void));
void dec_3100_enable_intr
__P ((u_int slotno, int (*handler) __P((intr_arg_t sc)),
@ -127,7 +126,6 @@ int dec_3100_intr __P((u_int mask, u_int pc,
void dec_3100_cons_init __P((void));
void dec_3100_device_register __P((struct device *, void *));
const char* dec_3100_model_name __P((void));
static void dec_3100_errintr __P((void));
@ -138,10 +136,6 @@ void
dec_3100_init()
{
platform.family = "Decstation (3MAX)";
platform.model = "3100";
platform.iobus = "ibus";
platform.os_init = dec_3100_os_init;
@ -149,6 +143,8 @@ dec_3100_init()
platform.cons_init = dec_3100_cons_init;
platform.device_register = dec_3100_device_register;
strcpy(cpu_model, "DECstation 2100 or 3100 (PMAX)");
dec_3100_os_init();
}
@ -171,8 +167,6 @@ dec_3100_os_init()
mcclock_addr = (volatile struct chiptime *)
MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK);
mc_cpuspeed(mcclock_addr, MIPS_INT_MASK_3);
strcpy(cpu_model, "3100");
}
@ -192,13 +186,6 @@ dec_3100_cons_init()
}
const char*
dec_3100_model_name()
{
return ("Dec 3100"); /* XXXjrs */
}
void
dec_3100_device_register(dev, aux)
struct device *dev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dec_3max.c,v 1.1 1998/03/25 03:57:54 jonathan Exp $ */
/* $NetBSD: dec_3max.c,v 1.2 1998/03/26 06:32:37 thorpej Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@ -73,7 +73,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.1 1998/03/25 03:57:54 jonathan Exp $");
__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.2 1998/03/26 06:32:37 thorpej Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@ -107,7 +107,6 @@ __KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.1 1998/03/25 03:57:54 jonathan Exp $"
void dec_3max_init __P((void));
void dec_3max_os_init __P((void));
void dec_3max_bus_reset __P((void));
const char* dec_3max_model_name __P((void));
void dec_3max_enable_intr
__P ((u_int slotno, int (*handler) __P((intr_arg_t sc)),
@ -117,7 +116,6 @@ int dec_3max_intr __P((u_int mask, u_int pc,
void dec_3max_cons_init __P((void));
void dec_3max_device_register __P((struct device *, void *));
const char* dec_3max_model_name __P((void));
static void dec_3max_errintr __P((void));
@ -128,10 +126,6 @@ void
dec_3max_init()
{
platform.family = "Decstation 5000/200 (3MAX)";
platform.model = "5000/200";
platform.iobus = "tcbus";
platform.os_init = dec_3max_os_init;
@ -139,6 +133,8 @@ dec_3max_init()
platform.cons_init = dec_3max_cons_init;
platform.device_register = dec_3max_device_register;
strcpy(cpu_model, "DECstation 5000/200 (3MAX)");
dec_3max_os_init();
}
@ -174,7 +170,6 @@ dec_3max_os_init()
MIPS_PHYS_TO_KSEG1(KN02_SYS_CLOCK);
mc_cpuspeed(mcclock_addr, MIPS_INT_MASK_1);
strcpy(cpu_model, "5000/200");
}
@ -200,13 +195,6 @@ dec_3max_cons_init()
{
}
const char*
dec_3max_model_name()
{
return ("Decstation 5000/200");
}
void
dec_3max_device_register(dev, aux)
struct device *dev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dec_3max_subr.c,v 1.1 1998/03/25 03:57:54 jonathan Exp $ */
/* $NetBSD: dec_3max_subr.c,v 1.2 1998/03/26 06:32:37 thorpej Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@ -73,7 +73,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: dec_3max_subr.c,v 1.1 1998/03/25 03:57:54 jonathan Exp $");
__KERNEL_RCSID(0, "$NetBSD: dec_3max_subr.c,v 1.2 1998/03/26 06:32:37 thorpej Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@ -107,7 +107,6 @@ __KERNEL_RCSID(0, "$NetBSD: dec_3max_subr.c,v 1.1 1998/03/25 03:57:54 jonathan E
void dec_3max_init __P((void));
void dec_3max_os_init __P((void));
void dec_3max_bus_reset __P((void));
const char* dec_3max_model_name __P((void));
void dec_3max_enable_intr
__P ((u_int slotno, int (*handler) __P((intr_arg_t sc)),
@ -117,7 +116,6 @@ int dec_3max_intr __P((u_int mask, u_int pc,
void dec_3max_cons_init __P((void));
void dec_3max_device_register __P((struct device *, void *));
const char* dec_3max_model_name __P((void));
static void dec_3max_errintr __P((void));
@ -128,10 +126,6 @@ void
dec_3max_init()
{
platform.family = "Decstation 5000/200 (3MAX)";
platform.model = "5000/200";
platform.iobus = "tcbus";
platform.os_init = dec_3max_os_init;
@ -139,6 +133,8 @@ dec_3max_init()
platform.cons_init = dec_3max_cons_init;
platform.device_register = dec_3max_device_register;
strcpy(cpu_model, "DECstation 5000/200 (3MAX)");
dec_3max_os_init();
}
@ -174,7 +170,6 @@ dec_3max_os_init()
MIPS_PHYS_TO_KSEG1(KN02_SYS_CLOCK);
mc_cpuspeed(mcclock_addr, MIPS_INT_MASK_1);
strcpy(cpu_model, "5000/200");
}
@ -200,13 +195,6 @@ dec_3max_cons_init()
{
}
const char*
dec_3max_model_name()
{
return ("Decstation 5000/200");
}
void
dec_3max_device_register(dev, aux)
struct device *dev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dec_3maxplus.c,v 1.3 1998/03/26 03:12:05 thorpej Exp $ */
/* $NetBSD: dec_3maxplus.c,v 1.4 1998/03/26 06:32:37 thorpej Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@ -73,7 +73,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.3 1998/03/26 03:12:05 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.4 1998/03/26 06:32:37 thorpej Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@ -121,7 +121,6 @@ int dec_3maxplus_intr __P((u_int mask, u_int pc,
void dec_3maxplus_cons_init __P((void));
void dec_3maxplus_device_register __P((struct device *, void *));
const char* dec_3maxplus_model_name __P((void));
static void dec_3maxplus_errintr __P ((void));
@ -140,10 +139,6 @@ void
dec_3maxplus_init()
{
platform.family = "Decstation 5000/240 or 5000/260 (3MAXPLUS)";
platform.model = "5000/2xx";
platform.iobus = "tcioasic";
platform.os_init = dec_3maxplus_os_init;
@ -151,6 +146,8 @@ dec_3maxplus_init()
platform.cons_init = dec_3maxplus_cons_init;
platform.device_register = dec_3maxplus_device_register;
sprintf(cpu_model, "DECstation 5000/2%c0 (3MAXPLUS)",
CPUISMIPS3 ? '6' : '4');
dec_3maxplus_os_init();
}
@ -202,8 +199,6 @@ dec_3maxplus_os_init()
/* clear any memory errors from probes */
*(volatile u_int *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR) = 0;
wbflush();
sprintf(cpu_model, "5000/2%d", cpu_mhz);
}
@ -232,14 +227,6 @@ dec_3maxplus_cons_init()
}
const char*
dec_3maxplus_model_name()
{
return (CPUISMIPS3) ? "Decstation 5000/260"
: "Decstation 5000/240";
}
void
dec_3maxplus_device_register(dev, aux)
struct device *dev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dec_3min.c,v 1.2 1998/03/25 06:22:19 jonathan Exp $ */
/* $NetBSD: dec_3min.c,v 1.3 1998/03/26 06:32:38 thorpej Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@ -73,7 +73,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.2 1998/03/25 06:22:19 jonathan Exp $");
__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.3 1998/03/26 06:32:38 thorpej Exp $");
#include <sys/types.h>
@ -124,7 +124,6 @@ int dec_3min_intr __P((u_int mask, u_int pc,
void dec_3min_device_register __P((struct device *, void *));
void dec_3min_cons_init __P((void));
const char* dec_3min_model_name __P((void));
/*
@ -142,10 +141,6 @@ void
dec_3min_init()
{
platform.family = "Decstation 5000";
platform.model = "5000/1xx";
platform.iobus = "tcbus";
platform.os_init = dec_3min_os_init;
@ -153,6 +148,8 @@ dec_3min_init()
platform.cons_init = dec_3min_cons_init;
platform.device_register = dec_3min_device_register;
sprintf(cpu_model, "DECstation 5000/1%d (3MIN)", cpu_mhz);
dec_3min_os_init();
}
@ -214,9 +211,6 @@ dec_3min_os_init()
*(volatile u_int *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0;
wbflush();
sprintf(cpu_model, "5000/1%d", cpu_mhz);
/*
* The kmin memory hardware seems to wrap memory addresses
* with 4Mbyte SIMMs, which causes the physmem computation
@ -239,13 +233,6 @@ dec_3min_cons_init()
}
const char*
dec_3min_model_name()
{
return ("Decstation 5000/1xx");
}
void
dec_3min_device_register(dev, aux)
struct device *dev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: dec_maxine.c,v 1.2 1998/03/25 06:22:19 jonathan Exp $ */
/* $NetBSD: dec_maxine.c,v 1.3 1998/03/26 06:32:38 thorpej Exp $ */
/*
* Copyright (c) 1998 Jonathan Stone. All rights reserved.
@ -73,7 +73,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.2 1998/03/25 06:22:19 jonathan Exp $");
__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.3 1998/03/26 06:32:38 thorpej Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@ -112,7 +112,6 @@ void dec_maxine_init __P((void));
void dec_maxine_os_init __P((void));
void dec_maxine_bus_reset __P((void));
void dec_maxine_mach_init __P((void));
const char* dec_maxine_model_name __P((void));
void dec_maxine_enable_intr
__P ((u_int slotno, int (*handler) __P((intr_arg_t sc)),
@ -122,8 +121,6 @@ int dec_maxine_intr __P((u_int mask, u_int pc,
void dec_maxine_device_register __P((struct device *, void *));
void dec_maxine_cons_init __P((void));
const char* dec_maxine_model_name __P((void));
/*
@ -138,18 +135,15 @@ void
dec_maxine_init()
{
platform.family = "Personal Decstation (KN02CA, KN04)";
platform.model = " maxine ???";
platform.iobus = "tcbus";
platform.os_init = dec_maxine_os_init;
platform.bus_reset = dec_maxine_bus_reset;
platform.cons_init = dec_maxine_cons_init;
platform.device_register = dec_maxine_device_register;
sprintf(cpu_model, "Personal DECstation 5000/%d (MAXINE)", cpu_mhz);
dec_maxine_os_init();
}
@ -194,9 +188,6 @@ dec_maxine_os_init()
*/
*(u_int *)IOASIC_REG_IMSK(ioasic_base) = XINE_IM0;
*(u_int *)IOASIC_REG_INTR(ioasic_base) = 0;
sprintf(cpu_model, "5000/%d", cpu_mhz);
}
@ -224,13 +215,6 @@ dec_maxine_cons_init()
{
}
const char*
dec_maxine_model_name()
{
return ("Decstation 5000/1xx"); /* XXXjrs */
}
void
dec_maxine_device_register(dev, aux)
struct device *dev;

View File

@ -1,4 +1,4 @@
/* $NetBSD: machdep.c,v 1.110 1998/03/26 01:09:04 thorpej Exp $ */
/* $NetBSD: machdep.c,v 1.111 1998/03/26 06:32:38 thorpej Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@ -43,7 +43,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.110 1998/03/26 01:09:04 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.111 1998/03/26 06:32:38 thorpej Exp $");
/* from: Utah Hdr: machdep.c 1.63 91/04/24 */
@ -148,8 +148,6 @@ void unimpl_errintr __P ((void));
struct platform platform = {
"family not set",
"model not set",
"iobus not set",
unimpl_os_init,
unimpl_bus_reset,
@ -425,11 +423,6 @@ mach_init(argc, argv, code, cv)
/* NOTREACHED */
}
(*sysinit[systype].init)();
#ifdef notyet /* XXXjrs */
strcpy(cpu_model, platform.model);
#endif
/*
* Find out how much memory is available.
@ -524,7 +517,10 @@ cpu_startup()
* Good {morning,afternoon,evening,night}.
*/
printf(version);
printf("real mem = %d\n", ctob(physmem));
printf("%s\n", cpu_model);
printf("real mem = %d\n", ctob(physmem));
/*
* Allocate virtual address space for file I/O buffers.