Deleted Added
sdiff udiff text old ( 121743 ) new ( 121830 )
full compact
1/*-
2 * Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org>
3 * Copyright (c) 2001 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <machine/asm.h>
29__FBSDID("$FreeBSD: head/sys/i386/acpica/acpi_wakecode.S 121743 2003-10-30 16:14:55Z iwasaki $");
30
31#define LOCORE
32
33#include <machine/specialreg.h>
34
35 .align 4
36 .code16
37wakeup_16:
38 nop
39 cli
40
41 /* Set up segment registers for real mode */
42 movw %cs,%ax
43 movw %ax,%ds
44 movw %ax,%ss
45
46#ifndef ACPI_NO_RESET_VIDEO
47 /*
48 * Re-initialize video BIOS. Restore DS and SS from CS in
49 * case the BIOS modified them.
50 */
51 cmp $1, no_reset_video
52 je wakeup_16_gdt
53 lcall $0xc000, $3
54 movw %cs, %ax
55 movw %ax, %ds
56 movw %ax, %ss
57#endif
58
59wakeup_16_gdt:
60 /* Load GDT for real mode */
61 lgdt physical_gdt
62
63 /* Restore CR2, CR3 and CR4 */
64 mov previous_cr2,%eax
65 mov %eax,%cr2

--- 143 unchanged lines hidden (view full) ---

209
210/* used in real mode */
211physical_gdt: .word 0
212 .long 0
213physical_esp: .long 0
214previous_cr2: .long 0
215previous_cr3: .long 0
216previous_cr4: .long 0
217no_reset_video: .long 0
218
219/* transfer from real mode to protected mode */
220previous_cr0: .long 0
221previous_tr: .word 0
222previous_gdt: .word 0
223 .long 0
224previous_ldt: .word 0
225previous_idt: .word 0
226 .long 0
227where_to_recover: .long 0
228previous_ds: .word 0
229previous_es: .word 0
230previous_fs: .word 0
231previous_gs: .word 0
232previous_ss: .word 0
233dummy: .word 0