2005-04-17 02:20:36 +04:00
/ *
* arch/ s39 0 / k e r n e l / r e i p l . S
*
* S3 9 0 v e r s i o n
* Copyright ( C ) 2 0 0 0 I B M D e u t s c h l a n d E n t w i c k l u n g G m b H , I B M C o r p o r a t i o n
* 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 ( d j b a r r o w @de.ibm.com,barrow_dj@yahoo.com)
* /
# include < a s m / l o w c o r e . h >
2006-09-20 17:58:49 +04:00
.globl do_reipl_asm
do_reipl_asm : basr % r13 ,0
# 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
.Lpg0 : stg % r1 ,. L r e g s a v e - . L p g 0 ( % r13 )
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 )
stpx _ _ L C _ P R E F I X _ S A V E _ A R E A - 0 x10 0 0 ( % r1 )
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 )
mvc _ _ L C _ C L O C K _ C O M P _ S A V E _ A R E A - 0 x10 0 0 ( 8 ,% r1 ) ,. L c l k c m p - . L p g 0 ( % r13 )
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 )
lpswe . L n e w p s w - . L p g 0 ( % r13 )
2005-04-17 02:20:36 +04:00
.Lpg1 : lctlg % c6 ,% c6 ,. L a l l - . L p g 0 ( % r13 )
2006-09-20 17:58:49 +04:00
stctg % c0 ,% c0 ,. L r e g s a v e - . L p g 0 ( % r13 )
ni . L r e g s a v e + 4 - . L p g 0 ( % r13 ) ,0 x e f
lctlg % c0 ,% c0 ,. L r e g s a v e - . L p g 0 ( % r13 )
2005-04-17 02:20:36 +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 )
jz . L 0 0 1
brct % r0 ,. L s s c h
bas % r14 ,. L d i s a b - . L p g 0 ( % r13 )
.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 )
.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
tsch . L i p l i r b - . L p g 0 ( % r13 )
tm . L i p l i r b + 9 - . L p g 0 ( % r13 ) ,0 x b f
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 )
.L003 : spx . L n u l l - . L p g 0 ( % r13 )
st % r1 ,_ _ L C _ S U B C H A N N E L _ I D
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 )
lpswe . L d i s p s w - . L p g 0 ( % r13 )
.align 8
2006-09-20 17:58:49 +04:00
.Lclkcmp : .quad 0x0000000000000000
2005-04-17 02:20:36 +04:00
.Lall : .quad 0x00000000ff000000
2006-09-20 17:58:49 +04:00
.Lregsave : .quad 0x0000000000000000
2005-04-17 02:20:36 +04:00
.Lnull : .long 0x0000000000000000
.align 16
/ *
* 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 .
* /
.Lnewpsw : .quad 0x0000000080000000
.quad .Lpg1
.Lpcnew : .quad 0x0000000080000000
.quad .Lecs
.Lionew : .quad 0x0000000080000000
.quad .Lcont
.Lwaitpsw : .quad 0x0202000080000000
.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
.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
.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
.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