2023-07-27 03:10:50 -04:00
|
|
|
/*
|
|
|
|
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include "sdkconfig.h"
|
|
|
|
#include "soc/ext_mem_defs.h"
|
|
|
|
#include "../ext_mem_layout.h"
|
|
|
|
#include "hal/mmu_types.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The start addresses in this list should always be sorted from low to high, as MMU driver will need to
|
|
|
|
* coalesce adjacent regions
|
|
|
|
*/
|
|
|
|
const mmu_mem_region_t g_mmu_mem_regions[SOC_MMU_LINEAR_ADDRESS_REGION_NUM] = {
|
|
|
|
[0] = {
|
|
|
|
.start = SOC_MMU_FLASH_LINEAR_ADDRESS_LOW,
|
|
|
|
.end = SOC_MMU_FLASH_LINEAR_ADDRESS_HIGH,
|
2023-08-31 00:28:04 -04:00
|
|
|
.size = SOC_BUS_SIZE(SOC_MMU_FLASH_LINEAR),
|
2023-07-27 03:10:50 -04:00
|
|
|
.bus_id = CACHE_BUS_IBUS0 | CACHE_BUS_DBUS0,
|
|
|
|
.targets = MMU_TARGET_FLASH0,
|
2023-08-14 01:58:35 -04:00
|
|
|
.caps = MMU_MEM_CAP_EXEC | MMU_MEM_CAP_READ | MMU_MEM_CAP_WRITE | MMU_MEM_CAP_32BIT | MMU_MEM_CAP_8BIT,
|
2023-07-27 03:10:50 -04:00
|
|
|
},
|
|
|
|
[1] = {
|
|
|
|
.start = SOC_MMU_PSRAM_LINEAR_ADDRESS_LOW,
|
|
|
|
.end = SOC_MMU_PSRAM_LINEAR_ADDRESS_HIGH,
|
2023-08-31 00:28:04 -04:00
|
|
|
.size = SOC_BUS_SIZE(SOC_MMU_PSRAM_LINEAR),
|
2023-07-27 03:10:50 -04:00
|
|
|
.bus_id = CACHE_BUS_IBUS1 | CACHE_BUS_DBUS1,
|
|
|
|
.targets = MMU_TARGET_PSRAM0,
|
2023-08-14 01:58:35 -04:00
|
|
|
.caps = MMU_MEM_CAP_EXEC | MMU_MEM_CAP_READ | MMU_MEM_CAP_WRITE | MMU_MEM_CAP_32BIT | MMU_MEM_CAP_8BIT,
|
2023-07-27 03:10:50 -04:00
|
|
|
},
|
|
|
|
};
|