1 ! Copyright 2005,2006,2007,2009 Imagination Technologies
3 #include <linux/init.h>
4 #include <asm/metag_mem.h>
5 #include <generated/asm-offsets.h>
9 ! Setup the stack and get going into _metag_start_kernel
11 .type __start,function
13 ! D1Ar1 contains pTBI (ISTAT)
15 ! D1Ar3 contains __pTBISegs
16 ! D0Ar4 contains kernel arglist pointer
18 MOVT D0Re0,#HI(___pTBIs)
19 ADD D0Re0,D0Re0,#LO(___pTBIs)
20 SETL [D0Re0],D0Ar2,D1Ar1
21 MOVT D0Re0,#HI(___pTBISegs)
22 ADD D0Re0,D0Re0,#LO(___pTBISegs)
28 MOV D1Ar1,D0Ar4 !Store kernel boot params
31 #ifdef CONFIG_METAG_DSP
34 MOVT A0StP,#HI(_init_thread_union)
35 ADD A0StP,A0StP,#LO(_init_thread_union)
36 ADD A0StP,A0StP,#THREAD_INFO_SIZE
37 MOVT D1RtP,#HI(_metag_start_kernel)
38 CALL D1RtP,#LO(_metag_start_kernel)
39 .size __start,.-__start
45 XOR TXENABLE,D0Re0,D0Re0
49 .global _secondary_startup
50 .type _secondary_startup,function
52 #if CONFIG_PAGE_OFFSET < LINGLOBAL_BASE
53 ! In case GCOn has just been turned on we need to fence any writes that
54 ! the boot thread might have performed prior to coherency taking effect.
55 MOVT D0Re0,#HI(LINSYSEVENT_WR_ATOMIC_UNLOCK)
59 MOVT A0StP,#HI(_secondary_data_stack)
60 ADD A0StP,A0StP,#LO(_secondary_data_stack)
62 ADD A0StP,A0StP,#THREAD_INFO_SIZE
63 B _secondary_start_kernel
64 .size _secondary_startup,.-_secondary_startup