mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-30 02:37:19 +02:00
Merge branch 'fix/tcm-mem-not-considered-in-esp_ptr_eexecutable' into 'master'
fix(memory-utils): Check TCM in esp_ptr_internal and esp_ptr_byte_accessible Closes IDFGH-15339 and IDFGH-15337 See merge request espressif/esp-idf!39388
This commit is contained in:
@ -52,6 +52,9 @@ bool esp_ptr_byte_accessible(const void *p)
|
||||
intptr_t ip = (intptr_t) p;
|
||||
bool r;
|
||||
r = (ip >= SOC_BYTE_ACCESSIBLE_LOW && ip < SOC_BYTE_ACCESSIBLE_HIGH);
|
||||
#if SOC_MEM_TCM_SUPPORTED
|
||||
r |= esp_ptr_in_tcm(p);
|
||||
#endif
|
||||
#if CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP
|
||||
/* For ESP32 case, RTC fast memory is accessible to PRO cpu only and hence
|
||||
* for single core configuration (where it gets added to system heap) following
|
||||
|
@ -278,6 +278,10 @@ inline static bool esp_ptr_internal(const void *p) {
|
||||
bool r;
|
||||
r = ((intptr_t)p >= SOC_MEM_INTERNAL_LOW && (intptr_t)p < SOC_MEM_INTERNAL_HIGH);
|
||||
|
||||
#if SOC_MEM_TCM_SUPPORTED
|
||||
r |= esp_ptr_in_tcm(p);
|
||||
#endif
|
||||
|
||||
#if SOC_RTC_SLOW_MEM_SUPPORTED
|
||||
r |= ((intptr_t)p >= SOC_RTC_DATA_LOW && (intptr_t)p < SOC_RTC_DATA_HIGH);
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user