]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Allow loading old kernels by placing GDT in conventional memory.
authorPiotr Krysiuk <piotras@gmail.com>
Sun, 20 Apr 2014 13:58:45 +0000 (15:58 +0200)
committerVladimir Serbinenko <phcoder@gmail.com>
Sun, 20 Apr 2014 14:00:55 +0000 (16:00 +0200)
ChangeLog
grub-core/lib/i386/relocator.c

index 30d0cace487b49b1e79b72b2fb803ec6efde5c32..1be8e5e6444955c4816de216737d41690e4bd260 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-04-20  Piotr Krysiuk  <piotras@gmail.com>
+
+       * grub-core/lib/i386/relocator.c: Allow loading old kernels by placing
+       GDT in conventional memory.
+
 2014-04-10  Colin Watson  <cjwatson@ubuntu.com>
 
        * util/grub.d/30_os-prober.in: Tolerate devices with no filesystem
index d2a1b27ae0e2fc952e57f70da12b0c7a1b4af68d..ffaf25f088de4111baa2f81c41139dedb3ba0a5c 100644 (file)
@@ -81,10 +81,13 @@ grub_relocator32_boot (struct grub_relocator *rel,
   void *relst;
   grub_relocator_chunk_t ch;
 
-  err = grub_relocator_alloc_chunk_align (rel, &ch, 0,
-                                         (0xffffffff - RELOCATOR_SIZEOF (32))
-                                         + 1, RELOCATOR_SIZEOF (32), 16,
-                                         GRUB_RELOCATOR_PREFERENCE_NONE,
+  /* Specific memory range due to Global Descriptor Table for use by payload
+     that we will store in returned chunk.  The address range and preference
+     are based on "THE LINUX/x86 BOOT PROTOCOL" specification.  */
+  err = grub_relocator_alloc_chunk_align (rel, &ch, 0x1000,
+                                         0x9a000 - RELOCATOR_SIZEOF (32),
+                                         RELOCATOR_SIZEOF (32), 16,
+                                         GRUB_RELOCATOR_PREFERENCE_LOW,
                                          avoid_efi_bootservices);
   if (err)
     return err;