2012-05-08 18:22:26 +00: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-08 18:22:28 +00:00
|
|
|
/* SMP trampoline */
|
2012-05-08 18:22:43 +00:00
|
|
|
u32 trampoline_start;
|
2012-05-08 18:22:28 +00:00
|
|
|
u32 trampoline_status;
|
2012-05-08 18:22:43 +00:00
|
|
|
u32 trampoline_header;
|
|
|
|
#ifdef CONFIG_X86_64
|
|
|
|
u32 trampoline_pgd;
|
2012-05-08 18:22:27 +00:00
|
|
|
#endif
|
2012-05-08 18:22:43 +00:00
|
|
|
/* ACPI S3 wakeup */
|
2012-05-08 18:22:29 +00:00
|
|
|
#ifdef CONFIG_ACPI_SLEEP
|
|
|
|
u32 wakeup_start;
|
|
|
|
u32 wakeup_header;
|
2012-05-08 18:22:43 +00:00
|
|
|
#endif
|
|
|
|
/* APM/BIOS reboot */
|
|
|
|
u32 machine_real_restart_asm;
|
2012-06-17 04:47:37 +00:00
|
|
|
#ifdef CONFIG_X86_64
|
|
|
|
u32 machine_real_restart_seg;
|
2012-05-08 18:22:43 +00:00
|
|
|
#endif
|
2012-05-08 18:22:46 +00:00
|
|
|
};
|
2012-05-08 18:22:43 +00:00
|
|
|
|
|
|
|
/* This must match data at trampoline_32/64.S */
|
|
|
|
struct trampoline_header {
|
|
|
|
#ifdef CONFIG_X86_32
|
|
|
|
u32 start;
|
2012-05-08 18:22:46 +00:00
|
|
|
u16 gdt_pad;
|
2012-05-08 18:22:43 +00:00
|
|
|
u16 gdt_limit;
|
|
|
|
u32 gdt_base;
|
|
|
|
#else
|
|
|
|
u64 start;
|
2012-05-16 21:02:05 +00:00
|
|
|
u64 efer;
|
2012-05-08 18:22:46 +00:00
|
|
|
u32 cr4;
|
2012-05-08 18:22:29 +00:00
|
|
|
#endif
|
2012-05-08 18:22:46 +00:00
|
|
|
};
|
2012-05-08 18:22:26 +00:00
|
|
|
|
2012-05-08 18:22:41 +00:00
|
|
|
extern struct real_mode_header *real_mode_header;
|
|
|
|
extern unsigned char real_mode_blob_end[];
|
2012-05-08 18:22:26 +00: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-08 18:22:28 +00: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-24 20:19:51 +00:00
|
|
|
void reserve_real_mode(void);
|
|
|
|
void setup_real_mode(void);
|
2012-05-08 18:22:26 +00:00
|
|
|
|
|
|
|
#endif /* _ARCH_X86_REALMODE_H */
|