2 * Copyright 2001-2002 Pavel Machek <pavel@suse.cz>
4 * Copyright 2001 Patrick Mochel <mochel@osdl.org>
6 #ifndef __ASM_X86_32_SUSPEND_H
7 #define __ASM_X86_32_SUSPEND_H
12 static inline int arch_prepare_suspend(void) { return 0; }
14 /* image of the saved processor state */
15 struct saved_context
{
17 unsigned long cr0
, cr2
, cr3
, cr4
;
24 unsigned long return_address
;
25 } __attribute__((packed
));
28 extern unsigned long saved_eip
;
29 extern unsigned long saved_esp
;
30 extern unsigned long saved_ebp
;
31 extern unsigned long saved_ebx
;
32 extern unsigned long saved_esi
;
33 extern unsigned long saved_edi
;
35 static inline void acpi_save_register_state(unsigned long return_point
)
37 saved_eip
= return_point
;
38 asm volatile("movl %%esp,%0" : "=m" (saved_esp
));
39 asm volatile("movl %%ebp,%0" : "=m" (saved_ebp
));
40 asm volatile("movl %%ebx,%0" : "=m" (saved_ebx
));
41 asm volatile("movl %%edi,%0" : "=m" (saved_edi
));
42 asm volatile("movl %%esi,%0" : "=m" (saved_esi
));
45 #define acpi_restore_register_state() do {} while (0)
47 /* routines for saving/restoring kernel state */
48 extern int acpi_save_state_mem(void);
51 #endif /* __ASM_X86_32_SUSPEND_H */