summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/omap3evm
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-08-22 20:39:29 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-08-27 07:12:33 +0200
commit65504828dd886292380ae422bf15a070baaa387b (patch)
tree4c3f54f78b5e5259d870f0775b97757e14d17602 /arch/arm/boards/omap3evm
parentbe322768f04603df371c9c1f08b9621690dd74c6 (diff)
downloadbarebox-65504828dd886292380ae422bf15a070baaa387b.tar.gz
barebox-65504828dd886292380ae422bf15a070baaa387b.tar.xz
ARM: omap: fix omap_save_bootinfo
omap_save_bootinfo derefences the argument passed to barebox without checking it for validity. This breaks 2nd stage booting where r0 is undefined. The best we can do is to check whether the pointer is somewhere in SRAM and is word aligned. This at least makes sure that we do not oops. This introduces SoC specific xxx_save_bootinfo variants since the SRAM addresses/sizes differ between SoCs. Additionally fix the prototype for omap_save_bootinfo. It uses r0, so it must be passed this variable. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/boards/omap3evm')
-rw-r--r--arch/arm/boards/omap3evm/lowlevel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/boards/omap3evm/lowlevel.c b/arch/arm/boards/omap3evm/lowlevel.c
index ea928357b4..98f1476bb5 100644
--- a/arch/arm/boards/omap3evm/lowlevel.c
+++ b/arch/arm/boards/omap3evm/lowlevel.c
@@ -9,6 +9,7 @@
#include <mach/control.h>
#include <mach/syslib.h>
#include <mach/omap3-silicon.h>
+#include <mach/omap3-generic.h>
#include <mach/sys_info.h>
@@ -162,7 +163,7 @@ static int omap3_evm_board_init(void)
void __naked __bare_init barebox_arm_reset_vector(uint32_t *data)
{
- omap_save_bootinfo();
+ omap3_save_bootinfo(data);
arm_cpu_lowlevel_init();