aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/head.S
diff options
context:
space:
mode:
authorRob Herring <rob.herring@calxeda.com>2011-02-02 10:33:17 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-02-17 18:27:33 -0500
commit4d901c4271951d110afb13ee9aa73d27a6c8e53d (patch)
tree3ac2bd52f6029f382399cf15cf35abe568401818 /arch/arm/kernel/head.S
parentcada3c0841e1deaec4c0f92654610b028dc683ff (diff)
ARM: 6648/1: map ATAGs when not in first 1MB of RAM
If ATAGs or DTB pointer is not within first 1MB of RAM, then the boot params will not be mapped early enough, so map the 1MB region that r2 points to. Only map the first 1MB when r2 is 0. Some assembly improvements from Nicolas Pitre. Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Rob Herring <rob.herring@calxeda.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/head.S')
-rw-r--r--arch/arm/kernel/head.S14
1 files changed, 10 insertions, 4 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index a94dd99d54c3..591a2ead8cef 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -206,11 +206,17 @@ __create_page_tables:
206#endif 206#endif
207 207
208 /* 208 /*
209 * Then map first 1MB of ram in case it contains our boot params. 209 * Then map boot params address in r2 or
210 * the first 1MB of ram if boot params address is not specified.
210 */ 211 */
211 add r0, r4, #PAGE_OFFSET >> 18 212 mov r0, r2, lsr #20
212 orr r6, r7, r8 213 movs r0, r0, lsl #20
213 str r6, [r0] 214 moveq r0, r8
215 sub r3, r0, r8
216 add r3, r3, #PAGE_OFFSET
217 add r3, r4, r3, lsr #18
218 orr r6, r7, r0
219 str r6, [r3]
214 220
215#ifdef CONFIG_DEBUG_LL 221#ifdef CONFIG_DEBUG_LL
216#ifndef CONFIG_DEBUG_ICEDCC 222#ifndef CONFIG_DEBUG_ICEDCC