[U-Boot] previous two e-mails are RFC/demonstration!

Reinhard Meyer u-boot at emk-elektronik.de
Sun Nov 14 21:59:32 CET 2010


Dear All,
> Dear Albert ARIBAUD,
>
> In message<4CE04585.807 at free.fr>  you wrote:
>>
>> Currently start.S sets the stack twice, once before calling
>> board_init_f, and once in relocate_code. Are you suggesting we remove
>> the second sp setting?
>
> As relocation can move the stack to some completely different location
> the SP has to be re-initialized (in this setup, after copying the
> global data to their new location).

In the *most general* case stack and gd will have to be relocated
to SDRAM, since the pre-relocation memory *could* be locked data cache
or some buffer memory that is not free anymore when u-boot is up.

Of course, on SoCs like AT91SAM9 where several (4k - 32k) of SRAM are
available it would be tempting to keep stack and gd just in SRAM. But we
don't want to specialize, we want to generalize...

Best regards,
Reinhard


More information about the U-Boot mailing list