From 42f5513d3d09e50eee6279c401897f34b1eb0053 Mon Sep 17 00:00:00 2001 From: David Hendricks Date: Mon, 25 Mar 2013 19:50:11 -0700 Subject: armv7: fixes for dcache_op_by_mva() This fixes a couple issues with dcache_op_by_mva(): - Add missing data and instruction sync barriers. - Removes unneded -1 from loop terminating condition. Change-Id: I098388614397c1e53079c017d56b1cf3ef273676 Signed-off-by: David Hendricks Reviewed-on: http://review.coreboot.org/2913 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich --- src/arch/armv7/lib/cache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/arch') diff --git a/src/arch/armv7/lib/cache.c b/src/arch/armv7/lib/cache.c index 2686db7cf9..c93da36e7c 100644 --- a/src/arch/armv7/lib/cache.c +++ b/src/arch/armv7/lib/cache.c @@ -183,7 +183,9 @@ static void dcache_op_mva(unsigned long addr, unsigned long line, i; line = line_bytes(); - for (i = addr & ~(line - 1); i < addr + len - 1; i += line) { + + dsb(); + for (i = addr & ~(line - 1); i < addr + len; i += line) { switch(op) { case OP_DCCIMVAC: dccimvac(addr); @@ -192,6 +194,7 @@ static void dcache_op_mva(unsigned long addr, break; } } + isb(); } void dcache_clean_by_mva(unsigned long addr, unsigned long len) -- cgit v1.2.3