2005-04-17 02:20:36 +04:00
/ *
* ppc6 4 M M U h a s h t a b l e m a n a g e m e n t r o u t i n e s
*
2005-11-07 03:06:55 +03:00
* ( c) C o p y r i g h t I B M C o r p . 2 0 0 3 , 2 0 0 5
2005-04-17 02:20:36 +04:00
*
* Maintained b y : B e n j a m i n H e r r e n s c h m i d t
* < benh@kernel.crashing.org>
*
* This f i l e i s c o v e r e d b y t h e G N U P u b l i c L i c e n c e v2 a s
* described i n t h e k e r n e l ' s C O P Y I N G f i l e .
* /
2005-10-10 15:58:35 +04:00
# include < a s m / r e g . h >
2005-04-17 02:20:36 +04:00
# include < a s m / p g t a b l e . h >
# include < a s m / m m u . h >
# include < a s m / p a g e . h >
# include < a s m / t y p e s . h >
# include < a s m / p p c _ a s m . h >
2005-09-09 22:57:26 +04:00
# include < a s m / a s m - o f f s e t s . h >
2005-04-17 02:20:36 +04:00
# include < a s m / c p u t a b l e . h >
.text
/ *
* Stackframe :
*
* + - > Back c h a i n ( S P + 2 5 6 )
* | General r e g i s t e r s a v e a r e a ( S P + 1 1 2 )
* | Parameter s a v e a r e a ( S P + 4 8 )
* | TOC s a v e a r e a ( S P + 4 0 )
* | link e d i t o r d o u b l e w o r d ( S P + 3 2 )
* | compiler d o u b l e w o r d ( S P + 2 4 )
* | LR s a v e a r e a ( S P + 1 6 )
* | CR s a v e a r e a ( S P + 8 )
* SP - - - > + - - B a c k c h a i n ( S P + 0 )
* /
# define S T A C K F R A M E S I Z E 2 5 6
/* Save parameters offsets */
# define S T K _ P A R M ( i ) ( S T A C K F R A M E S I Z E + 4 8 + ( ( i ) - 3 ) * 8 )
/* Save non-volatile offsets */
# define S T K _ R E G ( i ) ( 1 1 2 + ( ( i ) - 1 4 ) * 8 )
2005-11-07 03:06:55 +03:00
# ifndef C O N F I G _ P P C _ 6 4 K _ P A G E S
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* 4 K S W & 4 K H W p a g e s i m p l e m e n t a t i o n *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
2005-04-17 02:20:36 +04:00
/ *
2005-11-07 03:06:55 +03:00
* _ hash_ p a g e _ 4 K ( u n s i g n e d l o n g e a , u n s i g n e d l o n g a c c e s s , u n s i g n e d l o n g v s i d ,
* pte_ t * p t e p , u n s i g n e d l o n g t r a p , i n t l o c a l )
2005-04-17 02:20:36 +04:00
*
2005-11-07 03:06:55 +03:00
* Adds a 4 K p a g e t o t h e h a s h t a b l e i n a s e g m e n t o f 4 K p a g e s o n l y
2005-04-17 02:20:36 +04:00
* /
2005-11-07 03:06:55 +03:00
_ GLOBAL( _ _ h a s h _ p a g e _ 4 K )
2005-04-17 02:20:36 +04:00
mflr r0
std r0 ,1 6 ( r1 )
stdu r1 ,- S T A C K F R A M E S I Z E ( r1 )
/* Save all params that we need after a function call */
std r6 ,S T K _ P A R M ( r6 ) ( r1 )
std r8 ,S T K _ P A R M ( r8 ) ( r1 )
/* Add _PAGE_PRESENT to access */
ori r4 ,r4 ,_ P A G E _ P R E S E N T
/ * Save n o n - v o l a t i l e r e g i s t e r s .
* r3 1 w i l l h o l d " o l d P T E "
* r3 0 i s " n e w P T E "
* r2 9 i s " v a "
* r2 8 i s a h a s h v a l u e
* r2 7 i s h a s h t a b m a s k ( m a y b e d y n a m i c p a t c h e d i n s t e a d ? )
* /
std r27 ,S T K _ R E G ( r27 ) ( r1 )
std r28 ,S T K _ R E G ( r28 ) ( r1 )
std r29 ,S T K _ R E G ( r29 ) ( r1 )
std r30 ,S T K _ R E G ( r30 ) ( r1 )
std r31 ,S T K _ R E G ( r31 ) ( r1 )
/ * Step 1 :
*
* Check p e r m i s s i o n s , a t o m i c a l l y m a r k t h e l i n u x P T E b u s y
* and h a s h e d .
* /
1 :
ldarx r31 ,0 ,r6
/* Check access rights (access & ~(pte_val(*ptep))) */
andc. r0 ,r4 ,r31
bne- h t a b _ w r o n g _ a c c e s s
/* Check if PTE is busy */
andi. r0 ,r31 ,_ P A G E _ B U S Y
2005-05-01 19:58:45 +04:00
/ * If s o , j u s t b a i l o u t a n d r e f a u l t i f n e e d e d . S o m e o n e e l s e
* is c h a n g i n g t h i s P T E a n y w a y a n d m i g h t h a s h i t .
* /
2005-11-07 03:06:55 +03:00
bne- h t a b _ b a i l _ o k
2005-04-17 02:20:36 +04:00
/ * Prepare n e w P T E v a l u e ( t u r n a c c e s s R W i n t o D I R T Y , t h e n
* add B U S Y ,H A S H P T E a n d A C C E S S E D )
* /
rlwinm r30 ,r4 ,3 2 - 9 + 7 ,3 1 - 7 ,3 1 - 7 / * _ P A G E _ R W - > _ P A G E _ D I R T Y * /
or r30 ,r30 ,r31
ori r30 ,r30 ,_ P A G E _ B U S Y | _ P A G E _ A C C E S S E D | _ P A G E _ H A S H P T E
/* Write the linux PTE atomically (setting busy) */
stdcx. r30 ,0 ,r6
bne- 1 b
isync
/ * Step 2 :
*
* Insert/ U p d a t e t h e H P T E i n t h e h a s h t a b l e . A t t h i s p o i n t ,
* r4 ( a c c e s s ) i s r e - u s e a b l e , w e u s e i t f o r t h e n e w H P T E f l a g s
* /
/* Calc va and put it in r29 */
rldicr r29 ,r5 ,2 8 ,6 3 - 2 8
rldicl r3 ,r3 ,0 ,3 6
or r29 ,r3 ,r29
/* Calculate hash value for primary slot and store it in r28 */
rldicl r5 ,r5 ,0 ,2 5 / * v s i d & 0 x00 0 0 0 0 7 f f f f f f f f f * /
rldicl r0 ,r3 ,6 4 - 1 2 ,4 8 / * ( e a > > 1 2 ) & 0 x f f f f * /
xor r28 ,r5 ,r0
/* Convert linux PTE bits into HW equivalents */
andi. r3 ,r30 ,0 x1 f e / * G e t b a s i c s e t o f f l a g s * /
2005-11-07 03:06:55 +03:00
xori r3 ,r3 ,H P T E _ R _ N / * _ P A G E _ E X E C - > N O E X E C * /
2005-04-17 02:20:36 +04:00
rlwinm r0 ,r30 ,3 2 - 9 + 1 ,3 0 ,3 0 / * _ P A G E _ R W - > _ P A G E _ U S E R ( r0 ) * /
rlwinm r4 ,r30 ,3 2 - 7 + 1 ,3 0 ,3 0 / * _ P A G E _ D I R T Y - > _ P A G E _ U S E R ( r4 ) * /
2005-11-07 03:06:55 +03:00
and r0 ,r0 ,r4 / * _ P A G E _ R W & _ P A G E _ D I R T Y - > r0 b i t 3 0 * /
2005-04-17 02:20:36 +04:00
andc r0 ,r30 ,r0 / * r0 = p t e & ~ r0 * /
rlwimi r3 ,r0 ,3 2 - 1 ,3 1 ,3 1 / * I n s e r t r e s u l t i n t o P P l s b * /
2006-05-30 08:14:19 +04:00
ori r3 ,r3 ,H P T E _ R _ C / * A l w a y s a d d " C " b i t f o r p e r f . * /
2005-04-17 02:20:36 +04:00
/ * We e v e n t u a l l y d o t h e i c a c h e s y n c h e r e ( m a y b e i n l i n e t h a t
* code r a t h e r t h a n c a l l a C f u n c t i o n . . . )
* /
BEGIN_ F T R _ S E C T I O N
mr r4 ,r30
mr r5 ,r7
bl . h a s h _ p a g e _ d o _ l a z y _ i c a c h e
2005-07-27 09:47:23 +04:00
END_ F T R _ S E C T I O N ( C P U _ F T R _ N O E X E C U T E | C P U _ F T R _ C O H E R E N T _ I C A C H E , C P U _ F T R _ N O E X E C U T E )
2005-04-17 02:20:36 +04:00
/ * At t h i s p o i n t , r3 c o n t a i n s n e w P P b i t s , s a v e t h e m i n
* place o f " a c c e s s " i n t h e p a r a m a r e a ( s i c )
* /
std r3 ,S T K _ P A R M ( r4 ) ( r1 )
/* Get htab_hash_mask */
ld r4 ,h t a b _ h a s h _ m a s k @got(2)
ld r27 ,0 ( r4 ) / * h t a b _ h a s h _ m a s k - > r27 * /
/ * Check i f w e m a y a l r e a d y b e i n t h e h a s h t a b l e , i n t h i s c a s e , w e
* go t o o u t - o f - l i n e c o d e t o t r y t o m o d i f y t h e H P T E
* /
andi. r0 ,r31 ,_ P A G E _ H A S H P T E
bne h t a b _ m o d i f y _ p t e
htab_insert_pte :
/ * Clear h p t e b i t s i n n e w p t e ( w e a l s o c l e a r B U S Y b t w ) a n d
* add _ P A G E _ H A S H P T E
* /
lis r0 ,_ P A G E _ H P T E F L A G S @h
ori r0 ,r0 ,_ P A G E _ H P T E F L A G S @l
andc r30 ,r30 ,r0
ori r30 ,r30 ,_ P A G E _ H A S H P T E
2005-11-07 03:06:55 +03:00
/* physical address r5 */
rldicl r5 ,r31 ,6 4 - P T E _ R P N _ S H I F T ,P T E _ R P N _ S H I F T
sldi r5 ,r5 ,P A G E _ S H I F T
2005-04-17 02:20:36 +04:00
/* Calculate primary group hash */
and r0 ,r28 ,r27
2005-11-07 03:06:55 +03:00
rldicr r3 ,r0 ,3 ,6 3 - 3 / * r3 = ( h a s h & m a s k ) < < 3 * /
2005-04-17 02:20:36 +04:00
/* Call ppc_md.hpte_insert */
2005-11-07 03:06:55 +03:00
ld r6 ,S T K _ P A R M ( r4 ) ( r1 ) / * R e t r e i v e n e w p p b i t s * /
2005-04-17 02:20:36 +04:00
mr r4 ,r29 / * R e t r e i v e v a * /
2005-11-07 03:06:55 +03:00
li r7 ,0 / * ! b o l t e d , ! s e c o n d a r y * /
li r8 ,M M U _ P A G E _ 4 K / * p a g e s i z e * /
2005-04-17 02:20:36 +04:00
_ GLOBAL( h t a b _ c a l l _ h p t e _ i n s e r t 1 )
2005-11-07 03:06:55 +03:00
bl . / * P a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
2005-04-17 02:20:36 +04:00
cmpdi 0 ,r3 ,0
bge h t a b _ p t e _ i n s e r t _ o k / * I n s e r t i o n s u c c e s s f u l * /
cmpdi 0 ,r3 ,- 2 / * C r i t i c a l f a i l u r e * /
beq- h t a b _ p t e _ i n s e r t _ f a i l u r e
/* Now try secondary slot */
2005-11-07 03:06:55 +03:00
/* physical address r5 */
rldicl r5 ,r31 ,6 4 - P T E _ R P N _ S H I F T ,P T E _ R P N _ S H I F T
sldi r5 ,r5 ,P A G E _ S H I F T
2005-04-17 02:20:36 +04:00
/* Calculate secondary group hash */
andc r0 ,r27 ,r28
rldicr r3 ,r0 ,3 ,6 3 - 3 / * r0 = ( ~ h a s h & m a s k ) < < 3 * /
/* Call ppc_md.hpte_insert */
2005-11-07 03:06:55 +03:00
ld r6 ,S T K _ P A R M ( r4 ) ( r1 ) / * R e t r e i v e n e w p p b i t s * /
2005-04-17 02:20:36 +04:00
mr r4 ,r29 / * R e t r e i v e v a * /
2005-11-07 03:06:55 +03:00
li r7 ,H P T E _ V _ S E C O N D A R Y / * ! b o l t e d , s e c o n d a r y * /
li r8 ,M M U _ P A G E _ 4 K / * p a g e s i z e * /
2005-04-17 02:20:36 +04:00
_ GLOBAL( h t a b _ c a l l _ h p t e _ i n s e r t 2 )
2005-11-07 03:06:55 +03:00
bl . / * P a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
2005-04-17 02:20:36 +04:00
cmpdi 0 ,r3 ,0
bge+ h t a b _ p t e _ i n s e r t _ o k / * I n s e r t i o n s u c c e s s f u l * /
cmpdi 0 ,r3 ,- 2 / * C r i t i c a l f a i l u r e * /
beq- h t a b _ p t e _ i n s e r t _ f a i l u r e
/* Both are full, we need to evict something */
mftb r0
/* Pick a random group based on TB */
andi. r0 ,r0 ,1
mr r5 ,r28
bne 2 f
not r5 ,r5
2 : and r0 ,r5 ,r27
rldicr r3 ,r0 ,3 ,6 3 - 3 / * r0 = ( h a s h & m a s k ) < < 3 * /
/* Call ppc_md.hpte_remove */
_ GLOBAL( h t a b _ c a l l _ h p t e _ r e m o v e )
2005-11-07 03:06:55 +03:00
bl . / * P a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
2005-04-17 02:20:36 +04:00
/* Try all again */
b h t a b _ i n s e r t _ p t e
2005-11-07 03:06:55 +03:00
htab_bail_ok :
2005-05-01 19:58:45 +04:00
li r3 ,0
2005-11-07 03:06:55 +03:00
b h t a b _ b a i l
2005-05-01 19:58:45 +04:00
2005-04-17 02:20:36 +04:00
htab_pte_insert_ok :
/* Insert slot number & secondary bit in PTE */
rldimi r30 ,r3 ,1 2 ,6 3 - 1 5
/ * Write o u t t h e P T E w i t h a n o r m a l w r i t e
* ( maybe a d d e i e i o m a y b e g o o d s t i l l ? )
* /
htab_write_out_pte :
ld r6 ,S T K _ P A R M ( r6 ) ( r1 )
std r30 ,0 ( r6 )
li r3 , 0
2005-11-07 03:06:55 +03:00
htab_bail :
2005-04-17 02:20:36 +04:00
ld r27 ,S T K _ R E G ( r27 ) ( r1 )
ld r28 ,S T K _ R E G ( r28 ) ( r1 )
ld r29 ,S T K _ R E G ( r29 ) ( r1 )
ld r30 ,S T K _ R E G ( r30 ) ( r1 )
ld r31 ,S T K _ R E G ( r31 ) ( r1 )
addi r1 ,r1 ,S T A C K F R A M E S I Z E
ld r0 ,1 6 ( r1 )
mtlr r0
blr
htab_modify_pte :
/* Keep PP bits in r4 and slot idx from the PTE around in r3 */
mr r4 ,r3
rlwinm r3 ,r31 ,3 2 - 1 2 ,2 9 ,3 1
/* Secondary group ? if yes, get a inverted hash value */
mr r5 ,r28
andi. r0 ,r31 ,_ P A G E _ S E C O N D A R Y
beq 1 f
not r5 ,r5
1 :
/* Calculate proper slot value for ppc_md.hpte_updatepp */
and r0 ,r5 ,r27
rldicr r0 ,r0 ,3 ,6 3 - 3 / * r0 = ( h a s h & m a s k ) < < 3 * /
add r3 ,r0 ,r3 / * a d d s l o t i d x * /
/* Call ppc_md.hpte_updatepp */
mr r5 ,r29 / * v a * /
2005-11-07 03:06:55 +03:00
li r6 ,M M U _ P A G E _ 4 K / * p a g e s i z e * /
2005-04-17 02:20:36 +04:00
ld r7 ,S T K _ P A R M ( r8 ) ( r1 ) / * g e t " l o c a l " p a r a m * /
_ GLOBAL( h t a b _ c a l l _ h p t e _ u p d a t e p p )
2005-11-07 03:06:55 +03:00
bl . / * P a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
2005-04-17 02:20:36 +04:00
/ * if w e f a i l e d b e c a u s e t y p i c a l l y t h e H P T E w a s n ' t r e a l l y h e r e
* we t r y a n i n s e r t i o n .
* /
cmpdi 0 ,r3 ,- 1
beq- h t a b _ i n s e r t _ p t e
/* Clear the BUSY bit and Write out the PTE */
li r0 ,_ P A G E _ B U S Y
andc r30 ,r30 ,r0
b h t a b _ w r i t e _ o u t _ p t e
htab_wrong_access :
/* Bail out clearing reservation */
stdcx. r31 ,0 ,r6
li r3 ,1
2005-11-07 03:06:55 +03:00
b h t a b _ b a i l
htab_pte_insert_failure :
/* Bail out restoring old PTE */
ld r6 ,S T K _ P A R M ( r6 ) ( r1 )
std r31 ,0 ( r6 )
li r3 ,- 1
b h t a b _ b a i l
# else / * C O N F I G _ P P C _ 6 4 K _ P A G E S * /
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* 6 4 K S W & 4 K o r 6 4 K H W i n a 4 K s e g m e n t p a g e s i m p l e m e n t a t i o n *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
/ * _ hash_ p a g e _ 4 K ( u n s i g n e d l o n g e a , u n s i g n e d l o n g a c c e s s , u n s i g n e d l o n g v s i d ,
* pte_ t * p t e p , u n s i g n e d l o n g t r a p , i n t l o c a l )
* /
/ *
* For n o w , w e d o N O T i m p l e m e n t A d m i x e d p a g e s
* /
_ GLOBAL( _ _ h a s h _ p a g e _ 4 K )
mflr r0
std r0 ,1 6 ( r1 )
stdu r1 ,- S T A C K F R A M E S I Z E ( r1 )
/* Save all params that we need after a function call */
std r6 ,S T K _ P A R M ( r6 ) ( r1 )
std r8 ,S T K _ P A R M ( r8 ) ( r1 )
/* Add _PAGE_PRESENT to access */
ori r4 ,r4 ,_ P A G E _ P R E S E N T
/ * Save n o n - v o l a t i l e r e g i s t e r s .
* r3 1 w i l l h o l d " o l d P T E "
* r3 0 i s " n e w P T E "
* r2 9 i s " v a "
* r2 8 i s a h a s h v a l u e
* r2 7 i s h a s h t a b m a s k ( m a y b e d y n a m i c p a t c h e d i n s t e a d ? )
* r2 6 i s t h e h i d x m a s k
* r2 5 i s t h e i n d e x i n c o m b o p a g e
* /
std r25 ,S T K _ R E G ( r25 ) ( r1 )
std r26 ,S T K _ R E G ( r26 ) ( r1 )
std r27 ,S T K _ R E G ( r27 ) ( r1 )
std r28 ,S T K _ R E G ( r28 ) ( r1 )
std r29 ,S T K _ R E G ( r29 ) ( r1 )
std r30 ,S T K _ R E G ( r30 ) ( r1 )
std r31 ,S T K _ R E G ( r31 ) ( r1 )
/ * Step 1 :
*
* Check p e r m i s s i o n s , a t o m i c a l l y m a r k t h e l i n u x P T E b u s y
* and h a s h e d .
* /
1 :
ldarx r31 ,0 ,r6
/* Check access rights (access & ~(pte_val(*ptep))) */
andc. r0 ,r4 ,r31
bne- h t a b _ w r o n g _ a c c e s s
/* Check if PTE is busy */
andi. r0 ,r31 ,_ P A G E _ B U S Y
/ * If s o , j u s t b a i l o u t a n d r e f a u l t i f n e e d e d . S o m e o n e e l s e
* is c h a n g i n g t h i s P T E a n y w a y a n d m i g h t h a s h i t .
* /
bne- h t a b _ b a i l _ o k
/ * Prepare n e w P T E v a l u e ( t u r n a c c e s s R W i n t o D I R T Y , t h e n
* add B U S Y a n d A C C E S S E D )
* /
rlwinm r30 ,r4 ,3 2 - 9 + 7 ,3 1 - 7 ,3 1 - 7 / * _ P A G E _ R W - > _ P A G E _ D I R T Y * /
or r30 ,r30 ,r31
ori r30 ,r30 ,_ P A G E _ B U S Y | _ P A G E _ A C C E S S E D | _ P A G E _ H A S H P T E
2006-06-15 04:45:18 +04:00
oris r30 ,r30 ,_ P A G E _ C O M B O @h
2005-11-07 03:06:55 +03:00
/* Write the linux PTE atomically (setting busy) */
stdcx. r30 ,0 ,r6
bne- 1 b
isync
/ * Step 2 :
*
* Insert/ U p d a t e t h e H P T E i n t h e h a s h t a b l e . A t t h i s p o i n t ,
* r4 ( a c c e s s ) i s r e - u s e a b l e , w e u s e i t f o r t h e n e w H P T E f l a g s
* /
/* Load the hidx index */
rldicl r25 ,r3 ,6 4 - 1 2 ,6 0
/* Calc va and put it in r29 */
rldicr r29 ,r5 ,2 8 ,6 3 - 2 8 / * r29 = ( v s i d < < 2 8 ) * /
rldicl r3 ,r3 ,0 ,3 6 / * r3 = ( e a & 0 x0 f f f f f f f ) * /
or r29 ,r3 ,r29 / * r29 = v a
/* Calculate hash value for primary slot and store it in r28 */
rldicl r5 ,r5 ,0 ,2 5 / * v s i d & 0 x00 0 0 0 0 7 f f f f f f f f f * /
rldicl r0 ,r3 ,6 4 - 1 2 ,4 8 / * ( e a > > 1 2 ) & 0 x f f f f * /
xor r28 ,r5 ,r0
/* Convert linux PTE bits into HW equivalents */
andi. r3 ,r30 ,0 x1 f e / * G e t b a s i c s e t o f f l a g s * /
xori r3 ,r3 ,H P T E _ R _ N / * _ P A G E _ E X E C - > N O E X E C * /
rlwinm r0 ,r30 ,3 2 - 9 + 1 ,3 0 ,3 0 / * _ P A G E _ R W - > _ P A G E _ U S E R ( r0 ) * /
rlwinm r4 ,r30 ,3 2 - 7 + 1 ,3 0 ,3 0 / * _ P A G E _ D I R T Y - > _ P A G E _ U S E R ( r4 ) * /
and r0 ,r0 ,r4 / * _ P A G E _ R W & _ P A G E _ D I R T Y - > r0 b i t 3 0 * /
andc r0 ,r30 ,r0 / * r0 = p t e & ~ r0 * /
rlwimi r3 ,r0 ,3 2 - 1 ,3 1 ,3 1 / * I n s e r t r e s u l t i n t o P P l s b * /
2006-05-30 08:14:19 +04:00
ori r3 ,r3 ,H P T E _ R _ C / * A l w a y s a d d " C " b i t f o r p e r f . * /
2005-11-07 03:06:55 +03:00
/ * We e v e n t u a l l y d o t h e i c a c h e s y n c h e r e ( m a y b e i n l i n e t h a t
* code r a t h e r t h a n c a l l a C f u n c t i o n . . . )
* /
BEGIN_ F T R _ S E C T I O N
mr r4 ,r30
mr r5 ,r7
bl . h a s h _ p a g e _ d o _ l a z y _ i c a c h e
END_ F T R _ S E C T I O N ( C P U _ F T R _ N O E X E C U T E | C P U _ F T R _ C O H E R E N T _ I C A C H E , C P U _ F T R _ N O E X E C U T E )
/ * At t h i s p o i n t , r3 c o n t a i n s n e w P P b i t s , s a v e t h e m i n
* place o f " a c c e s s " i n t h e p a r a m a r e a ( s i c )
* /
std r3 ,S T K _ P A R M ( r4 ) ( r1 )
/* Get htab_hash_mask */
ld r4 ,h t a b _ h a s h _ m a s k @got(2)
ld r27 ,0 ( r4 ) / * h t a b _ h a s h _ m a s k - > r27 * /
/ * Check i f w e m a y a l r e a d y b e i n t h e h a s h t a b l e , i n t h i s c a s e , w e
* go t o o u t - o f - l i n e c o d e t o t r y t o m o d i f y t h e H P T E . W e l o o k f o r
* the b i t a t ( 1 > > ( i n d e x + 3 2 ) )
* /
andi. r0 ,r31 ,_ P A G E _ H A S H P T E
li r26 ,0 / * D e f a u l t h i d x * /
beq h t a b _ i n s e r t _ p t e
2006-06-15 04:45:18 +04:00
/ *
* Check i f t h e p t e w a s a l r e a d y i n s e r t e d i n t o t h e h a s h t a b l e
* as a 6 4 k H W p a g e , a n d i n v a l i d a t e t h e 6 4 k H P T E i f s o .
* /
andis. r0 ,r31 ,_ P A G E _ C O M B O @h
beq h t a b _ i n v a l _ o l d _ h p t e
2005-11-07 03:06:55 +03:00
ld r6 ,S T K _ P A R M ( r6 ) ( r1 )
ori r26 ,r6 ,0 x80 0 0 / * L o a d t h e h i d x m a s k * /
ld r26 ,0 ( r26 )
addi r5 ,r25 ,3 6 / * C h e c k a c t u a l H P T E _ S U B b i t , t h i s * /
rldcr. r0 ,r31 ,r5 ,0 / * m u s t m a t c h p g t a b l e . h d e f i n i t i o n * /
bne h t a b _ m o d i f y _ p t e
htab_insert_pte :
/* real page number in r5, PTE RPN value + index */
rldicl r5 ,r31 ,6 4 - P T E _ R P N _ S H I F T ,P T E _ R P N _ S H I F T
sldi r5 ,r5 ,P A G E _ S H I F T - H W _ P A G E _ S H I F T
add r5 ,r5 ,r25
sldi r5 ,r5 ,H W _ P A G E _ S H I F T
/* Calculate primary group hash */
and r0 ,r28 ,r27
rldicr r3 ,r0 ,3 ,6 3 - 3 / * r0 = ( h a s h & m a s k ) < < 3 * /
/* Call ppc_md.hpte_insert */
ld r6 ,S T K _ P A R M ( r4 ) ( r1 ) / * R e t r e i v e n e w p p b i t s * /
mr r4 ,r29 / * R e t r e i v e v a * /
li r7 ,0 / * ! b o l t e d , ! s e c o n d a r y * /
li r8 ,M M U _ P A G E _ 4 K / * p a g e s i z e * /
_ GLOBAL( h t a b _ c a l l _ h p t e _ i n s e r t 1 )
bl . / * p a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
cmpdi 0 ,r3 ,0
bge h t a b _ p t e _ i n s e r t _ o k / * I n s e r t i o n s u c c e s s f u l * /
cmpdi 0 ,r3 ,- 2 / * C r i t i c a l f a i l u r e * /
beq- h t a b _ p t e _ i n s e r t _ f a i l u r e
/* Now try secondary slot */
/* real page number in r5, PTE RPN value + index */
rldicl r5 ,r31 ,6 4 - P T E _ R P N _ S H I F T ,P T E _ R P N _ S H I F T
sldi r5 ,r5 ,P A G E _ S H I F T - H W _ P A G E _ S H I F T
add r5 ,r5 ,r25
sldi r5 ,r5 ,H W _ P A G E _ S H I F T
/* Calculate secondary group hash */
andc r0 ,r27 ,r28
rldicr r3 ,r0 ,3 ,6 3 - 3 / * r0 = ( ~ h a s h & m a s k ) < < 3 * /
/* Call ppc_md.hpte_insert */
ld r6 ,S T K _ P A R M ( r4 ) ( r1 ) / * R e t r e i v e n e w p p b i t s * /
mr r4 ,r29 / * R e t r e i v e v a * /
li r7 ,H P T E _ V _ S E C O N D A R Y / * ! b o l t e d , s e c o n d a r y * /
li r8 ,M M U _ P A G E _ 4 K / * p a g e s i z e * /
_ GLOBAL( h t a b _ c a l l _ h p t e _ i n s e r t 2 )
bl . / * p a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
cmpdi 0 ,r3 ,0
bge+ h t a b _ p t e _ i n s e r t _ o k / * I n s e r t i o n s u c c e s s f u l * /
cmpdi 0 ,r3 ,- 2 / * C r i t i c a l f a i l u r e * /
beq- h t a b _ p t e _ i n s e r t _ f a i l u r e
/* Both are full, we need to evict something */
mftb r0
/* Pick a random group based on TB */
andi. r0 ,r0 ,1
mr r5 ,r28
bne 2 f
not r5 ,r5
2 : and r0 ,r5 ,r27
rldicr r3 ,r0 ,3 ,6 3 - 3 / * r0 = ( h a s h & m a s k ) < < 3 * /
/* Call ppc_md.hpte_remove */
_ GLOBAL( h t a b _ c a l l _ h p t e _ r e m o v e )
bl . / * p a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
/* Try all again */
b h t a b _ i n s e r t _ p t e
2006-06-15 04:45:18 +04:00
/ *
* Call o u t t o C c o d e t o i n v a l i d a t e a n 6 4 k H W H P T E t h a t i s
* useless n o w t h a t t h e s e g m e n t h a s b e e n s w i t c h e d t o 4 k p a g e s .
* /
htab_inval_old_hpte :
mr r3 ,r29 / * v i r t u a l a d d r * /
mr r4 ,r31 / * P T E . p t e * /
li r5 ,0 / * P T E . h i d x * /
li r6 ,M M U _ P A G E _ 6 4 K / * p s i z e * /
ld r7 ,S T K _ P A R M ( r8 ) ( r1 ) / * l o c a l * /
bl . f l u s h _ h a s h _ p a g e
b h t a b _ i n s e r t _ p t e
2005-11-07 03:06:55 +03:00
htab_bail_ok :
li r3 ,0
b h t a b _ b a i l
htab_pte_insert_ok :
/ * Insert s l o t n u m b e r & s e c o n d a r y b i t i n P T E s e c o n d h a l f ,
* clear _ P A G E _ B U S Y a n d s e t a p p r o r i a t e H P T E s l o t b i t
* /
ld r6 ,S T K _ P A R M ( r6 ) ( r1 )
li r0 ,_ P A G E _ B U S Y
andc r30 ,r30 ,r0
/* HPTE SUB bit */
li r0 ,1
subfic r5 ,r25 ,2 7 / * M u s t m a t c h b i t p o s i t i o n i n * /
sld r0 ,r0 ,r5 / * p g t a b l e . h * /
or r30 ,r30 ,r0
/* hindx */
sldi r5 ,r25 ,2
sld r3 ,r3 ,r5
li r4 ,0 x f
sld r4 ,r4 ,r5
andc r26 ,r26 ,r4
or r26 ,r26 ,r3
ori r5 ,r6 ,0 x80 0 0
std r26 ,0 ( r5 )
lwsync
std r30 ,0 ( r6 )
li r3 , 0
htab_bail :
ld r25 ,S T K _ R E G ( r25 ) ( r1 )
ld r26 ,S T K _ R E G ( r26 ) ( r1 )
ld r27 ,S T K _ R E G ( r27 ) ( r1 )
ld r28 ,S T K _ R E G ( r28 ) ( r1 )
ld r29 ,S T K _ R E G ( r29 ) ( r1 )
ld r30 ,S T K _ R E G ( r30 ) ( r1 )
ld r31 ,S T K _ R E G ( r31 ) ( r1 )
addi r1 ,r1 ,S T A C K F R A M E S I Z E
ld r0 ,1 6 ( r1 )
mtlr r0
blr
htab_modify_pte :
/* Keep PP bits in r4 and slot idx from the PTE around in r3 */
mr r4 ,r3
sldi r5 ,r25 ,2
srd r3 ,r26 ,r5
/* Secondary group ? if yes, get a inverted hash value */
mr r5 ,r28
andi. r0 ,r3 ,0 x8 / * p a g e s e c o n d a r y ? * /
beq 1 f
not r5 ,r5
1 : andi. r3 ,r3 ,0 x7 / * e x t r a c t i d x a l o n e * /
/* Calculate proper slot value for ppc_md.hpte_updatepp */
and r0 ,r5 ,r27
rldicr r0 ,r0 ,3 ,6 3 - 3 / * r0 = ( h a s h & m a s k ) < < 3 * /
add r3 ,r0 ,r3 / * a d d s l o t i d x * /
/* Call ppc_md.hpte_updatepp */
mr r5 ,r29 / * v a * /
li r6 ,M M U _ P A G E _ 4 K / * p a g e s i z e * /
ld r7 ,S T K _ P A R M ( r8 ) ( r1 ) / * g e t " l o c a l " p a r a m * /
_ GLOBAL( h t a b _ c a l l _ h p t e _ u p d a t e p p )
bl . / * p a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
/ * if w e f a i l e d b e c a u s e t y p i c a l l y t h e H P T E w a s n ' t r e a l l y h e r e
* we t r y a n i n s e r t i o n .
* /
cmpdi 0 ,r3 ,- 1
beq- h t a b _ i n s e r t _ p t e
/* Clear the BUSY bit and Write out the PTE */
li r0 ,_ P A G E _ B U S Y
andc r30 ,r30 ,r0
ld r6 ,S T K _ P A R M ( r6 ) ( r1 )
std r30 ,0 ( r6 )
li r3 ,0
b h t a b _ b a i l
htab_wrong_access :
/* Bail out clearing reservation */
stdcx. r31 ,0 ,r6
li r3 ,1
b h t a b _ b a i l
2005-04-17 02:20:36 +04:00
htab_pte_insert_failure :
/* Bail out restoring old PTE */
ld r6 ,S T K _ P A R M ( r6 ) ( r1 )
std r31 ,0 ( r6 )
li r3 ,- 1
2005-11-07 03:06:55 +03:00
b h t a b _ b a i l
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* 6 4 K S W & 6 4 K H W i n a 6 4 K s e g m e n t p a g e s i m p l e m e n t a t i o n *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /
_ GLOBAL( _ _ h a s h _ p a g e _ 6 4 K )
mflr r0
std r0 ,1 6 ( r1 )
stdu r1 ,- S T A C K F R A M E S I Z E ( r1 )
/* Save all params that we need after a function call */
std r6 ,S T K _ P A R M ( r6 ) ( r1 )
std r8 ,S T K _ P A R M ( r8 ) ( r1 )
/* Add _PAGE_PRESENT to access */
ori r4 ,r4 ,_ P A G E _ P R E S E N T
/ * Save n o n - v o l a t i l e r e g i s t e r s .
* r3 1 w i l l h o l d " o l d P T E "
* r3 0 i s " n e w P T E "
* r2 9 i s " v a "
* r2 8 i s a h a s h v a l u e
* r2 7 i s h a s h t a b m a s k ( m a y b e d y n a m i c p a t c h e d i n s t e a d ? )
* /
std r27 ,S T K _ R E G ( r27 ) ( r1 )
std r28 ,S T K _ R E G ( r28 ) ( r1 )
std r29 ,S T K _ R E G ( r29 ) ( r1 )
std r30 ,S T K _ R E G ( r30 ) ( r1 )
std r31 ,S T K _ R E G ( r31 ) ( r1 )
/ * Step 1 :
*
* Check p e r m i s s i o n s , a t o m i c a l l y m a r k t h e l i n u x P T E b u s y
* and h a s h e d .
* /
1 :
ldarx r31 ,0 ,r6
/* Check access rights (access & ~(pte_val(*ptep))) */
andc. r0 ,r4 ,r31
bne- h t 6 4 _ w r o n g _ a c c e s s
/* Check if PTE is busy */
andi. r0 ,r31 ,_ P A G E _ B U S Y
/ * If s o , j u s t b a i l o u t a n d r e f a u l t i f n e e d e d . S o m e o n e e l s e
* is c h a n g i n g t h i s P T E a n y w a y a n d m i g h t h a s h i t .
* /
bne- h t 6 4 _ b a i l _ o k
2006-06-15 04:45:18 +04:00
BEGIN_ F T R _ S E C T I O N
/* Check if PTE has the cache-inhibit bit set */
andi. r0 ,r31 ,_ P A G E _ N O _ C A C H E
/* If so, bail out and refault as a 4k page */
bne- h t 6 4 _ b a i l _ o k
END_ F T R _ S E C T I O N _ I F C L R ( C P U _ F T R _ C I _ L A R G E _ P A G E )
2005-11-07 03:06:55 +03:00
/ * Prepare n e w P T E v a l u e ( t u r n a c c e s s R W i n t o D I R T Y , t h e n
* add B U S Y ,H A S H P T E a n d A C C E S S E D )
* /
rlwinm r30 ,r4 ,3 2 - 9 + 7 ,3 1 - 7 ,3 1 - 7 / * _ P A G E _ R W - > _ P A G E _ D I R T Y * /
or r30 ,r30 ,r31
ori r30 ,r30 ,_ P A G E _ B U S Y | _ P A G E _ A C C E S S E D | _ P A G E _ H A S H P T E
/* Write the linux PTE atomically (setting busy) */
stdcx. r30 ,0 ,r6
bne- 1 b
isync
/ * Step 2 :
*
* Insert/ U p d a t e t h e H P T E i n t h e h a s h t a b l e . A t t h i s p o i n t ,
* r4 ( a c c e s s ) i s r e - u s e a b l e , w e u s e i t f o r t h e n e w H P T E f l a g s
* /
/* Calc va and put it in r29 */
rldicr r29 ,r5 ,2 8 ,6 3 - 2 8
rldicl r3 ,r3 ,0 ,3 6
or r29 ,r3 ,r29
/* Calculate hash value for primary slot and store it in r28 */
rldicl r5 ,r5 ,0 ,2 5 / * v s i d & 0 x00 0 0 0 0 7 f f f f f f f f f * /
rldicl r0 ,r3 ,6 4 - 1 6 ,5 2 / * ( e a > > 1 6 ) & 0 x f f f * /
xor r28 ,r5 ,r0
/* Convert linux PTE bits into HW equivalents */
andi. r3 ,r30 ,0 x1 f e / * G e t b a s i c s e t o f f l a g s * /
xori r3 ,r3 ,H P T E _ R _ N / * _ P A G E _ E X E C - > N O E X E C * /
rlwinm r0 ,r30 ,3 2 - 9 + 1 ,3 0 ,3 0 / * _ P A G E _ R W - > _ P A G E _ U S E R ( r0 ) * /
rlwinm r4 ,r30 ,3 2 - 7 + 1 ,3 0 ,3 0 / * _ P A G E _ D I R T Y - > _ P A G E _ U S E R ( r4 ) * /
and r0 ,r0 ,r4 / * _ P A G E _ R W & _ P A G E _ D I R T Y - > r0 b i t 3 0 * /
andc r0 ,r30 ,r0 / * r0 = p t e & ~ r0 * /
rlwimi r3 ,r0 ,3 2 - 1 ,3 1 ,3 1 / * I n s e r t r e s u l t i n t o P P l s b * /
2006-05-30 08:14:19 +04:00
ori r3 ,r3 ,H P T E _ R _ C / * A l w a y s a d d " C " b i t f o r p e r f . * /
2005-11-07 03:06:55 +03:00
/ * We e v e n t u a l l y d o t h e i c a c h e s y n c h e r e ( m a y b e i n l i n e t h a t
* code r a t h e r t h a n c a l l a C f u n c t i o n . . . )
* /
BEGIN_ F T R _ S E C T I O N
mr r4 ,r30
mr r5 ,r7
bl . h a s h _ p a g e _ d o _ l a z y _ i c a c h e
END_ F T R _ S E C T I O N ( C P U _ F T R _ N O E X E C U T E | C P U _ F T R _ C O H E R E N T _ I C A C H E , C P U _ F T R _ N O E X E C U T E )
/ * At t h i s p o i n t , r3 c o n t a i n s n e w P P b i t s , s a v e t h e m i n
* place o f " a c c e s s " i n t h e p a r a m a r e a ( s i c )
* /
std r3 ,S T K _ P A R M ( r4 ) ( r1 )
/* Get htab_hash_mask */
ld r4 ,h t a b _ h a s h _ m a s k @got(2)
ld r27 ,0 ( r4 ) / * h t a b _ h a s h _ m a s k - > r27 * /
/ * Check i f w e m a y a l r e a d y b e i n t h e h a s h t a b l e , i n t h i s c a s e , w e
* go t o o u t - o f - l i n e c o d e t o t r y t o m o d i f y t h e H P T E
* /
andi. r0 ,r31 ,_ P A G E _ H A S H P T E
bne h t 6 4 _ m o d i f y _ p t e
ht64_insert_pte :
/ * Clear h p t e b i t s i n n e w p t e ( w e a l s o c l e a r B U S Y b t w ) a n d
* add _ P A G E _ H A S H P T E
* /
lis r0 ,_ P A G E _ H P T E F L A G S @h
ori r0 ,r0 ,_ P A G E _ H P T E F L A G S @l
andc r30 ,r30 ,r0
ori r30 ,r30 ,_ P A G E _ H A S H P T E
/* Phyical address in r5 */
rldicl r5 ,r31 ,6 4 - P T E _ R P N _ S H I F T ,P T E _ R P N _ S H I F T
sldi r5 ,r5 ,P A G E _ S H I F T
/* Calculate primary group hash */
and r0 ,r28 ,r27
rldicr r3 ,r0 ,3 ,6 3 - 3 / * r0 = ( h a s h & m a s k ) < < 3 * /
/* Call ppc_md.hpte_insert */
ld r6 ,S T K _ P A R M ( r4 ) ( r1 ) / * R e t r e i v e n e w p p b i t s * /
mr r4 ,r29 / * R e t r e i v e v a * /
li r7 ,0 / * ! b o l t e d , ! s e c o n d a r y * /
li r8 ,M M U _ P A G E _ 6 4 K
_ GLOBAL( h t 6 4 _ c a l l _ h p t e _ i n s e r t 1 )
bl . / * p a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
cmpdi 0 ,r3 ,0
bge h t 6 4 _ p t e _ i n s e r t _ o k / * I n s e r t i o n s u c c e s s f u l * /
cmpdi 0 ,r3 ,- 2 / * C r i t i c a l f a i l u r e * /
beq- h t 6 4 _ p t e _ i n s e r t _ f a i l u r e
/* Now try secondary slot */
/* Phyical address in r5 */
rldicl r5 ,r31 ,6 4 - P T E _ R P N _ S H I F T ,P T E _ R P N _ S H I F T
sldi r5 ,r5 ,P A G E _ S H I F T
/* Calculate secondary group hash */
andc r0 ,r27 ,r28
rldicr r3 ,r0 ,3 ,6 3 - 3 / * r0 = ( ~ h a s h & m a s k ) < < 3 * /
/* Call ppc_md.hpte_insert */
ld r6 ,S T K _ P A R M ( r4 ) ( r1 ) / * R e t r e i v e n e w p p b i t s * /
mr r4 ,r29 / * R e t r e i v e v a * /
li r7 ,H P T E _ V _ S E C O N D A R Y / * ! b o l t e d , s e c o n d a r y * /
li r8 ,M M U _ P A G E _ 6 4 K
_ GLOBAL( h t 6 4 _ c a l l _ h p t e _ i n s e r t 2 )
bl . / * p a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
cmpdi 0 ,r3 ,0
bge+ h t 6 4 _ p t e _ i n s e r t _ o k / * I n s e r t i o n s u c c e s s f u l * /
cmpdi 0 ,r3 ,- 2 / * C r i t i c a l f a i l u r e * /
beq- h t 6 4 _ p t e _ i n s e r t _ f a i l u r e
/* Both are full, we need to evict something */
mftb r0
/* Pick a random group based on TB */
andi. r0 ,r0 ,1
mr r5 ,r28
bne 2 f
not r5 ,r5
2 : and r0 ,r5 ,r27
rldicr r3 ,r0 ,3 ,6 3 - 3 / * r0 = ( h a s h & m a s k ) < < 3 * /
/* Call ppc_md.hpte_remove */
_ GLOBAL( h t 6 4 _ c a l l _ h p t e _ r e m o v e )
bl . / * p a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
/* Try all again */
b h t 6 4 _ i n s e r t _ p t e
ht64_bail_ok :
li r3 ,0
b h t 6 4 _ b a i l
ht64_pte_insert_ok :
/* Insert slot number & secondary bit in PTE */
rldimi r30 ,r3 ,1 2 ,6 3 - 1 5
/ * Write o u t t h e P T E w i t h a n o r m a l w r i t e
* ( maybe a d d e i e i o m a y b e g o o d s t i l l ? )
* /
ht64_write_out_pte :
ld r6 ,S T K _ P A R M ( r6 ) ( r1 )
std r30 ,0 ( r6 )
li r3 , 0
ht64_bail :
ld r27 ,S T K _ R E G ( r27 ) ( r1 )
ld r28 ,S T K _ R E G ( r28 ) ( r1 )
ld r29 ,S T K _ R E G ( r29 ) ( r1 )
ld r30 ,S T K _ R E G ( r30 ) ( r1 )
ld r31 ,S T K _ R E G ( r31 ) ( r1 )
addi r1 ,r1 ,S T A C K F R A M E S I Z E
ld r0 ,1 6 ( r1 )
mtlr r0
blr
ht64_modify_pte :
/* Keep PP bits in r4 and slot idx from the PTE around in r3 */
mr r4 ,r3
rlwinm r3 ,r31 ,3 2 - 1 2 ,2 9 ,3 1
/* Secondary group ? if yes, get a inverted hash value */
mr r5 ,r28
andi. r0 ,r31 ,_ P A G E _ F _ S E C O N D
beq 1 f
not r5 ,r5
1 :
/* Calculate proper slot value for ppc_md.hpte_updatepp */
and r0 ,r5 ,r27
rldicr r0 ,r0 ,3 ,6 3 - 3 / * r0 = ( h a s h & m a s k ) < < 3 * /
add r3 ,r0 ,r3 / * a d d s l o t i d x * /
/* Call ppc_md.hpte_updatepp */
mr r5 ,r29 / * v a * /
li r6 ,M M U _ P A G E _ 6 4 K
ld r7 ,S T K _ P A R M ( r8 ) ( r1 ) / * g e t " l o c a l " p a r a m * /
_ GLOBAL( h t 6 4 _ c a l l _ h p t e _ u p d a t e p p )
bl . / * p a t c h e d b y h t a b _ f i n i s h _ i n i t ( ) * /
/ * if w e f a i l e d b e c a u s e t y p i c a l l y t h e H P T E w a s n ' t r e a l l y h e r e
* we t r y a n i n s e r t i o n .
* /
cmpdi 0 ,r3 ,- 1
beq- h t 6 4 _ i n s e r t _ p t e
/* Clear the BUSY bit and Write out the PTE */
li r0 ,_ P A G E _ B U S Y
andc r30 ,r30 ,r0
b h t 6 4 _ w r i t e _ o u t _ p t e
ht64_wrong_access :
/* Bail out clearing reservation */
stdcx. r31 ,0 ,r6
li r3 ,1
b h t 6 4 _ b a i l
ht64_pte_insert_failure :
/* Bail out restoring old PTE */
ld r6 ,S T K _ P A R M ( r6 ) ( r1 )
std r31 ,0 ( r6 )
li r3 ,- 1
b h t 6 4 _ b a i l
# endif / * C O N F I G _ P P C _ 6 4 K _ P A G E S * /
2005-04-17 02:20:36 +04:00
2005-11-07 03:06:55 +03:00
/ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Huge p a g e s i m p l e m e n t a t i o n i s i n h u g e t l b p a g e . c *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * /