tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Xserver works on bebox with s3



Hello,

On Nov 23, 2008, at 1:07 PM, KIYOHARA Takashi wrote:

I support Xserver with s3 on bebox.

Nice :)

In addition, submodules not resolve some symbols, and I gave up this though
I tried the support of mga.  Should I use XORG?

Yes. Adding support for ofppc, prep and bebox is simple enough - do as macppc does, although you will need a different driver list in src/ external/mit/xorg/server/drivers/Makefile.

Index: libexec/ld.elf_so/rtld.c
===================================================================
RCS file: /cvsroot/src/libexec/ld.elf_so/rtld.c,v
retrieving revision 1.120
diff -u -r1.120 rtld.c
--- libexec/ld.elf_so/rtld.c    24 Jul 2008 04:39:25 -0000      1.120
+++ libexec/ld.elf_so/rtld.c    22 Nov 2008 17:17:04 -0000
@@ -813,6 +813,12 @@
        return(NULL);
}

+static void *
+hackish_return_address(void)
+{
+       return __builtin_return_address(1);
+}
+
__strong_alias(__dlsym,dlsym)
void *
dlsym(void *handle, const char *name)
@@ -832,7 +838,8 @@
        case (intptr_t)RTLD_NEXT:
        case (intptr_t)RTLD_DEFAULT:
        case (intptr_t)RTLD_SELF:
-               retaddr = __builtin_return_address(0); /* __GNUC__ only */
+               /* retaddr = __builtin_return_address(0);*/ /* __GNUC__ only */
+               retaddr = hackish_return_address();
                if ((obj = _rtld_obj_from_addr(retaddr)) == NULL) {
                        _rtld_error("Cannot determine caller's shared object");
                        return NULL;

This one should be already in -current and 5.0 with #ifdef __powerpc__ around it.

Index: sys/arch/bebox/include/param.h
===================================================================
RCS file: /cvsroot/src/sys/arch/bebox/include/param.h,v
retrieving revision 1.10
diff -u -r1.10 param.h
--- sys/arch/bebox/include/param.h      17 Oct 2007 19:54:00 -0000      1.10
+++ sys/arch/bebox/include/param.h      22 Nov 2008 17:19:08 -0000
@@ -49,3 +49,6 @@
#define KERNBASE        0x3100

#include <powerpc/param.h>
+
+/* at this offset we mmap() the PCI IO range in display drivers */
+#define PCI_MAGIC_IO_RANGE     0xf2000000

With this the Xorg binaries for macppc should just work on your machine. They don't include the s3 drivers though, but you mentioned mga earlier which is included.

have fun
Michael



Home | Main Index | Thread Index | Old Index