diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-10-16 13:57:47 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2012-10-16 13:57:47 +0000 |
commit | a8b867623a4e9e377ed14f61ece673f3685d7917 (patch) | |
tree | 45a53b848f5aca981cbdf6c560d2574ec73d3776 | |
parent | 9b0a1b30bc5cff0915f3476566e0f1f7e697eb0e (diff) |
Change the PCI memory extent to cover the whole 64-bit memory space
but reserve everything above 36 bits so that the erroneous extent
allocation will fail but not panic the system. Fixes the notorious
IBM x3100 panic where one of the PCI BARs is programmed with an
incorrect 64 bit address.
Idea and OK kettenis@, tested by Walter Souza, thanks!
-rw-r--r-- | sys/arch/amd64/pci/pci_machdep.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c index 256463d437f..7c22fb665e0 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.55 2012/09/19 23:23:50 kettenis Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.56 2012/10/16 13:57:46 mikeb Exp $ */ /* $NetBSD: pci_machdep.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */ /*- @@ -624,10 +624,12 @@ pci_init_extents(void) * 32-bit operating systems, we should never see BARs * outside that region. */ - pcimem_ex = extent_create("pcimem", 0, 0xfffffffff, M_DEVBUF, - NULL, 0, EX_NOWAIT); + pcimem_ex = extent_create("pcimem", 0, 0xffffffffffffffffUL, + M_DEVBUF, NULL, 0, EX_NOWAIT); if (pcimem_ex == NULL) return; + extent_alloc_region(pcimem_ex, 0x1000000000UL, + 0xfffffff000000000UL, EX_NOWAIT); for (bmp = bios_memmap; bmp->type != BIOS_MAP_END; bmp++) { /* |