diff options
author | Tetsuyuki Kobayashi <koba@kmckk.co.jp> | 2012-07-06 21:14:20 +0000 |
---|---|---|
committer | Albert ARIBAUD <albert.u.boot@aribaud.net> | 2012-09-01 14:58:22 +0200 |
commit | 6f0dba85a92b55f67a3610241060caaa41b5939e (patch) | |
tree | e0bbc888c5d401a3661023bb736657cdaf3b637a /arch/arm/cpu/armv7/start.S | |
parent | cca60769fc46ed27edbcb915f95351e6bb577ee0 (diff) | |
download | u-boot-imx-6f0dba85a92b55f67a3610241060caaa41b5939e.zip u-boot-imx-6f0dba85a92b55f67a3610241060caaa41b5939e.tar.gz u-boot-imx-6f0dba85a92b55f67a3610241060caaa41b5939e.tar.bz2 |
arm: bugfix: save_boot_params_default accesses uninitalized stack when -O0
save_boot_params_default() in cpu.c accesses uninitialized stack area
when it compiled with -O0 (not optimized).
This patch removes save_boot_params_default() and put the equivalent in start.S
Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp>
Acked-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7/start.S')
-rw-r--r-- | arch/arm/cpu/armv7/start.S | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/cpu/armv7/start.S b/arch/arm/cpu/armv7/start.S index b06bafd..32658eb 100644 --- a/arch/arm/cpu/armv7/start.S +++ b/arch/arm/cpu/armv7/start.S @@ -305,6 +305,20 @@ ENDPROC(relocate_code) /************************************************************************* * + * void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3) + * __attribute__((weak)); + * + * Stack pointer is not yet initialized at this moment + * Don't save anything to stack even if compiled with -O0 + * + *************************************************************************/ +ENTRY(save_boot_params) + bx lr @ back to my caller +ENDPROC(save_boot_params) + .weak save_boot_params + +/************************************************************************* + * * cpu_init_cp15 * * Setup CP15 registers (cache, MMU, TLBs). The I-cache is turned on unless |