realmode.h 1.2 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
#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;
11
	/* SMP trampoline */
12
	u32	trampoline_start;
13
	u32	trampoline_status;
14 15 16
	u32	trampoline_header;
#ifdef CONFIG_X86_64
	u32	trampoline_pgd;
17
#endif
18
	/* ACPI S3 wakeup */
19 20 21
#ifdef CONFIG_ACPI_SLEEP
	u32	wakeup_start;
	u32	wakeup_header;
22 23 24 25 26
#endif
	/* APM/BIOS reboot */
#ifdef CONFIG_X86_32
	u32	machine_real_restart_asm;
#endif
27
};
28 29 30 31 32

/* This must match data at trampoline_32/64.S */
struct trampoline_header {
#ifdef CONFIG_X86_32
	u32 start;
33
	u16 gdt_pad;
34 35 36 37
	u16 gdt_limit;
	u32 gdt_base;
#else
	u64 start;
38
	u64 efer;
39
	u32 cr4;
40
#endif
41
};
42

43 44
extern struct real_mode_header *real_mode_header;
extern unsigned char real_mode_blob_end[];
45 46 47 48 49 50 51 52

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[];

53 54 55 56 57 58 59
#ifdef CONFIG_X86_32
extern unsigned char startup_32_smp[];
extern unsigned char boot_gdt[];
#else
extern unsigned char secondary_startup_64[];
#endif

60 61 62
extern void __init setup_real_mode(void);

#endif /* _ARCH_X86_REALMODE_H */