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