Commit 1688e82a authored by Russell King's avatar Russell King

[ARM] Fix signedness of address comparisons, causing boots on some

ARM platforms to fail.
parent 584a7cc6
...@@ -151,7 +151,7 @@ not_angel: ...@@ -151,7 +151,7 @@ not_angel:
add r1, r1, r0 @ table. This fixes up the add r1, r1, r0 @ table. This fixes up the
str r1, [r6], #4 @ C references. str r1, [r6], #4 @ C references.
cmp r6, ip cmp r6, ip
blt 1b blo 1b
not_relocated: mov r0, #0 not_relocated: mov r0, #0
1: str r0, [r2], #4 @ clear bss 1: str r0, [r2], #4 @ clear bss
...@@ -159,7 +159,7 @@ not_relocated: mov r0, #0 ...@@ -159,7 +159,7 @@ not_relocated: mov r0, #0
str r0, [r2], #4 str r0, [r2], #4
str r0, [r2], #4 str r0, [r2], #4
cmp r2, r3 cmp r2, r3
blt 1b blo 1b
mrc p15, 0, r6, c0, c0 @ get processor ID mrc p15, 0, r6, c0, c0 @ get processor ID
bl cache_on bl cache_on
...@@ -206,7 +206,7 @@ not_relocated: mov r0, #0 ...@@ -206,7 +206,7 @@ not_relocated: mov r0, #0
ldmia r2!, {r8 - r13} ldmia r2!, {r8 - r13}
stmia r1!, {r8 - r13} stmia r1!, {r8 - r13}
cmp r2, r3 cmp r2, r3
blt 1b blo 1b
bl cache_clean_flush bl cache_clean_flush
add pc, r5, r0 @ call relocation code add pc, r5, r0 @ call relocation code
...@@ -270,9 +270,9 @@ __cache_on: sub r3, r4, #16384 @ Page directory size ...@@ -270,9 +270,9 @@ __cache_on: sub r3, r4, #16384 @ Page directory size
orr r1, r1, #3 << 10 orr r1, r1, #3 << 10
add r2, r3, #16384 add r2, r3, #16384
1: cmp r1, r8 @ if virt > start of RAM 1: cmp r1, r8 @ if virt > start of RAM
orrge r1, r1, #0x0c @ set cacheable, bufferable orrhs r1, r1, #0x0c @ set cacheable, bufferable
cmp r1, r9 @ if virt > end of RAM cmp r1, r9 @ if virt > end of RAM
bicge r1, r1, #0x0c @ clear cacheable, bufferable bichs r1, r1, #0x0c @ clear cacheable, bufferable
str r1, [r0], #4 @ 1:1 mapping str r1, [r0], #4 @ 1:1 mapping
add r1, r1, #1048576 add r1, r1, #1048576
teq r0, r2 teq r0, r2
...@@ -330,7 +330,7 @@ reloc_start: add r8, r5, r0 ...@@ -330,7 +330,7 @@ reloc_start: add r8, r5, r0
.endr .endr
cmp r5, r8 cmp r5, r8
blt 1b blo 1b
debug_reloc_end debug_reloc_end
call_kernel: bl cache_clean_flush call_kernel: bl cache_clean_flush
......
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