]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
working but suboptimal cache flusher
authorphcoder <phcoder@debian.bg45.phnet>
Sat, 24 Oct 2009 08:58:20 +0000 (10:58 +0200)
committerphcoder <phcoder@debian.bg45.phnet>
Sat, 24 Oct 2009 08:58:20 +0000 (10:58 +0200)
kern/mips/cache.S

index ec13a9b95dab246e3d32bb13e4fb396e7ed33a70..e4436450fa1366e12a52ca4c0ed35ee6f7995e48 100644 (file)
@@ -3,7 +3,12 @@
        /* FIXME: This should invalidate only part of memory.  */
 FUNCTION (grub_cpu_flush_cache)
 FUNCTION (grub_arch_sync_caches)
-#if __mips >= 2
-       sync
-#endif
+repeat:
+       cache 1, 0($a0)
+       cache 0, 0($a0)
+       cache 3, 0($a0)
+       cache 0, 0($a0)
+       addiu $a0, $a0, 1
+       addiu $a1, $a1, 0xffff
+       bne $a1, $zero, repeat
        j $31