Jarkko Sakkinen | 084ee1c6 | 2012-05-08 21:22:26 +0300 | [diff] [blame] | 1 | #ifndef _ARCH_X86_REALMODE_H |
| 2 | #define _ARCH_X86_REALMODE_H |
| 3 | |
| 4 | #include <linux/types.h> |
| 5 | #include <asm/io.h> |
| 6 | |
| 7 | /* This must match data at realmode.S */ |
| 8 | struct real_mode_header { |
| 9 | u32 text_start; |
| 10 | u32 ro_end; |
| 11 | u32 end; |
Jarkko Sakkinen | 5a8c9ae | 2012-05-08 21:22:27 +0300 | [diff] [blame] | 12 | /* reboot */ |
| 13 | #ifdef CONFIG_X86_32 |
| 14 | u32 machine_real_restart_asm; |
| 15 | #endif |
Jarkko Sakkinen | 48927bb | 2012-05-08 21:22:28 +0300 | [diff] [blame] | 16 | /* SMP trampoline */ |
| 17 | u32 trampoline_data; |
| 18 | u32 trampoline_status; |
| 19 | #ifdef CONFIG_X86_32 |
| 20 | u32 startup_32_smp; |
| 21 | u32 boot_gdt; |
| 22 | #else |
| 23 | u32 startup_64_smp; |
| 24 | u32 level3_ident_pgt; |
| 25 | u32 level3_kernel_pgt; |
| 26 | #endif |
Jarkko Sakkinen | c9b77cc | 2012-05-08 21:22:29 +0300 | [diff] [blame^] | 27 | #ifdef CONFIG_ACPI_SLEEP |
| 28 | u32 wakeup_start; |
| 29 | u32 wakeup_header; |
| 30 | #endif |
Jarkko Sakkinen | 084ee1c6 | 2012-05-08 21:22:26 +0300 | [diff] [blame] | 31 | } __attribute__((__packed__)); |
| 32 | |
| 33 | extern struct real_mode_header real_mode_header; |
| 34 | extern unsigned char *real_mode_base; |
| 35 | |
| 36 | extern unsigned long init_rsp; |
| 37 | extern unsigned long initial_code; |
| 38 | extern unsigned long initial_gs; |
| 39 | |
| 40 | extern unsigned char real_mode_blob[]; |
| 41 | extern unsigned char real_mode_relocs[]; |
| 42 | |
Jarkko Sakkinen | 48927bb | 2012-05-08 21:22:28 +0300 | [diff] [blame] | 43 | #ifdef CONFIG_X86_32 |
| 44 | extern unsigned char startup_32_smp[]; |
| 45 | extern unsigned char boot_gdt[]; |
| 46 | #else |
| 47 | extern unsigned char secondary_startup_64[]; |
| 48 | #endif |
| 49 | |
Jarkko Sakkinen | 084ee1c6 | 2012-05-08 21:22:26 +0300 | [diff] [blame] | 50 | extern void __init setup_real_mode(void); |
| 51 | |
| 52 | #endif /* _ARCH_X86_REALMODE_H */ |