mirror of
https://github.com/espressif/esp-idf.git
synced 2026-08-18 06:35:35 +03:00
change(cache): no use sdkconfig in cache/mmu hal
This commit is contained in:
committed by
Armando (Dou Yiwen)
parent
4c8833b6b6
commit
8ebce9b805
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user