mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-04 13:14:32 +02:00
Merge branch 'fix/fix_cache_hit_bypass_iram_safe_assertion' into 'master'
fix(esp_hw_support): fix cache hit bypass iram safe assertion on p4 See merge request espressif/esp-idf!38371
This commit is contained in:
@@ -519,6 +519,12 @@ static int s_cache_suspend_cnt = 0;
|
||||
static void IRAM_ATTR suspend_cache(void) {
|
||||
s_cache_suspend_cnt++;
|
||||
if (s_cache_suspend_cnt == 1) {
|
||||
#if CONFIG_ESP_SLEEP_CACHE_SAFE_ASSERTION && CONFIG_IDF_TARGET_ESP32P4
|
||||
// The implementation of P4 L2 cache suspend is to shut down MSPI AXI instead of shutting down Cache BUS.
|
||||
// If the access to external memory hits in the cache, it will not trigger a cache error. So in order to
|
||||
// fully check the access to external memory, writeback & invalidate is needed here.
|
||||
Cache_WriteBack_Invalidate_All(CACHE_MAP_MASK);
|
||||
#endif
|
||||
spi_flash_disable_cache(esp_cpu_get_core_id(), NULL);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user