arm: Fix the RW trampoline.

The trampoline needed to clear the instruction cache since what was in there
came from the RO version of the image.

BUG=chrome-os-partner:19420
TEST=Booted into RW on pit and saw that it entered the RW image successfully.
BRANCH=None

Change-Id: I68ea1be96704ce9c5d0064ebf21276f55d7b32de
Signed-off-by: Gabe Black <gabeblack@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/62894
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
Commit-Queue: Gabe Black <gabeblack@chromium.org>
diff --git a/src/arch/arm/trampoline.c b/src/arch/arm/trampoline.c
index 700fb01..cd6bf7f 100644
--- a/src/arch/arm/trampoline.c
+++ b/src/arch/arm/trampoline.c
@@ -35,8 +35,10 @@
 	__asm__ __volatile__(
 		"mov sp, %[new_stack]\n"
 		"mov r0, %[ehdr]\n"
+		// Clear the instruction cache.
+		"mcr p15, 0, %[zero], c7, c5, 0\n"
 		"b load_elf\n"
-		:: [new_stack]"r"(new_stack), [ehdr]"r"(ehdr)
-		: "memory"
+		:: [new_stack]"r"(new_stack), [ehdr]"r"(ehdr), [zero]"r"(0)
+		: "memory", "r0", "sp"
 	);
 }