summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2009-04-13 21:23:17 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2009-04-13 21:23:17 +0000
commit74b55ca1869536316e37de9b21e1fd50f2f9dd56 (patch)
tree053ca7363b2d5f0517a6f30ab0fdc310197882e7 /sys/arch/i386/pci
parent5a4ab77cd05371c9c73e0252ecb3d9b195c4cccc (diff)
Ignore zero-sized regions from the BIOS memory map when reserving root PCI
bus address space. Fixes a problem reported by david@.
Diffstat (limited to 'sys/arch/i386/pci')
-rw-r--r--sys/arch/i386/pci/pci_machdep.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c
index de60d8500d2..dd545221c8a 100644
--- a/sys/arch/i386/pci/pci_machdep.c
+++ b/sys/arch/i386/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.46 2009/04/11 17:13:33 kettenis Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.47 2009/04/13 21:22:38 kettenis Exp $ */
/* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */
/*-
@@ -632,6 +632,10 @@ pci_init_extents(void)
if (bmp->addr + size >= 0x100000000ULL)
size = 0x100000000ULL - bmp->addr;
+ /* Ignore zero-sized regions. */
+ if (size == 0)
+ continue;
+
if (extent_alloc_region(pcimem_ex, bmp->addr, size,
EX_NOWAIT))
printf("memory map conflict 0x%llx/0x%llx\n",