2 * Copyright 2001-2003 Pavel Machek <pavel@suse.cz>
4 * Copyright 2001 Patrick Mochel <mochel@osdl.org>
6 #ifndef __ASM_X86_64_SUSPEND_H
7 #define __ASM_X86_64_SUSPEND_H
13 arch_prepare_suspend(void)
19 * Image of the saved processor state, used by the low level ACPI suspend to
20 * RAM code and by the low level hibernation code.
22 * If you modify it, fix arch/x86/kernel/acpi/wakeup_64.S and make sure that
23 * __save/__restore_processor_state(), defined in arch/x86/kernel/suspend_64.c,
24 * still work as required.
26 struct saved_context {
28 u16 ds, es, fs, gs, ss;
29 unsigned long gs_base, gs_kernel_base, fs_base;
30 unsigned long cr0, cr2, cr3, cr4, cr8;
34 unsigned long gdt_base;
37 unsigned long idt_base;
42 unsigned long return_address;
43 } __attribute__((packed));
45 #define loaddebug(thread,register) \
46 set_debugreg((thread)->debugreg##register, register)
48 /* routines for saving/restoring kernel state */
49 extern int acpi_save_state_mem(void);
50 extern char core_restore_code;
51 extern char restore_registers;
53 #endif /* __ASM_X86_64_SUSPEND_H */