fix(esp_hw_support): reset stale PMP gap entries on P4 v3 before app memprot setup

This commit is contained in:
harshal.patil
2026-04-28 18:12:11 +05:30
parent 03af8a9f0e
commit ca480e0199

View File

@@ -153,6 +153,17 @@ static void esp_cpu_configure_region_protection_rev_v3(void)
const uint32_t page_aligned_irom_resv_end = ALIGN_UP_TO_MMU_PAGE_SIZE((uint32_t)(&_instruction_reserved_end));
__attribute__((unused)) const uint32_t page_aligned_drom_resv_end = ALIGN_UP_TO_MMU_PAGE_SIZE((uint32_t)(&_rodata_reserved_end));
PMP_ENTRY_CFG_RESET(11);
PMP_ENTRY_CFG_RESET(12);
PMP_ENTRY_CFG_RESET(13);
PMP_ENTRY_CFG_RESET(14);
PMP_ENTRY_CFG_RESET(15);
PMP_ENTRY_CFG_RESET(16);
PMP_ENTRY_CFG_RESET(17);
PMP_ENTRY_CFG_RESET(18);
PMP_ENTRY_CFG_RESET(19);
PMP_ENTRY_CFG_RESET(23);
// 6. I_EXTRAM / D_EXTRAM (SPIRAM)
#if CONFIG_SPIRAM && CONFIG_SPIRAM_PRE_CONFIGURE_MEMORY_PROTECTION