[U-Boot] [RFC PATCH 6/7] omap: common spl support for OMAP3/4

Andreas Bießmann andreas.devel at googlemail.com
Sun Jul 3 09:31:44 CEST 2011


Dear Albert Aribaud,

Am 03.07.2011 um 08:56 schrieb Albert ARIBAUD:

> Hi Aneesh,
> 
> Le 03/07/2011 06:47, Aneesh V a écrit :
>> Hi Albert,
>> 
>> On Saturday 02 July 2011 01:21 AM, Albert ARIBAUD wrote:
>>> Hi Aneesh,
>>> 

<snip>

>> I was thinking of doing that in start.S itself. I haven't looked at
>> all the details though.
>> 
>> BTW, please note that I am not trying to support disjoint BSS in
>> regular u-boot. I think it becomes complex with relocation + it doesn't
>> seem to be worth when all SDRAM is at our disposal.
>> 
>> So:
>> 1. #ifdef CONFIG_PRELOADER part in start.s will just pass __bss_start
>> and __bss_end to the clear_bss function(assumes no relocation).
>> 2. #else part of above will assume that bss follows text and data(or at
>> least that __bss_start > _start), so add relocation offset to
>> __bss_start and __bss_end, and pass them to the clear_bss()
>> 
>> Does that sound ok?
> 
> (note clear_bss is not a function in arch/arm/cpu/armv7/start.S, it is only a label)
> 
> So, considering what is already in arch/arm/cpu/armv7/start.S, you would just add a conditional variant to the BSS clearing code for the preloader case?
> 
> If so, and considering that you'll pass an offset of 0, why would you need that variant for? With offset=0, the code already does what you want, does it not?

we are looking forward to have relocate_code(), clear_bss(), a.s.o. implemented in c in future (as I understood the discussion around christmas about relocation).
Wouldn't it be nice to implement now a SPL version of clear_bss(int start, int size)  in c and skip the relocate_code() stuff in start.S completely?

As I see the normal way to boot is:

-> some start vector
 -> lowlevel_init
  -> board_init_f
   -> relocate_code
    -> board_init_r

for SPL we do not need the steps after board_init_f. board_init_f for SPL should implement the generic way to load data from predefined (compile time) source to predefined target address and branch it. Therefore a simple memset() in board_init_f could be sufficient to clear the bss.

regards

Andreas Bießmann


More information about the U-Boot mailing list