mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-18 10:31:09 +00:00
bootloader: Support for skipping validation upon wake from deep sleep
This saves time when waking up from deep sleep, but potentially decreases the security of the system. If the application able to modify itself (especially areas that are loaded into RAM) in flash while running without crashing or is modifies the cached bits of information about what was last booted from the bootloader, this could cause security issues if the user does a "deep sleep reset" since the full validation is skipped. Signed-off-by: Tim Nordell <tim.nordell@nimbelink.com>
This commit is contained in:
@@ -21,6 +21,12 @@
|
||||
#define CONFIG_BT_RESERVE_DRAM 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP)
|
||||
#define ESP_BOOTLOADER_RESERVE_RTC (CONFIG_BOOTLOADER_RESERVE_RTC_SIZE)
|
||||
#else
|
||||
#define ESP_BOOTLOADER_RESERVE_RTC 0
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE)
|
||||
|
||||
ASSERT((CONFIG_ESP32_FIXED_STATIC_RAM_SIZE <= 0x2c200),
|
||||
@@ -74,7 +80,7 @@ MEMORY
|
||||
rtc_iram_seg(RWX) : org = 0x400C0000, len = 0x2000
|
||||
|
||||
/* RTC fast memory (same block as above), viewed from data bus */
|
||||
rtc_data_seg(RW) : org = 0x3ff80000, len = 0x2000
|
||||
rtc_data_seg(RW) : org = 0x3ff80000, len = 0x2000 - ESP_BOOTLOADER_RESERVE_RTC
|
||||
|
||||
/* RTC slow memory (data accessible). Persists over deep sleep.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user