@ -27,7 +27,8 @@
* the G D ( ' g l o b a l d a t a ' ) s t r u c t u r e , b o t h l o c a t e d i n s o m e r e a d i l y
* available R A M ( S R A M , l o c k e d c a c h e . . . ) . I n t h i s c o n t e x t , V A R I A B L E
* global d a t a , i n i t i a l i z e d o r n o t ( B S S ) , a r e U N A V A I L A B L E ; only
* CONSTANT i n i t i a l i z e d d a t a a r e a v a i l a b l e .
* CONSTANT i n i t i a l i z e d d a t a a r e a v a i l a b l e . G D s h o u l d b e z e r o e d
* before b o a r d _ i n i t _ f ( ) i s c a l l e d .
*
* 2 . Call b o a r d _ i n i t _ f ( ) . T h i s f u n c t i o n p r e p a r e s t h e h a r d w a r e f o r
* execution f r o m s y s t e m R A M ( D R A M , D D R . . . ) A s s y s t e m R A M m a y n o t
@ -36,24 +37,31 @@
* data i n c l u d e t h e r e l o c a t i o n d e s t i n a t i o n , t h e f u t u r e s t a c k , a n d
* the f u t u r e G D l o c a t i o n .
*
* ( the f o l l o w i n g a p p l i e s o n l y t o n o n - S P L b u i l d s )
*
* 3 . Set u p i n t e r m e d i a t e e n v i r o n m e n t w h e r e t h e s t a c k a n d G D a r e t h e
* ones a l l o c a t e d b y b o a r d _ i n i t _ f ( ) i n s y s t e m R A M , b u t B S S a n d
* initialized n o n - c o n s t d a t a a r e s t i l l n o t a v a i l a b l e .
*
* 4 . Call r e l o c a t e _ c o d e ( ) . T h i s f u n c t i o n r e l o c a t e s U - B o o t f r o m i t s
* current l o c a t i o n i n t o t h e r e l o c a t i o n d e s t i n a t i o n c o m p u t e d b y
* board_ i n i t _ f ( ) .
* 4 a. F o r U - B o o t p r o p e r ( n o t S P L ) , c a l l r e l o c a t e _ c o d e ( ) . T h i s f u n c t i o n
* relocates U - B o o t f r o m i t s c u r r e n t l o c a t i o n i n t o t h e r e l o c a t i o n
* destination c o m p u t e d b y b o a r d _ i n i t _ f ( ) .
*
* 4 b. F o r S P L , b o a r d _ i n i t _ f ( ) j u s t r e t u r n s ( t o c r t 0 ) . T h e r e i s n o
* code r e l o c a t i o n i n S P L .
*
* 5 . Set u p f i n a l e n v i r o n m e n t f o r c a l l i n g b o a r d _ i n i t _ r ( ) . T h i s
* environment h a s B S S ( i n i t i a l i z e d t o 0 ) , i n i t i a l i z e d n o n - c o n s t
* data ( i n i t i a l i z e d t o t h e i r i n t e n d e d v a l u e ) , a n d s t a c k i n s y s t e m
* RAM. G D h a s r e t a i n e d v a l u e s s e t b y b o a r d _ i n i t _ f ( ) . S o m e C P U s
* have s o m e w o r k l e f t t o d o a t t h i s p o i n t r e g a r d i n g m e m o r y , s o
* call c _ r u n t i m e _ c p u _ s e t u p .
* RAM ( f o r S P L m o v i n g t h e s t a c k a n d G D i n t o R A M i s o p t i o n a l - s e e
* CONFIG_ S P L _ S T A C K _ R ) . G D h a s r e t a i n e d v a l u e s s e t b y b o a r d _ i n i t _ f ( ) .
*
* TODO : For S P L , i m p l e m e n t s t a c k r e l o c a t i o n o n A A r c h64 .
*
* 6 . Branch t o b o a r d _ i n i t _ r ( ) .
* 6 . For U - B o o t p r o p e r ( n o t S P L ) , s o m e C P U s h a v e s o m e w o r k l e f t t o d o
* at t h i s p o i n t r e g a r d i n g m e m o r y , s o c a l l c _ r u n t i m e _ c p u _ s e t u p .
*
* 7 . Branch t o b o a r d _ i n i t _ r ( ) .
*
* For m o r e i n f o r m a t i o n s e e ' B o a r d I n i t i a l i s a t i o n F l o w i n R E A D M E .
* /
ENTRY( _ m a i n )
@ -106,6 +114,8 @@ relocation_return:
* /
bl c _ r u n t i m e _ c p u _ s e t u p / * s t i l l c a l l o l d r o u t i n e * /
/* TODO: For SPL, call spl_relocate_stack_gd() to alloc stack relocation */
/ *
* Clear B S S s e c t i o n
* /