2005-04-17 02:20:36 +04:00
/ *
* linux/ a r c h / m 6 8 k n o m m u / k e r n e l / e n t r y . S
*
* Copyright ( C ) 1 9 9 9 - 2 0 0 2 , G r e g U n g e r e r ( g e r g @snapgear.com)
* Copyright ( C ) 1 9 9 8 D . J e f f D i o n n e < j e f f @lineo.ca>,
* Kenneth A l b a n o w s k i < k j a h d s @kjahds.com>,
* Copyright ( C ) 2 0 0 0 L i n e o I n c . ( w w w . l i n e o . c o m )
*
* Based o n :
*
* linux/ a r c h / m 6 8 k / k e r n e l / e n t r y . S
*
* Copyright ( C ) 1 9 9 1 , 1 9 9 2 L i n u s T o r v a l d s
*
* 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 R E A D M E . l e g a l 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 .
*
* Linux/ m 6 8 k s u p p o r t b y H a m i s h M a c d o n a l d
*
* 6 8 0 6 0 fixes b y J e s p e r S k o v
* ColdFire s u p p o r t b y G r e g U n g e r e r ( g e r g @snapgear.com)
* 5 3 0 7 fixes b y D a v i d W . M i l l e r
* linux 2 . 4 s u p p o r t D a v i d M c C u l l o u g h < d a v i d m @snapgear.com>
* /
# include < l i n u x / l i n k a g e . h >
# include < a s m / e r r n o . h >
# include < a s m / s e t u p . h >
# include < a s m / s e g m e n t . h >
# include < a s m / a s m - o f f s e t s . h >
# include < a s m / e n t r y . h >
2008-05-01 06:16:28 +04:00
# include < a s m / u n i s t d . h >
2005-04-17 02:20:36 +04:00
.text
.globl buserr
.globl trap
.globl ret_from_exception
.globl ret_from_signal
.globl sys_fork
.globl sys_clone
.globl sys_vfork
ENTRY( b u s e r r )
2011-06-22 07:50:44 +04:00
SAVE_ A L L _ I N T
2011-10-14 09:41:56 +04:00
GET_ C U R R E N T ( % d0 )
2005-04-17 02:20:36 +04:00
movel % s p ,% s p @- /* stack frame pointer argument */
jsr b u s e r r _ c
addql #4 ,% s p
jra r e t _ f r o m _ e x c e p t i o n
ENTRY( t r a p )
2011-06-22 07:50:44 +04:00
SAVE_ A L L _ I N T
2011-10-14 09:41:56 +04:00
GET_ C U R R E N T ( % d0 )
2005-04-17 02:20:36 +04:00
movel % s p ,% s p @- /* stack frame pointer argument */
jsr t r a p _ c
addql #4 ,% s p
jra r e t _ f r o m _ e x c e p t i o n
# ifdef T R A P _ D B G _ I N T E R R U P T
.globl dbginterrupt
ENTRY( d b g i n t e r r u p t )
2011-06-22 07:50:44 +04:00
SAVE_ A L L _ I N T
2011-10-14 09:41:56 +04:00
GET_ C U R R E N T ( % d0 )
2005-04-17 02:20:36 +04:00
movel % s p ,% s p @- /* stack frame pointer argument */
jsr d b g i n t e r r u p t _ c
addql #4 ,% s p
jra r e t _ f r o m _ e x c e p t i o n
# endif
ENTRY( r e s c h e d u l e )
/* save top of frame */
pea % s p @
jbsr s e t _ e s p0
addql #4 ,% s p
pea r e t _ f r o m _ e x c e p t i o n
jmp s c h e d u l e
ENTRY( r e t _ f r o m _ f o r k )
movel % d1 ,% s p @-
jsr s c h e d u l e _ t a i l
addql #4 ,% s p
jra r e t _ f r o m _ e x c e p t i o n
ENTRY( s y s _ f o r k )
SAVE_ S W I T C H _ S T A C K
pea % s p @(SWITCH_STACK_SIZE)
jbsr m 6 8 k _ f o r k
addql #4 ,% s p
RESTORE_ S W I T C H _ S T A C K
rts
ENTRY( s y s _ v f o r k )
SAVE_ S W I T C H _ S T A C K
pea % s p @(SWITCH_STACK_SIZE)
jbsr m 6 8 k _ v f o r k
addql #4 ,% s p
RESTORE_ S W I T C H _ S T A C K
rts
ENTRY( s y s _ c l o n e )
SAVE_ S W I T C H _ S T A C K
pea % s p @(SWITCH_STACK_SIZE)
jbsr m 6 8 k _ c l o n e
addql #4 ,% s p
RESTORE_ S W I T C H _ S T A C K
rts
ENTRY( s y s _ s i g r e t u r n )
SAVE_ S W I T C H _ S T A C K
jbsr d o _ s i g r e t u r n
RESTORE_ S W I T C H _ S T A C K
rts
ENTRY( s y s _ r t _ s i g r e t u r n )
SAVE_ S W I T C H _ S T A C K
jbsr d o _ r t _ s i g r e t u r n
RESTORE_ S W I T C H _ S T A C K
rts
2008-05-01 06:16:28 +04:00
ENTRY( r e t _ f r o m _ u s e r _ s i g n a l )
moveq #_ _ N R _ s i g r e t u r n , % d 0
trap #0
ENTRY( r e t _ f r o m _ u s e r _ r t _ s i g n a l )
2009-09-23 01:25:44 +04:00
movel #_ _ N R _ r t _ s i g r e t u r n , % d 0
2008-05-01 06:16:28 +04:00
trap #0