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
20 # reload the gdt, as we need the full 32 bit address
23 ljmp $(__KERNEL_CS), $1f
29 # and restore the stack ... but you need gdt for this to work
30 movl saved_context_esp, %esp
32 movl %cs:saved_magic, %eax
33 cmpl $0x12345678, %eax
36 # jump to place where we left off
51 movl %eax, saved_context_esp
52 movl %ebx, saved_context_ebx
53 movl %ebp, saved_context_ebp
54 movl %esi, saved_context_esi
55 movl %edi, saved_context_edi
57 popl saved_context_eflags
59 movl $ret_point, saved_eip
64 movl saved_context_ebp, %ebp
65 movl saved_context_ebx, %ebx
66 movl saved_context_esi, %esi
67 movl saved_context_edi, %edi
68 pushl saved_context_eflags
72 ENTRY(do_suspend_lowlevel)
73 call save_processor_state
76 call acpi_enter_sleep_state
79 # In case of S3 failure, we'll emerge here. Jump
80 # to ret_point to recover
84 call restore_registers
85 call restore_processor_state
90 ENTRY(saved_magic) .long 0
91 ENTRY(saved_eip) .long 0