summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2007-12-19 11:25:17 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2007-12-19 11:25:17 +0000
commit2c82dbe14c9fa55256902c73fe4213a6b4bfbd66 (patch)
tree26ee20cdafb67209b306044eb52aaa7bdb1b7f36 /sys/dev/pci
parent791dcbdee9bb827548e2a64570bb95033b83e486 (diff)
Fix the issue with some intel 965 host busses. Though the docs claim that the
mmaddr BAR is alway 64-bit, they lie. one some bridges it's not. Fix this by checking which type of memory it is before trying to map. Advice and ok kettenis@, Tested by myself and Matthew L. Shobe
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/agp_i810.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/dev/pci/agp_i810.c b/sys/dev/pci/agp_i810.c
index 31ec9147ed4..1dd2b975ed0 100644
--- a/sys/dev/pci/agp_i810.c
+++ b/sys/dev/pci/agp_i810.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agp_i810.c,v 1.30 2007/12/10 21:54:51 oga Exp $ */
+/* $OpenBSD: agp_i810.c,v 1.31 2007/12/19 11:25:16 oga Exp $ */
/* $NetBSD: agp_i810.c,v 1.15 2003/01/31 00:07:39 thorpej Exp $ */
/*-
@@ -239,6 +239,10 @@ agp_i810_attach(struct agp_softc *sc, struct pci_attach_args *pa)
return (error);
}
+ if (isc->chiptype == CHIP_I965)
+ memtype = pci_mapreg_type(isc->vga_pa.pa_pc,
+ isc->vga_pa.pa_tag, mmaddr);
+
error = pci_mapreg_map(&isc->vga_pa, mmaddr, memtype, 0,
&isc->bst, &isc->bsh, NULL, &isc->bsz, 0);
if (error != 0) {