diff options
Diffstat (limited to 'initrd_max_address.patch')
-rw-r--r-- | initrd_max_address.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/initrd_max_address.patch b/initrd_max_address.patch new file mode 100644 index 000000000000..b04574b70e3d --- /dev/null +++ b/initrd_max_address.patch @@ -0,0 +1,25 @@ + + Date: 2005-11-11 + Author: Otavio Salvador + Comment: Stolen from SuSE grub package. + It fix the max address of initrd image and include a safe + default in case of it isn't available + +Index: b/stage2/boot.c +=================================================================== +--- a/stage2/boot.c ++++ b/stage2/boot.c +@@ -824,8 +824,11 @@ + moveto = (mbi.mem_upper + 0x400) << 10; + + moveto = (moveto - len) & 0xfffff000; +- max_addr = (lh->header == LINUX_MAGIC_SIGNATURE && lh->version >= 0x0203 +- ? lh->initrd_addr_max : LINUX_INITRD_MAX_ADDRESS); ++ max_addr = LINUX_INITRD_MAX_ADDRESS; ++ if (lh->header == LINUX_MAGIC_SIGNATURE && ++ lh->version >= 0x0203 && ++ lh->initrd_addr_max < max_addr) ++ max_addr = lh->initrd_addr_max; + if (moveto + len >= max_addr) + moveto = (max_addr - len) & 0xfffff000; + |