1 .section .text.page_aligned
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
24 ljmp $(__KERNEL_CS), $1f
30 # and restore the stack ... but you need gdt for this to work
31 movl saved_context_esp, %esp
33 movl %cs:saved_magic, %eax
34 cmpl $0x12345678, %eax
37 # 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 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