[SeaBIOS] Proper support for PCI-based option rom loading (was Re: [Qemu-devel] Re: qdev property bug?)

Gerd Hoffmann kraxel at redhat.com
Wed Dec 16 17:22:41 CET 2009

> Right now, qemu cfg uses two ports - a file select port (0x510) and a
> data port (0x511).  Perhaps two new ports could be added - a file name
> port (0x0512) and a file length port (0x513).
> Basically, if there is some way for SeaBIOS to walk a list of "files"
> in the "qemu cfg" space, then it should be straight forward to enhance
> the existing code in seabios to extract and deploy roms in addition to
> those found in the PCI bar.

What information does seabios need?

It probably needs to know whenever the rom in question is the vga bios 
or an option rom.

It probably also wants to get the vga bios first I assume?

Is a (file) name needed?

Would seabios load the option roms one by one or all in one go?

I'd tend to have one fw_cfg entry which returns structed data, like this:

struct fw_files {
   u32 filecount;
   struct fw_file {
     u32  type;        /* vga, option, other? */
     u32  size;        /* file size */
     u32  select;      /* write this to 0x510 to read it */
     u32  reserved;    /* you never know ;) */
     char name[16];    /* maybe: filename */

What do you think?


More information about the SeaBIOS mailing list