multiboot2: Add module load and preference tag
PATCH v3 1/1 multiboot2: Add module load and preference tag
In the cases of users have preferences over Multiboot2 module load addresses, currently GRUB has no way to achieve it.
Similar to the relocatable header tag, this new tag allows users to specify the minimum and maximum load addresses, and other load preferences on Multiboot2 modules.
Bump version to 2.1, and add 2020 to copyright.
Signed-off-by Zide Chen <[email protected]>
--- configure.ac | 2 +- doc/multiboot.texi | 57 +++++++++++++++++++++++++++++++++++++++++++++- doc/multiboot2.h | 12 ++++++++++ 3 files changed, 69 insertions(+), 2 deletions(-)
configure.ac +1 -1
@@ -13,7 +13,7 @@ dnl LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE dnl USE OF THIS SOFTWARE. AC_PREREQ(2.59) -AC_INIT([Multiboot], [2.0], [[email protected]]) +AC_INIT([Multiboot], [2.1], [[email protected]]) AC_CONFIG_SRCDIR([doc/multiboot.texi]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE
doc/multiboot.texi +56 -1
83 lines not on this page · raw message
doc/multiboot2.h +12 -0
@@ -75,6 +75,7 @@#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI32 8#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI64 9#define MULTIBOOT_HEADER_TAG_RELOCATABLE 10 +#define MULTIBOOT_HEADER_TAG_MODULE_LOAD_PREFERENCES 11#define MULTIBOOT_ARCHITECTURE_I386 0#define MULTIBOOT_ARCHITECTURE_MIPS32 4
@@ -179,6 +180,17 @@ struct multiboot_header_tag_relocatablemultiboot_uint32_t preference; }; +struct multiboot_header_tag_module_load_preferences +{ +multiboot_uint16_t type; +multiboot_uint16_t flags; +multiboot_uint32_t size; +multiboot_uint32_t min_addr; +multiboot_uint32_t max_addr; +multiboot_uint32_t align; +multiboot_uint32_t preference; +}; +struct multiboot_color {multiboot_uint8_t red;
Signature · 1 line
2.17.1