Deleted Added
sdiff udiff text old ( 124051 ) new ( 145397 )
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:

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

19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
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 * $FreeBSD: head/sys/i386/acpica/acpi_wakecode.S 124051 2004-01-01 22:57:22Z njl $
28 */
29
30#define LOCORE
31
32#include <machine/asmacros.h>
33#include <machine/param.h>
34#include <machine/specialreg.h>
35
36 .align 4
37 .code16
38wakeup_16:
39 nop
40 cli
41
42 /*
43 * Set up segment registers for real mode and a small stack for

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

94
95 /* Enable protected mode */
96 mov %cr0,%eax
97 orl $(CR0_PE),%eax
98 mov %eax,%cr0
99
100wakeup_sw32:
101 /* Switch to protected mode by intersegmental jump */
102 ljmpl $0x8,$0x12345678 /* Code location, to be replaced */
103
104 .code32
105wakeup_32:
106 /*
107 * Switched to protected mode w/o paging
108 * %esi: KERNEL stack pointer (physical address)
109 */
110
111 nop
112
113 /* Set up segment registers for protected mode */
114 movw $0x10,%ax /* KDSEL to segment registers */
115 movw %ax,%ds
116 movw %ax,%es
117 movw %ax,%gs
118 movw %ax,%ss
119 movw $0x18,%ax /* KPSEL to %fs */
120 movw %ax,%fs
121 movl %esi,%esp /* physical address stack pointer */
122
123wakeup_32stack:
124 /* Operands are overwritten in 16bit code */
125 pushl $0xabcdef09 /* ss + dummy */
126 pushl $0xabcdef08 /* fs + gs */
127 pushl $0xabcdef07 /* ds + es */

--- 111 unchanged lines hidden ---