diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2006-10-19 22:42:54 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2006-10-19 22:42:54 +0000 |
commit | e329091434e9d9657a6ff483d438b51fc2a63b0c (patch) | |
tree | f0b04c05ff16c99a5c332148bb28c6ffe492f2f5 /sys/arch/sh/dev/pci_addr_fixup.c | |
parent | 0a751b86ddc4f2d130c7f0816cab4ad260d29383 (diff) |
Hack around a problem found on px-eh systems where the SH IPL+g initializes
part of the PCI addresses, but not to values reasonable for us.
Diffstat (limited to 'sys/arch/sh/dev/pci_addr_fixup.c')
-rw-r--r-- | sys/arch/sh/dev/pci_addr_fixup.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/arch/sh/dev/pci_addr_fixup.c b/sys/arch/sh/dev/pci_addr_fixup.c index d8c4353897e..7abec7a5379 100644 --- a/sys/arch/sh/dev/pci_addr_fixup.c +++ b/sys/arch/sh/dev/pci_addr_fixup.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_addr_fixup.c,v 1.1 2006/10/19 03:36:38 drahn Exp $ */ +/* $OpenBSD: pci_addr_fixup.c,v 1.2 2006/10/19 22:42:53 drahn Exp $ */ /* $NetBSD: pci_addr_fixup.c,v 1.7 2000/08/03 20:10:45 nathanw Exp $ */ /*- @@ -229,6 +229,15 @@ pciaddr_resource_manage(struct shpcic_softc *sc, pci_chipset_tag_t pc, addr = PCI_MAPREG_MEM_ADDR(val); size = PCI_MAPREG_MEM_SIZE(mask); ex = sc->extent_mem; + /* XXX */ + /* + * sh-IPL allocates a low address for PCI memory + * on px-eh systems, clobber it so it gets 'remapped' + */ + if (addr != 0 && addr < sc->sc_membus_space.bus_base) { + val = 0; + pci_conf_write(pc, tag, mapreg, val); + } } else { /* XXX some devices give 32bit value */ if (sc->sc_iobus_space.bus_base != PCIADDR_PORT_START) { |