diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-08-30 09:48:40 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2015-08-30 09:48:40 +0000 |
commit | 146c68cc1d19296b909b74fd9e739409b439fad4 (patch) | |
tree | bdcfcb633c01855c9a0f3aaacd8f19fab97f7d51 /sys/arch/macppc | |
parent | 2c5424b87abcb43f729a089708ef60b4690d6d25 (diff) |
Map the whole config1 space based on the size read from the
device-tree.
With this change, supplementary PCIe cards are now properly
detected.
This should prevents the kernel from faulting when reading
unmapped PCI addresses as reported by Donovan Watteau on ppc@.
ok kettenis@
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r-- | sys/arch/macppc/pci/ht.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/arch/macppc/pci/ht.c b/sys/arch/macppc/pci/ht.c index 996e51d040d..9293a5378ed 100644 --- a/sys/arch/macppc/pci/ht.c +++ b/sys/arch/macppc/pci/ht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ht.c,v 1.17 2015/06/25 18:08:53 miod Exp $ */ +/* $OpenBSD: ht.c,v 1.18 2015/08/30 09:48:39 mpi Exp $ */ /* * Copyright (c) 2005 Mark Kettenis @@ -109,8 +109,8 @@ ht_attach(struct device *parent, struct device *self, void *aux) return; } - if (bus_space_map(sc->sc_memt, regs[1] + 0x01000000, 0x80000, 0, - &sc->sc_config1_memh)) { + if (bus_space_map(sc->sc_memt, regs[1] + 0x01000000, + regs[2] - 0x01000000, 0, &sc->sc_config1_memh)) { printf(": can't map PCI config1 memory\n"); return; } |