mirror of
https://github.com/Fishwaldo/u-boot.git
synced 2025-03-18 21:21:37 +00:00
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). Signed-off-by: Tetsuyuki Kobayashi <koba@kmckk.co.jp> Acked-by: Tom Rini <trini@ti.com>
This commit is contained in:
parent
816e392148
commit
fa042186b9
1 changed files with 7 additions and 1 deletions
|
@ -36,9 +36,15 @@
|
|||
#include <asm/system.h>
|
||||
#include <asm/cache.h>
|
||||
#include <asm/armv7.h>
|
||||
#include <linux/compiler.h>
|
||||
|
||||
void save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3)
|
||||
void __naked save_boot_params_default(u32 r0, u32 r1, u32 r2, u32 r3)
|
||||
{
|
||||
/*
|
||||
* Stack pointer is not yet initialized
|
||||
* Don't save anything to stack even if compiled with -O0
|
||||
*/
|
||||
asm("bx lr");
|
||||
}
|
||||
|
||||
void save_boot_params(u32 r0, u32 r1, u32 r2, u32 r3)
|
||||
|
|
Loading…
Add table
Reference in a new issue