WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] [PATCH 1 of 3] Enable UEFI BIOS(OVMF) support in Xen-uns

To: Keir Fraser <keir@xxxxxxx>
Subject: Re: [Xen-devel] [PATCH 1 of 3] Enable UEFI BIOS(OVMF) support in Xen-unstable HVM
From: Bei Guan <gbtju85@xxxxxxxxx>
Date: Sat, 23 Jul 2011 23:18:40 +0800
Cc: edk2-devel@xxxxxxxxxxxxxxxxxxxxx, Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, Jordan Justen <jljusten@xxxxxxxxx>, Tim Deegan <Tim.Deegan@xxxxxxxxxx>, Andrei Warkentin <andreiw@xxxxxxxxxxxx>
Delivery-date: Sat, 23 Jul 2011 08:19:30 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=VAperjziyVN11OCJOyILO3jMElo6UXeUWgcsACSeZzQ=; b=kukLfr8j9dcxuFIPdOmjkWXJwAd5cUC0I5qInko1ZBuCNZJOrv4lSvcLwG/moyipUO KmCdNms39WH4uiioIDBQR5/qGBgaICgmj6FoVl7cvk0YqhbclkywxVoj3rG1LaMN2Qgu nM7GAJHWQk1Kd0QNibFLB6gNxznqFwznipg4A=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <CA504DBD.2FAE2%keir@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CA502E8E.1E715%keir.xen@xxxxxxxxx> <CA504DBD.2FAE2%keir@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Keir,

Thank you for your comments.


2011/7/23 Keir Fraser <keir@xxxxxxx>
On 23/07/2011 07:53, "Keir Fraser" <keir.xen@xxxxxxxxx> wrote:

> On 22/07/2011 19:38, "Andrei Warkentin" <andreiw@xxxxxxxxxxxx> wrote:
>
>> On Fri, Jul 22, 2011 at 11:38 AM, Keir Fraser <keir.xen@xxxxxxxxx> wrote:
>>
>>> Looks pretty decent. I wonder why you need to change get_shared_info() --
>>> the existing mapping location is unused at the time hvmloader runs, and you
>>> instead map it over the top of a page of RAM. If you want shared_info mapped
>>> elsewhere, you can map it wherever you like as soon as your BIOS payload
>>> takes over.
>>>
>>
>> The problem is that this page lies in an unsafe for OVMF area (right
>> below 4GB). In a typical PC environment,
>> you have the firmware ROM decoding the physical address space right
>> below 4GB, and it also has a chunk (~64-128k) shadowed below 1MB for
>> legacy reasons. The EFI firmware bootstrap code is written with the
>> assumption that it can transfer control to code < 4GB that will
>> finalize the 16->PM-(>LM if 64) transitions and call C code. The
>> get_shared_info page overlaps code we copy up below 4GB. This is why
>> it was moved to a safer region.
>
> Okay, we can work with this easily enough.

I've applied the util.c changes, or equivalent, to xen-unstable.

Further comments on the rest of the hvmloader patch:

The added pci_load hook should be removed or used.
Ok, I  have removed this hook.


The printk change on non-detection of a VGA adapter should be removed and
proposed as a standalone fix if it makes sense.
I also removed this change. 


The bios_load hook is fine, but should replace the ugly bios_relocate hook
that was previously hacked in at around the same place. This will simply
involve rombios loading both low and high portions of itself, which is
really cleaner than what happens currently. This avoids adding yet another
hook.
Do you mean that put the bios_relocate hook in the "else" statement? Just like this:

    if (bios->load) {
        bios->load(bios);
    } else {
        printf("Loading %s ...\n", bios->name);
        memcpy((void *)bios->bios_address, bios->image,
               bios->image_size);

        if (bios->bios_relocate)
            bios->bios_relocate();
 
   }
 

Thanks,
Bei Guan
 

 -- Keir

>  -- Keir
>
>



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel