aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/head.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/kernel/head.S')
-rw-r--r--arch/arm/kernel/head.S33
1 files changed, 17 insertions, 16 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S
index c5f0c52660b2..66db0a9bf0bc 100644
--- a/arch/arm/kernel/head.S
+++ b/arch/arm/kernel/head.S
@@ -252,6 +252,23 @@ __create_page_tables:
252 strls r3, [r0], #4 252 strls r3, [r0], #4
253 bls 1b 253 bls 1b
254 254
255#ifdef CONFIG_XIP_KERNEL
256 /*
257 * Map some ram to cover our .data and .bss areas.
258 */
259 orr r3, r7, #(KERNEL_RAM_PADDR & 0xff000000)
260 orr r3, r3, #(KERNEL_RAM_PADDR & 0x00f00000)
261 add r0, r4, #(KERNEL_RAM_VADDR & 0xff000000) >> 18
262 str r3, [r0, #(KERNEL_RAM_VADDR & 0x00f00000) >> 18]!
263 ldr r6, =(_end - 1)
264 add r0, r0, #4
265 add r6, r4, r6, lsr #18
2661: cmp r0, r6
267 add r3, r3, #1 << 20
268 strls r3, [r0], #4
269 bls 1b
270#endif
271
255 /* 272 /*
256 * Then map first 1MB of ram in case it contains our boot params. 273 * Then map first 1MB of ram in case it contains our boot params.
257 */ 274 */
@@ -260,22 +277,6 @@ __create_page_tables:
260 orr r6, r6, #(PHYS_OFFSET & 0x00e00000) 277 orr r6, r6, #(PHYS_OFFSET & 0x00e00000)
261 str r6, [r0] 278 str r6, [r0]
262 279
263#ifdef CONFIG_XIP_KERNEL
264 /*
265 * Map some ram to cover our .data and .bss areas.
266 * Mapping 3MB should be plenty.
267 */
268 sub r3, r4, #PHYS_OFFSET
269 mov r3, r3, lsr #20
270 add r0, r0, r3, lsl #2
271 add r6, r6, r3, lsl #20
272 str r6, [r0], #4
273 add r6, r6, #(1 << 20)
274 str r6, [r0], #4
275 add r6, r6, #(1 << 20)
276 str r6, [r0]
277#endif
278
279#ifdef CONFIG_DEBUG_LL 280#ifdef CONFIG_DEBUG_LL
280 ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags 281 ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags
281 /* 282 /*