Prior to this commit, esp_psram/include/esp_private/mmu.h contains some
APIs that is used for:
- copy flash content to psram
- necessary sync APIs used by flash_mmap.c, due to above feature
This commit rename it to mmu_psram_flash.h, therefore mmu.h can be used
for real mmu related APIs.
This commit also moves above mention funcitons in `mmu.c` and
`mmu_psram.c` to `mmu_psram_flash.c`, leaving `mmu.c` to be used for
real mmu driver.
After this commit, when physical address is larger than vaddr range,
driver will still map as much as it can, but also give a verbose level
log to show the actual mapped size
SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY was always enabled on S2 and S3, but this option is not
compatible with ESP_COREDUMP_ENABLE_TO_FLASH. Make it configurable to allow users to deactive
it so that ESP_COREDUMP_ENABLE_TO_FLASH can be used.
As heap block may be allocated into multiple non-contiguous chunks, to
reserve enough memory for dma/internal usage, we do the malloc in the
step of max available block.
On ESP32 we use this way, this commit follows this way, on ESP32S2 and
ESP32S3