1 #ifndef _ASM_X86_TRAMPOLINE_H
2 #define _ASM_X86_TRAMPOLINE_H
6 #include <linux/types.h>
10 * Trampoline 80x86 program as an array. These are in the init rodata
11 * segment, but that's okay, because we only care about the relative
12 * addresses of the symbols.
14 extern const unsigned char x86_trampoline_start
[];
15 extern const unsigned char x86_trampoline_end
[];
16 extern unsigned char *x86_trampoline_base
;
18 extern unsigned long init_rsp
;
19 extern unsigned long initial_code
;
20 extern unsigned long initial_gs
;
22 extern void __init
setup_trampolines(void);
24 extern const unsigned char trampoline_data
[];
25 extern const unsigned char trampoline_status
[];
27 #define TRAMPOLINE_SYM(x) \
28 ((void *)(x86_trampoline_base + \
29 ((const unsigned char *)(x) - x86_trampoline_start)))
31 /* Address of the SMP trampoline */
32 static inline unsigned long trampoline_address(void)
34 return virt_to_phys(TRAMPOLINE_SYM(trampoline_data
));
37 #endif /* __ASSEMBLY__ */
39 #endif /* _ASM_X86_TRAMPOLINE_H */