2005-04-17 02:20:36 +04:00
/ *
* arch/ p p c64 / k e r n e l / p S e r i e s _ h v C a l l . S
*
* This f i l e c o n t a i n s t h e g e n e r i c c o d e t o p e r f o r m a c a l l t o t h e
* pSeries L P A R h y p e r v i s o r .
* NOTE : this f i l e w i l l g o a w a y w h e n w e m o v e t o i n l i n e t h i s w o r k .
*
* This p r o g r a m i s f r e e s o f t w a r e ; you can redistribute it and/or
* modify i t u n d e r t h e t e r m s o f t h e G N U G e n e r a l P u b l i c L i c e n s e
* as p u b l i s h e d b y t h e F r e e S o f t w a r e F o u n d a t i o n ; either version
* 2 of t h e L i c e n s e , o r ( a t y o u r o p t i o n ) a n y l a t e r v e r s i o n .
* /
# include < a s m / h v c a l l . h >
# include < a s m / p r o c e s s o r . h >
# include < a s m / p p c _ a s m . h >
# define S T K _ P A R M ( i ) ( 4 8 + ( ( i ) - 3 ) * 8 )
.text
/ * long p l p a r _ h c a l l ( u n s i g n e d l o n g o p c o d e , R 3
unsigned l o n g a r g 1 , R 4
unsigned l o n g a r g 2 , R 5
unsigned l o n g a r g 3 , R 6
unsigned l o n g a r g 4 , R 7
unsigned l o n g * o u t 1 , R 8
unsigned l o n g * o u t 2 , R 9
unsigned l o n g * o u t 3 ) ; R10
* /
_ GLOBAL( p l p a r _ h c a l l )
2005-05-01 19:58:46 +04:00
HMT_ M E D I U M
2005-04-17 02:20:36 +04:00
mfcr r0
std r8 ,S T K _ P A R M ( r8 ) ( r1 ) / * S a v e o u t p t r s * /
std r9 ,S T K _ P A R M ( r9 ) ( r1 )
std r10 ,S T K _ P A R M ( r10 ) ( r1 )
stw r0 ,8 ( r1 )
HVSC / * i n v o k e t h e h y p e r v i s o r * /
lwz r0 ,8 ( r1 )
ld r8 ,S T K _ P A R M ( r8 ) ( r1 ) / * F e t c h r4 - r6 r e t a r g s * /
ld r9 ,S T K _ P A R M ( r9 ) ( r1 )
ld r10 ,S T K _ P A R M ( r10 ) ( r1 )
std r4 ,0 ( r8 )
std r5 ,0 ( r9 )
std r6 ,0 ( r10 )
mtcrf 0 x f f ,r0
blr / * r e t u r n r3 = s t a t u s * /
/* Simple interface with no output values (other than status) */
_ GLOBAL( p l p a r _ h c a l l _ n o r e t s )
2005-05-01 19:58:46 +04:00
HMT_ M E D I U M
2005-04-17 02:20:36 +04:00
mfcr r0
stw r0 ,8 ( r1 )
HVSC / * i n v o k e t h e h y p e r v i s o r * /
lwz r0 ,8 ( r1 )
mtcrf 0 x f f ,r0
blr / * r e t u r n r3 = s t a t u s * /
/ * long p l p a r _ h c a l l _ 8 a r g _ 2 r e t ( u n s i g n e d l o n g o p c o d e , R 3
unsigned l o n g a r g 1 , R 4
unsigned l o n g a r g 2 , R 5
unsigned l o n g a r g 3 , R 6
unsigned l o n g a r g 4 , R 7
unsigned l o n g a r g 5 , R 8
unsigned l o n g a r g 6 , R 9
unsigned l o n g a r g 7 , R 1 0
unsigned l o n g a r g 8 , 1 1 2 ( R 1 )
unsigned l o n g * o u t 1 ) ; 120(R1)
* /
_ GLOBAL( p l p a r _ h c a l l _ 8 a r g _ 2 r e t )
2005-05-01 19:58:46 +04:00
HMT_ M E D I U M
2005-04-17 02:20:36 +04:00
mfcr r0
ld r11 ,S T K _ P A R M ( r11 ) ( r1 ) / * p u t a r g 8 i n R 1 1 * /
stw r0 ,8 ( r1 )
HVSC / * i n v o k e t h e h y p e r v i s o r * /
lwz r0 ,8 ( r1 )
ld r10 ,S T K _ P A R M ( r12 ) ( r1 ) / * F e t c h r4 r e t a r g * /
std r4 ,0 ( r10 )
mtcrf 0 x f f ,r0
blr / * r e t u r n r3 = s t a t u s * /
/ * long p l p a r _ h c a l l _ 4 o u t ( u n s i g n e d l o n g o p c o d e , R 3
unsigned l o n g a r g 1 , R 4
unsigned l o n g a r g 2 , R 5
unsigned l o n g a r g 3 , R 6
unsigned l o n g a r g 4 , R 7
unsigned l o n g * o u t 1 , R 8
unsigned l o n g * o u t 2 , R 9
unsigned l o n g * o u t 3 , R 1 0
unsigned l o n g * o u t 4 ) ; 112(R1)
* /
_ GLOBAL( p l p a r _ h c a l l _ 4 o u t )
2005-05-01 19:58:46 +04:00
HMT_ M E D I U M
2005-04-17 02:20:36 +04:00
mfcr r0
stw r0 ,8 ( r1 )
std r8 ,S T K _ P A R M ( r8 ) ( r1 ) / * S a v e o u t p t r s * /
std r9 ,S T K _ P A R M ( r9 ) ( r1 )
std r10 ,S T K _ P A R M ( r10 ) ( r1 )
HVSC / * i n v o k e t h e h y p e r v i s o r * /
lwz r0 ,8 ( r1 )
ld r8 ,S T K _ P A R M ( r8 ) ( r1 ) / * F e t c h r4 - r7 r e t a r g s * /
ld r9 ,S T K _ P A R M ( r9 ) ( r1 )
ld r10 ,S T K _ P A R M ( r10 ) ( r1 )
ld r11 ,S T K _ P A R M ( r11 ) ( r1 )
std r4 ,0 ( r8 )
std r5 ,0 ( r9 )
std r6 ,0 ( r10 )
std r7 ,0 ( r11 )
mtcrf 0 x f f ,r0
blr / * r e t u r n r3 = s t a t u s * /