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