diff options
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/kernel/head.S | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 767390449e0a..dd6b369ac69c 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S | |||
@@ -22,6 +22,10 @@ | |||
22 | #include <asm/thread_info.h> | 22 | #include <asm/thread_info.h> |
23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
24 | 24 | ||
25 | #ifdef CONFIG_DEBUG_LL | ||
26 | #include <mach/debug-macro.S> | ||
27 | #endif | ||
28 | |||
25 | #if (PHYS_OFFSET & 0x001fffff) | 29 | #if (PHYS_OFFSET & 0x001fffff) |
26 | #error "PHYS_OFFSET must be at an even 2MiB boundary!" | 30 | #error "PHYS_OFFSET must be at an even 2MiB boundary!" |
27 | #endif | 31 | #endif |
@@ -204,24 +208,35 @@ __create_page_tables: | |||
204 | str r6, [r0] | 208 | str r6, [r0] |
205 | 209 | ||
206 | #ifdef CONFIG_DEBUG_LL | 210 | #ifdef CONFIG_DEBUG_LL |
207 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags | 211 | #ifndef CONFIG_DEBUG_ICEDCC |
208 | /* | 212 | /* |
209 | * Map in IO space for serial debugging. | 213 | * Map in IO space for serial debugging. |
210 | * This allows debug messages to be output | 214 | * This allows debug messages to be output |
211 | * via a serial console before paging_init. | 215 | * via a serial console before paging_init. |
212 | */ | 216 | */ |
213 | ldr r3, [r8, #MACHINFO_PGOFFIO] | 217 | addruart r7, r3 |
218 | |||
219 | mov r3, r3, lsr #20 | ||
220 | mov r3, r3, lsl #2 | ||
221 | |||
214 | add r0, r4, r3 | 222 | add r0, r4, r3 |
215 | rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long) | 223 | rsb r3, r3, #0x4000 @ PTRS_PER_PGD*sizeof(long) |
216 | cmp r3, #0x0800 @ limit to 512MB | 224 | cmp r3, #0x0800 @ limit to 512MB |
217 | movhi r3, #0x0800 | 225 | movhi r3, #0x0800 |
218 | add r6, r0, r3 | 226 | add r6, r0, r3 |
219 | ldr r3, [r8, #MACHINFO_PHYSIO] | 227 | mov r3, r7, lsr #20 |
220 | orr r3, r3, r7 | 228 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags |
229 | orr r3, r7, r3, lsl #20 | ||
221 | 1: str r3, [r0], #4 | 230 | 1: str r3, [r0], #4 |
222 | add r3, r3, #1 << 20 | 231 | add r3, r3, #1 << 20 |
223 | teq r0, r6 | 232 | teq r0, r6 |
224 | bne 1b | 233 | bne 1b |
234 | |||
235 | #else /* CONFIG_DEBUG_ICEDCC */ | ||
236 | /* we don't need any serial debugging mappings for ICEDCC */ | ||
237 | ldr r7, [r10, #PROCINFO_IO_MMUFLAGS] @ io_mmuflags | ||
238 | #endif /* !CONFIG_DEBUG_ICEDCC */ | ||
239 | |||
225 | #if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_CATS) | 240 | #if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_CATS) |
226 | /* | 241 | /* |
227 | * If we're using the NetWinder or CATS, we also need to map | 242 | * If we're using the NetWinder or CATS, we also need to map |