Gerd Hoffmann wrote:
On 12/15/09 23:51, Sebastian Herbszt wrote:
Qemu will map rom1.bin to PC_ROM_MIN_OPTION (0xc8000) and map rom2.bin
to 0xd0000.

No.

rom1.bin will be loaded to max(0xc8000, 0xc0000 + cirrus-bios-size)
aligned to 2k, which (with cirrus) is 0xc90000.

My bad - for some reason i assumed the vga bios has to be 32k max.

rom2.bin will be loaded after rom1.bin (also 2k aligned), so the address will depend on rom1.bin size.

Either qemu will map vga bios to PC_ROM_MIN_VGA (0xc0000) or
SeaBIOS will map it there (with pci 3.0 it could map it somewhere else,
but i doubt thats
a good idea). In case the vga bios size is below 0x8000, some rom space
is lost.

Because it is larger than 0x8000 option roms will be overwritten when loaded to 0xc8000

SeaBIOS
will scan the option rom space starting at PC_ROM_MIN_OPTION and adjust
its RomEnd in
case a rom is found. Then it will start the pci scan and map pci option
roms after RomEnd.

Doesn't fly.

I think either qemu or seabios should load *all* roms. I think the idea to provide non-pci roms via fw_cfg and let seabios load them is the best idea we had so far.

I don't think that is what happens on real hardware with ISA cards which have 
an option rom.
Therefore i suggest inverting some of my suggestion from above and put the qemu 
loaded roms
not at the beginning of the option rom space, but starting at the end of it, 
e.g. rom1.bin below 0xe0000
and rom2.bin below rom1.bin (considering rom length and alignment). SeaBIOS 
could then locate
those roms and setup it's "RomEnd" (max. pci rom loading address) according to 
it.

- Sebastian



Reply via email to