Date: Fri, 1 Sep 2000 15:41:10 -0700 (PDT) From: John Baldwin <jhb@pike.osd.bsdi.com> To: mjacob@FreeBSD.org Cc: alpha@FreeBSD.org Subject: Re: New busspace (was Re: AS1200: boot successful) (fwd) Message-ID: <200009012241.PAA14306@pike.osd.bsdi.com>
next in thread | raw e-mail | index | archive | help
This is Drew's hack^W"fix" for the cia PCI bus driver. :)
----- Forwarded message from Andrew Gallatin -----
From: Andrew Gallatin <gallatin@cs.duke.edu>
Date: Fri, 1 Sep 2000 17:56:28 -0400 (EDT)
To: John Baldwin <jhb@pike.osd.bsdi.com>
Cc: obrien@freebsd.org, dfr@nlsystems.com
Subject: Re: New busspace (was Re: AS1200: boot successful)
Here's a bandaid. Groady, but it works. Not sure if the change to
cia.c is needed
Doug, Can you come up w/a real fix, or should I commit this?
Drew
Index: cia.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/pci/cia.c,v
retrieving revision 1.26
diff -u -r1.26 cia.c
--- cia.c 2000/08/28 21:48:02 1.26
+++ cia.c 2000/09/01 21:54:45
@@ -421,6 +421,8 @@
device_add_child(dev, "pcib", 0);
device_set_ivars(dev, (void *)use_bwx);
+
+ chipset_bwx = use_bwx;
return 0;
}
Index: cia_pci.c
===================================================================
RCS file: /home/ncvs/src/sys/alpha/pci/cia_pci.c,v
retrieving revision 1.8
diff -u -r1.8 cia_pci.c
--- cia_pci.c 2000/08/31 16:19:27 1.8
+++ cia_pci.c 2000/09/01 21:50:38
@@ -142,7 +142,7 @@
static void *
cia_pcib_cvt_bwx(device_t dev, vm_offset_t addr)
{
- if ((uintptr_t) device_get_ivars(dev)) {
+ if (chipset_bwx) {
addr &= 0xffffffffUL;
return (void *) KV(addr | CIA_EV56_BWMEM);
} else {
@@ -371,7 +371,7 @@
cia_pcib_read_config(device_t dev, int b, int s, int f,
int reg, int width)
{
- if ((uintptr_t) device_get_ivars(dev))
+ if (chipset_bwx)
return cia_pcib_bwx_read_config(b, s, f, reg, width);
else
return cia_pcib_swiz_read_config(b, s, f, reg, width);
@@ -381,7 +381,7 @@
cia_pcib_write_config(device_t dev, int b, int s, int f,
int reg, u_int32_t val, int width)
{
- if ((uintptr_t) device_get_ivars(dev))
+ if (chipset_bwx)
cia_pcib_bwx_write_config(b, s, f, reg, val, width);
else
cia_pcib_swiz_write_config(b, s, f, reg, val, width);
----- End of forwarded message from Andrew Gallatin -----
--
John Baldwin <jhb@bsdi.com> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.cslab.vt.edu/~jobaldwi/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200009012241.PAA14306>
