aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/i386/acpica/acpi_wakecode.S14
1 files changed, 7 insertions, 7 deletions
diff --git a/sys/i386/acpica/acpi_wakecode.S b/sys/i386/acpica/acpi_wakecode.S
index ee3d5a1017e2..9c91c208efcd 100644
--- a/sys/i386/acpica/acpi_wakecode.S
+++ b/sys/i386/acpica/acpi_wakecode.S
@@ -50,17 +50,19 @@
.code16
wakeup_start:
/*
- * Set up segment registers for real mode, a small stack for
- * any calls we make, and clear any flags.
+ * Set up segment registers for real mode and a small stack for
+ * any calls we make. Set up full 32-bit bootstrap kernel flags
+ * since resumectx() doesn't restore flags. PSL_KERNEL gives
+ * bootstrap kernel flags (with interrupts disabled), not normal
+ * kernel flags.
*/
cli /* make sure no interrupts */
mov %cs, %ax /* copy %cs to %ds. Remember these */
mov %ax, %ds /* are offsets rather than selectors */
mov %ax, %ss
movw $PAGE_SIZE, %sp
- xorw %ax, %ax
- pushw %ax
- popfw
+ pushl $PSL_KERNEL
+ popfl
/* To debug resume hangs, beep the speaker if the user requested. */
testb $~0, resume_beep - wakeup_start
@@ -156,8 +158,6 @@ wakeup_32:
orl $CR0_PG, %eax
mov %eax, %cr0
- jmp 1f
-1:
/* Jump to return address. */
jmp *%edx