/[grub]/grub2/loader/powerpc/ieee1275/linux.c
ViewVC logotype

Diff of /grub2/loader/powerpc/ieee1275/linux.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by marco_g, Sun Nov 13 15:47:09 2005 UTC revision 1.12 by hollisb, Wed Nov 23 04:25:16 2005 UTC
# Line 173  grub_rescue_cmd_linux (int argc, char *a Line 173  grub_rescue_cmd_linux (int argc, char *a
173       try some other addresses just like yaboot does.  */       try some other addresses just like yaboot does.  */
174    for (linux_addr = entry; linux_addr < entry + 200 * 0x100000; linux_addr += 0x100000)    for (linux_addr = entry; linux_addr < entry + 200 * 0x100000; linux_addr += 0x100000)
175      {      {
176          grub_dprintf ("loader", "Attempting to claim at 0x%x, size 0x%x.\n",
177                        linux_addr, linux_size);
178        found_addr = grub_claimmap (linux_addr, linux_size);        found_addr = grub_claimmap (linux_addr, linux_size);
179        if (found_addr != -1)        if (found_addr != -1)
180          break;          break;
# Line 261  grub_rescue_cmd_initrd (int argc, char * Line 263  grub_rescue_cmd_initrd (int argc, char *
263  {  {
264    grub_file_t file = 0;    grub_file_t file = 0;
265    grub_ssize_t size;    grub_ssize_t size;
266      grub_addr_t first_addr;
267    grub_addr_t addr;    grub_addr_t addr;
268      int found_addr = 0;
269    
270    if (argc == 0)    if (argc == 0)
271      {      {
# Line 279  grub_rescue_cmd_initrd (int argc, char * Line 283  grub_rescue_cmd_initrd (int argc, char *
283    if (! file)    if (! file)
284      goto fail;      goto fail;
285    
286    addr = linux_addr + linux_size;    first_addr = linux_addr + linux_size;
287    size = grub_file_size (file);    size = grub_file_size (file);
288    
289    if (grub_claimmap (addr, size) == -1)    /* Attempt to claim at a series of addresses until successful in
290         the same way that grub_rescue_cmd_linux does.  */
291      for (addr = first_addr; addr < first_addr + 200 * 0x100000; addr += 0x100000)
292        {
293          grub_dprintf ("loader", "Attempting to claim at 0x%x, size 0x%x.\n",
294                        addr, size);
295          found_addr = grub_claimmap (addr, size);
296          if (found_addr != -1)
297            break;
298        }
299    
300      if (found_addr == -1)
301      {      {
302        grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not claim memory");        grub_error (GRUB_ERR_OUT_OF_MEMORY, "Can not claim memory");
303        goto fail;        goto fail;

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26