MMU: Add configurable mmu page size support on ESP32C2

This commit is contained in:
Cao Sen Miao
2022-06-01 10:14:48 +08:00
parent f173016d86
commit 6589daabb9
37 changed files with 153 additions and 132 deletions

View File

@@ -27,8 +27,8 @@
#define PSRAM_MODE PSRAM_VADDR_MODE_NORMAL
#define MMU_PAGE_SIZE (0x10000)
#define MMU_PAGE_SIZE 0x10000
#define ALIGN_UP_BY(num, align) (((num) + ((align) - 1)) & ~((align) - 1))
#if CONFIG_SPIRAM_SPEED_40M
@@ -222,6 +222,8 @@ static uint32_t rodata_end_page = 0;
#endif
#if CONFIG_SPIRAM_FETCH_INSTRUCTIONS || CONFIG_SPIRAM_RODATA
// Helper macro to make a MMU entry invalid
#define INVALID_PHY_PAGE 0xffff
static uint32_t page0_mapped = 0;
static uint32_t page0_page = INVALID_PHY_PAGE;
#endif