Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci disable mmap()ing the framebuffer at offset 0 on...
details: https://anonhg.NetBSD.org/src/rev/b5659f304d95
branches: trunk
changeset: 583363:b5659f304d95
user: macallan <macallan%NetBSD.org@localhost>
date: Tue Aug 02 01:32:13 2005 +0000
description:
disable mmap()ing the framebuffer at offset 0 on sparc64 because some ATI
firmware likes to put PCI memory resources into this range, notably a Rage
IIc which puts the 2nd register aperture to 0x2000.
This should allow a few graphics chips to work with XFree86 which previously
failed with something like this:
(WW) ATI: PCI/AGP Mach64 in slot 2:5:0 could not be detected!
No devices to configure. Configuration failed.
Thanks to Florian Stoehr for doing most of the work tracking this down.
diffstat:
sys/dev/pci/machfb.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diffs (41 lines):
diff -r 7881d8aeed0d -r b5659f304d95 sys/dev/pci/machfb.c
--- a/sys/dev/pci/machfb.c Mon Aug 01 23:00:15 2005 +0000
+++ b/sys/dev/pci/machfb.c Tue Aug 02 01:32:13 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machfb.c,v 1.30 2005/07/07 18:43:47 thorpej Exp $ */
+/* $NetBSD: machfb.c,v 1.31 2005/08/02 01:32:13 macallan Exp $ */
/*
* Copyright (c) 2002 Bang Jun-Young
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
__KERNEL_RCSID(0,
- "$NetBSD: machfb.c,v 1.30 2005/07/07 18:43:47 thorpej Exp $");
+ "$NetBSD: machfb.c,v 1.31 2005/08/02 01:32:13 macallan Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -1696,12 +1696,21 @@
struct mach64_softc *sc = v;
paddr_t pa;
- /* 'regular' framebuffer mmap()ing */
+#ifndef __sparc64
+ /*
+ *'regular' framebuffer mmap()ing
+ * disabled on sparc64 because some ATI firmware likes to map some PCI
+ * resources to addresses that would collide with this ( like some Rage
+ * IIc which uses 0x2000 for the 2nd register block )
+ * Other 64bit architectures might run into similar problems.
+ */
if (offset<sc->sc_apersize) {
pa = bus_space_mmap(sc->sc_memt, sc->sc_aperbase+offset, 0,
prot, BUS_SPACE_MAP_LINEAR);
return pa;
}
+#endif
+
#if 0
/* evil hack to allow mmap()ing other devices as well */
if ((offset > 0x80000000) && (offset <= 0xffffffff)) {
Home |
Main Index |
Thread Index |
Old Index