@ -186,6 +186,55 @@ _start_e500:
mtspr D B C R 0 ,r0
mtspr D B C R 0 ,r0
# endif
# endif
# ifdef C O N F I G _ M P C 8 5 6 9
# define C O N F I G _ S Y S _ L B C _ A D D R ( C O N F I G _ S Y S _ C C S R B A R _ D E F A U L T + 0 x50 0 0 )
# define C O N F I G _ S Y S _ L B C R _ A D D R ( C O N F I G _ S Y S _ L B C _ A D D R + 0 x d0 )
/ * MPC8 5 6 9 R e v . 0 s i l c o n n e e d s t o s e t b i t 1 3 o f L B C R t o a l l o w e l B C t o
* use a d d r e s s s p a c e w h i c h i s m o r e t h a n 1 2 b i t s , a n d i t m u s t b e d o n e i n
* the 4 K b o o t p a g e . S o w e s e t t h i s b i t h e r e .
* /
/* create a temp mapping TLB0[0] for LBCR */
lis r6 ,F S L _ B O O K E _ M A S 0 ( 0 , 0 , 0 ) @h
ori r6 ,r6 ,F S L _ B O O K E _ M A S 0 ( 0 , 0 , 0 ) @l
lis r7 ,F S L _ B O O K E _ M A S 1 ( 1 , 0 , 0 , 0 , B O O K E _ P A G E S Z _ 4 K ) @h
ori r7 ,r7 ,F S L _ B O O K E _ M A S 1 ( 1 , 0 , 0 , 0 , B O O K E _ P A G E S Z _ 4 K ) @l
lis r8 ,F S L _ B O O K E _ M A S 2 ( C O N F I G _ S Y S _ L B C _ A D D R , M A S 2 _ I | M A S 2 _ G ) @h
ori r8 ,r8 ,F S L _ B O O K E _ M A S 2 ( C O N F I G _ S Y S _ L B C _ A D D R , M A S 2 _ I | M A S 2 _ G ) @l
lis r9 ,F S L _ B O O K E _ M A S 3 ( C O N F I G _ S Y S _ L B C _ A D D R , 0 ,
( MAS3 _ S X | M A S 3 _ S W | M A S 3 _ S R ) ) @h
ori r9 ,r9 ,F S L _ B O O K E _ M A S 3 ( C O N F I G _ S Y S _ L B C _ A D D R , 0 ,
( MAS3 _ S X | M A S 3 _ S W | M A S 3 _ S R ) ) @l
mtspr M A S 0 ,r6
mtspr M A S 1 ,r7
mtspr M A S 2 ,r8
mtspr M A S 3 ,r9
isync
msync
tlbwe
/* Set LBCR register */
lis r4 ,C O N F I G _ S Y S _ L B C R _ A D D R @h
ori r4 ,r4 ,C O N F I G _ S Y S _ L B C R _ A D D R @l
lis r5 ,C O N F I G _ S Y S _ L B C _ L B C R @h
ori r5 ,r5 ,C O N F I G _ S Y S _ L B C _ L B C R @l
stw r5 ,0 ( r4 )
isync
/* invalidate this temp TLB */
lis r4 ,C O N F I G _ S Y S _ L B C _ A D D R @h
ori r4 ,r4 ,C O N F I G _ S Y S _ L B C _ A D D R @l
tlbivax 0 ,r4
isync
# endif / * C O N F I G _ M P C 8 5 6 9 * /
/* create a temp mapping in AS=1 to the 4M boot window */
/* create a temp mapping in AS=1 to the 4M boot window */
lis r6 ,F S L _ B O O K E _ M A S 0 ( 1 , 1 5 , 0 ) @h
lis r6 ,F S L _ B O O K E _ M A S 0 ( 1 , 1 5 , 0 ) @h
ori r6 ,r6 ,F S L _ B O O K E _ M A S 0 ( 1 , 1 5 , 0 ) @l
ori r6 ,r6 ,F S L _ B O O K E _ M A S 0 ( 1 , 1 5 , 0 ) @l