2012-05-09 02:22:26 +08:00
|
|
|
#ifndef _ARCH_X86_REALMODE_H
|
|
|
|
#define _ARCH_X86_REALMODE_H
|
|
|
|
|
|
|
|
#include <linux/types.h>
|
|
|
|
#include <asm/io.h>
|
|
|
|
|
|
|
|
/* This must match data at realmode.S */
|
|
|
|
struct real_mode_header {
|
|
|
|
u32 text_start;
|
|
|
|
u32 ro_end;
|
2012-05-09 02:22:28 +08:00
|
|
|
/* SMP trampoline */
|
2012-05-09 02:22:43 +08:00
|
|
|
u32 trampoline_start;
|
2012-05-09 02:22:28 +08:00
|
|
|
u32 trampoline_status;
|
2012-05-09 02:22:43 +08:00
|
|
|
u32 trampoline_header;
|
|
|
|
#ifdef CONFIG_X86_64
|
|
|
|
u32 trampoline_pgd;
|
2012-05-09 02:22:27 +08:00
|
|
|
#endif
|
2012-05-09 02:22:43 +08:00
|
|
|
/* ACPI S3 wakeup */
|
2012-05-09 02:22:29 +08:00
|
|
|
#ifdef CONFIG_ACPI_SLEEP
|
|
|
|
u32 wakeup_start;
|
|
|
|
u32 wakeup_header;
|
2012-05-09 02:22:43 +08:00
|
|
|
#endif
|
|
|
|
/* APM/BIOS reboot */
|
|
|
|
u32 machine_real_restart_asm;
|
2012-06-17 12:47:37 +08:00
|
|
|
#ifdef CONFIG_X86_64
|
|
|
|
u32 machine_real_restart_seg;
|
2012-05-09 02:22:43 +08:00
|
|
|
#endif
|
2012-05-09 02:22:46 +08:00
|
|
|
};
|
2012-05-09 02:22:43 +08:00
|
|
|
|
|
|
|
/* This must match data at trampoline_32/64.S */
|
|
|
|
struct trampoline_header {
|
|
|
|
#ifdef CONFIG_X86_32
|
|
|
|
u32 start;
|
2012-05-09 02:22:46 +08:00
|
|
|
u16 gdt_pad;
|
2012-05-09 02:22:43 +08:00
|
|
|
u16 gdt_limit;
|
|
|
|
u32 gdt_base;
|
|
|
|
#else
|
|
|
|
u64 start;
|
2012-05-17 05:02:05 +08:00
|
|
|
u64 efer;
|
2012-05-09 02:22:46 +08:00
|
|
|
u32 cr4;
|
2012-05-09 02:22:29 +08:00
|
|
|
#endif
|
2012-05-09 02:22:46 +08:00
|
|
|
};
|
2012-05-09 02:22:26 +08:00
|
|
|
|
2012-05-09 02:22:41 +08:00
|
|
|
extern struct real_mode_header *real_mode_header;
|
|
|
|
extern unsigned char real_mode_blob_end[];
|
2012-05-09 02:22:26 +08:00
|
|
|
|
|
|
|
extern unsigned long init_rsp;
|
|
|
|
extern unsigned long initial_code;
|
|
|
|
extern unsigned long initial_gs;
|
|
|
|
|
|
|
|
extern unsigned char real_mode_blob[];
|
|
|
|
extern unsigned char real_mode_relocs[];
|
|
|
|
|
2012-05-09 02:22:28 +08:00
|
|
|
#ifdef CONFIG_X86_32
|
|
|
|
extern unsigned char startup_32_smp[];
|
|
|
|
extern unsigned char boot_gdt[];
|
|
|
|
#else
|
|
|
|
extern unsigned char secondary_startup_64[];
|
|
|
|
#endif
|
|
|
|
|
2013-01-25 04:19:51 +08:00
|
|
|
void reserve_real_mode(void);
|
|
|
|
void setup_real_mode(void);
|
2012-05-09 02:22:26 +08:00
|
|
|
|
|
|
|
#endif /* _ARCH_X86_REALMODE_H */
|