diff options
author | Tony Lindgren <tony@atomide.com> | 2011-04-26 08:37:46 -0400 |
---|---|---|
committer | Nicolas Pitre <nico@fluxnic.net> | 2011-05-06 23:56:43 -0400 |
commit | 7c2527f0c4bf6bd096f58296597e1373387d69fd (patch) | |
tree | a140c9d2864d3949b91a8265f93a0447bafcee71 /arch/arm | |
parent | 3bd2cbb95543acf44fe123eb9f038de54e655eb4 (diff) |
ARM: zImage: Fix bad SP address after relocating kernel
Otherwise cache_clean_flush can overwrite some of the relocated
area depending on where the kernel image gets loaded. This fixes
booting on n900 after commit 6d7d0ae51574943bf571d269da3243257a2d15db
(ARM: 6750/1: improvements to compressed/head.S).
Thanks to Aaro Koskinen <aaro.koskinen@nokia.com> for debugging
the address of the relocated area that gets corrupted, and to
Nicolas Pitre <nicolas.pitre@linaro.org> for the other uncompress
related fixes.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/boot/compressed/head.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S index 84ac4d656310..55a5bcb82ba0 100644 --- a/arch/arm/boot/compressed/head.S +++ b/arch/arm/boot/compressed/head.S | |||
@@ -253,6 +253,11 @@ restart: adr r0, LC0 | |||
253 | /* Preserve offset to relocated code. */ | 253 | /* Preserve offset to relocated code. */ |
254 | sub r6, r9, r6 | 254 | sub r6, r9, r6 |
255 | 255 | ||
256 | #ifndef CONFIG_ZBOOT_ROM | ||
257 | /* cache_clean_flush may use the stack, so relocate it */ | ||
258 | add sp, sp, r6 | ||
259 | #endif | ||
260 | |||
256 | bl cache_clean_flush | 261 | bl cache_clean_flush |
257 | 262 | ||
258 | adr r0, BSYM(restart) | 263 | adr r0, BSYM(restart) |