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 Get boot device CSR from RPB instead ...



details:   https://anonhg.NetBSD.org/src/rev/99dac83fb1cb
branches:  trunk
changeset: 485961:99dac83fb1cb
user:      ragge <ragge%NetBSD.org@localhost>
date:      Tue May 09 20:53:51 2000 +0000

description:
Get boot device CSR from RPB instead of trying to guess it.

diffstat:

 sys/arch/vax/boot/boot/consio.c   |  4 ++--
 sys/arch/vax/boot/boot/if_le.c    |  8 ++++++--
 sys/arch/vax/boot/boot/if_ze.c    |  7 +++++--
 sys/arch/vax/boot/boot/vaxstand.h |  3 ++-
 4 files changed, 15 insertions(+), 7 deletions(-)

diffs (105 lines):

diff -r 90c55602fbfc -r 99dac83fb1cb sys/arch/vax/boot/boot/consio.c
--- a/sys/arch/vax/boot/boot/consio.c   Tue May 09 20:29:28 2000 +0000
+++ b/sys/arch/vax/boot/boot/consio.c   Tue May 09 20:53:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: consio.c,v 1.7 2000/05/08 17:06:48 ragge Exp $ */
+/*     $NetBSD: consio.c,v 1.8 2000/05/09 20:53:51 ragge Exp $ */
 /*
  * Copyright (c) 1994, 1998 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -128,7 +128,7 @@
        get_fp = pr_getchar;
        test_fp = pr_testchar;
 
-       rpb = (struct rpb *)bootregs[11];       /* bertram: ??? */
+       rpb = (struct rpb *)XXRPB;
 
        /*
         * According to the vax_boardtype (vax_cputype is not specific
diff -r 90c55602fbfc -r 99dac83fb1cb sys/arch/vax/boot/boot/if_le.c
--- a/sys/arch/vax/boot/boot/if_le.c    Tue May 09 20:29:28 2000 +0000
+++ b/sys/arch/vax/boot/boot/if_le.c    Tue May 09 20:53:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_le.c,v 1.4 1999/08/14 19:41:14 ragge Exp $ */
+/*     $NetBSD: if_le.c,v 1.5 2000/05/09 20:53:52 ragge Exp $ */
 /*
  * Copyright (c) 1997, 1999 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -46,12 +46,15 @@
 #include <netinet/in_systm.h>
 
 #include <../include/sid.h>
+#include <../include/rpb.h>
 
 #include <lib/libsa/netif.h>
 
 #include <dev/ic/lancereg.h>
 #include <dev/ic/am7990reg.h>
 
+#include "vaxstand.h"
+
 /*
  * The following are incorrect. Why doesn't DEC follow its own specs???
  */
@@ -97,7 +100,7 @@
        volatile u_short ni_rdp;       /* data port */
        volatile short ni_pad0;
        volatile short ni_rap;       /* register select port */
-} *nireg = (struct nireg *)0x200e0000;
+} *nireg;
 
 
 volatile struct        buffdesc {
@@ -161,6 +164,7 @@
 
        next_rdesc = next_tdesc = 0;
 
+       nireg = (void *)rpb->csrphy;
        if (vax_boardtype == VAX_BTYP_650 &&
            ((vax_siedata >> 8) & 0xff) == VAX_SIE_KA640) {
                kopiera = 1;
diff -r 90c55602fbfc -r 99dac83fb1cb sys/arch/vax/boot/boot/if_ze.c
--- a/sys/arch/vax/boot/boot/if_ze.c    Tue May 09 20:29:28 2000 +0000
+++ b/sys/arch/vax/boot/boot/if_ze.c    Tue May 09 20:53:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_ze.c,v 1.7 2000/05/08 17:06:48 ragge Exp $  */
+/*     $NetBSD: if_ze.c,v 1.8 2000/05/09 20:53:52 ragge Exp $  */
 /*
  * Copyright (c) 1998 James R. Maynard III.  All rights reserved.
  *
@@ -48,6 +48,9 @@
 #include <dev/ic/sgecreg.h>
 
 #include "arch/vax/include/sid.h"
+#include "arch/vax/include/rpb.h"
+
+#include "vaxstand.h"
 
 int ze_probe(), ze_match(), ze_get(), ze_put();
 void ze_init(), ze_end();
@@ -105,7 +108,7 @@
        struct ze_tdes *ze_setup_tdes_list;
 
        /* point to the device in memory */
-       addr = (struct zedevice *)0x20008000;
+       addr = (struct zedevice *)rpb->csrphy;
 
        /* reset the device and wait for completion */
        addr->ze_nicsr6 = ZE_NICSR6_MBO | ZE_NICSR6_RE;
diff -r 90c55602fbfc -r 99dac83fb1cb sys/arch/vax/boot/boot/vaxstand.h
--- a/sys/arch/vax/boot/boot/vaxstand.h Tue May 09 20:29:28 2000 +0000
+++ b/sys/arch/vax/boot/boot/vaxstand.h Tue May 09 20:53:51 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vaxstand.h,v 1.1 1999/03/06 16:36:05 ragge Exp $ */
+/*     $NetBSD: vaxstand.h,v 1.2 2000/05/09 20:53:52 ragge Exp $ */
 /*
  * Copyright (c) 1994 Ludd, University of Lule}, Sweden.
  * All rights reserved.
@@ -40,6 +40,7 @@
 extern int nmba, nuba, nbi, nsbi, nuda;
 extern int *ubaaddr, *mbaaddr, *udaaddr, *uioaddr, *biaddr;
 extern int cpunumber, howto, bootdev;
+extern struct rpb *rpb;
 
 /* devsw type definitions, used in bootxx and conf */
 #define SADEV(name,strategy,open,close,ioctl) \



Home | Main Index | Thread Index | Old Index