summaryrefslogtreecommitdiff
path: root/sys/arch/macppc
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2006-04-28 20:21:43 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2006-04-28 20:21:43 +0000
commit20e14b0f2f44fd0a828de86eda26dc40463eba1d (patch)
tree18408096df3bbf60755bcdee1648c6d6d6eee6f2 /sys/arch/macppc
parent8de35d1929137acb932efc596546ad5c18a7c8dd (diff)
In mapped mode, when allowaperture != 0,also allow mmapping of the
PC-style 0xa0000-0xb0000 region, as the nv X driver uses it. Noticed and patch tested by xsa@ and aanriot@.
Diffstat (limited to 'sys/arch/macppc')
-rw-r--r--sys/arch/macppc/pci/vgafb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arch/macppc/pci/vgafb.c b/sys/arch/macppc/pci/vgafb.c
index c36e6ea56ed..96d617768b8 100644
--- a/sys/arch/macppc/pci/vgafb.c
+++ b/sys/arch/macppc/pci/vgafb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vgafb.c,v 1.28 2006/04/09 12:22:56 matthieu Exp $ */
+/* $OpenBSD: vgafb.c,v 1.29 2006/04/28 20:21:42 matthieu Exp $ */
/* $NetBSD: vga.c,v 1.3 1996/12/02 22:24:54 cgd Exp $ */
/*
@@ -351,9 +351,11 @@ vgafb_mmap(void *v, off_t offset, int prot)
break;
}
#endif
+ if (offset >= 0xa0000 && offset < 0xb0000)
+ h = offset;
/* XXX the following are probably wrong.
we want physical addresses here, not virtual ones */
- if (offset >= 0x10000000 && offset < 0x10040000 )
+ else if (offset >= 0x10000000 && offset < 0x10040000 )
/* 256KB of iohb */
h = vc->vc_ioh_b;
else if (offset >= 0x10040000 && offset < 0x10080000)