diff options
author | se <se@FreeBSD.org> | 1996-10-14 13:04:34 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 1996-10-14 13:04:34 +0000 |
commit | 65179d7277eab9bf9774d029052907e35820fe45 (patch) | |
tree | 9e9fb4c0b6fb8e574aba3d226e5b994ba1bf0e4c /sys/pci | |
parent | 95693154ab5d5f7dc2d4ac541e5f4b543b9b43f3 (diff) | |
download | FreeBSD-src-65179d7277eab9bf9774d029052907e35820fe45.zip FreeBSD-src-65179d7277eab9bf9774d029052907e35820fe45.tar.gz |
pci_map_mem() did a too restrictive check on the mapping type:
PCI_MAP_MEMORY_TYPE_32BIT_1M should be accepted as well as
PCI_MAP_MEMORY_TYPE_32BIT (and now is).
(Problem reported by David Greenman.)
Diffstat (limited to 'sys/pci')
-rw-r--r-- | sys/pci/pci.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c index e7d6f3d..472e5a5 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -1,6 +1,6 @@ /************************************************************************** ** -** $Id: pci.c,v 1.54 1996/09/06 23:08:58 phk Exp $ +** $Id: pci.c,v 1.55 1996/09/10 23:30:59 bde Exp $ ** ** General subroutines for the PCI bus. ** pci_configure () @@ -1051,7 +1051,9 @@ int pci_map_mem (pcici_t tag, u_long reg, vm_offset_t* va, vm_offset_t* pa) ** check the type */ - if ((data & PCI_MAP_MEMORY_TYPE_MASK) != PCI_MAP_MEMORY_TYPE_32BIT) { + if (!((data & PCI_MAP_MEMORY_TYPE_MASK) == PCI_MAP_MEMORY_TYPE_32BIT_1M + && (paddr & ~0xfffff) == 0) + && (data & PCI_MAP_MEMORY_TYPE_MASK) != PCI_MAP_MEMORY_TYPE_32BIT){ printf ("pci_map_mem failed: bad memory type=0x%x\n", (unsigned) data); return (0); |