From: "Jan Beulich" Subject: Re: Relocatable Xen early boot code Date: Fri, 12 Jun 2015 14:57:29 +0100 Message-ID: <557B0169020000780008444D@mail.emea.novell.com> References: <20150612111409.GJ19315@olila.local.net-space.pl> <557AE7E90200007800084323@mail.emea.novell.com> <20150612135133.GN19315@olila.local.net-space.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z3PSf-0008Cr-Al for xen-devel@lists.xenproject.org; Fri, 12 Jun 2015 13:57:33 +0000 In-Reply-To: <20150612135133.GN19315@olila.local.net-space.pl> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Daniel Kiper Cc: andrew.cooper3@citrix.com, keir@xen.org, xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org >>> On 12.06.15 at 15:51, wrote: > On Fri, Jun 12, 2015 at 01:08:41PM +0100, Jan Beulich wrote: >> >>> On 12.06.15 at 13:14, wrote: >> > Here I do not want to discuss GRUB2 and multiboot2 protocol support details >> > for relocatable images. It is not needed. It is sufficient to know that it >> > is able to put loaded image anywhere in available memory below 4 GiB. > Loaded >> > image is informed about its base address according to multiboot2 protocol >> > via >> > special tag. This is new feature not available in upstream GRUB2. I work on >> > upstreaming it in parallel. Relevant patches will be posted together with >> > Xen patches. >> >> Before going into any detail on what you write later on - if this isn't in >> upstream grub2, why can't you do what you want to do first without >> another change needed in the boot loader? In which case, if I'm reading >> this correctly, you wouldn't need our boot code to become relocatable >> either. > > multiboot protocol (any version) puts image at address as it requests. > Always, without any exception. So, in our case starting from 1 MiB. > On legacy BIOS platforms it works. However, on EFI platforms it is not > always possible because sometimes some parts of EFI boot/runtime services > live somewhere around 1 MiB. So, first of all we must change multiboot > protocol behavior (in our case version 2 because it is more flexible) > and learn it to relocate images into free memory region. On the other > hand we must learn Xen early boot code to live at different addresses. > We must do all this changes in GRUB2 and in Xen in parallel. Right, I now recall (the huge time difference between individual steps is of course kind of problematic here). Jan