[Fwd: [PATCH] PPC64: large INITRD causes kernel not to boot]

Milton Miller miltonm at bga.com
Thu Aug 11 12:11:02 EST 2005


On Aug 10, 2005, at 10:49 AM, Mark Bellon wrote:

> Milton Miller wrote:
>
>>>
>>> -    printf("\n\rzImage starting: loaded at 0x%x\n\r", 
>>> (unsigned)_start);
>>> +    printf("\n\rzImage starting: loaded at 0x%lx\n\r", (unsigned 
>>> long) _start);
>>> +
>>> +    /*
>>> +     * The first available claim_base must be above the end of the
>>> +     * the loaded kernel file (_start to _end) and rounded up to a
>>> +     * nice 1 MB boundary.
>>> +     */
>>> +
>>> +    claim_base = ((((unsigned long) _end) + ONE_MB - 1) / ONE_MB) * 
>>> ONE_MB;
>>>
>>>
>>
>> _start and _end here are the linked runtime range of the zImage 
>> program
>> not the kernel image contained therein.  This also contains the
>> initrd.
>>
>> Milton
>>
> Exactly. The claim_base needs to start after the kernel and initrd. 
> Since _end is above the "top" of the initrd it's perfect to use as the 
> base for the round up calculation for the starting claim_base.
>
> mark
>

My unstated request was to fix the misleading comment.  Change
"loaded kernel file" to something like "this running program" or
"image" or something.

Something to be aware of: the program gets loaded at load-base and
then the sections get moved to their linked area.  It is explicitly
stated that while the fw has to maintain the elf header, it does
*NOT* need to worry about overlaping source and desitination.

In other words, there is an implied copy from elf file loaded into
ram at ram-base to the _start,_end range that doesn't look for
overlap.

milton




More information about the Linuxppc64-dev mailing list