Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279723
b: refs/heads/master
c: 0079fe7
h: refs/heads/master
i:
  279721: e6c05b1
  279719: 5c76075
v: v3
  • Loading branch information
Greg Ungerer committed Dec 30, 2011
1 parent 353b6d1 commit ada4401
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: feb1ee759522eb67e7733fe5b59bd17420f4d2d8
refs/heads/master: 0079fe7502b45c2dbec6d04541e637484191c393
47 changes: 46 additions & 1 deletion trunk/arch/m68k/platform/coldfire/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/*
* head.S -- common startup code for ColdFire CPUs.
*
* (C) Copyright 1999-2010, Greg Ungerer <gerg@snapgear.com>.
* (C) Copyright 1999-2011, Greg Ungerer <gerg@snapgear.com>.
*/

/*****************************************************************************/
Expand All @@ -13,6 +13,7 @@
#include <asm/asm-offsets.h>
#include <asm/coldfire.h>
#include <asm/mcfsim.h>
#include <asm/mcfmmu.h>
#include <asm/thread_info.h>

/*****************************************************************************/
Expand Down Expand Up @@ -135,6 +136,14 @@ _init_sp:

__HEAD

#ifdef CONFIG_MMU
_start0:
jmp _start
.global kernel_pg_dir
.equ kernel_pg_dir,_start0
.equ .,_start0+0x1000
#endif

/*
* This is the codes first entry point. This is where it all
* begins...
Expand Down Expand Up @@ -193,6 +202,26 @@ _start:
movec %d0,%CACR
nop

#ifdef CONFIG_MMU
/*
* Identity mapping for the kernel region.
*/
movel #(MMUBASE+1),%d0 /* enable MMUBAR registers */
movec %d0,%MMUBAR
movel #MMUOR_CA,%d0 /* clear TLB entries */
movel %d0,MMUOR
movel #0,%d0 /* set ASID to 0 */
movec %d0,%asid

movel #MMUCR_EN,%d0 /* Enable the identity map */
movel %d0,MMUCR
nop /* sync i-pipeline */

movel #_vstart,%a0 /* jump to "virtual" space */
jmp %a0@
_vstart:
#endif /* CONFIG_MMU */

#ifdef CONFIG_ROMFS_FS
/*
* Move ROM filesystem above bss :-)
Expand Down Expand Up @@ -238,6 +267,22 @@ _clear_bss:
lea init_thread_union,%a0
lea THREAD_SIZE(%a0),%sp

#ifdef CONFIG_MMU
.global m68k_cputype
.global m68k_mmutype
.global m68k_fputype
.global m68k_machtype
movel #CPU_COLDFIRE,%d0
movel %d0,m68k_cputype /* Mark us as a ColdFire */
movel #MMU_COLDFIRE,%d0
movel %d0,m68k_mmutype
movel #FPU_COLDFIRE,%d0
movel %d0,m68k_fputype
movel #MACH_M54XX,%d0
movel %d0,m68k_machtype /* Mark us as a 54xx machine */
lea init_task,%a2 /* Set "current" init task */
#endif

/*
* Assember start up done, start code proper.
*/
Expand Down

0 comments on commit ada4401

Please sign in to comment.