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

Mark Bellon mbellon at mvista.com
Tue Aug 9 06:19:37 EST 2005


Olaf Hering wrote:

> On Mon, Aug 08, Mark Bellon wrote:
>
>  
>
>>I see your point. but I've got practical issues that I want to avoid:  
>>I've got platforms that claim only part of the space south of 4MB and 
>>_start is usually 4MB (a hole); starting at zero would not do nice 
>>things in some cases. I felt my coding prevents any possibility of 
>>problems by simply removing the chance of a collision.
>>    
>>
>
>Yes, try_claim could return an address below _start if size is small enough.
>
>  
>
>>That initrd image is not claimed in your approach and it sits 
>>immediately about _end. It would need to be claimed as well.
>>    
>>
>
>No, initrd is moved to initrd.addr.
>  
>
But the claim could come back right in the middle of the initrd image 
inside the ELF file (which is what happens in my case). The _end is the 
end of the (compressed) kernel code, not the end of file contain the 
vmlinuz with the initrd in it.

Claiming part of the ELF image is no insurance that claims will not come 
back in the middle of the entire image. Only explicit claims covering 
everything or starting the claim_base about the entire image insure all 
data.

>>How about this? Claim everything in the loaded ELF file from _start 
>>explicitly with claim_start initialized at _start?
>>    
>>
>
>This is really only required for brokenfirmware implementations. I have
>seen it on IBM B50. Maybe older 64bit systems like 170 or 260 are broken
>as well. So you claim once from _start to _end, and set claim_base to
>_end.
>  
>
As I pointed out this is not enough when the firmware is broken. The 
claim that succeeds can be in the middle of things. My change works on 
all platform regardless of the firmware (trust nobody).

I've got a firmware that cannot claim below 48 MB. I can't protect the 
loaded image with a claim. try_claim would land up being very high up 
and useless.

>>However I still like my approach saving time especially with a huge INITRD.
>>    
>>
>
>Does a claim take so much time? Maybe I misunderstood this part?
>  
>
If the code used claim to grab the kernel ELF pieces, leaving claim_base 
at zero then using try_claim to grab memory will be very inefficient 
when the ELF imiage is huge - many retries that are wasted to get to the 
good zone.

mark



More information about the Linuxppc64-dev mailing list