2008-10-22 23:26:29 -06:00
|
|
|
#ifndef _ASM_X86_TRAMPOLINE_H
|
|
|
|
#define _ASM_X86_TRAMPOLINE_H
|
2008-04-10 15:28:10 -06:00
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2011-02-14 16:42:46 -07:00
|
|
|
#include <linux/types.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
|
2008-04-10 15:28:10 -06:00
|
|
|
/*
|
2011-02-14 16:42:46 -07: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-10 15:28:10 -06:00
|
|
|
*/
|
2011-02-14 16:42:46 -07:00
|
|
|
extern const unsigned char x86_trampoline_start [];
|
|
|
|
extern const unsigned char x86_trampoline_end [];
|
|
|
|
extern unsigned char *x86_trampoline_base;
|
2008-04-10 15:28:10 -06:00
|
|
|
|
|
|
|
extern unsigned long init_rsp;
|
|
|
|
extern unsigned long initial_code;
|
2009-01-13 04:41:35 -07:00
|
|
|
extern unsigned long initial_gs;
|
2008-04-10 15:28:10 -06:00
|
|
|
|
2011-02-14 16:42:46 -07: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-07 16:50:22 -07:00
|
|
|
|
2011-02-14 16:42:46 -07:00
|
|
|
/* Address of the SMP trampoline */
|
|
|
|
static inline unsigned long trampoline_address(void)
|
|
|
|
{
|
|
|
|
return virt_to_phys(TRAMPOLINE_SYM(trampoline_data));
|
|
|
|
}
|
2008-04-10 15:28:10 -06:00
|
|
|
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
2008-10-22 23:26:29 -06:00
|
|
|
#endif /* _ASM_X86_TRAMPOLINE_H */
|