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>
1 parent be32276 commit 65504828dd886292380ae422bf15a070baaa387b
@Sascha Hauer Sascha Hauer authored on 22 Aug 2013
Showing 15 changed files
View
arch/arm/boards/archosg9/lowlevel.c
View
arch/arm/boards/beagle/lowlevel.c
View
arch/arm/boards/beaglebone/lowlevel.c
View
arch/arm/boards/omap343xdsp/lowlevel.c
View
arch/arm/boards/omap3evm/lowlevel.c
View
arch/arm/boards/panda/lowlevel.c
View
arch/arm/boards/pcm049/lowlevel.c
View
arch/arm/boards/pcm051/lowlevel.c
View
arch/arm/boards/phycard-a-l1/lowlevel.c
View
arch/arm/boards/phycard-a-xl2/lowlevel.c
View
arch/arm/mach-omap/include/mach/am33xx-generic.h
View
arch/arm/mach-omap/include/mach/am33xx-silicon.h
View
arch/arm/mach-omap/include/mach/generic.h
View
arch/arm/mach-omap/include/mach/omap3-generic.h 0 → 100644
View
arch/arm/mach-omap/include/mach/omap4-generic.h 0 → 100644