summaryrefslogtreecommitdiff
path: root/arch/arm/boot
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2011-04-21 22:52:06 -0400
committerNicolas Pitre <nico@fluxnic.net>2011-05-07 00:07:58 -0400
commitea9df3b168e641e87dbf889afae16390119e4179 (patch)
treec7f9b4887efeb79fa55833424b2674338d99860f /arch/arm/boot
parentadcc25915b98e5752d51d66774ec4a61e50af3c5 (diff)
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/boot')
-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