summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-06-12 00:58:48 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-06-12 00:58:48 +0000
commit6f7c94715bd08c2a2854d25191dd26826c3a9f6a (patch)
tree5d71a5c1af6c4e6446958fea21f83ab8a32b6872 /sys/dev/pci
parent7af4eaaee579e9a90705595fae4b81eac61bc4e9 (diff)
Skip 64-bit BARs correctly when initing.
ok marco@.
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/vga_pci.c11
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;
+ }
}
}