2005-04-17 02:20:36 +04:00
/ *
2009-03-26 17:24:57 +03:00
* Copyright I B M C o r p 2 0 0 0 ,2 0 0 9
* Author( s ) : H o l g e r S m o l i n s k i < H o l g e r . S m o l i n s k i @de.ibm.com>,
* Denis J o s e p h B a r r o w ,
2005-04-17 02:20:36 +04:00
* /
2010-02-27 00:37:43 +03:00
# include < a s m / a s m - o f f s e t s . h >
2007-03-06 01:35:43 +03:00
#
# do_ r e i p l _ a s m
# Parameter : r2 = s c h i d o f r e i p l d e v i c e
#
2006-09-20 17:58:49 +04:00
.globl do_reipl_asm
do_reipl_asm : basr % r13 ,0
2006-12-04 17:40:26 +03:00
.Lpg0 : lpswe . L n e w p s w - . L p g 0 ( % r13 )
.Lpg1 : # do s t o r e s t a t u s o f a l l r e g i s t e r s
2006-09-20 17:58:49 +04:00
2006-12-04 17:40:26 +03:00
stg % r1 ,. L r e g s a v e - . L p g 0 ( % r13 )
2006-09-20 17:58:49 +04:00
lghi % r1 ,0 x10 0 0
stmg % r0 ,% r15 ,_ _ L C _ G P R E G S _ S A V E _ A R E A - 0 x10 0 0 ( % r1 )
lg % r0 ,. L r e g s a v e - . L p g 0 ( % r13 )
stg % r0 ,_ _ L C _ G P R E G S _ S A V E _ A R E A - 0 x10 0 0 + 8 ( % r1 )
stctg % c0 ,% c15 ,_ _ L C _ C R E G S _ S A V E _ A R E A - 0 x10 0 0 ( % r1 )
stam % a0 ,% a15 ,_ _ L C _ A R E G S _ S A V E _ A R E A - 0 x10 0 0 ( % r1 )
2007-03-06 01:35:43 +03:00
lg % r10 ,. L d u m p _ p f x - . L p g 0 ( % r13 )
mvc _ _ L C _ P R E F I X _ S A V E _ A R E A - 0 x10 0 0 ( 4 ,% r1 ) ,0 ( % r10 )
2006-09-20 17:58:49 +04:00
stfpc _ _ L C _ F P _ C R E G _ S A V E _ A R E A - 0 x10 0 0 ( % r1 )
stckc . L c l k c m p - . L p g 0 ( % r13 )
2009-03-26 17:24:57 +03:00
mvc _ _ L C _ C L O C K _ C O M P _ S A V E _ A R E A - 0 x10 0 0 ( 7 ,% r1 ) ,. L c l k c m p - . L p g 0 ( % r13 )
2006-09-20 17:58:49 +04:00
stpt _ _ L C _ C P U _ T I M E R _ S A V E _ A R E A - 0 x10 0 0 ( % r1 )
stg % r13 , _ _ L C _ P S W _ S A V E _ A R E A - 0 x10 0 0 + 8 ( % r1 )
2006-12-04 17:40:26 +03:00
lctlg % c6 ,% c6 ,. L a l l - . L p g 0 ( % r13 )
2006-09-28 18:56:37 +04:00
lgr % r1 ,% r2
mvc _ _ L C _ P G M _ N E W _ P S W ( 1 6 ) ,. L p c n e w - . L p g 0 ( % r13 )
stsch . L s c h i b - . L p g 0 ( % r13 )
oi . L s c h i b + 5 - . L p g 0 ( % r13 ) ,0 x84
.Lecs : xi . L s c h i b + 2 7 - . L p g 0 ( % r13 ) ,0 x01
msch . L s c h i b - . L p g 0 ( % r13 )
lghi % r0 ,5
.Lssch : ssch . L i p l o r b - . L p g 0 ( % r13 )
2005-04-17 02:20:36 +04:00
jz . L 0 0 1
2006-09-28 18:56:37 +04:00
brct % r0 ,. L s s c h
2005-04-17 02:20:36 +04:00
bas % r14 ,. L d i s a b - . L p g 0 ( % r13 )
2006-09-28 18:56:37 +04:00
.L001 : mvc _ _ L C _ I O _ N E W _ P S W ( 1 6 ) ,. L i o n e w - . L p g 0 ( % r13 )
.Ltpi : lpswe . L w a i t p s w - . L p g 0 ( % r13 )
2005-04-17 02:20:36 +04:00
.Lcont : c % r1 ,_ _ L C _ S U B C H A N N E L _ I D
jnz . L t p i
clc _ _ L C _ I O _ I N T _ P A R M ( 4 ) ,. L i p l o r b - . L p g 0 ( % r13 )
jnz . L t p i
2006-09-28 18:56:37 +04:00
tsch . L i p l i r b - . L p g 0 ( % r13 )
2005-04-17 02:20:36 +04:00
tm . L i p l i r b + 9 - . L p g 0 ( % r13 ) ,0 x b f
2006-09-28 18:56:37 +04:00
jz . L 0 0 2
bas % r14 ,. L d i s a b - . L p g 0 ( % r13 )
.L002 : tm . L i p l i r b + 8 - . L p g 0 ( % r13 ) ,0 x f3
jz . L 0 0 3
bas % r14 ,. L d i s a b - . L p g 0 ( % r13 )
2006-12-04 17:40:26 +03:00
.L003 : st % r1 ,_ _ L C _ S U B C H A N N E L _ I D
2006-09-28 18:56:37 +04:00
lhi % r1 ,0 # m o d e 0 = e s a
slr % r0 ,% r0 # s e t c p u i d t o z e r o
sigp % r1 ,% r0 ,0 x12 # s w i t c h t o e s a m o d e
lpsw 0
.Ldisab : sll % r14 ,1
srl % r14 ,1 # n e e d t o k i l l h i b i t t o a v o i d s p e c i f i c a t i o n e x c e p t i o n s .
st % r14 ,. L d i s p s w + 1 2 - . L p g 0 ( % r13 )
2005-04-17 02:20:36 +04:00
lpswe . L d i s p s w - . L p g 0 ( % r13 )
2006-09-28 18:56:37 +04:00
.align 8
2006-09-20 17:58:49 +04:00
.Lclkcmp : .quad 0x0000000000000000
2005-04-17 02:20:36 +04:00
.Lall : .quad 0x00000000ff000000
2007-03-06 01:35:43 +03:00
.Ldump_pfx : .quad dump_prefix_page
2006-09-20 17:58:49 +04:00
.Lregsave : .quad 0x0000000000000000
2006-09-28 18:56:37 +04:00
.align 16
2005-04-17 02:20:36 +04:00
/ *
* These a d d r e s s e s h a v e t o b e 3 1 b i t o t h e r w i s e
* the s i g p w i l l t h r o w a s p e c i f c a t i o n e x c e p t i o n
* when s w i t c h i n g t o E S A m o d e a s b i t 3 1 b e s e t
* in t h e E S A p s w .
* Bit 3 1 o f t h e a d d r e s s e s h a s t o b e 0 f o r t h e
* 3 1 bit l p s w e i n s t r u c t i o n a f a c t t h e y a p p e a r t o h a v e
* ommited f r o m t h e p o p .
* /
2006-09-28 18:56:37 +04:00
.Lnewpsw : .quad 0x0000000080000000
.quad .Lpg1
.Lpcnew : .quad 0x0000000080000000
.quad .Lecs
.Lionew : .quad 0x0000000080000000
.quad .Lcont
2005-04-17 02:20:36 +04:00
.Lwaitpsw : .quad 0x0202000080000000
2006-09-28 18:56:37 +04:00
.quad .Ltpi
.Ldispsw : .quad 0x0002000080000000
.quad 0x0000000000000000
.Liplccws : .long 0 x0 2 0 0 0 0 0 0 ,0 x60 0 0 0 0 1 8
.long 0 x0 8 0 0 0 0 0 8 ,0 x20 0 0 0 0 0 1
2005-04-17 02:20:36 +04:00
.Liplorb : .long 0 x0 0 4 9 5 0 4 c ,0 x00 4 0 f f80
.long 0 x0 0 0 0 0 0 0 0 + . L i p l c c w s
2006-09-28 18:56:37 +04:00
.Lschib : .long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
2005-04-17 02:20:36 +04:00
.Liplirb : .long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0
.long 0 x0 0 0 0 0 0 0 0 ,0 x00 0 0 0 0 0 0