aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/relocate_kernel.S
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2005-08-02 00:11:33 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-08-02 00:37:59 -0400
commit5d3f229fcd4409d3e182b204defc122eb7833535 (patch)
tree89db475baaf74bde17eedd7421edbd299504fc16 /arch/s390/kernel/relocate_kernel.S
parent4374ae10e5ef577d8fd73fdadcdb37149d8b3953 (diff)
[PATCH] s390: kexec fixes and improvements.
Disable pseudo page fault handling before starting the new kernel and try to use diag308 to reset the machine. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/s390/kernel/relocate_kernel.S')
-rw-r--r--arch/s390/kernel/relocate_kernel.S41
1 files changed, 40 insertions, 1 deletions
diff --git a/arch/s390/kernel/relocate_kernel.S b/arch/s390/kernel/relocate_kernel.S
index d5e4a62fbb79..2a25ec7147ff 100644
--- a/arch/s390/kernel/relocate_kernel.S
+++ b/arch/s390/kernel/relocate_kernel.S
@@ -4,6 +4,7 @@
4 * (C) Copyright IBM Corp. 2005 4 * (C) Copyright IBM Corp. 2005
5 * 5 *
6 * Author(s): Rolf Adelsberger <adelsberger@de.ibm.com> 6 * Author(s): Rolf Adelsberger <adelsberger@de.ibm.com>
7 * Heiko Carstens <heiko.carstens@de.ibm.com>
7 * 8 *
8 */ 9 */
9 10
@@ -25,8 +26,31 @@
25 relocate_kernel: 26 relocate_kernel:
26 basr %r13,0 #base address 27 basr %r13,0 #base address
27 .base: 28 .base:
28 spx zero64-.base(%r13) #absolute addressing mode
29 stnsm sys_msk-.base(%r13),0xf8 #disable DAT and IRQ (external) 29 stnsm sys_msk-.base(%r13),0xf8 #disable DAT and IRQ (external)
30 spx zero64-.base(%r13) #absolute addressing mode
31 stctl %c0,%c15,ctlregs-.base(%r13)
32 stm %r0,%r15,gprregs-.base(%r13)
33 la %r1,load_psw-.base(%r13)
34 mvc 0(8,%r0),0(%r1)
35 la %r0,.back-.base(%r13)
36 st %r0,4(%r0)
37 oi 4(%r0),0x80
38 mvc 0x68(8,%r0),0(%r1)
39 la %r0,.back_pgm-.base(%r13)
40 st %r0,0x6c(%r0)
41 oi 0x6c(%r0),0x80
42 lhi %r0,0
43 diag %r0,%r0,0x308
44 .back:
45 basr %r13,0
46 .back_base:
47 oi have_diag308-.back_base(%r13),0x01
48 lctl %c0,%c15,ctlregs-.back_base(%r13)
49 lm %r0,%r15,gprregs-.back_base(%r13)
50 j .start_reloc
51 .back_pgm:
52 lm %r0,%r15,gprregs-.base(%r13)
53 .start_reloc:
30 lhi %r10,-1 #preparing the mask 54 lhi %r10,-1 #preparing the mask
31 sll %r10,12 #shift it such that it becomes 0xf000 55 sll %r10,12 #shift it such that it becomes 0xf000
32 .top: 56 .top:
@@ -63,6 +87,10 @@
63 o %r3,4(%r4) #or load address into psw 87 o %r3,4(%r4) #or load address into psw
64 st %r3,4(%r4) 88 st %r3,4(%r4)
65 mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0 89 mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0
90 tm have_diag308-.base(%r13),0x01
91 jno .no_diag308
92 diag %r0,%r0,0x308
93 .no_diag308:
66 sr %r1,%r1 #clear %r1 94 sr %r1,%r1 #clear %r1
67 sr %r2,%r2 #clear %r2 95 sr %r2,%r2 #clear %r2
68 sigp %r1,%r2,0x12 #set cpuid to zero 96 sigp %r1,%r2,0x12 #set cpuid to zero
@@ -75,6 +103,17 @@
75 .long 0x00080000,0x80000000 103 .long 0x00080000,0x80000000
76 sys_msk: 104 sys_msk:
77 .quad 0 105 .quad 0
106 ctlregs:
107 .rept 16
108 .long 0
109 .endr
110 gprregs:
111 .rept 16
112 .long 0
113 .endr
114 have_diag308:
115 .byte 0
116 .align 8
78 relocate_kernel_end: 117 relocate_kernel_end:
79 .globl relocate_kernel_len 118 .globl relocate_kernel_len
80 relocate_kernel_len: 119 relocate_kernel_len: