[U-Boot] previous two e-mails are RFC/demonstration!
Reinhard Meyer
u-boot at emk-elektronik.de
Sun Nov 14 21:33:52 CET 2010
Dear Albert ARIBAUD,
> Le 14/11/2010 20:42, Reinhard Meyer a écrit :
>
>> 1. I am quite sure that in arm/lib/board.c
>> __asm__ __volatile__("": : :"memory");
>> was never needed and definitely is not needed anymore.
>> Can anyone shed some light on why this was added?
>> Probably just copied from other architectures where some trickery
>> around gd was done?
>
> This kind of barrier is needed when the compiler might reorder code without seeing a dependency (I met such a case in the Marvell egiga driver code). Here, I don't see the reason offhand.
>
>> 4. start.S need just set the SP to CONFIG_SYS_INIT_SP_ADDR,
>> if one wants to be over-cautious extra alignment *can* be done.
>
> 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?
No, of course not.
Extra alignment code need not be added (to the first setting of SP)
anymore since CONFIG_SYS_INIT_SP_ADDR is well aligned when set
to the end of the storage area.
Adding extra alignment code was proposed in discussions a few days ago,
when GENERATED_GBL_DATA_SIZE was still subtracted.
Best Regards,
Reinhard
More information about the U-Boot
mailing list