Subject: X on PCI machines
To: None <port-alpha@netbsd.org>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: port-alpha
Date: 04/15/2002 23:39:40
--ReaqsoxgOBHFXBhH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hiya Folks,

in followup to the TGA thread i'm having difficulty with getting X to 
work/compile on my PCI based DEC PWS 500au machine....

XF3 will compile but it wont start XalphaNetBSD for its prolly for TC's 
only ... or is that TGA a PCI one ? or what ... i am a bit puzzled by this 
TGA thingy...

The machine has an Elsa GLoria Synergy PCI card as shipped ... Its 
supported in XFree86 but i cant get it to work yet...

I know someone (Simon?) was working on trying to get PCI devices to work in
XFree86 for i _had_ a working X server ... I've tried compiling XF4 but it
i get a lot of linking and undefined var's... were the patches lost when XF
4.2 was imported or so?

Attached are the patches that are minimally needed to get a linked but not 
working X server... haven't had the time to further investigate though ...

Hope we can get X up and running before the 1.6 release goes out .. FreeBSD 
and OpenBSD seem to _do_ work :-/ .... NetBSD is way behind on this.

Maybe also a good point is to split off NetBSD stuff from the 
os-support/bsd ? its getting a real #ifdef forrest now that doesnt help 
much at all.

Cheers,
Reinoud

--ReaqsoxgOBHFXBhH
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=xsrc-diffs

Index: programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h,v
retrieving revision 1.1.1.4
diff -u -p -r1.1.1.4 xf86_OSlib.h
--- programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h	2002/01/19 15:11:57	1.1.1.4
+++ programs/Xserver/hw/xfree86/os-support/xf86_OSlib.h	2002/04/15 20:08:35
@@ -525,6 +525,7 @@ extern int errno;
 #  endif /* __bsdi__ */
 # endif /* !LINKKIT */
 
+# include <sys/param.h>
 # include <sys/types.h>
 # include <sys/mman.h>
 # include <sys/stat.h>
Index: programs/Xserver/hw/xfree86/os-support/bsd/bsd_axp.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_axp.c,v
retrieving revision 1.1.1.2
diff -u -p -r1.1.1.2 bsd_axp.c
--- programs/Xserver/hw/xfree86/os-support/bsd/bsd_axp.c	2001/06/09 15:08:13	1.1.1.2
+++ programs/Xserver/hw/xfree86/os-support/bsd/bsd_axp.c	2002/04/15 20:08:35
@@ -7,6 +7,7 @@
 #include "xf86Axp.h"
 #include "xf86_OSlib.h"
 #include <stdio.h>
+#include <sys/param.h>
 #include <sys/sysctl.h>
 
 axpDevice bsdGetAXP(void);
Index: programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c
===================================================================
RCS file: /cvsroot/xsrc/xfree/xc/programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c,v
retrieving revision 1.8
diff -u -p -r1.8 bsd_video.c
--- programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c	2002/01/19 23:19:35	1.8
+++ programs/Xserver/hw/xfree86/os-support/bsd/bsd_video.c	2002/04/15 20:08:43
@@ -135,15 +135,21 @@ struct memAccess ioMemInfo = { CONSOLE_G
 #endif
 
 #ifdef __alpha__
-#ifdef __FreeBSD__
-extern unsigned long dense_base(void);
 
 static int axpSystem = -1;
 static unsigned long hae_thresh;
 static unsigned long hae_mask;
-static unsigned long bus_base;
 static unsigned long sparse_size;
 
+#ifdef __NetBSD__
+static unsigned long dense_base(void);
+extern axpDevice bsdGetAXP(void);
+#endif
+
+#ifdef __FreeBSD__
+extern unsigned long dense_base(void);
+static unsigned long bus_base;
+
 static unsigned long
 memory_base(void)
 {
@@ -380,6 +386,10 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
 	    pVidMem->mapMem = mapVidMem;
 	    pVidMem->unmapMem = unmapVidMem;
 	} else {
+#if defined(__NetBSD__)
+fprintf(stderr, "HELP! Machine needs sparce mapping ... not implemented yet\n");
+		xf86ErrorF("HELP! Machine needs sparce mapping ... not implemented yet\n");
+#else
 	    xf86Msg(X_INFO,"Machine needs sparse mapping\n");
 	    pVidMem->mapMem = mapVidMemSparse;
 	    pVidMem->unmapMem = unmapVidMemSparse;
@@ -388,6 +398,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
 	    hae_thresh = xf86AXPParams[axpSystem].hae_thresh;
             hae_mask = xf86AXPParams[axpSystem].hae_mask;
             sparse_size = xf86AXPParams[axpSystem].size;
+#endif
 	}
 #elif defined(__arm32__)
 	pVidMem->mapMem = armMapVidMem;

--ReaqsoxgOBHFXBhH--