From fd3f596fa3d69358396475dfe2fcc3b6616fb01e Mon Sep 17 00:00:00 2001 From: ragge Date: Sat, 20 Jul 1996 18:14:41 +0000 Subject: [PATCH] Reflect the changes of CPU determination. Add support for VAXstations. --- sys/arch/vax/vax/autoconf.c | 239 +++++++++++++++++++++--------------- sys/arch/vax/vax/crl.c | 10 +- sys/arch/vax/vax/ka650.c | 13 +- sys/arch/vax/vax/ka750.c | 52 +++----- sys/arch/vax/vax/ka780.c | 63 +++++----- sys/arch/vax/vax/ka860.c | 65 +++++----- sys/arch/vax/vax/locore.c | 90 ++++++++++++-- sys/arch/vax/vax/machdep.c | 111 +++++++++-------- sys/arch/vax/vax/sbi.c | 29 ++--- 9 files changed, 365 insertions(+), 307 deletions(-) diff --git a/sys/arch/vax/vax/autoconf.c b/sys/arch/vax/vax/autoconf.c index e71716a7af1a..a87d7fe1b234 100644 --- a/sys/arch/vax/vax/autoconf.c +++ b/sys/arch/vax/vax/autoconf.c @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.13 1996/05/19 16:43:53 ragge Exp $ */ +/* $NetBSD: autoconf.c,v 1.14 1996/07/20 18:15:00 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -46,119 +46,119 @@ #include #include #include +#include #include #include -#include +#include +#include #include #include -#define BACKPLANE 0 -#define BIBUSS 1 -#define SBIBUSS 2 +#define BACKPLANE 0 +#define BIBUSS 1 +#define SBIBUSS 2 +#define VSBUSS 4 -struct bp_conf { - char *type; - int num; - int partyp; -}; - -extern int cold; - -void notsupp_steal_pages __P((void)); +int mastercpu; /* chief of the system */ +#if defined(VAX630) || defined(VAX410) || defined(VAX43) || defined(VAX46) +#define VAX_uVAX +#endif #ifdef VAX8600 /* XXX These are in ka860 also */ -void ka86_conf __P((struct device *, struct device *, void *)); -int ka86_clock __P((void)); -void ka86_memenable __P((struct sbi_attach_args *, struct device *)); -void ka86_memerr __P((void)); -int ka86_mchk __P((caddr_t)); -void ka86_steal_pages __P((void)); +void ka86_conf __P((struct device *, struct device *, void *)); +void ka86_memenable __P((struct sbi_attach_args *, struct device *)); +void ka86_memerr __P((void)); +int ka86_mchk __P((caddr_t)); +void ka86_steal_pages __P((void)); #endif #ifdef VAX780 /* XXX These are in ka780 also */ -void ka780_conf __P((struct device *, struct device *, void *)); -int ka780_clock __P((void)); -void ka780_memenable __P((struct sbi_attach_args *, void *)); -void ka780_memerr __P((void)); -int ka780_mchk __P((caddr_t)); -void ka780_steal_pages __P((void)); +void ka780_conf __P((struct device *, struct device *, void *)); +void ka780_memenable __P((struct sbi_attach_args *, void *)); +void ka780_memerr __P((void)); +int ka780_mchk __P((caddr_t)); +void ka780_steal_pages __P((void)); #endif + #ifdef VAX750 -int nexty750[]={ NEX_MEM16, NEX_MEM16, NEX_MEM16, NEX_MEM16, - NEX_MBA, NEX_MBA, NEX_MBA, NEX_MBA, +int nexty750[]={ NEX_MEM16, NEX_MEM16, NEX_MEM16, NEX_MEM16, + NEX_MBA, NEX_MBA, NEX_MBA, NEX_MBA, NEX_UBA0, NEX_UBA1, NEX_ANY, NEX_ANY, NEX_ANY, NEX_ANY, NEX_ANY, NEX_ANY}; #endif #if VAX730 int nexty730[NNEX730] = { - NEX_MEM16, NEX_ANY, NEX_ANY, NEX_ANY, + NEX_MEM16, NEX_ANY, NEX_ANY, NEX_ANY, NEX_ANY, NEX_ANY, NEX_ANY, NEX_ANY, }; #endif -struct cpu_dep cpu_calls[VAX_MAX+1]={ +struct cpu_dep cpu_calls[]={ /* Type 0,noexist */ - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #ifdef VAX780 /* Type 1, 11/{780,782,785} */ - {ka780_steal_pages, ka780_clock, ka780_mchk, ka780_memerr, ka780_conf}, + {ka780_steal_pages,generic_clock, ka780_mchk, ka780_memerr, ka780_conf, + generic_clkread, generic_clkwrite}, #else - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #endif -#ifdef VAX750 /* Type 2, 11/750 */ - {ka750_steal_pages, ka750_clock, ka750_mchk, ka750_memerr, ka750_conf}, +#ifdef VAX750 /* Type 2, 11/750 */ + {ka750_steal_pages,generic_clock, ka750_mchk, ka750_memerr, ka750_conf, + generic_clkread, generic_clkwrite}, #else - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #endif #ifdef VAX730 /* Type 3, 11/{730,725}, ceauciesco-vax */ - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #else - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #endif -#ifdef VAX8600 /* Type 4, 8600/8650 (11/{790,795}) */ - {ka86_steal_pages, ka86_clock, ka86_mchk, ka86_memerr, ka86_conf}, +#ifdef VAX8600 /* Type 4, 8600/8650 (11/{790,795}) */ + {ka86_steal_pages, generic_clock, ka86_mchk, ka86_memerr, ka86_conf, + generic_clkread, generic_clkwrite}, #else - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #endif -#ifdef VAX8200 /* Type 5, 8200, 8300, 8350 */ - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, +#ifdef VAX8200 /* Type 5, 8200, 8300, 8350 */ + {ka820_steal_pages, generic_clock, ka820_mchk, ka820_memerr, NULL, + ka820_clkread, ka820_clkwrite}, #else - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #endif -#ifdef VAX8800 /* Type 6, 85X0, 8700, 88X0 */ - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, +#ifdef VAX8800 /* Type 6, 85X0, 8700, 88X0 */ + {NULL, generic_clock, NULL, NULL, NULL }, #else - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #endif #ifdef VAX610 /* Type 7, KA610 */ - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #else - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #endif -#ifdef VAX630 /* Type 8, KA630 or KA410 (uVAX II) */ - {uvaxII_steal_pages, uvaxII_clock, uvaxII_mchk, uvaxII_memerr, - uvaxII_conf}, +#ifdef VAX630 /* Type 8, KA630 or KA410 (uVAX II) */ + {uvax_steal_pages, no_nicr_clock, uvax_mchk, uvax_memerr, uvax_conf, + uvax_clkread, uvax_clkwrite}, #else - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, #endif /* Type 9, not used */ - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, -#ifdef VAX650 /* Type 10, KA65X (uVAX III) */ - {uvaxIII_steal_pages, uvaxIII_clock, uvaxIII_mchk, uvaxIII_memerr, - uvaxIII_conf}, + {NULL, NULL, NULL, NULL, NULL }, +#ifdef VAX650 /* Type 10, KA65X (uVAX III) */ + {uvaxIII_steal_pages, no_nicr_clock, uvaxIII_mchk, uvaxIII_memerr, + uvaxIII_conf, generic_clkread, generic_clkwrite}, #else - {notsupp_steal_pages, NULL, NULL, NULL, NULL }, + {NULL, NULL, NULL, NULL, NULL }, +#endif +#ifdef VAX_uVAX /* Type 11, RIGEL */ + {uvax_steal_pages, no_nicr_clock, uvax_mchk, uvax_memerr, uvax_conf, + uvax_clkread, uvax_clkwrite}, +#else + {NULL, NULL, NULL, NULL, NULL }, #endif }; -void -notsupp_steal_pages() -{ - printf("This cputype not supported.\n"); - asm("halt"); -} - void gencnslask __P((void)); void @@ -206,7 +206,7 @@ backplane_match(parent, gcf, aux) struct device *parent; void *gcf, *aux; { - struct cfdata *cf = gcf; + struct cfdata *cf = gcf; if (cf->cf_unit == 0 && strcmp(cf->cf_driver->cd_name, "backplane") == 0) @@ -215,7 +215,7 @@ backplane_match(parent, gcf, aux) return (0); } -static void find_sbi __P((struct device *, struct bp_conf *, +static void find_sbi __P((struct device *, struct bp_conf *, int (*) __P((void *, char *)))); @@ -225,28 +225,64 @@ backplane_attach(parent, self, hej) void *hej; { struct bp_conf bp; - int i, ccpu, cmem, cbi, csbi; + int i, ccpu = 0, cmem = 0, cbi = 0, csbi = 0, cvsbus = 0; printf("\n"); - switch (cpunumber) { + switch (vax_cputype) { case VAX_750: case VAX_650: case VAX_78032: case VAX_780: - cmem = cbi = 0; ccpu = csbi = 1; break; case VAX_8600: cmem = ccpu = 1; - cbi = csbi = 0; break; default: - cmem = ccpu = cbi = csbi = 0; + break; + } + if (vax_bustype & VAX_VSBUS) { + ccpu = 1; + cvsbus = 1; } bp.partyp = BACKPLANE; + +#if VAX8200 || VAX8800 + bp.type = "bi"; + if (vax_bustype & VAX_BIBUS) { + + switch (vax_cputype) { +#if VAX8200 + case VAX_8200: { + extern void *bi_nodebase; + + bp.bp_addr = (int)bi_nodebase; + config_found(self, &bp, printut); + break; + } +#endif +#ifdef notyet + case VAX_8800: { + int bi, biaddr; + + for (bi = 0; bi < MAXNBI; bi++) { + biaddr = BI_BASE(bi) + BI_PROBE; + if (badaddr((caddr_t)biaddr, 4)) + continue; + + bp.bp_addr = BI_BASE(bi); + config_found(self, &bp, printut); + } + break; + } +#endif + } + } +#endif + bp.type = "cpu"; for (i = 0; i < ccpu; i++) { bp.num = i; @@ -257,18 +293,18 @@ backplane_attach(parent, self, hej) bp.num = i; config_found(self, &bp, printut); } - bp.type = "bi"; - for (i = 0; i < cbi; i++) { - bp.num = i; - config_found(self, &bp, printut); - } bp.type = "sbi"; for(i = 0; i < csbi; i++) { bp.num = i; config_found(self, &bp, printut); } + bp.type = "vsbus"; + for(i = 0; i < cvsbus; i++) { + bp.num = i; + config_found(self, &bp, printut); + } #if VAX8600 - if (cpunumber == VAX_8600) + if (vax_cputype == VAX_8600) find_sbi(self, &bp, printut); #endif } @@ -281,7 +317,7 @@ find_sbi(self, bp, print) int (*print) __P((void *, char *)); { volatile int tmp; - volatile struct sbia_regs *sbiar; + volatile struct sbia_regs *sbiar; extern struct ioa *ioa; int type, i; @@ -311,28 +347,29 @@ find_sbi(self, bp, print) } #endif -int cpu_match __P((struct device *, void *, void *)); -void cpu_attach __P((struct device *, struct device *, void *)); +int cpu_match __P((struct device *, void *, void *)); +void cpu_attach __P((struct device *, struct device *, void *)); int cpu_match(parent, gcf, aux) - struct device *parent; - void *gcf, *aux; + struct device *parent; + void *gcf, *aux; { - struct cfdata *cf = gcf; + struct cfdata *cf = gcf; struct bp_conf *bp = aux; if (strcmp(bp->type, "cpu")) return 0; - switch (cpunumber) { -#if VAX750 || VAX630 || VAX650 || VAX780 || VAX8600 + switch (vax_cputype) { +#if VAX750 || VAX630 || VAX650 || VAX780 || VAX8600 || VAX410 case VAX_750: case VAX_78032: case VAX_650: case VAX_780: case VAX_8600: + default: if(cf->cf_unit == 0 && bp->partyp == BACKPLANE) return 1; break; @@ -344,26 +381,26 @@ cpu_match(parent, gcf, aux) void cpu_attach(parent, self, aux) - struct device *parent, *self; - void *aux; + struct device *parent, *self; + void *aux; { - (*cpu_calls[cpunumber].cpu_conf)(parent, self, aux); + (*cpu_calls[vax_cputype].cpu_conf)(parent, self, aux); } -int mem_match __P((struct device *, void *, void *)); -void mem_attach __P((struct device *, struct device *, void *)); +int mem_match __P((struct device *, void *, void *)); +void mem_attach __P((struct device *, struct device *, void *)); int mem_match(parent, gcf, aux) - struct device *parent; - void *gcf, *aux; + struct device *parent; + void *gcf, *aux; { - struct cfdata *cf = gcf; + struct cfdata *cf = gcf; struct sbi_attach_args *sa = (struct sbi_attach_args *)aux; - struct bp_conf *bp = aux; + struct bp_conf *bp = aux; #if VAX8600 - if (cpunumber == VAX_8600 && !strcmp(parent->dv_xname, "backplane0")) { + if (vax_cputype == VAX_8600 && !strcmp(parent->dv_xname, "backplane0")) { if (strcmp(bp->type, "mem")) return 0; return 1; @@ -404,14 +441,14 @@ mem_match(parent, gcf, aux) void mem_attach(parent, self, aux) - struct device *parent, *self; - void *aux; + struct device *parent, *self; + void *aux; { struct sbi_attach_args *sa = (struct sbi_attach_args *)aux; struct mem_softc *sc = (void *)self; #if VAX8600 - if (cpunumber == VAX_8600) { + if (vax_cputype == VAX_8600) { ka86_memenable(0, 0); printf("\n"); return; @@ -421,7 +458,7 @@ mem_attach(parent, self, aux) sc->sc_memtype = sa->nexinfo; sc->sc_memnr = sa->type; - switch (cpunumber) { + switch (vax_cputype) { #ifdef VAX750 case VAX_750: ka750_memenable(sa, (void *)sc); @@ -454,7 +491,7 @@ struct cfattach cpu_backplane_ca = { sizeof(struct device), cpu_match, cpu_attach }; -struct cfdriver mem_cd = { +struct cfdriver mem_cd = { NULL, "mem", DV_CPU }; diff --git a/sys/arch/vax/vax/crl.c b/sys/arch/vax/vax/crl.c index c928997904fd..e609c138a02c 100644 --- a/sys/arch/vax/vax/crl.c +++ b/sys/arch/vax/vax/crl.c @@ -1,4 +1,4 @@ -/* $NetBSD: crl.c,v 1.2 1996/04/08 18:32:30 ragge Exp $ */ +/* $NetBSD: crl.c,v 1.3 1996/07/20 18:14:57 ragge Exp $ */ /*- * Copyright (c) 1982, 1986 The Regents of the University of California. * All rights reserved. @@ -75,17 +75,17 @@ int crlclose __P((dev_t, int, struct proc *)); int crlrw __P((dev_t, struct uio *, int)); -struct ivec_dsp crl_intr; +struct ivec_dsp crl_intr; void crlattach() { - extern struct ivec_dsp idsptch; + extern struct ivec_dsp idsptch; bcopy(&idsptch, &crl_intr, sizeof(struct ivec_dsp)); scb->scb_csrint = &crl_intr; crl_intr.hoppaddr = crlintr; -} +} /*ARGSUSED*/ int @@ -94,7 +94,7 @@ crlopen(dev, flag, p) int flag; struct proc *p; { - if (cpunumber != VAX_8600) + if (vax_cputype != VAX_8600) return (ENXIO); if (crltab.crl_state != CRL_IDLE) return (EALREADY); diff --git a/sys/arch/vax/vax/ka650.c b/sys/arch/vax/vax/ka650.c index be709787e569..7f502a97b3fd 100644 --- a/sys/arch/vax/vax/ka650.c +++ b/sys/arch/vax/vax/ka650.c @@ -1,4 +1,4 @@ -/* $NetBSD: ka650.c,v 1.3 1996/04/08 18:32:41 ragge Exp $ */ +/* $NetBSD: ka650.c,v 1.4 1996/07/20 18:14:55 ragge Exp $ */ /* * Copyright (c) 1988 The Regents of the University of California. * All rights reserved. @@ -131,13 +131,6 @@ uvaxIII_steal_pages() subtyp = *jon; } -int -uvaxIII_clock() -{ - mtpr(0x40, PR_ICCS); /* Start clock and enable interrupt */ - return 1; -} - void uvaxIII_memerr() { @@ -241,9 +234,9 @@ uvaxIII_mchk(cmcf) } if (time.tv_sec - i < 7) { ka650discache(); - printf(" parity error: cacheing disabled\n"); + printf(" parity error: cacheing disabled\n"); } else { - printf(" parity error: flushing cache\n"); + printf(" parity error: flushing cache\n"); ka650encache(); } /* diff --git a/sys/arch/vax/vax/ka750.c b/sys/arch/vax/vax/ka750.c index fbcf608c377e..f24ae41dd8ca 100644 --- a/sys/arch/vax/vax/ka750.c +++ b/sys/arch/vax/vax/ka750.c @@ -1,4 +1,4 @@ -/* $NetBSD: ka750.c,v 1.12 1996/04/08 18:32:42 ragge Exp $ */ +/* $NetBSD: ka750.c,v 1.13 1996/07/20 18:14:53 ragge Exp $ */ /*- * Copyright (c) 1982, 1986, 1988 The Regents of the University of California. @@ -34,7 +34,7 @@ * SUCH DAMAGE. * * @(#)ka750.c 7.4 (Berkeley) 5/9/91 - * @(#)autoconf.c 7.20 (Berkeley) 5/9/91 + * @(#)autoconf.c 7.20 (Berkeley) 5/9/91 */ #include @@ -48,8 +48,10 @@ #include #include #include +#include #include #include + #include #include @@ -60,14 +62,14 @@ void ctuattach __P((void)); */ void ka750_conf(parent, self, aux) - struct device *parent, *self; - void *aux; + struct device *parent, *self; + void *aux; { extern char cpu_model[]; strcpy(cpu_model,"VAX 11/750"); printf(": 11/750, hardware rev %d, ucode rev %d\n", - V750HARDW(cpu_type), V750UCODE(cpu_type)); + V750HARDW(vax_cpudata), V750UCODE(vax_cpudata)); printf("%s: ", self->dv_xname); if (mfpr(PR_ACCS) & 255) { printf("FPA present, enabling.\n"); @@ -79,28 +81,6 @@ ka750_conf(parent, self, aux) ctuattach(); } -/* - * ka750_clock() makes the 11/750 interrupt clock and todr - * register start counting. - */ -int -ka750_clock() -{ - - mtpr(-10000, PR_NICR); /* Load in count register */ - mtpr(0x800000d1, PR_ICCS); /* Start clock and enable interrupt */ - if (mfpr(PR_TODR)) { - /* todr running */ - return 0; - } else { - /* Start TODR register. */ - mtpr(1, PR_TODR); - return 1; - } - -} - - extern volatile caddr_t mcraddr[]; struct mcr750 { @@ -109,17 +89,17 @@ struct mcr750 { int mc_inf; /* info bits */ }; -#define M750_ICRD 0x10000000 /* inhibit crd interrupts, in [1] */ -#define M750_UNCORR 0xc0000000 /* uncorrectable error, in [0] */ -#define M750_CORERR 0x20000000 /* correctable error, in [0] */ +#define M750_ICRD 0x10000000 /* inhibit crd interrupts, in [1] */ +#define M750_UNCORR 0xc0000000 /* uncorrectable error, in [0] */ +#define M750_CORERR 0x20000000 /* correctable error, in [0] */ -#define M750_INH(mcr) ((mcr)->mc_inh = 0) -#define M750_ENA(mcr) ((mcr)->mc_err = (M750_UNCORR|M750_CORERR), \ +#define M750_INH(mcr) ((mcr)->mc_inh = 0) +#define M750_ENA(mcr) ((mcr)->mc_err = (M750_UNCORR|M750_CORERR), \ (mcr)->mc_inh = M750_ICRD) -#define M750_ERR(mcr) ((mcr)->mc_err & (M750_UNCORR|M750_CORERR)) +#define M750_ERR(mcr) ((mcr)->mc_err & (M750_UNCORR|M750_CORERR)) -#define M750_SYN(err) ((err) & 0x7f) -#define M750_ADDR(err) (((err) >> 9) & 0x7fff) +#define M750_SYN(err) ((err) & 0x7f) +#define M750_ADDR(err) (((err) >> 9) & 0x7fff) /* enable crd interrupts */ void @@ -209,7 +189,7 @@ struct mc750frame { }; #define MC750_TBERR 2 /* type code of cp tbuf par */ -#define MC750_TBPAR 4 /* tbuf par bit in mcesr */ +#define MC750_TBPAR 4 /* tbuf par bit in mcesr */ int ka750_mchk(cmcf) diff --git a/sys/arch/vax/vax/ka780.c b/sys/arch/vax/vax/ka780.c index 7eb7e0569b84..9098792d74c0 100644 --- a/sys/arch/vax/vax/ka780.c +++ b/sys/arch/vax/vax/ka780.c @@ -1,4 +1,4 @@ -/* $NetBSD: ka780.c,v 1.3 1996/04/08 18:32:43 ragge Exp $ */ +/* $NetBSD: ka780.c,v 1.4 1996/07/20 18:14:51 ragge Exp $ */ /*- * Copyright (c) 1982, 1986, 1988 The Regents of the University of California. * All rights reserved. @@ -51,12 +51,13 @@ #include #include #include +#include + #include #include /* Prototypes. XXX These should be somewhere else */ void ka780_conf __P((struct device *, struct device *, void *)); -int ka780_clock __P((void)); void ka780_memenable __P((struct sbi_attach_args *, void *)); void ka780_memerr __P((void)); int ka780_mchk __P((caddr_t)); @@ -69,45 +70,45 @@ struct mcr780 { int mc_reg[4]; }; -#define M780_ICRD 0x40000000 /* inhibit crd interrupts, in [2] */ -#define M780_HIER 0x20000000 /* high error rate, in reg[2] */ -#define M780_ERLOG 0x10000000 /* error log request, in reg[2] */ +#define M780_ICRD 0x40000000 /* inhibit crd interrupts, in [2] */ +#define M780_HIER 0x20000000 /* high error rate, in reg[2] */ +#define M780_ERLOG 0x10000000 /* error log request, in reg[2] */ /* on a 780, memory crd's occur only when bit 15 is set in the SBIER */ /* register; bit 14 there is an error bit which we also clear */ /* these bits are in the back of the ``red book'' (or in the VMS code) */ -#define M780C_INH(mcr) \ +#define M780C_INH(mcr) \ ((mcr)->mc_reg[2] = (M780_ICRD|M780_HIER|M780_ERLOG)); \ mtpr(0, PR_SBIER); -#define M780C_ENA(mcr) \ +#define M780C_ENA(mcr) \ ((mcr)->mc_reg[2] = (M780_HIER|M780_ERLOG)); mtpr(3<<14, PR_SBIER); -#define M780C_ERR(mcr) \ +#define M780C_ERR(mcr) \ ((mcr)->mc_reg[2] & (M780_ERLOG)) -#define M780C_SYN(mcr) ((mcr)->mc_reg[2] & 0xff) -#define M780C_ADDR(mcr) (((mcr)->mc_reg[2] >> 8) & 0xfffff) +#define M780C_SYN(mcr) ((mcr)->mc_reg[2] & 0xff) +#define M780C_ADDR(mcr) (((mcr)->mc_reg[2] >> 8) & 0xfffff) -#define M780EL_INH(mcr) \ +#define M780EL_INH(mcr) \ ((mcr)->mc_reg[2] = (M780_ICRD|M780_HIER|M780_ERLOG)); \ mtpr(0, PR_SBIER); -#define M780EL_ENA(mcr) \ +#define M780EL_ENA(mcr) \ ((mcr)->mc_reg[2] = (M780_HIER|M780_ERLOG)); mtpr(3<<14, PR_SBIER); -#define M780EL_ERR(mcr) \ +#define M780EL_ERR(mcr) \ ((mcr)->mc_reg[2] & (M780_ERLOG)) -#define M780EL_SYN(mcr) ((mcr)->mc_reg[2] & 0x7f) -#define M780EL_ADDR(mcr) (((mcr)->mc_reg[2] >> 11) & 0x1ffff) +#define M780EL_SYN(mcr) ((mcr)->mc_reg[2] & 0x7f) +#define M780EL_ADDR(mcr) (((mcr)->mc_reg[2] >> 11) & 0x1ffff) -#define M780EU_INH(mcr) \ +#define M780EU_INH(mcr) \ ((mcr)->mc_reg[3] = (M780_ICRD|M780_HIER|M780_ERLOG)); \ mtpr(0, PR_SBIER); -#define M780EU_ENA(mcr) \ +#define M780EU_ENA(mcr) \ ((mcr)->mc_reg[3] = (M780_HIER|M780_ERLOG)); mtpr(3<<14, PR_SBIER); -#define M780EU_ERR(mcr) \ +#define M780EU_ERR(mcr) \ ((mcr)->mc_reg[3] & (M780_ERLOG)) -#define M780EU_SYN(mcr) ((mcr)->mc_reg[3] & 0x7f) -#define M780EU_ADDR(mcr) (((mcr)->mc_reg[3] >> 11) & 0x1ffff) +#define M780EU_SYN(mcr) ((mcr)->mc_reg[3] & 0x7f) +#define M780EU_ADDR(mcr) (((mcr)->mc_reg[3] >> 11) & 0x1ffff) /* enable crd interrrupts */ void @@ -213,8 +214,8 @@ struct { 0x73, "L19", 0x75, "L21", 0x76, "L22", 0x79, "L25", 0x7A, "L26", 0x7C, "L28", 0x7F, "L31", 0x80, "C07", 0x89, "U01", 0x8A, "U02", 0x8C, "U04", 0x8F, "U07", - 0x91, "U09", 0x92, "U10", 0x94, "U12", 0x97, "U15", - 0x98, "U16", 0x9B, "U19", 0x9D, "U21", 0x9E, "U22", + 0x91, "U09", 0x92, "U10", 0x94, "U12", 0x97, "U15", + 0x98, "U16", 0x9B, "U19", 0x9D, "U21", 0x9E, "U22", 0xA8, "U00", 0xAB, "U03", 0xAD, "U05", 0xAE, "U06", 0xB0, "U08", 0xB3, "U11", 0xB5, "U13", 0xB6, "U14", 0xB9, "U17", 0xBA, "U18", 0xBC, "U20", 0xBF, "U23", @@ -244,7 +245,7 @@ memlog(m, mcr) #endif TRENDATA char *mc780[]={"0","1","2","3","4","5","6","7","8","9","10","11","12","13", - "14","15"}; + "14","15"}; struct mc780frame { int mc8_bcnt; /* byte count == 0x28 */ @@ -296,11 +297,11 @@ struct ka78x { void ka780_conf(parent, self, aux) - struct device *parent, *self; - void *aux; + struct device *parent, *self; + void *aux; { - extern char cpu_model[]; - struct ka78x *ka78 = (void *)&cpu_type; + extern char cpu_model[]; + struct ka78x *ka78 = (void *)&vax_cpudata; /* Enable cache */ mtpr(0x200000, PR_SBIMT); @@ -319,14 +320,6 @@ ka780_conf(parent, self, aux) } -int -ka780_clock() -{ - mtpr(-10000, PR_NICR); /* Load in count register */ - mtpr(0x800000d1, PR_ICCS); /* Start clock and enable interrupt */ - return 0; -} - void ka780_steal_pages() { diff --git a/sys/arch/vax/vax/ka860.c b/sys/arch/vax/vax/ka860.c index b41b228b3607..cd66d4e03b1f 100644 --- a/sys/arch/vax/vax/ka860.c +++ b/sys/arch/vax/vax/ka860.c @@ -1,4 +1,4 @@ -/* $NetBSD: ka860.c,v 1.3 1996/04/08 18:32:45 ragge Exp $ */ +/* $NetBSD: ka860.c,v 1.4 1996/07/20 18:14:48 ragge Exp $ */ /* * Copyright (c) 1986, 1988 Regents of the University of California. * All rights reserved. @@ -49,32 +49,32 @@ #include #include #include +#include struct ioa *ioa; /* XXX These are in autoconf.c also */ void ka86_conf __P((struct device *, struct device *, void *)); -int ka86_clock __P((void)); void ka86_memenable __P((struct sbi_attach_args *, struct device *)); void ka86_memerr __P((void)); int ka86_mchk __P((caddr_t)); -void ka86_steal_pages __P((void)); +void ka86_steal_pages __P((void)); void crlattach __P((void)); /* * 8600 memory register (MERG) bit definitions */ -#define M8600_ICRD 0x400 /* inhibit crd interrupts */ +#define M8600_ICRD 0x400 /* inhibit crd interrupts */ #define M8600_TB_ERR 0xf00 /* translation buffer error mask */ /* * MDECC register */ -#define M8600_ADDR_PE 0x080000 /* address parity error */ +#define M8600_ADDR_PE 0x080000 /* address parity error */ #define M8600_DBL_ERR 0x100000 /* data double bit error */ -#define M8600_SNG_ERR 0x200000 /* data single bit error */ -#define M8600_BDT_ERR 0x400000 /* bad data error */ +#define M8600_SNG_ERR 0x200000 /* data single bit error */ +#define M8600_BDT_ERR 0x400000 /* bad data error */ /* * ESPA register is used to address scratch pad registers in the Ebox. @@ -88,7 +88,7 @@ void crlattach __P((void)); * The scratchpad registers that are supplied for a single bit ECC * error are: */ -#define SPAD_MSTAT1 0x25 /* scratch pad mstat1 register */ +#define SPAD_MSTAT1 0x25 /* scratch pad mstat1 register */ #define SPAD_MSTAT2 0x26 /* scratch pad mstat2 register */ #define SPAD_MDECC 0x27 /* scratch pad mdecc register */ #define SPAD_MEAR 0x2a /* scratch pad mear register */ @@ -124,7 +124,7 @@ ka86_memenable(sa, dev) void ka86_memerr() { - register int reg11 = 0; /* known to be r11 below */ + register int reg11 = 0; /* known to be r11 below */ int mdecc, mear, mstat1, mstat2, array; /* @@ -161,25 +161,25 @@ ka86_memerr() } } -#define NMC8600 7 +#define NMC8600 7 char *mc8600[] = { "unkn type", "fbox error", "ebox error", "ibox error", "mbox error", "tbuf error", "mbox 1D error" }; /* codes for above */ -#define MC_FBOX 1 -#define MC_EBOX 2 -#define MC_IBOX 3 -#define MC_MBOX 4 -#define MC_TBUF 5 -#define MC_MBOX1D 6 +#define MC_FBOX 1 +#define MC_EBOX 2 +#define MC_IBOX 3 +#define MC_MBOX 4 +#define MC_TBUF 5 +#define MC_MBOX1D 6 /* error bits */ -#define MBOX_FE 0x8000 /* Mbox fatal error */ -#define FBOX_SERV 0x10000000 /* Fbox service error */ -#define IBOX_ERR 0x2000 /* Ibox error */ -#define EBOX_ERR 0x1e00 /* Ebox error */ -#define MBOX_1D 0x81d0000 /* Mbox 1D error */ +#define MBOX_FE 0x8000 /* Mbox fatal error */ +#define FBOX_SERV 0x10000000 /* Fbox service error */ +#define IBOX_ERR 0x2000 /* Ibox error */ +#define EBOX_ERR 0x1e00 /* Ebox error */ +#define MBOX_1D 0x81d0000 /* Mbox 1D error */ #define EDP_PE 0x200 struct mc8600frame { @@ -257,9 +257,9 @@ ka86_mchk(cmcf) void ka86_steal_pages() { - extern vm_offset_t avail_start, virtual_avail; - extern struct nexus *nexus; - int junk; + extern vm_offset_t avail_start, virtual_avail; + extern struct nexus *nexus; + int junk; /* 8600 may have 2 SBI's == 4 pages */ MAPPHYS(junk, 4, VM_PROT_READ|VM_PROT_WRITE); @@ -293,11 +293,11 @@ struct ka86 { void ka86_conf(parent, self, aux) - struct device *parent, *self; - void *aux; + struct device *parent, *self; + void *aux; { - extern char cpu_model[]; - struct ka86 *ka86 = (void *)&cpu_type; + extern char cpu_model[]; + struct ka86 *ka86 = (void *)&vax_cpudata; /* Enable cache */ mtpr(3, PR_CSWP); @@ -316,12 +316,3 @@ ka86_conf(parent, self, aux) printf("no FPA\n"); crlattach(); } - -int -ka86_clock() -{ - mtpr(-10000, PR_NICR); /* Load in count register */ - mtpr(0x800000d1, PR_ICCS); /* Start clock and enable interrupt */ - return 0; -} - diff --git a/sys/arch/vax/vax/locore.c b/sys/arch/vax/vax/locore.c index 100dd6bd794f..8450cf5056cc 100644 --- a/sys/arch/vax/vax/locore.c +++ b/sys/arch/vax/vax/locore.c @@ -1,4 +1,4 @@ -/* $NetBSD: locore.c,v 1.15 1996/05/19 16:44:07 ragge Exp $ */ +/* $NetBSD: locore.c,v 1.16 1996/07/20 18:14:46 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -53,10 +53,25 @@ void start __P((void)); void main __P((void)); u_int proc0paddr; -int cpunumber, *Sysmap, boothowto, cpu_type; +int *Sysmap, boothowto; char *esym; extern int bootdev; +/* + * We set up some information about the machine we're + * running on and thus initializes/uses vax_cputype and vax_boardtype. + * There should be no need to change/reinitialize these variables + * outside of this routine, they should be read only! + */ +int vax_cputype; /* highest byte of SID register */ +int vax_bustype; /* holds/defines all busses on this machine */ +int vax_boardtype; /* machine dependend, combination of SID and SIE */ +int vax_systype; /* machine dependend identification of the system */ + +int vax_cpudata; /* contents of the SID register */ +int vax_siedata; /* contents of the SIE register */ +int vax_confdata; /* machine dependend, configuration/setup data */ + /* * Start is called from boot; the first routine that is called * in kernel. Kernel stack is setup somewhere in a safe place; @@ -116,11 +131,11 @@ tokmem: movw $0xfff, _panic Sysmap = (u_int *)ROUND_PAGE(mfpr(PR_KSP)); /* Be sure some important internal registers have safe values */ - ((struct pcb *)proc0paddr)->P0LR = 0; - ((struct pcb *)proc0paddr)->P0BR = (void *)0x80000000; - ((struct pcb *)proc0paddr)->P1LR = 0; - ((struct pcb *)proc0paddr)->P1BR = (void *)0x80000000; - ((struct pcb *)proc0paddr)->iftrap = NULL; + ((struct pcb *)proc0paddr)->P0LR = 0; + ((struct pcb *)proc0paddr)->P0BR = (void *)0x80000000; + ((struct pcb *)proc0paddr)->P1LR = 0; + ((struct pcb *)proc0paddr)->P1BR = (void *)0x80000000; + ((struct pcb *)proc0paddr)->iftrap = NULL; mtpr(0, PR_P0LR); mtpr(0x80000000, PR_P0BR); mtpr(0, PR_P1LR); @@ -129,13 +144,64 @@ tokmem: movw $0xfff, _panic mtpr(0, PR_SCBB); /* SCB at physical addr */ mtpr(0, PR_ESP); /* Must be zero, used in page fault routine */ mtpr(AST_NO, PR_ASTLVL); - - cninit(); /* Count up memory etc... early machine dependent routines */ - if ((cpunumber = MACHID(mfpr(PR_SID))) > VAX_MAX) - cpunumber = 0; - cpu_type = mfpr(PR_SID); + vax_cputype = ((vax_cpudata = mfpr(PR_SID)) >> 24); + + switch (vax_cputype) { +#if VAX780 + case VAX_TYP_780: + vax_boardtype = VAX_BTYP_780; + break; +#endif +#if VAX750 + case VAX_TYP_750: + vax_boardtype = VAX_BTYP_780; + break; +#endif +#if VAX8600 + case VAX_TYP_790: + vax_boardtype = VAX_BTYP_790; + break; +#endif +#if VAX630 || VAX650 || VAX410 || VAX43 + case VAX_TYP_UV2: + case VAX_TYP_CVAX: + case VAX_TYP_RIGEL: + vax_siedata = *(int *)(0x20040004); /* SIE address */ + vax_boardtype = (vax_cputype<<24) | ((vax_siedata>>24)&0xFF); + + switch (vax_boardtype) { + case VAX_BTYP_410: + case VAX_BTYP_43: + vax_confdata = *(int *)(0x20020000); + break; + + default: + break; + } + break; +#endif +#if VAX8200 + case VAX_TYP_8SS: + vax_boardtype = VAX_BTYP_8000; + vax_bustype = VAX_BIBUS; + mastercpu = mfpr(PR_BINID); + break; +#endif + default: + /* CPU not supported, just give up */ + asm("halt"); + } + + /* + * before doing anything else, we need to setup the console + * so that output (eg. debug and error messages) are visible. + * They way console-output is done is different for different + * VAXen, thus vax_cputype and vax_boardtype are setup/used. + */ + cninit(); + pmap_bootstrap(); ((struct pcb *)proc0paddr)->framep = scratch; diff --git a/sys/arch/vax/vax/machdep.c b/sys/arch/vax/vax/machdep.c index 2cdc6cdc5d07..db7e5b3baf48 100644 --- a/sys/arch/vax/vax/machdep.c +++ b/sys/arch/vax/vax/machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.30 1996/05/19 16:44:13 ragge Exp $ */ +/* $NetBSD: machdep.c,v 1.31 1996/07/20 18:14:43 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. @@ -23,7 +23,7 @@ * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of - * California, Berkeley and its contributors. + * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. @@ -119,45 +119,44 @@ extern int virtual_avail, virtual_end; * We do these external declarations here, maybe they should be done * somewhere else... */ -int nmcr, nmba, numuba, cold = 1; -caddr_t mcraddr[MAXNMCR]; -int astpending; -int want_resched; -char machine[] = "vax"; -char cpu_model[100]; -int msgbufmapped = 0; +int nmcr, nmba, numuba, cold = 1; +caddr_t mcraddr[MAXNMCR]; +int astpending; +int want_resched; +char machine[] = "vax"; +char cpu_model[100]; +int msgbufmapped = 0; struct msgbuf *msgbufp; -int physmem; +int physmem; struct cfdriver nexuscd; -int todrstopped = 0, glurg; -int dumpsize = 0; +int todrstopped = 0, glurg; +int dumpsize = 0; caddr_t allocsys __P((caddr_t)); #define valloclim(name, type, num, lim) \ (name) = (type *)v; v = (caddr_t)((lim) = ((name)+(num))) -#ifdef BUFPAGES -int bufpages = BUFPAGES; +#ifdef BUFPAGES +int bufpages = BUFPAGES; #else -int bufpages = 0; +int bufpages = 0; #endif -int nswbuf = 0; -#ifdef NBUF -int nbuf = NBUF; +int nswbuf = 0; +#ifdef NBUF +int nbuf = NBUF; #else -int nbuf = 0; +int nbuf = 0; #endif void cpu_startup() { - caddr_t v; - extern char version[]; - int base, residual, i, sz; - vm_offset_t minaddr, maxaddr; - vm_size_t size; - extern int cpu_type, boothowto; + caddr_t v; + extern char version[]; + int base, residual, i, sz; + vm_offset_t minaddr, maxaddr; + vm_size_t size; extern unsigned int avail_end; /* @@ -166,7 +165,7 @@ cpu_startup() msgbufmapped = 1; #if VAX750 || VAX650 - if (cpunumber == VAX_750 || cpunumber == VAX_650) + if (vax_cputype == VAX_750 || vax_cputype == VAX_650) if (!mfpr(PR_TODR)) mtpr(todrstopped = 1, PR_TODR); #endif @@ -194,7 +193,7 @@ cpu_startup() panic("startup: table size inconsistency"); /* - * Now allocate buffers proper. They are different than the above in + * Now allocate buffers proper. They are different than the above in * that they usually occupy more virtual memory than physical. */ size = MAXBSIZE * nbuf; @@ -211,12 +210,12 @@ cpu_startup() base = bufpages / nbuf; residual = bufpages % nbuf; for (i = 0; i < nbuf; i++) { - vm_size_t curbufsize; - vm_offset_t curbuf; + vm_size_t curbufsize; + vm_offset_t curbuf; /* * First buffers get (base+1) physical pages - * allocated for them. The rest get (base) physical pages. + * allocated for them. The rest get (base) physical pages. * * The rest of each buffer occupies virtual space, but has no * physical memory allocated for it. @@ -235,7 +234,7 @@ cpu_startup() 16 * NCARGS, TRUE); /* - * Finally, allocate mbuf pool. Since mclrefcnt is an off-size we + * Finally, allocate mbuf pool. Since mclrefcnt is an off-size we * use the more space efficient malloc in place of kmem_alloc. */ mclrefcnt = (char *) malloc(NMBCLUSTERS + CLBYTES / MCLBYTES, @@ -243,6 +242,13 @@ cpu_startup() bzero(mclrefcnt, NMBCLUSTERS + CLBYTES / MCLBYTES); mb_map = kmem_suballoc(kernel_map, (vm_offset_t *) & mbutl, &maxaddr, VM_MBUF_SIZE, FALSE); + + /* + * Allocate a submap for physio + */ + phys_map = kmem_suballoc(kernel_map, &minaddr, &maxaddr, + VM_PHYS_SIZE, TRUE); + /* * Initialize callouts */ @@ -283,7 +289,7 @@ allocsys(v) { #define valloc(name, type, num) \ - v = (caddr_t)(((name) = (type *)v) + (num)) + v = (caddr_t)(((name) = (type *)v) + (num)) #ifdef REAL_CLISTS valloc(cfree, struct cblock, nclist); @@ -331,14 +337,14 @@ allocsys(v) return v; } -long dumplo = 0; +long dumplo = 0; long dumpmag = 0x8fca0101; void dumpconf() { - int nblks; - extern int dumpdev; + int nblks; + extern int dumpdev; /* * XXX include the final RAM page which is not included in physmem. @@ -362,7 +368,7 @@ dumpconf() void cpu_initclocks() { - (cpu_calls[cpunumber].cpu_clock) (); + (cpu_calls[vax_cputype].cpu_clock) (); } int @@ -373,7 +379,6 @@ cpu_sysctl(a, b, c, d, e, f, g) size_t *d, f; struct proc *g; { - printf("cpu_sysctl:\n"); return (EOPNOTSUPP); } @@ -436,7 +441,7 @@ struct trampframe { unsigned sig; /* Signal number */ unsigned code; /* Info code */ unsigned scp; /* Pointer to struct sigcontext */ - unsigned r0, r1, r2, r3, r4, r5; /* Registers saved when + unsigned r0, r1, r2, r3, r4, r5; /* Registers saved when * interrupt */ unsigned pc; /* Address of signal handler */ unsigned arg; /* Pointer to first (and only) sigreturn @@ -445,17 +450,17 @@ struct trampframe { void sendsig(catcher, sig, mask, code) - sig_t catcher; - int sig, mask; - u_long code; + sig_t catcher; + int sig, mask; + u_long code; { - struct proc *p = curproc; + struct proc *p = curproc; struct sigacts *psp = p->p_sigacts; struct trapframe *syscf; struct sigcontext *sigctx; struct trampframe *trampf; unsigned cursp; - int oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK; + int oonstack = psp->ps_sigstk.ss_flags & SS_ONSTACK; extern char sigcode[], esigcode[]; /* * Allocate and validate space for the signal handler context. Note @@ -567,14 +572,14 @@ boot(howto) asm("movl %0,r5":: "g" (showto)); /* How to boot */ - switch (cpunumber) { + switch (vax_cputype) { int state; #if VAX750 || VAX780 || VAX630 case VAX_780: case VAX_750: - case VAX_630: - mtpr(GC_BOOT, PR_TXDB); /* boot command */ + case VAX_TYP_UV2: + mtpr(GC_BOOT, PR_TXDB); /* boot command */ break; #endif #if VAX8600 @@ -635,16 +640,16 @@ void machinecheck(frame) caddr_t frame; { - if ((*cpu_calls[cpunumber].cpu_mchk) (frame) == 0) + if ((*cpu_calls[vax_cputype].cpu_mchk) (frame) == 0) return; - (*cpu_calls[cpunumber].cpu_memerr) (); + (*cpu_calls[vax_cputype].cpu_memerr) (); panic("machine check"); } void dumpsys() { - extern int dumpdev; + extern int dumpdev; msgbufmapped = 0; if (dumpdev == NODEV) @@ -685,7 +690,7 @@ dumpsys() int fuswintr(addr) - caddr_t addr; + caddr_t addr; { panic("fuswintr: need to be implemented"); return 0; @@ -703,7 +708,7 @@ suibyte(base, byte) int suswintr(addr, cnt) - caddr_t addr; + caddr_t addr; u_int cnt; { panic("suswintr: need to be implemented"); @@ -765,7 +770,7 @@ int process_sstep(p, sstep) struct proc *p; { - void *ptr; + void *ptr; struct trapframe *tf; if ((p->p_flag & P_INMEM) == 0) @@ -785,5 +790,5 @@ process_sstep(p, sstep) void cmrerr() { - (*cpu_calls[cpunumber].cpu_memerr) (); + (*cpu_calls[vax_cputype].cpu_memerr) (); } diff --git a/sys/arch/vax/vax/sbi.c b/sys/arch/vax/vax/sbi.c index 2ded418713a8..e4f8b6ef5019 100644 --- a/sys/arch/vax/vax/sbi.c +++ b/sys/arch/vax/vax/sbi.c @@ -1,4 +1,4 @@ -/* $NetBSD: sbi.c,v 1.9 1996/04/08 18:32:55 ragge Exp $ */ +/* $NetBSD: sbi.c,v 1.10 1996/07/20 18:14:41 ragge Exp $ */ /* * Copyright (c) 1994 Ludd, University of Lule}, Sweden. * All rights reserved. @@ -47,13 +47,6 @@ static int sbi_print __P((void *, char *)); int sbi_match __P((struct device *, void *, void *)); void sbi_attach __P((struct device *, struct device *, void*)); - -struct bp_conf { - char *type; - int num; - int partyp; -}; - int sbi_print(aux, name) void *aux; @@ -79,8 +72,8 @@ sbi_print(aux, name) int sbi_match(parent, cf, aux) - struct device *parent; - void *cf, *aux; + struct device *parent; + void *cf, *aux; { struct bp_conf *bp = aux; @@ -91,13 +84,13 @@ sbi_match(parent, cf, aux) void sbi_attach(parent, self, aux) - struct device *parent, *self; - void *aux; + struct device *parent, *self; + void *aux; { - u_int nexnum, maxnex, minnex; + u_int nexnum, maxnex, minnex; struct sbi_attach_args sa; - switch (cpunumber) { + switch (vax_cputype) { #ifdef VAX730 case VAX_730: maxnex = NNEX730; @@ -112,8 +105,8 @@ sbi_attach(parent, self, aux) #endif #ifdef VAX630 case VAX_78032: - switch (cpu_type) { - case VAX_630: + switch (vax_boardtype) { + case VAX_BTYP_630: maxnex = NNEX630; printf(": Q22\n"); break; @@ -152,7 +145,7 @@ sbi_attach(parent, self, aux) if (badaddr((caddr_t)&nexus[nexnum], 4)) continue; - switch (cpunumber) { + switch (vax_cputype) { #ifdef VAX750 case VAX_750: { extern int nexty750[]; @@ -183,7 +176,7 @@ sbi_attach(parent, self, aux) } } -struct cfdriver sbi_cd = { +struct cfdriver sbi_cd = { NULL, "sbi", DV_DULL };