Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/pmax/tc The TC device addresses are defined in KSEG...



details:   https://anonhg.NetBSD.org/src/rev/9c3e0198416d
branches:  trunk
changeset: 938137:9c3e0198416d
user:      simonb <simonb%NetBSD.org@localhost>
date:      Thu Sep 03 06:42:29 2020 +0000

description:
The TC device addresses are defined in KSEG1, but this confuses
bus_space(9) which expects bus addresses and not kernel virtual
addresses.  Pull the addresses back to bus addresses with
MIPS_KSEG1_TO_PHYS().

XXX: Fix this properly one day (without storing KSEG1 addrs in
the TC device configuration).

Fixes problem with TURBOchannel pmaxes panicing during
autoconfiguartion.

diffstat:

 sys/arch/pmax/tc/ioasic.c |  13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r b9a8d0367f8d -r 9c3e0198416d sys/arch/pmax/tc/ioasic.c
--- a/sys/arch/pmax/tc/ioasic.c Thu Sep 03 04:20:54 2020 +0000
+++ b/sys/arch/pmax/tc/ioasic.c Thu Sep 03 06:42:29 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ioasic.c,v 1.22 2013/11/10 20:09:53 christos Exp $     */
+/*     $NetBSD: ioasic.c,v 1.23 2020/09/03 06:42:29 simonb Exp $       */
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
  */
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.22 2013/11/10 20:09:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.23 2020/09/03 06:42:29 simonb Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -133,7 +133,14 @@
 
        sc->sc_dev = self;
        sc->sc_bst = ta->ta_memt;
-       if (bus_space_map(ta->ta_memt, ta->ta_addr,
+       /*
+        * XXX
+        * The TC device addresses are defined in KSEG1, but this
+        * confuses bus_space(9) which expects bus addresses and
+        * not kernel virtual addresses.  Pull the addresses back
+        * to bus addresses with MIPS_KSEG1_TO_PHYS().
+        */
+       if (bus_space_map(ta->ta_memt, MIPS_KSEG1_TO_PHYS(ta->ta_addr),
                        0x400000, 0, &sc->sc_bsh)) {
                printf("%s: unable to map device\n", device_xname(self));
                return;



Home | Main Index | Thread Index | Old Index