diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2005-08-01 21:11:33 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-08-01 21:37:59 -0700 |
commit | 5d3f229fcd4409d3e182b204defc122eb7833535 (patch) | |
tree | 89db475baaf74bde17eedd7421edbd299504fc16 /arch/s390/kernel/relocate_kernel.S | |
parent | 4374ae10e5ef577d8fd73fdadcdb37149d8b3953 (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.S | 41 |
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 @@ * (C) Copyright IBM Corp. 2005 * * Author(s): Rolf Adelsberger <adelsberger@de.ibm.com> + * Heiko Carstens <heiko.carstens@de.ibm.com> * */ @@ -25,8 +26,31 @@ relocate_kernel: basr %r13,0 #base address .base: - spx zero64-.base(%r13) #absolute addressing mode stnsm sys_msk-.base(%r13),0xf8 #disable DAT and IRQ (external) + spx zero64-.base(%r13) #absolute addressing mode + stctl %c0,%c15,ctlregs-.base(%r13) + stm %r0,%r15,gprregs-.base(%r13) + la %r1,load_psw-.base(%r13) + mvc 0(8,%r0),0(%r1) + la %r0,.back-.base(%r13) + st %r0,4(%r0) + oi 4(%r0),0x80 + mvc 0x68(8,%r0),0(%r1) + la %r0,.back_pgm-.base(%r13) + st %r0,0x6c(%r0) + oi 0x6c(%r0),0x80 + lhi %r0,0 + diag %r0,%r0,0x308 + .back: + basr %r13,0 + .back_base: + oi have_diag308-.back_base(%r13),0x01 + lctl %c0,%c15,ctlregs-.back_base(%r13) + lm %r0,%r15,gprregs-.back_base(%r13) + j .start_reloc + .back_pgm: + lm %r0,%r15,gprregs-.base(%r13) + .start_reloc: lhi %r10,-1 #preparing the mask sll %r10,12 #shift it such that it becomes 0xf000 .top: @@ -63,6 +87,10 @@ o %r3,4(%r4) #or load address into psw st %r3,4(%r4) mvc 0(8,%r0),0(%r4) #copy psw to absolute address 0 + tm have_diag308-.base(%r13),0x01 + jno .no_diag308 + diag %r0,%r0,0x308 + .no_diag308: sr %r1,%r1 #clear %r1 sr %r2,%r2 #clear %r2 sigp %r1,%r2,0x12 #set cpuid to zero @@ -75,6 +103,17 @@ .long 0x00080000,0x80000000 sys_msk: .quad 0 + ctlregs: + .rept 16 + .long 0 + .endr + gprregs: + .rept 16 + .long 0 + .endr + have_diag308: + .byte 0 + .align 8 relocate_kernel_end: .globl relocate_kernel_len relocate_kernel_len: |