grub2/0071-multiboot-fixup.patch

41 lines
1.4 KiB
Diff
Raw Normal View History

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder@gmail.com>
Date: Mon, 14 Aug 2017 16:24:05 +0200
Subject: [PATCH] multiboot fixup
---
grub-core/loader/multiboot.c | 5 ++++-
include/grub/mips/multiboot.h | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c
index bd3dc1990e3..3b57cb132a6 100644
--- a/grub-core/loader/multiboot.c
+++ b/grub-core/loader/multiboot.c
@@ -138,8 +138,11 @@ static void
efi_boot (struct grub_relocator *rel,
grub_uint32_t target)
{
+#ifdef GRUB_USE_MULTIBOOT2
+ struct grub_relocator_efi_state state_efi = MULTIBOOT2_EFI_INITIAL_STATE;
+#else
struct grub_relocator_efi_state state_efi = MULTIBOOT_EFI_INITIAL_STATE;
-
+#endif
state_efi.MULTIBOOT_EFI_ENTRY_REGISTER = grub_multiboot_payload_eip;
state_efi.MULTIBOOT_EFI_MBI_REGISTER = target;
diff --git a/include/grub/mips/multiboot.h b/include/grub/mips/multiboot.h
index c4eee2dd01b..cdfb41e315a 100644
--- a/include/grub/mips/multiboot.h
+++ b/include/grub/mips/multiboot.h
@@ -23,7 +23,7 @@
.jumpreg = 1 }
#define MULTIBOOT_ENTRY_REGISTER gpr[1]
#define MULTIBOOT_MBI_REGISTER gpr[5]
-#define MULTIBOOT2_ARCHITECTURE_CURRENT MULTIBOOT_ARCHITECTURE_MIPS32
+#define MULTIBOOT2_ARCHITECTURE_CURRENT MULTIBOOT2_ARCHITECTURE_MIPS32
#define MULTIBOOT_ELF32_MACHINE EM_MIPS
#define MULTIBOOT_ELF64_MACHINE EM_MIPS