mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-26 20:53:11 +00:00
Security: ESP32C3 memory protection feature (IRAM0/DRAM0)
Software support for PMS module. Allows controlled memory access to IRAM (R/W/X) and DRAM0 (R/W) On/locked by default, configurable in Kconfig (esp_system) Closes https://jira.espressif.com:8443/browse/IDF-2092
This commit is contained in:
@@ -75,11 +75,15 @@ void IRAM_ATTR esp_restart(void)
|
||||
// Disable scheduler on this core.
|
||||
vTaskSuspendAll();
|
||||
|
||||
#if CONFIG_IDF_TARGET_ESP32S2
|
||||
bool digital_reset_needed = false;
|
||||
#if CONFIG_ESP_SYSTEM_CONFIG_MEMPROT_FEATURE
|
||||
if (esp_memprot_is_intr_ena_any() || esp_memprot_is_locked_any()) {
|
||||
esp_restart_noos_dig();
|
||||
digital_reset_needed = true;
|
||||
}
|
||||
#endif
|
||||
if (digital_reset_needed) {
|
||||
esp_restart_noos_dig();
|
||||
}
|
||||
esp_restart_noos();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user