Subject: Re: XFree86 4.5.0 woes
To: Matthias Scheler <tron@zhadum.de>
From: Michael <macallan18@earthlink.net>
List: tech-x11
Date: 03/19/2005 11:51:28
--Signature=_Sat__19_Mar_2005_11_51_28_-0500_6/XgfpZY5SPMPusu
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit

Hello,

> 	Michael <macallan18@earthlink.net> writes:
> > I did more or less the same on macppc ( some fiddling with host.def,
> 
> Was that necessary to get it to build? Or was it just about customization?
I'm still trying to figure that out. I'm pretty sure it omitted -pthread though. This will take a while, my box is only a 300MHz G3.

> > The only thing I changed was my I/O permissions patch to get the
> > voodoo3 working.
> What does that patch do? And should it be in the official source tree?
Longer story. There's no (easy) way to access PCI IO space from userland on macppc, mainly because there can be more than one PCI host bridge and each maps its IO space somewhere else. Most XFree drivers can work using only memory-mapped IO but some can't - tdfx is one of these. So I added a few lines to macppc's console driver to map the first 64KB of the corresponding IO space when a client tries to mmap 0xf0000000, and added a NetBSD/ppc specific xf86EnableIO() function to map just that and store a pointer to it in ioBase. That's enough to tell XFree to use memory-mapped IO through this and it allows my Voodoo3 to work without any other code change. This approach has several drawbacks though:
- only root should be able to mmap() the IO space, I'm not sure how to enforce this though
- it produces lots of funny problems with multiple graphics boards when they're not accessed through the same PCI host bridge because the driver for the 2nd board won't find its registers. This wouldn't be a problem if XFree would open a device for each graphics card instead of trying to access everything through ttyE0 or if the 2nd one doesn't need IO access.

> > The only problem was that it doesn't seem to include -pthread in
> > linker flags, at least on macppc, but that's probably fixed by now.
> 
> No, it isn't. Could you please submit a bug report with "send-pr" and
> describe the problem precisely?
Ok... when I'm sure I didn't cause it myself somehow. Did anyone else try to build it on macppc yet?

have fun
Michael

--Signature=_Sat__19_Mar_2005_11_51_28_-0500_6/XgfpZY5SPMPusu
Content-Type: application/pgp-signature

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

iQEVAwUBQjxYkMpnzkX8Yg2nAQIgeAf/Wbmtgv8iCZmRN6+TMrNiy3f8UWVRXlEm
bx/32ld807AsVcQVAqd64BYdmzTU2aJj4W4dAoKEDg81GUstzfTQBHrGgAxhg1sT
k8dlScWlJxwU0AdOReyRIN0k4tpyCjNqEp4tlg230v4r3fSu/tI/+h0xc8OzeTA6
tOOTEK/uHz1L+Q07F20xHfB1lRntMjwP5UrA0A+/bhZxHaB4M8uVEcJ/koCAWiZg
H+WwxaLnzUoLA/imgwCPcOJ12UZ3XZ3o7BdZW9w9Y7RFar7Ybek5ZgpRtj02xnAA
pIxh1znYgzr+5vcXat7ZI0C9ly5mmKVFqLKZJNJh2SSGK9oP1/Pttw==
=BraK
-----END PGP SIGNATURE-----

--Signature=_Sat__19_Mar_2005_11_51_28_-0500_6/XgfpZY5SPMPusu--