dect
/
linux-2.6
Archived
13
0
Fork 0

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>
This commit is contained in:
Nicolas Pitre 2011-04-21 22:52:06 -04:00 committed by Nicolas Pitre
parent adcc25915b
commit ea9df3b168
1 changed files with 2 additions and 1 deletions

View File

@ -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