aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/acpica/acpi_wakecode.S
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2009-10-08 17:41:53 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2009-10-08 17:41:53 +0000
commita7e2341e20a38619ffecb850186736ca89e0243c (patch)
treea89be9ece2e55e12a45b805879c8d0efd5d61ff5 /sys/amd64/acpica/acpi_wakecode.S
parentc217b20ef6dbb61de76e4c194d03cdb0cffcbb01 (diff)
downloadsrc-a7e2341e20a38619ffecb850186736ca89e0243c.tar.gz
src-a7e2341e20a38619ffecb850186736ca89e0243c.zip
Clean up amd64 suspend/resume code.
- Allocate memory for wakeup code after ACPI bus is attached. The early memory allocation hack was inherited from i386 but amd64 does not need it. - Exclude real mode IVT and BDA explicitly. Improve comments about memory allocation and reason for the exclusions. It is a no-op in reality, though. - Remove an unnecessary CLD from wakeup code and re-align.
Notes
Notes: svn path=/head/; revision=197863
Diffstat (limited to 'sys/amd64/acpica/acpi_wakecode.S')
-rw-r--r--sys/amd64/acpica/acpi_wakecode.S6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/amd64/acpica/acpi_wakecode.S b/sys/amd64/acpica/acpi_wakecode.S
index 4e82f53196af..1372cc1a2d09 100644
--- a/sys/amd64/acpica/acpi_wakecode.S
+++ b/sys/amd64/acpica/acpi_wakecode.S
@@ -54,18 +54,17 @@
.data /* So we can modify it */
ALIGN_TEXT
-wakeup_start:
.code16
+wakeup_start:
/*
* Set up segment registers for real mode, a small stack for
* any calls we make, and clear any flags.
*/
cli /* make sure no interrupts */
- cld
mov %cs, %ax /* copy %cs to %ds. Remember these */
mov %ax, %ds /* are offsets rather than selectors */
mov %ax, %ss
- movw $PAGE_SIZE - 8, %sp
+ movw $PAGE_SIZE, %sp
xorw %ax, %ax
pushw %ax
popfw
@@ -129,6 +128,7 @@ wakeup_sw32:
/*
* At this point, we are running in 32 bit legacy protected mode.
*/
+ ALIGN_TEXT
.code32
wakeup_32: