2005-04-17 02:20:36 +04:00
/ *
2006-10-04 01:01:26 +04:00
* arch/ a l p h a / k e r n e l / h e a d . S
2005-04-17 02:20:36 +04:00
*
* initial b o o t s t u f f . . A t t h i s p o i n t , t h e b o o t l o a d e r h a s a l r e a d y
* switched i n t o O S F / 1 P A L - c o d e , a n d l o a d e d u s a t t h e c o r r e c t a d d r e s s
* ( START_ A D D R ) . S o t h e r e i s n ' t m u c h l e f t f o r u s t o d o : j u s t s e t u p
* the k e r n e l g l o b a l p o i n t e r a n d j u m p t o t h e k e r n e l e n t r y - p o i n t .
* /
2009-04-26 06:10:58 +04:00
# include < l i n u x / i n i t . h >
2005-04-17 02:20:36 +04:00
# include < a s m / s y s t e m . h >
2005-09-09 23:28:48 +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
2009-04-26 06:10:58 +04:00
_ _ HEAD
2005-04-17 02:20:36 +04:00
.globl swapper_pg_dir
.globl _stext
swapper_ p g _ d i r =SWAPPER_PGD
.set noreorder
.globl __start
.ent __start
_stext :
__start :
.prologue 0
br $ 2 7 ,1 f
1 : ldgp $ 2 9 ,0 ( $ 2 7 )
/* We need to get current_task_info loaded up... */
lda $ 8 ,i n i t _ t h r e a d _ u n i o n
/* ... and find our stack ... */
lda $ 3 0 ,0 x40 0 0 - S I Z E O F _ P T _ R E G S ( $ 8 )
/* ... and then we can start the kernel. */
jsr $ 2 6 ,s t a r t _ k e r n e l
call_ p a l P A L _ h a l t
.end __start
# ifdef C O N F I G _ S M P
.align 3
.globl __smp_callin
.ent __smp_callin
/ * On e n t r y h e r e f r o m S R M c o n s o l e , t h e H W P C B o f t h e p e r - c p u
slot f o r t h i s p r o c e s s o r h a s b e e n l o a d e d . W e ' v e a r r a n g e d
for t h e U N I Q U E v a l u e f o r t h i s p r o c e s s t o c o n t a i n t h e P C B B
of t h e t a r g e t i d l e t a s k . * /
__smp_callin :
.prologue 1
ldgp $ 2 9 ,0 ( $ 2 7 ) # F i r s t o r d e r o f b u s i n e s s , l o a d t h e G P .
call_ p a l P A L _ r d u n i q # G r a b t h e t a r g e t P C B B .
mov $ 0 ,$ 1 6 # I n s t a l l i t .
call_ p a l P A L _ s w p c t x
lda $ 8 ,0 x3 f f f # F i n d " current " .
bic $ 3 0 ,$ 8 ,$ 8
jsr $ 2 6 ,s m p _ c a l l i n
call_ p a l P A L _ h a l t
.end __smp_callin
# endif / * C O N F I G _ S M P * /
#
# The f o l l o w i n g t w o f u n c t i o n s a r e n e e d e d f o r s u p p o r t i n g S R M P A L c o d e
# on t h e P C 1 6 4 ( a t l e a s t ) , s i n c e t h a t P A L c o d e m a n a g e s t h e i n t e r r u p t
# masking, a n d w e c a n n o t d u p l i c a t e t h e e f f o r t w i t h o u t c a u s i n g p r o b l e m s
#
.align 3
.globl cserve_ena
.ent cserve_ena
cserve_ena :
.prologue 0
bis $ 1 6 ,$ 1 6 ,$ 1 7
lda $ 1 6 ,5 2 ( $ 3 1 )
call_ p a l P A L _ c s e r v e
ret ( $ 2 6 )
.end cserve_ena
.align 3
.globl cserve_dis
.ent cserve_dis
cserve_dis :
.prologue 0
bis $ 1 6 ,$ 1 6 ,$ 1 7
lda $ 1 6 ,5 3 ( $ 3 1 )
call_ p a l P A L _ c s e r v e
ret ( $ 2 6 )
.end cserve_dis
#
# It i s h a n d y , o n o c c a s i o n , t o m a k e h a l t a c t u a l l y j u s t l o o p .
# Putting i t h e r e m e a n s w e d o n t h a v e t o r e c o m p i l e t h e w h o l e
# kernel.
#
.align 3
.globl halt
.ent halt
halt :
.prologue 0
call_ p a l P A L _ h a l t
.end halt