diff options
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/pci/pci_machdep.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/pci/pci_machdep.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c index e91d7e8215f..78853bf8136 100644 --- a/sys/arch/amd64/pci/pci_machdep.c +++ b/sys/arch/amd64/pci/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.25 2009/04/11 17:13:33 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.26 2009/04/13 21:23:16 kettenis Exp $ */ /* $NetBSD: pci_machdep.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */ /*- @@ -582,6 +582,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", 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", |