Source-Changes-HG archive

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

[src/netbsd-1-6]: src/sys/arch/vax/uba Pull up revision 1.13 (requested by ra...



details:   https://anonhg.NetBSD.org/src/rev/19f3dd70db31
branches:  netbsd-1-6
changeset: 527743:19f3dd70db31
user:      lukem <lukem%NetBSD.org@localhost>
date:      Wed Jun 05 04:13:00 2002 +0000

description:
Pull up revision 1.13 (requested by ragge in ticket #157):
Repair VAX8600 support, which had bit-rotten, probably not used since -98.

diffstat:

 sys/arch/vax/uba/uba_sbi.c |  42 ++++++++++++++++--------------------------
 1 files changed, 16 insertions(+), 26 deletions(-)

diffs (108 lines):

diff -r 36eb193f1ad7 -r 19f3dd70db31 sys/arch/vax/uba/uba_sbi.c
--- a/sys/arch/vax/uba/uba_sbi.c        Wed Jun 05 04:12:51 2002 +0000
+++ b/sys/arch/vax/uba/uba_sbi.c        Wed Jun 05 04:13:00 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uba_sbi.c,v 1.12 2001/05/13 15:24:18 ragge Exp $          */
+/*     $NetBSD: uba_sbi.c,v 1.12.18.1 2002/06/05 04:13:00 lukem Exp $     */
 /*
  * Copyright (c) 1996 Jonathan Stone.
  * Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
@@ -105,8 +105,6 @@
 
 extern struct vax_bus_space vax_mem_bus_space;
 
-volatile int svec;
-
 int
 dw780_match(struct device *parent, struct cfdata *cf, void *aux)
 {
@@ -165,13 +163,12 @@
        sc->uv_size = UBASIZE;          /* Size in bytes of Unibus space */
 
        uba_dma_init(sc);
-       uba_attach(&sc->uv_sc, (parent->dv_unit ? UMEMB8600(ubaddr) :
+       uba_attach(&sc->uv_sc, (sa->sa_sbinum ? UMEMB8600(ubaddr) :
            UMEMA8600(ubaddr)) + (UBAPAGES * VAX_NBPG));
 }
 
 void
-dw780_beforescan(sc)
-       struct uba_softc *sc;
+dw780_beforescan(struct uba_softc *sc)
 {
        struct uba_vsoftc *vc = (void *)sc;
        volatile int *hej = &vc->uv_uba->uba_sr;
@@ -181,8 +178,7 @@
 }
 
 void
-dw780_afterscan(sc)
-       struct uba_softc *sc;
+dw780_afterscan(struct uba_softc *sc)
 {
        struct uba_vsoftc *vc = (void *)sc;
 
@@ -193,8 +189,7 @@
 
 
 int
-dw780_errchk(sc)
-       struct uba_softc *sc;
+dw780_errchk(struct uba_softc *sc)
 {
        struct uba_vsoftc *vc = (void *)sc;
        volatile int *hej = &vc->uv_uba->uba_sr;
@@ -207,32 +202,29 @@
 }
 
 void
-uba_dw780int(arg)
-       void    *arg;
+uba_dw780int(void *arg)
 {
+       extern  void scb_stray(void *);
        struct  uba_vsoftc *vc = arg;
        struct  uba_regs *ur = vc->uv_uba;
-       struct  ivec_dsp *scb_vec;
+       struct  ivec_dsp *ivec;
        int     br, vec;
 
        br = mfpr(PR_IPL);
        vec = ur->uba_brrvr[br - 0x14];
-       if (vec <= 0) {
+       if (vec <= 0)
                ubaerror(&vc->uv_sc, &br, (int *)&vec);
-               if (svec == 0)
-                       return;
-       }
-       if (cold)
+
+       if (cold && scb_vec[(vc->uh_ibase + vec)/4].hoppaddr == scb_stray) {
                scb_fake(vec + vc->uh_ibase, br);
-       else {
-               scb_vec = (struct ivec_dsp *)((int)scb + 512 + 4 * vec);
-               (*scb_vec->hoppaddr)(scb_vec->pushlarg);
+       } else {
+               ivec = &scb_vec[(vc->uh_ibase + vec)/4];
+               (*ivec->hoppaddr)(ivec->pushlarg);
        }
 }
 
 void
-dw780_init(sc)
-       struct uba_softc *sc;
+dw780_init(struct uba_softc *sc)
 {
        struct uba_vsoftc *vc = (void *)sc;
 
@@ -268,9 +260,7 @@
  */
 /*ARGSUSED*/
 void
-ubaerror(uh, ipl, uvec)
-       register struct uba_softc *uh;
-       int *ipl, *uvec;
+ubaerror(struct uba_softc *uh, int *ipl, int *uvec)
 {
        struct uba_vsoftc *vc = (void *)uh;
        struct  uba_regs *uba = vc->uv_uba;



Home | Main Index | Thread Index | Old Index