summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-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 */