Skip to content

Commit 1b22d58

Browse files
committed
Merge branch 'feat/h4_mmu' into 'master'
mmu: h4 support Closes IDF-12305 See merge request espressif/esp-idf!40565
2 parents 4065fb2 + 67ce058 commit 1b22d58

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

components/hal/esp32h4/include/hal/mmu_ll.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ static inline bool mmu_ll_check_entry_valid(uint32_t mmu_id, uint32_t entry_id)
304304
static inline mmu_target_t mmu_ll_get_entry_target(uint32_t mmu_id, uint32_t entry_id)
305305
{
306306
(void)mmu_id;
307-
return MMU_TARGET_FLASH0;
307+
mmu_target_t target = ((REG_READ(SPI_MEM_MMU_ITEM_CONTENT_REG(0)) & SOC_MMU_ACCESS_SPIRAM) == 0) ? MMU_TARGET_FLASH0 : MMU_TARGET_PSRAM0;
308+
return target;
309+
308310
}
309311

310312
/**

components/soc/esp32h4/include/soc/Kconfig.soc_caps.in

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,14 @@ config SOC_LEDC_CHANNEL_NUM
463463
int
464464
default 6
465465

466+
config SOC_MMU_PAGE_SIZE_CONFIGURABLE
467+
bool
468+
default y
469+
470+
config SOC_MMU_PAGE_SIZE_8KB_SUPPORTED
471+
bool
472+
default y
473+
466474
config SOC_MMU_PERIPH_NUM
467475
int
468476
default 1

components/soc/esp32h4/include/soc/soc_caps.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@
306306
// #define SOC_LEDC_FADE_PARAMS_BIT_WIDTH (10)
307307

308308
/*-------------------------- MMU CAPS ----------------------------------------*/
309-
// #define SOC_MMU_PAGE_SIZE_CONFIGURABLE (1)
309+
#define SOC_MMU_PAGE_SIZE_CONFIGURABLE (1)
310+
#define SOC_MMU_PAGE_SIZE_8KB_SUPPORTED (1)
310311
#define SOC_MMU_PERIPH_NUM (1U)
311312
#define SOC_MMU_LINEAR_ADDRESS_REGION_NUM (1U)
312313
#define SOC_MMU_DI_VADDR_SHARED (1) /*!< D/I vaddr are shared */

0 commit comments

Comments
 (0)