Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/hppa/dev explain why we skip over dev 1f func 7 in ...



details:   https://anonhg.NetBSD.org/src/rev/82a56f5d3f0b
branches:  trunk
changeset: 1023625:82a56f5d3f0b
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sat Sep 18 23:54:13 2021 +0000

description:
explain why we skip over dev 1f func 7 in config space access functions
no functional change

diffstat:

 sys/arch/hppa/dev/dino.c |  26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diffs (68 lines):

diff -r 4d75318c57ef -r 82a56f5d3f0b sys/arch/hppa/dev/dino.c
--- a/sys/arch/hppa/dev/dino.c  Sat Sep 18 21:34:56 2021 +0000
+++ b/sys/arch/hppa/dev/dino.c  Sat Sep 18 23:54:13 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dino.c,v 1.12 2021/08/07 16:18:55 thorpej Exp $ */
+/*     $NetBSD: dino.c,v 1.13 2021/09/18 23:54:13 macallan Exp $ */
 
 /*     $OpenBSD: dino.c,v 1.5 2004/02/13 20:39:31 mickey Exp $ */
 
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.12 2021/08/07 16:18:55 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dino.c,v 1.13 2021/09/18 23:54:13 macallan Exp $");
 
 /* #include "cardbus.h" */
 
@@ -347,8 +347,18 @@
 
        /*
         * XXX
-        * accessing dev 1f / func 7 on the 2nd Dino causes a machine check
-        * exception on my C200
+        * thus sayeth the Dino manual:
+        * 7.7.1 Generating PCI Special Cycles thru PA I/O Space
+        * When the PCI_CONFIG_ADDR registers BUS_NUM is the equal to the
+        * DINO’s bus number, 8’h00, DEV_NUM and Function fields are all ones,
+        * and the REG_NUM field is all zeros the next write to PCI_CONFIG_DATA
+        * register will generate a special cycle on DINO’s PCI bus. If the
+        * BUS_NUM field does not equal DINO bus number then a type 1
+        * transaction will be forwarded to PCI as described above.
+        * Note: Dino is using a legal PCI configuration address to generate a
+        * PCI special cycle. System firmware and software should not attempt
+        * to read or write to this configuration address when walking the
+        * PCI bus through configuration address space.
         */
        if ((tag & 0xff00) == 0xff00)
                return -1;
@@ -377,9 +387,7 @@
                return;
 
        /*
-        * XXX
-        * accessing dev 1f / func 7 on the 2nd Dino causes a machine check
-        * exception on my C200
+        * don't try to access dev 1f / func 7, see comment in dino_conf_read()
         */
        if ((tag & 0xff00) == 0xff00) return;
 
@@ -1644,7 +1652,7 @@
                return;
        }
 
-       sc->sc_regs = r = (volatile struct dino_regs *)sc->sc_bh;
+       sc->sc_regs = r = (volatile struct dino_regs *)sc->sc_bh;       
 #ifdef trust_the_firmware_to_proper_initialize_everything
        r->io_addr_en = 0;
        r->io_control = 0x80;
@@ -1652,7 +1660,7 @@
        r->papr = 0;
        r->io_fbb_en |= 1;
        r->damode = 0;
-       r->gmask &= ~1; /* allow GSC bus req */
+       r->gmask &= ~1; /* allow GSC bus req */
        r->pciror = 0;
        r->pciwor = 0;
        r->brdg_feat = 0xc0000000;


Home | Main Index | Thread Index | Old Index