@ -28,17 +28,19 @@
rte;
# if d e f i n e d ( C O N F I G _ C F _ S B F )
# define A S M _ D R A M I N I T ( a s m _ d r a m _ i n i t - C O N F I G _ S Y S _ T E X T _ B A S E + C O N F I G _ S Y S _ I N I T _ R A M _ A D D R )
# define A S M _ S B F _ I M G _ H D R ( a s m _ s b f _ i m g _ h d r - C O N F I G _ S Y S _ T E X T _ B A S E + C O N F I G _ S Y S _ I N I T _ R A M _ A D D R )
# define A S M _ D R A M I N I T ( a s m _ d r a m _ i n i t - C O N F I G _ S Y S _ T E X T _ B A S E + \
CONFIG_ S Y S _ I N I T _ R A M _ A D D R )
# define A S M _ S B F _ I M G _ H D R ( a s m _ s b f _ i m g _ h d r - C O N F I G _ S Y S _ T E X T _ B A S E + \
CONFIG_ S Y S _ I N I T _ R A M _ A D D R )
# endif
.text
/ *
* Vector t a b l e . T h i s i s u s e d f o r i n i t i a l p l a t f o r m s t a r t u p .
* These v e c t o r s a r e t o c a t c h a n y u n - i n t e n d e d t r a p s .
* /
_vectors :
# if d e f i n e d ( C O N F I G _ C F _ S B F )
INITSP : .long 0 /* Initial SP */
INITPC : .long A S M _ D R A M I N I T / * I n i t i a l P C * /
@ -47,33 +49,16 @@ INITSP: .long 0 /* Initial SP */
INITPC : .long _ S T A R T / * I n i t i a l P C * /
# endif
vector02 : .long _ F A U L T / * A c c e s s E r r o r * /
vector03 : .long _ F A U L T / * A d d r e s s E r r o r * /
vector04 : .long _ F A U L T / * I l l e g a l I n s t r u c t i o n * /
vector05 : .long _ F A U L T / * R e s e r v e d * /
vector06 : .long _ F A U L T / * R e s e r v e d * /
vector07 : .long _ F A U L T / * R e s e r v e d * /
vector08 : .long _ F A U L T / * P r i v i l e g e V i o l a t i o n * /
vector09 : .long _ F A U L T / * T r a c e * /
vector0A : .long _ F A U L T / * U n i m p l e m e n t e d A - L i n e * /
vector0B : .long _ F A U L T / * U n i m p l e m e n t e d F - L i n e * /
vector0C : .long _ F A U L T / * D e b u g I n t e r r u p t * /
vector0D : .long _ F A U L T / * R e s e r v e d * /
vector0E : .long _ F A U L T / * F o r m a t E r r o r * /
vector0F : .long _ F A U L T / * U n i t i a l i z e d I n t . * /
vector02_0F :
.long _ FAULT, _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T
.long _ FAULT, _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T
/* Reserved */
vector10_17 :
.long _ FAULT, _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T
vector18 : .long _ F A U L T / * S p u r i o u s I n t e r r u p t * /
vector19 : .long _ F A U L T / * A u t o v e c t o r L e v e l 1 * /
vector1A : .long _ F A U L T / * A u t o v e c t o r L e v e l 2 * /
vector1B : .long _ F A U L T / * A u t o v e c t o r L e v e l 3 * /
vector1C : .long _ F A U L T / * A u t o v e c t o r L e v e l 4 * /
vector1D : .long _ F A U L T / * A u t o v e c t o r L e v e l 5 * /
vector1E : .long _ F A U L T / * A u t o v e c t o r L e v e l 6 * /
vector1F : .long _ F A U L T / * A u t o v e c t o r L e v e l 7 * /
vector18_1F :
.long _ FAULT, _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T , _ F A U L T
# if ! d e f i n e d ( C O N F I G _ C F _ S B F )
/* TRAP #0 - #15 */
@ -127,6 +112,7 @@ asm_sbf_img_hdr:
asm_dram_init :
move. l #( 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 _ C T R L ) , % d 0
movec % d0 , % R A M B A R 1 / * i n i t R a m b a r * /
move. l #( 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 _ S P _ O F F S E T ) , % s p
clr. l % s p @-
@ -142,7 +128,6 @@ asm_dram_init:
* Dram I n i t i a l i z a t i o n
* a1 , a2 , a n d d0
* /
/* mscr sdram */
move. l #0xFC0A4074 , % a1
move. b #( C O N F I G _ S Y S _ S D R A M _ D R V _ S T R E N G T H ) , ( % a 1 )
nop
@ -393,13 +378,16 @@ _start:
move. l % d0 , - ( % s p )
bsr b o a r d _ i n i t _ f _ i n i t _ r e s e r v e
bsr 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 ) * /
/* run low-level CPU init code (from flash) */
bsr c p u _ i n i t _ f
clr. l % s p @-
bsr b o a r d _ i n i t _ f / * r u n l o w - l e v e l b o a r d i n i t c o d e ( f r o m f l a s h ) * /
/* run low-level board init code (from flash) */
bsr b o a r d _ i n i t _ f
/* board_init_f() does not return */
/*------------------------------------------------------------------------------ */
/***************************************************************************** */
/ *
* void r e l o c a t e _ c o d e ( a d d r _ s p , g d , a d d r _ m o n i )
@ -458,7 +446,7 @@ clear_bss:
* /
move. l % a0 , % a1
add. l #( _ _ g o t _ s t a r t - C O N F I G _ S Y S _ M O N I T O R _ B A S E ) , % a 1
move. l % a1 ,% a5 / * * f i x g o t p o i n t e r r e g i s t e r a5 * /
move. l % a1 ,% a5 / * f i x g o t p o i n t e r r e g i s t e r a5 * /
move. l % a0 , % a2
add. l #( _ _ g o t _ e n d - C O N F I G _ S Y S _ M O N I T O R _ B A S E ) , % a 2
@ -480,13 +468,14 @@ clear_bss:
move. l % d0 ,- ( % s p ) / * g d * /
jsr ( % a1 )
/*------------------------------------------------------------------------------*/
/******************************************************************************/
/* exception code */
.globl _fault
_fault :
bra _ f a u l t
.globl _exc_handler
.globl _exc_handler
_exc_handler :
SAVE_ A L L
movel % s p ,% s p @-
@ -502,7 +491,7 @@ _int_handler:
addql #4 ,% s p
RESTORE_ A L L
/*------------------------------------------------------------------------------ */
/***************************************************************************** */
.globl version_string
version_string :