diff options
Diffstat (limited to 'arch/arm/kernel/head-nommu.S')
-rw-r--r-- | arch/arm/kernel/head-nommu.S | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/arch/arm/kernel/head-nommu.S b/arch/arm/kernel/head-nommu.S index cc87e1765ed2..e5dfc2895e24 100644 --- a/arch/arm/kernel/head-nommu.S +++ b/arch/arm/kernel/head-nommu.S | |||
@@ -34,7 +34,7 @@ | |||
34 | */ | 34 | */ |
35 | .section ".text.head", "ax" | 35 | .section ".text.head", "ax" |
36 | ENTRY(stext) | 36 | ENTRY(stext) |
37 | msr cpsr_c, #PSR_F_BIT | PSR_I_BIT | SVC_MODE @ ensure svc mode | 37 | setmode PSR_F_BIT | PSR_I_BIT | SVC_MODE, r9 @ ensure svc mode |
38 | @ and irqs disabled | 38 | @ and irqs disabled |
39 | #ifndef CONFIG_CPU_CP15 | 39 | #ifndef CONFIG_CPU_CP15 |
40 | ldr r9, =CONFIG_PROCESSOR_ID | 40 | ldr r9, =CONFIG_PROCESSOR_ID |
@@ -50,8 +50,10 @@ ENTRY(stext) | |||
50 | 50 | ||
51 | ldr r13, __switch_data @ address to jump to after | 51 | ldr r13, __switch_data @ address to jump to after |
52 | @ the initialization is done | 52 | @ the initialization is done |
53 | adr lr, __after_proc_init @ return (PIC) address | 53 | adr lr, BSYM(__after_proc_init) @ return (PIC) address |
54 | add pc, r10, #PROCINFO_INITFUNC | 54 | ARM( add pc, r10, #PROCINFO_INITFUNC ) |
55 | THUMB( add r12, r10, #PROCINFO_INITFUNC ) | ||
56 | THUMB( mov pc, r12 ) | ||
55 | ENDPROC(stext) | 57 | ENDPROC(stext) |
56 | 58 | ||
57 | /* | 59 | /* |
@@ -59,7 +61,10 @@ ENDPROC(stext) | |||
59 | */ | 61 | */ |
60 | __after_proc_init: | 62 | __after_proc_init: |
61 | #ifdef CONFIG_CPU_CP15 | 63 | #ifdef CONFIG_CPU_CP15 |
62 | mrc p15, 0, r0, c1, c0, 0 @ read control reg | 64 | /* |
65 | * CP15 system control register value returned in r0 from | ||
66 | * the CPU init function. | ||
67 | */ | ||
63 | #ifdef CONFIG_ALIGNMENT_TRAP | 68 | #ifdef CONFIG_ALIGNMENT_TRAP |
64 | orr r0, r0, #CR_A | 69 | orr r0, r0, #CR_A |
65 | #else | 70 | #else |
@@ -82,7 +87,8 @@ __after_proc_init: | |||
82 | mcr p15, 0, r0, c1, c0, 0 @ write control reg | 87 | mcr p15, 0, r0, c1, c0, 0 @ write control reg |
83 | #endif /* CONFIG_CPU_CP15 */ | 88 | #endif /* CONFIG_CPU_CP15 */ |
84 | 89 | ||
85 | mov pc, r13 @ clear the BSS and jump | 90 | mov r3, r13 |
91 | mov pc, r3 @ clear the BSS and jump | ||
86 | @ to start_kernel | 92 | @ to start_kernel |
87 | ENDPROC(__after_proc_init) | 93 | ENDPROC(__after_proc_init) |
88 | .ltorg | 94 | .ltorg |