From fea593ab4bd095247675adc73fe0b9ba08cf7f05 Mon Sep 17 00:00:00 2001 From: Guillaume Souchere Date: Thu, 13 Feb 2025 08:21:44 +0100 Subject: [PATCH] fix(esp_hw_support): esp_ptr_in_rtc_iram_fast check to return false esp_ptr_in_rtc_iram_fast logic shoul dbe executed if SOC_RTC_FAST_MEM_SUPPORTED is set but it should also be executed if IRAM and DRAM region mapping is the same. Remove the SOC_RTC_IRAM_LOW != SOC_RTC_DRAM_LOW part of the check. --- components/bootloader_support/include/bootloader_memory_utils.h | 2 +- components/esp_hw_support/include/esp_memory_utils.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/bootloader_support/include/bootloader_memory_utils.h b/components/bootloader_support/include/bootloader_memory_utils.h index 571f56826e..62769cfe7d 100644 --- a/components/bootloader_support/include/bootloader_memory_utils.h +++ b/components/bootloader_support/include/bootloader_memory_utils.h @@ -102,7 +102,7 @@ inline static bool esp_ptr_in_diram_iram(const void *p) { */ __attribute__((always_inline)) inline static bool esp_ptr_in_rtc_iram_fast(const void *p) { -#if SOC_RTC_FAST_MEM_SUPPORTED && (SOC_RTC_IRAM_LOW != SOC_RTC_DRAM_LOW) +#if SOC_RTC_FAST_MEM_SUPPORTED return ((intptr_t)p >= SOC_RTC_IRAM_LOW && (intptr_t)p < SOC_RTC_IRAM_HIGH); #else (void)p; diff --git a/components/esp_hw_support/include/esp_memory_utils.h b/components/esp_hw_support/include/esp_memory_utils.h index e241cf3284..bd3fff86b9 100644 --- a/components/esp_hw_support/include/esp_memory_utils.h +++ b/components/esp_hw_support/include/esp_memory_utils.h @@ -102,7 +102,7 @@ inline static bool esp_ptr_in_diram_iram(const void *p) { */ __attribute__((always_inline)) inline static bool esp_ptr_in_rtc_iram_fast(const void *p) { -#if SOC_RTC_FAST_MEM_SUPPORTED && (SOC_RTC_IRAM_LOW != SOC_RTC_DRAM_LOW) +#if SOC_RTC_FAST_MEM_SUPPORTED return ((intptr_t)p >= SOC_RTC_IRAM_LOW && (intptr_t)p < SOC_RTC_IRAM_HIGH); #else (void)p;