@ -42,7 +42,16 @@ _start: b reset
ldr p c , _ n o t _ u s e d
ldr p c , _ i r q
ldr p c , _ f i q
# ifdef C O N F I G _ S P L _ B U I L D
_undefined_instruction : .word _ u n d e f i n e d _ i n s t r u c t i o n
_software_interrupt : .word _ s o f t w a r e _ i n t e r r u p t
_prefetch_abort : .word _ p r e f e t c h _ a b o r t
_data_abort : .word _ d a t a _ a b o r t
_not_used : .word _ n o t _ u s e d
_irq : .word _ i r q
_fiq : .word _ f i q
_pad : .word 0x12345678 /* now 16*4=64 */
# else
_undefined_instruction : .word u n d e f i n e d _ i n s t r u c t i o n
_software_interrupt : .word s o f t w a r e _ i n t e r r u p t
_prefetch_abort : .word p r e f e t c h _ a b o r t
@ -51,6 +60,8 @@ _not_used: .word not_used
_irq : .word i r q
_fiq : .word f i q
_pad : .word 0x12345678 /* now 16*4=64 */
# endif / * C O N F I G _ S P L _ B U I L D * /
.global _end_vect
_end_vect :
@ -89,6 +100,10 @@ _armboot_start:
_bss_start_ofs :
.word __bss_start - _ start
.global _image_copy_end_ofs
_image_copy_end_ofs :
.word __image_copy_end - _ start
.globl _bss_end_ofs
_bss_end_ofs :
.word __bss_end__ - _ start
@ -182,12 +197,11 @@ stack_setup:
mov s p , r4
adr r0 , _ s t a r t
# ifndef C O N F I G _ S P L _ B U I L D
cmp r0 , r6
moveq r9 , #0 / * n o r e l o c a t i o n . r e l o c a t i o n o f f s e t ( r9 ) = 0 * /
beq c l e a r _ b s s / * s k i p r e l o c a t i o n * /
# endif
mov r1 , r6 / * r1 < - s c r a t c h f o r c o p y _ l o o p * /
ldr r3 , _ b s s _ s t a r t _ o f s
ldr r3 , _ i m a g e _ c o p y _ e n d _ o f s
add r2 , r0 , r3 / * r2 < - s o u r c e e n d a d d r e s s * /
copy_loop :
@ -235,20 +249,34 @@ fixnext:
add r2 , r2 , #8 / * e a c h r e l . d y n e n t r y i s 8 b y t e s * /
cmp r2 , r3
blo f i x l o o p
b c l e a r _ b s s
_rel_dyn_start_ofs :
.word __rel_dyn_start - _ start
_rel_dyn_end_ofs :
.word __rel_dyn_end - _ start
_dynsym_start_ofs :
.word __dynsym_start - _ start
# endif / * #i f n d e f C O N F I G _ S P L _ B U I L D * /
clear_bss :
# ifdef C O N F I G _ S P L _ B U I L D
/* No relocation for SPL */
ldr r0 , =__bss_start
ldr r1 , =__bss_end__
# else
ldr r0 , _ b s s _ s t a r t _ o f s
ldr r1 , _ b s s _ e n d _ o f s
mov r4 , r6 / * r e l o c a d d r * /
add r0 , r0 , r4
add r1 , r1 , r4
# endif
mov r2 , #0x00000000 / * c l e a r * /
clbss_l : str r2 , [ r0 ] / * c l e a r l o o p . . . * /
add r0 , r0 , #4
cmp r0 , r1
bne c l b s s _ l
# endif / * #i f n d e f C O N F I G _ S P L _ B U I L D * /
/ *
* We a r e d o n e . D o n o t r e t u r n , i n s t e a d b r a n c h t o s e c o n d p a r t o f b o a r d
@ -276,12 +304,6 @@ jump_2_ram:
_board_init_r_ofs :
.word board_init_r - _ start
_rel_dyn_start_ofs :
.word __rel_dyn_start - _ start
_rel_dyn_end_ofs :
.word __rel_dyn_end - _ start
_dynsym_start_ofs :
.word __dynsym_start - _ start
# ifndef C O N F I G _ S K I P _ L O W L E V E L _ I N I T
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@ -329,6 +351,8 @@ cpu_init_crit:
mov l r , i p @ restore link
mov p c , l r @ back to my caller
# endif
# ifndef C O N F I G _ S P L _ B U I L D
/ *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
@ -516,4 +540,5 @@ fiq:
bad_ s a v e _ u s e r _ r e g s
bl d o _ f i q
# endif
# endif / * C O N F I G _ U S E _ I R Q * /
# endif / * C O N F I G _ S P L _ B U I L D * /