]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/loader/mips/linux.c (grub_cmd_initrd): Use correct limits
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 10 Apr 2011 14:44:11 +0000 (16:44 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 10 Apr 2011 14:44:11 +0000 (16:44 +0200)
rather than trying to put initrd way too high.
Reported by: Ryan Lortie <desrt@desrt.ca>

ChangeLog
grub-core/loader/mips/linux.c

index 65f42dd6a9e05c90b0421ca1de138d315cc5d012..f3050ef7340fb15f2c998e9556e188111d2d64fa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2011-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/loader/mips/linux.c (grub_cmd_initrd): Use correct limits
+       rather than trying to put initrd way too high.
+       Reported by: Ryan Lortie <desrt@desrt.ca>
+
 2011-04-10  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/boot/mips/yeeloong/fwstart.S (no_cs5536): Put back
index 6ae2a9321d9c830dff66313f5a21963a7a580703..9accfc2705caeb9ca7d0890ed762afc002bcf583 100644 (file)
@@ -379,8 +379,9 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)),
     grub_relocator_chunk_t ch;
 
     err = grub_relocator_alloc_chunk_align (relocator, &ch,
-                                           target_addr + linux_size + 0x10000,
-                                           (0xffffffff - size) + 1,
+                                           (target_addr & 0x1fffffff)
+                                           + linux_size + 0x10000,
+                                           (0x10000000 - size),
                                            size, 0x10000,
                                            GRUB_RELOCATOR_PREFERENCE_NONE);