2013-01-21 03:28:06 +04:00
/ *
* Copyright ( C ) 2 0 1 2 - V i r t u a l O p e n S y s t e m s a n d C o l u m b i a U n i v e r s i t y
* Author : Christoffer D a l l < c . d a l l @virtualopensystems.com>
*
* 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
* it 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 , v e r s i o n 2 , a s
* published 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 .
*
* This p r o g r a m i s d i s t r i b u t e d i n t h e h o p e t h a t i t w i l l b e u s e f u l ,
* but W I T H O U T A N Y W A R R A N T Y ; without even the implied warranty of
* MERCHANTABILITY o r F I T N E S S F O R A P A R T I C U L A R P U R P O S E . S e e t h e
* GNU G e n e r a l P u b l i c L i c e n s e f o r m o r e d e t a i l s .
*
* You s h o u l d h a v e r e c e i v e d a c o p y 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
* along w i t h t h i s p r o g r a m ; if not, write to the Free Software
* Foundation, 5 1 F r a n k l i n S t r e e t , F i f t h F l o o r , B o s t o n , M A 0 2 1 1 0 - 1 3 0 1 , U S A .
* /
2013-01-21 03:28:06 +04:00
# include < l i n u x / l i n k a g e . h >
.text
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* Call f u n c t i o n i n H y p m o d e
*
*
2016-01-06 15:10:58 +03:00
* unsigned l o n g k v m _ c a l l _ h y p ( v o i d * h y p f n , . . . ) ;
2013-01-21 03:28:06 +04:00
*
* This i s n o t r e a l l y a v a r i a d i c f u n c t i o n i n t h e c l a s s i c C - w a y a n d c a r e m u s t
* be t a k e n w h e n c a l l i n g t h i s t o e n s u r e p a r a m e t e r s a r e p a s s e d i n r e g i s t e r s
* only, s i n c e t h e s t a c k w i l l c h a n g e b e t w e e n t h e c a l l e r a n d t h e c a l l e e .
*
* Call t h e f u n c t i o n w i t h t h e f i r s t a r g u m e n t c o n t a i n i n g a p o i n t e r t o t h e
* function y o u w i s h t o c a l l i n H y p m o d e , a n d s u b s e q u e n t a r g u m e n t s w i l l b e
* passed a s r0 , r1 , a n d r2 ( a m a x i m u m o f 3 a r g u m e n t s i n a d d i t i o n t o t h e
* function p o i n t e r c a n b e p a s s e d ) . T h e f u n c t i o n b e i n g c a l l e d m u s t b e m a p p e d
* in H y p m o d e ( s e e i n i t _ h y p _ m o d e i n a r c h / a r m / k v m / a r m . c ) . R e t u r n v a l u e s a r e
2016-01-06 15:10:58 +03:00
* passed i n r0 ( s t r i c t l y 3 2 b i t ) .
2013-01-21 03:28:06 +04:00
*
2014-02-26 22:47:36 +04:00
* A f u n c t i o n p o i n t e r w i t h a v a l u e o f 0 x f f f f f f f f h a s a s p e c i a l m e a n i n g ,
* and i s u s e d t o i m p l e m e n t _ _ h y p _ g e t _ v e c t o r s i n t h e s a m e w a y a s i n
* arch/ a r m / k e r n e l / h y p _ s t u b . S .
*
2013-01-21 03:28:06 +04:00
* The c a l l i n g c o n v e n t i o n f o l l o w s t h e s t a n d a r d A A P C S :
* r0 - r3 : c a l l e r s a v e
* r12 : caller s a v e
* rest : callee s a v e
* /
ENTRY( k v m _ c a l l _ h y p )
hvc #0
bx l r
2016-01-05 21:45:17 +03:00
ENDPROC( k v m _ c a l l _ h y p )