From f7f0dcaeb74942ff2db3786827f8ce5495c20100 Mon Sep 17 00:00:00 2001 From: wuzhenghui Date: Thu, 7 May 2026 20:58:55 +0800 Subject: [PATCH] fix(esp_hw_support): fix core1 branch predictor access ext mem after cache disabled by core0 --- .../lowpower/cpu_retention/port/esp32p4/sleep_cpu.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/esp_hw_support/lowpower/cpu_retention/port/esp32p4/sleep_cpu.c b/components/esp_hw_support/lowpower/cpu_retention/port/esp32p4/sleep_cpu.c index 9db06e13294..6046b67f748 100644 --- a/components/esp_hw_support/lowpower/cpu_retention/port/esp32p4/sleep_cpu.c +++ b/components/esp_hw_support/lowpower/cpu_retention/port/esp32p4/sleep_cpu.c @@ -509,6 +509,7 @@ esp_err_t sleep_cpu_configure(bool light_sleep_enable) #if ESP_SLEEP_POWER_DOWN_CPU static TCM_IRAM_ATTR void smp_core_do_retention(void) { + esp_cpu_branch_prediction_disable(); uint8_t core_id = esp_cpu_get_core_id(); if (core_id == 0) { @@ -573,6 +574,7 @@ static TCM_IRAM_ATTR void smp_core_do_retention(void) ; } atomic_store(&s_smp_retention_state[core_id], SMP_IDLE); + esp_cpu_branch_prediction_enable(); }