Module Name: src
Committed By: ragge
Date: Wed Mar 21 18:27:27 UTC 2018
Modified Files:
src/sys/arch/vax/boot/boot: devopen.c ra.c
Log Message:
Fix bug causing autoboot on 750/780 not to work. Cleanup.
To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/vax/boot/boot/devopen.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/vax/boot/boot/ra.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/vax/boot/boot/devopen.c
diff -u src/sys/arch/vax/boot/boot/devopen.c:1.19 src/sys/arch/vax/boot/boot/devopen.c:1.20
--- src/sys/arch/vax/boot/boot/devopen.c:1.19 Mon Mar 19 15:43:45 2018
+++ src/sys/arch/vax/boot/boot/devopen.c Wed Mar 21 18:27:27 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: devopen.c,v 1.19 2018/03/19 15:43:45 ragge Exp $ */
+/* $NetBSD: devopen.c,v 1.20 2018/03/21 18:27:27 ragge Exp $ */
/*
* Copyright (c) 1997 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -49,7 +49,6 @@ int
devopen(struct open_file *f, const char *fname, char **file)
{
int dev, unit, ctlr, part, adapt, i, a[4], x;
- int *mapregs;
struct devsw *dp;
extern int cnvtab[];
char *s, *c;
@@ -130,19 +129,19 @@ devopen(struct open_file *f, const char
switch (vax_boardtype) {
case VAX_BTYP_750:
csrbase = (nexaddr == 0xf30000 ? 0xffe000 : 0xfbe000);
+ mapaddr = (int *)nexaddr + VAX_NBPG;
if (adapt < 0)
break;
nexaddr = (NEX750 + NEXSIZE * adapt);
- mapaddr = (int *)nexaddr + VAX_NBPG;
csrbase = (adapt == 8 ? 0xffe000 : 0xfbe000);
break;
case VAX_BTYP_780:
case VAX_BTYP_790:
csrbase = 0x2007e000 + 0x40000 * ((nexaddr & 0x1e000) >> 13);
+ mapaddr = (int *)nexaddr + VAX_NBPG;
if (adapt < 0)
break;
nexaddr = ((int)NEX780 + NEXSIZE * adapt);
- mapaddr = (int *)nexaddr + VAX_NBPG;
csrbase = 0x2007e000 + 0x40000 * adapt;
break;
case VAX_BTYP_9CC: /* 6000/200 */
@@ -180,13 +179,9 @@ devopen(struct open_file *f, const char
default:
nexaddr = 0; /* No map regs */
csrbase = 0x20000000;
- /* Always map in the lowest 4M on qbus-based machines */
- mapregs = (void *)0x20088000;
if (bootrpb.adpphy == 0x20087800) {
nexaddr = bootrpb.adpphy;
mapaddr = (int *)nexaddr + VAX_NBPG;
- for (i = 0; i < 8192; i++)
- mapregs[i] = PG_V | i;
}
break;
}
Index: src/sys/arch/vax/boot/boot/ra.c
diff -u src/sys/arch/vax/boot/boot/ra.c:1.21 src/sys/arch/vax/boot/boot/ra.c:1.22
--- src/sys/arch/vax/boot/boot/ra.c:1.21 Mon Mar 19 15:43:45 2018
+++ src/sys/arch/vax/boot/boot/ra.c Wed Mar 21 18:27:27 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: ra.c,v 1.21 2018/03/19 15:43:45 ragge Exp $ */
+/* $NetBSD: ra.c,v 1.22 2018/03/21 18:27:27 ragge Exp $ */
/*
* Copyright (c) 1995 Ludd, University of Lule}, Sweden.
* All rights reserved.
@@ -65,7 +65,7 @@ static volatile struct uda {
static struct disklabel ralabel;
static char io_buf[DEV_BSIZE];
-static int dpart, dunit, remap, is_tmscp, curblock;
+static int dpart, dunit, is_tmscp, curblock;
static volatile u_short *ra_ip, *ra_sa, *ra_sw;
int
@@ -90,7 +90,6 @@ raopen(struct open_file *f, int adapt, i
dpart = part;
if (ctlr < 0)
ctlr = 0;
- remap = csrbase && nexaddr;
curblock = 0;
if (csrbase) { /* On a uda-alike adapter */
if (askname == 0) {
@@ -254,8 +253,8 @@ rastrategy(void *f, int func, daddr_t db
{
#ifdef DEV_DEBUG
- printf("rastrategy: buf %p remap %d is_tmscp %d\n",
- buf, remap, is_tmscp);
+ printf("rastrategy: buf %p is_tmscp %d\n",
+ buf, is_tmscp);
#endif
uda.uda_cmd.mscp_seq.seq_buffer = ubmap(0, (int)buf, size);