Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 9 | #include <asm/lowcore.h> |
| 10 | |
Michael Holzheu | ff6b8ea | 2006-09-20 15:58:49 +0200 | [diff] [blame^] | 11 | .globl do_reipl_asm |
| 12 | do_reipl_asm: basr %r13,0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | .Lpg0: lpsw .Lnewpsw-.Lpg0(%r13) |
Michael Holzheu | ff6b8ea | 2006-09-20 15:58:49 +0200 | [diff] [blame^] | 14 | |
| 15 | # switch off lowcore protection |
| 16 | |
| 17 | .Lpg1: stctl %c0,%c0,.Lctlsave1-.Lpg0(%r13) |
| 18 | stctl %c0,%c0,.Lctlsave2-.Lpg0(%r13) |
| 19 | ni .Lctlsave1-.Lpg0(%r13),0xef |
| 20 | lctl %c0,%c0,.Lctlsave1-.Lpg0(%r13) |
| 21 | |
| 22 | # do store status of all registers |
| 23 | |
| 24 | stm %r0,%r15,__LC_GPREGS_SAVE_AREA |
| 25 | stctl %c0,%c15,__LC_CREGS_SAVE_AREA |
| 26 | mvc __LC_CREGS_SAVE_AREA(4),.Lctlsave2-.Lpg0(%r13) |
| 27 | stam %a0,%a15,__LC_AREGS_SAVE_AREA |
| 28 | stpx __LC_PREFIX_SAVE_AREA |
| 29 | stckc .Lclkcmp-.Lpg0(%r13) |
| 30 | mvc __LC_CLOCK_COMP_SAVE_AREA(8),.Lclkcmp-.Lpg0(%r13) |
| 31 | stpt __LC_CPU_TIMER_SAVE_AREA |
| 32 | st %r13, __LC_PSW_SAVE_AREA+4 |
| 33 | |
| 34 | lctl %c6,%c6,.Lall-.Lpg0(%r13) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 35 | lr %r1,%r2 |
| 36 | mvc __LC_PGM_NEW_PSW(8),.Lpcnew-.Lpg0(%r13) |
| 37 | stsch .Lschib-.Lpg0(%r13) |
| 38 | oi .Lschib+5-.Lpg0(%r13),0x84 |
| 39 | .Lecs: xi .Lschib+27-.Lpg0(%r13),0x01 |
| 40 | msch .Lschib-.Lpg0(%r13) |
| 41 | lhi %r0,5 |
| 42 | .Lssch: ssch .Liplorb-.Lpg0(%r13) |
| 43 | jz .L001 |
| 44 | brct %r0,.Lssch |
| 45 | bas %r14,.Ldisab-.Lpg0(%r13) |
| 46 | .L001: mvc __LC_IO_NEW_PSW(8),.Lionew-.Lpg0(%r13) |
| 47 | .Ltpi: lpsw .Lwaitpsw-.Lpg0(%r13) |
| 48 | .Lcont: c %r1,__LC_SUBCHANNEL_ID |
| 49 | jnz .Ltpi |
| 50 | clc __LC_IO_INT_PARM(4),.Liplorb-.Lpg0(%r13) |
| 51 | jnz .Ltpi |
| 52 | tsch .Liplirb-.Lpg0(%r13) |
| 53 | tm .Liplirb+9-.Lpg0(%r13),0xbf |
| 54 | jz .L002 |
| 55 | bas %r14,.Ldisab-.Lpg0(%r13) |
| 56 | .L002: tm .Liplirb+8-.Lpg0(%r13),0xf3 |
| 57 | jz .L003 |
| 58 | bas %r14,.Ldisab-.Lpg0(%r13) |
| 59 | .L003: spx .Lnull-.Lpg0(%r13) |
| 60 | st %r1,__LC_SUBCHANNEL_ID |
| 61 | lpsw 0 |
| 62 | sigp 0,0,0(6) |
| 63 | .Ldisab: st %r14,.Ldispsw+4-.Lpg0(%r13) |
| 64 | lpsw .Ldispsw-.Lpg0(%r13) |
| 65 | .align 8 |
Michael Holzheu | ff6b8ea | 2006-09-20 15:58:49 +0200 | [diff] [blame^] | 66 | .Lclkcmp: .quad 0x0000000000000000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | .Lall: .long 0xff000000 |
| 68 | .Lnull: .long 0x00000000 |
Michael Holzheu | ff6b8ea | 2006-09-20 15:58:49 +0200 | [diff] [blame^] | 69 | .Lctlsave1: .long 0x00000000 |
| 70 | .Lctlsave2: .long 0x00000000 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | .align 8 |
| 72 | .Lnewpsw: .long 0x00080000,0x80000000+.Lpg1 |
| 73 | .Lpcnew: .long 0x00080000,0x80000000+.Lecs |
| 74 | .Lionew: .long 0x00080000,0x80000000+.Lcont |
| 75 | .Lwaitpsw: .long 0x020a0000,0x00000000+.Ltpi |
| 76 | .Ldispsw: .long 0x000a0000,0x00000000 |
| 77 | .Liplccws: .long 0x02000000,0x60000018 |
| 78 | .long 0x08000008,0x20000001 |
| 79 | .Liplorb: .long 0x0049504c,0x0040ff80 |
| 80 | .long 0x00000000+.Liplccws |
| 81 | .Lschib: .long 0x00000000,0x00000000 |
| 82 | .long 0x00000000,0x00000000 |
| 83 | .long 0x00000000,0x00000000 |
| 84 | .long 0x00000000,0x00000000 |
| 85 | .long 0x00000000,0x00000000 |
| 86 | .long 0x00000000,0x00000000 |
| 87 | .Liplirb: .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 |
| 94 | .long 0x00000000,0x00000000 |
| 95 | |
| 96 | |
| 97 | |