On Thursday 05 August 2004 02:04, Jason Thomas wrote:
> Is there anything we can do about this. Is the info in the last link
> related.

I think I now understand why. Look at the line 824 in boot.c:

     moveto = (mbi.mem_upper + 0x400) << 10;

This code does not take an overflow into account. If the memory size is 
over 4GB, MOVETO will be set to zero incorrectly. So probably this 
should be rewritten like this:

     if (mbi.mem_uppper >= ((~0UL - 0x400) >> 10))
       moveto = ~0UL;
     else
       moveto = (mbi.mem_upper + 0x400) << 10;

or:

     moveto = (mbi.mem_upper + 0x400) << 10;
     if (moveto == 0)
       moveto--;

If you can confirm that this fixes the bug, you can apply the fix to the 
CVS. I think you have the commit right.

Okuji


_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to