2008-10-23 12:26:29 +07:00
|
|
|
#ifndef _ASM_X86_TRAMPOLINE_H
|
|
|
|
#define _ASM_X86_TRAMPOLINE_H
|
2008-04-11 04:28:10 +07:00
|
|
|
|
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2011-02-15 06:42:46 +07:00
|
|
|
#include <linux/types.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
|
2008-04-11 04:28:10 +07:00
|
|
|
/*
|
2011-02-15 06: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-11 04:28:10 +07:00
|
|
|
*/
|
2011-02-15 06: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-11 04:28:10 +07:00
|
|
|
|
|
|
|
extern unsigned long init_rsp;
|
|
|
|
extern unsigned long initial_code;
|
2009-01-13 18:41:35 +07:00
|
|
|
extern unsigned long initial_gs;
|
2008-04-11 04:28:10 +07:00
|
|
|
|
2011-02-15 06: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-08 06:50:22 +07:00
|
|
|
|
2011-02-15 06: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-11 04:28:10 +07:00
|
|
|
|
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
|
2008-10-23 12:26:29 +07:00
|
|
|
#endif /* _ASM_X86_TRAMPOLINE_H */
|