1 /* Copyright (c) 2022, 2023 Intel Corporation 2 * SPDX-License-Identifier: Apache-2.0 3 */ 4 5 6 #ifndef ZEPHYR_SOC_XTENSA_DC233C_BACKTRACE_HELPERS_H_ 7 #define ZEPHYR_SOC_XTENSA_DC233C_BACKTRACE_HELPERS_H_ 8 9 #include <zephyr/linker/linker-defs.h> 10 11 #include <xtensa/config/core-isa.h> 12 xtensa_dc233c_ptr_executable(const void * p)13static inline bool xtensa_dc233c_ptr_executable(const void *p) 14 { 15 bool in_text = ((p >= (void *)__text_region_start) && 16 (p <= (void *)__text_region_end)); 17 bool in_vecbase = ((p >= (void *)XCHAL_VECBASE_RESET_VADDR) && 18 (p < (void *)CONFIG_SRAM_OFFSET)); 19 20 return (in_text || in_vecbase); 21 } 22 23 #endif /* ZEPHYR_SOC_XTENSA_DC233C_BACKTRACE_HELPERS_H_ */ 24