diff options
author | 2008-06-12 00:58:47 +0000 | |
---|---|---|
committer | 2008-06-12 00:58:47 +0000 | |
commit | 41884d57159eeb05fe84de17788ae3b78683b811 (patch) | |
tree | cc379740796199662010e396675bec1595a201a2 | |
parent | Bump max BARs up to 6. Needed for nouveau. (diff) | |
download | wireguard-openbsd-41884d57159eeb05fe84de17788ae3b78683b811.tar.xz wireguard-openbsd-41884d57159eeb05fe84de17788ae3b78683b811.zip |
Skip 64-bit BARs correctly when initing.
ok marco@.
-rw-r--r-- | sys/dev/pci/vga_pci.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 4073892d490..3142f136510 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga_pci.c,v 1.32 2008/06/03 17:14:21 brad Exp $ */ +/* $OpenBSD: vga_pci.c,v 1.33 2008/06/12 00:58:47 oga Exp $ */ /* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */ /* @@ -404,8 +404,13 @@ vga_pci_bar_init(struct vga_pci_softc *dev, struct pci_attach_args *pa) dev->bars[i] = NULL; } - addr+=4; - ++i; + if (type == PCI_MAPREG_MEM_TYPE_64BIT) { + addr += 8; + i += 2; + } else { + addr+=4; + ++i; + } } } |