@ -163,6 +163,52 @@ wait_for_sipi:
/* return */
jmp c a r _ i n i t _ r e t
.globl car_uninit
car_uninit :
/* Disable cache */
movl % c r0 , % e a x
orl $ X 8 6 _ C R 0 _ C D , % e a x
movl % e a x , % c r0
/* Disable MTRRs */
movl $ M T R R _ D E F _ T Y P E _ M S R , % e c x
rdmsr
andl $ ( ~ M T R R _ D E F _ T Y P E _ E N ) , % e a x
wrmsr
/* Disable the no-eviction run state */
movl N O E V I C T M O D _ M S R , % e c x
rdmsr
andl $ ~ 2 , % e a x
wrmsr
invd
/* Disable the no-eviction mode */
rdmsr
andl $ ~ 1 , % e a x
wrmsr
# ifdef C O N F I G _ C A C H E _ M R C _ B I N
/* Clear the MTRR that was used to cache MRC */
xorl % e a x , % e a x
xorl % e d x , % e d x
movl $ M T R R _ P H Y S _ B A S E _ M S R ( 2 ) , % e c x
wrmsr
movl $ M T R R _ P H Y S _ M A S K _ M S R ( 2 ) , % e c x
wrmsr
# endif
/* Enable MTRRs */
movl $ M T R R _ D E F _ T Y P E _ M S R , % e c x
rdmsr
orl $ M T R R _ D E F _ T Y P E _ E N , % e a x
wrmsr
invd
ret
mtrr_table :
/* Fixed MTRRs */
.word 0 x2 5 0 , 0 x25 8 , 0 x25 9