2019-11-10 17:17:19 +01:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2013-2014 Wind River Systems, Inc.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* @brief ARM kernel structure member offset definition file
|
|
|
|
*
|
|
|
|
* This module is responsible for the generation of the absolute symbols whose
|
|
|
|
* value represents the member offsets for various ARM kernel structures.
|
|
|
|
*
|
|
|
|
* All of the absolute symbols defined by this module will be present in the
|
|
|
|
* final kernel ELF image (due to the linker's reference to the _OffsetAbsSyms
|
|
|
|
* symbol).
|
|
|
|
*
|
|
|
|
* INTERNAL
|
|
|
|
* It is NOT necessary to define the offset for every member of a structure.
|
|
|
|
* Typically, only those members that are accessed by assembly language routines
|
|
|
|
* are defined; however, it doesn't hurt to define all fields for the sake of
|
|
|
|
* completeness.
|
|
|
|
*/
|
|
|
|
|
2020-07-21 23:00:14 +02:00
|
|
|
#ifndef _ARM_OFFSETS_INC_
|
|
|
|
#define _ARM_OFFSETS_INC_
|
|
|
|
|
2022-05-06 10:49:15 +02:00
|
|
|
#include <zephyr/kernel.h>
|
2019-11-10 17:17:19 +01:00
|
|
|
#include <kernel_arch_data.h>
|
|
|
|
#include <kernel_offsets.h>
|
|
|
|
|
|
|
|
GEN_OFFSET_SYM(_thread_arch_t, basepri);
|
|
|
|
GEN_OFFSET_SYM(_thread_arch_t, swap_return_value);
|
|
|
|
|
2023-07-18 07:22:52 +02:00
|
|
|
#if defined(CONFIG_CPU_AARCH32_CORTEX_A) || defined(CONFIG_CPU_AARCH32_CORTEX_R)
|
|
|
|
GEN_OFFSET_SYM(_thread_arch_t, exception_depth);
|
|
|
|
GEN_OFFSET_SYM(_cpu_arch_t, exc_depth);
|
|
|
|
#endif
|
|
|
|
|
2022-04-06 22:45:53 +02:00
|
|
|
#if defined(CONFIG_ARM_STORE_EXC_RETURN) || defined(CONFIG_USERSPACE)
|
2019-11-10 17:17:19 +01:00
|
|
|
GEN_OFFSET_SYM(_thread_arch_t, mode);
|
2020-06-24 14:31:33 +02:00
|
|
|
#endif
|
|
|
|
#if defined(CONFIG_ARM_STORE_EXC_RETURN)
|
|
|
|
GEN_OFFSET_SYM(_thread_arch_t, mode_exc_return);
|
|
|
|
#endif
|
2019-11-10 17:17:19 +01:00
|
|
|
#if defined(CONFIG_USERSPACE)
|
|
|
|
GEN_OFFSET_SYM(_thread_arch_t, priv_stack_start);
|
2021-10-30 01:24:17 +02:00
|
|
|
#if defined(CONFIG_CPU_AARCH32_CORTEX_R)
|
2021-05-23 23:23:26 +02:00
|
|
|
GEN_OFFSET_SYM(_thread_arch_t, priv_stack_end);
|
|
|
|
GEN_OFFSET_SYM(_thread_arch_t, sp_usr);
|
|
|
|
#endif
|
2019-11-10 17:17:19 +01:00
|
|
|
#endif
|
|
|
|
|
2020-05-03 11:03:19 +02:00
|
|
|
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
|
2019-11-10 17:17:19 +01:00
|
|
|
GEN_OFFSET_SYM(_thread_arch_t, preempt_float);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
GEN_OFFSET_SYM(_basic_sf_t, pc);
|
|
|
|
GEN_OFFSET_SYM(_basic_sf_t, xpsr);
|
|
|
|
|
2020-05-03 11:03:19 +02:00
|
|
|
#if defined(CONFIG_FPU) && defined(CONFIG_FPU_SHARING)
|
2022-04-05 15:11:57 +02:00
|
|
|
GEN_OFFSET_SYM(_fpu_sf_t, fpscr);
|
|
|
|
|
|
|
|
GEN_ABSOLUTE_SYM(___fpu_t_SIZEOF, sizeof(_fpu_sf_t));
|
2019-11-10 17:17:19 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
GEN_ABSOLUTE_SYM(___esf_t_SIZEOF, sizeof(_esf_t));
|
|
|
|
|
|
|
|
/* size of the entire preempt registers structure */
|
|
|
|
|
|
|
|
GEN_ABSOLUTE_SYM(___callee_saved_t_SIZEOF, sizeof(struct _callee_saved));
|
|
|
|
|
2021-03-28 06:39:49 +02:00
|
|
|
#if defined(CONFIG_EXTRA_EXCEPTION_INFO)
|
|
|
|
GEN_ABSOLUTE_SYM(___extra_esf_info_t_SIZEOF, sizeof(struct __extra_esf_info));
|
|
|
|
#endif
|
|
|
|
|
2020-02-12 10:42:20 +01:00
|
|
|
#if defined(CONFIG_THREAD_STACK_INFO)
|
|
|
|
GEN_OFFSET_SYM(_thread_stack_info_t, start);
|
2019-11-10 17:17:19 +01:00
|
|
|
#endif
|
2020-07-21 23:00:14 +02:00
|
|
|
|
2022-05-04 14:26:24 +02:00
|
|
|
/*
|
|
|
|
* CPU context for S2RAM
|
|
|
|
*/
|
|
|
|
#if defined(CONFIG_PM_S2RAM)
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, msp);
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, msplim);
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, psp);
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, psplim);
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, apsr);
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, ipsr);
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, epsr);
|
|
|
|
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, primask);
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, faultmask);
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, basepri);
|
|
|
|
GEN_OFFSET_SYM(_cpu_context_t, control);
|
|
|
|
#endif /* CONFIG_PM_S2RAM */
|
|
|
|
|
2020-07-21 23:00:14 +02:00
|
|
|
#endif /* _ARM_OFFSETS_INC_ */
|