summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrehan <grehan@FreeBSD.org>2005-05-21 00:22:57 +0000
committergrehan <grehan@FreeBSD.org>2005-05-21 00:22:57 +0000
commit08a22d34e7aa37e9c9e3d4f093841bced0b16326 (patch)
treeaeae068009996423dc60a8964fab7e67ee4f0910
parent591c5c404503abc86c748233f32c289c47244a69 (diff)
downloadFreeBSD-src-08a22d34e7aa37e9c9e3d4f093841bced0b16326.zip
FreeBSD-src-08a22d34e7aa37e9c9e3d4f093841bced0b16326.tar.gz
Quick hack-o-rama to allow the Xorg Radeon driver to start up. It
tries to mmap memory outside of the available BARs, so allow the range checks to be relaxed with a sysctl.
-rw-r--r--sys/powerpc/ofw/ofw_syscons.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/powerpc/ofw/ofw_syscons.c b/sys/powerpc/ofw/ofw_syscons.c
index 3047d33..38db742 100644
--- a/sys/powerpc/ofw/ofw_syscons.c
+++ b/sys/powerpc/ofw/ofw_syscons.c
@@ -57,6 +57,11 @@ __FBSDID("$FreeBSD$");
#include <powerpc/ofw/ofw_syscons.h>
#include <machine/nexusvar.h>
+static int ofwfb_ignore_mmap_checks;
+SYSCTL_NODE(_hw, OID_AUTO, ofwfb, CTLFLAG_RD, 0, "ofwfb");
+SYSCTL_INT(_hw_ofwfb, OID_AUTO, relax_mmap, CTLFLAG_RW,
+ &ofwfb_ignore_mmap_checks, 0, "relax mmap bounds checking");
+
extern u_char dflt_font_16[];
extern u_char dflt_font_14[];
extern u_char dflt_font_8[];
@@ -603,6 +608,14 @@ ofwfb_mmap(video_adapter_t *adp, vm_offset_t offset, vm_paddr_t *paddr,
return (ENOMEM);
/*
+ * Hack for Radeon...
+ */
+ if (ofwfb_ignore_mmap_checks) {
+ *paddr = offset;
+ return (0);
+ }
+
+ /*
* Make sure the requested address lies within the PCI device's assigned addrs
*/
for (i = 0; i < sc->sc_num_pciaddrs; i++)
OpenPOWER on IntegriCloud