[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: initrd_addr_max
From: |
Yoshinori K. Okuji |
Subject: |
Re: initrd_addr_max |
Date: |
Thu, 5 Aug 2004 12:55:44 +0200 |
User-agent: |
KMail/1.6.1 |
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
- initrd_addr_max, Jason Thomas, 2004/08/04
- Re: initrd_addr_max,
Yoshinori K. Okuji <=