diff --git a/src/cpu/x86/cache/cache.c b/src/cpu/x86/cache/cache.c index 11524e65db..48718d2ae4 100644 --- a/src/cpu/x86/cache/cache.c +++ b/src/cpu/x86/cache/cache.c @@ -49,8 +49,10 @@ void arch_segment_loaded(uintptr_t start, size_t size, int flags) if (!cbmem_online()) return; - if (clflush_supported()) - clflush_region(start, size); - else - printk(BIOS_DEBUG, "Not flushing cache to RAM, CLFLUSH not supported\n"); + if (!self_snooping_supported()) { + if (clflush_supported()) + clflush_region(start, size); + else + printk(BIOS_DEBUG, "Not flushing cache to RAM, CLFLUSH not supported\n"); + } } diff --git a/src/cpu/x86/mp_init.c b/src/cpu/x86/mp_init.c index 574f28e379..f223ccc6e5 100644 --- a/src/cpu/x86/mp_init.c +++ b/src/cpu/x86/mp_init.c @@ -365,12 +365,14 @@ static atomic_t *load_sipi_vector(struct mp_params *mp_params) ap_count = &sp->ap_count; atomic_set(ap_count, 0); - /* Make sure SIPI data hits RAM so the APs that come up will see the - startup code even if the caches are disabled. */ - if (clflush_supported()) - clflush_region((uintptr_t)mod_loc, module_size); - else - wbinvd(); + if (!self_snooping_supported()) { + /* Make sure SIPI data hits RAM so the APs that come up will see the + startup code even if the caches are disabled. */ + if (clflush_supported()) + clflush_region((uintptr_t)mod_loc, module_size); + else + wbinvd(); + } return ap_count; } @@ -826,8 +828,10 @@ static void load_smm_handlers(void) smm_disable(); } - /* Ensure the SMM handlers hit DRAM before performing first SMI. */ - wbinvd(); + if (!self_snooping_supported()) { + /* Ensure the SMM handlers hit DRAM before performing first SMI. */ + wbinvd(); + } /* * Indicate that the SMM handlers have been loaded and MP