diff options
author | phk <phk@FreeBSD.org> | 2002-02-22 11:21:02 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 2002-02-22 11:21:02 +0000 |
commit | 87ca6820c849da94cc5da4700f51904684fad62b (patch) | |
tree | 41055bac697b897df1b30d85b8932f6897d4574c /sys/dev/pci/pci_pci.c | |
parent | b9b775cf13e59a7cc373855362fec46d7b862077 (diff) | |
download | FreeBSD-src-87ca6820c849da94cc5da4700f51904684fad62b.zip FreeBSD-src-87ca6820c849da94cc5da4700f51904684fad62b.tar.gz |
Allow PCI_ALLOW_UNSUPPORTED_IO_RANGE to leave broken setups broken enough
to work.
Diffstat (limited to 'sys/dev/pci/pci_pci.c')
-rw-r--r-- | sys/dev/pci/pci_pci.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c index 637271e..4dc84de 100644 --- a/sys/dev/pci/pci_pci.c +++ b/sys/dev/pci/pci_pci.c @@ -307,12 +307,21 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, switch (type) { case SYS_RES_IOPORT: if (!pcib_is_isa_io(start)) { +#ifndef PCI_ALLOW_UNSUPPORTED_IO_RANGE if (start < sc->iobase) start = sc->iobase; if (end > sc->iolimit) end = sc->iolimit; if (end < start) start = 0; +#else + if (start < sc->iobase) + printf("start (%x) < sc->iobase (%x)\n", start, sc->iobase); + if (end > sc->iolimit) + printf("end (%x) > sc->iolimit (%x)\n", end, sc->iolimit); + if (end < start) + printf("end (%x) < start (%x)\n", end, start); +#endif } if (!pcib_is_isa_io(start) && ((start < sc->iobase) || (end > sc->iolimit))) { @@ -335,12 +344,21 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, */ case SYS_RES_MEMORY: if (!pcib_is_isa_mem(start)) { +#ifndef PCI_ALLOW_UNSUPPORTED_IO_RANGE if (start < sc->membase && end > sc->membase) start = sc->membase; if (end > sc->memlimit) end = sc->memlimit; if (end < start) start = 0; +#else + if (start < sc->membase && end > sc->membase) + printf("start (%x) < sc->membase (%x)\n", start, sc->membase); + if (end > sc->memlimit) + printf("end (%x) > sc->memlimit (%x)\n", end, sc->memlimit); + if (end < start) + printf("end (%x) < start (%x)\n", end, start); +#endif } if (!pcib_is_isa_mem(start) && (((start < sc->membase) || (end > sc->memlimit)) && |