Axp-List Archive
Re: FIX: Permedia 2 driver XFree-4.0

Subject: Re: FIX: Permedia 2 driver XFree-4.0
From: Jay Estabrook (Jay.Estabrook@compaq.com)
Date: Thu Mar 16 18:15:13 2000


On Thu, Mar 16, 2000 at 04:47:08PM -0800, Richard Henderson wrote:
> On Thu, Mar 16, 2000 at 06:51:54AM -0500, Peter Petrakis wrote:
> > The patch below fixes my problem with the permedia 2 driver.
>
> > -# define BUS_BASE _bus_base()
> > +# define BUS_BASE (_bus_base() + 0x200000000)
>
> Um, that means you've got your video card in hose 1, not hose 0.

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.

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... :-)

> And now you can't run the same binary on a different machine.

This it VERY true..

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).

--Jay++

-----------------------------------------------------------------------------
Jay A Estabrook Alpha Engineering - LINUX Project
Compaq Computer Corp. - MRO1-2/K20 (508) 467-2080
200 Forest Street, Marlboro MA 01752 Jay.Estabrook@compaq.com
-----------------------------------------------------------------------------

-- 
To unsubscribe: send e-mail to axp-list-request@redhat.com with
'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com



This archive was generated by hypermail version 2a22 on Sat Apr 1 04:15:01 2000 PST
Send any problems or questions about this archive to webmaster@alphalinux.org.