[Open-graphics] From PCI to VGA registers
"Ing. Daniel Rozsnyó"
daniel at rozsnyo.com
Thu Aug 9 10:52:02 EDT 2007
>> a) How do plain VGA registers (lots of documentation talks about
>> things like address 3B4h) get 'mapped' to the correct PCI device? Is
>> address 3B4h in C/BE#'s 'I/O Space', 'Memory Space', or some added
>> fields to the configuration space?
>
> 3B4h is in I/O space. And it's not in a BAR-mapped space. When our
> PCI controller sees that address (and we've enabled VGA), it decodes a
> limited range of "legacy" I/O space addresses. These are the only I/O
> space addresses we support. All others are memory space.
>
> Since these legacy addresses are not allocated to a particular device,
> there are certainly concerns in a PC system about more than one device
> attempting to accept them. I think the correct thing to do is have
> the first VGA device figure out that it was initialized first (there's
> a certain order in which a PC BIOS initializes devices, with the
> console gfx card being very early) and be the only one to enable the
> decode. (Enabling the decode would be device-dependent, I would
> imagine.)
The MB's BIOS initializes only one of the graphic cards. As far as I
remember, the secondary card's boot message appeared only at the time
when X was started in dualhead mode.
Which one is being initialized at boot depends on bios settings, usually
you have a choice to init PCIe or PCI card first.
Result: we don't need to handle sharing of cards in any way. Reset =
turn off everything and if the bios is run, then initialize the card.
Question is how to detect which card's bios is being executed in case
you have 2 cards on same bus :)
More information about the Open-graphics
mailing list