On Tue, Oct 5, 2010 at 4:40 PM, Graeme Russ <[email protected]> wrote:
> On Tue, Oct 5, 2010 at 4:34 PM, Wolfgang Denk <[email protected]> wrote:
>> Dear Graeme Russ,
>>
>> In message <[email protected]> 
>> you wrote:
>>>
>>> Can NAND SPL initialise and size memory before loading U-Boot into RAM?
>>
>> It has to. You cannot load into and run from uninitialized RAM ;-)
>>
>>> If so, could the relocation code be added to NAND SPL so only one copy
>>> operation is performed?
>>
>> I'm afraid it cannot, due to size limitations. The NAND loader often
>> hast to fit into as little a 2 or 4 KiB...
>>
>
> For x86, the actual relocation calculations can be done in a probably a
> few dozen bytes of code. It contains:
>
>  - One offset calculation
>  - A single tight loop
>  - Two comparisons (probably not needed in the generic case as they are used
>   to filter out x86 specific code outside .text)
>  - An offset addition
>
> If the only constraint is space then it _may_ be possible in some scenarios
> (although I do acknowledge that previous trival changes have caused the
> size constaint to be violated)
>

Another alternative is to load into upper memory and have the relocation
code detect that U-Boot is already there and skip the copy operation

Regards,

Graeme
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to