From e98482f5ae472fb1f27a589dfb769c03121992ba Mon Sep 17 00:00:00 2001 From: Colin Watson Date: Sun, 20 Jan 2013 23:03:35 +0000 Subject: [PATCH 123/482] * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't add the initrd size to addr_min, since the initrd will be allocated after this address. --- ChangeLog | 6 ++++++ grub-core/loader/i386/linux.c | 3 +-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4c21ea0..6886f29 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-01-20 Colin Watson + + * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't add the + initrd size to addr_min, since the initrd will be allocated after + this address. + 2013-01-20 Andrey Borzenkov * conf/Makefile.common: Fix autogen rules to pass definition diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c index 41357a5..92cabfb 100644 --- a/grub-core/loader/i386/linux.c +++ b/grub-core/loader/i386/linux.c @@ -1115,8 +1115,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), worse than that of Linux 2.3.xx, so avoid the last 64kb. */ addr_max -= 0x10000; - addr_min = (grub_addr_t) prot_mode_target + prot_init_space - + page_align (size); + addr_min = (grub_addr_t) prot_mode_target + prot_init_space; /* Put the initrd as high as possible, 4KiB aligned. */ addr = (addr_max - size) & ~0xFFF; -- 1.8.2.1