[SeaBIOS] [PATCH] Seabios - read e820 reserve from qemu_cfg

Kevin O'Connor kevin at koconnor.net
Tue Jan 26 01:24:47 CET 2010

On Mon, Jan 25, 2010 at 05:46:42PM +0100, Jes Sorensen wrote:
> Hi,
> Right now KVM/QEMU relies on hard coded values in Seabios for the
> reserved area for the TSS pages and the EPT page.
> I'd like to suggest we change this to pass the value from QEMU via
> qemu-cfg making it possible to move it around dynamically in the future.
> Attached is a patch to Seabios for this, which defaults to the current
> hard coded value if no value is provided by qemu-cfg. We can remove
> the backwards compatibility later.
> I'll post the QEMU patches for upstream QEMU and QEMU-KVM in a minute.
> Comments most welcome!

I like the idea, but I think it would be better to pass a list of e820
entries explicitly.  That is, pass an array of:

struct e820entry {
    u64 start;
    u64 size;
    u32 type;

where 'type' uses the standard e820 definitions.  That way, SeaBIOS
can just walk through the list and add them to its e820 map.  BTW,
this is what SeaBIOS does when running under coreboot (coreboot passes
a memory map as part of the "coreboot tables").  SeaBIOS is already
smart enough to not use any high memory addresses marked as reserved.


More information about the SeaBIOS mailing list