Redo the platform specific identification and initialization, making
it more explicit where platform specific functions (like machine check handling) should go.
This commit is contained in:
parent
3e5cee3ce5
commit
b23bbbb05c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.27 1997/09/13 07:42:01 thorpej Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.28 1997/09/23 23:15:42 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -46,7 +46,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.27 1997/09/13 07:42:01 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.28 1997/09/23 23:15:42 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -208,15 +208,12 @@ device_register(dev, aux)
|
|||
struct device *dev;
|
||||
void *aux;
|
||||
{
|
||||
extern const struct cpusw *cpu_fn_switch;
|
||||
|
||||
if (bootdev_data == NULL) {
|
||||
/*
|
||||
* There is no hope.
|
||||
*/
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
(*cpu_fn_switch->device_register)(dev, aux);
|
||||
if (platform.device_register)
|
||||
(*platform.device_register)(dev, aux);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: clock.c,v 1.18 1997/09/02 13:17:58 thorpej Exp $ */
|
||||
/* $NetBSD: clock.c,v 1.19 1997/09/23 23:15:43 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -44,7 +44,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.18 1997/09/02 13:17:58 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.19 1997/09/23 23:15:43 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
|
@ -53,6 +53,7 @@ __KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.18 1997/09/02 13:17:58 thorpej Exp $");
|
|||
|
||||
#include <machine/rpb.h>
|
||||
#include <machine/autoconf.h>
|
||||
#include <machine/cpuconf.h>
|
||||
|
||||
#include <dev/dec/clockvar.h>
|
||||
|
||||
|
@ -135,7 +136,7 @@ cpu_initclocks()
|
|||
* hardclock, which would then fall over because p->p_stats
|
||||
* isn't set at that time.
|
||||
*/
|
||||
set_clockintr();
|
||||
platform.clockintr = (void (*) __P((void *))) hardclock;
|
||||
|
||||
/*
|
||||
* Get the clock started.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpuconf.c,v 1.6 1997/09/02 14:19:29 thorpej Exp $ */
|
||||
/* $NetBSD: cpuconf.c,v 1.7 1997/09/23 23:15:43 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
|
||||
|
@ -30,66 +30,142 @@
|
|||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
/*
|
||||
* CPU (machine) type configuration switch.
|
||||
*
|
||||
* This table should probably go at the end of conf.c, but
|
||||
* I didn't want to make conf.c "different."
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/systm.h>
|
||||
#include <machine/cpuconf.h>
|
||||
#include <machine/rpb.h>
|
||||
|
||||
#include "dec_3000_500.h"
|
||||
#if NDEC_3000_500 > 0
|
||||
extern void dec_3000_500_init __P((void));
|
||||
#else
|
||||
#define dec_3000_500_init nocpu
|
||||
#endif
|
||||
|
||||
#include "dec_3000_300.h"
|
||||
#if NDEC_3000_300 > 0
|
||||
extern void dec_3000_300_init __P((void));
|
||||
#else
|
||||
#define dec_3000_300_init nocpu
|
||||
#endif
|
||||
|
||||
#include "dec_axppci_33.h"
|
||||
#if NDEC_AXPPCI_33 > 0
|
||||
extern void dec_axppci_33_init __P((void));
|
||||
#else
|
||||
#define dec_axppci_33_init nocpu
|
||||
#endif
|
||||
|
||||
#include "dec_kn8ae.h"
|
||||
#if NDEC_KN8AE > 0
|
||||
extern void dec_kn8ae_init __P((void));
|
||||
#else
|
||||
#define dec_kn8ae_init nocpu
|
||||
#endif
|
||||
|
||||
#include "dec_2100_a50.h"
|
||||
#include "dec_3000_300.h"
|
||||
#include "dec_3000_500.h"
|
||||
#include "dec_axppci_33.h"
|
||||
#include "dec_eb164.h"
|
||||
#include "dec_eb64plus.h"
|
||||
#include "dec_kn20aa.h"
|
||||
#include "dec_kn8ae.h"
|
||||
#if NDEC_2100_A50 > 0
|
||||
extern void dec_2100_a50_init __P((void));
|
||||
#else
|
||||
#define dec_2100_a50_init nocpu
|
||||
#endif
|
||||
|
||||
const struct cpusw cpusw[] = {
|
||||
cpu_unknown(), /* 0: ??? */
|
||||
cpu_notdef("Alpha Demonstration Unit"), /* 1: ST_ADU */
|
||||
cpu_notdef("DEC 4000 (\"Cobra\")"), /* 2: ST_DEC_4000 */
|
||||
cpu_notdef("DEC 7000 (\"Ruby\")"), /* 3: ST_DEC_7000 */
|
||||
cpu_init("DEC 3000/500 (\"Flamingo\")",DEC_3000_500,dec_3000_500),
|
||||
/* 4: ST_DEC_3000_500 */
|
||||
cpu_unknown(), /* 5: ??? */
|
||||
cpu_notdef("DEC 2000/300 (\"Jensen\")"),
|
||||
/* 6: ST_DEC_2000_300 */
|
||||
cpu_init("DEC 3000/300 (\"Pelican\")",DEC_3000_300,dec_3000_300),
|
||||
/* 7: ST_DEC_3000_300 */
|
||||
cpu_unknown(), /* 8: ??? */
|
||||
cpu_notdef("DEC 2100/A500 (\"Sable\")"),
|
||||
/* 9: ST_DEC_2100_A500 */
|
||||
cpu_notdef("AXPvme 64"), /* 10: ST_DEC_APXVME_64 */
|
||||
cpu_init("DEC AXPpci",DEC_AXPPCI_33,dec_axppci_33),
|
||||
/* 11: ST_DEC_AXPPCI_33 */
|
||||
cpu_init("AlphaServer 8400",DEC_KN8AE,dec_kn8ae),
|
||||
/* 12: ST_DEC_21000 */
|
||||
cpu_init("AlphaStation 200/400 (\"Avanti\")",DEC_2100_A50,dec_2100_a50),
|
||||
/* 13: ST_DEC_2100_A50 */
|
||||
cpu_notdef("Mustang"), /* 14: ST_DEC_MUSTANG */
|
||||
cpu_init("AlphaStation 600 (KN20AA)",DEC_KN20AA,dec_kn20aa),
|
||||
/* 15: ST_DEC_KN20AA */
|
||||
cpu_unknown(), /* 16: ??? */
|
||||
cpu_notdef("DEC 1000 (\"Mikasa\")"), /* 17: ST_DEC_1000 */
|
||||
cpu_unknown(), /* 18: ??? */
|
||||
cpu_notdef("EB66"), /* 19: ST_EB66 */
|
||||
cpu_init("EB64+",DEC_EB64PLUS,dec_eb64plus),
|
||||
/* 20: ST_EB64P */
|
||||
cpu_unknown(), /* 21: ??? */
|
||||
cpu_notdef("DEC 4100 (\"Rawhide\")"), /* 22: ST_DEC_4100 */
|
||||
cpu_notdef("??? (\"Lego\")"), /* 23: ST_DEC_EV45_PBP */
|
||||
cpu_notdef("DEC 2100A/A500 (\"Lynx\")"),
|
||||
/* 24: ST_DEC_2100A_A500 */
|
||||
cpu_unknown(), /* 25: ??? */
|
||||
cpu_init("EB164",DEC_EB164,dec_eb164), /* 26: ST_EB164 */
|
||||
cpu_notdef("DEC 1000A (\"Noritake\")"), /* 27: ST_DEC_1000A */
|
||||
cpu_notdef("AlphaVME 224 (\"Cortex\")"),
|
||||
/* 28: ST_DEC_ALPHAVME_224 */
|
||||
#include "dec_kn20aa.h"
|
||||
#if NDEC_KN20AA > 0
|
||||
extern void dec_kn20aa_init __P((void));
|
||||
#else
|
||||
#define dec_kn20aa_init nocpu
|
||||
#endif
|
||||
|
||||
#include "dec_eb64plus.h"
|
||||
#if NDEC_EB64PLUS > 0
|
||||
extern void dec_eb64plus_init __P((void));
|
||||
#else
|
||||
#define dec_eb64plus_init nocpu
|
||||
#endif
|
||||
|
||||
#include "dec_eb164.h"
|
||||
#if NDEC_EB164 > 0
|
||||
extern void dec_eb164_init __P((void));
|
||||
#else
|
||||
#define dec_eb164_init nocpu
|
||||
#endif
|
||||
|
||||
void (*cpuinit[]) __P((void)) = {
|
||||
nocpu, /* 0: ??? */
|
||||
nocpu, /* 1: ST_ADU */
|
||||
nocpu, /* 2: ST_DEC_4000 */
|
||||
nocpu, /* 3: ST_DEC_7000 */
|
||||
dec_3000_500_init, /* 4: ST_DEC_3000_500 */
|
||||
nocpu, /* 5: ??? */
|
||||
nocpu, /* 6: ST_DEC_2000_300 */
|
||||
dec_3000_300_init, /* 7: ST_DEC_3000_300 */
|
||||
nocpu, /* 8: ??? */
|
||||
nocpu, /* 9: ST_DEC_2100_A500 */
|
||||
nocpu, /* 10: ST_DEC_APXVME_64 */
|
||||
dec_axppci_33_init, /* 11: ST_DEC_AXPPCI_33 */
|
||||
dec_kn8ae_init, /* 12: ST_DEC_21000 */
|
||||
dec_2100_a50_init, /* 13: ST_DEC_2100_A50 */
|
||||
nocpu, /* 14: ST_DEC_MUSTANG */
|
||||
dec_kn20aa_init, /* 15: ST_DEC_KN20AA */
|
||||
nocpu, /* 16: ??? */
|
||||
nocpu, /* 17: ST_DEC_1000 */
|
||||
nocpu, /* 18: ??? */
|
||||
nocpu, /* 19: ST_EB66 */
|
||||
dec_eb64plus_init, /* 20: ST_EB64P */
|
||||
nocpu, /* 21: ??? */
|
||||
nocpu, /* 22: ST_DEC_4100 */
|
||||
nocpu, /* 23: ST_DEC_EV45_PBP */
|
||||
nocpu, /* 24: ST_DEC_2100A_A500 */
|
||||
nocpu, /* 25: ??? */
|
||||
dec_eb164_init /* 26: ST_EB164 */
|
||||
};
|
||||
const int ncpusw = sizeof (cpusw) / sizeof (cpusw[0]);
|
||||
int ncpuinit = (sizeof (cpuinit) / sizeof (cpuinit[0]));
|
||||
|
||||
void
|
||||
nocpu()
|
||||
{
|
||||
extern int cputype;
|
||||
printf("\n");
|
||||
printf("Support for system type %d is not present in this kernel.\n",
|
||||
cputype);
|
||||
if (unknown_cpu(cputype)) {
|
||||
printf("NetBSD doesn't support this platform yet.\n");
|
||||
} else {
|
||||
char *o;
|
||||
switch (cputype) {
|
||||
case ST_DEC_3000_500:
|
||||
o = "DEC_3000_500";
|
||||
break;
|
||||
case ST_DEC_3000_300:
|
||||
o = "DEC_3000_300";
|
||||
break;
|
||||
case ST_DEC_AXPPCI_33:
|
||||
o = "DEC_AXPPCI_33";
|
||||
break;
|
||||
case ST_DEC_21000:
|
||||
o = "DEC_KN8AE";
|
||||
break;
|
||||
case ST_DEC_2100_A50:
|
||||
o = "DEC_2100_A50";
|
||||
break;
|
||||
case ST_DEC_KN20AA:
|
||||
o = "DEC_KN20AA";
|
||||
break;
|
||||
case ST_EB64P:
|
||||
o = "DEC_EB64PLUS";
|
||||
break;
|
||||
case ST_EB164:
|
||||
o = "DEC_EB164";
|
||||
break;
|
||||
default:
|
||||
o = "JESUS_KNOWS";
|
||||
break;
|
||||
}
|
||||
printf("Build a kernel with \"options %s\" and reboot.\n", o);
|
||||
}
|
||||
printf("\n");
|
||||
panic("support for system not present");
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_2100_a50.c,v 1.33 1997/09/16 20:34:41 is Exp $ */
|
||||
/* $NetBSD: dec_2100_a50.c,v 1.34 1997/09/23 23:15:44 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -26,10 +26,12 @@
|
|||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center
|
||||
*/
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.33 1997/09/16 20:34:41 is Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.34 1997/09/23 23:15:44 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -59,39 +61,56 @@ __KERNEL_RCSID(0, "$NetBSD: dec_2100_a50.c,v 1.33 1997/09/16 20:34:41 is Exp $")
|
|||
#endif
|
||||
static int comcnrate = CONSPEED;
|
||||
|
||||
const char *
|
||||
dec_2100_a50_model_name()
|
||||
{
|
||||
static char s[80];
|
||||
void dec_2100_a50_init __P((void));
|
||||
static void dec_2100_a50_cons_init __P((void));
|
||||
static void dec_2100_a50_device_register __P((struct device *, void *));
|
||||
|
||||
void
|
||||
dec_2100_a50_init()
|
||||
{
|
||||
platform.family = "AlphaStation 200/400 (\"Avanti\")";
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case SV_ST_AVANTI:
|
||||
case SV_ST_AVANTI_XXX: /* XXX apparently the same? */
|
||||
return "AlphaStation 400 4/233 (\"Avanti\")";
|
||||
platform.model = "AlphaStation 400 4/233 (\"Avanti\")";
|
||||
break;
|
||||
|
||||
case SV_ST_MUSTANG2_4_166:
|
||||
return "AlphaStation 200 4/166 (\"Mustang II\")";
|
||||
platform.model = "AlphaStation 200 4/166 (\"Mustang II\")";
|
||||
break;
|
||||
|
||||
case SV_ST_MUSTANG2_4_233:
|
||||
return "AlphaStation 200 4/233 (\"Mustang II\")";
|
||||
platform.model = "AlphaStation 200 4/233 (\"Mustang II\")";
|
||||
break;
|
||||
|
||||
case 0x2000:
|
||||
return "AlphaStation 250 4/266";
|
||||
case SV_ST_AVANTI_4_266:
|
||||
platform.model = "AlphaStation 250 4/266";
|
||||
break;
|
||||
|
||||
case SV_ST_MUSTANG2_4_100:
|
||||
return "AlphaStation 200 4/100 (\"Mustang II\")";
|
||||
platform.model = "AlphaStation 200 4/100 (\"Mustang II\")";
|
||||
break;
|
||||
|
||||
case 0xa800:
|
||||
return "AlphaStation 255/233";
|
||||
case SV_ST_AVANTI_4_233:
|
||||
platform.model = "AlphaStation 255/233";
|
||||
break;
|
||||
|
||||
default:
|
||||
sprintf(s, "DEC 2100/A50 (\"Avanti\") family, variation %lx",
|
||||
{
|
||||
/* string is 24 bytes plus 64 bit hex number (16 byte) */
|
||||
static char s[42];
|
||||
sprintf(s, "unknown model variation %lx",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
return s;
|
||||
platform.model = (const char *) s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
platform.iobus = "apecs";
|
||||
platform.cons_init = dec_2100_a50_cons_init;
|
||||
platform.device_register = dec_2100_a50_device_register;
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dec_2100_a50_cons_init()
|
||||
{
|
||||
struct ctb *ctb;
|
||||
|
@ -143,14 +162,7 @@ dec_2100_a50_cons_init()
|
|||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
dec_2100_a50_iobus_name()
|
||||
{
|
||||
|
||||
return ("apecs");
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dec_2100_a50_device_register(dev, aux)
|
||||
struct device *dev;
|
||||
void *aux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_3000_300.c,v 1.18 1997/09/02 13:18:03 thorpej Exp $ */
|
||||
/* $NetBSD: dec_3000_300.c,v 1.19 1997/09/23 23:15:45 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -27,9 +27,13 @@
|
|||
* rights to redistribute these changes.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_3000_300.c,v 1.18 1997/09/02 13:18:03 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_3000_300.c,v 1.19 1997/09/23 23:15:45 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -47,44 +51,45 @@ __KERNEL_RCSID(0, "$NetBSD: dec_3000_300.c,v 1.18 1997/09/02 13:18:03 thorpej Ex
|
|||
#include <dev/scsipi/scsipi_all.h>
|
||||
#include <dev/scsipi/scsiconf.h>
|
||||
|
||||
const char *
|
||||
dec_3000_300_model_name()
|
||||
{
|
||||
void dec_3000_300_init __P((void));
|
||||
static void dec_3000_300_device_register __P((struct device *, void *));
|
||||
|
||||
void
|
||||
dec_3000_300_init()
|
||||
{
|
||||
platform.family = "DEC 3000/300 (\"Pelican\")";
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case SV_ST_PELICAN:
|
||||
return "DEC 3000/300 (\"Pelican\")";
|
||||
platform.model = "DEC 3000/300 (\"Pelican\")";
|
||||
break;
|
||||
|
||||
case SV_ST_PELICA:
|
||||
return "DEC 3000/300L (\"Pelica\")";
|
||||
platform.model = "DEC 3000/300L (\"Pelica\")";
|
||||
break;
|
||||
|
||||
case SV_ST_PELICANPLUS:
|
||||
return "DEC 3000/300X (\"Pelican+\")";
|
||||
platform.model = "DEC 3000/300X (\"Pelican+\")";
|
||||
break;
|
||||
|
||||
case SV_ST_PELICAPLUS:
|
||||
return "DEC 3000/300LX (\"Pelica+\")";
|
||||
platform.model = "DEC 3000/300LX (\"Pelica+\")";
|
||||
break;
|
||||
|
||||
default:
|
||||
printf("unknown system variation %lx\n",
|
||||
{
|
||||
/* string is 24 bytes plus 64 bit hex number (16 byte) */
|
||||
static char s[42];
|
||||
sprintf(s, "unknown model variation %lx",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
return NULL;
|
||||
platform.model = (const char *) s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
platform.iobus = "tcasic";
|
||||
platform.device_register = dec_3000_300_device_register;
|
||||
}
|
||||
|
||||
void
|
||||
dec_3000_300_cons_init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
const char *
|
||||
dec_3000_300_iobus_name()
|
||||
{
|
||||
|
||||
return ("tcasic");
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dec_3000_300_device_register(dev, aux)
|
||||
struct device *dev;
|
||||
void *aux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_3000_500.c,v 1.17 1997/09/02 13:18:04 thorpej Exp $ */
|
||||
/* $NetBSD: dec_3000_500.c,v 1.18 1997/09/23 23:15:46 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -26,10 +26,13 @@
|
|||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
/*
|
||||
* Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_3000_500.c,v 1.17 1997/09/02 13:18:04 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_3000_500.c,v 1.18 1997/09/23 23:15:46 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -47,62 +50,67 @@ __KERNEL_RCSID(0, "$NetBSD: dec_3000_500.c,v 1.17 1997/09/02 13:18:04 thorpej Ex
|
|||
#include <dev/scsipi/scsipi_all.h>
|
||||
#include <dev/scsipi/scsiconf.h>
|
||||
|
||||
const char *
|
||||
dec_3000_500_model_name()
|
||||
{
|
||||
void dec_3000_500_init __P((void));
|
||||
static void dec_3000_500_device_register __P((struct device *, void *));
|
||||
|
||||
void
|
||||
dec_3000_500_init()
|
||||
{
|
||||
const char *sp = "DEC 3000/400 (\"Sandpiper\")";
|
||||
const char *sf = "DEC 3000/500 (\"Flamingo\")";
|
||||
|
||||
platform.family = "DEC 3000/500 (\"Flamingo\")";
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case SV_ST_SANDPIPER:
|
||||
systype_sandpiper:
|
||||
return "DEC 3000/400 (\"Sandpiper\")";
|
||||
platform.model = sp;
|
||||
break;
|
||||
|
||||
case SV_ST_FLAMINGO:
|
||||
systype_flamingo:
|
||||
return "DEC 3000/500 (\"Flamingo\")";
|
||||
platform.model = sf;
|
||||
break;
|
||||
|
||||
case SV_ST_HOTPINK:
|
||||
return "DEC 3000/500X (\"Hot Pink\")";
|
||||
platform.model = "DEC 3000/500X (\"Hot Pink\")";
|
||||
break;
|
||||
|
||||
case SV_ST_FLAMINGOPLUS:
|
||||
case SV_ST_ULTRA:
|
||||
return "DEC 3000/800 (\"Flamingo+\")";
|
||||
platform.model = "DEC 3000/800 (\"Flamingo+\")";
|
||||
break;
|
||||
|
||||
case SV_ST_SANDPLUS:
|
||||
return "DEC 3000/600 (\"Sandpiper+\")";
|
||||
platform.model = "DEC 3000/600 (\"Sandpiper+\")";
|
||||
break;
|
||||
|
||||
case SV_ST_SANDPIPER45:
|
||||
return "DEC 3000/700 (\"Sandpiper45\")";
|
||||
platform.model = "DEC 3000/700 (\"Sandpiper45\")";
|
||||
break;
|
||||
|
||||
case SV_ST_FLAMINGO45:
|
||||
return "DEC 3000/900 (\"Flamingo45\")";
|
||||
platform.model = "DEC 3000/900 (\"Flamingo45\")";
|
||||
break;
|
||||
|
||||
case SV_ST_RESERVED: /* this is how things used to be done */
|
||||
if (hwrpb->rpb_variation & SV_GRAPHICS)
|
||||
goto systype_flamingo;
|
||||
platform.model = sf;
|
||||
else
|
||||
goto systype_sandpiper;
|
||||
|
||||
platform.model = sp;
|
||||
break;
|
||||
default:
|
||||
printf("unknown system variation %lx\n",
|
||||
{
|
||||
/* string is 24 bytes plus 64 bit hex number (16 byte) */
|
||||
static char s[42];
|
||||
sprintf(s, "unknown model variation %lx",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
return NULL;
|
||||
platform.model = (const char *) s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
platform.iobus = "tcasic";
|
||||
platform.device_register = dec_3000_500_device_register;
|
||||
}
|
||||
|
||||
void
|
||||
dec_3000_500_cons_init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
const char *
|
||||
dec_3000_500_iobus_name()
|
||||
{
|
||||
|
||||
return ("tcasic");
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dec_3000_500_device_register(dev, aux)
|
||||
struct device *dev;
|
||||
void *aux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_axppci_33.c,v 1.31 1997/09/16 20:34:42 is Exp $ */
|
||||
/* $NetBSD: dec_axppci_33.c,v 1.32 1997/09/23 23:15:46 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -26,10 +26,12 @@
|
|||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center
|
||||
*/
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_axppci_33.c,v 1.31 1997/09/16 20:34:42 is Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_axppci_33.c,v 1.32 1997/09/23 23:15:46 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -59,22 +61,35 @@ __KERNEL_RCSID(0, "$NetBSD: dec_axppci_33.c,v 1.31 1997/09/16 20:34:42 is Exp $"
|
|||
#endif
|
||||
static int comcnrate = CONSPEED;
|
||||
|
||||
const char *
|
||||
dec_axppci_33_model_name()
|
||||
{
|
||||
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case 0: /* XXX */
|
||||
return "Alpha PC AXPpci33 (\"NoName\")";
|
||||
|
||||
default:
|
||||
printf("unknown system variation %lx\n",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
void dec_axppci_33_init __P((void));
|
||||
static void dec_axppci_33_cons_init __P((void));
|
||||
static void dec_axppci_33_device_register __P((struct device *, void *));
|
||||
|
||||
void
|
||||
dec_axppci_33_init()
|
||||
{
|
||||
platform.family = "DEC AXPpci";
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case 0:
|
||||
platform.model = "Alpha PC AXPpci33 (\"NoName\")";
|
||||
break;
|
||||
|
||||
default:
|
||||
{
|
||||
/* string is 24 bytes plus 64 bit hex number (16 byte) */
|
||||
static char s[42];
|
||||
sprintf(s, "unknown model variation %lx",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
platform.model = (const char *) s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
platform.iobus = "lca";
|
||||
platform.cons_init = dec_axppci_33_cons_init;
|
||||
platform.device_register = dec_axppci_33_device_register;
|
||||
}
|
||||
|
||||
static void
|
||||
dec_axppci_33_cons_init()
|
||||
{
|
||||
struct ctb *ctb;
|
||||
|
@ -126,14 +141,7 @@ dec_axppci_33_cons_init()
|
|||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
dec_axppci_33_iobus_name()
|
||||
{
|
||||
|
||||
return ("lca");
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dec_axppci_33_device_register(dev, aux)
|
||||
struct device *dev;
|
||||
void *aux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_eb164.c,v 1.19 1997/09/16 20:34:43 is Exp $ */
|
||||
/* $NetBSD: dec_eb164.c,v 1.20 1997/09/23 23:15:47 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -26,10 +26,13 @@
|
|||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
/*
|
||||
* Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.19 1997/09/16 20:34:43 is Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.20 1997/09/23 23:15:47 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -59,19 +62,20 @@ __KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.19 1997/09/16 20:34:43 is Exp $");
|
|||
#endif
|
||||
static int comcnrate = CONSPEED;
|
||||
|
||||
const char *
|
||||
dec_eb164_model_name()
|
||||
{
|
||||
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
default:
|
||||
printf("unknown system variation %lx\n",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
void dec_eb164_init __P((void));
|
||||
static void dec_eb164_cons_init __P((void));
|
||||
static void dec_eb164_device_register __P((struct device *, void *));
|
||||
|
||||
void
|
||||
dec_eb164_init()
|
||||
{
|
||||
platform.family = platform.model = "EB164";
|
||||
platform.iobus = "cia";
|
||||
platform.cons_init = dec_eb164_cons_init;
|
||||
platform.device_register = dec_eb164_device_register;
|
||||
}
|
||||
|
||||
static void
|
||||
dec_eb164_cons_init()
|
||||
{
|
||||
struct ctb *ctb;
|
||||
|
@ -123,14 +127,7 @@ dec_eb164_cons_init()
|
|||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
dec_eb164_iobus_name()
|
||||
{
|
||||
|
||||
return ("cia");
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dec_eb164_device_register(dev, aux)
|
||||
struct device *dev;
|
||||
void *aux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_eb64plus.c,v 1.8 1997/09/16 20:34:45 is Exp $ */
|
||||
/* $NetBSD: dec_eb64plus.c,v 1.9 1997/09/23 23:15:48 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -26,10 +26,13 @@
|
|||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
/*
|
||||
* Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_eb64plus.c,v 1.8 1997/09/16 20:34:45 is Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_eb64plus.c,v 1.9 1997/09/23 23:15:48 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -59,19 +62,34 @@ __KERNEL_RCSID(0, "$NetBSD: dec_eb64plus.c,v 1.8 1997/09/16 20:34:45 is Exp $");
|
|||
#endif
|
||||
static int comcnrate = CONSPEED;
|
||||
|
||||
const char *
|
||||
dec_eb64plus_model_name()
|
||||
{
|
||||
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
default:
|
||||
printf("unknown system variation %lx\n",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
void dec_eb64plus_init __P((void));
|
||||
static void dec_eb64plus_cons_init __P((void));
|
||||
static void dec_eb64plus_device_register __P((struct device *, void *));
|
||||
|
||||
void
|
||||
dec_eb64plus_init()
|
||||
{
|
||||
platform.family = "EB64+";
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case 0:
|
||||
platform.model = platform.family;
|
||||
break;
|
||||
default:
|
||||
{
|
||||
/* string is 24 bytes plus 64 bit hex number (16 byte) */
|
||||
static char s[42];
|
||||
sprintf(s, "unknown model variation %lx",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
platform.model = (const char *) s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
platform.iobus = "apecs";
|
||||
platform.cons_init = dec_eb64plus_cons_init;
|
||||
platform.device_register = dec_eb64plus_device_register;
|
||||
}
|
||||
|
||||
static void
|
||||
dec_eb64plus_cons_init()
|
||||
{
|
||||
struct ctb *ctb;
|
||||
|
@ -123,14 +141,7 @@ dec_eb64plus_cons_init()
|
|||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
dec_eb64plus_iobus_name()
|
||||
{
|
||||
|
||||
return ("apecs");
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dec_eb64plus_device_register(dev, aux)
|
||||
struct device *dev;
|
||||
void *aux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_kn20aa.c,v 1.32 1997/09/16 20:34:46 is Exp $ */
|
||||
/* $NetBSD: dec_kn20aa.c,v 1.33 1997/09/23 23:15:49 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
|
||||
|
@ -26,10 +26,13 @@
|
|||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
/*
|
||||
* Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_kn20aa.c,v 1.32 1997/09/16 20:34:46 is Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_kn20aa.c,v 1.33 1997/09/23 23:15:49 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -59,22 +62,34 @@ __KERNEL_RCSID(0, "$NetBSD: dec_kn20aa.c,v 1.32 1997/09/16 20:34:46 is Exp $");
|
|||
#endif
|
||||
static int comcnrate = CONSPEED;
|
||||
|
||||
const char *
|
||||
dec_kn20aa_model_name()
|
||||
{
|
||||
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case 0:
|
||||
return "AlphaStation 500 or 600 (KN20AA)";
|
||||
|
||||
default:
|
||||
printf("unknown system variation %lx\n",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
void dec_kn20aa_init __P((void));
|
||||
static void dec_kn20aa_cons_init __P((void));
|
||||
static void dec_kn20aa_device_register __P((struct device *, void *));
|
||||
|
||||
void
|
||||
dec_kn20aa_init()
|
||||
{
|
||||
platform.family = "AlphaStation 600 (KN20AA)";
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case 0:
|
||||
platform.model = "AlphaStation 500 or 600 (KN20AA)";
|
||||
break;
|
||||
default:
|
||||
{
|
||||
/* string is 24 bytes plus 64 bit hex number (16 byte) */
|
||||
static char s[42];
|
||||
sprintf(s, "unknown model variation %lx",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
platform.model = (const char *) s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
platform.iobus = "cia";
|
||||
platform.cons_init = dec_kn20aa_cons_init;
|
||||
platform.device_register = dec_kn20aa_device_register;
|
||||
}
|
||||
|
||||
static void
|
||||
dec_kn20aa_cons_init()
|
||||
{
|
||||
struct ctb *ctb;
|
||||
|
@ -126,14 +141,7 @@ dec_kn20aa_cons_init()
|
|||
}
|
||||
}
|
||||
|
||||
const char *
|
||||
dec_kn20aa_iobus_name()
|
||||
{
|
||||
|
||||
return ("cia");
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
dec_kn20aa_device_register(dev, aux)
|
||||
struct device *dev;
|
||||
void *aux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: dec_kn8ae.c,v 1.11 1997/09/02 13:18:11 thorpej Exp $ */
|
||||
/* $NetBSD: dec_kn8ae.c,v 1.12 1997/09/23 23:15:49 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 by Matthew Jacob
|
||||
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_kn8ae.c,v 1.11 1997/09/02 13:18:11 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: dec_kn8ae.c,v 1.12 1997/09/23 23:15:49 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -57,56 +57,44 @@ __KERNEL_RCSID(0, "$NetBSD: dec_kn8ae.c,v 1.11 1997/09/02 13:18:11 thorpej Exp $
|
|||
#include <dev/scsipi/scsipi_all.h>
|
||||
#include <dev/scsipi/scsiconf.h>
|
||||
|
||||
const char *
|
||||
dec_kn8ae_model_name()
|
||||
{
|
||||
static const char *srv = "AlphaServer 8400";
|
||||
|
||||
if ((hwrpb->rpb_variation & SV_ST_MASK) != 0) {
|
||||
static char s[80];
|
||||
sprintf(s, "%s, System Variation %lx\n", srv,
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
return ((const char *)s);
|
||||
} else {
|
||||
return (srv);
|
||||
}
|
||||
}
|
||||
void dec_kn8ae_init __P((void));
|
||||
static void dec_kn8ae_device_register __P((struct device *, void *));
|
||||
|
||||
void
|
||||
dec_kn8ae_cons_init()
|
||||
dec_kn8ae_init()
|
||||
{
|
||||
struct ctb *ctb;
|
||||
platform.family = "AlphaServer 8400";
|
||||
|
||||
ctb = (struct ctb *)(((caddr_t)hwrpb) + hwrpb->rpb_ctb_off);
|
||||
|
||||
/*
|
||||
* The AXP 8X00 seems to encode the
|
||||
* type of console in the ctb_type field,
|
||||
* not the ctb_term_type field.
|
||||
*/
|
||||
if (ctb->ctb_type != 2) {
|
||||
panic("consinit: unsupported console type %d\n",
|
||||
ctb->ctb_term_type);
|
||||
/* NOTREACHED */
|
||||
} else {
|
||||
/*
|
||||
* XXX: We don't know what kind of Console this is
|
||||
* XXX: yet, so we won't change anything and let
|
||||
* XXX: the prom cnputc routine remap the prom in
|
||||
* XXX: as needed.
|
||||
*/
|
||||
switch (hwrpb->rpb_variation & SV_ST_MASK) {
|
||||
case 0:
|
||||
platform.model = platform.family;
|
||||
break;
|
||||
default:
|
||||
{
|
||||
/* string is 24 bytes plus 64 bit hex number (16 byte) */
|
||||
static char s[42];
|
||||
sprintf(s, "unknown model variation %lx",
|
||||
hwrpb->rpb_variation & SV_ST_MASK);
|
||||
platform.model = (const char *) s;
|
||||
break;
|
||||
}
|
||||
}
|
||||
platform.iobus = "tlsb";
|
||||
platform.device_register = dec_kn8ae_device_register;
|
||||
}
|
||||
|
||||
const char *
|
||||
dec_kn8ae_iobus_name()
|
||||
{
|
||||
|
||||
return ("tlsb");
|
||||
}
|
||||
/*
|
||||
* dec_kn8ae_cons_init- not needed right now.
|
||||
*
|
||||
* Info to retain:
|
||||
*
|
||||
* The AXP 8X00 seems to encode the
|
||||
* type of console in the ctb_type field,
|
||||
* not the ctb_term_type field.
|
||||
*/
|
||||
|
||||
/* #define BDEBUG 1 */
|
||||
void
|
||||
static void
|
||||
dec_kn8ae_device_register(dev, aux)
|
||||
struct device *dev;
|
||||
void *aux;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: interrupt.c,v 1.20 1997/09/13 10:01:33 thorpej Exp $ */
|
||||
/* $NetBSD: interrupt.c,v 1.21 1997/09/23 23:15:50 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -26,10 +26,13 @@
|
|||
* any improvements or extensions that they make and grant Carnegie the
|
||||
* rights to redistribute these changes.
|
||||
*/
|
||||
/*
|
||||
* Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.20 1997/09/13 10:01:33 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.21 1997/09/23 23:15:50 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -39,32 +42,16 @@ __KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.20 1997/09/13 10:01:33 thorpej Exp $
|
|||
#include <machine/autoconf.h>
|
||||
#include <machine/reg.h>
|
||||
#include <machine/frame.h>
|
||||
#include <machine/cpuconf.h>
|
||||
|
||||
#ifdef EVCNT_COUNTERS
|
||||
#include <sys/device.h>
|
||||
struct evcnt clock_intr_evcnt; /* event counter for clock intrs. */
|
||||
#else
|
||||
#include <machine/intrcnt.h>
|
||||
#endif
|
||||
|
||||
struct logout {
|
||||
#define LOGOUT_RETRY 0x1000000000000000 /* Retry bit. */
|
||||
#define LOGOUT_LENGTH 0xffff /* Length mask. */
|
||||
u_int64_t q1; /* Retry and length */
|
||||
/* Unspecified. */
|
||||
};
|
||||
|
||||
static void machine_check __P((struct trapframe *, unsigned long,
|
||||
unsigned long));
|
||||
static void nullintr __P((void *, unsigned long));
|
||||
static void real_clockintr __P((void *, unsigned long));
|
||||
|
||||
static void (*iointr) __P((void *, unsigned long)) = nullintr;
|
||||
static void (*clockintr) __P((void *, unsigned long)) = nullintr;
|
||||
static volatile int mc_expected, mc_received;
|
||||
|
||||
#ifdef EVCNT_COUNTERS
|
||||
struct evcnt clock_intr_evcnt; /* event counter for clock intrs. */
|
||||
#endif
|
||||
volatile int mc_expected, mc_received;
|
||||
|
||||
void
|
||||
interrupt(a0, a1, a2, framep)
|
||||
|
@ -72,80 +59,71 @@ interrupt(a0, a1, a2, framep)
|
|||
struct trapframe *framep;
|
||||
{
|
||||
|
||||
if (a0 == 1) { /* clock interrupt */
|
||||
switch (a0) {
|
||||
case ALPHA_INTR_XPROC: /* interprocessor interrupt */
|
||||
printf("interprocessor interrupt!\n");
|
||||
break;
|
||||
|
||||
case ALPHA_INTR_CLOCK: /* clock interrupt */
|
||||
cnt.v_intr++;
|
||||
(*clockintr)(framep, a1);
|
||||
} else if (a0 == 3) { /* I/O device interrupt */
|
||||
cnt.v_intr++;
|
||||
(*iointr)(framep, a1);
|
||||
} else if (a0 == 2) { /* Machine Check or Correctable Error */
|
||||
machine_check(framep, a1, a2);
|
||||
} else if (a0 == 5) { /* Passive Release (?) interrupt XXX */
|
||||
cnt.v_intr++;
|
||||
printf("passive release(?) interrupt vec 0x%lx (ignoring)\n",
|
||||
a1);
|
||||
} else {
|
||||
/*
|
||||
* Not expected or handled:
|
||||
* 0 Interprocessor interrupt
|
||||
* 4 Performance counter
|
||||
*/
|
||||
panic("unexpected interrupt: type 0x%lx, vec 0x%lx\n", a0, a1);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
nullintr(framep, vec)
|
||||
void *framep;
|
||||
unsigned long vec;
|
||||
{
|
||||
}
|
||||
|
||||
static void
|
||||
real_clockintr(framep, vec)
|
||||
void *framep;
|
||||
unsigned long vec;
|
||||
{
|
||||
|
||||
#ifdef EVCNT_COUNTERS
|
||||
clock_intr_evcnt.ev_count++;
|
||||
clock_intr_evcnt.ev_count++;
|
||||
#else
|
||||
intrcnt[INTRCNT_CLOCK]++;
|
||||
intrcnt[INTRCNT_CLOCK]++;
|
||||
#endif
|
||||
hardclock(framep);
|
||||
}
|
||||
if (platform.clockintr)
|
||||
(*platform.clockintr)(framep);
|
||||
break;
|
||||
|
||||
void
|
||||
set_clockintr()
|
||||
{
|
||||
case ALPHA_INTR_ERROR: /* Machine Check or Correctable Error */
|
||||
a0 = alpha_pal_rdmces();
|
||||
if (platform.mcheck_handler)
|
||||
(*platform.mcheck_handler)(a0, framep, a1, a2);
|
||||
else
|
||||
machine_check(a0, framep, a1, a2);
|
||||
break;
|
||||
|
||||
if (clockintr != nullintr)
|
||||
panic("set clockintr twice");
|
||||
case ALPHA_INTR_DEVICE: /* I/O device interrupt */
|
||||
cnt.v_intr++;
|
||||
if (platform.iointr)
|
||||
(*platform.iointr)(framep, a1);
|
||||
break;
|
||||
|
||||
clockintr = real_clockintr;
|
||||
case ALPHA_INTR_PERF: /* interprocessor interrupt */
|
||||
printf("performance interrupt!\n");
|
||||
break;
|
||||
|
||||
case ALPHA_INTR_PASSIVE:
|
||||
#if 0
|
||||
printf("passive release interrupt vec 0x%lx (ignoring)\n", a1);
|
||||
#endif
|
||||
break;
|
||||
|
||||
default:
|
||||
panic("unexpected interrupt: type 0x%lx vec 0x%lx a2 0x%lx\n",
|
||||
a0, a1, a2);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
set_iointr(niointr)
|
||||
void (*niointr) __P((void *, unsigned long));
|
||||
{
|
||||
|
||||
if (iointr != nullintr)
|
||||
if (platform.iointr)
|
||||
panic("set iointr twice");
|
||||
|
||||
iointr = niointr;
|
||||
platform.iointr = niointr;
|
||||
}
|
||||
|
||||
static void
|
||||
machine_check(framep, vector, param)
|
||||
|
||||
void
|
||||
machine_check(mces, framep, vector, param)
|
||||
unsigned long mces;
|
||||
struct trapframe *framep;
|
||||
unsigned long vector, param;
|
||||
{
|
||||
unsigned long mces;
|
||||
const char *type;
|
||||
|
||||
mces = alpha_pal_rdmces();
|
||||
|
||||
/* Make sure it's an error we know about. */
|
||||
if ((mces & (ALPHA_MCES_MIP|ALPHA_MCES_SCE|ALPHA_MCES_PCE)) == 0) {
|
||||
type = "fatal machine check or error (unknown type)";
|
||||
|
@ -200,6 +178,15 @@ int
|
|||
badaddr(addr, size)
|
||||
void *addr;
|
||||
size_t size;
|
||||
{
|
||||
return(badaddr_read(addr, size, NULL));
|
||||
}
|
||||
|
||||
int
|
||||
badaddr_read(addr, size, rptr)
|
||||
void *addr;
|
||||
size_t size;
|
||||
void *rptr;
|
||||
{
|
||||
long rcpt;
|
||||
|
||||
|
@ -240,6 +227,25 @@ badaddr(addr, size)
|
|||
/* disallow further machine checks */
|
||||
mc_expected = 0;
|
||||
|
||||
if (rptr) {
|
||||
switch (size) {
|
||||
case sizeof (u_int8_t):
|
||||
*(volatile u_int8_t *)rptr = rcpt;
|
||||
break;
|
||||
|
||||
case sizeof (u_int16_t):
|
||||
*(volatile u_int16_t *)rptr = rcpt;
|
||||
break;
|
||||
|
||||
case sizeof (u_int32_t):
|
||||
*(volatile u_int32_t *)rptr = rcpt;
|
||||
break;
|
||||
|
||||
case sizeof (u_int64_t):
|
||||
*(volatile u_int64_t *)rptr = rcpt;
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Return non-zero (i.e. true) if it's a bad address. */
|
||||
return (mc_received);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: machdep.c,v 1.88 1997/09/19 22:00:34 mjacob Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.89 1997/09/23 23:15:51 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.88 1997/09/19 22:00:34 mjacob Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.89 1997/09/23 23:15:51 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -166,7 +166,6 @@ u_int32_t no_optimize;
|
|||
char machine[] = MACHINE; /* from <machine/param.h> */
|
||||
char machine_arch[] = MACHINE_ARCH; /* from <machine/param.h> */
|
||||
char cpu_model[128];
|
||||
const struct cpusw *cpu_fn_switch; /* function switch */
|
||||
|
||||
struct user *proc0paddr;
|
||||
|
||||
|
@ -185,6 +184,8 @@ char booted_kernel[64];
|
|||
int bootinfo_valid;
|
||||
struct bootinfo bootinfo;
|
||||
|
||||
struct platform platform;
|
||||
|
||||
#ifdef DDB
|
||||
/* start and end of kernel symbol table */
|
||||
void *ksym_start, *ksym_end;
|
||||
|
@ -435,43 +436,12 @@ alpha_init(pfn, ptb, bim, bip)
|
|||
* Find out what hardware we're on, and remember its type name.
|
||||
*/
|
||||
cputype = hwrpb->rpb_type;
|
||||
if (cputype < 0 || cputype > ncpusw) {
|
||||
unknown_cputype:
|
||||
printf("\n");
|
||||
printf("Unknown system type %d.\n", cputype);
|
||||
printf("\n");
|
||||
panic("unknown system type");
|
||||
if (unknown_cpu(cputype)) {
|
||||
nocpu();
|
||||
/* NOTREACHED */
|
||||
}
|
||||
cpu_fn_switch = &cpusw[cputype];
|
||||
if (cpu_fn_switch->family == NULL)
|
||||
goto unknown_cputype;
|
||||
if (cpu_fn_switch->option == NULL) {
|
||||
printf("\n");
|
||||
printf("NetBSD does not currently support system type %d\n",
|
||||
cputype);
|
||||
printf("(%s family).\n", cpu_fn_switch->family);
|
||||
printf("\n");
|
||||
panic("unsupported system type");
|
||||
}
|
||||
if (!cpu_fn_switch->present) {
|
||||
printf("\n");
|
||||
printf("Support for system type %d (%s family) is\n", cputype,
|
||||
cpu_fn_switch->family);
|
||||
printf("not present in this kernel. Build a kernel with \"options %s\"\n",
|
||||
cpu_fn_switch->option);
|
||||
printf("to include support for this system type.\n");
|
||||
printf("\n");
|
||||
panic("support for system not present");
|
||||
}
|
||||
|
||||
if ((*cpu_fn_switch->model_name)() != NULL)
|
||||
strncpy(cpu_model, (*cpu_fn_switch->model_name)(),
|
||||
sizeof cpu_model - 1);
|
||||
else {
|
||||
strncpy(cpu_model, cpu_fn_switch->family, sizeof cpu_model - 1);
|
||||
strcat(cpu_model, " family"); /* XXX */
|
||||
}
|
||||
cpu_model[sizeof cpu_model - 1] = '\0';
|
||||
cpuinit[cputype]();
|
||||
strcpy(cpu_model, platform.model);
|
||||
|
||||
/* XXX SANITY CHECKING. SHOULD GO AWAY */
|
||||
/* XXX We should always be running on the the primary. */
|
||||
|
@ -700,8 +670,8 @@ unknown_cputype:
|
|||
void
|
||||
consinit()
|
||||
{
|
||||
|
||||
(*cpu_fn_switch->cons_init)();
|
||||
if (platform.cons_init)
|
||||
(*platform.cons_init)();
|
||||
pmap_unmap_prom();
|
||||
|
||||
#ifdef DDB
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: mainbus.c,v 1.22 1997/09/02 13:18:22 thorpej Exp $ */
|
||||
/* $NetBSD: mainbus.c,v 1.23 1997/09/23 23:15:53 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -29,7 +29,7 @@
|
|||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.22 1997/09/02 13:18:22 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.23 1997/09/23 23:15:53 mjacob Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -93,7 +93,6 @@ mbattach(parent, self, aux)
|
|||
struct pcs *pcsp;
|
||||
int i, cpuattachcnt;
|
||||
extern int ncpus;
|
||||
extern const struct cpusw *cpu_fn_switch;
|
||||
|
||||
printf("\n");
|
||||
|
||||
|
@ -126,11 +125,8 @@ mbattach(parent, self, aux)
|
|||
printf("WARNING: %d cpus in machine, %d attached\n",
|
||||
ncpus, cpuattachcnt);
|
||||
|
||||
if ((*cpu_fn_switch->iobus_name)() != NULL) {
|
||||
char iobus_name[16];
|
||||
|
||||
strncpy(iobus_name, (*cpu_fn_switch->iobus_name)(), 16);
|
||||
nca.ca_name = iobus_name;
|
||||
if (platform.iobus != NULL) {
|
||||
nca.ca_name = (char *) platform.iobus;
|
||||
nca.ca_slot = 0;
|
||||
nca.ca_offset = 0;
|
||||
nca.ca_bus = &sc->sc_bus;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cpu.h,v 1.17 1997/07/25 00:04:36 thorpej Exp $ */
|
||||
/* $NetBSD: cpu.h,v 1.18 1997/09/23 23:17:49 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1988 University of Utah.
|
||||
|
@ -135,6 +135,7 @@ struct trapframe;
|
|||
extern int cold;
|
||||
extern struct proc *fpcurproc;
|
||||
extern struct rpb *hwrpb;
|
||||
extern volatile int mc_expected, mc_received;
|
||||
|
||||
void XentArith __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
|
||||
void XentIF __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
|
||||
|
@ -146,6 +147,7 @@ void XentUna __P((u_int64_t, u_int64_t, u_int64_t)); /* MAGIC */
|
|||
void alpha_init __P((u_long, u_long, u_long, u_long));
|
||||
void ast __P((struct trapframe *));
|
||||
int badaddr __P((void *, size_t));
|
||||
int badaddr_read __P((void *, size_t, void *));
|
||||
void child_return __P((struct proc *p));
|
||||
void configure __P((void));
|
||||
u_int64_t console_restart __P((u_int64_t, u_int64_t, u_int64_t));
|
||||
|
@ -155,14 +157,15 @@ void exception_return __P((void)); /* MAGIC */
|
|||
void frametoreg __P((struct trapframe *, struct reg *));
|
||||
long fswintrberr __P((void)); /* MAGIC */
|
||||
void init_prom_interface __P((void));
|
||||
void interrupt __P((unsigned long, unsigned long, unsigned long,
|
||||
struct trapframe *));
|
||||
void interrupt
|
||||
__P((unsigned long, unsigned long, unsigned long, struct trapframe *));
|
||||
void machine_check
|
||||
__P((unsigned long, struct trapframe *, unsigned long, unsigned long));
|
||||
u_int64_t hwrpb_checksum __P((void));
|
||||
void hwrpb_restart_setup __P((void));
|
||||
void regdump __P((struct trapframe *));
|
||||
void regtoframe __P((struct reg *, struct trapframe *));
|
||||
void savectx __P((struct pcb *));
|
||||
void set_clockintr __P((void));
|
||||
void set_iointr __P((void (*)(void *, unsigned long)));
|
||||
void switch_exit __P((struct proc *)); /* MAGIC */
|
||||
void switch_trampoline __P((void)); /* MAGIC */
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
/* $NetBSD: cpuconf.h,v 1.5 1997/09/02 14:25:34 thorpej Exp $ */
|
||||
|
||||
/* $NetBSD: cpuconf.h,v 1.6 1997/09/23 23:17:50 mjacob Exp $ */
|
||||
#ifndef _ALPHA_CPUCONF_H
|
||||
#define _ALPHA_CPUCONF_H
|
||||
/*
|
||||
* Copyright (c) 1996 Christopher G. Demetriou. All rights reserved.
|
||||
*
|
||||
|
@ -29,54 +30,65 @@
|
|||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
struct cpusw {
|
||||
const char *family, *option;
|
||||
int present;
|
||||
const char *(*model_name) __P((void));
|
||||
void (*cons_init) __P((void));
|
||||
const char *(*iobus_name) __P((void));
|
||||
void (*device_register) __P((struct device *dev,
|
||||
void *aux));
|
||||
};
|
||||
|
||||
#define CONCAT(a,b) __CONCAT(a,b)
|
||||
|
||||
#define cpu_fn_name(p,f) CONCAT(CONCAT(p,_),f)
|
||||
|
||||
#define cpu_decl(p) \
|
||||
extern const char *cpu_fn_name(p,model_name) __P((void)); \
|
||||
extern void cpu_fn_name(p,cons_init) __P((void)); \
|
||||
extern const char *cpu_fn_name(p,iobus_name) __P((void)); \
|
||||
extern void cpu_fn_name(p,device_register) \
|
||||
__P((struct device *, void*));
|
||||
|
||||
#define cpu_unknown() { NULL, NULL, 0, }
|
||||
#define cpu_notdef(f) { f, NULL, 0 }
|
||||
|
||||
#define cpu_option_string(o) __STRING(o)
|
||||
#define cpu_option_present(o) (CONCAT(N,o) > NULL)
|
||||
#define cpu_function_init(o,p,f) \
|
||||
(cpu_option_present(o) ? cpu_fn_name(p,f) : 0)
|
||||
#define cpu_init(f,o,p) \
|
||||
{ \
|
||||
f, cpu_option_string(o) , cpu_option_present(o), \
|
||||
cpu_function_init(o,p,model_name), \
|
||||
cpu_function_init(o,p,cons_init), \
|
||||
cpu_function_init(o,p,iobus_name), \
|
||||
cpu_function_init(o,p,device_register), \
|
||||
}
|
||||
|
||||
/*
|
||||
* Additional reworking by Matthew Jacob for NASA/Ames Research Center.
|
||||
* Copyright (c) 1997
|
||||
*/
|
||||
#ifdef _KERNEL
|
||||
extern const struct cpusw cpusw[];
|
||||
extern const int ncpusw;
|
||||
/*
|
||||
* Platform Specific Information and Function Hooks.
|
||||
*
|
||||
* The tags family and model information are strings describing the platform.
|
||||
*
|
||||
* The tag iobus describes the primary iobus for the platform- primarily
|
||||
* to give a hint as to where to start configuring. The likely choices
|
||||
* are one of tcasic, lca, apecs, cia, or tlsb.
|
||||
*
|
||||
*/
|
||||
|
||||
extern struct platform {
|
||||
/*
|
||||
* Platform Information.
|
||||
*/
|
||||
const char *family; /* Family Name */
|
||||
const char *model; /* Model (variant) Name */
|
||||
const char *iobus; /* Primary iobus name */
|
||||
|
||||
/*
|
||||
* Platform Specific Function Hooks
|
||||
* cons_init - console initialization
|
||||
* device_register - boot configuration aid
|
||||
* iointr - I/O interrupt handler
|
||||
* clockintr - Clock Interrupt Handler
|
||||
* mcheck_handler - Platform Specific Machine Check Handler
|
||||
*/
|
||||
void (*cons_init) __P((void));
|
||||
void (*device_register) __P((struct device *, void *));
|
||||
void (*iointr) __P((void *, unsigned long));
|
||||
void (*clockintr) __P((void *));
|
||||
void (*mcheck_handler) __P((unsigned long, struct trapframe *,
|
||||
unsigned long, unsigned long));
|
||||
} platform;
|
||||
|
||||
/*
|
||||
* There is an array of functions to initialize the platform structure.
|
||||
*
|
||||
* It's responsible for filling in the family, model_name and iobus
|
||||
* tags. It may optionally fill in the cons_init, device_register and
|
||||
* mcheck_handler tags.
|
||||
*
|
||||
* The iointr tag is filled in by set_iointr (in interrupt.c).
|
||||
* The clockintr tag is filled in by cpu_initclocks (in clock.c).
|
||||
*
|
||||
* nocpu is function to call when you can't figure what platform you're on.
|
||||
* There's no return from this function.
|
||||
*/
|
||||
|
||||
extern void (*cpuinit[]) __P((void));
|
||||
extern int ncpuinit;
|
||||
extern void nocpu __P((void));
|
||||
|
||||
#define unknown_cpu(x) (!((x) >= 0 && (x) < (int) ncpuinit))
|
||||
|
||||
cpu_decl(dec_2100_a50);
|
||||
cpu_decl(dec_3000_300);
|
||||
cpu_decl(dec_3000_500);
|
||||
cpu_decl(dec_axppci_33);
|
||||
cpu_decl(dec_eb164);
|
||||
cpu_decl(dec_eb64plus);
|
||||
cpu_decl(dec_kn20aa);
|
||||
cpu_decl(dec_kn8ae);
|
||||
#endif /* _KERNEL */
|
||||
#endif /* !_ALPHA_CPUCONF_H */
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: rpb.h,v 1.12 1997/04/06 08:47:40 cgd Exp $ */
|
||||
/* $NetBSD: rpb.h,v 1.13 1997/09/23 23:17:51 mjacob Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
|
||||
|
@ -123,7 +123,9 @@ struct rpb {
|
|||
#define SV_ST_MUSTANG2_4_166 0x00000800 /* Mustang II; 200 4/166 */
|
||||
#define SV_ST_MUSTANG2_4_233 0x00001000 /* Mustang II; 200 4/233 */
|
||||
#define SV_ST_AVANTI_XXX 0x00001400 /* also Avanti; 400 4/233 */
|
||||
#define SV_ST_AVANTI_4_266 0x00002000
|
||||
#define SV_ST_MUSTANG2_4_100 0x00002400 /* Mustang II; 200 4/100 */
|
||||
#define SV_ST_AVANTI_4_233 0x0000a800 /* AlphaStation 255/233 */
|
||||
|
||||
u_int64_t rpb_variation; /* 58 */
|
||||
|
||||
|
|
Loading…
Reference in New Issue