On Tue, 2006-09-05 at 12:46 +0200, jf simon wrote:
Hi, I have read the excellent paper on FreeVGA http://www.linuxbios.org/data/vgabios/
and I am thinking on using it on a powerpc design we have made based on IBM 970fx ppc64 CPU (after it runs linuxbios of course, but I am trying to plan ahead and see what is needed to have PCI graphic cards running on it). I have looked at the x86emu code, and more precisely to the X86EMU_pioFuncs function which is in charge of I/O accesses whenever the VGA BIOS makes an x86 int/out instruction to some I/O port (for example to the range of VGA control registers in the 0x3XX region). The graphic I intend to use is an ATI Radeon RV100 PCI card. So it looks like I will have to program the X86EMU_pioFuncs with a function that will redirect I/O accesses from the low 0x3XX addresses, to the ATI PCI I/O region that contains VGA registers. Here is an excerpt of an "lspci -vv" on my graphic card (see below). I am planning to re-direct all these I/O accesses to the region 1 (I/O ports at f4015000). The VGA registers have to be in there...where else? So it shouldn't be too hard. Am I overlooking things? The FreeVGA paper said he should be rather complicated to do on powerpc....so i may be to optimistic
Those legacy IO ports are NOT necessary mapped to the PCI IO address. Some VGA card does and some others come with some kind of remapping or offset. Your system chipset should have a way to map legacy VGA IO ports to memory address. You have to read the doc to the PPC chipset carefully to find it out.
Ollie