mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 18:57:19 +02:00
fix(esp_system): fix possible cache_error by another core accessing flash in esp_restart
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2018-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2018-2025 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
*/
|
*/
|
||||||
@ -101,10 +101,6 @@ void IRAM_ATTR esp_restart_noos(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Disable cache
|
|
||||||
Cache_Disable_ICache();
|
|
||||||
Cache_Disable_DCache();
|
|
||||||
|
|
||||||
// Reset and stall the other CPU.
|
// Reset and stall the other CPU.
|
||||||
// CPU must be reset before stalling, in case it was running a s32c1i
|
// CPU must be reset before stalling, in case it was running a s32c1i
|
||||||
// instruction. This would cause memory pool to be locked by arbiter
|
// instruction. This would cause memory pool to be locked by arbiter
|
||||||
@ -116,6 +112,10 @@ void IRAM_ATTR esp_restart_noos(void)
|
|||||||
esp_cpu_stall(other_core_id);
|
esp_cpu_stall(other_core_id);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Disable cache
|
||||||
|
Cache_Disable_ICache();
|
||||||
|
Cache_Disable_DCache();
|
||||||
|
|
||||||
// 2nd stage bootloader reconfigures SPI flash signals.
|
// 2nd stage bootloader reconfigures SPI flash signals.
|
||||||
// Reset them to the defaults expected by ROM.
|
// Reset them to the defaults expected by ROM.
|
||||||
WRITE_PERI_REG(GPIO_FUNC0_IN_SEL_CFG_REG, 0x30);
|
WRITE_PERI_REG(GPIO_FUNC0_IN_SEL_CFG_REG, 0x30);
|
||||||
|
Reference in New Issue
Block a user