[U-Boot] [PATCH v4 07/13] davinci: Use correct #ifdef around gdata/bdata

Scott Wood scottwood at freescale.com
Tue Feb 28 23:03:38 CET 2012


On 02/28/2012 03:55 PM, Albert ARIBAUD wrote:
> Le 27/02/2012 13:02, Sughosh Ganu a écrit :
> 
>>> When I asked Heiko Schocher a few month ago why he defined putc and
>>> puts in arch/arm/cpu/arm926ejs/davinci/spl.c he replied that he could
>>> not use LIBCOMMON due to size limitations for the SPL. So I guess that
>>> this board will not be able to use the generic relocation functions,
>>> unless the SPL is smaller than 16kB, right? Simon's patchset will
>>> break this board then, right?
>>
>>    That is exactly what i reported in one of the threads in response to
>>    addition of libcommon and libgeneric to the hawkboard's spl. In
>>    fact, this might cause problems on quite a few boards with spl size
>>    restrictions. I am not sure, whether the generic relocation feature
>>    should be turned on by default on all boards or should be a config
>>    option -- at least for the spl builds. Another option would be to
>>    move it to a place where it is not needed to compile in the entire
>>    libcommon/libgeneric support that is not needed for the generic
>>    relocation code. I think that would help us keep the generic
>>    relocation without the size bloat that we see right now.
>>
>>    http://lists.denx.de/pipermail/u-boot/2012-February/118567.html
> 
> Sorry for appearing dumb, but can someone explain to me how SPL relates
> to relocation in the first place? I thought SPL was meant to be a
> preloader for the full(er) U-boot, small enough to be loaded by some
> SoCs' ROM code and possibly even to fit in SRAM. Why does it need
> relocation? And if it does not, how come it is affected by a rework of
> the relocation feature? I really would like a heads-up on this.

SPL may need relocation to vacate a buffer that will be used for further
I/O, such as on Freescale PPC (NAND boot execution begins in the NAND
controller's SRAM), or possibly to allow the memory map to be
transformed to what the final image is going to expect, etc.

Even in cases where the SPL text itself doesn't really need to move, you
may need some other things that typically happen along with relocation,
such as moving the stack to a larger memory after that memory is
initialized, zeroing BSS, etc.

-Scott



More information about the U-Boot mailing list