summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/panda
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/panda
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/panda')
-rw-r--r--arch/arm/boards/panda/lowlevel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/boards/panda/lowlevel.c b/arch/arm/boards/panda/lowlevel.c
index a21d55928c..205aaaf817 100644
--- a/arch/arm/boards/panda/lowlevel.c
+++ b/arch/arm/boards/panda/lowlevel.c
@@ -23,6 +23,7 @@
#include <mach/generic.h>
#include <mach/omap4-mux.h>
#include <mach/omap4-silicon.h>
+#include <mach/omap4-generic.h>
#include <mach/omap4-clock.h>
#include <mach/syslib.h>
#include <asm/barebox-arm.h>
@@ -80,7 +81,7 @@ static void noinline panda_init_lowlevel(void)
void __bare_init __naked barebox_arm_reset_vector(uint32_t *data)
{
- omap_save_bootinfo();
+ omap4_save_bootinfo(data);
arm_cpu_lowlevel_init();