Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From 8fbb150a56966edde4dc07b8d01be5eb149b65ab Mon Sep 17 00:00:00 2001 |
| 2 | From: Colin Watson <cjwatson@ubuntu.com> |
| 3 | Date: Sun, 20 Jan 2013 23:03:35 +0000 |
| 4 | Subject: [PATCH 1/1] * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't |
| 5 | add the initrd size to addr_min, since the initrd will be allocated after |
| 6 | this address. |
| 7 | |
| 8 | commit 6a0debbd9167e8f79cdef5497a73d23e580c0cd4 upstream |
| 9 | |
| 10 | Upstream-Status: Backport |
| 11 | |
| 12 | Signed-off-by: Shan Hai <shan.hai@windriver.com> |
| 13 | --- |
| 14 | ChangeLog | 6 ++++++ |
| 15 | grub-core/loader/i386/linux.c | 3 +-- |
| 16 | 2 files changed, 7 insertions(+), 2 deletions(-) |
| 17 | |
| 18 | diff --git a/ChangeLog b/ChangeLog |
| 19 | index c2f42d5..40cb508 100644 |
| 20 | --- a/ChangeLog |
| 21 | +++ b/ChangeLog |
| 22 | @@ -1,3 +1,9 @@ |
| 23 | +2013-01-20 Colin Watson <cjwatson@ubuntu.com> |
| 24 | + |
| 25 | + * grub-core/loader/i386/linux.c (grub_cmd_initrd): Don't add the |
| 26 | + initrd size to addr_min, since the initrd will be allocated after |
| 27 | + this address. |
| 28 | + |
| 29 | 2012-07-02 Vladimir Serbinenko <phcoder@gmail.com> |
| 30 | |
| 31 | * grub-core/net/tftp.c (ack): Fix endianness problem. |
| 32 | diff --git a/grub-core/loader/i386/linux.c b/grub-core/loader/i386/linux.c |
| 33 | index 62087cf..e2425c8 100644 |
| 34 | --- a/grub-core/loader/i386/linux.c |
| 35 | +++ b/grub-core/loader/i386/linux.c |
| 36 | @@ -1098,8 +1098,7 @@ grub_cmd_initrd (grub_command_t cmd __attribute__ ((unused)), |
| 37 | worse than that of Linux 2.3.xx, so avoid the last 64kb. */ |
| 38 | addr_max -= 0x10000; |
| 39 | |
| 40 | - addr_min = (grub_addr_t) prot_mode_target + prot_init_space |
| 41 | - + page_align (size); |
| 42 | + addr_min = (grub_addr_t) prot_mode_target + prot_init_space; |
| 43 | |
| 44 | /* Put the initrd as high as possible, 4KiB aligned. */ |
| 45 | addr = (addr_max - size) & ~0xFFF; |
| 46 | -- |
| 47 | 1.8.5.2.233.g932f7e4 |
| 48 | |