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

Re: UEFI support in ARM DomUs


  • To: Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>
  • From: Oleksandr Andrushchenko <Oleksandr_Andrushchenko@xxxxxxxx>
  • Date: Fri, 19 Jun 2020 07:04:06 +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=IX10gaq8mT5z7N3X0XaZB5NGJLfFs/lGAlNs6eoqfkU=; b=gj23dno78KUQfu6T36cZTffcQQvxDXbR36DMO6L2cdFwcnnG0P9JiLpDYnMHDjXnbUh8eISbQrvAARwd2zjR2mLmIRDSKR+6/XxIRHKtEIoVbkSNqyCnpI7aqqKKXIOXfF+R3b0arvS1xQQr1usbOiUJU9MylRvgY6q6+JB/JjZ7zBLCZ7qT2QAfnMmTTfF3HyVk3Jhq8KTkXG2mETT71ELH96qlramUzN+mQl/2LMI19AKID63PaeEJVnZa7ckXxqABGKYAhCIfN0DJMFJyTdO2Ig8kKUjTcnP8T/9e9DdzZwl5x/NeiC43LBtKoj9XpbqaFxBFaaeFp4idzlWigA==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NGLvpUesbAVzlS/xQLN6986Wmb9JVf4X7Wp6NDZa2qprg2th+gE82nL52+gBMn87lWeJ76p0yQb6zYVTPJqLQWhjkWl+3KYh7gAGvSFyODUgFcQwdSFMhaHOdKAOSvfe4gBk8/PliewnWx6wULHmTemGqh67VPcAUFxbuT4XaSC/SGdTSeUUdszQjwi0oiCilJClsWqsGUjZmcUOPKMA6lRCy2V9UXs7NlGWIV55rjYFPIgfOtw0Et5OYkRfqbU8npSMY+Yz6LKVrZtTyOjZxgxG/xP+vxmg3hTXUGXbywZ0iOX+Fob9rqcNRQprZsk3ud2dMjJRZOTfU+PLqrdlWg==
  • Authentication-results: xen.org; dkim=none (message not signed) header.d=none;xen.org; dmarc=none action=none header.from=epam.com;
  • Cc: Anastasiia Lukianenko <Anastasiia_Lukianenko@xxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Peng Fan <peng.fan@xxxxxxx>, Roman Shaposhnik <roman@xxxxxxxxxx>, Bertrand Marquis <Bertrand.Marquis@xxxxxxx>, Nataliya Korovkina <malus.brandywine@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Fri, 19 Jun 2020 07:04:33 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHWOoSI1wnhumD+IkWBnAQX9mudyajIlWsAgBVWbwCAAJ62gIABEAqA
  • Thread-topic: UEFI support in ARM DomUs

On 6/18/20 5:50 PM, Julien Grall wrote:
>
>
> On 18/06/2020 06:22, Oleksandr Andrushchenko wrote:
>>
>> 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
>
> Not everyone are closely watching xen-devel. So if you want to find out who 
> are the copyright owners, then your best solution is to go through the git 
> log and CC the authors.

We didn't want to contact the respective authors and copyright owners (some of 
those

are dated 2005 or so). This is to stress that we are trying hard to put all the 
copyrights

and not miss anyone: there is no intention to put our copyright at some 
inappropriate

place and remove someones else.

>
>>
>> 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
>
> Hmmm... Why? What's wrong with booting a guest with just 64MB?

Because of the bug in U-boot [1]: it tries to read beyond the physical memory 
if guest

has less than 128M+ as only then Xen tools put the fdt at 128M and not at the 
RAM end.

>
>>
>> 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.
>
> I have replied to this in the pull request. But I want to bring the 
> conversation here to have a wider discussion.
>
> For a first, __XEN__ should really only be defined by the hypervisor and not 
> used by the guest. This is used to gate non-stable ABI (such as the tools) 
> and anything behind it hasn't been vetted to work in other build 
> configuration that the one used by Xen.
>
> In general, we expect the guest to discover everything for the device-tree 
> because the memory layout is not stable (we want to be able to reshuffle as 
> we add more features).
>
> I know that EDK2/Tianocore can be built once and work on every Xen 
> configuration. It would be ideal that U-boot follow the same. If it is really 
> not possible, then we should explore a path that is preventing to define 
> __XEN__.
>
> How much does U-boot expect to know about the memory layout? Does it require 
> to know all the memory banks? Or would it be sufficient for it to know the 
> start address of the first bank and the minimum of RAM?
>
> Cheers,
>
[1] 
https://github.com/xen-troops/u-boot/pull/1/commits/9c639bd514961e70cfb2ebed9d8badb7b22d21ab

 


Rackspace

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