grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 10/23] efi: build xen.gz with EFI code


From: Daniel Kiper
Subject: Re: [PATCH v2 10/23] efi: build xen.gz with EFI code
Date: Tue, 25 Aug 2015 17:39:00 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]