@ -52,6 +52,34 @@
sdbbp 1 # I n v o k e U H I o p e r a t i o n
.endm
.macro setup_stack_gd
li t 0 , - 1 6
PTR_ L I t 1 , C O N F I G _ S Y S _ I N I T _ S P _ A D D R
and s p , t 1 , t 0 # f o r c e 16 b y t e a l i g n m e n t
PTR_ S U B U \
sp, s p , G D _ S I Z E # r e s e r v e s p a c e f o r g d
and s p , s p , t 0 # f o r c e 16 b y t e a l i g n m e n t
move k 0 , s p # s a v e g d p o i n t e r
# ifdef C O N F I G _ S Y S _ M A L L O C _ F _ L E N
li t 2 , C O N F I G _ S Y S _ M A L L O C _ F _ L E N
PTR_ S U B U \
sp, s p , t 2 # r e s e r v e s p a c e f o r e a r l y m a l l o c
and s p , s p , t 0 # f o r c e 16 b y t e a l i g n m e n t
# endif
move f p , s p
/* Clear gd */
move t 0 , k 0
1 :
PTR_ S z e r o , 0 ( t 0 )
blt t 0 , t 1 , 1 b
PTR_ A D D I U t 0 , P T R S I Z E
# ifdef C O N F I G _ S Y S _ M A L L O C _ F _ L E N
PTR_ S s p , G D _ M A L L O C _ B A S E ( k 0 ) # g d - > m a l l o c _ b a s e o f f s e t
# endif
.endm
ENTRY( _ s t a r t )
/* U-Boot entry point */
b r e s e t
@ -227,32 +255,8 @@ wr_done:
# endif
# endif
/* Set up temporary stack */
li t 0 , - 1 6
PTR_ L I t 1 , C O N F I G _ S Y S _ I N I T _ S P _ A D D R
and s p , t 1 , t 0 # f o r c e 16 b y t e a l i g n m e n t
PTR_ S U B U \
sp, s p , G D _ S I Z E # r e s e r v e s p a c e f o r g d
and s p , s p , t 0 # f o r c e 16 b y t e a l i g n m e n t
move k 0 , s p # s a v e g d p o i n t e r
# ifdef C O N F I G _ S Y S _ M A L L O C _ F _ L E N
li t 2 , C O N F I G _ S Y S _ M A L L O C _ F _ L E N
PTR_ S U B U \
sp, s p , t 2 # r e s e r v e s p a c e f o r e a r l y m a l l o c
and s p , s p , t 0 # f o r c e 16 b y t e a l i g n m e n t
# endif
move f p , s p
/* Clear gd */
move t 0 , k 0
1 :
PTR_ S z e r o , 0 ( t 0 )
blt t 0 , t 1 , 1 b
PTR_ A D D I U t 0 , P T R S I Z E
# ifdef C O N F I G _ S Y S _ M A L L O C _ F _ L E N
PTR_ S s p , G D _ M A L L O C _ B A S E ( k 0 ) # g d - > m a l l o c _ b a s e o f f s e t
# endif
/* Set up initial stack and global data */
setup_ s t a c k _ g d
move a0 , z e r o # a 0 < - - b o o t _ f l a g s = 0
PTR_ L A t 9 , b o a r d _ i n i t _ f