Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/vax/boot/boot Fix bug causing autoboot on 750/780 n...



details:   https://anonhg.NetBSD.org/src/rev/aabf5d4c56ae
branches:  trunk
changeset: 321547:aabf5d4c56ae
user:      ragge <ragge%NetBSD.org@localhost>
date:      Wed Mar 21 18:27:27 2018 +0000

description:
Fix bug causing autoboot on 750/780 not to work.  Cleanup.

diffstat:

 sys/arch/vax/boot/boot/devopen.c |  11 +++--------
 sys/arch/vax/boot/boot/ra.c      |   9 ++++-----
 2 files changed, 7 insertions(+), 13 deletions(-)

diffs (90 lines):

diff -r 5873f8876b80 -r aabf5d4c56ae sys/arch/vax/boot/boot/devopen.c
--- a/sys/arch/vax/boot/boot/devopen.c  Wed Mar 21 17:03:09 2018 +0000
+++ b/sys/arch/vax/boot/boot/devopen.c  Wed Mar 21 18:27:27 2018 +0000
@@ -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 @@
 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 @@
        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 @@
        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;
        }
diff -r 5873f8876b80 -r aabf5d4c56ae sys/arch/vax/boot/boot/ra.c
--- a/sys/arch/vax/boot/boot/ra.c       Wed Mar 21 17:03:09 2018 +0000
+++ b/sys/arch/vax/boot/boot/ra.c       Wed Mar 21 18:27:27 2018 +0000
@@ -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 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 @@
        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 @@
 {
 
 #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);



Home | Main Index | Thread Index | Old Index