1 /* 2 * Copyright (c) 2010-2014 Wind River Systems, Inc. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 /** 8 * @file 9 * @brief Kernel structure member offset definition file 10 * 11 * This module is responsible for the generation of the absolute symbols whose 12 * value represents the member offsets for various IA-32 structures. 13 * 14 * All of the absolute symbols defined by this module will be present in the 15 * final kernel ELF image (due to the linker's reference to the _OffsetAbsSyms 16 * symbol). 17 * 18 * INTERNAL 19 * It is NOT necessary to define the offset for every member of a structure. 20 * Typically, only those members that are accessed by assembly language routines 21 * are defined; however, it doesn't hurt to define all fields for the sake of 22 * completeness. 23 */ 24 25 /* list of headers that define whose structure offsets will be generated */ 26 27 #ifndef _X86_OFFSETS_INC_ 28 #define _X86_OFFSETS_INC_ 29 30 #include <zephyr/arch/x86/mmustructs.h> 31 32 #if defined(CONFIG_LAZY_FPU_SHARING) 33 GEN_OFFSET_SYM(_thread_arch_t, excNestCount); 34 #endif 35 36 #ifdef CONFIG_USERSPACE 37 GEN_OFFSET_SYM(_thread_arch_t, psp); 38 #ifndef CONFIG_X86_COMMON_PAGE_TABLE 39 GEN_OFFSET_SYM(_thread_arch_t, ptables); 40 #endif 41 #endif 42 43 GEN_OFFSET_SYM(_thread_arch_t, preempFloatReg); 44 45 /** 46 * size of the struct k_thread structure sans save area for floating 47 * point regs 48 */ 49 50 GEN_ABSOLUTE_SYM(_K_THREAD_NO_FLOAT_SIZEOF, 51 sizeof(struct k_thread) - sizeof(tPreempFloatReg)); 52 53 GEN_OFFSET_SYM(_callee_saved_t, esp); 54 55 /* struct arch_esf structure member offsets */ 56 GEN_OFFSET_STRUCT(arch_esf, eflags); 57 #endif /* _X86_OFFSETS_INC_ */ 58