diff options
Diffstat (limited to 'arch/xtensa/kernel/head.S')
-rw-r--r-- | arch/xtensa/kernel/head.S | 37 |
1 files changed, 27 insertions, 10 deletions
diff --git a/arch/xtensa/kernel/head.S b/arch/xtensa/kernel/head.S index 4566683abc8d..ef12c0e6fa25 100644 --- a/arch/xtensa/kernel/head.S +++ b/arch/xtensa/kernel/head.S | |||
@@ -48,17 +48,36 @@ | |||
48 | */ | 48 | */ |
49 | 49 | ||
50 | __HEAD | 50 | __HEAD |
51 | .begin no-absolute-literals | ||
52 | |||
51 | ENTRY(_start) | 53 | ENTRY(_start) |
52 | 54 | ||
53 | _j 2f | 55 | /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */ |
56 | wsr a2, excsave1 | ||
57 | _j _SetupMMU | ||
58 | |||
59 | .align 4 | ||
60 | .literal_position | ||
61 | .Lstartup: | ||
62 | .word _startup | ||
63 | |||
54 | .align 4 | 64 | .align 4 |
55 | 1: .word _startup | 65 | .global _SetupMMU |
56 | 2: l32r a0, 1b | 66 | _SetupMMU: |
67 | Offset = _SetupMMU - _start | ||
68 | |||
69 | #ifdef CONFIG_INITIALIZE_XTENSA_MMU_INSIDE_VMLINUX | ||
70 | initialize_mmu | ||
71 | #endif | ||
72 | .end no-absolute-literals | ||
73 | |||
74 | l32r a0, .Lstartup | ||
57 | jx a0 | 75 | jx a0 |
58 | 76 | ||
59 | ENDPROC(_start) | 77 | ENDPROC(_start) |
60 | 78 | ||
61 | .section .init.text, "ax" | 79 | __INIT |
80 | .literal_position | ||
62 | 81 | ||
63 | ENTRY(_startup) | 82 | ENTRY(_startup) |
64 | 83 | ||
@@ -67,10 +86,6 @@ ENTRY(_startup) | |||
67 | movi a0, LOCKLEVEL | 86 | movi a0, LOCKLEVEL |
68 | wsr a0, ps | 87 | wsr a0, ps |
69 | 88 | ||
70 | /* Preserve the pointer to the boot parameter list in EXCSAVE_1 */ | ||
71 | |||
72 | wsr a2, excsave1 | ||
73 | |||
74 | /* Start with a fresh windowbase and windowstart. */ | 89 | /* Start with a fresh windowbase and windowstart. */ |
75 | 90 | ||
76 | movi a1, 1 | 91 | movi a1, 1 |
@@ -158,8 +173,6 @@ ENTRY(_startup) | |||
158 | 173 | ||
159 | isync | 174 | isync |
160 | 175 | ||
161 | initialize_mmu | ||
162 | |||
163 | /* Unpack data sections | 176 | /* Unpack data sections |
164 | * | 177 | * |
165 | * The linker script used to build the Linux kernel image | 178 | * The linker script used to build the Linux kernel image |
@@ -207,6 +220,10 @@ ENTRY(_startup) | |||
207 | 220 | ||
208 | ___flush_dcache_all a2 a3 | 221 | ___flush_dcache_all a2 a3 |
209 | #endif | 222 | #endif |
223 | memw | ||
224 | isync | ||
225 | ___invalidate_icache_all a2 a3 | ||
226 | isync | ||
210 | 227 | ||
211 | /* Setup stack and enable window exceptions (keep irqs disabled) */ | 228 | /* Setup stack and enable window exceptions (keep irqs disabled) */ |
212 | 229 | ||