2009-07-23 08:31:31 +02:00
/ * cache. S : c a c h e m a n a g e m e n t r o u t i n e s
2005-04-16 15:20:36 -07:00
*
* Copyright ( C ) 2 0 0 4 R e d H a t , I n c . A l l R i g h t s R e s e r v e d .
* Written b y D a v i d H o w e l l s ( d h o w e l l s @redhat.com)
*
* 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
* as p u b l i s h e d 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 t h e 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 .
* /
# include < a s m / s p r - r e g s . h >
# include < a s m / c a c h e . h >
.text
.p2align 4
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Write b a c k a r a n g e o f d c a c h e
# - void f r v _ d c a c h e _ w r i t e b a c k ( u n s i g n e d l o n g s t a r t [ G R 8 ] , u n s i g n e d l o n g s i z e [ G R 9 ] )
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.globl frv_dcache_writeback
.type frv_ d c a c h e _ w r i t e b a c k ,@function
frv_dcache_writeback :
andi g r8 ,~ ( L 1 _ C A C H E _ B Y T E S - 1 ) ,g r8
2 : dcf @(gr8,gr0)
addi g r8 ,#L 1 _ C A C H E _ B Y T E S ,g r8
cmp g r9 ,g r8 ,i c c0
bhi i c c0 ,#2 ,2 b
membar
bralr
.size frv_ d c a c h e _ w r i t e b a c k , . - f r v _ d c a c h e _ w r i t e b a c k
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Invalidate a r a n g e o f d c a c h e a n d i c a c h e
# - void f r v _ c a c h e _ i n v a l i d a t e ( u n s i g n e d l o n g s t a r t [ G R 8 ] , u n s i g n e d l o n g e n d [ G R 9 ] ) ;
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.globl frv_cache_invalidate
.type frv_ c a c h e _ i n v a l i d a t e ,@function
frv_cache_invalidate :
andi g r8 ,~ ( L 1 _ C A C H E _ B Y T E S - 1 ) ,g r8
2 : dci @(gr8,gr0)
ici @(gr8,gr0)
addi g r8 ,#L 1 _ C A C H E _ B Y T E S ,g r8
cmp g r9 ,g r8 ,i c c0
bhi i c c0 ,#2 ,2 b
membar
bralr
.size frv_ c a c h e _ i n v a l i d a t e , . - f r v _ c a c h e _ i n v a l i d a t e
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Invalidate a r a n g e o f i c a c h e
# - void f r v _ i c a c h e _ i n v a l i d a t e ( u n s i g n e d l o n g s t a r t [ G R 8 ] , u n s i g n e d l o n g e n d [ G R 9 ] ) ;
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.globl frv_icache_invalidate
.type frv_ i c a c h e _ i n v a l i d a t e ,@function
frv_icache_invalidate :
andi g r8 ,~ ( L 1 _ C A C H E _ B Y T E S - 1 ) ,g r8
2 : ici @(gr8,gr0)
addi g r8 ,#L 1 _ C A C H E _ B Y T E S ,g r8
cmp g r9 ,g r8 ,i c c0
bhi i c c0 ,#2 ,2 b
membar
bralr
.size frv_ i c a c h e _ i n v a l i d a t e , . - f r v _ i c a c h e _ i n v a l i d a t e
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
#
# Write b a c k a n d i n v a l i d a t e a r a n g e o f d c a c h e a n d i c a c h e
# - void f r v _ c a c h e _ w b a c k _ i n v ( u n s i g n e d l o n g s t a r t [ G R 8 ] , u n s i g n e d l o n g e n d [ G R 9 ] )
#
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
.globl frv_cache_wback_inv
.type frv_ c a c h e _ w b a c k _ i n v ,@function
frv_cache_wback_inv :
andi g r8 ,~ ( L 1 _ C A C H E _ B Y T E S - 1 ) ,g r8
2 : dcf @(gr8,gr0)
ici @(gr8,gr0)
addi g r8 ,#L 1 _ C A C H E _ B Y T E S ,g r8
cmp g r9 ,g r8 ,i c c0
bhi i c c0 ,#2 ,2 b
membar
bralr
.size frv_ c a c h e _ w b a c k _ i n v , . - f r v _ c a c h e _ w b a c k _ i n v