Subject: Re: XFree86 and macppc
To: Valeriy E. Ushakov <uwe@ptc.spbu.ru>
From: Michael <macallan18@earthlink.net>
List: tech-x11
Date: 12/06/2004 10:44:51
Hello,

> I'm admittedly, not very clued in vga programming, but if the card
> provides memory mapped i/o access it should be possible, I think, to
> just map the registers via memory space and pass that as a bus space
> handle.
The problem is that the legacy registers and framebuffer don't have corresponding BARs and need to be enabled somewhere else which is vendor specific. Some cards ( like the Voodoo3 ) mirror the legacy registers in their register block, but at least Radeons apparently don't do that, so a really hardware independent VGA driver would need a quirk list to tell it how to enable legacy registers on different PCI VGAs, usually it's one or two bits in some register.

>  Doing this for netwinder is on my todo list, so that plain
> text mode vga(4) can be used instead of igsfb(4).  (I don't think vga
> in netwinder is even accessible via i/o space, but nettrom (firmware)
> and linux use it text mode).
I guess the Linux people have hardware-specific framebuffer drivers. If the graphics chip is a stock VGAish part then it should be able to decode the legacy stuff if told to, maybe the firmware just doesn't enable IO access, but it should be there.

> But I'm not sure how well would it work for macppc, where different
> models have different cards.  Still may be a handy option for the
> models that can do it.
All NewWorld Macs come with PCish Rage, Radeon or GeForce graphics, so VGA stuff should just work. Older PCI Macs tend to have proprietary graphics hardware which isn't VGA compatible, although those without onboard graphics ( like the PM9x00 and clones like the S900 ) are pretty likely to have something VGAish, I'm not sure if Apple ever made PCI graphics boards with their own non-VGA chips. Accessing the legacy framebuffer could be problematic on Macs, if I remember correctly the PCI host bridge won't allow anything memory mapped with a physical address <0x80000000, but I may be wrong there.

have fun
Michael