2006-02-06 23:44:37 -08:00
/ * sun4 v _ t l b _ m i s s . S : S u n 4 v T L B m i s s h a n d l e r s .
*
* Copyright ( C ) 2 0 0 6 < d a v e m @davemloft.net>
* /
.text
.align 32
sun4v_itlb_miss :
/* Load CPU ID into %g3. */
mov S C R A T C H P A D _ C P U I D , % g 1
ldxa [ % g 1 ] A S I _ S C R A T C H P A D , % g 3
/* Load UTSB reg into %g1. */
ldxa [ % g 1 + % g 1 ] A S I _ S C R A T C H P A D , % g 1
/* Load &trap_block[smp_processor_id()] into %g2. */
sethi % h i ( t r a p _ b l o c k ) , % g 2
or % g 2 , % l o ( t r a p _ b l o c k ) , % g 2
sllx % g 3 , T R A P _ B L O C K _ S Z _ S H I F T , % g 3
add % g 2 , % g 3 , % g 2
/ * Create a T A G T A R G E T , " ( v a d d r > > 2 2 ) | ( c t x < < 4 8 ) " , i n % g 6 .
* Branch i f k e r n e l T L B m i s s . T h e k e r n e l T S B a n d u s e r T S B m i s s
* code w a n t s t h e m i s s i n g v i r t u a l a d d r e s s i n % g 4 , s o t h a t v a l u e
* cannot b e m o d i f i e d t h r o u g h t h e e n t i r e t y o f t h i s h a n d l e r .
* /
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ I _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ I _ C T X _ O F F S E T ] , % g 5
srlx % g 4 , 2 2 , % g 3
sllx % g 5 , 4 8 , % g 6
or % g 6 , % g 3 , % g 6
brz,p n % g 5 , k v m a p _ i t l b _ 4 v
nop
/ * Create T S B p o i n t e r . T h i s i s s o m e t h i n g l i k e :
*
* index_ m a s k = ( 5 1 2 < < ( t s b _ r e g & 0 x7 U L ) ) - 1 U L ;
* tsb_ b a s e = t s b _ r e g & ~ 0 x7 U L ;
* /
and % g 1 , 0 x7 , % g 3
andn % g 1 , 0 x7 , % g 1
mov 5 1 2 , % g 7
sllx % g 7 , % g 3 , % g 7
sub % g 7 , 1 , % g 7
/ * TSB i n d e x m a s k i s i n % g 7 , t s b b a s e i s i n % g 1 . C o m p u t e
* the T S B e n t r y p o i n t e r i n t o % g 1 :
*
* tsb_ i n d e x = ( ( v a d d r > > P A G E _ S H I F T ) & t s b _ m a s k ) ;
* tsb_ p t r = t s b _ b a s e + ( t s b _ i n d e x * 1 6 ) ;
* /
srlx % g 4 , P A G E _ S H I F T , % g 3
and % g 3 , % g 7 , % g 3
sllx % g 3 , 4 , % g 3
add % g 1 , % g 3 , % g 1
/* Load TSB tag/pte into %g2/%g3 and compare the tag. */
ldda [ % g 1 ] A S I _ Q U A D _ L D D _ P H Y S , % g 2
cmp % g 2 , % g 6
sethi % h i ( _ P A G E _ E X E C ) , % g 7
bne,a ,p n % x c c , t s b _ m i s s _ p a g e _ t a b l e _ w a l k
mov F A U L T _ C O D E _ I T L B , % g 3
andcc % g 3 , % g 7 , % g 0
be,a ,p n % x c c , t s b _ d o _ f a u l t
mov F A U L T _ C O D E _ I T L B , % g 3
/ * We h a v e a v a l i d e n t r y , m a k e h y p e r v i s o r c a l l t o l o a d
* I- T L B a n d r e t u r n f r o m t r a p .
*
* % g3 : PTE
* % g4 : vaddr
* % g6 : TAG T A R G E T ( o n l y " C T X < < 4 8 " p a r t m a t t e r s )
* /
sun4v_itlb_load :
mov % o 0 , % g 1 ! s a v e % o 0
mov % o 1 , % g 2 ! s a v e % o 1
mov % o 2 , % g 5 ! s a v e % o 2
mov % o 3 , % g 7 ! s a v e % o 3
mov % g 4 , % o 0 ! v a d d r
srlx % g 6 , 4 8 , % o 1 ! c t x
mov % g 3 , % o 2 ! P T E
mov H V _ M M U _ I M M U , % o 3 ! f l a g s
ta H V _ M M U _ M A P _ A D D R _ T R A P
mov % g 1 , % o 0 ! r e s t o r e % o 0
mov % g 2 , % o 1 ! r e s t o r e % o 1
mov % g 5 , % o 2 ! r e s t o r e % o 2
mov % g 7 , % o 3 ! r e s t o r e % o 3
retry
sun4v_dtlb_miss :
/* Load CPU ID into %g3. */
mov S C R A T C H P A D _ C P U I D , % g 1
ldxa [ % g 1 ] A S I _ S C R A T C H P A D , % g 3
/* Load UTSB reg into %g1. */
ldxa [ % g 1 + % g 1 ] A S I _ S C R A T C H P A D , % g 1
/* Load &trap_block[smp_processor_id()] into %g2. */
sethi % h i ( t r a p _ b l o c k ) , % g 2
or % g 2 , % l o ( t r a p _ b l o c k ) , % g 2
sllx % g 3 , T R A P _ B L O C K _ S Z _ S H I F T , % g 3
add % g 2 , % g 3 , % g 2
/ * Create a T A G T A R G E T , " ( v a d d r > > 2 2 ) | ( c t x < < 4 8 ) " , i n % g 6 .
* Branch i f k e r n e l T L B m i s s . T h e k e r n e l T S B a n d u s e r T S B m i s s
* code w a n t s t h e m i s s i n g v i r t u a l a d d r e s s i n % g 4 , s o t h a t v a l u e
* cannot b e m o d i f i e d t h r o u g h t h e e n t i r e t y o f t h i s h a n d l e r .
* /
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ C T X _ O F F S E T ] , % g 5
srlx % g 4 , 2 2 , % g 3
sllx % g 5 , 4 8 , % g 6
or % g 6 , % g 3 , % g 6
brz,p n % g 5 , k v m a p _ d t l b _ 4 v
nop
/ * Create T S B p o i n t e r . T h i s i s s o m e t h i n g l i k e :
*
* index_ m a s k = ( 5 1 2 < < ( t s b _ r e g & 0 x7 U L ) ) - 1 U L ;
* tsb_ b a s e = t s b _ r e g & ~ 0 x7 U L ;
* /
and % g 1 , 0 x7 , % g 3
andn % g 1 , 0 x7 , % g 1
mov 5 1 2 , % g 7
sllx % g 7 , % g 3 , % g 7
sub % g 7 , 1 , % g 7
/ * TSB i n d e x m a s k i s i n % g 7 , t s b b a s e i s i n % g 1 . C o m p u t e
* the T S B e n t r y p o i n t e r i n t o % g 1 :
*
* tsb_ i n d e x = ( ( v a d d r > > P A G E _ S H I F T ) & t s b _ m a s k ) ;
* tsb_ p t r = t s b _ b a s e + ( t s b _ i n d e x * 1 6 ) ;
* /
srlx % g 4 , P A G E _ S H I F T , % g 3
and % g 3 , % g 7 , % g 3
sllx % g 3 , 4 , % g 3
add % g 1 , % g 3 , % g 1
/* Load TSB tag/pte into %g2/%g3 and compare the tag. */
ldda [ % g 1 ] A S I _ Q U A D _ L D D _ P H Y S , % g 2
cmp % g 2 , % g 6
bne,a ,p n % x c c , t s b _ m i s s _ p a g e _ t a b l e _ w a l k
mov F A U L T _ C O D E _ I T L B , % g 3
/ * We h a v e a v a l i d e n t r y , m a k e h y p e r v i s o r c a l l t o l o a d
* D- T L B a n d r e t u r n f r o m t r a p .
*
* % g3 : PTE
* % g4 : vaddr
* % g6 : TAG T A R G E T ( o n l y " C T X < < 4 8 " p a r t m a t t e r s )
* /
sun4v_dtlb_load :
mov % o 0 , % g 1 ! s a v e % o 0
mov % o 1 , % g 2 ! s a v e % o 1
mov % o 2 , % g 5 ! s a v e % o 2
mov % o 3 , % g 7 ! s a v e % o 3
mov % g 4 , % o 0 ! v a d d r
srlx % g 6 , 4 8 , % o 1 ! c t x
mov % g 3 , % o 2 ! P T E
mov H V _ M M U _ D M M U , % o 3 ! f l a g s
ta H V _ M M U _ M A P _ A D D R _ T R A P
mov % g 1 , % o 0 ! r e s t o r e % o 0
mov % g 2 , % o 1 ! r e s t o r e % o 1
mov % g 5 , % o 2 ! r e s t o r e % o 2
mov % g 7 , % o 3 ! r e s t o r e % o 3
retry
sun4v_dtlb_prot :
/* Load CPU ID into %g3. */
mov S C R A T C H P A D _ C P U I D , % g 1
ldxa [ % g 1 ] A S I _ S C R A T C H P A D , % g 3
/* Load &trap_block[smp_processor_id()] into %g2. */
sethi % h i ( t r a p _ b l o c k ) , % g 2
or % g 2 , % l o ( t r a p _ b l o c k ) , % g 2
sllx % g 3 , T R A P _ B L O C K _ S Z _ S H I F T , % g 3
add % g 2 , % g 3 , % g 2
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ A D D R _ O F F S E T ] , % g 5
rdpr % t l , % g 1
cmp % g 1 , 1
bgu,p n % x c c , w i n f i x _ t r a m p o l i n e
nop
ba,p t % x c c , s p a r c64 _ r e a l f a u l t _ c o m m o n
mov F A U L T _ C O D E _ D T L B | F A U L T _ C O D E _ W R I T E , % g 4
2006-02-09 16:12:22 -08:00
/ * Called f r o m t r a p t a b l e w i t h & t r a p _ b l o c k [ s m p _ p r o c e s s o r _ i d ( ) ] i n
* % g5 a n d S C R A T C H P A D _ U T S B R E G 1 c o n t e n t s i n % g 1 .
* /
sun4v_itsb_miss :
ldx [ % g 5 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ I _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 5 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ I _ C T X _ O F F S E T ] , % g 5
srlx % g 4 , 2 2 , % g 7
sllx % g 5 , 4 8 , % g 6
or % g 6 , % g 7 , % g 6
brz,p n % g 5 , k v m a p _ i t l b _ 4 v
nop
ba,p t % x c c , s u n 4 v _ t s b _ m i s s _ c o m m o n
mov F A U L T _ C O D E _ I T L B , % g 3
/ * Called f r o m t r a p t a b l e w i t h & t r a p _ b l o c k [ s m p _ p r o c e s s o r _ i d ( ) ] i n
* % g5 a n d S C R A T C H P A D _ U T S B R E G 1 c o n t e n t s i n % g 1 .
* /
sun4v_dtsb_miss :
ldx [ % g 5 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 5 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ C T X _ O F F S E T ] , % g 5
srlx % g 4 , 2 2 , % g 7
sllx % g 5 , 4 8 , % g 6
or % g 6 , % g 7 , % g 6
brz,p n % g 5 , k v m a p _ d t l b _ 4 v
nop
mov F A U L T _ C O D E _ D T L B , % g 3
/ * Create T S B p o i n t e r i n t o % g 1 . T h i s i s s o m e t h i n g l i k e :
*
* index_ m a s k = ( 5 1 2 < < ( t s b _ r e g & 0 x7 U L ) ) - 1 U L ;
* tsb_ b a s e = t s b _ r e g & ~ 0 x7 U L ;
* tsb_ i n d e x = ( ( v a d d r > > P A G E _ S H I F T ) & t s b _ m a s k ) ;
* tsb_ p t r = t s b _ b a s e + ( t s b _ i n d e x * 1 6 ) ;
* /
sun4v_tsb_miss_common :
and % g 1 , 0 x7 , % g 2
andn % g 1 , 0 x7 , % g 1
mov 5 1 2 , % g 7
sllx % g 7 , % g 2 , % g 7
sub % g 7 , 1 , % g 7
srlx % g 4 , P A G E _ S H I F T , % g 2
and % g 2 , % g 7 , % g 2
sllx % g 2 , 4 , % g 2
ba,p t % x c c , t s b _ m i s s _ p a g e _ t a b l e _ w a l k
add % g 1 , % g 2 , % g 1
2006-02-09 20:20:34 -08:00
/* Instruction Access Exception, tl0. */
sun4v_iacc :
mov S C R A T C H P A D _ C P U I D , % g 1
ldxa [ % g 1 ] A S I _ S C R A T C H P A D , % g 3
sethi % h i ( t r a p _ b l o c k ) , % g 2
or % g 2 , % l o ( t r a p _ b l o c k ) , % g 2
sllx % g 3 , T R A P _ B L O C K _ S Z _ S H I F T , % g 3
add % g 2 , % g 3 , % g 2
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ I _ T Y P E _ O F F S E T ] , % g 3
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ I _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ I _ C T X _ O F F S E T ] , % g 5
sllx % g 3 , 1 6 , % g 3
or % g 5 , % g 3 , % g 5
ba,p t % x c c , e t r a p
rd % p c , % g 7
mov % l 4 , % o 1
mov % l 5 , % o 2
call s u n 4 v _ i n s n _ a c c e s s _ e x c e p t i o n
add % s p , P T R E G S _ O F F , % o 0
ba,a ,p t % x c c , r t r a p _ c l r _ l 6
/* Instruction Access Exception, tl1. */
sun4v_iacc_tl1 :
mov S C R A T C H P A D _ C P U I D , % g 1
ldxa [ % g 1 ] A S I _ S C R A T C H P A D , % g 3
sethi % h i ( t r a p _ b l o c k ) , % g 2
or % g 2 , % l o ( t r a p _ b l o c k ) , % g 2
sllx % g 3 , T R A P _ B L O C K _ S Z _ S H I F T , % g 3
add % g 2 , % g 3 , % g 2
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ I _ T Y P E _ O F F S E T ] , % g 3
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ I _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ I _ C T X _ O F F S E T ] , % g 5
sllx % g 3 , 1 6 , % g 3
or % g 5 , % g 3 , % g 5
ba,p t % x c c , e t r a p t l 1
rd % p c , % g 7
mov % l 4 , % o 1
mov % l 5 , % o 2
call s u n 4 v _ i n s n _ a c c e s s _ e x c e p t i o n _ t l 1
add % s p , P T R E G S _ O F F , % o 0
ba,a ,p t % x c c , r t r a p _ c l r _ l 6
/* Data Access Exception, tl0. */
sun4v_dacc :
mov S C R A T C H P A D _ C P U I D , % g 1
ldxa [ % g 1 ] A S I _ S C R A T C H P A D , % g 3
sethi % h i ( t r a p _ b l o c k ) , % g 2
or % g 2 , % l o ( t r a p _ b l o c k ) , % g 2
sllx % g 3 , T R A P _ B L O C K _ S Z _ S H I F T , % g 3
add % g 2 , % g 3 , % g 2
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ T Y P E _ O F F S E T ] , % g 3
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ C T X _ O F F S E T ] , % g 5
sllx % g 3 , 1 6 , % g 3
or % g 5 , % g 3 , % g 5
ba,p t % x c c , e t r a p
rd % p c , % g 7
mov % l 4 , % o 1
mov % l 5 , % o 2
call s u n 4 v _ d a t a _ a c c e s s _ e x c e p t i o n
add % s p , P T R E G S _ O F F , % o 0
ba,a ,p t % x c c , r t r a p _ c l r _ l 6
/* Data Access Exception, tl1. */
sun4v_dacc_tl1 :
mov S C R A T C H P A D _ C P U I D , % g 1
ldxa [ % g 1 ] A S I _ S C R A T C H P A D , % g 3
sethi % h i ( t r a p _ b l o c k ) , % g 2
or % g 2 , % l o ( t r a p _ b l o c k ) , % g 2
sllx % g 3 , T R A P _ B L O C K _ S Z _ S H I F T , % g 3
add % g 2 , % g 3 , % g 2
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ T Y P E _ O F F S E T ] , % g 3
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ C T X _ O F F S E T ] , % g 5
sllx % g 3 , 1 6 , % g 3
or % g 5 , % g 3 , % g 5
ba,p t % x c c , e t r a p t l 1
rd % p c , % g 7
mov % l 4 , % o 1
mov % l 5 , % o 2
call s u n 4 v _ d a t a _ a c c e s s _ e x c e p t i o n _ t l 1
add % s p , P T R E G S _ O F F , % o 0
ba,a ,p t % x c c , r t r a p _ c l r _ l 6
/* Memory Address Unaligned. */
sun4v_mna :
mov S C R A T C H P A D _ C P U I D , % g 1
ldxa [ % g 1 ] A S I _ S C R A T C H P A D , % g 3
sethi % h i ( t r a p _ b l o c k ) , % g 2
or % g 2 , % l o ( t r a p _ b l o c k ) , % g 2
sllx % g 3 , T R A P _ B L O C K _ S Z _ S H I F T , % g 3
add % g 2 , % g 3 , % g 2
mov H V _ F A U L T _ T Y P E _ U N A L I G N E D , % g 3
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ C T X _ O F F S E T ] , % g 5
sllx % g 3 , 1 6 , % g 3
or % g 5 , % g 3 , % g 5
/* Window fixup? */
rdpr % t l , % g 2
cmp % g 2 , 1
bgu,p n % i c c , w i n f i x _ m n a
rdpr % t p c , % g 3
ba,p t % x c c , e t r a p
rd % p c , % g 7
mov % l 4 , % o 1
mov % l 5 , % o 2
call s u n 4 v _ m n a
add % s p , P T R E G S _ O F F , % o 0
ba,a ,p t % x c c , r t r a p _ c l r _ l 6
/* Privileged Action. */
sun4v_privact :
ba,p t % x c c , e t r a p
rd % p c , % g 7
call d o _ p r i v a c t
add % s p , P T R E G S _ O F F , % o 0
ba,a ,p t % x c c , r t r a p _ c l r _ l 6
/* Unaligned ldd float, tl0. */
sun4v_lddfmna :
mov S C R A T C H P A D _ C P U I D , % g 1
ldxa [ % g 1 ] A S I _ S C R A T C H P A D , % g 3
sethi % h i ( t r a p _ b l o c k ) , % g 2
or % g 2 , % l o ( t r a p _ b l o c k ) , % g 2
sllx % g 3 , T R A P _ B L O C K _ S Z _ S H I F T , % g 3
add % g 2 , % g 3 , % g 2
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ T Y P E _ O F F S E T ] , % g 3
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ C T X _ O F F S E T ] , % g 5
sllx % g 3 , 1 6 , % g 3
or % g 5 , % g 3 , % g 5
ba,p t % x c c , e t r a p
rd % p c , % g 7
mov % l 4 , % o 1
mov % l 5 , % o 2
call h a n d l e _ l d d f m n a
add % s p , P T R E G S _ O F F , % o 0
ba,a ,p t % x c c , r t r a p _ c l r _ l 6
/* Unaligned std float, tl0. */
sun4v_stdfmna :
mov S C R A T C H P A D _ C P U I D , % g 1
ldxa [ % g 1 ] A S I _ S C R A T C H P A D , % g 3
sethi % h i ( t r a p _ b l o c k ) , % g 2
or % g 2 , % l o ( t r a p _ b l o c k ) , % g 2
sllx % g 3 , T R A P _ B L O C K _ S Z _ S H I F T , % g 3
add % g 2 , % g 3 , % g 2
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ T Y P E _ O F F S E T ] , % g 3
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ A D D R _ O F F S E T ] , % g 4
ldx [ % g 2 + T R A P _ P E R _ C P U _ F A U L T _ I N F O + H V _ F A U L T _ D _ C T X _ O F F S E T ] , % g 5
sllx % g 3 , 1 6 , % g 3
or % g 5 , % g 3 , % g 5
ba,p t % x c c , e t r a p
rd % p c , % g 7
mov % l 4 , % o 1
mov % l 5 , % o 2
call h a n d l e _ s t d f m n a
add % s p , P T R E G S _ O F F , % o 0
ba,a ,p t % x c c , r t r a p _ c l r _ l 6
2006-02-09 16:12:22 -08:00
2006-02-06 23:44:37 -08:00
# define B R A N C H _ A L W A Y S 0 x10 6 8 0 0 0 0
# define N O P 0 x01 0 0 0 0 0 0
# define S U N 4 V _ D O _ P A T C H ( O L D , N E W ) \
sethi % h i ( N E W ) , % g 1 ; \
or % g 1 , % l o ( N E W ) , % g 1 ; \
sethi % h i ( O L D ) , % g 2 ; \
or % g 2 , % l o ( O L D ) , % g 2 ; \
sub % g 1 , % g 2 , % g 1 ; \
sethi % h i ( B R A N C H _ A L W A Y S ) , % g 3 ; \
srl % g 1 , 2 , % g 1 ; \
or % g 3 , % l o ( B R A N C H _ A L W A Y S ) , % g 3 ; \
or % g 3 , % g 1 , % g 3 ; \
stw % g 3 , [ % g 2 ] ; \
sethi % h i ( N O P ) , % g 3 ; \
or % g 3 , % l o ( N O P ) , % g 3 ; \
stw % g 3 , [ % g 2 + 0 x4 ] ; \
flush % g 2 ;
.globl sun4v_patch_tlb_handlers
.type sun4 v _ p a t c h _ t l b _ h a n d l e r s ,#f u n c t i o n
sun4v_patch_tlb_handlers :
SUN4 V _ D O _ P A T C H ( t l 0 _ i a m i s s , s u n 4 v _ i t l b _ m i s s )
SUN4 V _ D O _ P A T C H ( t l 1 _ i a m i s s , s u n 4 v _ i t l b _ m i s s )
SUN4 V _ D O _ P A T C H ( t l 0 _ d a m i s s , s u n 4 v _ d t l b _ m i s s )
SUN4 V _ D O _ P A T C H ( t l 1 _ d a m i s s , s u n 4 v _ d t l b _ m i s s )
SUN4 V _ D O _ P A T C H ( t l 0 _ d a p r o t , s u n 4 v _ d t l b _ p r o t )
SUN4 V _ D O _ P A T C H ( t l 1 _ d a p r o t , s u n 4 v _ d t l b _ p r o t )
2006-02-09 20:20:34 -08:00
SUN4 V _ D O _ P A T C H ( t l 0 _ i a x , s u n 4 v _ i a c c )
SUN4 V _ D O _ P A T C H ( t l 1 _ i a x , s u n 4 v _ i a c c _ t l 1 )
SUN4 V _ D O _ P A T C H ( t l 0 _ d a x , s u n 4 v _ d a c c )
SUN4 V _ D O _ P A T C H ( t l 1 _ d a x , s u n 4 v _ d a c c _ t l 1 )
SUN4 V _ D O _ P A T C H ( t l 0 _ m n a , s u n 4 v _ m n a )
SUN4 V _ D O _ P A T C H ( t l 1 _ m n a , s u n 4 v _ m n a )
SUN4 V _ D O _ P A T C H ( t l 0 _ l d d f m n a , s u n 4 v _ l d d f m n a )
SUN4 V _ D O _ P A T C H ( t l 0 _ s t d f m n a , s u n 4 v _ s t d f m n a )
SUN4 V _ D O _ P A T C H ( t l 0 _ p r i v a c t , s u n 4 v _ p r i v a c t )
2006-02-06 23:44:37 -08:00
retl
nop
.size sun4 v _ p a t c h _ t l b _ h a n d l e r s ,. - s u n 4 v _ p a t c h _ t l b _ h a n d l e r s