From b01abe3e1679ed31a03a3203e3b9127c847e8d1a Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 10 Apr 2011 16:44:11 +0200 Subject: [PATCH] * 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 --- ChangeLog | 6 ++++++ grub-core/loader/mips/linux.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 65f42dd6a..f3050ef73 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2011-04-10 Vladimir Serbinenko + + * 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 + 2011-04-10 Vladimir Serbinenko * grub-core/boot/mips/yeeloong/fwstart.S (no_cs5536): Put back diff --git a/grub-core/loader/mips/linux.c b/grub-core/loader/mips/linux.c index 6ae2a9321..9accfc270 100644 --- a/grub-core/loader/mips/linux.c +++ b/grub-core/loader/mips/linux.c @@ -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);