H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 1 | #ifndef _ASM_X86_TRAMPOLINE_H |
| 2 | #define _ASM_X86_TRAMPOLINE_H |
Pavel Machek | e44b7b7 | 2008-04-10 23:28:10 +0200 | [diff] [blame] | 3 | |
| 4 | #ifndef __ASSEMBLY__ |
| 5 | |
Rafael J. Wysocki | 3e1e900 | 2008-12-08 00:50:22 +0100 | [diff] [blame] | 6 | #ifdef CONFIG_X86_TRAMPOLINE |
Pavel Machek | e44b7b7 | 2008-04-10 23:28:10 +0200 | [diff] [blame] | 7 | /* |
| 8 | * Trampoline 80x86 program as an array. |
| 9 | */ |
| 10 | extern const unsigned char trampoline_data []; |
| 11 | extern const unsigned char trampoline_end []; |
| 12 | extern unsigned char *trampoline_base; |
| 13 | |
| 14 | extern unsigned long init_rsp; |
| 15 | extern unsigned long initial_code; |
Tejun Heo | f32ff53 | 2009-01-13 20:41:35 +0900 | [diff] [blame] | 16 | extern unsigned long initial_gs; |
Pavel Machek | e44b7b7 | 2008-04-10 23:28:10 +0200 | [diff] [blame] | 17 | |
Rafael J. Wysocki | 3e1e900 | 2008-12-08 00:50:22 +0100 | [diff] [blame] | 18 | #define TRAMPOLINE_SIZE roundup(trampoline_end - trampoline_data, PAGE_SIZE) |
Pavel Machek | e44b7b7 | 2008-04-10 23:28:10 +0200 | [diff] [blame] | 19 | #define TRAMPOLINE_BASE 0x6000 |
Rafael J. Wysocki | 3e1e900 | 2008-12-08 00:50:22 +0100 | [diff] [blame] | 20 | |
Pavel Machek | e44b7b7 | 2008-04-10 23:28:10 +0200 | [diff] [blame] | 21 | extern unsigned long setup_trampoline(void); |
Rafael J. Wysocki | 3e1e900 | 2008-12-08 00:50:22 +0100 | [diff] [blame] | 22 | extern void __init reserve_trampoline_memory(void); |
| 23 | #else |
| 24 | static inline void reserve_trampoline_memory(void) {}; |
| 25 | #endif /* CONFIG_X86_TRAMPOLINE */ |
Pavel Machek | e44b7b7 | 2008-04-10 23:28:10 +0200 | [diff] [blame] | 26 | |
| 27 | #endif /* __ASSEMBLY__ */ |
| 28 | |
H. Peter Anvin | 1965aae | 2008-10-22 22:26:29 -0700 | [diff] [blame] | 29 | #endif /* _ASM_X86_TRAMPOLINE_H */ |