Support for cmi bus on 11/750.
This commit is contained in:
parent
34d020edd2
commit
c5db4b8756
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: autoconf.c,v 1.14 1996/07/20 18:15:00 ragge Exp $ */
|
||||
/* $NetBSD: autoconf.c,v 1.15 1996/08/20 14:13:59 ragge Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
|
||||
|
@ -56,6 +56,8 @@
|
|||
|
||||
#include <vm/vm.h>
|
||||
|
||||
struct nexus *nexus;
|
||||
|
||||
#define BACKPLANE 0
|
||||
#define BIBUSS 1
|
||||
#define SBIBUSS 2
|
||||
|
@ -82,19 +84,6 @@ 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,
|
||||
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_ANY, NEX_ANY, NEX_ANY, NEX_ANY,
|
||||
};
|
||||
#endif
|
||||
|
||||
struct cpu_dep cpu_calls[]={
|
||||
/* Type 0,noexist */
|
||||
{NULL, NULL, NULL, NULL, NULL },
|
||||
|
@ -182,6 +171,7 @@ configure()
|
|||
* parameter based on device(s) used.
|
||||
*/
|
||||
gencnslask(); /* XXX inte g|ras h{r */
|
||||
dzcnslask(); /* XXX inte g|ras h{r */
|
||||
swapconf();
|
||||
cold = 0;
|
||||
mtpr(GC_CCF, PR_TXDB); /* Clear cold start flag in cpu */
|
||||
|
@ -225,30 +215,44 @@ backplane_attach(parent, self, hej)
|
|||
void *hej;
|
||||
{
|
||||
struct bp_conf bp;
|
||||
int i, ccpu = 0, cmem = 0, cbi = 0, csbi = 0, cvsbus = 0;
|
||||
|
||||
printf("\n");
|
||||
bp.partyp = BACKPLANE;
|
||||
|
||||
switch (vax_cputype) {
|
||||
case VAX_750:
|
||||
case VAX_650:
|
||||
case VAX_78032:
|
||||
case VAX_780:
|
||||
ccpu = csbi = 1;
|
||||
break;
|
||||
|
||||
case VAX_8600:
|
||||
cmem = ccpu = 1;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (vax_bustype & VAX_CPUBUS) {
|
||||
bp.type = "cpu";
|
||||
bp.num = 0;
|
||||
config_found(self, &bp, printut);
|
||||
}
|
||||
if (vax_bustype & VAX_VSBUS) {
|
||||
ccpu = 1;
|
||||
cvsbus = 1;
|
||||
bp.type = "vsbus";
|
||||
bp.num = 0;
|
||||
config_found(self, &bp, printut);
|
||||
}
|
||||
|
||||
bp.partyp = BACKPLANE;
|
||||
if (vax_bustype & VAX_SBIBUS) {
|
||||
bp.type = "sbi";
|
||||
bp.num = 0;
|
||||
config_found(self, &bp, printut);
|
||||
}
|
||||
if (vax_bustype & VAX_CMIBUS) {
|
||||
bp.type = "cmi";
|
||||
bp.num = 0;
|
||||
config_found(self, &bp, printut);
|
||||
}
|
||||
if (vax_bustype & VAX_UNIBUS) {
|
||||
bp.type = "uba";
|
||||
bp.num = 0;
|
||||
config_found(self, &bp, printut);
|
||||
}
|
||||
#if VAX8600
|
||||
if (vax_bustype & VAX_MEMBUS) {
|
||||
bp.type = "mem";
|
||||
bp.num = 0;
|
||||
config_found(self, &bp, printut);
|
||||
}
|
||||
if (vax_cputype == VAX_8600)
|
||||
find_sbi(self, &bp, printut);
|
||||
#endif
|
||||
|
||||
#if VAX8200 || VAX8800
|
||||
bp.type = "bi";
|
||||
|
@ -283,30 +287,6 @@ backplane_attach(parent, self, hej)
|
|||
}
|
||||
#endif
|
||||
|
||||
bp.type = "cpu";
|
||||
for (i = 0; i < ccpu; i++) {
|
||||
bp.num = i;
|
||||
config_found(self, &bp, printut);
|
||||
}
|
||||
bp.type = "mem";
|
||||
for (i = 0; i < cmem; 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 (vax_cputype == VAX_8600)
|
||||
find_sbi(self, &bp, printut);
|
||||
#endif
|
||||
}
|
||||
|
||||
#if VAX8600
|
||||
|
@ -458,20 +438,7 @@ mem_attach(parent, self, aux)
|
|||
sc->sc_memtype = sa->nexinfo;
|
||||
sc->sc_memnr = sa->type;
|
||||
|
||||
switch (vax_cputype) {
|
||||
#ifdef VAX750
|
||||
case VAX_750:
|
||||
ka750_memenable(sa, (void *)sc);
|
||||
break;
|
||||
#endif
|
||||
#ifdef VAX780
|
||||
case VAX_780:
|
||||
ka780_memenable(sa, sc);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
ka780_memenable(sa, sc);
|
||||
|
||||
}
|
||||
|
||||
|
@ -496,9 +463,9 @@ struct cfdriver mem_cd = {
|
|||
};
|
||||
|
||||
struct cfattach mem_backplane_ca = {
|
||||
sizeof(struct device), mem_match, mem_attach
|
||||
sizeof(struct mem_softc), mem_match, mem_attach
|
||||
};
|
||||
|
||||
struct cfattach mem_sbi_ca = {
|
||||
sizeof(struct device), mem_match, mem_attach
|
||||
sizeof(struct mem_softc), mem_match, mem_attach
|
||||
};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ka630.c,v 1.1 1996/07/20 18:29:52 ragge Exp $ */
|
||||
/* $NetBSD: ka630.c,v 1.2 1996/08/20 14:13:58 ragge Exp $ */
|
||||
/*-
|
||||
* Copyright (c) 1982, 1988, 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
|
@ -82,7 +82,7 @@ ka630_setup(uc,flags)
|
|||
uc->uc_mchk = ka630_mchk;
|
||||
#endif
|
||||
|
||||
uc->uc_busTypes = VAX_Q22BUS;
|
||||
uc->uc_busTypes = VAX_UNIBUS;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: ka750.c,v 1.13 1996/07/20 18:14:53 ragge Exp $ */
|
||||
/* $NetBSD: ka750.c,v 1.14 1996/08/20 14:13:56 ragge Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1988 The Regents of the University of California.
|
||||
|
@ -81,6 +81,30 @@ ka750_conf(parent, self, aux)
|
|||
ctuattach();
|
||||
}
|
||||
|
||||
static int ka750_memmatch __P((struct device *, void *, void *));
|
||||
static void ka750_memenable __P((struct device *, struct device *, void *));
|
||||
|
||||
struct cfattach mem_cmi_ca = {
|
||||
sizeof(struct device), ka750_memmatch, ka750_memenable
|
||||
};
|
||||
|
||||
int
|
||||
ka750_memmatch(parent, gcf, aux)
|
||||
struct device *parent;
|
||||
void *gcf, *aux;
|
||||
{
|
||||
struct sbi_attach_args *sa = (struct sbi_attach_args *)aux;
|
||||
struct cfdata *cf = gcf;
|
||||
|
||||
if ((cf->cf_loc[0] != sa->nexnum) && (cf->cf_loc[0] > -1))
|
||||
return 0;
|
||||
|
||||
if (sa->type != NEX_MEM16)
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
extern volatile caddr_t mcraddr[];
|
||||
|
||||
struct mcr750 {
|
||||
|
@ -103,12 +127,13 @@ struct mcr750 {
|
|||
|
||||
/* enable crd interrupts */
|
||||
void
|
||||
ka750_memenable(sa,self)
|
||||
struct sbi_attach_args *sa;
|
||||
struct device *self;
|
||||
ka750_memenable(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
{
|
||||
int k, l, m, cardinfo;
|
||||
struct sbi_attach_args *sa = (struct sbi_attach_args *)aux;
|
||||
struct mcr750 *mcr = (struct mcr750 *)sa->nexaddr;
|
||||
int k, l, m, cardinfo;
|
||||
|
||||
mcraddr[self->dv_unit] = (caddr_t)sa->nexaddr;
|
||||
|
||||
|
@ -221,7 +246,6 @@ void
|
|||
ka750_steal_pages()
|
||||
{
|
||||
extern vm_offset_t avail_start, virtual_avail;
|
||||
extern struct nexus *nexus;
|
||||
int junk;
|
||||
|
||||
/*
|
||||
|
@ -235,3 +259,87 @@ ka750_steal_pages()
|
|||
VM_PROT_READ|VM_PROT_WRITE);
|
||||
}
|
||||
|
||||
static int cmi_print __P((void *, char *));
|
||||
static int cmi_match __P((struct device *, void *, void *));
|
||||
static void cmi_attach __P((struct device *, struct device *, void*));
|
||||
|
||||
struct cfdriver cmi_cd = {
|
||||
NULL, "cmi", DV_DULL
|
||||
};
|
||||
|
||||
struct cfattach cmi_ca = {
|
||||
sizeof(struct device), cmi_match, cmi_attach
|
||||
};
|
||||
|
||||
int
|
||||
cmi_print(aux, name)
|
||||
void *aux;
|
||||
char *name;
|
||||
{
|
||||
struct sbi_attach_args *sa = (struct sbi_attach_args *)aux;
|
||||
|
||||
if (name)
|
||||
printf("unknown device 0x%x at %s", sa->type, name);
|
||||
|
||||
printf(" tr%d", sa->nexnum);
|
||||
return (UNCONF);
|
||||
}
|
||||
|
||||
|
||||
int
|
||||
cmi_match(parent, cf, aux)
|
||||
struct device *parent;
|
||||
void *cf, *aux;
|
||||
{
|
||||
struct bp_conf *bp = aux;
|
||||
|
||||
if (strcmp(bp->type, "cmi"))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
void
|
||||
cmi_attach(parent, self, aux)
|
||||
struct device *parent, *self;
|
||||
void *aux;
|
||||
{
|
||||
u_int nexnum, maxnex, minnex;
|
||||
struct sbi_attach_args sa;
|
||||
|
||||
printf("I\n");
|
||||
/*
|
||||
* Probe for memory, can be in the first 4 slots.
|
||||
*/
|
||||
for (sa.nexnum = 0; sa.nexnum < 4; sa.nexnum++) {
|
||||
if (badaddr((caddr_t)&nexus[sa.nexnum], 4))
|
||||
continue;
|
||||
|
||||
sa.nexaddr = nexus + sa.nexnum;
|
||||
sa.type = NEX_MEM16;
|
||||
config_found(self, (void*)&sa, cmi_print);
|
||||
}
|
||||
|
||||
/*
|
||||
* Probe for mba's, can be in slot 4 - 7.
|
||||
*/
|
||||
for (sa.nexnum = 4; sa.nexnum < 7; sa.nexnum++) {
|
||||
if (badaddr((caddr_t)&nexus[sa.nexnum], 4))
|
||||
continue;
|
||||
|
||||
sa.nexaddr = nexus + sa.nexnum;
|
||||
sa.type = NEX_MBA;
|
||||
config_found(self, (void*)&sa, cmi_print);
|
||||
}
|
||||
|
||||
/*
|
||||
* There are always one generic UBA, and maybe an optional.
|
||||
*/
|
||||
sa.nexnum = 8;
|
||||
sa.nexaddr = nexus + sa.nexnum;
|
||||
sa.type = NEX_UBA0;
|
||||
config_found(self, (void*)&sa, cmi_print);
|
||||
sa.type = NEX_UBA1;
|
||||
if (badaddr((caddr_t)&nexus[++sa.nexnum], 4) == 0)
|
||||
config_found(self, (void*)&sa, cmi_print);
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/* $NetBSD: locore.c,v 1.16 1996/07/20 18:14:46 ragge Exp $ */
|
||||
|
||||
/* $NetBSD: locore.c,v 1.17 1996/08/20 14:13:54 ragge Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -48,6 +47,7 @@
|
|||
#include <machine/vmparam.h>
|
||||
#include <machine/pcb.h>
|
||||
#include <machine/pmap.h>
|
||||
#include <machine/nexus.h>
|
||||
|
||||
void start __P((void));
|
||||
void main __P((void));
|
||||
|
@ -151,16 +151,19 @@ tokmem: movw $0xfff, _panic
|
|||
switch (vax_cputype) {
|
||||
#if VAX780
|
||||
case VAX_TYP_780:
|
||||
vax_bustype = VAX_SBIBUS | VAX_CPUBUS;
|
||||
vax_boardtype = VAX_BTYP_780;
|
||||
break;
|
||||
#endif
|
||||
#if VAX750
|
||||
case VAX_TYP_750:
|
||||
vax_boardtype = VAX_BTYP_780;
|
||||
vax_bustype = VAX_CMIBUS | VAX_CPUBUS;
|
||||
vax_boardtype = VAX_BTYP_750;
|
||||
break;
|
||||
#endif
|
||||
#if VAX8600
|
||||
case VAX_TYP_790:
|
||||
vax_bustype = VAX_CPUBUS | VAX_MEMBUS;
|
||||
vax_boardtype = VAX_BTYP_790;
|
||||
break;
|
||||
#endif
|
||||
|
@ -175,6 +178,12 @@ tokmem: movw $0xfff, _panic
|
|||
case VAX_BTYP_410:
|
||||
case VAX_BTYP_43:
|
||||
vax_confdata = *(int *)(0x20020000);
|
||||
vax_bustype = VAX_VSBUS | VAX_CPUBUS;
|
||||
break;
|
||||
|
||||
case VAX_BTYP_630:
|
||||
case VAX_BTYP_650:
|
||||
vax_bustype = VAX_UNIBUS | VAX_CPUBUS;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: sbi.c,v 1.10 1996/07/20 18:14:41 ragge Exp $ */
|
||||
/* $NetBSD: sbi.c,v 1.11 1996/08/20 14:13:50 ragge Exp $ */
|
||||
/*
|
||||
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
|
||||
* All rights reserved.
|
||||
|
@ -33,19 +33,14 @@
|
|||
#include <sys/param.h>
|
||||
#include <sys/device.h>
|
||||
#include <sys/systm.h>
|
||||
#include <vm/vm.h>
|
||||
#include <vm/vm_kern.h>
|
||||
#include <vm/vm_page.h>
|
||||
#include <machine/ka750.h>
|
||||
#include <machine/pmap.h>
|
||||
|
||||
#include <machine/sid.h>
|
||||
#include <machine/cpu.h>
|
||||
|
||||
struct nexus *nexus;
|
||||
#include <machine/nexus.h>
|
||||
|
||||
static int sbi_print __P((void *, char *));
|
||||
int sbi_match __P((struct device *, void *, void *));
|
||||
void sbi_attach __P((struct device *, struct device *, void*));
|
||||
static int sbi_match __P((struct device *, void *, void *));
|
||||
static void sbi_attach __P((struct device *, struct device *, void*));
|
||||
|
||||
int
|
||||
sbi_print(aux, name)
|
||||
|
@ -90,86 +85,23 @@ sbi_attach(parent, self, aux)
|
|||
u_int nexnum, maxnex, minnex;
|
||||
struct sbi_attach_args sa;
|
||||
|
||||
switch (vax_cputype) {
|
||||
#ifdef VAX730
|
||||
case VAX_730:
|
||||
maxnex = NNEX730;
|
||||
printf(": BL[730\n");
|
||||
break;
|
||||
#endif
|
||||
#ifdef VAX750
|
||||
case VAX_750:
|
||||
maxnex = NNEX750;
|
||||
printf(": CMI750\n");
|
||||
break;
|
||||
#endif
|
||||
#ifdef VAX630
|
||||
case VAX_78032:
|
||||
switch (vax_boardtype) {
|
||||
case VAX_BTYP_630:
|
||||
maxnex = NNEX630;
|
||||
printf(": Q22\n");
|
||||
break;
|
||||
default:
|
||||
panic("Microvax not supported");
|
||||
};
|
||||
break;
|
||||
#endif
|
||||
#ifdef VAX650
|
||||
case VAX_650:
|
||||
maxnex = NNEX630; /* XXX */
|
||||
printf(": Q22\n");
|
||||
break;
|
||||
#endif
|
||||
#if VAX780 || VAX8600
|
||||
case VAX_780:
|
||||
case VAX_8600:
|
||||
maxnex = NNEXSBI;
|
||||
printf(": SBI780\n");
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
maxnex = 0; /* Leave it */
|
||||
break;
|
||||
}
|
||||
printf("\n");
|
||||
|
||||
/*
|
||||
* Now a problem: on different machines with SBI units identifies
|
||||
* in different ways (if they identifies themselves at all).
|
||||
* We have to fake identifying depending on different CPUs.
|
||||
*/
|
||||
minnex = self->dv_unit * maxnex;
|
||||
for (nexnum = minnex; nexnum < minnex + maxnex; nexnum++) {
|
||||
minnex = self->dv_unit * NNEXSBI;
|
||||
for (nexnum = minnex; nexnum < minnex + NNEXSBI; nexnum++) {
|
||||
volatile int tmp;
|
||||
|
||||
if (badaddr((caddr_t)&nexus[nexnum], 4))
|
||||
continue;
|
||||
|
||||
switch (vax_cputype) {
|
||||
#ifdef VAX750
|
||||
case VAX_750:
|
||||
{ extern int nexty750[];
|
||||
sa.type = nexty750[nexnum];
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#ifdef VAX730
|
||||
case VAX_730:
|
||||
{ extern int nexty730[];
|
||||
sa.type = nexty730[nexnum];
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
#if VAX630 || VAX650
|
||||
case VAX_78032:
|
||||
case VAX_650:
|
||||
sa.type = NEX_UBA0;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
tmp = nexus[nexnum].nexcsr.nex_csr; /* no byte reads */
|
||||
sa.type = tmp & 255;
|
||||
}
|
||||
tmp = nexus[nexnum].nexcsr.nex_csr; /* no byte reads */
|
||||
sa.type = tmp & 255;
|
||||
|
||||
sa.nexnum = nexnum;
|
||||
sa.nexaddr = nexus + nexnum;
|
||||
config_found(self, (void*)&sa, sbi_print);
|
||||
|
|
Loading…
Reference in New Issue