diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2014-06-12 08:11:21 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2014-06-13 06:22:35 +0200 |
commit | 352ddc86aeabef5aee5d7a78a433dbeb9c1c509f (patch) | |
tree | cf59ce9ae53aba12e38e51b2a75aa54acc4cd585 /arch/arm/cpu/setupc.S | |
parent | 3ce85ca4eb05d0d4aa50e21328315bd9fc74f4fd (diff) | |
download | barebox-352ddc86aeabef5aee5d7a78a433dbeb9c1c509f.tar.gz barebox-352ddc86aeabef5aee5d7a78a433dbeb9c1c509f.tar.xz |
ARM: uncompress.c: copy executable to SDRAM if necessary
We used to relocate the executable to the current address. This does
not work when the executable runs from a readonly location like for
example NOR Flash. Test if we run from inside the available memory and
if we do, relocate to the current address as before. Otherwise copy
the executable to the start of memory and relocate to that address.
While at it add some comments to the code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu/setupc.S')
-rw-r--r-- | arch/arm/cpu/setupc.S | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/arch/arm/cpu/setupc.S b/arch/arm/cpu/setupc.S index 7fd5d012f0..2df2683128 100644 --- a/arch/arm/cpu/setupc.S +++ b/arch/arm/cpu/setupc.S @@ -37,7 +37,6 @@ ENTRY(setup_c) mov pc, lr ENDPROC(setup_c) -#ifdef CONFIG_RELOCATABLE /* * void relocate_to_adr(unsigned long targetadr) * @@ -93,4 +92,3 @@ ENTRY(relocate_to_adr) mov pc, lr ENDPROC(relocate_to_adr) -#endif |