aboutsummaryrefslogtreecommitdiff
path: root/asm/misc.S
diff options
context:
space:
mode:
Diffstat (limited to 'asm/misc.S')
-rw-r--r--asm/misc.S13
1 files changed, 13 insertions, 0 deletions
diff --git a/asm/misc.S b/asm/misc.S
index 1d9170b..8f8696f 100644
--- a/asm/misc.S
+++ b/asm/misc.S
@@ -50,3 +50,16 @@ _mcount:
mflr %r4
b __mcount_stack_check
#endif
+
+ .global cleanup_tlb
+cleanup_tlb:
+ /* Clean the TLB */
+ li %r3,512
+ mtctr %r3
+ li %r4,0xc00 /* IS field = 0b11 */
+ ptesync
+1: tlbiel %r4
+ addi %r4,%r4,0x1000
+ bdnz 1b
+ ptesync
+ blr