1 /* SPDX-License-Identifier: GPL-2.0 */
2 ! Copyright 2005,2006,2007,2009 Imagination Technologies
4 #include <linux/init.h>
5 #include <asm/metag_mem.h>
6 #include <generated/asm-offsets.h>
10 ! Setup the stack and get going into _metag_start_kernel
12 .type __start,function
14 ! D1Ar1 contains pTBI (ISTAT)
16 ! D1Ar3 contains __pTBISegs
17 ! D0Ar4 contains kernel arglist pointer
19 MOVT D0Re0,#HI(___pTBIs)
20 ADD D0Re0,D0Re0,#LO(___pTBIs)
21 SETL [D0Re0],D0Ar2,D1Ar1
22 MOVT D0Re0,#HI(___pTBISegs)
23 ADD D0Re0,D0Re0,#LO(___pTBISegs)
29 MOV D1Ar1,D0Ar4 !Store kernel boot params
32 #ifdef CONFIG_METAG_DSP
35 MOVT A0StP,#HI(_init_thread_union)
36 ADD A0StP,A0StP,#LO(_init_thread_union)
37 ADD A0StP,A0StP,#THREAD_INFO_SIZE
38 MOVT D1RtP,#HI(_metag_start_kernel)
39 CALL D1RtP,#LO(_metag_start_kernel)
40 .size __start,.-__start
46 XOR TXENABLE,D0Re0,D0Re0
50 .global _secondary_startup
51 .type _secondary_startup,function
53 #if CONFIG_PAGE_OFFSET < LINGLOBAL_BASE
54 ! In case GCOn has just been turned on we need to fence any writes that
55 ! the boot thread might have performed prior to coherency taking effect.
56 MOVT D0Re0,#HI(LINSYSEVENT_WR_ATOMIC_UNLOCK)
60 MOVT A0StP,#HI(_secondary_data_stack)
61 ADD A0StP,A0StP,#LO(_secondary_data_stack)
63 ADD A0StP,A0StP,#THREAD_INFO_SIZE
64 B _secondary_start_kernel
65 .size _secondary_startup,.-_secondary_startup