summaryrefslogtreecommitdiffstats
path: root/sys/alpha
diff options
context:
space:
mode:
authorgallatin <gallatin@FreeBSD.org>2000-09-02 01:05:37 +0000
committergallatin <gallatin@FreeBSD.org>2000-09-02 01:05:37 +0000
commit87803cc21c9047b3020da56a3e806cdd7268e7c9 (patch)
tree15a16bf21dcf789ba84ee3bf9dff0559def2ab7a /sys/alpha
parent963489112f5d81916711f03dcfaf21a653999600 (diff)
downloadFreeBSD-src-87803cc21c9047b3020da56a3e806cdd7268e7c9.zip
FreeBSD-src-87803cc21c9047b3020da56a3e806cdd7268e7c9.tar.gz
A quick fix to get around a problem (described below) with cia based
machines. The patch uses an existing global variable in place of the newbus accessor to get at use_bwx. This is a quick fix to get miatas booting again; somebody with more newbus skills than I can muster will have to correct it. Matt Jacob's description of the problem from the -alpha list: The IVAR accessor stuff for pcib is incompletely specified for CIA. There's only one accessor defined, and that's to get the BUS instance number. <..> The device methods that try and get at the use_bwx get overriden because there's only one ivar for CIA's pcib, and that's for hose #, and it's always zero.
Diffstat (limited to 'sys/alpha')
-rw-r--r--sys/alpha/pci/cia.c2
-rw-r--r--sys/alpha/pci/cia_pci.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/alpha/pci/cia.c b/sys/alpha/pci/cia.c
index 558bad0..da618c5 100644
--- a/sys/alpha/pci/cia.c
+++ b/sys/alpha/pci/cia.c
@@ -421,6 +421,8 @@ cia_probe(device_t dev)
device_add_child(dev, "pcib", 0);
device_set_ivars(dev, (void *)use_bwx);
+
+ chipset_bwx = use_bwx;
return 0;
}
diff --git a/sys/alpha/pci/cia_pci.c b/sys/alpha/pci/cia_pci.c
index 04e607f..1ccb618 100644
--- a/sys/alpha/pci/cia_pci.c
+++ b/sys/alpha/pci/cia_pci.c
@@ -142,7 +142,7 @@ cia_pcib_cvt_dense(device_t dev, vm_offset_t addr)
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 @@ static u_int32_t
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 @@ static void
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);
OpenPOWER on IntegriCloud