From 3fec6f434e8ff51308215f6f541031d5380f1e6f Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 11 Mar 2010 21:57:14 +0100 Subject: still segfaults, trying with 32 Bit userland --- .../patches/patch-hw_xfree86_dri_sarea_h | 11 ++++++++ .../patch-hw_xfree86_os-support_linux_lnx_video_c | 29 ++++++++++++++-------- 2 files changed, 29 insertions(+), 11 deletions(-) create mode 100644 package/xorg-server/patches/patch-hw_xfree86_dri_sarea_h (limited to 'package/xorg-server') diff --git a/package/xorg-server/patches/patch-hw_xfree86_dri_sarea_h b/package/xorg-server/patches/patch-hw_xfree86_dri_sarea_h new file mode 100644 index 000000000..91c04f1ec --- /dev/null +++ b/package/xorg-server/patches/patch-hw_xfree86_dri_sarea_h @@ -0,0 +1,11 @@ +--- xorg-server-1.7.5.orig/hw/xfree86/dri/sarea.h 2009-02-10 08:23:28.000000000 +0100 ++++ xorg-server-1.7.5/hw/xfree86/dri/sarea.h 2010-03-08 19:21:40.000000000 +0100 +@@ -42,6 +42,8 @@ + /* SAREA area needs to be at least a page */ + #if defined(__alpha__) + #define SAREA_MAX 0x2000 ++#elif defined(__mips__) ++#define SAREA_MAX 0x4000 + #elif defined(__ia64__) + #define SAREA_MAX 0x10000 /* 64kB */ + #else diff --git a/package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_video_c b/package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_video_c index d28b1e4e4..8c93131b1 100644 --- a/package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_video_c +++ b/package/xorg-server/patches/patch-hw_xfree86_os-support_linux_lnx_video_c @@ -1,5 +1,5 @@ --- xorg-server-1.7.5.orig/hw/xfree86/os-support/linux/lnx_video.c 2010-02-16 01:24:23.000000000 +0100 -+++ xorg-server-1.7.5/hw/xfree86/os-support/linux/lnx_video.c 2010-03-07 16:38:06.000000000 +0100 ++++ xorg-server-1.7.5/hw/xfree86/os-support/linux/lnx_video.c 2010-03-08 21:31:20.000000000 +0100 @@ -497,7 +497,7 @@ volatile unsigned char *ioBase = NULL; Bool xf86EnableIO(void) @@ -9,17 +9,24 @@ int fd; unsigned int ioBase_phys; #endif -@@ -537,6 +537,13 @@ xf86EnableIO(void) - ioperm(0x40,4,0); /* trap access to the timer chip */ - ioperm(0x60,4,0); /* trap access to the keyboard controller */ - # endif -+#else +@@ -524,6 +524,20 @@ xf86EnableIO(void) + #endif + } + close(fd); ++#elif defined(__mips__) + fd = open("/dev/mem", O_RDWR); -+ if (IOPortBase == NULL) { -+ IOPortBase = (volatile unsigned char *)mmap(0, 0x20000, ++ IOPortBase = (volatile unsigned char *)mmap(0, 0x20000, + PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0x1fd00000); ++ if (IOPortBase == MAP_FAILED) { ++ xf86Msg(X_WARNING, ++ "xf86EnableIOPorts: Failed to map iobase (%s)\n", ++ strerror(errno)); ++ return FALSE; + } + close(fd); - #endif - ExtendedEnabled = TRUE; - ++ xf86Msg(X_WARNING, ++ "xf86EnableIOPorts: map iobase (%x)\n", ++ IOPortBase); + #elif !defined(__mc68000__) && !defined(__sparc__) && !defined(__mips__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__arm__) && !defined(__m32r__) + if (ioperm(0, 1024, 1) || iopl(3)) { + if (errno == ENODEV) -- cgit v1.2.3