Clean upp system detect code. Enable primary cache on VS3100.

This commit is contained in:
ragge 1998-06-04 19:42:14 +00:00
parent 616125f8d1
commit 57ce421691
3 changed files with 41 additions and 34 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ka410.c,v 1.10 1998/06/04 15:52:48 ragge Exp $ */
/* $NetBSD: ka410.c,v 1.11 1998/06/04 19:42:14 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -85,23 +85,17 @@ ka410_conf(parent, self, aux)
struct device *parent, *self;
void *aux;
{
extern char cpu_model[];
switch (vax_cputype) {
case VAX_TYP_UV2:
if (vax_confdata & 0x80) /* MSB in CFGTST */
strcpy(cpu_model,"MicroVAX 2000");
else
strcpy(cpu_model,"VAXstation 2000");
printf(": KA410\n");
break;
case VAX_TYP_CVAX:
/* if (((vax_siedata >> 8) & 0xff) == 2) */
strcpy(cpu_model,"MicroVAX 3100 (KA41)");
printf(": KA41/42\n");
printf("%s: Enabling primary cache\n", self->dv_xname);
mtpr(0xfc, PR_CADR); /* XXX */
/* ka41_cache_enable(); */
}
printf(": %s\n", cpu_model);
}
void

View File

@ -1,4 +1,4 @@
/* $NetBSD: ka43.c,v 1.6 1998/05/22 09:26:33 ragge Exp $ */
/* $NetBSD: ka43.c,v 1.7 1998/06/04 19:42:14 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -296,18 +296,8 @@ ka43_conf(parent, self, aux)
struct device *parent, *self;
void *aux;
{
extern char cpu_model[];
extern int vax_siedata;
if (vax_siedata & 0x02) /* "single-user" flag */
strcpy(cpu_model,"VAXstation 3100 model 76");
else if (vax_siedata & 0x01) /* "multiuser" flag */
strcpy(cpu_model,"MicroVAX 3100 model 76(?)");
else
strcpy(cpu_model, "unknown KA43 board");
printf(": %s\n", cpu_model);
printf(": KA43\n");
/*
* ka43_conf() gets called with MMU enabled, now it's save to
* init/reset the caches.
@ -393,8 +383,8 @@ ka43_steal_pages()
* by the RIGEL chip itself!?!
*/
val = ka43_cpu->parctl & 0x03; /* read the old value */
if (((int)le_iomem & ~KERNBASE))/* if RAM above 16 MB */
val |= KA43_PCTL_DMA; /* set LANCE DMA flag */
if (((int)le_iomem & ~KERNBASE) > 0xffffff)
val |= KA43_PCTL_DMA;
ka43_cpu->parctl = val; /* and write new value */
/*

View File

@ -1,4 +1,4 @@
/* $NetBSD: locore.c,v 1.24 1998/05/03 12:59:57 ragge Exp $ */
/* $NetBSD: locore.c,v 1.25 1998/06/04 19:42:14 ragge Exp $ */
/*
* Copyright (c) 1994 Ludd, University of Lule}, Sweden.
* All rights reserved.
@ -136,19 +136,42 @@ start()
vax_boardtype = (vax_cputype<<24) | ((vax_siedata>>24)&0xFF);
switch (vax_boardtype) {
#if VAX410
#if VAX410 || VAX43
case VAX_BTYP_420: /* They are very similar */
case VAX_BTYP_410:
dep_call = &ka410_calls;
vax_confdata = *(int *)(0x20020000);
vax_bustype = VAX_VSBUS | VAX_CPUBUS;
break;
#endif
#if VAX43
case VAX_BTYP_43:
vax_confdata = *(int *)(0x20020000);
vax_bustype = VAX_VSBUS | VAX_CPUBUS;
dep_call = &ka43_calls;
dep_call = (vax_boardtype == VAX_BTYP_43 ?
&ka43_calls : &ka410_calls);
strcpy(cpu_model, (vax_confdata & 0x80 ?
"MicroVAX " : "VAXstation "));
switch (vax_boardtype) {
case VAX_BTYP_410:
strcat(cpu_model, "2000");
break;
case VAX_BTYP_43:
strcat(cpu_model, "3100/m76");
break;
case VAX_BTYP_420:
default:
strcat(cpu_model, "3100");
switch ((vax_siedata >> 8) & 0xff) {
case 0:
strcat(cpu_model, "/m{30,40}");
break;
case 2:
break;
default:
strcat(cpu_model, " unknown model");
break;
}
break;
}
break;
#endif
#if VAX630