File tree Expand file tree Collapse file tree 2 files changed +20
-16
lines changed
components/esp_hw_support Expand file tree Collapse file tree 2 files changed +20
-16
lines changed Original file line number Diff line number Diff line change 11/*
2- * SPDX-FileCopyrightText: 2010-2022 Espressif Systems (Shanghai) CO LTD
2+ * SPDX-FileCopyrightText: 2010-2025 Espressif Systems (Shanghai) CO LTD
33 *
44 * SPDX-License-Identifier: Apache-2.0
55 */
@@ -29,6 +29,24 @@ bool esp_ptr_dma_ext_capable(const void *p)
2929#endif //CONFIG_SPIRAM
3030}
3131
32+ bool esp_ptr_executable (const void * p )
33+ {
34+ intptr_t ip = (intptr_t ) p ;
35+ return (ip >= SOC_IROM_LOW && ip < SOC_IROM_HIGH )
36+ || (ip >= SOC_IRAM_LOW && ip < SOC_IRAM_HIGH )
37+ || (ip >= SOC_IROM_MASK_LOW && ip < SOC_IROM_MASK_HIGH )
38+ #if SOC_SPIRAM_SUPPORTED && CONFIG_SPIRAM
39+ || esp_ptr_external_ram (p )
40+ #endif
41+ #if defined(SOC_CACHE_APP_LOW ) && defined(CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE )
42+ || (ip >= SOC_CACHE_APP_LOW && ip < SOC_CACHE_APP_HIGH )
43+ #endif
44+ #if SOC_RTC_FAST_MEM_SUPPORTED
45+ || (ip >= SOC_RTC_IRAM_LOW && ip < SOC_RTC_IRAM_HIGH )
46+ #endif
47+ ;
48+ }
49+
3250bool esp_ptr_byte_accessible (const void * p )
3351{
3452 intptr_t ip = (intptr_t ) p ;
Original file line number Diff line number Diff line change @@ -246,21 +246,7 @@ inline static bool esp_ptr_word_aligned(const void *p)
246246 *
247247 * @return true: is executable; false: not executable
248248 */
249- __attribute__((always_inline ))
250- inline static bool esp_ptr_executable (const void * p )
251- {
252- intptr_t ip = (intptr_t ) p ;
253- return (ip >= SOC_IROM_LOW && ip < SOC_IROM_HIGH )
254- || (ip >= SOC_IRAM_LOW && ip < SOC_IRAM_HIGH )
255- || (ip >= SOC_IROM_MASK_LOW && ip < SOC_IROM_MASK_HIGH )
256- #if defined(SOC_CACHE_APP_LOW ) && defined(CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE )
257- || (ip >= SOC_CACHE_APP_LOW && ip < SOC_CACHE_APP_HIGH )
258- #endif
259- #if SOC_RTC_FAST_MEM_SUPPORTED
260- || (ip >= SOC_RTC_IRAM_LOW && ip < SOC_RTC_IRAM_HIGH )
261- #endif
262- ;
263- }
249+ bool esp_ptr_executable (const void * p );
264250
265251/**
266252 * @brief Check if the pointer is byte accessible
You can’t perform that action at this time.
0 commit comments