2018-07-12 14:56:34 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2018-07-10 19:08:14 +00:00
|
|
|
From: Vladimir Serbinenko <phcoder@gmail.com>
|
|
|
|
Date: Thu, 7 Sep 2017 13:55:22 +0200
|
|
|
|
Subject: [PATCH] Fix compilation for x86_64-efi.
|
|
|
|
|
|
|
|
---
|
|
|
|
grub-core/loader/multiboot.c | 2 +-
|
|
|
|
include/grub/i386/multiboot.h | 4 ++++
|
|
|
|
2 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
|
|
|
|
|
diff --git a/grub-core/loader/multiboot.c b/grub-core/loader/multiboot.c
|
|
|
|
index 3b57cb132a6..40c67e82489 100644
|
|
|
|
--- a/grub-core/loader/multiboot.c
|
|
|
|
+++ b/grub-core/loader/multiboot.c
|
|
|
|
@@ -143,7 +143,7 @@ efi_boot (struct grub_relocator *rel,
|
|
|
|
#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_ENTRY_REGISTER = GRUB_MULTIBOOT (payload_eip);
|
|
|
|
state_efi.MULTIBOOT_EFI_MBI_REGISTER = target;
|
|
|
|
|
|
|
|
grub_relocator_efi_boot (rel, state_efi);
|
|
|
|
diff --git a/include/grub/i386/multiboot.h b/include/grub/i386/multiboot.h
|
|
|
|
index 9cd97dfced8..0b596fc2060 100644
|
|
|
|
--- a/include/grub/i386/multiboot.h
|
|
|
|
+++ b/include/grub/i386/multiboot.h
|
|
|
|
@@ -43,6 +43,10 @@
|
|
|
|
.rcx = 0, \
|
|
|
|
.rdx = 0, \
|
|
|
|
}
|
|
|
|
+#define MULTIBOOT2_EFI_INITIAL_STATE { .rax = MULTIBOOT2_BOOTLOADER_MAGIC, \
|
|
|
|
+ .rcx = 0, \
|
|
|
|
+ .rdx = 0, \
|
|
|
|
+ }
|
|
|
|
#define MULTIBOOT_EFI_ENTRY_REGISTER rip
|
|
|
|
#define MULTIBOOT_EFI_MBI_REGISTER rbx
|
|
|
|
#endif
|