diff options
author | Andrew Gallatin <gallatin@FreeBSD.org> | 2000-09-02 01:05:37 +0000 |
---|---|---|
committer | Andrew Gallatin <gallatin@FreeBSD.org> | 2000-09-02 01:05:37 +0000 |
commit | 72f21cf2c51d3f602397d78808a5ba2798bf8ed0 (patch) | |
tree | 714eac7a140dd361c2dd375a4b412b63a9c2dd70 /sys | |
parent | 21aff61248b982f16dbe1fb71c52e36ac86d0c7e (diff) | |
download | src-72f21cf2c51d3f602397d78808a5ba2798bf8ed0.tar.gz src-72f21cf2c51d3f602397d78808a5ba2798bf8ed0.zip |
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.
Notes
Notes:
svn path=/head/; revision=65352
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/pci/cia.c | 2 | ||||
-rw-r--r-- | sys/alpha/pci/cia_pci.c | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sys/alpha/pci/cia.c b/sys/alpha/pci/cia.c index 558bad03e26d..da618c57d26b 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 04e607f75638..1ccb6189c18f 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); |