diff options
author | imp <imp@FreeBSD.org> | 2004-10-11 21:10:23 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2004-10-11 21:10:23 +0000 |
commit | a5e0614f34f29e67a8b559dffa47509af8bdeb31 (patch) | |
tree | 0a29f69339ce70622c877d77602c0707b546975d /sys/i386/pci | |
parent | c21f27aa2bec2733ab051f2fe9eb43e57be2894d (diff) | |
download | FreeBSD-src-a5e0614f34f29e67a8b559dffa47509af8bdeb31.zip FreeBSD-src-a5e0614f34f29e67a8b559dffa47509af8bdeb31.tar.gz |
Make the lower range of the memory area 0x80000000 again. Also
introduce hw.{pci,acpi}.host_mem_start tunable to change this.
MFC: ASAP
Diffstat (limited to 'sys/i386/pci')
-rw-r--r-- | sys/i386/pci/pci_bus.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/sys/i386/pci/pci_bus.c b/sys/i386/pci/pci_bus.c index dbf1037..378075a 100644 --- a/sys/i386/pci/pci_bus.c +++ b/sys/i386/pci/pci_bus.c @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include <sys/kernel.h> #include <sys/malloc.h> #include <sys/module.h> +#include <sys/sysctl.h> #include <dev/pci/pcivar.h> #include <dev/pci/pcireg.h> @@ -469,6 +470,16 @@ legacy_pcib_write_ivar(device_t dev, device_t child, int which, return ENOENT; } +SYSCTL_DECL(_hw_pci); + +static int legacy_host_mem_start = 0x80000000; +/* No TUNABLE_ULONG :-( */ +TUNABLE_INT("hw.pci.host_mem_start", &legacy_host_mem_start); +SYSCTL_INT(_hw_pci, OID_AUTO, host_mem_start, CTLFLAG_RDTUN, + &legacy_host_mem_start, 0x80000000, + "Limit the host bridge memory to being above this address. Must be\n\ +set at boot via a tunable."); + static 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) @@ -481,9 +492,12 @@ legacy_pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, * found to do it. This is typically only used on older laptops * that don't have pci busses behind pci bridge, so assuming > 32MB * is liekly OK. + * + * However, this can cause problems for other chipsets, so we make + * this tunable by hw.pci.host_mem_start. */ if (type == SYS_RES_MEMORY && start == 0UL && end == ~0UL) - start = 0xfe000000; + start = legacy_host_mem_start; return (bus_generic_alloc_resource(dev, child, type, rid, start, end, count, flags)); } |