diff --git a/components/bootloader_support/src/esp32c5/flash_encryption_secure_features.c b/components/bootloader_support/src/esp32c5/flash_encryption_secure_features.c index 8e8dd081c7..da06f42a5f 100644 --- a/components/bootloader_support/src/esp32c5/flash_encryption_secure_features.c +++ b/components/bootloader_support/src/esp32c5/flash_encryption_secure_features.c @@ -23,13 +23,12 @@ esp_err_t esp_flash_encryption_enable_secure_features(void) ESP_LOGW(TAG, "Not disabling UART bootloader encryption"); #endif -// TODO: [ESP32C5] IDF-8623 check if the following code is still supported -// #ifndef CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_CACHE -// ESP_LOGI(TAG, "Disable UART bootloader cache..."); -// esp_efuse_write_field_bit(ESP_EFUSE_DIS_DOWNLOAD_ICACHE); -// #else -// ESP_LOGW(TAG, "Not disabling UART bootloader cache - SECURITY COMPROMISED"); -// #endif +#ifndef CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_CACHE + ESP_LOGI(TAG, "Disable UART bootloader cache..."); + esp_efuse_write_field_bit(ESP_EFUSE_SPI_DOWNLOAD_MSPI_DIS); +#else + ESP_LOGW(TAG, "Not disabling UART bootloader cache - SECURITY COMPROMISED"); +#endif #ifndef CONFIG_SECURE_BOOT_ALLOW_JTAG ESP_LOGI(TAG, "Disable JTAG...");