blob: 1bfc74d213a4c7e96751bfd82d2124b3d50517fb [file] [log] [blame]
Jarkko Sakkinen084ee1c62012-05-08 21:22:26 +03001#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 */
8struct real_mode_header {
9 u32 text_start;
10 u32 ro_end;
11 u32 end;
Jarkko Sakkinen5a8c9ae2012-05-08 21:22:27 +030012 /* reboot */
13#ifdef CONFIG_X86_32
14 u32 machine_real_restart_asm;
15#endif
Jarkko Sakkinen48927bb2012-05-08 21:22:28 +030016 /* 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 Sakkinenc9b77cc2012-05-08 21:22:29 +030027#ifdef CONFIG_ACPI_SLEEP
28 u32 wakeup_start;
29 u32 wakeup_header;
30#endif
Jarkko Sakkinen084ee1c62012-05-08 21:22:26 +030031} __attribute__((__packed__));
32
33extern struct real_mode_header real_mode_header;
34extern unsigned char *real_mode_base;
35
36extern unsigned long init_rsp;
37extern unsigned long initial_code;
38extern unsigned long initial_gs;
39
40extern unsigned char real_mode_blob[];
41extern unsigned char real_mode_relocs[];
42
Jarkko Sakkinen48927bb2012-05-08 21:22:28 +030043#ifdef CONFIG_X86_32
44extern unsigned char startup_32_smp[];
45extern unsigned char boot_gdt[];
46#else
47extern unsigned char secondary_startup_64[];
48#endif
49
Jarkko Sakkinen084ee1c62012-05-08 21:22:26 +030050extern void __init setup_real_mode(void);
51
52#endif /* _ARCH_X86_REALMODE_H */