[U-Boot] previous two e-mails are RFC/demonstration!
Reinhard Meyer
u-boot at emk-elektronik.de
Sun Nov 14 20:42:24 CET 2010
Dear Wolfgang Denk,
> Dear Reinhard Meyer,
>
> and - do they compile? Do they work?
Compile and work on top9000 = at91sam9xe = arm926ejs.
Since no tricks are used anymore, it is very likely
this will work on all other ARM variants or even on all
architectures with a similar GLOBAL_DATA method.
I made this patch as demo/reference to show how simple it is.
Honestly, it should have sprung into someones' eyes long ago,
but sometimes simple solutions hide themselves well :)
TODOs:
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?
2. All board config files (for ARM) should be similarly updated:
-#define CONFIG_SYS_INIT_SP_ADDR \
- (ATMEL_BASE_SRAM + 0x4000 - GENERATED_GBL_DATA_SIZE)
+#define CONFIG_SYS_INIT_SP_ADDR (ATMEL_BASE_SRAM + 0x4000)
However, having the subtraction does not hurt except for wasted
memory.
3. After this, GENERATED_GBL_DATA_SIZE is not needed anymore
(for ARM).
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.
5. Test the change for other architectures.
Best Regards,
Reinhard
More information about the U-Boot
mailing list