]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: implement invalidate_icache_all on ARM11
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 16 Jun 2024 17:31:04 +0000 (19:31 +0200)
committerTom Rini <trini@konsulko.com>
Wed, 19 Jun 2024 19:10:23 +0000 (13:10 -0600)
In EFI sub-system we rely on invalidate_icache_all() to invalidate the
instruction cache after loading binaries. Add the missing implementation on
ARM1136, ARM1176.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
arch/arm/cpu/arm11/cpu.c

index 01d2e1a125d6e48e5ed74434fd7782caae40de59..4bf0446b543858eebca5d7d92730161fceab0b27 100644 (file)
@@ -116,3 +116,15 @@ void enable_caches(void)
 #endif
 }
 #endif
+
+#if !CONFIG_IS_ENABLED(SYS_ICACHE_OFF)
+/* Invalidate entire I-cache */
+void invalidate_icache_all(void)
+{
+       unsigned long i = 0;
+
+       asm ("mcr p15, 0, %0, c7, c5, 0" : : "r" (i));
+}
+#else
+void invalidate_icache_all(void) {}
+#endif