summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2009-03-01 10:48:54 +0000
committerkettenis <kettenis@openbsd.org>2009-03-01 10:48:54 +0000
commitfaad20c75b75e7a6745e87614205f3cb510d5ca8 (patch)
tree9ab0a4984ed63bfa481f40be03f0954d6fc7761b
parenti can't see a reason that we'd need to go to splnet to call ip_output. (diff)
downloadwireguard-openbsd-faad20c75b75e7a6745e87614205f3cb510d5ca8.tar.xz
wireguard-openbsd-faad20c75b75e7a6745e87614205f3cb510d5ca8.zip
Don't let an mmio area replace the frame buffer if they are the same size.
Seen on a Tech Source Raptor. ok miod@
-rw-r--r--sys/arch/macppc/pci/vgafb_pci.c4
-rw-r--r--sys/arch/sparc64/dev/vgafb.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/sys/arch/macppc/pci/vgafb_pci.c b/sys/arch/macppc/pci/vgafb_pci.c
index 97c05b31fd3..924ccbe65ba 100644
--- a/sys/arch/macppc/pci/vgafb_pci.c
+++ b/sys/arch/macppc/pci/vgafb_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vgafb_pci.c,v 1.19 2007/11/05 19:24:31 martin Exp $ */
+/* $OpenBSD: vgafb_pci.c,v 1.20 2009/03/01 10:48:54 kettenis Exp $ */
/* $NetBSD: vga_pci.c,v 1.4 1996/12/05 01:39:38 cgd Exp $ */
/*
@@ -143,7 +143,7 @@ vgafb_pci_probe(struct pci_attach_args *pa, int id, u_int32_t *ioaddr,
* or mmio, we guess that memory is
* the larger of the two.
*/
- if (*memaddr > size) {
+ if (*memaddr >= size) {
/* this is the mmio */
*mmioaddr = addr;
/* ATI driver maps 0x80000 mmio, grr */
diff --git a/sys/arch/sparc64/dev/vgafb.c b/sys/arch/sparc64/dev/vgafb.c
index 6978da34132..2c2f5b49664 100644
--- a/sys/arch/sparc64/dev/vgafb.c
+++ b/sys/arch/sparc64/dev/vgafb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vgafb.c,v 1.56 2008/12/29 22:07:35 miod Exp $ */
+/* $OpenBSD: vgafb.c,v 1.57 2009/03/01 10:48:54 kettenis Exp $ */
/*
* Copyright (c) 2001 Jason L. Wright (jason@thought.net)
@@ -438,7 +438,7 @@ vgafb_mapregs(sc, pa)
* or mmio, we guess that memory is
* the larger of the two.
*/
- if (sc->sc_mem_size > bs) {
+ if (sc->sc_mem_size >= bs) {
/* this is the mmio */
sc->sc_mmio_addr = ba;
/* ATI driver maps 0x80000 mmio, grr */