diff options
-rw-r--r-- | arch/m68k/platform/coldfire/head.S | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/arch/m68k/platform/coldfire/head.S b/arch/m68k/platform/coldfire/head.S index 49666b4dd091..38f04a3f6207 100644 --- a/arch/m68k/platform/coldfire/head.S +++ b/arch/m68k/platform/coldfire/head.S | |||
@@ -3,7 +3,7 @@ | |||
3 | /* | 3 | /* |
4 | * head.S -- common startup code for ColdFire CPUs. | 4 | * head.S -- common startup code for ColdFire CPUs. |
5 | * | 5 | * |
6 | * (C) Copyright 1999-2010, Greg Ungerer <gerg@snapgear.com>. | 6 | * (C) Copyright 1999-2011, Greg Ungerer <gerg@snapgear.com>. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | /*****************************************************************************/ | 9 | /*****************************************************************************/ |
@@ -13,6 +13,7 @@ | |||
13 | #include <asm/asm-offsets.h> | 13 | #include <asm/asm-offsets.h> |
14 | #include <asm/coldfire.h> | 14 | #include <asm/coldfire.h> |
15 | #include <asm/mcfsim.h> | 15 | #include <asm/mcfsim.h> |
16 | #include <asm/mcfmmu.h> | ||
16 | #include <asm/thread_info.h> | 17 | #include <asm/thread_info.h> |
17 | 18 | ||
18 | /*****************************************************************************/ | 19 | /*****************************************************************************/ |
@@ -135,6 +136,14 @@ _init_sp: | |||
135 | 136 | ||
136 | __HEAD | 137 | __HEAD |
137 | 138 | ||
139 | #ifdef CONFIG_MMU | ||
140 | _start0: | ||
141 | jmp _start | ||
142 | .global kernel_pg_dir | ||
143 | .equ kernel_pg_dir,_start0 | ||
144 | .equ .,_start0+0x1000 | ||
145 | #endif | ||
146 | |||
138 | /* | 147 | /* |
139 | * This is the codes first entry point. This is where it all | 148 | * This is the codes first entry point. This is where it all |
140 | * begins... | 149 | * begins... |
@@ -193,6 +202,26 @@ _start: | |||
193 | movec %d0,%CACR | 202 | movec %d0,%CACR |
194 | nop | 203 | nop |
195 | 204 | ||
205 | #ifdef CONFIG_MMU | ||
206 | /* | ||
207 | * Identity mapping for the kernel region. | ||
208 | */ | ||
209 | movel #(MMUBASE+1),%d0 /* enable MMUBAR registers */ | ||
210 | movec %d0,%MMUBAR | ||
211 | movel #MMUOR_CA,%d0 /* clear TLB entries */ | ||
212 | movel %d0,MMUOR | ||
213 | movel #0,%d0 /* set ASID to 0 */ | ||
214 | movec %d0,%asid | ||
215 | |||
216 | movel #MMUCR_EN,%d0 /* Enable the identity map */ | ||
217 | movel %d0,MMUCR | ||
218 | nop /* sync i-pipeline */ | ||
219 | |||
220 | movel #_vstart,%a0 /* jump to "virtual" space */ | ||
221 | jmp %a0@ | ||
222 | _vstart: | ||
223 | #endif /* CONFIG_MMU */ | ||
224 | |||
196 | #ifdef CONFIG_ROMFS_FS | 225 | #ifdef CONFIG_ROMFS_FS |
197 | /* | 226 | /* |
198 | * Move ROM filesystem above bss :-) | 227 | * Move ROM filesystem above bss :-) |
@@ -238,6 +267,22 @@ _clear_bss: | |||
238 | lea init_thread_union,%a0 | 267 | lea init_thread_union,%a0 |
239 | lea THREAD_SIZE(%a0),%sp | 268 | lea THREAD_SIZE(%a0),%sp |
240 | 269 | ||
270 | #ifdef CONFIG_MMU | ||
271 | .global m68k_cputype | ||
272 | .global m68k_mmutype | ||
273 | .global m68k_fputype | ||
274 | .global m68k_machtype | ||
275 | movel #CPU_COLDFIRE,%d0 | ||
276 | movel %d0,m68k_cputype /* Mark us as a ColdFire */ | ||
277 | movel #MMU_COLDFIRE,%d0 | ||
278 | movel %d0,m68k_mmutype | ||
279 | movel #FPU_COLDFIRE,%d0 | ||
280 | movel %d0,m68k_fputype | ||
281 | movel #MACH_M54XX,%d0 | ||
282 | movel %d0,m68k_machtype /* Mark us as a 54xx machine */ | ||
283 | lea init_task,%a2 /* Set "current" init task */ | ||
284 | #endif | ||
285 | |||
241 | /* | 286 | /* |
242 | * Assember start up done, start code proper. | 287 | * Assember start up done, start code proper. |
243 | */ | 288 | */ |