diff options
author | se <se@FreeBSD.org> | 1995-12-15 13:40:20 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 1995-12-15 13:40:20 +0000 |
commit | c7128c37b830bed85913cb221f0e2721b26e70e9 (patch) | |
tree | e8ae72ff9d1530920c4d11242fcfd4c8c3cd4714 /sys/dev/pci | |
parent | da723b7aea961a5a21dea5be297a4eb780faf736 (diff) | |
download | FreeBSD-src-c7128c37b830bed85913cb221f0e2721b26e70e9.zip FreeBSD-src-c7128c37b830bed85913cb221f0e2721b26e70e9.tar.gz |
Fix the off-by-one error in the calculation of the valid port range.
Reduce default value of pcicb_membase to 0x2000000 (from 0x4000000)
since this seems to be the lower bound used by many systems.
Submitted by: Mihoko Tanaka <m_tanaka@pa.yokogawa.co.jp>
Diffstat (limited to 'sys/dev/pci')
-rw-r--r-- | sys/dev/pci/pci.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index f9263b8..3e893aa 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pci.c,v 1.36 1995/12/07 12:47:42 davidg Exp $ +** $Id: pci.c,v 1.37 1995/12/14 09:54:08 phk Exp $ ** ** General subroutines for the PCI bus. ** pci_configure () @@ -156,8 +156,8 @@ static struct pcicb pcibus0 = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* real allocation */ 0, 0xFFFF, /* iobase/limit */ - 0x4000000, 0xFFFFFFFFu, /* nonprefetch membase/limit */ - 0x4000000, 0xFFFFFFFFu /* prefetch membase/limit */ + 0x2000000, 0xFFFFFFFFu, /* nonprefetch membase/limit */ + 0x2000000, 0xFFFFFFFFu /* prefetch membase/limit */ }; static struct pcicb *pcicb; @@ -923,7 +923,7 @@ int pci_map_port (pcici_t tag, u_long reg, u_short* pa) }; iosize = -(data & PCI_MAP_IO_ADDRESS_MASK); if (ioaddr < pcicb->pcicb_iobase - || ioaddr + iosize > pcicb->pcicb_iolimit) { + || ioaddr + iosize -1 > pcicb->pcicb_iolimit) { printf ("pci_map_port failed: device's iorange 0x%x-0x%x " "is incompatible with its bridge's range 0x%x-0x%x\n", (unsigned) ioaddr, (unsigned) ioaddr + iosize - 1, |