change(cache): no use sdkconfig in cache/mmu hal

This commit is contained in:
armando
2025-09-16 15:12:04 +08:00
committed by Armando (Dou Yiwen)
parent 4c8833b6b6
commit 8ebce9b805
33 changed files with 219 additions and 146 deletions

View File

@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2019-2024 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -27,6 +27,7 @@
#include "soc/rtc.h"
#include "soc/spi_periph.h"
#include "hal/gpio_hal.h"
#include "hal/mmu_hal.h"
#include "xtensa/config/core.h"
#include "xt_instr_macros.h"
@@ -60,6 +61,15 @@ static void bootloader_reset_mmu(void)
DPORT_REG_CLR_BIT(DPORT_APP_CACHE_CTRL1_REG, DPORT_APP_CACHE_MMU_IA_CLR);
#endif
mmu_hal_config_t mmu_config = {
#if CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE
.core_nums = 1,
#else
.core_nums = SOC_CPU_CORES_NUM,
#endif
};
mmu_hal_ctx_init(&mmu_config);
/* normal ROM boot exits with DROM0 cache unmasked,
but serial bootloader exits with it masked. */
DPORT_REG_CLR_BIT(DPORT_PRO_CACHE_CTRL1_REG, DPORT_PRO_CACHE_MASK_DROM0);