zephyr/soc/cdns/dc233c/include/backtrace_helpers.h
Daniel Leung c44c922198 soc: xtensa/dc233c: remove xtensa_dc233c_stack_ptr_is_sane
The generic stack pointer checker in the architecture code is
enough so we can remove the platform specific one. Besides,
xtensa_dc233c_stack_ptr_is_sane() does not do much checking
either.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-06-21 09:59:36 +02:00

23 lines
636 B
C

/* Copyright (c) 2022, 2023 Intel Corporation
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_SOC_XTENSA_DC233C_BACKTRACE_HELPERS_H_
#define ZEPHYR_SOC_XTENSA_DC233C_BACKTRACE_HELPERS_H_
#include <zephyr/linker/linker-defs.h>
#include <xtensa/config/core-isa.h>
static inline bool xtensa_dc233c_ptr_executable(const void *p)
{
bool in_text = ((p >= (void *)__text_region_start) &&
(p <= (void *)__text_region_end));
bool in_vecbase = ((p >= (void *)XCHAL_VECBASE_RESET_VADDR) &&
(p < (void *)CONFIG_SRAM_OFFSET));
return (in_text || in_vecbase);
}
#endif /* ZEPHYR_SOC_XTENSA_DC233C_BACKTRACE_HELPERS_H_ */