From: phcoder Date: Sat, 24 Oct 2009 08:58:20 +0000 (+0200) Subject: working but suboptimal cache flusher X-Git-Tag: 1.98~160^2~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e6efd24fa0f23115fe0c96dbd6cea87da61d03d7;p=thirdparty%2Fgrub.git working but suboptimal cache flusher --- diff --git a/kern/mips/cache.S b/kern/mips/cache.S index ec13a9b95..e4436450f 100644 --- a/kern/mips/cache.S +++ b/kern/mips/cache.S @@ -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