diff options
-rw-r--r-- | sys/amd64/amd64/mptable_pci.c | 2 | ||||
-rw-r--r-- | sys/amd64/include/legacyvar.h | 2 | ||||
-rw-r--r-- | sys/amd64/pci/pci_bus.c | 4 |
3 files changed, 6 insertions, 2 deletions
diff --git a/sys/amd64/amd64/mptable_pci.c b/sys/amd64/amd64/mptable_pci.c index 660ced6..5a34373 100644 --- a/sys/amd64/amd64/mptable_pci.c +++ b/sys/amd64/amd64/mptable_pci.c @@ -84,7 +84,7 @@ static device_method_t mptable_hostb_methods[] = { DEVMETHOD(bus_print_child, bus_generic_print_child), DEVMETHOD(bus_read_ivar, legacy_pcib_read_ivar), DEVMETHOD(bus_write_ivar, legacy_pcib_write_ivar), - DEVMETHOD(bus_alloc_resource, bus_generic_alloc_resource), + DEVMETHOD(bus_alloc_resource, legacy_pcib_alloc_resource), DEVMETHOD(bus_release_resource, bus_generic_release_resource), DEVMETHOD(bus_activate_resource, bus_generic_activate_resource), DEVMETHOD(bus_deactivate_resource, bus_generic_deactivate_resource), diff --git a/sys/amd64/include/legacyvar.h b/sys/amd64/include/legacyvar.h index 81e8712..91f784f 100644 --- a/sys/amd64/include/legacyvar.h +++ b/sys/amd64/include/legacyvar.h @@ -49,5 +49,7 @@ void legacy_pcib_write_config(device_t dev, int bus, int slot, int func, int reg, u_int32_t data, int bytes); int legacy_pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value); +struct resource *legacy_pcib_alloc_resource(device_t dev, device_t child, + int type, int *rid, u_long start, u_long end, u_long count, u_int flags); #endif /* !_MACHINE_LEGACYVAR_H_ */ diff --git a/sys/amd64/pci/pci_bus.c b/sys/amd64/pci/pci_bus.c index d4949a0..15eccf7 100644 --- a/sys/amd64/pci/pci_bus.c +++ b/sys/amd64/pci/pci_bus.c @@ -273,7 +273,7 @@ SYSCTL_ULONG(_hw_pci, OID_AUTO, host_mem_start, CTLFLAG_RDTUN, "Limit the host bridge memory to being above this address. Must be\n\ set at boot via a tunable."); -static struct resource * +struct resource * legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) { @@ -291,6 +291,8 @@ legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, */ if (type == SYS_RES_MEMORY && start == 0UL && end == ~0UL) start = legacy_host_mem_start; + if (type == SYS_RES_IOPORT && start == 0UL && end == ~0UL) + start = 0x1000; return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags)); } |