2005-04-16 15:20:36 -07: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)
* /
# include < a s m / l o w c o r e . h >
2006-09-20 15:58:49 +02:00
.globl do_reipl_asm
do_reipl_asm : basr % r13 ,0
2005-04-16 15:20:36 -07:00
.Lpg0 : lpsw . L n e w p s w - . L p g 0 ( % r13 )
2006-09-20 15:58:49 +02:00
# switch o f f l o w c o r e p r o t e c t i o n
.Lpg1 : stctl % c0 ,% c0 ,. L c t l s a v e 1 - . L p g 0 ( % r13 )
stctl % c0 ,% c0 ,. L c t l s a v e 2 - . L p g 0 ( % r13 )
ni . L c t l s a v e 1 - . L p g 0 ( % r13 ) ,0 x e f
lctl % c0 ,% c0 ,. L c t l s a v e 1 - . L p g 0 ( % r13 )
# 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
stm % r0 ,% r15 ,_ _ L C _ G P R E G S _ S A V E _ A R E A
stctl % c0 ,% c15 ,_ _ L C _ C R E G S _ S A V E _ A R E A
mvc _ _ L C _ C R E G S _ S A V E _ A R E A ( 4 ) ,. L c t l s a v e 2 - . L p g 0 ( % r13 )
stam % a0 ,% a15 ,_ _ L C _ A R E G S _ S A V E _ A R E A
stpx _ _ L C _ P R E F I X _ S A V E _ A R E A
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 ( 8 ) ,. 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
st % r13 , _ _ L C _ P S W _ S A V E _ A R E A + 4
lctl % c6 ,% c6 ,. L a l l - . L p g 0 ( % r13 )
2005-04-16 15:20:36 -07:00
lr % r1 ,% r2
mvc _ _ L C _ P G M _ N E W _ P S W ( 8 ) ,. 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 )
lhi % 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 ( 8 ) ,. L i o n e w - . L p g 0 ( % r13 )
.Ltpi : lpsw . 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
lpsw 0
sigp 0 ,0 ,0 ( 6 )
.Ldisab : st % r14 ,. L d i s p s w + 4 - . L p g 0 ( % r13 )
lpsw . L d i s p s w - . L p g 0 ( % r13 )
.align 8
2006-09-20 15:58:49 +02:00
.Lclkcmp : .quad 0x0000000000000000
2005-04-16 15:20:36 -07:00
.Lall : .long 0xff000000
.Lnull : .long 0x00000000
2006-09-20 15:58:49 +02:00
.Lctlsave1 : .long 0x00000000
.Lctlsave2 : .long 0x00000000
2005-04-16 15:20:36 -07:00
.align 8
.Lnewpsw : .long 0 x0 0 0 8 0 0 0 0 ,0 x80 0 0 0 0 0 0 + . L p g 1
.Lpcnew : .long 0 x0 0 0 8 0 0 0 0 ,0 x80 0 0 0 0 0 0 + . L e c s
.Lionew : .long 0 x0 0 0 8 0 0 0 0 ,0 x80 0 0 0 0 0 0 + . L c o n t
.Lwaitpsw : .long 0 x0 2 0 a00 0 0 ,0 x00 0 0 0 0 0 0 + . L t p i
.Ldispsw : .long 0 x0 0 0 a00 0 0 ,0 x00 0 0 0 0 0 0
.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