Skip to content

Commit

Permalink
ARM: zImage: the page table memory must be considered before relocation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Pitre authored and Nicolas Pitre committed May 7, 2011
1 parent adcc259 commit ea9df3b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm/boot/compressed/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea9df3b

Please sign in to comment.