[U-Boot] [PATCH 0/2]: arm: Provide lowlevel_init C function wrapper for v7

Allen Martin amartin at nvidia.com
Wed Aug 15 20:14:00 CEST 2012


On Thu, Aug 09, 2012 at 09:01:54AM -0700, Tom Rini wrote:
> Hey all,
> 
> As Allen Martin noted, on tegra platforms a bug is exposed when using
> certain toolchains that currently calls to lowlevel_init must be calls
> to another assembly function as the stack is not explicitly setup /
> saved and thus register corruption can occur.  Over in TI-land Aneesh V
> wrote a lowlevel_init that sets up the stack and calls s_init which is a
> C function that does what lowlevel_init does on other platforms.  The
> code is generic to at least v7, so this series moves it to
> arch/arm/cpu/armv7.  The initial version of the code made use of
> LOW_LEVEL_SRAM_STACK as the stack to be setup.  This define is
> essentially another name for CONFIG_SYS_INIT_SP_ADDR without taking
> GENERATED_GBL_DATA_SIZE into consideration.  So we switch to that
> instead.  Finally, Wolfgang question me as to if the stack really only
> needed the alignment that we had been giving it.  To be safe, I grabbed
> the alignmnet that we do when setting up the initial stack for real and
> placed it into lowlevel_init as well.
> 
> Tested on AM335x GP EVM and OMAP4 Pandaboard ES2.
> 

Converted tegra to use the new lowlevel_init wrapper and tested on
seaboard.  Verified it works with the previously failing CodeSourcery
2011.09-70 toolchain.

I'll respin my tegra SPL series to depend on these.

-Allen


-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information.  Any unauthorized review, use, disclosure or distribution
is prohibited.  If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------


More information about the U-Boot mailing list