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