2005-04-17 02:20:36 +04:00
/ *
* This f i l e i s s u b j e c t t o t h e t e r m s a n d c o n d i t i o n s o f t h e G N U G e n e r a l P u b l i c
* License. S e e t h e f i l e " C O P Y I N G " i n t h e m a i n d i r e c t o r y o f t h i s a r c h i v e
* for m o r e d e t a i l s .
*
* Copyright ( C ) 1 9 9 5 , 9 6 , 9 7 , 9 8 , 9 9 , 2 0 0 0 , 0 1 , 0 2 b y R a l f B a e c h l e
* Copyright ( C ) 2 0 0 1 M I P S T e c h n o l o g i e s , I n c .
* Copyright ( C ) 2 0 0 4 T h i e m o S e u f e r
* /
# include < l i n u x / c o n f i g . h >
# include < l i n u x / e r r n o . h >
# include < a s m / a s m . h >
# include < a s m / a s m m a c r o . h >
# include < a s m / m i p s r e g s . h >
# include < a s m / r e g d e f . h >
# include < a s m / s t a c k f r a m e . h >
# include < a s m / i s a d e p . h >
# include < a s m / s y s m i p s . h >
# include < a s m / t h r e a d _ i n f o . h >
# include < a s m / u n i s t d . h >
# include < a s m / w a r . h >
2005-09-10 00:32:31 +04:00
# include < a s m / a s m - o f f s e t s . h >
2005-04-17 02:20:36 +04:00
/* Highest syscall used of any syscall flavour */
# define M A X _ S Y S C A L L _ N O _ _ N R _ O 3 2 _ L i n u x + _ _ N R _ O 3 2 _ L i n u x _ s y s c a l l s
.align 5
NESTED( h a n d l e _ s y s , P T _ S I Z E , s p )
.set noat
SAVE_ S O M E
STI
.set at
lw t 1 , P T _ E P C ( s p ) # s k i p s y s c a l l o n r e t u r n
# if d e f i n e d ( C O N F I G _ B I N F M T _ I R I X )
sltiu t 0 , v0 , M A X _ S Y S C A L L _ N O + 1 # c h e c k s y s c a l l n u m b e r
# else
subu v0 , v0 , _ _ N R _ O 3 2 _ L i n u x # c h e c k s y s c a l l n u m b e r
sltiu t 0 , v0 , _ _ N R _ O 3 2 _ L i n u x _ s y s c a l l s + 1
# endif
addiu t 1 , 4 # s k i p t o n e x t i n s t r u c t i o n
sw t 1 , P T _ E P C ( s p )
beqz t 0 , i l l e g a l _ s y s c a l l
sll t 0 , v0 , 3
la t 1 , s y s _ c a l l _ t a b l e
addu t 1 , t 0
lw t 2 , ( t 1 ) # s y s c a l l r o u t i n e
lw t 3 , 4 ( t 1 ) # > = 0 i f w e n e e d s t a c k a r g u m e n t s
beqz t 2 , i l l e g a l _ s y s c a l l
sw a3 , P T _ R 2 6 ( s p ) # s a v e a 3 f o r s y s c a l l r e s t a r t i n g
bgez t 3 , s t a c k a r g s
stack_done :
lw t 0 , T I _ F L A G S ( $ 2 8 ) # s y s c a l l t r a c i n g e n a b l e d ?
li t 1 , _ T I F _ S Y S C A L L _ T R A C E | _ T I F _ S Y S C A L L _ A U D I T
and t 0 , t 1
bnez t 0 , s y s c a l l _ t r a c e _ e n t r y # - > y e s
jalr t 2 # D o T h e R e a l T h i n g ( T M )
li t 0 , - E M A X E R R N O - 1 # e r r o r ?
sltu t 0 , t 0 , v0
sw t 0 , P T _ R 7 ( s p ) # s e t e r r o r f l a g
beqz t 0 , 1 f
negu v0 # e r r o r
sw v0 , P T _ R 0 ( s p ) # s e t f l a g f o r s y s c a l l
# restarting
1 : sw v0 , P T _ R 2 ( s p ) # r e s u l t
o32_syscall_exit :
local_ i r q _ d i s a b l e # m a k e s u r e n e e d _ r e s c h e d a n d
# signals d o n t c h a n g e b e t w e e n
# sampling a n d r e t u r n
lw a2 , T I _ F L A G S ( $ 2 8 ) # c u r r e n t - > w o r k
li t 0 , _ T I F _ A L L W O R K _ M A S K
and t 0 , a2
bnez t 0 , o 3 2 _ s y s c a l l _ e x i t _ w o r k
j r e s t o r e _ p a r t i a l
o32_syscall_exit_work :
j s y s c a l l _ e x i t _ w o r k _ p a r t i a l
/* ------------------------------------------------------------------------ */
syscall_trace_entry :
SAVE_ S T A T I C
move s0 , t 2
move a0 , s p
li a1 , 0
jal d o _ s y s c a l l _ t r a c e
2005-11-30 19:24:57 +03:00
move t 0 , s0
RESTORE_ S T A T I C
2005-04-17 02:20:36 +04:00
lw a0 , P T _ R 4 ( s p ) # R e s t o r e a r g u m e n t r e g i s t e r s
lw a1 , P T _ R 5 ( s p )
lw a2 , P T _ R 6 ( s p )
lw a3 , P T _ R 7 ( s p )
2005-11-30 19:24:57 +03:00
jalr t 0
2005-04-17 02:20:36 +04:00
li t 0 , - E M A X E R R N O - 1 # e r r o r ?
sltu t 0 , t 0 , v0
sw t 0 , P T _ R 7 ( s p ) # s e t e r r o r f l a g
beqz t 0 , 1 f
negu v0 # e r r o r
sw v0 , P T _ R 0 ( s p ) # s e t f l a g f o r s y s c a l l
# restarting
1 : sw v0 , P T _ R 2 ( s p ) # r e s u l t
j s y s c a l l _ e x i t
/* ------------------------------------------------------------------------ */
/ *
* More t h a n f o u r a r g u m e n t s . T r y t o d e a l w i t h i t b y c o p y i n g t h e
* stack a r g u m e n t s f r o m t h e u s e r s t a c k t o t h e k e r n e l s t a c k .
* This S u c k s ( T M ) .
* /
stackargs :
lw t 0 , P T _ R 2 9 ( s p ) # g e t o l d u s e r s t a c k p o i n t e r
/ *
* We i n t e n t i o n a l l y k e e p t h e k e r n e l s t a c k a l i t t l e b e l o w t h e t o p o f
* userspace s o w e d o n ' t h a v e t o d o a s l o w e r b y t e a c c u r a t e c h e c k h e r e .
* /
lw t 5 , T I _ A D D R _ L I M I T ( $ 2 8 )
addu t 4 , t 0 , 3 2
and t 5 , t 4
bltz t 5 , b a d _ s t a c k # - > s p i s b a d
/ * Ok, c o p y t h e a r g s f r o m t h e l u s e r s t a c k t o t h e k e r n e l s t a c k .
* t3 i s t h e p r e c o m p u t e d n u m b e r o f i n s t r u c t i o n b y t e s n e e d e d t o
* load o r s t o r e a r g u m e n t s 6 - 8 .
* /
la t 1 , 5 f # l o a d u p t o 3 a r g u m e n t s
subu t 1 , t 3
1 : lw t 5 , 1 6 ( t 0 ) # a r g u m e n t # 5 f r o m u s p
.set push
.set noreorder
.set nomacro
jr t 1
addiu t 1 , 6 f - 5 f
2 : lw t 8 , 2 8 ( t 0 ) # a r g u m e n t # 8 f r o m u s p
3 : lw t 7 , 2 4 ( t 0 ) # a r g u m e n t # 7 f r o m u s p
4 : lw t 6 , 2 0 ( t 0 ) # a r g u m e n t # 6 f r o m u s p
5 : jr t 1
sw t 5 , 1 6 ( s p ) # a r g u m e n t # 5 t o k s p
sw t 8 , 2 8 ( s p ) # a r g u m e n t # 8 t o k s p
sw t 7 , 2 4 ( s p ) # a r g u m e n t # 7 t o k s p
sw t 6 , 2 0 ( s p ) # a r g u m e n t # 6 t o k s p
6 : j s t a c k _ d o n e # g o b a c k
nop
.set pop
.section _ _ ex_ t a b l e ," a "
PTR 1 b ,b a d _ s t a c k
PTR 2 b ,b a d _ s t a c k
PTR 3 b ,b a d _ s t a c k
PTR 4 b ,b a d _ s t a c k
.previous
/ *
* The s t a c k p o i n t e r f o r a c a l l w i t h m o r e t h a n 4 a r g u m e n t s i s b a d .
* We p r o b a b l y s h o u l d h a n d l e t h i s c a s e a b i t m o r e d r a s t i c .
* /
bad_stack :
negu v0 # e r r o r
sw v0 , P T _ R 0 ( s p )
sw v0 , P T _ R 2 ( s p )
li t 0 , 1 # s e t e r r o r f l a g
sw t 0 , P T _ R 7 ( s p )
j o 3 2 _ s y s c a l l _ e x i t
/ *
* The s y s t e m c a l l d o e s n o t e x i s t i n t h i s k e r n e l
* /
illegal_syscall :
li v0 , - E N O S Y S # e r r o r
sw v0 , P T _ R 2 ( s p )
li t 0 , 1 # s e t e r r o r f l a g
sw t 0 , P T _ R 7 ( s p )
j o 3 2 _ s y s c a l l _ e x i t
END( h a n d l e _ s y s )
LEAF( m i p s _ a t o m i c _ s e t )
andi v0 , a1 , 3 # m u s t b e w o r d a l i g n e d
bnez v0 , b a d _ a l i g n m e n t
lw v1 , T I _ A D D R _ L I M I T ( $ 2 8 ) # i n l e g a l a d d r e s s r a n g e ?
addiu a0 , a1 , 4
or a0 , a0 , a1
and a0 , a0 , v1
bltz a0 , b a d _ a d d r e s s
# ifdef C O N F I G _ C P U _ H A S _ L L S C
/* Ok, this is the ll/sc case. World is sane :-) */
1 : ll v0 , ( a1 )
move a0 , a2
2 : sc a0 , ( a1 )
# if R 1 0 0 0 0 _ L L S C _ W A R
beqzl a0 , 1 b
# else
beqz a0 , 1 b
# endif
.section _ _ ex_ t a b l e ," a "
PTR 1 b , b a d _ s t a c k
PTR 2 b , b a d _ s t a c k
.previous
# else
sw a1 , 1 6 ( s p )
sw a2 , 2 0 ( s p )
move a0 , s p
move a2 , a1
li a1 , 1
jal d o _ p a g e _ f a u l t
lw a1 , 1 6 ( s p )
lw a2 , 2 0 ( s p )
/ *
* At t h i s p o i n t t h e p a g e s h o u l d b e r e a d a b l e a n d w r i t a b l e u n l e s s
* there w a s n o m o r e m e m o r y a v a i l a b l e .
* /
1 : lw v0 , ( a1 )
2 : sw a2 , ( a1 )
.section _ _ ex_ t a b l e ," a "
PTR 1 b , n o _ m e m
PTR 2 b , n o _ m e m
.previous
# endif
sw z e r o , P T _ R 7 ( s p ) # s u c c e s s
sw v0 , P T _ R 2 ( s p ) # r e s u l t
2005-11-29 16:01:01 +03:00
j o 3 2 _ s y s c a l l _ e x i t # c o n t i n u e l i k e a n o r m a l s y s c a l l
2005-04-17 02:20:36 +04:00
no_mem : li v0 , - E N O M E M
jr r a
bad_address :
li v0 , - E F A U L T
jr r a
bad_alignment :
li v0 , - E I N V A L
jr r a
END( m i p s _ a t o m i c _ s e t )
LEAF( s y s _ s y s m i p s )
beq a0 , M I P S _ A T O M I C _ S E T , m i p s _ a t o m i c _ s e t
j _ s y s _ s y s m i p s
END( s y s _ s y s m i p s )
LEAF( s y s _ s y s c a l l )
# if d e f i n e d ( C O N F I G _ B I N F M T _ I R I X )
sltiu v0 , a0 , M A X _ S Y S C A L L _ N O + 1 # c h e c k s y s c a l l n u m b e r
# else
subu t 0 , a0 , _ _ N R _ O 3 2 _ L i n u x # c h e c k s y s c a l l n u m b e r
sltiu v0 , t 0 , _ _ N R _ O 3 2 _ L i n u x _ s y s c a l l s + 1
# endif
sll t 1 , t 0 , 3
beqz v0 , e i n v a l
lw t 2 , s y s _ c a l l _ t a b l e ( t 1 ) # s y s c a l l r o u t i n e
# if d e f i n e d ( C O N F I G _ B I N F M T _ I R I X )
li v1 , 4 0 0 0 # n r o f s y s _ s y s c a l l
# else
li v1 , 4 0 0 0 - _ _ N R _ O 3 2 _ L i n u x # i n d e x o f s y s _ s y s c a l l
# endif
beq t 0 , v1 , e i n v a l # d o n o t r e c u r s e
/ * Some s y s c a l l s l i k e e x e c v e g e t t h e i r a r g u m e n t s f r o m s t r u c t p t _ r e g s
and c l a i m z e r o a r g u m e n t s i n t h e s y s c a l l t a b l e . T h u s w e h a v e t o
assume t h e w o r s t c a s e a n d s h u f f l e a r o u n d a l l p o t e n t i a l a r g u m e n t s .
If y o u w a n t p e r f o r m a n c e , d o n ' t u s e i n d i r e c t s y s c a l l s . * /
move a0 , a1 # s h i f t a r g u m e n t r e g i s t e r s
move a1 , a2
move a2 , a3
lw a3 , 1 6 ( s p )
lw t 4 , 2 0 ( s p )
lw t 5 , 2 4 ( s p )
lw t 6 , 2 8 ( s p )
sw t 4 , 1 6 ( s p )
sw t 5 , 2 0 ( s p )
sw t 6 , 2 4 ( s p )
sw a0 , P T _ R 4 ( s p ) # . . a n d p u s h b a c k a 0 - a3 , s o m e
sw a1 , P T _ R 5 ( s p ) # s y s c a l l s e x p e c t t h e m t h e r e
sw a2 , P T _ R 6 ( s p )
sw a3 , P T _ R 7 ( s p )
sw a3 , P T _ R 2 6 ( s p ) # u p d a t e a 3 f o r s y s c a l l r e s t a r t i n g
jr t 2
/* Unreached */
einval : li v0 , - E I N V A L
jr r a
END( s y s _ s y s c a l l )
.macro fifty ptr, n a r g s , f r o m =1 , t o =50
sys \ p t r \ n a r g s
.if \ to- \ f r o m
fifty \ p t r ,\ n a r g s ," ( \ f r o m + 1 ) " ,\ t o
.endif
.endm
.macro mille ptr, n a r g s , f r o m =1 , t o =20
fifty \ p t r ,\ n a r g s
.if \ to- \ f r o m
mille \ p t r ,\ n a r g s ," ( \ f r o m + 1 ) " ,\ t o
.endif
.endm
.macro syscalltable
# if d e f i n e d ( C O N F I G _ B I N F M T _ I R I X )
mille s y s _ n i _ s y s c a l l 0 / * 0 - 9 9 9 S V R 4 f l a v o u r * /
mille s y s _ n i _ s y s c a l l 0 / * 1 0 0 0 - 1 9 9 9 3 2 - b i t I R I X * /
mille s y s _ n i _ s y s c a l l 0 / * 2 0 0 0 - 2 9 9 9 B S D 4 3 f l a v o u r * /
mille s y s _ n i _ s y s c a l l 0 / * 3 0 0 0 - 3 9 9 9 P O S I X f l a v o u r * /
# endif
sys s y s _ s y s c a l l 8 / * 4 0 0 0 * /
sys s y s _ e x i t 1
sys s y s _ f o r k 0
sys s y s _ r e a d 3
sys s y s _ w r i t e 3
sys s y s _ o p e n 3 / * 4 0 0 5 * /
sys s y s _ c l o s e 1
sys s y s _ w a i t p i d 3
sys s y s _ c r e a t 2
sys s y s _ l i n k 2
sys s y s _ u n l i n k 1 / * 4 0 1 0 * /
sys s y s _ e x e c v e 0
sys s y s _ c h d i r 1
sys s y s _ t i m e 1
sys s y s _ m k n o d 3
sys s y s _ c h m o d 2 / * 4 0 1 5 * /
sys s y s _ l c h o w n 3
sys s y s _ n i _ s y s c a l l 0
sys s y s _ n i _ s y s c a l l 0 / * w a s s y s _ s t a t * /
sys s y s _ l s e e k 3
sys s y s _ g e t p i d 0 / * 4 0 2 0 * /
sys s y s _ m o u n t 5
sys s y s _ o l d u m o u n t 1
sys s y s _ s e t u i d 1
sys s y s _ g e t u i d 0
sys s y s _ s t i m e 1 / * 4 0 2 5 * /
sys s y s _ p t r a c e 4
sys s y s _ a l a r m 1
sys s y s _ n i _ s y s c a l l 0 / * w a s s y s _ f s t a t * /
sys s y s _ p a u s e 0
sys s y s _ u t i m e 2 / * 4 0 3 0 * /
sys s y s _ n i _ s y s c a l l 0
sys s y s _ n i _ s y s c a l l 0
sys s y s _ a c c e s s 2
sys s y s _ n i c e 1
sys s y s _ n i _ s y s c a l l 0 / * 4 0 3 5 * /
sys s y s _ s y n c 0
sys s y s _ k i l l 2
sys s y s _ r e n a m e 2
sys s y s _ m k d i r 2
sys s y s _ r m d i r 1 / * 4 0 4 0 * /
sys s y s _ d u p 1
sys s y s _ p i p e 0
sys s y s _ t i m e s 1
sys s y s _ n i _ s y s c a l l 0
sys s y s _ b r k 1 / * 4 0 4 5 * /
sys s y s _ s e t g i d 1
sys s y s _ g e t g i d 0
sys s y s _ n i _ s y s c a l l 0 / * w a s s i g n a l ( 2 ) * /
sys s y s _ g e t e u i d 0
sys s y s _ g e t e g i d 0 / * 4 0 5 0 * /
sys s y s _ a c c t 1
sys s y s _ u m o u n t 2
sys s y s _ n i _ s y s c a l l 0
sys s y s _ i o c t l 3
sys s y s _ f c n t l 3 / * 4 0 5 5 * /
sys s y s _ n i _ s y s c a l l 2
sys s y s _ s e t p g i d 2
sys s y s _ n i _ s y s c a l l 0
sys s y s _ o l d u n a m e 1
sys s y s _ u m a s k 1 / * 4 0 6 0 * /
sys s y s _ c h r o o t 1
sys s y s _ u s t a t 2
sys s y s _ d u p2 2
sys s y s _ g e t p p i d 0
sys s y s _ g e t p g r p 0 / * 4 0 6 5 * /
sys s y s _ s e t s i d 0
sys s y s _ s i g a c t i o n 3
sys s y s _ s g e t m a s k 0
sys s y s _ s s e t m a s k 1
sys s y s _ s e t r e u i d 2 / * 4 0 7 0 * /
sys s y s _ s e t r e g i d 2
sys s y s _ s i g s u s p e n d 0
sys s y s _ s i g p e n d i n g 1
sys s y s _ s e t h o s t n a m e 2
sys s y s _ s e t r l i m i t 2 / * 4 0 7 5 * /
sys s y s _ g e t r l i m i t 2
sys s y s _ g e t r u s a g e 2
sys s y s _ g e t t i m e o f d a y 2
sys s y s _ s e t t i m e o f d a y 2
sys s y s _ g e t g r o u p s 2 / * 4 0 8 0 * /
sys s y s _ s e t g r o u p s 2
sys s y s _ n i _ s y s c a l l 0 / * o l d _ s e l e c t * /
sys s y s _ s y m l i n k 2
sys s y s _ n i _ s y s c a l l 0 / * w a s s y s _ l s t a t * /
sys s y s _ r e a d l i n k 3 / * 4 0 8 5 * /
sys s y s _ u s e l i b 1
sys s y s _ s w a p o n 2
sys s y s _ r e b o o t 3
sys o l d _ r e a d d i r 3
sys o l d _ m m a p 6 / * 4 0 9 0 * /
sys s y s _ m u n m a p 2
sys s y s _ t r u n c a t e 2
sys s y s _ f t r u n c a t e 2
sys s y s _ f c h m o d 2
sys s y s _ f c h o w n 3 / * 4 0 9 5 * /
sys s y s _ g e t p r i o r i t y 2
sys s y s _ s e t p r i o r i t y 3
sys s y s _ n i _ s y s c a l l 0
sys s y s _ s t a t f s 2
sys s y s _ f s t a t f s 2 / * 4 1 0 0 * /
sys s y s _ n i _ s y s c a l l 0 / * w a s i o p e r m ( 2 ) * /
sys s y s _ s o c k e t c a l l 2
sys s y s _ s y s l o g 3
sys s y s _ s e t i t i m e r 3
sys s y s _ g e t i t i m e r 2 / * 4 1 0 5 * /
sys s y s _ n e w s t a t 2
sys s y s _ n e w l s t a t 2
sys s y s _ n e w f s t a t 2
sys s y s _ u n a m e 1
sys s y s _ n i _ s y s c a l l 0 / * 4 1 1 0 w a s i o p l ( 2 ) * /
sys s y s _ v h a n g u p 0
sys s y s _ n i _ s y s c a l l 0 / * w a s s y s _ i d l e ( ) * /
sys s y s _ n i _ s y s c a l l 0 / * w a s s y s _ v m 8 6 * /
sys s y s _ w a i t 4 4
sys s y s _ s w a p o f f 1 / * 4 1 1 5 * /
sys s y s _ s y s i n f o 1
sys s y s _ i p c 6
sys s y s _ f s y n c 1
sys s y s _ s i g r e t u r n 0
sys s y s _ c l o n e 0 / * 4 1 2 0 * /
sys s y s _ s e t d o m a i n n a m e 2
sys s y s _ n e w u n a m e 1
sys s y s _ n i _ s y s c a l l 0 / * s y s _ m o d i f y _ l d t * /
sys s y s _ a d j t i m e x 1
sys s y s _ m p r o t e c t 3 / * 4 1 2 5 * /
sys s y s _ s i g p r o c m a s k 3
sys s y s _ n i _ s y s c a l l 0 / * w a s c r e a t e _ m o d u l e * /
sys s y s _ i n i t _ m o d u l e 5
sys s y s _ d e l e t e _ m o d u l e 1
sys s y s _ n i _ s y s c a l l 0 / * 4 1 3 0 w a s g e t _ k e r n e l _ s y m s * /
sys s y s _ q u o t a c t l 4
sys s y s _ g e t p g i d 1
sys s y s _ f c h d i r 1
sys s y s _ b d f l u s h 2
sys s y s _ s y s f s 3 / * 4 1 3 5 * /
sys s y s _ p e r s o n a l i t y 1
sys s y s _ n i _ s y s c a l l 0 / * f o r a f s _ s y s c a l l * /
sys s y s _ s e t f s u i d 1
sys s y s _ s e t f s g i d 1
sys s y s _ l l s e e k 5 / * 4 1 4 0 * /
sys s y s _ g e t d e n t s 3
sys s y s _ s e l e c t 5
sys s y s _ f l o c k 2
sys s y s _ m s y n c 3
sys s y s _ r e a d v 3 / * 4 1 4 5 * /
sys s y s _ w r i t e v 3
sys s y s _ c a c h e f l u s h 3
sys s y s _ c a c h e c t l 3
sys s y s _ s y s m i p s 4
sys s y s _ n i _ s y s c a l l 0 / * 4 1 5 0 * /
sys s y s _ g e t s i d 1
sys s y s _ f d a t a s y n c 1
sys s y s _ s y s c t l 1
sys s y s _ m l o c k 2
sys s y s _ m u n l o c k 2 / * 4 1 5 5 * /
sys s y s _ m l o c k a l l 1
sys s y s _ m u n l o c k a l l 0
sys s y s _ s c h e d _ s e t p a r a m 2
sys s y s _ s c h e d _ g e t p a r a m 2
sys s y s _ s c h e d _ s e t s c h e d u l e r 3 / * 4 1 6 0 * /
sys s y s _ s c h e d _ g e t s c h e d u l e r 1
sys s y s _ s c h e d _ y i e l d 0
sys s y s _ s c h e d _ g e t _ p r i o r i t y _ m a x 1
sys s y s _ s c h e d _ g e t _ p r i o r i t y _ m i n 1
sys s y s _ s c h e d _ r r _ g e t _ i n t e r v a l 2 / * 4 1 6 5 * /
sys s y s _ n a n o s l e e p , 2
2006-06-23 13:04:14 +04:00
sys s y s _ m r e m a p , 5
2005-04-17 02:20:36 +04:00
sys s y s _ a c c e p t 3
sys s y s _ b i n d 3
sys s y s _ c o n n e c t 3 / * 4 1 7 0 * /
sys s y s _ g e t p e e r n a m e 3
sys s y s _ g e t s o c k n a m e 3
sys s y s _ g e t s o c k o p t 5
sys s y s _ l i s t e n 2
sys s y s _ r e c v 4 / * 4 1 7 5 * /
sys s y s _ r e c v f r o m 6
sys s y s _ r e c v m s g 3
sys s y s _ s e n d 4
sys s y s _ s e n d m s g 3
sys s y s _ s e n d t o 6 / * 4 1 8 0 * /
sys s y s _ s e t s o c k o p t 5
sys s y s _ s h u t d o w n 2
sys s y s _ s o c k e t 3
sys s y s _ s o c k e t p a i r 4
sys s y s _ s e t r e s u i d 3 / * 4 1 8 5 * /
sys s y s _ g e t r e s u i d 3
sys s y s _ n i _ s y s c a l l 0 / * w a s s y s _ q u e r y _ m o d u l e * /
sys s y s _ p o l l 3
sys s y s _ n f s s e r v c t l 3
sys s y s _ s e t r e s g i d 3 / * 4 1 9 0 * /
sys s y s _ g e t r e s g i d 3
sys s y s _ p r c t l 5
sys s y s _ r t _ s i g r e t u r n 0
sys s y s _ r t _ s i g a c t i o n 4
sys s y s _ r t _ s i g p r o c m a s k 4 / * 4 1 9 5 * /
sys s y s _ r t _ s i g p e n d i n g 2
sys s y s _ r t _ s i g t i m e d w a i t 4
sys s y s _ r t _ s i g q u e u e i n f o 3
sys s y s _ r t _ s i g s u s p e n d 0
sys s y s _ p r e a d64 6 / * 4 2 0 0 * /
sys s y s _ p w r i t e 6 4 6
sys s y s _ c h o w n 3
sys s y s _ g e t c w d 2
sys s y s _ c a p g e t 2
sys s y s _ c a p s e t 2 / * 4 2 0 5 * /
sys s y s _ s i g a l t s t a c k 0
sys s y s _ s e n d f i l e 4
sys s y s _ n i _ s y s c a l l 0
sys s y s _ n i _ s y s c a l l 0
sys s y s _ m m a p2 6 / * 4 2 1 0 * /
sys s y s _ t r u n c a t e 6 4 4
sys s y s _ f t r u n c a t e 6 4 4
sys s y s _ s t a t 6 4 2
sys s y s _ l s t a t 6 4 2
sys s y s _ f s t a t 6 4 2 / * 4 2 1 5 * /
sys s y s _ p i v o t _ r o o t 2
sys s y s _ m i n c o r e 3
sys s y s _ m a d v i s e 3
sys s y s _ g e t d e n t s64 3
sys s y s _ f c n t l 6 4 3 / * 4 2 2 0 * /
sys s y s _ n i _ s y s c a l l 0
sys s y s _ g e t t i d 0
sys s y s _ r e a d a h e a d 5
sys s y s _ s e t x a t t r 5
sys s y s _ l s e t x a t t r 5 / * 4 2 2 5 * /
sys s y s _ f s e t x a t t r 5
sys s y s _ g e t x a t t r 4
sys s y s _ l g e t x a t t r 4
sys s y s _ f g e t x a t t r 4
sys s y s _ l i s t x a t t r 3 / * 4 2 3 0 * /
sys s y s _ l l i s t x a t t r 3
sys s y s _ f l i s t x a t t r 3
sys s y s _ r e m o v e x a t t r 2
sys s y s _ l r e m o v e x a t t r 2
sys s y s _ f r e m o v e x a t t r 2 / * 4 2 3 5 * /
sys s y s _ t k i l l 2
sys s y s _ s e n d f i l e 6 4 5
2005-03-13 03:07:00 +03:00
sys s y s _ f u t e x 6
2006-04-05 12:45:47 +04:00
# ifdef C O N F I G _ M I P S _ M T _ F P A F F
/ *
* For F P U a f f i n i t y s c h e d u l i n g o n M I P S M T p r o c e s s o r s , w e n e e d t o
* intercept s y s _ s c h e d _ x x x a f f i n i t y ( ) c a l l s u n t i l w e g e t a p r o p e r h o o k
* in k e r n e l / s c h e d . c . C o n s i d e r e d o n l y t e m p o r a r y w e o n l y s u p p o r t t h e s e
* hooks f o r t h e 3 2 - b i t k e r n e l - t h e r e i s n o M I P S 6 4 M T p r o c e s s o r a t m .
* /
sys m i p s m t _ s y s _ s c h e d _ s e t a f f i n i t y 3
sys m i p s m t _ s y s _ s c h e d _ g e t a f f i n i t y 3
# else
2005-04-17 02:20:36 +04:00
sys s y s _ s c h e d _ s e t a f f i n i t y 3
sys s y s _ s c h e d _ g e t a f f i n i t y 3 / * 4 2 4 0 * /
2006-04-05 12:45:47 +04:00
# endif / * C O N F I G _ M I P S _ M T _ F P A F F * /
2005-04-17 02:20:36 +04:00
sys s y s _ i o _ s e t u p 2
sys s y s _ i o _ d e s t r o y 1
sys s y s _ i o _ g e t e v e n t s 5
sys s y s _ i o _ s u b m i t 3
sys s y s _ i o _ c a n c e l 3 / * 4 2 4 5 * /
sys s y s _ e x i t _ g r o u p 1
2005-10-18 15:48:31 +04:00
sys s y s _ l o o k u p _ d c o o k i e 4
2005-04-17 02:20:36 +04:00
sys s y s _ e p o l l _ c r e a t e 1
sys s y s _ e p o l l _ c t l 4
sys s y s _ e p o l l _ w a i t 3 / * 4 2 5 0 * /
sys s y s _ r e m a p _ f i l e _ p a g e s 5
sys s y s _ s e t _ t i d _ a d d r e s s 1
sys s y s _ r e s t a r t _ s y s c a l l 0
sys s y s _ f a d v i s e 6 4 _ 6 4 7
sys s y s _ s t a t f s64 3 / * 4 2 5 5 * /
sys s y s _ f s t a t f s64 2
sys s y s _ t i m e r _ c r e a t e 3
sys s y s _ t i m e r _ s e t t i m e 4
sys s y s _ t i m e r _ g e t t i m e 2
sys s y s _ t i m e r _ g e t o v e r r u n 1 / * 4 2 6 0 * /
sys s y s _ t i m e r _ d e l e t e 1
sys s y s _ c l o c k _ s e t t i m e 2
sys s y s _ c l o c k _ g e t t i m e 2
sys s y s _ c l o c k _ g e t r e s 2
sys s y s _ c l o c k _ n a n o s l e e p 4 / * 4 2 6 5 * /
sys s y s _ t g k i l l 3
sys s y s _ u t i m e s 2
sys s y s _ m b i n d 4
sys s y s _ n i _ s y s c a l l 0 / * s y s _ g e t _ m e m p o l i c y * /
sys s y s _ n i _ s y s c a l l 0 / * 4 2 7 0 s y s _ s e t _ m e m p o l i c y * /
sys s y s _ m q _ o p e n 4
sys s y s _ m q _ u n l i n k 1
sys s y s _ m q _ t i m e d s e n d 5
sys s y s _ m q _ t i m e d r e c e i v e 5
sys s y s _ m q _ n o t i f y 2 / * 4 2 7 5 * /
sys s y s _ m q _ g e t s e t a t t r 3
sys s y s _ n i _ s y s c a l l 0 / * s y s _ v s e r v e r * /
2005-02-17 00:19:59 +03:00
sys s y s _ w a i t i d 5
2005-04-17 02:20:36 +04:00
sys s y s _ n i _ s y s c a l l 0 / * a v a i l a b l e , w a s s e t a l t r o o t * /
2005-05-31 15:49:19 +04:00
sys s y s _ a d d _ k e y 5 / * 4 2 8 0 * /
2005-04-17 02:20:36 +04:00
sys s y s _ r e q u e s t _ k e y 4
sys s y s _ k e y c t l 5
2005-04-13 21:43:59 +04:00
sys s y s _ s e t _ t h r e a d _ a r e a 1
2005-07-13 15:48:45 +04:00
sys s y s _ i n o t i f y _ i n i t 0
sys s y s _ i n o t i f y _ a d d _ w a t c h 3 / * 4 2 8 5 * /
sys s y s _ i n o t i f y _ r m _ w a t c h 2
2006-02-08 16:38:50 +03:00
sys s y s _ m i g r a t e _ p a g e s 4
sys s y s _ o p e n a t 4
sys s y s _ m k d i r a t 3
sys s y s _ m k n o d a t 4 / * 4 2 9 0 * /
sys s y s _ f c h o w n a t 5
sys s y s _ f u t i m e s a t 3
2006-02-13 12:07:30 +03:00
sys s y s _ f s t a t a t 6 4 4
2006-02-08 16:38:50 +03:00
sys s y s _ u n l i n k a t 3
sys s y s _ r e n a m e a t 4 / * 4 2 9 5 * /
2006-02-25 00:04:21 +03:00
sys s y s _ l i n k a t 5
2006-02-08 16:38:50 +03:00
sys s y s _ s y m l i n k a t 3
sys s y s _ r e a d l i n k a t 4
sys s y s _ f c h m o d a t 3
sys s y s _ f a c c e s s a t 3 / * 4 3 0 0 * /
sys s y s _ p s e l e c t 6 6
sys s y s _ p p o l l 5
sys s y s _ u n s h a r e 1
2006-03-31 12:27:20 +04:00
sys s y s _ s p l i c e 4
2006-04-01 10:49:21 +04:00
sys s y s _ s y n c _ f i l e _ r a n g e 7 / * 4 3 0 5 * /
2006-04-15 13:16:19 +04:00
sys s y s _ t e e 4
2005-04-17 02:20:36 +04:00
.endm
/ * We p r e - c o m p u t e t h e n u m b e r o f _ i n s t r u c t i o n _ b y t e s n e e d e d t o
load o r s t o r e t h e a r g u m e n t s 6 - 8 . N e g a t i v e v a l u e s a r e i g n o r e d . * /
.macro sys function, n a r g s
PTR \ f u n c t i o n
LONG ( \ n a r g s < < 2 ) - ( 5 < < 2 )
.endm
.align 3
.type sys_ c a l l _ t a b l e ,@object
EXPORT( s y s _ c a l l _ t a b l e )
syscalltable
.size sys_ c a l l _ t a b l e , . - s y s _ c a l l _ t a b l e