blob: 780ba0ab94f908da84b44d71f1740d47ac2677de [file] [log] [blame]
H. Peter Anvin1965aae2008-10-22 22:26:29 -07001#ifndef _ASM_X86_TRAMPOLINE_H
2#define _ASM_X86_TRAMPOLINE_H
Pavel Macheke44b7b72008-04-10 23:28:10 +02003
4#ifndef __ASSEMBLY__
5
Rafael J. Wysocki3e1e9002008-12-08 00:50:22 +01006#ifdef CONFIG_X86_TRAMPOLINE
Pavel Macheke44b7b72008-04-10 23:28:10 +02007/*
8 * Trampoline 80x86 program as an array.
9 */
10extern const unsigned char trampoline_data [];
11extern const unsigned char trampoline_end [];
12extern unsigned char *trampoline_base;
13
14extern unsigned long init_rsp;
15extern unsigned long initial_code;
16
Rafael J. Wysocki3e1e9002008-12-08 00:50:22 +010017#define TRAMPOLINE_SIZE roundup(trampoline_end - trampoline_data, PAGE_SIZE)
Pavel Macheke44b7b72008-04-10 23:28:10 +020018#define TRAMPOLINE_BASE 0x6000
Rafael J. Wysocki3e1e9002008-12-08 00:50:22 +010019
Pavel Macheke44b7b72008-04-10 23:28:10 +020020extern unsigned long setup_trampoline(void);
Rafael J. Wysocki3e1e9002008-12-08 00:50:22 +010021extern void __init reserve_trampoline_memory(void);
22#else
23static inline void reserve_trampoline_memory(void) {};
24#endif /* CONFIG_X86_TRAMPOLINE */
Pavel Macheke44b7b72008-04-10 23:28:10 +020025
26#endif /* __ASSEMBLY__ */
27
H. Peter Anvin1965aae2008-10-22 22:26:29 -070028#endif /* _ASM_X86_TRAMPOLINE_H */