Re: [edk2] Xen OVMF early discussions

Subject: Re: [edk2] Xen OVMF early discussions

From: Bei Guan <gbtju85@gmail.com>

To: Jordan Justen <jljusten@gmail.com>

Date: 2011-04-28 17:39:58



2011/4/28 Jordan Justen <jljusten@gmail.com>
On Wed, Apr 27, 2011 at 17:00, Andrei Warkentin <andreiw@motorola.com> wrote:
> On Wed, Apr 27, 2011 at 6:37 PM, Andrei Warkentin <andreiw@motorola.com> wrote:
>>
>> Youch.... so the xenbus shared page lives at 0xfffff000... this is
>> causing all sorts of crazy stuff.
>>
>> Looks like xc_hvm_build.c needs to be modified after all...
>>
>
> Tim, can XENMEM_add_to_physmap be used to move foreign_map'ed pages?
> Maybe we can move all the special pages from inside the HVM loader to
> someplace safe (below UEFI firmware image sounds good)...

KVM reserves 16MB just below 4GB for firmware. See target-i386/kvm.c
and search for IDENTITY.
Hvmloader also reserves 16MB below 4GB for firmware. The code is in tools/firmware/hvmloader/config.h.

/* We reserve 16MB for special BIOS mappings, etc. */
#define RESERVED_MEMBASE 0xfc000000
#define RESERVED_MEMSIZE 0x01000000

Themem_alloc()(in util.c) allocates physical address for firmware from reserved area. I just use mem_alloc() allocate memory for OVMF(as the "xl dm" shown, 0xfc000000 - 0xfc100000), but I don't know how to move it to 0xfff00000 - 0x100000000.

Bei Guan

-Jordan