summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/mips/cache.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/arch/mips/cache.c b/src/arch/mips/cache.c
index 7d96426c9a..c7a125f8d4 100644
--- a/src/arch/mips/cache.c
+++ b/src/arch/mips/cache.c
@@ -20,6 +20,7 @@
#include <arch/cache.h>
#include <arch/cpu.h>
#include <console/console.h>
+#include <program_loading.h>
#include <symbols.h>
/* cache_op: issues cache operation for specified address */
@@ -109,3 +110,10 @@ void cache_invalidate_all(uintptr_t start, size_t size)
perform_cache_operation(start, size, CACHE_CODE(DCACHE, WB_INVD));
perform_cache_operation(start, size, CACHE_CODE(L2CACHE, WB_INVD));
}
+
+void arch_segment_loaded(uintptr_t start, size_t size, int flags)
+{
+ cache_invalidate_all(start, size);
+ if (flags & SEG_FINAL)
+ cache_invalidate_all((uintptr_t)_cbfs_cache, _cbfs_cache_size);
+}