mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 10:46:02 -04:00
bootloader: Create option for enabling memory region protection
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
parent
4995e24199
commit
477d11e9c1
@ -193,6 +193,14 @@ menu "Bootloader config"
|
|||||||
The GPIO must be held low continuously for this period of time after reset
|
The GPIO must be held low continuously for this period of time after reset
|
||||||
before a factory reset or test partition boot (as applicable) is performed.
|
before a factory reset or test partition boot (as applicable) is performed.
|
||||||
|
|
||||||
|
config BOOTLOADER_REGION_PROTECTION_ENABLE
|
||||||
|
bool "Enable protection for unmapped memory regions"
|
||||||
|
default y
|
||||||
|
help
|
||||||
|
Protects the unmapped memory regions of the entire address space from unintended accesses.
|
||||||
|
This will ensure that an exception will be triggered whenever the CPU performs a memory
|
||||||
|
operation on unmapped regions of the address space.
|
||||||
|
|
||||||
config BOOTLOADER_WDT_ENABLE
|
config BOOTLOADER_WDT_ENABLE
|
||||||
bool "Use RTC watchdog in start code"
|
bool "Use RTC watchdog in start code"
|
||||||
default y
|
default y
|
||||||
|
@ -17,6 +17,8 @@ void bootloader_init_mem(void)
|
|||||||
{
|
{
|
||||||
cpu_hal_init_hwloop();
|
cpu_hal_init_hwloop();
|
||||||
|
|
||||||
|
#ifdef CONFIG_BOOTLOADER_REGION_PROTECTION_ENABLE
|
||||||
// protect memory region
|
// protect memory region
|
||||||
esp_cpu_configure_region_protection();
|
esp_cpu_configure_region_protection();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user