Subject: Re: XFree86 4.5.0 woes
To: Matthias Scheler <>
From: Michael <>
List: tech-x11
Date: 03/19/2005 11:51:28
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 7bit


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

Content-Type: application/pgp-signature

Version: GnuPG v1.4.0 (NetBSD)