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 #include #include +#include #include /* 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); +}