Subject: Re: trouble compiling a working xserver for prep
To: Tim Rightnour <root@garbled.net>
From: Michael <macallan18@earthlink.net>
List: tech-x11
Date: 04/20/2006 00:48:35
--Signature_Thu__20_Apr_2006_00_48_35_-0400_HXvnWIDhC8Dm+S7a
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

Hello,

> 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.
>=20
> 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.

have fun
Michael

--Signature_Thu__20_Apr_2006_00_48_35_-0400_HXvnWIDhC8Dm+S7a
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (NetBSD)

iQEVAwUBREcSqMpnzkX8Yg2nAQL+0AgArb7lzmGeGwo29sEYpHBMDoOZ0zHuplUZ
3c2GN1y0txV6k3qKfm10GA+b3Ewtg2d3oCNI9m9VtO4FOeRohjjJEK4L7K87vLZ/
GUU5kTiLjuMSPw56KghyFPtucerfisNqsTNi/vZsWYQTZqQqGw0QvNBALctTkx24
233n1sSXWhfIoFzRe+1fluJ5YLzlk75mGwtTd+9QaXnetBbHkmeGvnw0NjPSgFPL
c6iWq2+uOmecbRvJJi6wJLsrVxtm2vtq05fGUUVv97GbPs8Po2lsFXM06fWRXxsd
9FP97+eixM6lYK2x50Wci9j+iBv/OQ94Hfl3NkLkDcVFsoOI2MdZJQ==
=DIsS
-----END PGP SIGNATURE-----

--Signature_Thu__20_Apr_2006_00_48_35_-0400_HXvnWIDhC8Dm+S7a--