Deleted Added
full compact
acpi_wakecode.S (124051) acpi_wakecode.S (145397)
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 *
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 $
27 * $FreeBSD: head/sys/i386/acpica/acpi_wakecode.S 145397 2005-04-22 09:53:04Z iedowse $
28 */
29
30#define LOCORE
31
32#include <machine/asmacros.h>
28 */
29
30#define LOCORE
31
32#include <machine/asmacros.h>
33#include <machine/param.h>
34#include <machine/specialreg.h>
35
33#include <machine/specialreg.h>
34
35#include "assym.s"
36
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 */
37 .align 4
38 .code16
39wakeup_16:
40 nop
41 cli
42
43 /*
44 * Set up segment registers for real mode and a small stack for

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

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

--- 111 unchanged lines hidden ---