mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
fix(bootloader): fixed P4 bootloader being able to boot with certain configs
Due to internal memory being behind a cache on P4 we need to make sure we do cache write backs when manipulating IRAM over the dcache.
This commit is contained in:
parent
c8651c1041
commit
503b917ca5
@ -226,6 +226,8 @@ static esp_err_t image_load(esp_image_load_mode_t mode, const esp_partition_pos_
|
||||
}
|
||||
}
|
||||
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
|
||||
/* We have manipulated data over dcache that will be read over icache and need
|
||||
to writeback, else the data read might be invalid */
|
||||
cache_ll_writeback_all(CACHE_LL_LEVEL_INT_MEM, CACHE_TYPE_DATA, CACHE_LL_ID_ALL);
|
||||
#endif
|
||||
}
|
||||
@ -673,6 +675,13 @@ static esp_err_t process_segment_data(int segment, intptr_t load_addr, uint32_t
|
||||
|
||||
if (checksum == NULL && sha_handle == NULL) {
|
||||
memcpy((void *)load_addr, data, data_len);
|
||||
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
|
||||
if (esp_ptr_in_iram((uint32_t *)load_addr)) {
|
||||
/* If we have manipulated data over dcache that will be read over icache then we need
|
||||
to writeback, else the data read might be invalid */
|
||||
cache_ll_writeback_all(CACHE_LL_LEVEL_INT_MEM, CACHE_TYPE_DATA, CACHE_LL_ID_ALL);
|
||||
}
|
||||
#endif
|
||||
bootloader_munmap(data);
|
||||
return ESP_OK;
|
||||
}
|
||||
@ -728,7 +737,9 @@ static esp_err_t process_segment_data(int segment, intptr_t load_addr, uint32_t
|
||||
}
|
||||
}
|
||||
#if SOC_CACHE_INTERNAL_MEM_VIA_L1CACHE
|
||||
if (do_load && esp_ptr_in_diram_iram((uint32_t *)load_addr)) {
|
||||
if (do_load && esp_ptr_in_iram((uint32_t *)load_addr)) {
|
||||
/* If we have manipulated data over dcache that will be read over icache then we need
|
||||
to writeback, else the data read might be invalid */
|
||||
cache_ll_writeback_all(CACHE_LL_LEVEL_INT_MEM, CACHE_TYPE_DATA, CACHE_LL_ID_ALL);
|
||||
}
|
||||
#endif
|
||||
|
@ -245,12 +245,6 @@ examples/system/select:
|
||||
depends_components:
|
||||
- vfs
|
||||
|
||||
examples/system/startup_time:
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32p4"
|
||||
temporary: true
|
||||
reason: test not pass, should be re-enable # TODO: IDF-8989
|
||||
|
||||
examples/system/sysview_tracing:
|
||||
disable:
|
||||
- if: SOC_GPTIMER_SUPPORTED != 1
|
||||
|
@ -6,7 +6,6 @@ import pytest
|
||||
from pytest_embedded import Dut
|
||||
|
||||
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD') # TODO: IDF-8989
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', [
|
||||
|
Loading…
Reference in New Issue
Block a user