diff --git a/src/soc/intel/apollolake/car.c b/src/soc/intel/apollolake/car.c index 7646865ca2..c49d7ef187 100644 --- a/src/soc/intel/apollolake/car.c +++ b/src/soc/intel/apollolake/car.c @@ -26,8 +26,9 @@ static void flush_l1d_to_l2(void) wrmsr(MSR_POWER_MISC, msr); } -void platform_prog_run(struct prog *prog) +void arch_segment_loaded(uintptr_t start, size_t size, int flags) { - /* Flush L1D cache to L2 */ - flush_l1d_to_l2(); + /* Flush L1D cache to L2 on final segment loaded */ + if (flags & SEG_FINAL) + flush_l1d_to_l2(); }