From 42810eb1a0c7c789a177a19a15d76cf2db42a99b Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Sun, 22 Nov 2009 02:56:49 +0100 Subject: [PATCH] Improved cache handling --- kern/mips/cache.S | 2 -- lib/mips/relocator_asm.S | 10 ++++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/kern/mips/cache.S b/kern/mips/cache.S index e4436450f..a226069fd 100644 --- a/kern/mips/cache.S +++ b/kern/mips/cache.S @@ -6,8 +6,6 @@ FUNCTION (grub_arch_sync_caches) 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 diff --git a/lib/mips/relocator_asm.S b/lib/mips/relocator_asm.S index 6f6108edc..f901fbe89 100644 --- a/lib/mips/relocator_asm.S +++ b/lib/mips/relocator_asm.S @@ -30,14 +30,13 @@ VARIABLE (grub_relocator32_forward_start) copycont1: lb $11,0($8) sb $11,0($9) + cache 1, 0($9) + cache 0, 0($9) addiu $8, $8, 0x1 addiu $9, $9, 0x1 addiu $10, $10, 0xffff subu $11,$10,$0 bne $11, $0, copycont1 -#if __mips >= 2 - sync -#endif VARIABLE (grub_relocator32_forward_end) VARIABLE (grub_relocator32_backward_start) @@ -49,12 +48,11 @@ VARIABLE (grub_relocator32_backward_start) copycont2: lb $11,0($8) sb $11,0($9) + cache 1, 0($9) + cache 0, 0($9) addiu $8, $8, 0xffff addiu $9, $9, 0xffff addiu $10, 0xffff subu $11,$10,$0 bne $11, $0, copycont2 -#if __mips >= 2 - sync -#endif VARIABLE (grub_relocator32_backward_end)