Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Jay Estabrook <Jay.Estabrook@compaq.com>
To: axp-list@redhat.com
Subject: Re: FIX: Permedia 2 driver XFree-4.0
Date: Thu, 16 Mar 2000 21:15:13 -0500	[thread overview]
Message-ID: <20000316211513.A2207@linux04.mro.dec.com> (raw)
In-Reply-To: <20000316164708.A1423@twiddle.net>

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


  reply	other threads:[~2000-03-17  2:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-17  0:47 FIX: Permedia 2 driver XFree-4.0 Richard Henderson
2000-03-17  2:15 ` Jay Estabrook [this message]
     [not found] <38D2429C.3CA5F950@hw.ac.uk>
2000-03-17 14:44 ` Hannes Reinecke
2000-03-17 16:40   ` Jay Estabrook
2000-03-17 17:06     ` Hannes Reinecke
2000-03-17 20:23       ` Jay Estabrook
2000-03-17 20:31         ` Brian Pomerantz
2000-03-17 22:12         ` Richard Henderson
2000-03-17 21:53   ` Richard Henderson
  -- strict thread matches above, loose matches on Subject: below --
2000-03-16 11:51 Peter Petrakis
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