1 /* asm.h - x86 tool dependent headers */ 2 3 /* 4 * Copyright (c) 2007-2014 Wind River Systems, Inc. 5 * 6 * SPDX-License-Identifier: Apache-2.0 7 */ 8 9 #ifndef ZEPHYR_INCLUDE_ARCH_X86_IA32_ASM_H_ 10 #define ZEPHYR_INCLUDE_ARCH_X86_IA32_ASM_H_ 11 12 #include <zephyr/toolchain.h> 13 #include <zephyr/linker/sections.h> 14 15 #if defined(_ASMLANGUAGE) 16 17 #ifdef CONFIG_X86_KPTI 18 GTEXT(z_x86_trampoline_to_user) 19 GTEXT(z_x86_trampoline_to_kernel) 20 21 #define KPTI_IRET jmp z_x86_trampoline_to_user 22 #define KPTI_IRET_USER jmp z_x86_trampoline_to_user_always 23 #else 24 #define KPTI_IRET iret 25 #define KPTI_IRET_USER iret 26 #endif /* CONFIG_X86_KPTI */ 27 28 #endif /* _ASMLANGUAGE */ 29 30 #endif /* ZEPHYR_INCLUDE_ARCH_X86_IA32_ASM_H_ */ 31