~ubuntu-branches/debian/jessie/grub/jessie

« back to all changes in this revision

Viewing changes to debian/patches/initrd_max_address.patch

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2011-03-17 13:34:14 UTC
  • Revision ID: james.westby@ubuntu.com-20110317133414-cawa48d482iuqqb9
Tags: 0.97-65
* Fix grub/migrate_from_legacy title to not end with a full stop.
* Fix update-grub(8) groff typo (".bar" instead of ".br").
* Adjust doc-base file to account for renaming of grub.info to
  grub-legacy.info.
* Compare -trunk kernels earlier than numeric ABIs (thanks, Aaron M. Ucko
  and Andreas Beckmann; closes: #570318).
* Convert from home-grown patch system to quilt.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
    Date: 2005-11-11
 
3
    Author: Otavio Salvador
 
4
    Comment: Stolen from SuSE grub package.
 
5
     It fix the max address of initrd image and include a safe
 
6
     default in case of it isn't available
 
7
 
 
8
Index: b/stage2/boot.c
 
9
===================================================================
 
10
--- a/stage2/boot.c
 
11
+++ b/stage2/boot.c
 
12
@@ -824,8 +824,11 @@
 
13
     moveto = (mbi.mem_upper + 0x400) << 10;
 
14
   
 
15
   moveto = (moveto - len) & 0xfffff000;
 
16
-  max_addr = (lh->header == LINUX_MAGIC_SIGNATURE && lh->version >= 0x0203
 
17
-             ? lh->initrd_addr_max : LINUX_INITRD_MAX_ADDRESS);
 
18
+  max_addr = LINUX_INITRD_MAX_ADDRESS;
 
19
+  if (lh->header == LINUX_MAGIC_SIGNATURE &&
 
20
+      lh->version >= 0x0203 &&
 
21
+      lh->initrd_addr_max < max_addr)
 
22
+    max_addr = lh->initrd_addr_max;
 
23
   if (moveto + len >= max_addr)
 
24
     moveto = (max_addr - len) & 0xfffff000;
 
25