qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proper support for PCI-based option rom loading (was Re: [Qemu-devel


From: Anthony Liguori
Subject: Re: Proper support for PCI-based option rom loading (was Re: [Qemu-devel] Re: qdev property bug?)
Date: Tue, 15 Dec 2009 15:41:02 -0600
User-agent: Thunderbird 2.0.0.23 (X11/20090825)

Michael S. Tsirkin wrote:
On Tue, Dec 15, 2009 at 01:35:52PM -0600, Anthony Liguori wrote:
Gerd Hoffmann wrote:
-kernel didn't work on a quick test.
Thinking about how to fix this, we have two options.

Hmm, can you pls explain why it stops working?

Sure.  SeaBIOS loads roms in a few ways.

If CONFIG_OPTIONROMS_DEPLOYED, then SeaBIOS scans the 0xc0000..0xf0000 region for anything that looks like a rom. This is how Bochs did it and is what qemu supports. This is not how modern systems work though.

Modern systems (SeaBIOS with !CONFIG_OPTIONROMS_DEPLOYED), walk the PCI bus and look for any device with a PCI_ROM_ADDRESS that maps a valid option rom. It will map the rom in PCI memory and run it's init function. The rom can use PMM to allocate temporary memory to reorganize itself. During this time, the rom area is writable. The rom will create a stub that's usually pretty small that gets loaded by the BIOS after init into the 0xc0000..0xf0000 region.

So when !CONFIG_OPTIONROMS_DEPLOYED, SeaBIOS does look in this region for roms because it maps them all from the actual PCI devices.

SeaBIOS can also load roms from up to two fixed physical addresses (when !CONFIG_OPTIONROMS_DEPLOYED) or from a CBFS payload. BTW, I'm pretty sure this style of option rom loading (from a PCI device) is going to be required for device passthrough if we want to support running those roms in the guests. In fact, it should Just Work with my patches !CONFIG_OPTIONROMS_DEPLOYED in SeaBIOS.

Regards,

Anthony Liguori
cheers,
  Gerd

Will be a problem for non-PCI systems?

You mean, non-PCI x86 systems? I think -m isapc is mainly used for dos guests. I don't think it's really useful in combination with -kernel and certainly not for extboot.

Regards,

Anthony Liguori






reply via email to

[Prev in Thread] Current Thread [Next in Thread]