[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/7] multiboot2: Allow 64-bit entry tags
From: |
Ross Lagerwall |
Subject: |
Re: [PATCH 2/7] multiboot2: Allow 64-bit entry tags |
Date: |
Thu, 28 Mar 2024 15:05:47 +0000 |
On Tue, Mar 19, 2024 at 10:07 AM Roger Pau Monné <roger.pau@citrix.com> wrote:
>
> On Wed, Mar 13, 2024 at 03:07:43PM +0000, Ross Lagerwall wrote:
> > Binaries may be built with entry points above 4G. While bootloaders may
> > relocate them below 4G, it should be possible for the binary to specify
> > those entry points. Therefore, extend the multiboot2 protocol such that
> > 64 bit addresses are allowed for entry points. The extension is done in
> > a backwards-compatible way.
> >
> > Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
> > ---
> > doc/multiboot.texi | 32 +++++++++++++++++++-------------
> > doc/multiboot2.h | 6 +++++-
> > 2 files changed, 24 insertions(+), 14 deletions(-)
> >
> > diff --git a/doc/multiboot.texi b/doc/multiboot.texi
> > index d12719c744eb..049afab53c1f 100644
> > --- a/doc/multiboot.texi
> > +++ b/doc/multiboot.texi
> > @@ -522,12 +522,12 @@ header.
> >
> > @example
> > @group
> > - +-------------------+
> > -u16 | type = 3 |
> > -u16 | flags |
> > -u32 | size |
> > -u32 | entry_addr |
> > - +-------------------+
> > + +-------------------+
> > +u16 | type = 3 |
> > +u16 | flags |
> > +u32 | size |
> > +u32 / u64 | entry_addr |
> > + +-------------------+
>
> I might be confused, but this entry point is used in 32bit protected
> mode, and hence a 64bit value is simply impossible to use according to
> the protocol in "3.3 I386 machine state".
>
> Unless that section is expanded to describe other protocols that use
> the entry address in a way where 64bits could be meaningful it seems
> pointless to expand the field.
I changed this because the same binary is being used for both BIOS boot
and UEFI boot, therefore it may have a base address above 4 GiB.
Despite that, it is expected that GRUB would relocate the binary below
4 GiB so BIOS boot would still work.
However, on reflection this is kind of nasty. I've managed to build Xen
in such a way that this is no longer needed so I can drop this change
from the next version of this series.
Ross
- Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type, (continued)
[PATCH 3/7] multiboot2: Add support for the load type header tag, Ross Lagerwall, 2024/03/13
[PATCH 2/7] multiboot2: Allow 64-bit entry tags, Ross Lagerwall, 2024/03/13
[PATCH 4/7] multiboot2: Add PE load support, Ross Lagerwall, 2024/03/13
[PATCH 6/7] efi: Allow loading multiboot modules without verification, Ross Lagerwall, 2024/03/13
[PATCH 5/7] multiboot2: Add support for 64-bit entry addresses, Ross Lagerwall, 2024/03/13
[PATCH 7/7] verifiers: Verify after decompression, Ross Lagerwall, 2024/03/13