From: Hannes Reinecke <civhr@civ.hw.ac.uk>
To: axp-list@redhat.com
Subject: Re: XFree86 4.0
Date: Tue, 18 Apr 2000 10:42:30 +0100 [thread overview]
Message-ID: <38FC2E06.8CB49810@civ.hw.ac.uk> (raw)
In-Reply-To: 38D24644.B5B3747F@civ.hw.ac.uk
[-- Attachment #1: Type: text/plain, Size: 915 bytes --]
Hiya,
> I have problem whith XFree86 4.0 on my PWS433a debian 2.2 kernel 2.2.14
> whith a Matrox Millenium II 4MB.
>
> When i start XFree86 the computer reboots :(
Oh well, we know that one. It most likely due to incorrect setting of
the MMIO-areas for pyxis chipsets. Try the attached patch.
Unfortunately it didn't make it into the distribution because a) its
quite ugly and b) Egbert couldn't agree with himself about the framework
for handling these cases.
(This is not to slight you, Egbert. I'll be happy to help in any way.)
(Once I got a new HD. 'scsi error: Medium Error; additional sense: Scan
head positioning error'. Grrr.)
Cheers,
Hannes
--
Hannes Reinecke <civhr@civ.hw.ac.uk>
Fluid Loading and Instrumentation Center Tel: (+44) 131 449 5111 x4430
Dept. of Civil & Offshore Engineering Fax: (+44) 131 451 3154
Heriot Watt University, Edinburgh EH14 4AS
[-- Attachment #2: xfree.diff --]
[-- Type: text/plain, Size: 3773 bytes --]
diff -u xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c.orig xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c
--- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c.orig Sat Feb 26 05:43:53 2000
+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c Thu Mar 16 23:28:15 2000
@@ -66,9 +66,8 @@
# define isJensen (!_bus_base())
# endif
-# define needSparse (_bus_base_sparse() != 0)
-
-# define BUS_BASE _bus_base()
+static unsigned long xf86_axp_IOBase;
+# define BUS_BASE xf86_axp_IOBase
#else
@@ -83,6 +82,7 @@
static pointer mapVidMem(int, unsigned long, unsigned long);
static void unmapVidMem(int, pointer, unsigned long);
#if defined (__alpha__)
+static int checkSparseVidMemBase( void );
static pointer mapVidMemSparse(int, unsigned long, unsigned long);
static void unmapVidMemSparse(int, pointer, unsigned long);
# if defined(JENSEN_SUPPORT)
@@ -298,15 +298,15 @@
if (isJensen) {
# ifndef JENSEN_SUPPORT
FatalError("Jensen is not supported any more\n"
- "If you are interesetd in fixing Jensen support\n"
+ "If you are interested in fixing Jensen support\n"
"please contact xfree86@xfree86.org\n");
# else
xf86Msg(X_INFO,"Machine type is Jensen\n");
pVidMem->mapMem = mapVidMemJensen;
pVidMem->unmapMem = unmapVidMemJensen;
# endif /* JENSEN_SUPPORT */
- } else if (needSparse) {
- xf86Msg(X_INFO,"Machine needs sparse mapping\n");
+ } else if (checkSparseVidMemBase()) {
+ xf86Msg(X_INFO,"Machine needs sparse mapping\n");
pVidMem->mapMem = mapVidMemSparse;
pVidMem->unmapMem = unmapVidMemSparse;
} else {
@@ -508,6 +508,82 @@
writeSparse16(int Value, pointer Base, register unsigned long Offset);
static void
writeSparse32(int Value, pointer Base, register unsigned long Offset);
+
+static int checkSparseVidMemBase( void )
+{
+ char buf[256];
+ char cpu_model[64];
+ char sys_type[64];
+ char sys_var[64];
+ FILE *info_fptr;
+ int has_bwx = 1;
+ int can_bwa = 1;
+
+ if (_bus_base_sparse()) {
+ /* Open /proc/cpuinfo to find out about where we are running on */
+ info_fptr = fopen("/proc/cpuinfo","r");
+ if (!info_fptr) {
+ xf86Msg(X_WARNING,
+ "Could not open /proc/cpuinfo, falling back to default\n");
+ xf86_axp_IOBase = _bus_base_sparse();
+ return 1;
+ }
+
+ *cpu_model = '\0';
+ *sys_type = '\0';
+ *sys_var = '\0';
+
+ while (!feof(info_fptr)) {
+ fgets(buf,255,info_fptr);
+ if (sscanf(buf,"cpu model : %s ",cpu_model) == 1) {
+ if (!strcmp(cpu_model,"EV3") ||
+ !strcmp(cpu_model,"EV4") ||
+ !strcmp(cpu_model,"Simulate") ||
+ !strcmp(cpu_model,"LCA4") ||
+ !strcmp(cpu_model,"EV5") ||
+ !strcmp(cpu_model,"EV45") ) {
+ has_bwx = 0;
+ }
+ }
+ if (sscanf(buf,"system type : %s ",sys_type) == 1) {
+ if (strcmp(sys_type, "EB164")) {
+ can_bwa = 0;
+ } else {
+ can_bwa = 1;
+ }
+ }
+ if (sscanf(buf,"system variation : %s ",sys_var) == 1) {
+ if (!strcmp(sys_var,"EB164") ||
+ !strcmp(sys_var,"PC164") ) {
+ can_bwa = 0;
+ }
+ }
+ }
+ fclose(info_fptr);
+
+ xf86Msg(X_INFO,"Alpha %s cpu on a %s (variation %s)\n",
+ cpu_model, sys_type,
+ *sys_var?sys_var:"default");
+
+ if (!has_bwx) {
+ xf86Msg(X_INFO,"CPU does not support BWX extension\n");
+ xf86_axp_IOBase = _bus_base_sparse();
+ return 1;
+ }
+
+ if (!can_bwa) {
+ xf86Msg(X_INFO,
+ "System does not support 21164 Byte/Word addressing\n");
+ xf86_axp_IOBase = _bus_base_sparse();
+ return 1;
+ }
+ xf86_axp_IOBase = _bus_base() + 0x200000000;
+ return 0;
+ } else {
+ xf86_axp_IOBase = _bus_base();
+ return 0;
+ }
+}
static pointer
mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size)
next prev parent reply other threads:[~2000-04-18 9:42 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <38D24644.B5B3747F@civ.hw.ac.uk>
2000-03-17 14:54 ` FIX #2: XF-4.0 doesn't like my Permedia 2 Hannes Reinecke
2000-03-17 18:43 ` Richard Henderson
2000-03-18 2:34 ` Richard Henderson
2000-04-18 9:42 ` Hannes Reinecke [this message]
2000-06-26 14:18 XFree86 4.0 Olle Hansson
2000-06-27 0:09 ` Peter Petrakis
2000-06-27 9:40 ` Hannes Reinecke
-- strict thread matches above, loose matches on Subject: below --
2000-05-11 16:57 olle.hansson
2000-05-15 16:02 ` civhr
2000-05-15 18:33 ` Jamesvi
2000-04-17 17:58 olle.hansson
2000-04-18 0:36 ` Brian Pomerantz
2000-04-18 11:48 ` Hannes Reinecke
2000-04-18 16:21 ` Peter Rival
2000-04-18 21:30 ` Brian Pomerantz
2000-03-10 21:19 GReg meno
2000-03-10 21:17 Hoover, Tony
2000-03-10 18:31 Champigny, Michael
2000-03-10 16:38 Champigny, Michael
2000-03-10 17:41 ` Charles E. Taylor IV
2000-03-11 16:13 ` Peter Petrakis
2000-03-10 18:21 ` M. Eric Christy
2000-03-10 18:54 ` Frasnelli, Dan
2000-03-10 20:51 ` M. Eric Christy
2000-03-10 21:04 ` Frasnelli, Dan
2000-03-10 22:40 ` Andrei A. Dergatchev
2000-03-11 4:04 ` W Bauske
2000-03-11 4:23 ` Andrei A. Dergatchev
2000-03-11 6:17 ` W Bauske
2000-03-11 4:36 ` Jeff DeMaagd
2000-03-11 6:40 ` W Bauske
2000-03-13 16:59 ` Michael Huntingdon
2000-03-13 18:09 ` Mark Arrasmith
2000-03-10 16:01 Vanco, Donald
2000-03-10 15:03 help? Fan, Tony
2000-03-10 15:33 ` XFree86 4.0 J. Pedro Sousa do Amaral
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox