summaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-04-22 04:52:06 +0200
committerNicolas Pitre <nico@fluxnic.net>2011-05-07 06:07:58 +0200
commitea9df3b168e641e87dbf889afae16390119e4179 (patch)
treec7f9b4887efeb79fa55833424b2674338d99860f /arch/arm
parentARM: zImage: make sure not to relocate on top of the relocation code (diff)
downloadlinux-ea9df3b168e641e87dbf889afae16390119e4179.tar.xz
linux-ea9df3b168e641e87dbf889afae16390119e4179.zip
ARM: zImage: the page table memory must be considered before relocation
For correctness, the initial page table located right before the decompressed kernel should be considered when determining if relocation is required. Signed-off-by: Nicolas Pitre <nicolas.pitre@linaro.org> Tested-by: Shawn Guo <shawn.guo@linaro.org> Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/boot/compressed/head.S3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/boot/compressed/head.S b/arch/arm/boot/compressed/head.S
index 53dd5da84f8a..d1fd1cfca9c2 100644
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -216,9 +216,10 @@ restart: adr r0, LC0
* r9 = size of decompressed image
* r10 = end of this image, including bss/stack/malloc space if non XIP
* We basically want:
- * r4 >= r10 -> OK
+ * r4 - 16k page directory >= r10 -> OK
* r4 + image length <= current position (pc) -> OK
*/
+ add r10, r10, #16384
cmp r4, r10
bhs wont_overwrite
add r10, r4, r9