Subject: Re: XFree86, Radeon 9200, and me.
To: Richard Rauch <rkr@olib.org>
From: Nicolas Joly <njoly@pasteur.fr>
List: tech-x11
Date: 01/21/2004 16:08:25
--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Tue, Jan 20, 2004 at 08:39:30PM -0600, Richard Rauch wrote:
> My understanding is that the new X11 build support in build.sh is
> supposed to be working.  Is that correct?
> 
> I have just updated my AMD64 box.  X on my Radeon 9200 card
> has gone from working (with "vesa" and little or no acceleration)
> to failure.
> 
> In particular, X dies with a fatal error during its device probe.
> This happens whether I launch with "X -configure" or move my
> old (working) XF86Config to /etc and use "startx" as per normal.
[...]
> Anyone with expertise and interest for this?  Or should I grab a
> binary X11 install from somewhere (or maybe re-install the old set
> I had before)?  (Or is this a known problem?)

I just had a look, and noticed that PCI access with XFree was broken on
amd64 ...

Can you try the following patches ?

-- 
Nicolas Joly

Biological Software and Databanks.
Institut Pasteur, Paris.

--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="netbsd-amd64x11.diff"

? x11/Xserver/hw/xfree86/XF86Config.98
? x11/Xserver/hw/xfree86/XF86Config.eg
Index: x11/Xserver/Xserver/XFree86/Makefile
===================================================================
RCS file: /cvsroot/src/x11/Xserver/Xserver/XFree86/Makefile,v
retrieving revision 1.8
diff -u -r1.8 Makefile
--- x11/Xserver/Xserver/XFree86/Makefile	2004/01/08 03:36:24	1.8
+++ x11/Xserver/Xserver/XFree86/Makefile	2004/01/21 12:55:22
@@ -34,6 +34,9 @@
 	${LIBLBXUTIL} ${DPADD.randr} ${DPADD.render} ${DPADD.dix/xpstubs} \
 	${DPADD.mi} ${LIBZ} ${LIBM}
 
+.if ${MACHINE} == "amd64"
+LDADD+=	-lx86_64
+.endif
 .if ${MACHINE} == "i386"
 LDADD+=	-li386
 DPADD+=	${LIBI386}
Index: x11/Xserver/hw/xfree86/bin/pcitweak/Makefile
===================================================================
RCS file: /cvsroot/src/x11/Xserver/hw/xfree86/bin/pcitweak/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- x11/Xserver/hw/xfree86/bin/pcitweak/Makefile	2003/12/26 05:23:15	1.1
+++ x11/Xserver/hw/xfree86/bin/pcitweak/Makefile	2004/01/21 12:55:23
@@ -25,6 +25,9 @@
 
 DPADD=	${LIBXF86_OS} ${LIBDUMMY}
 
+.if ${MACHINE} == "amd64"
+LDADD+=	-lx86_64
+.endif
 .if ${MACHINE} == "i386"
 LDADD+=	-li386
 DPADD+=	${LIBI386}
Index: x11/Xserver/hw/xfree86/bin/scanpci/Makefile
===================================================================
RCS file: /cvsroot/src/x11/Xserver/hw/xfree86/bin/scanpci/Makefile,v
retrieving revision 1.1
diff -u -r1.1 Makefile
--- x11/Xserver/hw/xfree86/bin/scanpci/Makefile	2003/12/26 05:23:15	1.1
+++ x11/Xserver/hw/xfree86/bin/scanpci/Makefile	2004/01/21 12:55:23
@@ -27,6 +27,9 @@
 
 DPADD=	${LIBXF86_OS} ${LIBSCANPCI} ${LIBDUMMY}
 
+.if ${MACHINE} == "amd64"
+LDADD+=		-lx86_64
+.endif
 .if ${MACHINE} == "i386"
 CPPFLAGS+=	-DUSE_I386_IOPL
 LDADD+=		-li386
Index: x11/Xserver/hw/xfree86/xf86_os/Makefile
===================================================================
RCS file: /cvsroot/src/x11/Xserver/hw/xfree86/xf86_os/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- x11/Xserver/hw/xfree86/xf86_os/Makefile	2004/01/19 00:36:09	1.2
+++ x11/Xserver/hw/xfree86/xf86_os/Makefile	2004/01/21 12:55:23
@@ -23,6 +23,9 @@
 .if ${MACHINE} == "i386" || ${MACHINE} == "amd64"
 SRCS.bsd+=	i386_video.c stdResource.c lnx_agp.c ioperm_noop.c
 .for _FN in ${SRCS.bsd}
+.if ${MACHINE} == "amd64"
+CPPFLAGS.${_FN}+=	-DHAS_MTRR_BUILTIN -DUSE_I386_IOPL 
+.endif
 .if ${MACHINE} == "i386"
 CPPFLAGS.${_FN}+=	-DPCCONS_SUPPORT -DPCVT_SUPPORT -DHAS_APERTURE_DRV \
 			-DHAS_MTRR_BUILTIN -DUSE_I386_IOPL 

--WIyZ46R2i8wDzkSu--