mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_hw_support: allow writing in IRAM when CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT is not set for esp32C2
when CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT is not set, the PMP rule for esp32c2 shoud allow write access. Fix esp_cpu_configure_region_protection() in cpu.c accordingly.
This commit is contained in:
parent
327bf0d608
commit
249fde21e5
@ -395,11 +395,13 @@ extern int _data_start;
|
||||
#define CONDITIONAL_NONE 0x0
|
||||
#define CONDITIONAL_RX PMP_R | PMP_X
|
||||
#define CONDITIONAL_RW PMP_R | PMP_W
|
||||
#define CONDITIONAL_RWX PMP_R | PMP_W | PMP_X
|
||||
#else
|
||||
// With L bit set
|
||||
#define CONDITIONAL_NONE NONE
|
||||
#define CONDITIONAL_RX RX
|
||||
#define CONDITIONAL_RW RW
|
||||
#define CONDITIONAL_RWX RWX
|
||||
#endif
|
||||
|
||||
void esp_cpu_configure_region_protection(void)
|
||||
@ -466,7 +468,12 @@ void esp_cpu_configure_region_protection(void)
|
||||
} else {
|
||||
// 1. IRAM
|
||||
PMP_ENTRY_SET(0, SOC_DIRAM_IRAM_LOW, CONDITIONAL_NONE);
|
||||
|
||||
#if CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT
|
||||
PMP_ENTRY_SET(1, IRAM_END, PMP_TOR | CONDITIONAL_RX);
|
||||
#else
|
||||
PMP_ENTRY_SET(1, IRAM_END, PMP_TOR | CONDITIONAL_RWX);
|
||||
#endif
|
||||
|
||||
// 2. DRAM
|
||||
PMP_ENTRY_SET(2, DRAM_START, CONDITIONAL_NONE);
|
||||
|
@ -1,3 +1,4 @@
|
||||
# This config is split between targets since different component needs to be included
|
||||
CONFIG_IDF_TARGET="esp32c2"
|
||||
TEST_EXCLUDE_COMPONENTS=app_trace bootloader_support console efuse esp_common esp_eth esp_event esp_hid esp_http_client esp_http_server esp_netif esp_phy esp_ringbuf esp_rom esp_wifi espcoredump hal lwip mbedtls mdns mqtt newlib nvs_flash partition_table protocomm sdmmc spiffs freertos esp_hw_support esp_ipc esp_system esp_timer driver heap pthread soc spi_flash vfs
|
||||
CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT=n # for c2 this config must be disabled for certain tests
|
||||
|
@ -1,3 +1,4 @@
|
||||
# This config is split between targets since different component needs to be included
|
||||
CONFIG_IDF_TARGET="esp32c2"
|
||||
TEST_COMPONENTS=freertos esp_hw_support esp_ipc esp_system esp_timer driver heap pthread soc spi_flash vfs
|
||||
CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT=n # for c2 this config must be disabled for certain tests
|
||||
|
@ -2,3 +2,4 @@ CONFIG_IDF_TARGET="esp32c2"
|
||||
TEST_COMPONENTS=heap
|
||||
CONFIG_HEAP_POISONING_COMPREHENSIVE=n
|
||||
CONFIG_HEAP_POISONING_LIGHT=y
|
||||
CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT=n # for c2 this config must be disabled for certain tests
|
||||
|
@ -3,3 +3,4 @@ TEST_COMPONENTS=freertos esp_hw_support esp_system esp_ipc esp_timer driver heap
|
||||
CONFIG_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y
|
||||
CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y
|
||||
CONFIG_ESP_SYSTEM_PMP_IDRAM_SPLIT=n # for c2 this config must be disabled for certain tests
|
||||
|
Loading…
x
Reference in New Issue
Block a user