aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
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
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')
-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
216 * r9 = size of decompressed image 216 * r9 = size of decompressed image
217 * r10 = end of this image, including bss/stack/malloc space if non XIP 217 * r10 = end of this image, including bss/stack/malloc space if non XIP
218 * We basically want: 218 * We basically want:
219 * r4 >= r10 -> OK 219 * r4 - 16k page directory >= r10 -> OK
220 * r4 + image length <= current position (pc) -> OK 220 * r4 + image length <= current position (pc) -> OK
221 */ 221 */
222 add r10, r10, #16384
222 cmp r4, r10 223 cmp r4, r10
223 bhs wont_overwrite 224 bhs wont_overwrite
224 add r10, r4, r9 225 add r10, r4, r9