Reflect the changes of CPU determination. Add support for VAXstations.
This commit is contained in:
parent
aab842833e
commit
fd3f596fa3
|
@ -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,9 +46,11 @@
|
|||
#include <machine/vmparam.h>
|
||||
#include <machine/nexus.h>
|
||||
#include <machine/ioa.h>
|
||||
#include <machine/ka820.h>
|
||||
#include <machine/ka750.h>
|
||||
#include <machine/ka650.h>
|
||||
#include <machine/uvaxII.h>
|
||||
#include <machine/uvax.h>
|
||||
#include <machine/clock.h>
|
||||
|
||||
#include <vax/vax/gencons.h>
|
||||
|
||||
|
@ -57,21 +59,16 @@
|
|||
#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));
|
||||
|
@ -79,12 +76,12 @@ 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));
|
||||
#endif
|
||||
|
||||
#ifdef VAX750
|
||||
int nexty750[]={ NEX_MEM16, NEX_MEM16, NEX_MEM16, NEX_MEM16,
|
||||
NEX_MBA, NEX_MBA, NEX_MBA, NEX_MBA,
|
||||
|
@ -98,67 +95,70 @@ int nexty730[NNEX730] = {
|
|||
};
|
||||
#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},
|
||||
{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},
|
||||
{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 },
|
||||
{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 },
|
||||
{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},
|
||||
{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 },
|
||||
{NULL, NULL, NULL, NULL, NULL },
|
||||
#ifdef VAX650 /* Type 10, KA65X (uVAX III) */
|
||||
{uvaxIII_steal_pages, uvaxIII_clock, uvaxIII_mchk, uvaxIII_memerr,
|
||||
uvaxIII_conf},
|
||||
{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
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -326,13 +362,14 @@ cpu_match(parent, gcf, 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;
|
||||
|
@ -347,7 +384,7 @@ cpu_attach(parent, self, 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 *));
|
||||
|
@ -363,7 +400,7 @@ mem_match(parent, gcf, 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;
|
||||
|
@ -411,7 +448,7 @@ mem_attach(parent, self, 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);
|
||||
|
|
|
@ -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.
|
||||
|
@ -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);
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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.
|
||||
|
@ -48,8 +48,10 @@
|
|||
#include <machine/ka750.h>
|
||||
#include <machine/pte.h>
|
||||
#include <machine/cpu.h>
|
||||
#include <machine/sid.h>
|
||||
#include <machine/mtpr.h>
|
||||
#include <machine/scb.h>
|
||||
|
||||
#include <vax/uba/ubavar.h>
|
||||
#include <vax/uba/ubareg.h>
|
||||
|
||||
|
@ -67,7 +69,7 @@ ka750_conf(parent, self, aux)
|
|||
|
||||
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 {
|
||||
|
|
|
@ -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 <machine/mtpr.h>
|
||||
#include <machine/scb.h>
|
||||
#include <machine/nexus.h>
|
||||
#include <machine/sid.h>
|
||||
|
||||
#include <vax/uba/ubavar.h>
|
||||
#include <vax/uba/ubareg.h>
|
||||
|
||||
/* 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));
|
||||
|
@ -300,7 +301,7 @@ ka780_conf(parent, self, aux)
|
|||
void *aux;
|
||||
{
|
||||
extern char cpu_model[];
|
||||
struct ka78x *ka78 = (void *)&cpu_type;
|
||||
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()
|
||||
{
|
||||
|
|
|
@ -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,12 +49,12 @@
|
|||
#include <machine/mtpr.h>
|
||||
#include <machine/nexus.h>
|
||||
#include <machine/ioa.h>
|
||||
#include <machine/sid.h>
|
||||
|
||||
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));
|
||||
|
@ -297,7 +297,7 @@ ka86_conf(parent, self, aux)
|
|||
void *aux;
|
||||
{
|
||||
extern char cpu_model[];
|
||||
struct ka86 *ka86 = (void *)&cpu_type;
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
@ -130,12 +145,63 @@ tokmem: movw $0xfff, _panic
|
|||
mtpr(0, PR_ESP); /* Must be zero, used in page fault routine */
|
||||
mtpr(AST_NO, PR_ASTLVL);
|
||||
|
||||
/* Count up memory etc... early machine dependent routines */
|
||||
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();
|
||||
|
||||
/* Count up memory etc... early machine dependent routines */
|
||||
if ((cpunumber = MACHID(mfpr(PR_SID))) > VAX_MAX)
|
||||
cpunumber = 0;
|
||||
cpu_type = mfpr(PR_SID);
|
||||
pmap_bootstrap();
|
||||
|
||||
((struct pcb *)proc0paddr)->framep = scratch;
|
||||
|
|
|
@ -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.
|
||||
|
@ -157,7 +157,6 @@ cpu_startup()
|
|||
int base, residual, i, sz;
|
||||
vm_offset_t minaddr, maxaddr;
|
||||
vm_size_t size;
|
||||
extern int cpu_type, boothowto;
|
||||
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
|
||||
|
@ -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
|
||||
*/
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -567,13 +572,13 @@ 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:
|
||||
case VAX_TYP_UV2:
|
||||
mtpr(GC_BOOT, PR_TXDB); /* boot command */
|
||||
break;
|
||||
#endif
|
||||
|
@ -635,9 +640,9 @@ 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");
|
||||
}
|
||||
|
||||
|
@ -785,5 +790,5 @@ process_sstep(p, sstep)
|
|||
void
|
||||
cmrerr()
|
||||
{
|
||||
(*cpu_calls[cpunumber].cpu_memerr) ();
|
||||
(*cpu_calls[vax_cputype].cpu_memerr) ();
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -97,7 +90,7 @@ sbi_attach(parent, self, aux)
|
|||
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[];
|
||||
|
|
Loading…
Reference in New Issue