@ -130,12 +130,6 @@ in_flash:
/* initialize some SPRs that are hard to access from C */
/*----------------------------------------------------------------------*/
lis r3 , C O N F I G _ S Y S _ I M M R @h /* pass IMMR as arg1 to C routine */
ori r1 , r3 , C O N F I G _ S Y S _ I N I T _ S P _ O F F S E T / * s e t u p t h e s t a c k i n i n t e r n a l D P R A M * /
/* Note: R0 is still 0 here */
stwu r0 , - 4 ( r1 ) / * c l e a r f i n a l s t a c k f r a m e s o t h a t * /
stwu r0 , - 4 ( r1 ) / * s t a c k b a c k t r a c e s t e r m i n a t e c l e a n l y * /
/ *
* Disable s e r i a l i z e d i f e t c h a n d s h o w c y c l e s
* ( i. e . s e t p r o c e s s o r t o n o r m a l m o d e ) .
@ -151,6 +145,25 @@ in_flash:
ori r2 , r2 , C O N F I G _ S Y S _ D E R @l
mtspr D E R , r2
/* set up the stack in internal DPRAM */
lis r3 , ( C O N F I G _ S Y S _ I N I T _ R A M _ A D D R + C O N F I G _ S Y S _ I N I T _ R A M _ S I Z E ) @h
ori r3 , r3 , ( C O N F I G _ S Y S _ I N I T _ R A M _ A D D R + C O N F I G _ S Y S _ I N I T _ R A M _ S I Z E ) @l
addi r1 , r3 , - 8
bl b o a r d _ i n i t _ f _ a l l o c _ r e s e r v e
addi r1 , r3 , - 8
/* Zeroise the CPM dpram */
lis r4 , C O N F I G _ S Y S _ I M M R @h
ori r4 , r4 , ( 0 x20 0 0 - 4 )
li r0 , ( 0 x20 0 0 / 4 )
mtctr r0
li r0 , 0
1 : stwu r0 , 4 ( r4 )
bdnz 1 b
bl b o a r d _ i n i t _ f _ i n i t _ r e s e r v e
/* let the C-code set up the rest */
/* */
/* Be careful to keep code relocatable ! */
@ -158,7 +171,7 @@ in_flash:
GET_ G O T / * i n i t i a l i z e G O T a c c e s s * /
/* r3: IMMR */
lis r3 , C O N F I G _ S Y S _ I M M R @h
bl c p u _ i n i t _ f / * r u n l o w - l e v e l C P U i n i t c o d e ( f r o m F l a s h ) * /
bl b o a r d _ i n i t _ f / * r u n 1 s t p a r t o f b o a r d i n i t c o d e ( f r o m F l a s h ) * /