[Open-graphics] From PCI to VGA registers

Timothy Normand Miller theosib at gmail.com
Thu Aug 30 08:40:08 EDT 2007


On 8/29/07, Fredrik Tolf <fredrik at dolda2000.com> wrote:

> > Thanks for the tips, both of you! If have actually already ordered the
> > book that Timothy linked to.
>
> The book arrived today, and I now understand a *lot* more about PCI than
> I did previously. Thanks again!

Sweet!  Now we can apply some more eyes to our PCI controller design.

>
> This might not be the place for these things, but if you don't mind
> spending a little time on me, there's still something I don't quite
> understand in relation to VGA legacy address decoding. Namely, how does
> the system select which card is supposed to do legacy decode?

This is definitely the right place.  We need VGA emulation.

If there's a standard way to enable/disable VGA legacy decode, I don't
know about it.  I've seen cards with a physical jumper.  But what I
think is more common is that VGA is enabled in a device-specific way
by the VGA BIOS code.  The system BIOS finds the first VGA-capable
card and runs its BIOS code, and that code will switch on the decode
in our device.

>
> Since it is usually selectable in the system BIOS UI which card should
> be initialized as _the_ VGA card in the presence of multiple
> VGA-compatible cards, there has to be some standardized way of enabling
> legacy decode on a card, right?

Possibly, but a lot of "standard" things are only standardized by the
fact that there's a hook provided by the peripheral's firmware.

> I just can't find what that way is. My
> naive guess is that it might be that the system BIOS only calls the VGA
> BIOS code for the selected card, and it sets up legacy decode in a
> card-specific way, but I can just find no way to confirm that, and I've
> been googling for quite some time now.

Time to disassemble someone's BIOS code and find out?  :)

Note that anyone who does that needs to be careful about how they
contribute to developing a new BIOS, because we don't want to be
accused of stealing code.

-- 
Timothy Normand Miller
http://www.cse.ohio-state.edu/~millerti
Open Graphics Project


More information about the Open-graphics mailing list