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

Re: UEFI support in ARM DomUs


  • To: Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Thu, 18 Jun 2020 05:22:24 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QxIO4zK4kC1Av4SYmK9kcqwiogrTrZz4OIr8UIlNOQk=; b=Ml+wlTxpq6RoLxA3bLGvYKbPG7QucY4O7nHVPHE6Kog+7VtGJ8S9U9RoWzktwKDNUOgxAIDsYwiegzeu2uDGwtGjYqY6Aj8qV/BGk3OuGGDSsQFI45MkCB2qYeTeg9SlyjH7qeH2hayW9tQMsPj8C01Q09rxVVN3x/He4Mfx2O3FYqtQKYskFl8e6wsxQsBRJFx2qSa9Zybh2ZW/GZ7ZwawMsgsctBhMs9YFy8Vw/WGlNPPD6lJspgUpvQw67Wz8EjzdGwETARRepQdTAVcxKskQwRgdExK9Aj2o6Uo/2/dMTOuYuGx6WpyF0zxVKJYziQGoRQUN56kNLoIVJExC+Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=I6GKIBdIMKE+gy/+a69ifUTRvYaWIQRJRoGyAQ+6wZ/+Ou5jz3T8wTqZeGFu5BA/1X8L+NWQOLIfH5de+R8LjZFWTkl3bT92OkDS2w0SYmxq79BK4SQuqIq8wnI+cJXlqyeRO32HWkw4VRKGxlf0yGCPm95DkAZv+SitBOGQOb4WU6V5qaFZn3HnJQUOiLcJtgJewrX7KhQ6dsF4FF0qODicJATH2YX92RbHvy8o29lwDdW1ty2xWb/FKoEDyVFQx3Rg8v2S5wp0DG9IEnpwuRYaHc+eT7sZMdtbM6m6RA/eZfhRePOhmu8iLYXzidaCp9yJ3kgulqk5hyZvH5yckA==
  • Authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=epam.com;
  • Cc: Anastasiia Lukianenko <Anastasiia_Lukianenko@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Peng Fan <peng.fan@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Roman Shaposhnik <roman@xxxxxxxxxx>, Nataliya Korovkina <malus.brandywine@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Thu, 18 Jun 2020 05:22:53 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWOoSI1wnhumD+IkWBnAQX9mudyajIlWsAgBVWbwA=
  • Thread-topic: UEFI support in ARM DomUs

On 6/4/20 6:31 PM, Stefano Stabellini wrote:
> On Thu, 4 Jun 2020, Oleksandr Andrushchenko wrote:
>> On 6/4/20 4:57 AM, Peng Fan wrote:
>>> Grall <julien@xxxxxxx>;
>>>> Nataliya Korovkina <malus.brandywine@xxxxxxxxx>
>>>> Subject: UEFI support in ARM DomUs
>>> We have made U-Boot run inside XEN DomU, but just only PV console part,
>>> not implement other frontend drivers currently. Would this help for your
>>> case if enable EFI in U-Boot?
>> Well, we have a working PV block implementation on top of that on iMX8
>>
>> platform, mostly ported from mini-os. Currently we are finalizing the work
>>
>> and cleaning up (it's going to take a week or so hopefully). Then, we we'll 
>> post
>>
>> it on our public github. We are also thinking about upstreaming the work, 
>> but it may
>>
>> take quite some time if the whole idea fits u-boot's view on such an 
>> extension at all.
> Yes please to both of you! :-)
>
> In the meantime, while we wait for those changes to go upstream in
> uboot, could you please post a branch on github and a link on this email
> thread?

It took a bit more time than we expected, but here we go [1]:

this is in form of a pull-request as we would love to hear from the

community and it is easier to discuss the code (please leave comments there)

1. There is code originating from MiniOS and work done by Peng, so we

would like to ask the respective copyright owners to raise their hands and

let us *fix inappropriate licensing* if any.

2. Please note, the series has a HACK to move the RAM base as it is expected by

our test platform (iMX8), so others will need to remove or modify that.

3. There is a limitation already noted by Peng that we do not have serial output

until MMU is setup, so we have introduced xen_early_printk helper which always

works, so you can use that for early stage debugging.

4. Minimal memory size supported is ~129M because of dtb placement by Xen tools

5. We use -D__XEN__ to access some of the hidden defines we need such as

GUEST_RAM0_BASE and the friends as there is no other way but manually defining 
the

same which is not cute.

Have fun,

Anastasiia, Oleksandr

>
> Maybe we should have a wikipage on wiki.xenproject.org about
> work-in-progress uboot items.
>
>
>
>
>>> Regards,
>>> Peng.
>>>
>>>> Hi!
>>>>
>>>> with a lot of help from Stefano, we're getting RPi4 support in Project EVE
>>>> pretty much on par between KVM and Xen.
>>>>
>>>> One big area that still remains is supporting UEFI boot sequence for DomUs.
>>>> With KVM, given the qemu virt device model this is as simple as using 
>>>> either
>>>> stock UEFI build for arm or even U-Boot EFI emulation environment and
>>>> passing it via -bios option.
>>>>
>>>> Obviously with Xen on ARM we don't have the device model so my
>>>> understanding is that the easiest way we can support it would be to port
>>>> UEFI's OvmfPkg/OvmfXen target to ARM (it seems to be currently exclusively
>>>> X64).
>>>>
>>>> So here's my first question: if there's anybody on this list who had a 
>>>> hand in
>>>> implementing OvmfPkg/OvmfXen can you please share your thoughts on how
>>>> much work that port may be (or whether it is even feasible -- I may 
>>>> totally be
>>>> missing something really obvious here).
>>>>
>>>> And as long as I've got your attention: two more questions:
>>>>      1.. compared to the above, would porting pvgrub to ARM be any
>>>>      easier or more difficult?
>>>>
>>>>      2. same question for teaching u-boot about PV calls.
>>>>
>>>> Thanks,
>>>> Roman.
>>>>
>>>> P.S. Oh and I guess between:
>>>>      0. OvmfPkg/OvmfXen on ARM64
>>>>      1. pvgrub on ARM64
>>>>      2. u-boot/EFI emulation with PV calls backend I didn't miss any other
>>>> obvious way of making UEFI-aware VM images to boot on Xen ARM64 DomU,
>>>> right?
[1] https://github.com/xen-troops/u-boot/pull/1

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.