2005-04-26 15:21:02 +01:00
# include < l i n u x / i n i t . h >
2005-04-16 15:20:36 -07:00
# include < l i n u x / l i n k a g e . h >
# include < a s m / a s s e m b l e r . h >
2005-09-09 21:08:59 +02:00
# include < a s m / a s m - o f f s e t s . h >
2005-04-16 15:20:36 -07:00
# include < a s m / e r r n o . h >
2005-04-26 15:21:02 +01:00
# include < a s m / t h r e a d _ i n f o . h >
2005-04-16 15:20:36 -07:00
@ Bad Abort numbers
@ -----------------
@
# define B A D _ P R E F E T C H 0
# define B A D _ D A T A 1
# define B A D _ A D D R E X C P T N 2
# define B A D _ I R Q 3
# define B A D _ U N D E F I N S T R 4
@
2005-04-26 15:18:59 +01:00
@ Most of the stack format comes from struct pt_regs, but with
@ the addition of 8 bytes for storing syscall args 5 and 6.
2006-01-14 16:18:08 +00:00
@ This _must_ remain a multiple of 8 for EABI.
2005-04-16 15:20:36 -07:00
@
# define S _ O F F 8
2005-04-26 15:18:59 +01:00
/ *
* The S W I c o d e r e l i e s o n t h e f a c t t h a t R 0 i s a t t h e b o t t o m o f t h e s t a c k
* ( due t o s l o w / f a s t r e s t o r e u s e r r e g s ) .
* /
# if S _ R 0 ! = 0
# error " P l e a s e f i x "
# endif
2005-04-26 15:21:02 +01:00
.macro zero_fp
# ifdef C O N F I G _ F R A M E _ P O I N T E R
mov f p , #0
# endif
.endm
2005-04-16 15:20:36 -07:00
.macro get_ t h r e a d _ i n f o , r d
mov \ r d , s p , l s r #13
mov \ r d , \ r d , l s l #13
.endm
2005-05-31 18:02:00 +01:00
.macro alignment_ t r a p , r t e m p
2005-04-16 15:20:36 -07:00
# ifdef C O N F I G _ A L I G N M E N T _ T R A P
2005-05-31 18:02:00 +01:00
ldr \ r t e m p , . L C c r a l i g n
ldr \ r t e m p , [ \ r t e m p ]
2005-04-16 15:20:36 -07:00
mcr p15 , 0 , \ r t e m p , c1 , c0
# endif
.endm
/ *
* These a r e t h e r e g i s t e r s u s e d i n t h e s y s c a l l h a n d l e r , a n d a l l o w u s t o
* have i n t h e o r y u p t o 7 a r g u m e n t s t o a f u n c t i o n - r0 t o r6 .
*
* r7 i s r e s e r v e d f o r t h e s y s t e m c a l l n u m b e r f o r t h u m b m o d e .
*
* Note t h a t t b l = = w h y i s i n t e n t i o n a l .
*
* We m u s t s e t a t l e a s t " t s k " a n d " w h y " w h e n c a l l i n g r e t _ w i t h _ r e s c h e d u l e .
* /
scno . r e q r7 @ syscall number
tbl . r e q r8 @ syscall table pointer
why . r e q r8 @ Linux syscall (!= 0)
tsk . r e q r9 @ current thread_info