blob: ad67c214be047df4c6ddb02f65b0b645de152258 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*
2 * arch/s390/kernel/reipl.S
3 *
4 * S390 version
5 * Copyright (C) 2000 IBM Deutschland Entwicklung GmbH, IBM Corporation
6 * Author(s): Holger Smolinski (Holger.Smolinski@de.ibm.com)
7 */
8
Jan Glauber144d6342011-07-24 10:48:19 +02009#include <linux/linkage.h>
Heiko Carstenscbb870c2010-02-26 22:37:43 +010010#include <asm/asm-offsets.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -070011
Heiko Carstensc5dd8582007-03-05 23:35:43 +010012#
Michael Holzheu60a0c682011-10-30 15:16:40 +010013# store_status: Empty implementation until kdump is supported on 31 bit
14#
15ENTRY(store_status)
16 br %r14
17
18#
Heiko Carstensc5dd8582007-03-05 23:35:43 +010019# do_reipl_asm
20# Parameter: r2 = schid of reipl device
21#
Jan Glauber144d6342011-07-24 10:48:19 +020022ENTRY(do_reipl_asm)
23 basr %r13,0
Linus Torvalds1da177e2005-04-16 15:20:36 -070024.Lpg0: lpsw .Lnewpsw-.Lpg0(%r13)
Heiko Carstens15e9b582006-12-04 15:40:26 +010025.Lpg1: # do store status of all registers
Michael Holzheuff6b8ea2006-09-20 15:58:49 +020026
27 stm %r0,%r15,__LC_GPREGS_SAVE_AREA
28 stctl %c0,%c15,__LC_CREGS_SAVE_AREA
Michael Holzheuff6b8ea2006-09-20 15:58:49 +020029 stam %a0,%a15,__LC_AREGS_SAVE_AREA
Heiko Carstensc5dd8582007-03-05 23:35:43 +010030 l %r10,.Ldump_pfx-.Lpg0(%r13)
31 mvc __LC_PREFIX_SAVE_AREA(4),0(%r10)
Michael Holzheuff6b8ea2006-09-20 15:58:49 +020032 stckc .Lclkcmp-.Lpg0(%r13)
33 mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13)
34 stpt __LC_CPU_TIMER_SAVE_AREA
35 st %r13, __LC_PSW_SAVE_AREA+4
Michael Holzheuff6b8ea2006-09-20 15:58:49 +020036 lctl %c6,%c6,.Lall-.Lpg0(%r13)
Heiko Carstens25d83cb2006-09-28 16:56:37 +020037 lr %r1,%r2
38 mvc __LC_PGM_NEW_PSW(8),.Lpcnew-.Lpg0(%r13)
39 stsch .Lschib-.Lpg0(%r13)
40 oi .Lschib+5-.Lpg0(%r13),0x84
41.Lecs: xi .Lschib+27-.Lpg0(%r13),0x01
42 msch .Lschib-.Lpg0(%r13)
43 lhi %r0,5
44.Lssch: ssch .Liplorb-.Lpg0(%r13)
Linus Torvalds1da177e2005-04-16 15:20:36 -070045 jz .L001
Heiko Carstens25d83cb2006-09-28 16:56:37 +020046 brct %r0,.Lssch
Linus Torvalds1da177e2005-04-16 15:20:36 -070047 bas %r14,.Ldisab-.Lpg0(%r13)
Heiko Carstens25d83cb2006-09-28 16:56:37 +020048.L001: mvc __LC_IO_NEW_PSW(8),.Lionew-.Lpg0(%r13)
49.Ltpi: lpsw .Lwaitpsw-.Lpg0(%r13)
Linus Torvalds1da177e2005-04-16 15:20:36 -070050.Lcont: c %r1,__LC_SUBCHANNEL_ID
51 jnz .Ltpi
52 clc __LC_IO_INT_PARM(4),.Liplorb-.Lpg0(%r13)
53 jnz .Ltpi
Heiko Carstens25d83cb2006-09-28 16:56:37 +020054 tsch .Liplirb-.Lpg0(%r13)
Linus Torvalds1da177e2005-04-16 15:20:36 -070055 tm .Liplirb+9-.Lpg0(%r13),0xbf
Heiko Carstens25d83cb2006-09-28 16:56:37 +020056 jz .L002
57 bas %r14,.Ldisab-.Lpg0(%r13)
58.L002: tm .Liplirb+8-.Lpg0(%r13),0xf3
59 jz .L003
60 bas %r14,.Ldisab-.Lpg0(%r13)
Heiko Carstens15e9b582006-12-04 15:40:26 +010061.L003: st %r1,__LC_SUBCHANNEL_ID
Heiko Carstens25d83cb2006-09-28 16:56:37 +020062 lpsw 0
63 sigp 0,0,0(6)
64.Ldisab: st %r14,.Ldispsw+4-.Lpg0(%r13)
Linus Torvalds1da177e2005-04-16 15:20:36 -070065 lpsw .Ldispsw-.Lpg0(%r13)
Heiko Carstens25d83cb2006-09-28 16:56:37 +020066 .align 8
Michael Holzheuff6b8ea2006-09-20 15:58:49 +020067.Lclkcmp: .quad 0x0000000000000000
Linus Torvalds1da177e2005-04-16 15:20:36 -070068.Lall: .long 0xff000000
Heiko Carstensc5dd8582007-03-05 23:35:43 +010069.Ldump_pfx: .long dump_prefix_page
Heiko Carstens25d83cb2006-09-28 16:56:37 +020070 .align 8
71.Lnewpsw: .long 0x00080000,0x80000000+.Lpg1
72.Lpcnew: .long 0x00080000,0x80000000+.Lecs
73.Lionew: .long 0x00080000,0x80000000+.Lcont
Linus Torvalds1da177e2005-04-16 15:20:36 -070074.Lwaitpsw: .long 0x020a0000,0x00000000+.Ltpi
Heiko Carstens25d83cb2006-09-28 16:56:37 +020075.Ldispsw: .long 0x000a0000,0x00000000
76.Liplccws: .long 0x02000000,0x60000018
77 .long 0x08000008,0x20000001
Linus Torvalds1da177e2005-04-16 15:20:36 -070078.Liplorb: .long 0x0049504c,0x0040ff80
79 .long 0x00000000+.Liplccws
Heiko Carstens25d83cb2006-09-28 16:56:37 +020080.Lschib: .long 0x00000000,0x00000000
81 .long 0x00000000,0x00000000
82 .long 0x00000000,0x00000000
83 .long 0x00000000,0x00000000
84 .long 0x00000000,0x00000000
85 .long 0x00000000,0x00000000
Linus Torvalds1da177e2005-04-16 15:20:36 -070086.Liplirb: .long 0x00000000,0x00000000
87 .long 0x00000000,0x00000000
88 .long 0x00000000,0x00000000
89 .long 0x00000000,0x00000000
90 .long 0x00000000,0x00000000
91 .long 0x00000000,0x00000000
92 .long 0x00000000,0x00000000
93 .long 0x00000000,0x00000000