[U-Boot] Most ARM CPU's have buggy clear_bss?

Darius Augulis augulis.darius at gmail.com
Wed Oct 27 12:59:21 CEST 2010


On 10/27/2010 01:40 PM, Wolfgang Denk wrote:
> Dear Darius Augulis,
>
> In message<AANLkTimWZv=XBC1s1G8-=D6nAJ09poqHYP9RXHeTTM4q at mail.gmail.com>  you wrote:
>>
>>> I don't think we can define CONFIG_SKIP_RELOCATE_UBOOT with
>>> relocation enabled unless we ensure that the TEXT_BASE would be same
>>> as the relocation address.
>>
>> in case of nand_spl you don't need to to relocation twice because it's
>> done by preloader.
>
> Maybe, maybe not. The preloader is usually very simple and may not be
> clever enough to adjust the oad address to the avalable memory and
> such; also, U-Boot features like protected RAM, shared video buffers
> or log buffers may also require to dynamically adjust the final load
> address. In such cases relocation will be needed.

I confess I didn't understant you - why relocation could be needed in 
case of nand or other preloader? I have been thinking that main and 
single task of preloader is to copy uboot image from flash memory to 
main memory (SDRAM) where it's linked to (TEXT_BASE). Why one may need 
to relocate it twice (and where) ? IMO since uboot image is copied to 
TEXT_BASE it can run normaly, without fixing any address or relocating 
somewhere? It's enough to have dummy loader which initializes SDRAM and 
copies few pages from nand to SDRAM, isn't it? Why should it be more clever?
Also I've been thinking that relocation is needed only when booting 
directly from NOR flash, to have possibility to erase and program flash 
memory. Could you please point me where I'm wrong?

Thanks,
Darius

>
> Best regards,
>
> Wolfgang Denk
>



More information about the U-Boot mailing list