Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/vax/uba These are not used anymore.



details:   https://anonhg.NetBSD.org/src/rev/d879c947e952
branches:  trunk
changeset: 503008:d879c947e952
user:      ragge <ragge%NetBSD.org@localhost>
date:      Sun Jan 28 20:04:50 2001 +0000

description:
These are not used anymore.

diffstat:

 sys/arch/vax/uba/uba.c    |  920 ----------------------------------------------
 sys/arch/vax/uba/ubareg.h |  250 ------------
 2 files changed, 0 insertions(+), 1170 deletions(-)

diffs (truncated from 1178 to 300 lines):

diff -r 2fab1e17885d -r d879c947e952 sys/arch/vax/uba/uba.c
--- a/sys/arch/vax/uba/uba.c    Sun Jan 28 20:01:42 2001 +0000
+++ /dev/null   Thu Jan 01 00:00:00 1970 +0000
@@ -1,920 +0,0 @@
-/*     $NetBSD: uba.c,v 1.51 2000/08/09 03:02:52 tv Exp $         */
-/*
- * Copyright (c) 1996 Jonathan Stone.
- * Copyright (c) 1994, 1996 Ludd, University of Lule}, Sweden.
- * Copyright (c) 1982, 1986 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *     This product includes software developed by the University of
- *     California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *     @(#)uba.c       7.10 (Berkeley) 12/16/90
- *     @(#)autoconf.c  7.20 (Berkeley) 5/9/91
- */
-
-#include <sys/param.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/systm.h>
-#include <sys/map.h>
-#include <sys/buf.h>
-#include <sys/proc.h>
-#include <sys/user.h>
-#include <sys/conf.h>
-#include <sys/dkstat.h>
-#include <sys/kernel.h>
-#include <sys/malloc.h>
-#include <sys/device.h>
-
-#include <uvm/uvm_extern.h>
-
-#include <machine/pte.h>
-#include <machine/cpu.h>
-#include <machine/mtpr.h>
-#include <machine/nexus.h>
-#include <machine/sid.h>
-#include <machine/scb.h>
-#include <machine/frame.h>
-
-#include <vax/uba/ubareg.h>
-#include <dev/qbus/ubavar.h>
-
-volatile int /* rbr, rcvec,*/ svec;
-
-static int ubasearch __P((struct device *, struct cfdata *, void *));
-static int ubaprint __P((void *, const char *));
-#if 0
-static void ubastray __P((int));
-#endif
-static void ubainitmaps __P((struct uba_softc *));
-
-extern struct cfdriver uba_cd;
-
-#define spluba spl7
-
-#if defined(DW780) || defined(DW750)
-
-int    dw_match __P((struct device *, struct cfdata *, void *));
-
-int
-dw_match(parent, cf, aux)
-       struct  device *parent;
-       struct cfdata *cf;
-       void *aux;
-{
-       struct sbi_attach_args *sa = (struct sbi_attach_args *)aux;
-
-       if ((cf->cf_loc[0] != sa->nexnum) && (cf->cf_loc[0] > -1 ))
-               return 0;
-
-       /*
-        * The uba type is actually only telling where the uba 
-        * space is in nexus space.
-        */
-       if ((sa->type & ~3) != NEX_UBA0)
-               return 0;
-
-       return 1;
-}
-#endif
-
-#ifdef DW780
-/*
- * The DW780 are directly connected to the SBI on 11/780 and 8600.
- */
-void   dw780_attach __P((struct device *, struct device *, void *));
-void   dw780_beforescan __P((struct uba_softc *));
-void   dw780_afterscan __P((struct uba_softc *));
-int    dw780_errchk __P((struct uba_softc *));
-void   dw780_init __P((struct uba_softc *));
-void   dw780_purge __P((struct uba_softc *, int));
-void   uba_dw780int __P((int));
-static void ubaerror __P((struct uba_softc *, int *, int *));
-
-struct cfattach uba_sbi_ca = {
-       sizeof(struct uba_softc), dw_match, dw780_attach
-};
-
-char   ubasr_bits[] = UBASR_BITS;
-
-void
-dw780_attach(parent, self, aux)
-       struct device *parent, *self;
-       void *aux;
-{
-       struct uba_softc *sc = (void *)self;
-       struct sbi_attach_args *sa = aux;
-       int ubaddr = sa->type & 3;
-       int i;
-
-       printf(": DW780\n");
-
-       /*
-        * Fill in bus specific data.
-        */
-       sc->uh_uba = (void *)sa->nexaddr;
-       sc->uh_nbdp = NBDP780;
-       sc->uh_nr = sa->nexnum * (parent->dv_unit + 1);
-       sc->uh_beforescan = dw780_beforescan;
-       sc->uh_afterscan = dw780_afterscan;
-       sc->uh_errchk = dw780_errchk;
-       sc->uh_ubapurge = dw780_purge;
-       sc->uh_ubainit = dw780_init;
-       sc->uh_type = DW780;
-       sc->uh_memsize = UBAPAGES;
-       sc->uh_ibase = VAX_NBPG + ubaddr * VAX_NBPG;
-       sc->uh_mr = sc->uh_uba->uba_map;
-
-       for (i = 0; i < 4; i++)
-               scb_vecalloc(256 + i * 64 + sa->nexnum * 4, uba_dw780int,
-                   sc->uh_dev.dv_unit, SCB_ISTACK, &sc->uh_intrcnt);
-       evcnt_attach_dynamic(&sc->uh_intrcnt, EVCNT_TYPE_INTR, NULL,
-               sc->uh_dev.dev_xname, "intr");
-
-       uba_attach(sc, (parent->dv_unit ? UMEMB8600(ubaddr) :
-           UMEMA8600(ubaddr)) + (UBAPAGES * VAX_NBPG));
-}
-
-void
-dw780_beforescan(sc)
-       struct uba_softc *sc;
-{
-       volatile int *hej = &sc->uh_uba->uba_sr;
-
-       *hej = *hej;
-       sc->uh_uba->uba_cr = UBACR_IFS|UBACR_BRIE;
-}
-
-void
-dw780_afterscan(sc)
-       struct uba_softc *sc;
-{
-       sc->uh_uba->uba_cr = UBACR_IFS | UBACR_BRIE |
-           UBACR_USEFIE | UBACR_SUEFIE |
-           (sc->uh_uba->uba_cr & 0x7c000000);
-}
-
-/*
- * On DW780 badaddr() in uba space sets a bit in uba_sr instead of
- * doing a machine check.
- */
-int
-dw780_errchk(sc)
-       struct uba_softc *sc;
-{
-       volatile int *hej = &sc->uh_uba->uba_sr;
-
-       if (*hej) {
-               *hej = *hej;
-               return 1;
-       }
-       return 0;
-}
-
-void
-uba_dw780int(uba)
-       int     uba;
-{
-       int     br, vec;
-       struct  uba_softc *sc = uba_cd.cd_devs[uba];
-       struct  uba_regs *ur = sc->uh_uba;
-
-       br = mfpr(PR_IPL);
-       vec = ur->uba_brrvr[br - 0x14];
-       if (vec <= 0) {
-               ubaerror(sc, &br, (int *)&vec);
-               if (svec == 0)
-                       return;
-       }
-       if (cold)
-               scb_fake(vec + sc->uh_ibase, br);
-       else {
-               struct ivec_dsp *ivec = &scb_vec[vec / 4];
-               (*ivec->hoppaddr)(ivec->pushlarg);
-       }
-}
-
-void
-dw780_init(sc)
-       struct uba_softc *sc;
-{
-       sc->uh_uba->uba_cr = UBACR_ADINIT;
-       sc->uh_uba->uba_cr = UBACR_IFS|UBACR_BRIE|UBACR_USEFIE|UBACR_SUEFIE;
-       while ((sc->uh_uba->uba_cnfgr & UBACNFGR_UBIC) == 0)
-               ;
-}
-
-void
-dw780_purge(sc, bdp)
-       struct uba_softc *sc;
-       int bdp;
-{
-       sc->uh_uba->uba_dpr[bdp] |= UBADPR_BNE;
-}
-
-int    ubawedgecnt = 10;
-int    ubacrazy = 500;
-int    zvcnt_max = 5000;       /* in 8 sec */
-int    ubaerrcnt;
-/*
- * This routine is called by the locore code to process a UBA
- * error on an 11/780 or 8600. The arguments are passed
- * on the stack, and value-result (through some trickery).
- * In particular, the uvec argument is used for further
- * uba processing so the result aspect of it is very important.
- * It must not be declared register.
- */
-/*ARGSUSED*/
-void
-ubaerror(uh, ipl, uvec)
-       register struct uba_softc *uh;
-       int *ipl, *uvec;
-{
-       struct  uba_regs *uba = uh->uh_uba;
-       register int sr, s;
-       char sbuf[256], sbuf2[256];
-
-       if (*uvec == 0) {
-               /*
-                * Declare dt as unsigned so that negative values
-                * are handled as >8 below, in case time was set back.
-                */
-               u_long  dt = time.tv_sec - uh->uh_zvtime;
-
-               uh->uh_zvtotal++;
-               if (dt > 8) {
-                       uh->uh_zvtime = time.tv_sec;
-                       uh->uh_zvcnt = 0;
-               }
-               if (++uh->uh_zvcnt > zvcnt_max) {
-                       printf("%s: too many zero vectors (%d in <%d sec)\n",
-                               uh->uh_dev.dv_xname, uh->uh_zvcnt, (int)dt + 1);
-
-                       bitmask_snprintf(uba->uba_cnfgr&(~0xff), UBACNFGR_BITS,
-                                        sbuf, sizeof(sbuf));
-                       printf("\tIPL 0x%x\n\tcnfgr: %s  Adapter Code: 0x%x\n",
-                               *ipl, sbuf, uba->uba_cnfgr&0xff);
-
-                       bitmask_snprintf(uba->uba_sr, ubasr_bits, sbuf, sizeof(sbuf));
-                       printf("\tsr: %s\n\tdcr: %x (MIC %sOK)\n",
-                               sbuf, uba->uba_dcr,
-                               (uba->uba_dcr&0x8000000)?"":"NOT ");
-                       ubareset(uh->uh_dev.dv_unit);
-               }
-               return;
-       }
-       if (uba->uba_cnfgr & NEX_CFGFLT) {
-               bitmask_snprintf(uba->uba_sr, ubasr_bits, sbuf, sizeof(sbuf));
-               bitmask_snprintf(uba->uba_cnfgr, NEXFLT_BITS, sbuf2, sizeof(sbuf2));
-               printf("%s: sbi fault sr=%s cnfgr=%s\n",
-                   uh->uh_dev.dv_xname, sbuf, sbuf2);
-               ubareset(uh->uh_dev.dv_unit);



Home | Main Index | Thread Index | Old Index