Received: from list by lists.gnu.org with archive (Exim 4.71) id 1ZUGJs-0006gL-QH for mharc-grub-devel@gnu.org; Tue, 25 Aug 2015 11:39:28 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48911) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUGJo-0006f3-W3 for grub-devel@gnu.org; Tue, 25 Aug 2015 11:39:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZUGJj-0006rW-SL for grub-devel@gnu.org; Tue, 25 Aug 2015 11:39:24 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:30188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZUGJj-0006r0-Lj for grub-devel@gnu.org; Tue, 25 Aug 2015 11:39:19 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t7PFdAVk016311 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 25 Aug 2015 15:39:10 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t7PFdAmB013025 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 25 Aug 2015 15:39:10 GMT Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t7PFd775001625; Tue, 25 Aug 2015 15:39:07 GMT Received: from olila.local.net-space.pl (/10.175.202.61) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 25 Aug 2015 08:39:06 -0700 Date: Tue, 25 Aug 2015 17:39:00 +0200 From: Daniel Kiper To: Andrew Cooper Subject: Re: [PATCH v2 10/23] efi: build xen.gz with EFI code Message-ID: <20150825153900.GI7143@olila.local.net-space.pl> References: <1437402558-7313-1-git-send-email-daniel.kiper@oracle.com> <1437402558-7313-11-git-send-email-daniel.kiper@oracle.com> <55D610DB020000780009C3F6@prv-mh.provo.novell.com> <20150822135919.GY7143@olila.local.net-space.pl> <55DB1D99020000780009CAAC@prv-mh.provo.novell.com> <20150824205445.GG7143@olila.local.net-space.pl> <55DC485D.4030904@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55DC485D.4030904@citrix.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: userv0021.oracle.com [156.151.31.71] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 Cc: Juergen Gross , grub-devel@gnu.org, wei.liu2@citrix.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, phcoder@gmail.com, roy.franz@linaro.org, ning.sun@intel.com, david.vrabel@citrix.com, Jan Beulich , xen-devel@lists.xenproject.org, qiaowei.ren@intel.com, keir@xen.org, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Aug 2015 15:39:26 -0000 On Tue, Aug 25, 2015 at 11:50:05AM +0100, Andrew Cooper wrote: > On 24/08/15 21:54, Daniel Kiper wrote: > > > >>>>> Currently, PE file contains many sections which are not "linear" (one > >>>>> after another without any holes) or even do not have representation > >>>>> in a file (e.g. BSS). In theory there is a chance that we could build > >>>>> proper PE file using current build system. However, it means that > >>>> What is "improper" about the currently built PE file? And if there is > >>>> anything improper, did you inform the binutils maintainers of the > >>>> problem? > >>> From PE loader point of view everything is OK. However, current Xen PE > >>> image (at least build on my machines) is not usable by multiboot (v1) > >>> or multiboot2 protocol compatible loader because it is not linear (one > >>> section does not live immediately after another without any voids). > >> Again - either I'm missing something (and then your explanation is > >> not good enough) or this is (as said above) a pointless adjustment. > > Let's focus on multiboot2 protocol (multiboot (v1) is similar to multiboot2 > > in discussed case). In general multiboot2 is able to load any file which has: > > 1. proper multiboot2 header in first 32 KiB of a given file, > > 2. "the text and data segments must be consecutive in the OS image" > > (The Multiboot Specification version 1.6). > > What is the reasoning for the restriction in 2. ? You are able to describe following segments using only multiboot2 features: 1) text and data segment bundled into one thing; in general boot loader does not care a lot about its internal structure; it should be just string of bytes which is loaded as is into memory (without any conversion, mangling, etc.), 2) BSS segment which follows one mentioned above; it does not have any representation in image; boot loader just reserve and zero memory of a given size. So, as you can see Xen text and data segment must live in one place in file to satisfy multiboot2 protocol requirements. However, it does not mean that from Xen point of view image cannot have more then one section/segment with required alignments, etc. Daniel