2005-04-17 02:20:36 +04:00
/ *
* This f i l e c o n t a i n s t h e c o d e t o p e r f o r m c a l l s t o t h e
* iSeries L P A R h y p e r v i s o r
*
* 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 / p p c _ a s m . h >
# include < a s m / p r o c e s s o r . h >
2005-10-10 16:52:26 +04:00
# include < a s m / p t r a c e . h > / * X X X f o r S T A C K _ F R A M E _ O V E R H E A D * /
2005-04-17 02:20:36 +04:00
.text
2005-09-27 18:17:40 +04:00
/ *
2005-04-17 02:20:36 +04:00
* Hypervisor c a l l
2005-09-27 18:17:40 +04:00
*
2005-04-17 02:20:36 +04:00
* Invoke t h e i S e r i e s h y p e r v i s o r v i a t h e S y s t e m C a l l i n s t r u c t i o n
* Parameters a r e p a s s e d t o t h i s r o u t i n e i n r e g i s t e r s r3 - r10
2005-09-27 18:17:40 +04:00
*
2005-04-17 02:20:36 +04:00
* r3 c o n t a i n s t h e H V f u n c t i o n t o b e c a l l e d
* r4 - r10 c o n t a i n t h e o p e r a n d s t o t h e h y p e r v i s o r f u n c t i o n
*
* /
_ GLOBAL( H v C a l l )
_ GLOBAL( H v C a l l 0 )
_ GLOBAL( H v C a l l 1 )
_ GLOBAL( H v C a l l 2 )
_ GLOBAL( H v C a l l 3 )
_ GLOBAL( H v C a l l 4 )
_ GLOBAL( H v C a l l 5 )
_ GLOBAL( H v C a l l 6 )
_ GLOBAL( H v C a l l 7 )
mfcr r0
std r0 ,- 8 ( r1 )
stdu r1 ,- ( S T A C K _ F R A M E _ O V E R H E A D + 1 6 ) ( r1 )
2005-09-27 18:17:40 +04:00
2005-04-17 02:20:36 +04:00
/* r0 = 0xffffffffffffffff indicates a hypervisor call */
2005-09-27 18:17:40 +04:00
2005-04-17 02:20:36 +04:00
li r0 ,- 1
2005-09-27 18:17:40 +04:00
2005-04-17 02:20:36 +04:00
/* Invoke the hypervisor */
sc
ld r1 ,0 ( r1 )
ld r0 ,- 8 ( r1 )
mtcrf 0 x f f ,r0
/* return to caller, return value in r3 */
2005-09-27 18:17:40 +04:00
2005-04-17 02:20:36 +04:00
blr
_ GLOBAL( H v C a l l 0 R e t 1 6 )
_ GLOBAL( H v C a l l 1 R e t 1 6 )
_ GLOBAL( H v C a l l 2 R e t 1 6 )
_ GLOBAL( H v C a l l 3 R e t 1 6 )
_ GLOBAL( H v C a l l 4 R e t 1 6 )
_ GLOBAL( H v C a l l 5 R e t 1 6 )
_ GLOBAL( H v C a l l 6 R e t 1 6 )
_ GLOBAL( H v C a l l 7 R e t 1 6 )
mfcr r0
std r0 ,- 8 ( r1 )
std r31 ,- 1 6 ( r1 )
stdu r1 ,- ( S T A C K _ F R A M E _ O V E R H E A D + 3 2 ) ( r1 )
mr r31 ,r4
li r0 ,- 1
mr r4 ,r5
mr r5 ,r6
mr r6 ,r7
mr r7 ,r8
mr r8 ,r9
mr r9 ,r10
sc
std r3 ,0 ( r31 )
std r4 ,8 ( r31 )
mr r3 ,r5
ld r1 ,0 ( r1 )
ld r0 ,- 8 ( r1 )
mtcrf 0 x f f ,r0
ld r31 ,- 1 6 ( r1 )
2005-09-27 18:17:40 +04:00
blr