@ -1,26 +1,26 @@
/ *
* Copyright 2 0 0 4 F r e e s c a l e S e m i c o n d u c t o r .
* Copyright ( C ) 2 0 0 2 ,2 0 0 3 , M o t o r o l a I n c .
* Xianghua X i a o < X . X i a o @motorola.com>
*
* See f i l e C R E D I T S f o r l i s t o f p e o p l e w h o c o n t r i b u t e d t o t h i s
* project.
*
* This p r o g r a m i s f r e e s o f t w a r e ; you can redistribute it and/or
* modify i t u n d e r t h e t e r m s o f t h e G N U G e n e r a l P u b l i c L i c e n s e a s
* published b y t h e F r e e S o f t w a r e F o u n d a t i o n ; either version 2 of
* the L i c e n s e , o r ( a t y o u r o p t i o n ) a n y l a t e r v e r s i o n .
*
* This p r o g r a m i s d i s t r i b u t e d i n t h e h o p e t h a t i t w i l l b e u s e f u l ,
* but W I T H O U T A N Y W A R R A N T Y ; without even the implied warranty of
* MERCHANTABILITY o r F I T N E S S F O R A P A R T I C U L A R P U R P O S E . S e e t h e
* GNU G e n e r a l P u b l i c L i c e n s e f o r m o r e d e t a i l s .
*
* You s h o u l d h a v e r e c e i v e d a c o p y o f t h e G N U G e n e r a l P u b l i c L i c e n s e
* along w i t h t h i s p r o g r a m ; if not, write to the Free Software
* Foundation, I n c . , 5 9 T e m p l e P l a c e , S u i t e 3 3 0 , B o s t o n ,
* MA 0 2 1 1 1 - 1 3 0 7 U S A
* /
* Copyright ( C ) 2 0 0 2 ,2 0 0 3 , M o t o r o l a I n c .
* Xianghua X i a o < X . X i a o @motorola.com>
*
* See f i l e C R E D I T S f o r l i s t o f p e o p l e w h o c o n t r i b u t e d t o t h i s
* project.
*
* This p r o g r a m i s f r e e s o f t w a r e ; you can redistribute it and/or
* modify i t u n d e r t h e t e r m s o f t h e G N U G e n e r a l P u b l i c L i c e n s e a s
* published b y t h e F r e e S o f t w a r e F o u n d a t i o n ; either version 2 of
* the L i c e n s e , o r ( a t y o u r o p t i o n ) a n y l a t e r v e r s i o n .
*
* This p r o g r a m i s d i s t r i b u t e d i n t h e h o p e t h a t i t w i l l b e u s e f u l ,
* but W I T H O U T A N Y W A R R A N T Y ; without even the implied warranty of
* MERCHANTABILITY o r F I T N E S S F O R A P A R T I C U L A R P U R P O S E . S e e t h e
* GNU G e n e r a l P u b l i c L i c e n s e f o r m o r e d e t a i l s .
*
* You s h o u l d h a v e r e c e i v e d a c o p y o f t h e G N U G e n e r a l P u b l i c L i c e n s e
* along w i t h t h i s p r o g r a m ; if not, write to the Free Software
* Foundation, I n c . , 5 9 T e m p l e P l a c e , S u i t e 3 3 0 , B o s t o n ,
* MA 0 2 1 1 1 - 1 3 0 7 U S A
* /
# include < p p c _ a s m . t m p l >
# include < p p c _ d e f s . h >
@ -29,6 +29,24 @@
# include < c o n f i g . h >
# include < m p c85 x x . h >
/ *
* TLB0 a n d T L B 1 E n t r i e s
*
* Out o f r e s e t , T L B 1 ' s E n t r y 0 m a p s t h e h i g h e s t 4 K f o r C C S R B A R .
* However, C C S R B A R i s t h e n r e l o c a t e d t o C F G _ C C S R B A R r i g h t a f t e r
* these T L B e n t r i e s a r e e s t a b l i s h e d .
*
* The T L B e n t r i e s f o r D D R a r e d y n a m i c a l l y s e t u p i n s p d _ s d r a m ( )
* and u s e T L B 1 E n t r i e s 8 t h r o u g h 1 5 a s n e e d e d a c c o r d i n g t o t h e
* size o f D D R m e m o r y .
*
* MAS0 : tlbsel, e s e l , n v
* MAS1 : valid, i p r o t , t i d , t s , t s i z e
* MAS2 : epn, s h a r e n , x0 , x1 , w , i , m , g , e
* MAS3 : rpn, u 0 - u 3 , u x , s x , u w , s w , u r , s r
* /
# define e n t r y _ s t a r t \
mflr r1 ; \
bl 0 f ;
@ -38,119 +56,174 @@
mtlr r1 ; \
blr ;
/* TLB1 entries configuration: */
.section .bootpg , " ax"
.globl tlb1_entry
tlb1_entry :
entry_ s t a r t
/* Number of entries in the following table */
.long 0x0c
.long TLB1 _ M A S 0 ( 1 ,1 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 1 M )
.long TLB1 _ M A S 2 ( ( ( C F G _ C C S R B A R > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( ( ( C F G _ C C S R B A R > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
# if d e f i n e d ( C F G _ F L A S H _ P O R T _ W I D T H _ 1 6 )
.long TLB1 _ M A S 0 ( 1 ,2 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 4 M )
.long TLB1 _ M A S 2 ( ( ( C F G _ F L A S H _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( ( ( C F G _ F L A S H _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 1 ,3 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 4 M )
.long TLB1 _ M A S 2 ( ( ( ( C F G _ F L A S H _ B A S E + 0 x40 0 0 0 0 ) > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( ( ( ( C F G _ F L A S H _ B A S E + 0 x40 0 0 0 0 ) > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
# else
.long TLB1 _ M A S 0 ( 1 ,2 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 1 6 M )
.long TLB1 _ M A S 2 ( ( ( C F G _ F L A S H _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( ( ( C F G _ F L A S H _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 1 ,3 ,0 )
.long TLB1 _ M A S 1 ( 0 ,0 ,0 ,0 ,B O O K E _ P A G E S Z _ 1 M )
.long TLB1 _ M A S 2 ( 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 )
.long TLB1 _ M A S 3 ( 0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
# endif
# if ! d e f i n e d ( C O N F I G _ S P D _ E E P R O M )
.long TLB1 _ M A S 0 ( 1 ,4 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 6 4 M )
.long TLB1 _ M A S 2 ( ( ( C F G _ D D R _ S D R A M _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 )
.long TLB1 _ M A S 3 ( ( ( C F G _ D D R _ S D R A M _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 1 ,5 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 6 4 M )
.long TLB1 _ M A S 2 ( ( ( ( C F G _ D D R _ S D R A M _ B A S E + 0 x40 0 0 0 0 0 ) > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 )
.long TLB1 _ M A S 3 ( ( ( ( C F G _ D D R _ S D R A M _ B A S E + 0 x40 0 0 0 0 0 ) > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
# else
.long TLB1 _ M A S 0 ( 1 ,4 ,0 )
.long TLB1 _ M A S 1 ( 0 ,0 ,0 ,0 ,B O O K E _ P A G E S Z _ 1 M )
.long TLB1 _ M A S 2 ( 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 )
.long TLB1 _ M A S 3 ( 0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 1 ,5 ,0 )
.long TLB1 _ M A S 1 ( 0 ,0 ,0 ,0 ,B O O K E _ P A G E S Z _ 1 M )
.long TLB1 _ M A S 2 ( 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 )
.long TLB1 _ M A S 3 ( 0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
# endif
.long TLB1 _ M A S 0 ( 1 ,6 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 6 4 M )
# if d e f i n e d ( C O N F I G _ R A M _ A S _ F L A S H )
.long TLB1 _ M A S 2 ( ( ( C F G _ L B C _ S D R A M _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
# else
.long TLB1 _ M A S 2 ( ( ( C F G _ L B C _ S D R A M _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 )
# endif
.long TLB1 _ M A S 3 ( ( ( C F G _ L B C _ S D R A M _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 1 ,7 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 1 6 K )
# ifdef C O N F I G _ L 2 _ I N I T _ R A M
.long TLB1 _ M A S 2 ( ( ( C F G _ I N I T _ R A M _ A D D R > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,1 ,0 ,0 ,0 ,0 )
# else
.long TLB1 _ M A S 2 ( ( ( C F G _ I N I T _ R A M _ A D D R > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 )
# endif
.long TLB1 _ M A S 3 ( ( ( C F G _ I N I T _ R A M _ A D D R > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 1 ,8 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 2 5 6 M )
.long TLB1 _ M A S 2 ( ( ( C F G _ P C I 1 _ M E M _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( ( ( C F G _ P C I 1 _ M E M _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 1 ,9 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 1 6 K )
.long TLB1 _ M A S 2 ( ( ( C F G _ B C S R > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( ( ( C F G _ B C S R > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
/ *
* Number o f T L B 0 a n d T L B 1 e n t r i e s i n t h e f o l l o w i n g t a b l e
* /
.long 13
# if ( C F G _ C C S R B A R _ D E F A U L T ! = C F G _ C C S R B A R )
/ *
* RapidIO M M U f o r 5 1 2 M
* Two e n t r i e s , 1 0 a n d 1 1
* TLB0 4 K N o n - c a c h e a b l e , g u a r d e d
* 0 xff7 0 0 0 0 0 4 K I n i t i a l C C S R B A R m a p p i n g
*
* This e n d s u p a t a T L B 0 I n d e x = =0 e n t r y , a n d m u s t n o t c o l l i d e
* with o t h e r T L B 0 E n t r i e s .
* /
.long TLB1 _ M A S 0 ( 0 , 0 , 0 )
.long TLB1 _ M A S 1 ( 1 , 0 , 0 , 0 , 0 )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ C C S R B A R _ D E F A U L T ) , 0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ C C S R B A R _ D E F A U L T ) , 0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
# else
# error( " U p d a t e t h e n u m b e r o f t a b l e e n t r i e s i n t l b1 _ e n t r y " )
# endif
/ *
* TLB0 1 6 K C a c h e a b l e , n o n - g u a r d e d
* 0 xd0 0 1 _ 0 0 0 0 1 6 K T e m p o r a r y G l o b a l d a t a f o r i n i t i a l i z a t i o n
*
* Use f o u r 4 K T L B 0 e n t r i e s . T h e s e e n t r i e s m u s t b e c a c h e a b l e
* as t h e y p r o v i d e t h e b o o t s t r a p m e m o r y b e f o r e t h e m e m o r y
* controler a n d r e a l m e m o r y h a v e b e e n c o n f i g u r e d .
*
* These e n t r i e s e n d u p a t T L B 0 I n d i c i e s 0 x10 , 0 x14 , 0 x18 a n d 0 x1 c ,
* and m u s t n o t c o l l i d e w i t h o t h e r T L B 0 e n t r i e s .
* /
.long TLB1 _ M A S 0 ( 1 ,1 0 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 2 5 6 M )
.long TLB1 _ M A S 2 ( ( ( C F G _ R I O _ M E M _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( ( ( C F G _ R I O _ M E M _ B A S E > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 0 , 0 , 0 )
.long TLB1 _ M A S 1 ( 1 , 0 , 0 , 0 , 0 )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ I N I T _ R A M _ A D D R ) ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ I N I T _ R A M _ A D D R ) ,
0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 1 )
.long TLB1 _ M A S 0 ( 1 ,1 1 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 2 5 6 M )
.long TLB1 _ M A S 2 ( ( ( C F G _ R I O _ M E M _ B A S E + 0 x10 0 0 0 0 0 0 > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( ( ( C F G _ R I O _ M E M _ B A S E + 0 x10 0 0 0 0 0 0 > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 0 , 0 , 0 )
.long TLB1 _ M A S 1 ( 1 , 0 , 0 , 0 , 0 )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ I N I T _ R A M _ A D D R + 4 * 1 0 2 4 ) ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ I N I T _ R A M _ A D D R + 4 * 1 0 2 4 ) ,
0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 1 )
.long TLB1 _ M A S 0 ( 0 , 0 , 0 )
.long TLB1 _ M A S 1 ( 1 , 0 , 0 , 0 , 0 )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ I N I T _ R A M _ A D D R + 8 * 1 0 2 4 ) ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ I N I T _ R A M _ A D D R + 8 * 1 0 2 4 ) ,
0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 1 )
# if ( C F G _ C C S R B A R _ D E F A U L T ! = C F G _ C C S R B A R )
.long TLB1 _ M A S 0 ( 1 ,1 5 ,0 )
.long TLB1 _ M A S 1 ( 1 ,1 ,0 ,0 ,B O O K E _ P A G E S Z _ 1 M )
.long TLB1 _ M A S 2 ( ( ( C F G _ C C S R B A R _ D E F A U L T > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( ( ( C F G _ C C S R B A R _ D E F A U L T > > 1 2 ) & 0 x f f f f f ) ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
# else
.long TLB1 _ M A S 0 ( 1 ,1 5 ,0 )
.long TLB1 _ M A S 1 ( 0 ,0 ,0 ,0 ,B O O K E _ P A G E S Z _ 1 M )
.long TLB1 _ M A S 2 ( 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 )
.long TLB1 _ M A S 3 ( 0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 0 , 0 , 0 )
.long TLB1 _ M A S 1 ( 1 , 0 , 0 , 0 , 0 )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ I N I T _ R A M _ A D D R + 1 2 * 1 0 2 4 ) ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ I N I T _ R A M _ A D D R + 1 2 * 1 0 2 4 ) ,
0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 1 )
/ *
* TLB 0 : 1 6 M N o n - c a c h e a b l e , g u a r d e d
* 0 xff0 0 0 0 0 0 1 6 M F L A S H
* Out o f r e s e t t h i s e n t r y i s o n l y 4 K .
* /
.long TLB1 _ M A S 0 ( 1 , 0 , 0 )
.long TLB1 _ M A S 1 ( 1 , 1 , 0 , 0 , B O O K E _ P A G E S Z _ 1 6 M )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ F L A S H _ B A S E ) , 0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ F L A S H _ B A S E ) , 0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
/ *
* TLB 1 : 2 5 6 M N o n - c a c h e a b l e , g u a r d e d
* 0 x8 0 0 0 0 0 0 0 2 5 6 M P C I 1 M E M F i r s t h a l f
* /
.long TLB1 _ M A S 0 ( 1 , 1 , 0 )
.long TLB1 _ M A S 1 ( 1 , 1 , 0 , 0 , B O O K E _ P A G E S Z _ 2 5 6 M )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ P C I 1 _ M E M _ B A S E ) , 0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ P C I 1 _ M E M _ B A S E ) , 0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
/ *
* TLB 2 : 2 5 6 M N o n - c a c h e a b l e , g u a r d e d
* 0 x9 0 0 0 0 0 0 0 2 5 6 M P C I 1 M E M S e c o n d h a l f
* /
.long TLB1 _ M A S 0 ( 1 , 2 , 0 )
.long TLB1 _ M A S 1 ( 1 , 1 , 0 , 0 , B O O K E _ P A G E S Z _ 2 5 6 M )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ P C I 1 _ M E M _ B A S E + 0 x10 0 0 0 0 0 0 ) ,
0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ P C I 1 _ M E M _ B A S E + 0 x10 0 0 0 0 0 0 ) ,
0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 1 )
/ *
* TLB 3 : 2 5 6 M N o n - c a c h e a b l e , g u a r d e d
* 0 xc0 0 0 0 0 0 0 2 5 6 M R a p i d I O M E M F i r s t h a l f
* /
.long TLB1 _ M A S 0 ( 1 , 3 , 0 )
.long TLB1 _ M A S 1 ( 1 , 1 , 0 , 0 , B O O K E _ P A G E S Z _ 2 5 6 M )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ R I O _ M E M _ B A S E ) , 0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ R I O _ M E M _ B A S E ) , 0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
/ *
* TLB 4 : 2 5 6 M N o n - c a c h e a b l e , g u a r d e d
* 0 xd0 0 0 0 0 0 0 2 5 6 M R a p i d I O M E M S e c o n d h a l f
* /
.long TLB1 _ M A S 0 ( 1 , 4 , 0 )
.long TLB1 _ M A S 1 ( 1 , 1 , 0 , 0 , B O O K E _ P A G E S Z _ 2 5 6 M )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ R I O _ M E M _ B A S E + 0 x10 0 0 0 0 0 0 ) ,
0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ R I O _ M E M _ B A S E + 0 x10 0 0 0 0 0 0 ) ,
0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 1 )
/ *
* TLB 5 : 6 4 M N o n - c a c h e a b l e , g u a r d e d
* 0 xe0 0 0 _ 0 0 0 0 1 M C C S R B A R
* 0 xe2 0 0 _ 0 0 0 0 1 6 M P C I 1 I O
* /
.long TLB1 _ M A S 0 ( 1 , 5 , 0 )
.long TLB1 _ M A S 1 ( 1 , 1 , 0 , 0 , B O O K E _ P A G E S Z _ 6 4 M )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ C C S R B A R ) , 0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ C C S R B A R ) , 0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
/ *
* TLB 6 : 6 4 M C a c h e a b l e , n o n - g u a r d e d
* 0 xf0 0 0 _ 0 0 0 0 6 4 M L B C S D R A M
* /
.long TLB1 _ M A S 0 ( 1 , 6 , 0 )
.long TLB1 _ M A S 1 ( 1 , 1 , 0 , 0 , B O O K E _ P A G E S Z _ 6 4 M )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ L B C _ S D R A M _ B A S E ) , 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ L B C _ S D R A M _ B A S E ) , 0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
/ *
* TLB 7 : 1 6 K N o n - c a c h e a b l e , g u a r d e d
* 0 xf8 0 0 0 0 0 0 1 6 K B C S R r e g i s t e r s
* /
.long TLB1 _ M A S 0 ( 1 , 7 , 0 )
.long TLB1 _ M A S 1 ( 1 , 1 , 0 , 0 , B O O K E _ P A G E S Z _ 1 6 K )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ B C S R ) , 0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ B C S R ) , 0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
# if ! d e f i n e d ( C O N F I G _ S P D _ E E P R O M )
/ *
* TLB 8 , 9 : 1 2 8 M D D R
* 0 x0 0 0 0 0 0 0 0 6 4 M D D R S y s t e m m e m o r y
* 0 x0 4 0 0 0 0 0 0 6 4 M D D R S y s t e m m e m o r y
* Without S P D E E P R O M c o n f i g u r e d D D R , t h i s m u s t b e s e t u p m a n u a l l y .
* Make s u r e t h e T L B c o u n t a t t h e t o p o f t h i s t a b l e i s c o r r e c t .
* Likely i t n e e d s t o b e i n c r e a s e d b y t w o f o r t h e s e e n t r i e s .
* /
# error( " U p d a t e t h e n u m b e r o f t a b l e e n t r i e s i n t l b1 _ e n t r y " )
.long TLB1 _ M A S 0 ( 1 , 8 , 0 )
.long TLB1 _ M A S 1 ( 1 , 1 , 0 , 0 , B O O K E _ P A G E S Z _ 6 4 M )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ D D R _ S D R A M _ B A S E ) , 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ D D R _ S D R A M _ B A S E ) , 0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,1 )
.long TLB1 _ M A S 0 ( 1 , 9 , 0 )
.long TLB1 _ M A S 1 ( 1 , 1 , 0 , 0 , B O O K E _ P A G E S Z _ 6 4 M )
.long TLB1 _ M A S 2 ( E 5 0 0 _ T L B _ E P N ( C F G _ D D R _ S D R A M _ B A S E + 0 x40 0 0 0 0 0 ) ,
0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 )
.long TLB1 _ M A S 3 ( E 5 0 0 _ T L B _ R P N ( C F G _ D D R _ S D R A M _ B A S E + 0 x40 0 0 0 0 0 ) ,
0 , 0 , 0 , 0 , 0 , 1 , 0 , 1 , 0 , 1 )
# endif
entry_ e n d
/ *
@ -184,13 +257,8 @@ tlb1_entry:
/ *
* This i s n o t s o m u c h t h e S D R A M m a p a s i t i s t h e w h o l e l o c a l b u s m a p .
* /
# if ! d e f i n e d ( C O N F I G _ R A M _ A S _ F L A S H )
# define L A W B A R 2 ( ( C F G _ L B C _ S D R A M _ B A S E > > 1 2 ) & 0 x f f f f f )
# define L A W A R 2 ( L A W A R _ E N | L A W A R _ T R G T _ I F _ L B C | ( L A W A R _ S I Z E & L A W A R _ S I Z E _ 2 5 6 M ) )
# else
# define L A W B A R 2 0
# define L A W A R 2 ( ( L A W A R _ T R G T _ I F _ L B C | ( L A W A R _ S I Z E & L A W A R _ S I Z E _ 1 2 8 M ) ) & ~ L A W A R _ E N )
# endif
# define L A W B A R 3 ( ( C F G _ P C I 1 _ I O _ B A S E > > 1 2 ) & 0 x f f f f f )
# define L A W A R 3 ( L A W A R _ E N | L A W A R _ T R G T _ I F _ P C I X | ( L A W A R _ S I Z E & L A W A R _ S I Z E _ 1 6 M ) )