Blame SOURCES/0079-Allow-loading-old-kernels-by-placing-GDT-in-conventi.patch

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