[Skiboot] [RFC PATCH 2/4] init: add missing sync_icache after exception vector patching
Nicholas Piggin
npiggin at gmail.com
Sun Aug 13 23:59:57 AEST 2017
There are two cases where sync_icache is not called immediately
after instructions are modified.
Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
---
core/init.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/core/init.c b/core/init.c
index 61b531c7..01fe12c9 100644
--- a/core/init.c
+++ b/core/init.c
@@ -382,6 +382,7 @@ static bool load_kernel(void)
if (kernel_entry < 0x2000) {
cpu_set_pm_enable(false);
memcpy(NULL, old_vectors, 0x2000);
+ sync_icache();
}
do_stb = true;
stb_container = kh; /* probably incorrect */
@@ -721,6 +722,7 @@ void setup_reset_vector(void)
dst = (uint32_t *)0x100;
while(src < &reset_patch_end)
*(dst++) = *(src++);
+ sync_icache();
}
void copy_exception_vectors(void)
--
2.13.3
More information about the Skiboot
mailing list