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