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 Private kernel definitions (IA-32) 10 * 11 * This file contains private kernel structures definitions and various 12 * other definitions for the Intel Architecture 32 bit (IA-32) processor 13 * architecture. 14 * The header include/kernel.h contains the public kernel interface 15 * definitions, with include/arch/x86/ia32/arch.h supplying the 16 * IA-32 specific portions of the public kernel interface. 17 * 18 * This file is also included by assembly language files which must #define 19 * _ASMLANGUAGE before including this header file. Note that kernel 20 * assembly source files obtains structure offset values via "absolute symbols" 21 * in the offsets.o module. 22 */ 23 24 /* this file is only meant to be included by kernel_structs.h */ 25 26 #ifndef ZEPHYR_ARCH_X86_INCLUDE_IA32_KERNEL_ARCH_DATA_H_ 27 #define ZEPHYR_ARCH_X86_INCLUDE_IA32_KERNEL_ARCH_DATA_H_ 28 29 #include <zephyr/toolchain.h> 30 #include <zephyr/linker/sections.h> 31 #include <ia32/exception.h> 32 #include <zephyr/sys/util.h> 33 34 #ifndef _ASMLANGUAGE 35 #include <zephyr/kernel.h> 36 #include <zephyr/types.h> 37 #include <zephyr/sys/dlist.h> 38 #endif 39 40 /* Some configurations require that the stack/registers be adjusted before 41 * z_thread_entry. See discussion in swap.S for z_x86_thread_entry_wrapper() 42 */ 43 #if defined(CONFIG_DEBUG_INFO) 44 #define _THREAD_WRAPPER_REQUIRED 45 #endif 46 47 #if defined(CONFIG_LAZY_FPU_SHARING) && defined(CONFIG_X86_SSE) 48 #define _FP_USER_MASK (K_FP_REGS | K_SSE_REGS) 49 #elif defined(CONFIG_LAZY_FPU_SHARING) 50 #define _FP_USER_MASK (K_FP_REGS) 51 #endif 52 53 #ifndef _ASMLANGUAGE 54 55 #include <zephyr/sys/util.h> 56 57 #ifdef __cplusplus 58 extern "C" { 59 #endif 60 61 #ifdef _THREAD_WRAPPER_REQUIRED 62 extern void z_x86_thread_entry_wrapper(k_thread_entry_t entry, 63 void *p1, void *p2, void *p3); 64 #endif /* _THREAD_WRAPPER_REQUIRED */ 65 66 #ifdef CONFIG_THREAD_LOCAL_STORAGE 67 extern void z_x86_tls_update_gdt(struct k_thread *thread); 68 #endif 69 70 #ifdef __cplusplus 71 } 72 #endif 73 74 #endif /* _ASMLANGUAGE */ 75 76 #endif /* ZEPHYR_ARCH_X86_INCLUDE_IA32_KERNEL_ARCH_DATA_H_ */ 77