From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 7089 invoked from network); 17 Mar 2000 14:44:29 -0000 Received: from mail.redhat.com (199.183.24.239) by lists.redhat.com with SMTP; 17 Mar 2000 14:44:29 -0000 Received: from pc12.civ.hw.ac.uk (root@pc12.civ.hw.ac.uk [137.195.49.67]) by mail.redhat.com (8.8.7/8.8.7) with ESMTP id JAA10409 for ; Fri, 17 Mar 2000 09:44:28 -0500 Received: from civ.hw.ac.uk (IDENT:civhr@localhost.localdomain [127.0.0.1]) by pc12.civ.hw.ac.uk (8.9.3/8.9.3) with ESMTP id OAA01259 for ; Fri, 17 Mar 2000 14:44:26 GMT Sender: civhr@pc12.civ.hw.ac.uk Message-ID: <38D244CA.DCBE1D26@civ.hw.ac.uk> Date: Fri, 17 Mar 2000 14:44:26 +0000 From: Hannes Reinecke Organization: Heriot Watt University, Edinburgh X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.3.51 i586) X-Accept-Language: en MIME-Version: 1.0 To: AXP Developers list Subject: Re: FIX: Permedia 2 driver XFree-4.0 References: <38D2429C.3CA5F950@hw.ac.uk> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jay Estabrook wrote: [..] > > Actually, this change appeared together with some others, and the > total of them is quite subtle. > > First off, IIRC, he's running on an EV56 machine and prolly an > LX/SX with PYXIS. > Indeed. Michel forgot to forward my entire mail, where it explicitely states that this is a gross hack and _NOT_ to be used as a real patch. > Thus, the changes effectively do: > > 1. make the server treat *all* machines as ones with NO "sparse" space, > and therefore use byte/word instructions where needed to access bus > I/O and memory space > 2. make BUS_BASE on a PYXIS machine address the byte/word "dense" area, > thus making the byte/word instructions from (1) do what they should. > > Pretty slick... :-) (Whee, I did it correctly !) > > > And now you can't run the same binary on a different machine. > > This it VERY true.. > Indeed. But then again, this was not meant to. > The REAL problem that was initially encountered is caused by not > mapping enough of the SPARSE bus space; you only need to change the > size of the area mapped to SPARSE space in: > > xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_video.c > > ie use the code: > > lnxSBase = mmap((caddr_t)0, 0x400000000, /* yes, 16GB!!! */ > PROT_READ | PROT_WRITE, > MAP_SHARED, fd, > (off_t) _bus_base_sparse()); > > Then it should oughta just work, AND be portable, though it will use > an inordinate amount of pagetable space (ie it is mapping 20GB of the > user's virtual address space to the PCI bus SPARSE and DENSE areas). > Well, but this was not my intention. The main intention was that we should be using Byte/Word access on machines which support it. Unfortunately the information given by libc via _bus_base is misleading, since on a PYXIS _bus_base points to the dense memory area (which is completely useless) and not to the beginning of the byte/word I/O area, as it should be. Hmm, the above fix: does it work on all older machines ? Ie can they all mmap() this area ? If so, we can just go ahead and use your patch, if not, well, than I fear we have to hardcode the memory regions for every single machine. Cheers, Hannes -- Hannes Reinecke 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