]> asedeno.scripts.mit.edu Git - linux.git/blob - arch/s390/kernel/head64.S
Merge tag 'ecryptfs-5.3-rc1-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / arch / s390 / kernel / head64.S
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
20 ENTRY(startup_continue)
21         tm      __LC_STFLE_FAC_LIST+5,0x80      # LPP available ?
22         jz      0f
23         xc      __LC_LPP+1(7,0),__LC_LPP+1      # clear lpp and current_pid
24         mvi     __LC_LPP,0x80                   #   and set LPP_MAGIC
25         .insn   s,0xb2800000,__LC_LPP           # load program parameter
26 0:      larl    %r1,tod_clock_base
27         mvc     0(16,%r1),__LC_BOOT_CLOCK
28         larl    %r13,.LPG1              # get base
29         larl    %r0,boot_vdso_data
30         stg     %r0,__LC_VDSO_PER_CPU
31 #
32 # Setup stack
33 #
34         larl    %r14,init_task
35         stg     %r14,__LC_CURRENT
36         larl    %r15,init_thread_union+THREAD_SIZE-STACK_FRAME_OVERHEAD
37 #
38 # Early setup functions that may not rely on an initialized bss section,
39 # like moving the initrd. Returns with an initialized bss section.
40 #
41         brasl   %r14,startup_init_nobss
42 #
43 # Early machine initialization and detection functions.
44 #
45         brasl   %r14,startup_init
46
47 # check control registers
48         stctg   %c0,%c15,0(%r15)
49         oi      6(%r15),0x60            # enable sigp emergency & external call
50         oi      4(%r15),0x10            # switch on low address proctection
51         lctlg   %c0,%c15,0(%r15)
52
53         lam     0,15,.Laregs-.LPG1(%r13)        # load acrs needed by uaccess
54         brasl   %r14,start_kernel               # go to C code
55 #
56 # We returned from start_kernel ?!? PANIK
57 #
58         basr    %r13,0
59         lpswe   .Ldw-.(%r13)            # load disabled wait psw
60
61         .align  16
62 .LPG1:
63 .Lpcmsk:.quad   0x0000000180000000
64 .L4malign:.quad 0xffffffffffc00000
65 .Lscan2g:.quad  0x80000000 + 0x20000 - 8        # 2GB + 128K - 8
66 .Lnop:  .long   0x07000700
67 .Lparmaddr:
68         .quad   PARMAREA
69         .align  64
70 .Ldw:   .quad   0x0002000180000000,0x0000000000000000
71 .Laregs:.long   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0