From 214af04cf585007d3b36488b289033c55d4e4719 Mon Sep 17 00:00:00 2001 From: Vladimir 'phcoder' Serbinenko Date: Fri, 13 May 2011 16:41:26 +0200 Subject: [PATCH] avoid executing cache opcode on non-4 byte aligned boundaries --- grub-core/kern/mips/cache_flush.S | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/grub-core/kern/mips/cache_flush.S b/grub-core/kern/mips/cache_flush.S index 11096c035..a352fd8ba 100644 --- a/grub-core/kern/mips/cache_flush.S +++ b/grub-core/kern/mips/cache_flush.S @@ -9,15 +9,15 @@ subu $t1, $t3, $t2 1: cache 1, 0($t0) - addiu $t1, $t1, 0xffff + addiu $t1, $t1, -0x4 bne $t1, $zero, 1b - addiu $t0, $t0, 0x1 + addiu $t0, $t0, 0x4 sync move $t0, $t2 subu $t1, $t3, $t2 2: cache 0, 0($t0) - addiu $t1, $t1, 0xffff + addiu $t1, $t1, -0x4 bne $t1, $zero, 2b - addiu $t0, $t0, 0x1 + addiu $t0, $t0, 0x4 sync