diff --git a/components/hal/esp32c61/include/hal/mmu_ll.h b/components/hal/esp32c61/include/hal/mmu_ll.h index 44aac374f6..105c8485e8 100644 --- a/components/hal/esp32c61/include/hal/mmu_ll.h +++ b/components/hal/esp32c61/include/hal/mmu_ll.h @@ -302,7 +302,8 @@ static inline bool mmu_ll_check_entry_valid(uint32_t mmu_id, uint32_t entry_id) static inline mmu_target_t mmu_ll_get_entry_target(uint32_t mmu_id, uint32_t entry_id) { (void)mmu_id; - return MMU_TARGET_FLASH0; + mmu_target_t target = ((REG_READ(SPI_MEM_MMU_ITEM_CONTENT_REG(0)) & SOC_MMU_ACCESS_SPIRAM) == 0) ? MMU_TARGET_FLASH0 : MMU_TARGET_PSRAM0; + return target; } /** diff --git a/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in index 019cf85284..44fba65f96 100644 --- a/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c61/include/soc/Kconfig.soc_caps.in @@ -243,6 +243,10 @@ config SOC_MMU_PAGE_SIZE_CONFIGURABLE bool default y +config SOC_MMU_PAGE_SIZE_8KB_SUPPORTED + bool + default y + config SOC_MMU_PERIPH_NUM int default 1 diff --git a/components/soc/esp32c61/include/soc/soc_caps.h b/components/soc/esp32c61/include/soc/soc_caps.h index 977594e2a7..99fbb8f7b2 100644 --- a/components/soc/esp32c61/include/soc/soc_caps.h +++ b/components/soc/esp32c61/include/soc/soc_caps.h @@ -278,6 +278,7 @@ /*-------------------------- MMU CAPS ----------------------------------------*/ #define SOC_MMU_PAGE_SIZE_CONFIGURABLE (1) +#define SOC_MMU_PAGE_SIZE_8KB_SUPPORTED (1) #define SOC_MMU_PERIPH_NUM (1U) #define SOC_MMU_LINEAR_ADDRESS_REGION_NUM (1U) #define SOC_MMU_DI_VADDR_SHARED (1) /*!< D/I vaddr are shared */