xref: /openbmc/linux/arch/s390/kernel/head64.S (revision b8b350af)
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright IBM Corp. 1999, 2010
4 *
5 *   Author(s):	Hartmut Penner <hp@de.ibm.com>
6 *		Martin Schwidefsky <schwidefsky@de.ibm.com>
7 *		Rob van der Heij <rvdhei@iae.nl>
8 *		Heiko Carstens <heiko.carstens@de.ibm.com>
9 *
10 */
11
12#include <linux/init.h>
13#include <linux/linkage.h>
14#include <asm/asm-offsets.h>
15#include <asm/thread_info.h>
16#include <asm/page.h>
17#include <asm/ptrace.h>
18
19__HEAD
20ENTRY(startup_continue)
21	larl	%r1,tod_clock_base
22	mvc	0(16,%r1),__LC_BOOT_CLOCK
23	larl	%r13,.LPG1		# get base
24	lctlg	%c0,%c15,.Lctl-.LPG1(%r13)	# load control registers
25#
26# Setup stack
27#
28	larl	%r14,init_task
29	stg	%r14,__LC_CURRENT
30	larl	%r15,init_thread_union+THREAD_SIZE-STACK_FRAME_OVERHEAD-__PT_SIZE
31#ifdef CONFIG_KASAN
32	brasl	%r14,kasan_early_init
33#endif
34	brasl	%r14,startup_init		# s390 specific early init
35	brasl	%r14,start_kernel		# common init code
36#
37# We returned from start_kernel ?!? PANIK
38#
39	basr	%r13,0
40	lpswe	.Ldw-.(%r13)		# load disabled wait psw
41
42	.align	16
43.LPG1:
44.Ldw:	.quad	0x0002000180000000,0x0000000000000000
45.Lctl:	.quad	0x04040000		# cr0: AFP registers & secondary space
46	.quad	0			# cr1: primary space segment table
47	.quad	0			# cr2: dispatchable unit control table
48	.quad	0			# cr3: instruction authorization
49	.quad	0xffff			# cr4: instruction authorization
50	.quad	0			# cr5: primary-aste origin
51	.quad	0			# cr6: I/O interrupts
52	.quad	0			# cr7: secondary space segment table
53	.quad	0x0000000000008000	# cr8: access registers translation
54	.quad	0			# cr9: tracing off
55	.quad	0			# cr10: tracing off
56	.quad	0			# cr11: tracing off
57	.quad	0			# cr12: tracing off
58	.quad	0			# cr13: home space segment table
59	.quad	0xc0000000		# cr14: machine check handling off
60	.quad	0			# cr15: linkage stack operations
61