Commit ea9df3b1 authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Nicolas Pitre

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: default avatarNicolas Pitre <nicolas.pitre@linaro.org>
Tested-by: default avatarShawn Guo <shawn.guo@linaro.org>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
parent adcc2591
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment