Home | History | Annotate | Line # | Download | only in pci
dwlpx.c revision 1.28.2.4
      1  1.28.2.4    skrll /* $NetBSD: dwlpx.c,v 1.28.2.4 2004/11/14 08:15:04 skrll Exp $ */
      2       1.1      cgd 
      3       1.1      cgd /*
      4       1.2      cgd  * Copyright (c) 1997 by Matthew Jacob
      5       1.1      cgd  * NASA AMES Research Center.
      6       1.1      cgd  * All rights reserved.
      7       1.1      cgd  *
      8       1.1      cgd  * Redistribution and use in source and binary forms, with or without
      9       1.1      cgd  * modification, are permitted provided that the following conditions
     10       1.1      cgd  * are met:
     11       1.1      cgd  * 1. Redistributions of source code must retain the above copyright
     12       1.1      cgd  *    notice immediately at the beginning of the file, without modification,
     13       1.1      cgd  *    this list of conditions, and the following disclaimer.
     14       1.1      cgd  * 2. Redistributions in binary form must reproduce the above copyright
     15       1.1      cgd  *    notice, this list of conditions and the following disclaimer in the
     16       1.1      cgd  *    documentation and/or other materials provided with the distribution.
     17       1.1      cgd  * 3. The name of the author may not be used to endorse or promote products
     18       1.1      cgd  *    derived from this software without specific prior written permission.
     19       1.1      cgd  *
     20       1.1      cgd  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
     21       1.1      cgd  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     22       1.1      cgd  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     23       1.1      cgd  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
     24       1.1      cgd  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     25       1.1      cgd  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     26       1.1      cgd  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     27       1.1      cgd  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     28       1.1      cgd  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     29       1.1      cgd  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     30       1.1      cgd  * SUCH DAMAGE.
     31       1.1      cgd  */
     32       1.3      cgd 
     33       1.4      cgd #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
     34       1.4      cgd 
     35  1.28.2.4    skrll __KERNEL_RCSID(0, "$NetBSD: dwlpx.c,v 1.28.2.4 2004/11/14 08:15:04 skrll Exp $");
     36       1.1      cgd 
     37       1.1      cgd #include <sys/param.h>
     38       1.1      cgd #include <sys/systm.h>
     39       1.1      cgd #include <sys/kernel.h>
     40       1.1      cgd #include <sys/device.h>
     41      1.15  thorpej 
     42      1.22      mrg #include <uvm/uvm_extern.h>
     43       1.1      cgd 
     44       1.1      cgd #include <machine/autoconf.h>
     45      1.15  thorpej 
     46       1.1      cgd #include <dev/pci/pcireg.h>
     47       1.1      cgd #include <dev/pci/pcivar.h>
     48      1.15  thorpej 
     49       1.1      cgd #include <alpha/tlsb/tlsbreg.h>
     50       1.1      cgd #include <alpha/tlsb/kftxxvar.h>
     51       1.1      cgd #include <alpha/tlsb/kftxxreg.h>
     52       1.1      cgd #include <alpha/pci/dwlpxreg.h>
     53       1.1      cgd #include <alpha/pci/dwlpxvar.h>
     54       1.1      cgd #include <alpha/pci/pci_kn8ae.h>
     55       1.1      cgd 
     56       1.1      cgd #define	KV(_addr)	((caddr_t)ALPHA_PHYS_TO_K0SEG((_addr)))
     57      1.14   mjacob #define	DWLPX_SYSBASE(sc)	\
     58      1.14   mjacob 	    ((((unsigned long)((sc)->dwlpx_node - 4))	<< 36) |	\
     59      1.14   mjacob 	     (((unsigned long) (sc)->dwlpx_hosenum)	<< 34) |	\
     60      1.14   mjacob 	     (1LL					<< 39))
     61  1.28.2.4    skrll #define	DWLPX_SYSBASE1(node, hosenum)	\
     62  1.28.2.4    skrll 	    ((((unsigned long)(node - 4))	<< 36) |	\
     63  1.28.2.4    skrll 	     (((unsigned long) hosenum)	        << 34) |	\
     64  1.28.2.4    skrll 	     (1LL					<< 39))
     65      1.14   mjacob 
     66       1.1      cgd 
     67       1.1      cgd static int	dwlpxmatch __P((struct device *, struct cfdata *, void *));
     68       1.1      cgd static void	dwlpxattach __P((struct device *, struct device *, void *));
     69      1.26  thorpej CFATTACH_DECL(dwlpx, sizeof(struct dwlpx_softc),
     70      1.26  thorpej     dwlpxmatch, dwlpxattach, NULL, NULL);
     71       1.1      cgd 
     72      1.13  thorpej extern struct cfdriver dwlpx_cd;
     73       1.1      cgd 
     74      1.23  thorpej void	dwlpx_errintr(void *, u_long vec);
     75       1.1      cgd 
     76       1.1      cgd static int
     77       1.1      cgd dwlpxmatch(parent, cf, aux)
     78       1.1      cgd 	struct device *parent;
     79       1.1      cgd 	struct cfdata *cf;
     80       1.1      cgd 	void *aux;
     81       1.1      cgd {
     82       1.1      cgd 	struct kft_dev_attach_args *ka = aux;
     83  1.28.2.4    skrll 	unsigned long ls;
     84  1.28.2.4    skrll 	u_int32_t ctl;
     85       1.1      cgd 
     86       1.1      cgd 	if (strcmp(ka->ka_name, dwlpx_cd.cd_name) != 0)
     87       1.1      cgd 		return (0);
     88  1.28.2.4    skrll 
     89  1.28.2.4    skrll 	ls = DWLPX_SYSBASE1(ka->ka_node, ka->ka_hosenum);
     90  1.28.2.4    skrll 
     91  1.28.2.4    skrll 	/*
     92  1.28.2.4    skrll 	 * Probe the first HPC to make sure this really is a dwlpx and
     93  1.28.2.4    skrll 	 * nothing else.
     94  1.28.2.4    skrll 	 */
     95  1.28.2.4    skrll 	if (badaddr(KV(PCIA_CTL(1) + ls), sizeof (ctl)) != 0) {
     96  1.28.2.4    skrll 		/*
     97  1.28.2.4    skrll 		 * If we are here something went wrong. One reason
     98  1.28.2.4    skrll 		 * could be that this is a dwlma and not a dwlpx.
     99  1.28.2.4    skrll 		 *
    100  1.28.2.4    skrll 		 * We can not clear potential illegal CSR errors here
    101  1.28.2.4    skrll 		 * since it is unknown hardware.
    102  1.28.2.4    skrll 		 */
    103  1.28.2.4    skrll 		return (0);
    104  1.28.2.4    skrll 	}
    105  1.28.2.4    skrll 
    106       1.1      cgd 	return (1);
    107       1.1      cgd }
    108       1.1      cgd 
    109       1.1      cgd static void
    110       1.1      cgd dwlpxattach(parent, self, aux)
    111       1.1      cgd 	struct device *parent;
    112       1.1      cgd 	struct device *self;
    113       1.1      cgd 	void *aux;
    114       1.1      cgd {
    115       1.1      cgd 	static int once = 0;
    116       1.1      cgd 	struct dwlpx_softc *sc = (struct dwlpx_softc *)self;
    117       1.8  thorpej 	struct dwlpx_config *ccp = &sc->dwlpx_cc;
    118       1.1      cgd 	struct kft_dev_attach_args *ka = aux;
    119       1.1      cgd 	struct pcibus_attach_args pba;
    120       1.8  thorpej 	u_int32_t pcia_present;
    121       1.1      cgd 
    122       1.1      cgd 	sc->dwlpx_node = ka->ka_node;
    123       1.1      cgd 	sc->dwlpx_dtype = ka->ka_dtype;
    124       1.1      cgd 	sc->dwlpx_hosenum = ka->ka_hosenum;
    125      1.23  thorpej 
    126       1.1      cgd 	dwlpx_init(sc);
    127      1.16  thorpej 	dwlpx_dma_init(ccp);
    128       1.8  thorpej 
    129       1.8  thorpej 	pcia_present = REGVAL(PCIA_PRESENT + ccp->cc_sysbase);
    130      1.17  thorpej 	printf(": PCIA rev. %d, STD I/O %spresent, %dK S/G entries\n",
    131      1.14   mjacob 	    (pcia_present >> PCIA_PRESENT_REVSHIFT) & PCIA_PRESENT_REVMASK,
    132      1.14   mjacob 	    (pcia_present & PCIA_PRESENT_STDIO) == 0 ? "not " : "",
    133      1.17  thorpej 	    sc->dwlpx_sgmapsz == DWLPX_SG128K ? 128 : 32);
    134       1.8  thorpej 
    135      1.17  thorpej #if 0
    136       1.8  thorpej 	{
    137       1.8  thorpej 		int hpc, slot, slotval;
    138       1.8  thorpej 		const char *str;
    139       1.8  thorpej 		for (hpc = 0; hpc < sc->dwlpx_nhpc; hpc++) {
    140       1.8  thorpej 			for (slot = 0; slot < 4; slot++) {
    141       1.8  thorpej 				slotval = (pcia_present >>
    142       1.8  thorpej 				    PCIA_PRESENT_SLOTSHIFT(hpc, slot)) &
    143       1.8  thorpej 				    PCIA_PRESENT_SLOT_MASK;
    144       1.8  thorpej 				if (slotval == PCIA_PRESENT_SLOT_NONE)
    145       1.8  thorpej 					continue;
    146       1.8  thorpej 				switch (slotval) {
    147       1.8  thorpej 				case PCIA_PRESENT_SLOT_25W:
    148       1.8  thorpej 					str = "25";
    149       1.8  thorpej 					break;
    150       1.8  thorpej 				case PCIA_PRESENT_SLOT_15W:
    151       1.8  thorpej 					str = "15";
    152       1.8  thorpej 					break;
    153       1.8  thorpej 				case PCIA_PRESENT_SLOW_7W:
    154       1.8  thorpej 				default:		/* XXX gcc */
    155       1.8  thorpej 					str = "7.5";
    156       1.8  thorpej 					break;
    157       1.8  thorpej 				}
    158       1.8  thorpej 				printf("%s: hpc %d slot %d: %s watt module\n",
    159       1.8  thorpej 				    sc->dwlpx_dev.dv_xname, hpc, slot, str);
    160       1.8  thorpej 			}
    161       1.8  thorpej 		}
    162       1.8  thorpej 	}
    163       1.8  thorpej #endif
    164       1.8  thorpej 
    165       1.1      cgd 	if (once == 0) {
    166       1.1      cgd 		/*
    167       1.1      cgd 		 * Set up interrupts
    168       1.1      cgd 		 */
    169       1.1      cgd 		pci_kn8ae_pickintr(&sc->dwlpx_cc, 1);
    170       1.1      cgd 		once++;
    171       1.1      cgd 	} else {
    172       1.1      cgd 		pci_kn8ae_pickintr(&sc->dwlpx_cc, 0);
    173       1.1      cgd 	}
    174       1.1      cgd 
    175       1.1      cgd 	/*
    176       1.1      cgd 	 * Attach PCI bus
    177       1.1      cgd 	 */
    178      1.11  thorpej 	pba.pba_iot = &sc->dwlpx_cc.cc_iot;
    179      1.11  thorpej 	pba.pba_memt = &sc->dwlpx_cc.cc_memt;
    180       1.6  thorpej 	pba.pba_dmat =	/* start with direct, may change... */
    181       1.6  thorpej 	    alphabus_dma_get_tag(&sc->dwlpx_cc.cc_dmat_direct, ALPHA_BUS_PCI);
    182      1.28     fvdl 	pba.pba_dmat64 = NULL;
    183       1.1      cgd 	pba.pba_pc = &sc->dwlpx_cc.cc_pc;
    184       1.1      cgd 	pba.pba_bus = 0;
    185      1.24  thorpej 	pba.pba_bridgetag = NULL;
    186      1.19  thorpej 	pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
    187      1.19  thorpej 	    PCI_FLAGS_MRL_OKAY | PCI_FLAGS_MRM_OKAY | PCI_FLAGS_MWI_OKAY;
    188  1.28.2.1    skrll 	config_found_ia(self, "pcibus", &pba, pcibusprint);
    189       1.1      cgd }
    190       1.1      cgd 
    191       1.1      cgd void
    192       1.1      cgd dwlpx_init(sc)
    193       1.1      cgd 	struct dwlpx_softc *sc;
    194       1.1      cgd {
    195      1.14   mjacob 	u_int32_t ctl;
    196       1.1      cgd 	struct dwlpx_config *ccp = &sc->dwlpx_cc;
    197      1.23  thorpej 	unsigned long vec, ls = DWLPX_SYSBASE(sc);
    198      1.23  thorpej 	int i;
    199       1.1      cgd 
    200       1.1      cgd 	if (ccp->cc_initted == 0) {
    201      1.14   mjacob 		/*
    202      1.14   mjacob 		 * On reads, you get a fault if you read a nonexisted HPC.
    203      1.14   mjacob 		 * We know the internal KFTIA hose (hose 0) has only 2 HPCs,
    204      1.14   mjacob 		 * but we can also actually probe for HPCs.
    205      1.14   mjacob 		 * Assume at least one.
    206      1.14   mjacob 		 */
    207      1.14   mjacob 		for (sc->dwlpx_nhpc = 1; sc->dwlpx_nhpc < NHPC;
    208      1.14   mjacob 		    sc->dwlpx_nhpc++) {
    209      1.14   mjacob 			if (badaddr(KV(PCIA_CTL(sc->dwlpx_nhpc) + ls),
    210      1.14   mjacob 			    sizeof (ctl)) != 0) {
    211      1.14   mjacob 				break;
    212      1.14   mjacob 			}
    213      1.14   mjacob 		}
    214      1.14   mjacob 		if (sc->dwlpx_nhpc != NHPC) {
    215      1.14   mjacob 			/* clear (potential) Illegal CSR Address Error */
    216      1.14   mjacob 			REGVAL(PCIA_ERR(0) + DWLPX_SYSBASE(sc)) =
    217      1.14   mjacob 				PCIA_ERR_ALLERR;
    218      1.14   mjacob 		}
    219      1.14   mjacob 
    220      1.10  thorpej 		dwlpx_bus_io_init(&ccp->cc_iot, ccp);
    221      1.10  thorpej 		dwlpx_bus_mem_init(&ccp->cc_memt, ccp);
    222       1.1      cgd 	}
    223       1.1      cgd 	dwlpx_pci_init(&ccp->cc_pc, ccp);
    224       1.1      cgd 	ccp->cc_sc = sc;
    225       1.1      cgd 
    226       1.1      cgd 	/*
    227       1.1      cgd 	 * Establish a precalculated base for convenience's sake.
    228       1.1      cgd 	 */
    229      1.14   mjacob 	ccp->cc_sysbase = ls;
    230       1.1      cgd 
    231       1.1      cgd 	/*
    232      1.14   mjacob 	 * If there are only 2 HPCs, then the 'present' register is not
    233      1.14   mjacob 	 * implemented, so there will only ever be 32K SG entries. Otherwise
    234      1.14   mjacob 	 * any revision greater than zero will have 128K entries.
    235      1.14   mjacob 	 */
    236      1.14   mjacob 	ctl = REGVAL(PCIA_PRESENT + ccp->cc_sysbase);
    237      1.14   mjacob 	if (sc->dwlpx_nhpc == 2) {
    238      1.14   mjacob 		sc->dwlpx_sgmapsz = DWLPX_SG32K;
    239      1.17  thorpej #if 0
    240      1.14   mjacob 	/*
    241      1.14   mjacob 	 * As of 2/25/98- When I enable SG128K, and then have to flip
    242      1.14   mjacob 	 * TBIT below, I get bad SGRAM errors. We'll fix this later
    243      1.14   mjacob 	 * if this gets important.
    244      1.14   mjacob 	 */
    245      1.14   mjacob 	} else if ((ctl >> PCIA_PRESENT_REVSHIFT) & PCIA_PRESENT_REVMASK) {
    246      1.14   mjacob 		sc->dwlpx_sgmapsz = DWLPX_SG128K;
    247      1.14   mjacob #endif
    248      1.14   mjacob 	} else {
    249      1.14   mjacob 		sc->dwlpx_sgmapsz = DWLPX_SG32K;
    250      1.14   mjacob 	}
    251      1.14   mjacob 
    252      1.14   mjacob 	/*
    253       1.1      cgd 	 * Set up interrupt stuff for this DWLPX.
    254       1.1      cgd 	 *
    255       1.1      cgd 	 * Note that all PCI interrupt pins are disabled at this time.
    256       1.1      cgd 	 *
    257       1.1      cgd 	 * Do this even for all HPCs- even for the nonexistent
    258       1.1      cgd 	 * one on hose zero of a KFTIA.
    259       1.1      cgd 	 */
    260      1.23  thorpej 	vec = scb_alloc(dwlpx_errintr, sc);
    261      1.23  thorpej 	if (vec == SCB_ALLOC_FAILED)
    262      1.23  thorpej 		panic("%s: unable to allocate error vector",
    263      1.23  thorpej 		    sc->dwlpx_dev.dv_xname);
    264      1.23  thorpej 	printf("%s: error interrupt at vector 0x%lx\n",
    265      1.23  thorpej 	    sc->dwlpx_dev.dv_xname, vec);
    266       1.1      cgd 	for (i = 0; i < NHPC; i++) {
    267       1.1      cgd 		REGVAL(PCIA_IMASK(i) + ccp->cc_sysbase) = DWLPX_IMASK_DFLT;
    268      1.23  thorpej 		REGVAL(PCIA_ERRVEC(i) + ccp->cc_sysbase) = vec;
    269       1.1      cgd 	}
    270      1.23  thorpej 
    271       1.1      cgd 	/*
    272       1.1      cgd 	 * Establish HAE values, as well as make sure of sanity elsewhere.
    273       1.1      cgd 	 */
    274       1.1      cgd 	for (i = 0; i < sc->dwlpx_nhpc; i++) {
    275      1.14   mjacob 		ctl = REGVAL(PCIA_CTL(i) + ccp->cc_sysbase);
    276       1.1      cgd 		ctl &= 0x0fffffff;
    277       1.9   mjacob 		ctl &= ~(PCIA_CTL_MHAE(0x1f) | PCIA_CTL_IHAE(0x1f));
    278       1.9   mjacob 		/*
    279       1.9   mjacob 		 * I originally also had it or'ing in 3, which makes no sense.
    280       1.9   mjacob 		 */
    281       1.9   mjacob 
    282       1.9   mjacob 		ctl |= PCIA_CTL_RMMENA | PCIA_CTL_RMMARB;
    283       1.9   mjacob 
    284       1.9   mjacob 		/*
    285       1.9   mjacob 		 * Only valid if we're attached to a KFTIA or a KTHA.
    286       1.9   mjacob 		 */
    287       1.9   mjacob 		ctl |= PCIA_CTL_3UP;
    288       1.9   mjacob 
    289       1.9   mjacob 		ctl |= PCIA_CTL_CUTENA;
    290       1.9   mjacob 
    291      1.14   mjacob 		/*
    292      1.14   mjacob 		 * Fit in appropriate S/G Map Ram size.
    293      1.14   mjacob 		 */
    294      1.14   mjacob 		if (sc->dwlpx_sgmapsz == DWLPX_SG32K)
    295      1.14   mjacob 			ctl |= PCIA_CTL_SG32K;
    296      1.14   mjacob 		else if (sc->dwlpx_sgmapsz == DWLPX_SG128K)
    297      1.14   mjacob 			ctl |= PCIA_CTL_SG128K;
    298      1.14   mjacob 		else
    299      1.14   mjacob 			ctl |= PCIA_CTL_SG32K;
    300      1.14   mjacob 
    301       1.1      cgd 		REGVAL(PCIA_CTL(i) + ccp->cc_sysbase) = ctl;
    302       1.1      cgd 	}
    303      1.14   mjacob 	/*
    304      1.14   mjacob 	 * Enable TBIT if required
    305      1.14   mjacob 	 */
    306      1.14   mjacob 	if (sc->dwlpx_sgmapsz == DWLPX_SG128K)
    307      1.14   mjacob 		REGVAL(PCIA_TBIT + ccp->cc_sysbase) = 1;
    308      1.14   mjacob 	alpha_mb();
    309       1.1      cgd 	ccp->cc_initted = 1;
    310      1.14   mjacob }
    311      1.14   mjacob 
    312      1.14   mjacob void
    313      1.23  thorpej dwlpx_errintr(arg, vec)
    314      1.23  thorpej 	void *arg;
    315      1.14   mjacob 	unsigned long vec;
    316      1.14   mjacob {
    317      1.23  thorpej 	struct dwlpx_softc *sc = arg;
    318      1.23  thorpej 	struct dwlpx_config *ccp = &sc->dwlpx_cc;
    319      1.23  thorpej 	int i;
    320      1.14   mjacob 	struct {
    321      1.14   mjacob 		u_int32_t err;
    322      1.14   mjacob 		u_int32_t addr;
    323      1.14   mjacob 	} hpcs[NHPC];
    324      1.14   mjacob 
    325      1.14   mjacob 	for (i = 0; i < sc->dwlpx_nhpc; i++) {
    326      1.14   mjacob 		hpcs[i].err = REGVAL(PCIA_ERR(i) + ccp->cc_sysbase);
    327      1.14   mjacob 		hpcs[i].addr = REGVAL(PCIA_FADR(i) + ccp->cc_sysbase);
    328      1.14   mjacob 	}
    329      1.14   mjacob 	printf("%s: node %d hose %d error interrupt\n",
    330      1.23  thorpej 	    sc->dwlpx_dev.dv_xname, sc->dwlpx_node, sc->dwlpx_hosenum);
    331      1.14   mjacob 
    332      1.14   mjacob 	for (i = 0; i < sc->dwlpx_nhpc; i++) {
    333      1.14   mjacob 		if ((hpcs[i].err & PCIA_ERR_ERROR) == 0)
    334      1.14   mjacob 			continue;
    335      1.14   mjacob 		printf("\tHPC %d: ERR=0x%08x; DMA %s Memory, "
    336      1.14   mjacob 			"Failing Address 0x%x\n",
    337      1.14   mjacob 			i, hpcs[i].err, hpcs[i].addr & 0x1? "write to" :
    338      1.14   mjacob 			"read from", hpcs[i].addr & ~3);
    339      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_SERR_L)
    340      1.14   mjacob 			printf("\t       PCI device asserted SERR_L\n");
    341      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_ILAT)
    342      1.14   mjacob 			printf("\t       Incremental Latency Exceeded\n");
    343      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_SGPRTY)
    344      1.14   mjacob 			printf("\t       CPU access of SG RAM Parity Error\n");
    345      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_ILLCSR)
    346      1.14   mjacob 			printf("\t       Illegal CSR Address Error\n");
    347      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_PCINXM)
    348      1.14   mjacob 			printf("\t       Nonexistent PCI Address Error\n");
    349      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_DSCERR)
    350      1.14   mjacob 			printf("\t       PCI Target Disconnect Error\n");
    351      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_ABRT)
    352      1.14   mjacob 			printf("\t       PCI Target Abort Error\n");
    353      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_WPRTY)
    354      1.14   mjacob 			printf("\t       PCI Write Parity Error\n");
    355      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_DPERR)
    356      1.14   mjacob 			printf("\t       PCI Data Parity Error\n");
    357      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_APERR)
    358      1.14   mjacob 			printf("\t       PCI Address Parity Error\n");
    359      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_DFLT)
    360      1.14   mjacob 			printf("\t       SG Map RAM Invalid Entry Error\n");
    361      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_DPRTY)
    362      1.14   mjacob 			printf("\t       DMA access of SG RAM Parity Error\n");
    363      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_DRPERR)
    364      1.14   mjacob 			printf("\t       DMA Read Return Parity Error\n");
    365      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_MABRT)
    366      1.14   mjacob 			printf("\t       PCI Master Abort Error\n");
    367      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_CPRTY)
    368      1.14   mjacob 			printf("\t       CSR Parity Error\n");
    369      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_COVR)
    370      1.14   mjacob 			printf("\t       CSR Overrun Error\n");
    371      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_MBPERR)
    372      1.14   mjacob 			printf("\t       Mailbox Parity Error\n");
    373      1.14   mjacob 		if (hpcs[i].err & PCIA_ERR_MBILI)
    374      1.14   mjacob 			printf("\t       Mailbox Illegal Length Error\n");
    375      1.14   mjacob 		REGVAL(PCIA_ERR(i) + ccp->cc_sysbase) = hpcs[i].err;
    376      1.14   mjacob 	}
    377       1.1      cgd }
    378