1 /* 2 * Copyright (c) 2019 Carlo Caione <ccaione@baylibre.com> 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ZEPHYR_ARCH_ARM64_INCLUDE_OFFSETS_SHORT_ARCH_H_ 8 #define ZEPHYR_ARCH_ARM64_INCLUDE_OFFSETS_SHORT_ARCH_H_ 9 10 #include <zephyr/offsets.h> 11 12 #define _thread_offset_to_exception_depth \ 13 (___thread_t_arch_OFFSET + ___thread_arch_t_exception_depth_OFFSET) 14 15 #define _thread_offset_to_callee_saved_x19_x20 \ 16 (___thread_t_callee_saved_OFFSET + ___callee_saved_t_x19_x20_OFFSET) 17 #define _thread_offset_to_callee_saved_x21_x22 \ 18 (___thread_t_callee_saved_OFFSET + ___callee_saved_t_x21_x22_OFFSET) 19 #define _thread_offset_to_callee_saved_x23_x24 \ 20 (___thread_t_callee_saved_OFFSET + ___callee_saved_t_x23_x24_OFFSET) 21 #define _thread_offset_to_callee_saved_x25_x26 \ 22 (___thread_t_callee_saved_OFFSET + ___callee_saved_t_x25_x26_OFFSET) 23 #define _thread_offset_to_callee_saved_x27_x28 \ 24 (___thread_t_callee_saved_OFFSET + ___callee_saved_t_x27_x28_OFFSET) 25 #define _thread_offset_to_callee_saved_x29_sp_el0 \ 26 (___thread_t_callee_saved_OFFSET + ___callee_saved_t_x29_sp_el0_OFFSET) 27 #define _thread_offset_to_callee_saved_sp_elx_lr \ 28 (___thread_t_callee_saved_OFFSET + ___callee_saved_t_sp_elx_lr_OFFSET) 29 30 #ifdef CONFIG_ARM64_SAFE_EXCEPTION_STACK 31 #define _cpu_offset_to_safe_exception_stack \ 32 (___cpu_t_arch_OFFSET + ___cpu_arch_t_safe_exception_stack_OFFSET) 33 #define _cpu_offset_to_current_stack_limit \ 34 (___cpu_t_arch_OFFSET + ___cpu_arch_t_current_stack_limit_OFFSET) 35 #define _cpu_offset_to_corrupted_sp \ 36 (___cpu_t_arch_OFFSET + ___cpu_arch_t_corrupted_sp_OFFSET) 37 #define _thread_offset_to_stack_limit \ 38 (___thread_t_arch_OFFSET + ___thread_arch_t_stack_limit_OFFSET) 39 #endif 40 41 #endif /* ZEPHYR_ARCH_ARM64_INCLUDE_OFFSETS_SHORT_ARCH_H_ */ 42