[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/7] multiboot2: Allow 64-bit entry tags
From: |
Ross Lagerwall |
Subject: |
[PATCH 2/7] multiboot2: Allow 64-bit entry tags |
Date: |
Wed, 13 Mar 2024 15:07:43 +0000 |
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 |
+ +-------------------+
@end group
@end example
@@ -538,7 +538,10 @@ The meaning of each is as follows:
@item entry_addr
The physical address to which the boot loader should jump in order to
-start running the operating system.
+start running the operating system. @samp{entry_addr} may be specified
+either as a @samp{u32} or @samp{u64}. The bootloader should use the
+header size to determine the size of @samp{entry_addr}.
+
@end table
@subsection EFI i386 entry address tag of Multiboot2 header
@@ -573,12 +576,12 @@ tag of Multiboot2 header are ignored.
@example
@group
- +-------------------+
-u16 | type = 9 |
-u16 | flags |
-u32 | size |
-u32 | entry_addr |
- +-------------------+
+ +-------------------+
+u16 | type = 9 |
+u16 | flags |
+u32 | size |
+u32 / u64 | entry_addr |
+ +-------------------+
@end group
@end example
@@ -594,6 +597,9 @@ is as follows:
@item entry_addr
The physical address to which the boot loader should jump in order to
start running EFI amd64 compatible operating system code.
+@samp{entry_addr} may be specified either as a @samp{u32} or @samp{u64}.
+The bootloader should use the header size to determine the size of
+@samp{entry_addr}.
@end table
This tag is taken into account only on EFI amd64 platforms
diff --git a/doc/multiboot2.h b/doc/multiboot2.h
index d4cae05706e4..a994a7b28b02 100644
--- a/doc/multiboot2.h
+++ b/doc/multiboot2.h
@@ -141,7 +141,11 @@ struct multiboot_header_tag_entry_address
multiboot_uint16_t type;
multiboot_uint16_t flags;
multiboot_uint32_t size;
- multiboot_uint32_t entry_addr;
+ union
+ {
+ multiboot_uint32_t entry_addr32;
+ multiboot_uint64_t entry_addr64;
+ };
};
struct multiboot_header_tag_console_flags
--
2.43.0
- Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type, (continued)
Re: [PATCH 1/7] multiboot2: Add load type header and support for the PE binary type, Roger Pau Monné, 2024/03/19
[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 <=
[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