@ -84,6 +84,7 @@
10 :
.set pop
.endm
/ *
* mips_ c a c h e _ r e s e t - l o w l e v e l i n i t i a l i s a t i o n o f t h e p r i m a r y c a c h e s
*
@ -319,19 +320,21 @@ l1_init:
PTR_ L I t 0 , I N D E X _ B A S E
cache_ l o o p t 0 , t 1 , R _ I C _ L I N E , I N D E X _ S T O R E _ T A G _ I
# endif
/* Enable use of the I-cache by setting Config.K0 */
sync
mfc0 t 0 , C P 0 _ C O N F I G
li t 1 , C O N F I G _ S Y S _ M I P S _ C A C H E _ M O D E
# if _ _ m i p s _ i s a _ r e v > = 2
ins t 0 , t 1 , 0 , 3
# else
ori t 0 , t 0 , C O N F _ C M _ C M A S K
xori t 0 , t 0 , C O N F _ C M _ C M A S K
/ *
* Enable u s e o f t h e I - c a c h e b y s e t t i n g C o n f i g . K 0 . T h e c o d e f o r t h i s
* must b e e x e c u t e d f r o m K S E G 1 . J u m p f r o m K S E G 0 t o K S E G 1 t o d o t h i s .
* Jump b a c k t o K S E G 0 a f t e r c a c h e s a r e e n a b l e d a n d i n s e r t a n
* instruction h a z a r d b a r r i e r .
* /
PTR_ L A t 0 , c h a n g e _ k 0 _ c c a
li t 1 , C P H Y S A D D R ( ~ 0 )
and t 0 , t 0 , t 1
PTR_ L I t 1 , C K S E G 1
or t 0 , t 0 , t 1
# endif
mtc0 t 0 , C P 0 _ C O N F I G
li a0 , C O N F I G _ S Y S _ M I P S _ C A C H E _ M O D E
jalr. h b t 0
/ *
* then i n i t i a l i z e D - c a c h e .
@ -391,16 +394,9 @@ l2_unbypass:
beqz t 0 , 2 f
/* Change Config.K0 to a coherent CCA */
mfc0 t 0 , C P 0 _ C O N F I G
li t 1 , C O N F _ C M _ C A C H A B L E _ C O W
# if _ _ m i p s _ i s a _ r e v > = 2
ins t 0 , t 1 , 0 , 3
# else
ori t 0 , t 0 , C O N F _ C M _ C M A S K
xori t 0 , t 0 , C O N F _ C M _ C M A S K
or t 0 , t 0 , t 1
# endif
mtc0 t 0 , C P 0 _ C O N F I G
PTR_ L A t 0 , c h a n g e _ k 0 _ c c a
li a0 , C O N F _ C M _ C A C H A B L E _ C O W
jalr t 0
/ *
* Join t h e c o h e r e n t d o m a i n s u c h t h a t t h e c a c h e s o f t h i s c o r e a r e k e p t
@ -421,5 +417,19 @@ l2_unbypass:
return :
/* Ensure all cache operations complete before returning */
sync
jr r a
jr R _ R E T U R N
END( m i p s _ c a c h e _ r e s e t )
LEAF( c h a n g e _ k 0 _ c c a )
mfc0 t 0 , C P 0 _ C O N F I G
# if _ _ m i p s _ i s a _ r e v > = 2
ins t 0 , a0 , 0 , 3
# else
xor a0 , a0 , t 0
andi a0 , a0 , C O N F _ C M _ C M A S K
xor a0 , a0 , t 0
# endif
mtc0 a0 , C P 0 _ C O N F I G
jr. h b r a
END( c h a n g e _ k 0 _ c c a )