On 13 Feb, Ronald G Minnich wrote:
> On 12 Feb 2001, Eric W. Biederman wrote:
> 
>> Tyson D Sawyer <[EMAIL PROTECTED]> writes:
>> >         /* the ram address should be the last mbyte, AFAIK. Subtract one
>> > for the
>> >          * low 1 MB. So subtract 2K total 
>> >          */
>> >         set_memory_size(empty_zero_page, 0x3c00, totalram - 2048);
>> > 
>> > I haven't checked the details on this, but based on the behavior I saw
>> > trying to load the initrd image, either you don't subtract the low 1MB
>> > or you don't point to the last MB.
>> 
>> You do pass the memory size less 1MB to the kernel.  I don't know why
>> we are subtracting off 2MB here.   This wouldn't be an artifact of bad
>> AGP window handling would it?
> 
> that's my old code from way back. You pull off two mb (as I
> recall) because you're passing in the address of the last mb, and you have
> total size, so you knock off 1 mb for the low 1mb, and then another mb
> since you're passing in the last address, not size. 
> 
> 
> But I might be wrong.

The behavior I saw suggests that this is wrong.  Also, consider a "unit
analysis".  If you are passing a ram size then it doesn't make sense to
knock off the top Meg.  If you are passing an address to the last Meg
then it doesn't make sense to knock off the bottom Meg.  You are
suggesting that we are supposed to pass the offset to the start of the
last Meg starting at the end of the first Meg.  Thought technically
possible this woulnd't make much sense and is maximally complex.

It may be that you came to the conclusion by reading two different
interpretations of why you need to knock off a Meg and combined them to
reach the conclusion that you should knock off 2 Megs.

It may also be that either the kernel is inconsistent in how it handles
the memory size or that I have made some mistake.  ...I don't think I
have made a mistake.

Ty

-- 
Tyson D Sawyer                             iRobot Corporation
Senior Systems Engineer                    Real World Interface Div.
[EMAIL PROTECTED]                         Robots for the Real World
603-532-6900 ext 206                       http://www.irobot.com

Reply via email to