2008-10-23 13:26:29 +08:00
|
|
|
#ifndef _ASM_X86_TRAMPOLINE_H
|
|
|
|
#define _ASM_X86_TRAMPOLINE_H
|
2008-04-11 05:28:10 +08:00
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2011-02-15 07:42:46 +08:00
|
|
|
#include <linux/types.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
|
2008-04-11 05:28:10 +08:00
|
|
|
/*
|
2011-02-15 07:42:46 +08:00
|
|
|
* Trampoline 80x86 program as an array. These are in the init rodata
|
|
|
|
* segment, but that's okay, because we only care about the relative
|
|
|
|
* addresses of the symbols.
|
2008-04-11 05:28:10 +08:00
|
|
|
*/
|
2011-02-15 07:42:46 +08:00
|
|
|
extern const unsigned char x86_trampoline_start [];
|
|
|
|
extern const unsigned char x86_trampoline_end [];
|
|
|
|
extern unsigned char *x86_trampoline_base;
|
2008-04-11 05:28:10 +08:00
|
|
|
|
|
|
|
extern unsigned long init_rsp;
|
|
|
|
extern unsigned long initial_code;
|
2009-01-13 19:41:35 +08:00
|
|
|
extern unsigned long initial_gs;
|
2008-04-11 05:28:10 +08:00
|
|
|
|
2011-02-15 07:42:46 +08:00
|
|
|
extern void __init setup_trampolines(void);
|
|
|
|
|
|
|
|
extern const unsigned char trampoline_data[];
|
|
|
|
extern const unsigned char trampoline_status[];
|
|
|
|
|
|
|
|
#define TRAMPOLINE_SYM(x) \
|
|
|
|
((void *)(x86_trampoline_base + \
|
|
|
|
((const unsigned char *)(x) - x86_trampoline_start)))
|
2008-12-08 07:50:22 +08:00
|
|
|
|
2011-02-15 07:42:46 +08:00
|
|
|
/* Address of the SMP trampoline */
|
|
|
|
static inline unsigned long trampoline_address(void)
|
|
|
|
{
|
|
|
|
return virt_to_phys(TRAMPOLINE_SYM(trampoline_data));
|
|
|
|
}
|
2008-04-11 05:28:10 +08:00
|
|
|
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
2008-10-23 13:26:29 +08:00
|
|
|
#endif /* _ASM_X86_TRAMPOLINE_H */
|