3 #include <linux/linkage.h>
4 #include <asm/segment.h>
19 addw $(wakeup_data - wakeup_code) >> 4, %ax
23 # Private stack is needed for ASUS board
24 mov $(wakeup_stack - wakeup_data), %sp
27 movl (real_save_cr3 - wakeup_data), %eax
30 # make sure %cr4 is set correctly (features, etc)
31 movl (real_save_cr4 - wakeup_data), %eax
35 lgdt real_save_gdt - wakeup_data
37 # Flush the prefetch queue
45 ljmpl $__KERNEL_CS,$SYMBOL_NAME(wakeup_pmode_return)
53 real_save_gdt: .word 0
55 real_save_cr3: .long 0
56 real_save_cr4: .long 0
63 # restore data segment
64 movl $__KERNEL_DS, %eax
68 # and restore the stack
72 # restore other segment registers
77 # reload the gdt, as we need the full 32 bit address
82 # restore the other general registers
88 # jump to place where we left off
93 # acpi_copy_wakeup_routine
95 # Copy the above routine to low memory.
98 # %eax: place to copy wakeup routine to
100 # Returned address is location of code in low memory (past data and stack)
102 ENTRY(acpi_copy_wakeup_routine)
113 leal wakeup_start, %esi
114 movl $(wakeup_end - wakeup_start) >> 2, %ecx
119 movl %edx, real_save_cr3 - wakeup_start (%eax)
121 movl %edx, real_save_cr4 - wakeup_start (%eax)
122 sgdt real_save_gdt - wakeup_start (%eax)
124 # restore the regs we used
139 ENTRY(saved_ebp) .long 0
140 ENTRY(saved_esi) .long 0
141 ENTRY(saved_edi) .long 0
142 ENTRY(saved_ebx) .long 0
144 ENTRY(saved_eip) .long 0
145 ENTRY(saved_esp) .long 0