Subject: Re: trouble compiling a working xserver for prep
To: Tim Rightnour <firstname.lastname@example.org>
From: Michael <email@example.com>
Date: 04/20/2006 00:48:35
Content-Type: text/plain; charset=US-ASCII
> On 18-Apr-2006 Michael wrote:
> > these contain
> > machine-dependent code to access the PCI bus, mmap() video RAM and
> > registers and so on. You might want to define a 'magic area' to
> > access IO space as well, like macppc and arm do.
> Do you know where the MD code for this in the kernel is?
this is handled by the display driver's mmap() method.
> I've dug around a bit in macppc, but it's not popping out at me. I
> need to do the same thing for prep that macppc does for IO, I'm just
> not sure what macppc does.
see sys/arch/macppc/dev/ofb* and sys/dev/pci/voodoofb* for
essentially the same example. Both allow mmap()ing the IO range
belonging to the PCI bus the driver attached to at offset 0xf2000000,
mainly because that's the physical address where you'd find the first
host bridge's IO range. Subsequent bridges would use 0xf4000000,
0xf6000000 etc. We redirect that to the correct IO range so the Xserver
doesn't have to know about that.
Hmm, the IO mapping in voodoofb needs to be #ifdef'ed because it doesn't
make much sense on for instance i386 and the offset is more or less
macppc-specific - I'll take care of that.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)
-----END PGP SIGNATURE-----