1 /* SPDX-License-Identifier: GPL-2.0 */
3 #include <linux/linkage.h>
4 #include <asm/segment.h>
6 #include <asm/pgtable_32.h>
16 # OFW lands us here, running in protected mode, with a
17 # kernel-compatible GDT already setup.
19 # Clear any dangerous flags
26 movl $initial_page_table - __PAGE_OFFSET, %eax
35 # Control registers were modified, pipeline resync is needed
39 movw $__KERNEL_DS, %ax
49 ljmp $(__KERNEL_CS),$1f
55 # Go back to the return point
72 movl %ebx, saved_context_ebx
73 movl %ebp, saved_context_ebp
74 movl %esi, saved_context_esi
75 movl %edi, saved_context_edi
78 popl saved_context_eflags
83 movl saved_context_ebp, %ebp
84 movl saved_context_ebx, %ebx
85 movl saved_context_esi, %esi
86 movl saved_context_edi, %edi
88 pushl saved_context_eflags
93 SYM_CODE_START(do_olpc_suspend_lowlevel)
94 call save_processor_state
97 # This is the stack context we want to remember
98 movl %esp, saved_context_esp
106 movl saved_context_esp, %esp
110 call restore_registers
111 call restore_processor_state
113 SYM_CODE_END(do_olpc_suspend_lowlevel)
121 saved_context_esp: .long 0
122 saved_context_edi: .long 0
123 saved_context_esi: .long 0
124 saved_context_ebx: .long 0
125 saved_context_ebp: .long 0
126 saved_context_eflags: .long 0