Lines Matching +full:suspend +full:- +full:to +full:- +full:ram

1 /*-
3 * Copyright (c) 2001-2012 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
5 * Copyright (c) 2008-2012 Jung-uk Kim <jkim@FreeBSD.org>
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
39 * CS set to the page where we stored this code. It should configure the
41 * Depending on the previous sleep state, we may need to initialize more
42 * of the system (i.e., S3 suspend-to-RAM vs. S4 suspend-to-disk).
52 * any calls we make. Set up full 32-bit bootstrap kernel flags
58 mov %cs, %ax /* copy %cs to %ds. Remember these */
65 /* To debug resume hangs, beep the speaker if the user requested. */
66 testb $~0, resume_beep - wakeup_start
68 movb $0, resume_beep - wakeup_start
70 /* Set PIC timer2 to beep. */
86 /* Re-initialize video BIOS if the reset_video tunable is set. */
87 testb $~0, reset_video - wakeup_start
89 movb $0, reset_video - wakeup_start
97 /* Re-start in case the previous BIOS call clobbers them. */
110 * in 16-bit protected mode.
112 lgdtl bootgdtdesc - wakeup_start
119 * Now execute a far jump to turn on protected mode. This
120 * causes the segment registers to turn into selectors and causes
121 * %cs to be loaded from the gdt.
124 * ljmpl $bootcode32 - bootgdt, $wakeup_32 - wakeup_start
129 .byte 0x66 /* size override to 32 bits */
131 .long wakeup_32 - wakeup_start /* offset in segment */
132 .word bootcode32 - bootgdt /* index in gdt for 32 bit code */
141 mov $bootdata32 - bootgdt, %eax
145 movl wakeup_efer - wakeup_start(%ebx), %eax
146 movl wakeup_efer - wakeup_start + 4(%ebx), %edx
153 2: movl wakeup_cr4 - wakeup_start(%ebx), %eax
157 3: movl wakeup_cr3 - wakeup_start(%ebx), %eax
161 movl wakeup_ret - wakeup_start(%ebx), %edx
162 movl wakeup_pcb - wakeup_start(%ebx), %ecx
169 /* Jump to return address. */
194 .word bootgdtend - bootgdt /* Length */
195 .long bootgdt - wakeup_start /* Offset plus %ds << 4 */