|
|
d41074 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
a85e8e |
From: Piotr Krysiuk <piotras@gmail.com>
|
|
|
a85e8e |
Date: Sun, 20 Apr 2014 15:58:45 +0200
|
|
|
d41074 |
Subject: [PATCH] Allow loading old kernels by placing GDT in conventional
|
|
|
d41074 |
memory.
|
|
|
a85e8e |
|
|
|
a85e8e |
---
|
|
|
a85e8e |
grub-core/lib/i386/relocator.c | 11 +++++++----
|
|
|
d41074 |
ChangeLog | 5 +++++
|
|
|
a85e8e |
2 files changed, 12 insertions(+), 4 deletions(-)
|
|
|
a85e8e |
|
|
|
a85e8e |
diff --git a/grub-core/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c
|
|
|
d41074 |
index d2a1b27ae0e..ffaf25f088d 100644
|
|
|
a85e8e |
--- a/grub-core/lib/i386/relocator.c
|
|
|
a85e8e |
+++ b/grub-core/lib/i386/relocator.c
|
|
|
a85e8e |
@@ -81,10 +81,13 @@ grub_relocator32_boot (struct grub_relocator *rel,
|
|
|
a85e8e |
void *relst;
|
|
|
a85e8e |
grub_relocator_chunk_t ch;
|
|
|
a85e8e |
|
|
|
a85e8e |
- err = grub_relocator_alloc_chunk_align (rel, &ch, 0,
|
|
|
a85e8e |
- (0xffffffff - RELOCATOR_SIZEOF (32))
|
|
|
a85e8e |
- + 1, RELOCATOR_SIZEOF (32), 16,
|
|
|
a85e8e |
- GRUB_RELOCATOR_PREFERENCE_NONE,
|
|
|
a85e8e |
+ /* Specific memory range due to Global Descriptor Table for use by payload
|
|
|
a85e8e |
+ that we will store in returned chunk. The address range and preference
|
|
|
a85e8e |
+ are based on "THE LINUX/x86 BOOT PROTOCOL" specification. */
|
|
|
a85e8e |
+ err = grub_relocator_alloc_chunk_align (rel, &ch, 0x1000,
|
|
|
a85e8e |
+ 0x9a000 - RELOCATOR_SIZEOF (32),
|
|
|
a85e8e |
+ RELOCATOR_SIZEOF (32), 16,
|
|
|
a85e8e |
+ GRUB_RELOCATOR_PREFERENCE_LOW,
|
|
|
a85e8e |
avoid_efi_bootservices);
|
|
|
a85e8e |
if (err)
|
|
|
a85e8e |
return err;
|
|
|
d41074 |
diff --git a/ChangeLog b/ChangeLog
|
|
|
d41074 |
index 35564681a4d..73a89289945 100644
|
|
|
d41074 |
--- a/ChangeLog
|
|
|
d41074 |
+++ b/ChangeLog
|
|
|
d41074 |
@@ -1,3 +1,8 @@
|
|
|
d41074 |
+2014-04-20 Piotr Krysiuk <piotras@gmail.com>
|
|
|
d41074 |
+
|
|
|
d41074 |
+ * grub-core/lib/i386/relocator.c: Allow loading old kernels by placing
|
|
|
d41074 |
+ GDT in conventional memory.
|
|
|
d41074 |
+
|
|
|
d41074 |
2014-04-10 Colin Watson <cjwatson@ubuntu.com>
|
|
|
d41074 |
|
|
|
d41074 |
* util/grub.d/30_os-prober.in: Tolerate devices with no filesystem
|