|
|
a85e8e |
From 9889cf801bb7e8b70a249873a9c8254ac6ef8a39 Mon Sep 17 00:00:00 2001
|
|
|
a85e8e |
From: Piotr Krysiuk <piotras@gmail.com>
|
|
|
a85e8e |
Date: Sun, 20 Apr 2014 15:58:45 +0200
|
|
|
a85e8e |
Subject: [PATCH 079/260] Allow loading old kernels by placing GDT in
|
|
|
a85e8e |
conventional memory.
|
|
|
a85e8e |
|
|
|
a85e8e |
---
|
|
|
a85e8e |
ChangeLog | 5 +++++
|
|
|
a85e8e |
grub-core/lib/i386/relocator.c | 11 +++++++----
|
|
|
a85e8e |
2 files changed, 12 insertions(+), 4 deletions(-)
|
|
|
a85e8e |
|
|
|
a85e8e |
diff --git a/ChangeLog b/ChangeLog
|
|
|
a85e8e |
index 35564681a..73a892899 100644
|
|
|
a85e8e |
--- a/ChangeLog
|
|
|
a85e8e |
+++ b/ChangeLog
|
|
|
a85e8e |
@@ -1,3 +1,8 @@
|
|
|
a85e8e |
+2014-04-20 Piotr Krysiuk <piotras@gmail.com>
|
|
|
a85e8e |
+
|
|
|
a85e8e |
+ * grub-core/lib/i386/relocator.c: Allow loading old kernels by placing
|
|
|
a85e8e |
+ GDT in conventional memory.
|
|
|
a85e8e |
+
|
|
|
a85e8e |
2014-04-10 Colin Watson <cjwatson@ubuntu.com>
|
|
|
a85e8e |
|
|
|
a85e8e |
* util/grub.d/30_os-prober.in: Tolerate devices with no filesystem
|
|
|
a85e8e |
diff --git a/grub-core/lib/i386/relocator.c b/grub-core/lib/i386/relocator.c
|
|
|
a85e8e |
index d2a1b27ae..ffaf25f08 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;
|
|
|
a85e8e |
--
|
|
|
a85e8e |
2.13.0
|
|
|
a85e8e |
|