mirror of
https://github.com/espressif/esp-idf.git
synced 2026-05-28 16:46:31 +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
@@ -22,6 +22,7 @@
|
||||
#include "soc/chip_revision.h"
|
||||
#include "hal/efuse_hal.h"
|
||||
#include "hal/gpio_hal.h"
|
||||
#include "hal/mmu_hal.h"
|
||||
#include "flash_qio_mode.h"
|
||||
#include "bootloader_common.h"
|
||||
#include "bootloader_flash_config.h"
|
||||
@@ -453,6 +454,14 @@ void bootloader_flash_hardware_init(void)
|
||||
Cache_Flush(1);
|
||||
#endif
|
||||
mmu_init(0);
|
||||
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);
|
||||
#if !CONFIG_FREERTOS_UNICORE
|
||||
/* The lines which manipulate DPORT_APP_CACHE_MMU_IA_CLR bit are
|
||||
necessary to work around a hardware bug. */
|
||||
|
||||
@@ -307,10 +307,9 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(0, false);
|
||||
|
||||
//init cache hal
|
||||
cache_hal_init();
|
||||
//init mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
|
||||
// update flash ID
|
||||
bootloader_flash_update_id();
|
||||
|
||||
|
||||
@@ -315,10 +315,9 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(esp_rom_efuse_get_flash_gpio_info(), false);
|
||||
|
||||
//init cache hal
|
||||
cache_hal_init();
|
||||
//init mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
|
||||
// update flash ID
|
||||
bootloader_flash_update_id();
|
||||
// Check and run XMC startup flow
|
||||
|
||||
@@ -292,10 +292,9 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(0, false);
|
||||
|
||||
//init cache hal
|
||||
cache_hal_init();
|
||||
//init mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
|
||||
// update flash ID
|
||||
bootloader_flash_update_id();
|
||||
// Check and run XMC startup flow
|
||||
|
||||
@@ -275,10 +275,9 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(0, false);
|
||||
|
||||
//init cache hal
|
||||
cache_hal_init();
|
||||
//init mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
|
||||
// update flash ID
|
||||
bootloader_flash_update_id();
|
||||
// Check and run XMC startup flow
|
||||
|
||||
@@ -281,10 +281,9 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(0, false);
|
||||
|
||||
//init cache hal
|
||||
cache_hal_init();
|
||||
//init mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
|
||||
// update flash ID
|
||||
bootloader_flash_update_id();
|
||||
// Check and run XMC startup flow
|
||||
|
||||
@@ -278,10 +278,9 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(0, false);
|
||||
|
||||
//init cache hal
|
||||
cache_hal_init();
|
||||
//init mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
|
||||
// update flash ID
|
||||
bootloader_flash_update_id();
|
||||
// Check and run XMC startup flow
|
||||
|
||||
@@ -266,10 +266,9 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(0, false);
|
||||
|
||||
//init cache hal
|
||||
cache_hal_init();
|
||||
//init mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
|
||||
// update flash ID
|
||||
bootloader_flash_update_id();
|
||||
// Check and run XMC startup flow
|
||||
|
||||
@@ -276,12 +276,11 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(0, false);
|
||||
|
||||
//init cache hal
|
||||
cache_hal_init();
|
||||
//init mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
// update flash ID
|
||||
bootloader_flash_update_id();
|
||||
|
||||
// Check and run XMC startup flow
|
||||
esp_err_t ret = bootloader_flash_xmc_startup();
|
||||
assert(ret == ESP_OK);
|
||||
|
||||
@@ -286,12 +286,11 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(0, false);
|
||||
|
||||
//init cache hal
|
||||
cache_hal_init();
|
||||
//reset mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
// update flash ID
|
||||
bootloader_flash_update_id();
|
||||
|
||||
// Check and run XMC startup flow
|
||||
esp_err_t ret = bootloader_flash_xmc_startup();
|
||||
assert(ret == ESP_OK);
|
||||
|
||||
@@ -313,10 +313,9 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(esp_rom_efuse_get_flash_gpio_info(), false);
|
||||
|
||||
// init cache hal
|
||||
cache_hal_init();
|
||||
//init mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
|
||||
// Workaround: normal ROM bootloader exits with DROM0 cache unmasked, but 2nd bootloader exits with it masked.
|
||||
REG_CLR_BIT(EXTMEM_PRO_ICACHE_CTRL1_REG, EXTMEM_PRO_ICACHE_MASK_DROM0);
|
||||
// update flash ID
|
||||
|
||||
@@ -340,10 +340,9 @@ void bootloader_flash_hardware_init(void)
|
||||
{
|
||||
esp_rom_spiflash_attach(esp_rom_efuse_get_flash_gpio_info(), false);
|
||||
|
||||
//init cache hal
|
||||
cache_hal_init();
|
||||
//init mmu
|
||||
mmu_hal_init();
|
||||
// init cache and mmu
|
||||
bootloader_init_ext_mem();
|
||||
|
||||
// update flash ID
|
||||
bootloader_flash_update_id();
|
||||
// Check and run XMC startup flow
|
||||
|
||||
Reference in New Issue
Block a user