mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-12 13:27:36 +00:00
flash encryption: Add config option to disable any plaintext reflashes
Enabled by default when Secure Boot is on, so Flash Encryption protection is always available in case of a Secure Boot bypass.
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
#include "esp_clk_internal.h"
|
||||
#include "esp_timer.h"
|
||||
#include "esp_pm.h"
|
||||
#include "esp_flash_encrypt.h"
|
||||
#include "pm_impl.h"
|
||||
#include "trax.h"
|
||||
#include "esp_ota_ops.h"
|
||||
@@ -347,6 +348,11 @@ void start_cpu0_default(void)
|
||||
#endif
|
||||
#if CONFIG_DISABLE_BASIC_ROM_CONSOLE
|
||||
esp_efuse_disable_basic_rom_console();
|
||||
#endif
|
||||
#ifdef CONFIG_FLASH_ENCRYPTION_DISABLE_PLAINTEXT
|
||||
if (esp_flash_encryption_enabled()) {
|
||||
esp_flash_write_protect_crypt_cnt();
|
||||
}
|
||||
#endif
|
||||
rtc_gpio_force_hold_dis_all();
|
||||
esp_vfs_dev_uart_register();
|
||||
|
Reference in New Issue
Block a user