summaryrefslogtreecommitdiffstats
path: root/arch/arm/boards/beaglebone
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/beaglebone
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/beaglebone')
-rw-r--r--arch/arm/boards/beaglebone/lowlevel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/boards/beaglebone/lowlevel.c b/arch/arm/boards/beaglebone/lowlevel.c
index 2f3b3df9c3..be775a884d 100644
--- a/arch/arm/boards/beaglebone/lowlevel.c
+++ b/arch/arm/boards/beaglebone/lowlevel.c
@@ -10,6 +10,7 @@
#include <mach/sys_info.h>
#include <mach/syslib.h>
#include <mach/am33xx-mux.h>
+#include <mach/am33xx-generic.h>
#include <mach/wdt.h>
/* UART Defines */
@@ -251,7 +252,7 @@ static int beaglebone_board_init(void)
void __bare_init __naked barebox_arm_reset_vector(uint32_t *data)
{
- omap_save_bootinfo();
+ am33xx_save_bootinfo(data);
arm_cpu_lowlevel_init();