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

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