2 #include <linux/linkage.h>
3 #include <asm/segment.h>
4 #include <asm/page_types.h>
6 # Copyright 2003, 2008 Pavel Machek <pavel@suse.cz>, distribute under GPLv2
11 ENTRY(wakeup_pmode_return)
13 movw $__KERNEL_DS, %ax
22 # reload the gdt, as we need the full 32 bit address
25 ljmp $(__KERNEL_CS), $1f
31 # and restore the stack ... but you need gdt for this to work
32 movl saved_context_esp, %esp
34 movl %cs:saved_magic, %eax
35 cmpl $0x12345678, %eax
38 # jump to place where we left off
53 movl %eax, saved_context_esp
54 movl %ebx, saved_context_ebx
55 movl %ebp, saved_context_ebp
56 movl %esi, saved_context_esi
57 movl %edi, saved_context_edi
59 popl saved_context_eflags
61 movl $ret_point, saved_eip
66 movl saved_context_ebp, %ebp
67 movl saved_context_ebx, %ebx
68 movl saved_context_esi, %esi
69 movl saved_context_edi, %edi
70 pushl saved_context_eflags
74 ENTRY(do_suspend_lowlevel)
75 call save_processor_state
78 call x86_acpi_enter_sleep_state
81 # In case of S3 failure, we'll emerge here. Jump
82 # to ret_point to recover
86 call restore_registers
87 call restore_processor_state
92 ENTRY(saved_magic) .long 0
93 ENTRY(saved_eip) .long 0