summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2005-09-16 07:02:29 +0000
committerimp <imp@FreeBSD.org>2005-09-16 07:02:29 +0000
commitc1f3701ab88440a0ba59d4527454c3a3b97db49f (patch)
tree88c0768ee21a17c271fe121dfdb70bdf9f50ddd4 /sys
parent6036f04babada132a3877d5829a9efff39be490b (diff)
downloadFreeBSD-src-c1f3701ab88440a0ba59d4527454c3a3b97db49f.zip
FreeBSD-src-c1f3701ab88440a0ba59d4527454c3a3b97db49f.tar.gz
Commit a workaround to a problem with resource allocation. This helps
with some Dell servers that booted w/o a problem[*] on 5.4, but failed with 6.0-BETA. On the PCI bus, when we do lazy resource allocation, we narrow the range requested as we pass through bridges to reflect how the bridges are programmed and what addresses they pass. However, when we're doing an allocation on a bus that's directly connected to a host bridge, no such translation can take place. We already had a fallback range for memory requests, but none for ioports. As such, provide a fallback for I/O ports so we don't allocate location 0, which will have undesired side effects when the resources are actually used. This fixes a problem with booting a Dell server with usb in the kernel. However, it is an unsatisfying solution. I don't like the hard coded value, and I think we should start narrowing the resources returned to not be in the so-called isa alias area (where the ranage & 0x0300 must be 0 iirc). Doing such filtering will have to wait for another day. This may be a good 6 candidate, maybe after its had a chance to be refined. Tested by: glebius@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/acpica/acpi_pcib_acpi.c2
-rw-r--r--sys/i386/pci/pci_bus.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/acpica/acpi_pcib_acpi.c b/sys/dev/acpica/acpi_pcib_acpi.c
index 2c056f3..e83e957 100644
--- a/sys/dev/acpica/acpi_pcib_acpi.c
+++ b/sys/dev/acpica/acpi_pcib_acpi.c
@@ -322,6 +322,8 @@ acpi_pcib_acpi_alloc_resource(device_t dev, device_t child, int type, int *rid,
*/
if (type == SYS_RES_MEMORY && start == 0UL && end == ~0UL)
start = acpi_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));
}
diff --git a/sys/i386/pci/pci_bus.c b/sys/i386/pci/pci_bus.c
index 8721d4a..afd4bc6 100644
--- a/sys/i386/pci/pci_bus.c
+++ b/sys/i386/pci/pci_bus.c
@@ -503,6 +503,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));
}
OpenPOWER on IntegriCloud