summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/amd64/amd64/acpi_machdep.c15
-rw-r--r--sys/arch/amd64/amd64/acpi_wakecode.S3
2 files changed, 5 insertions, 13 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c
index 2f040d950d6..a5e29fdf655 100644
--- a/sys/arch/amd64/amd64/acpi_machdep.c
+++ b/sys/arch/amd64/amd64/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.26 2009/11/24 17:39:59 mlarkin Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.27 2009/11/26 00:14:11 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -227,19 +227,10 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
if (acpi_savecpu()) {
fpusave_cpu(curcpu(), 1);
wbinvd();
- acpi_enter_sleep_state(sc, state);
- panic("%s: acpi_enter_sleep_state failed", DEVNAME(sc));
+ if (acpi_enter_sleep_state(sc, state) != 0)
+ panic("%s: acpi_enter_sleep_state failed", DEVNAME(sc));
}
- /*
- * On resume, the execution path will actually occur here.
- * This is because we previously saved the stack location
- * in acpi_savecpu, and issued a far jmp to the restore
- * routine in the wakeup code. This means we are
- * returning to the location immediately following the
- * last call instruction - after the call to acpi_savecpu.
- */
-
#if NISA > 0
i8259_default_setup();
#endif
diff --git a/sys/arch/amd64/amd64/acpi_wakecode.S b/sys/arch/amd64/amd64/acpi_wakecode.S
index d1f86ecfa21..1c13e6ddf0f 100644
--- a/sys/arch/amd64/amd64/acpi_wakecode.S
+++ b/sys/arch/amd64/amd64/acpi_wakecode.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_wakecode.S,v 1.6 2009/11/25 15:41:43 pirofti Exp $ */
+/* $OpenBSD: acpi_wakecode.S,v 1.7 2009/11/26 00:14:11 mlarkin Exp $ */
/*
* Copyright (c) 2001 Takanori Watanabe <takawata@jp.freebsd.org>
* Copyright (c) 2001 Mitsuru IWASAKI <iwasaki@jp.freebsd.org>
@@ -586,6 +586,7 @@ NENTRY(acpi_savecpu)
movq %rsi, acpi_saved_rsi
movq %rdi, acpi_saved_rdi
movq %rsp, acpi_saved_rsp
+ addq $0x8, acpi_saved_rsp
movq %r8, acpi_saved_r8
movq %r9, acpi_saved_r9