summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormlarkin <mlarkin@openbsd.org>2010-07-29 00:29:49 +0000
committermlarkin <mlarkin@openbsd.org>2010-07-29 00:29:49 +0000
commita10ba14eead676aa6bc491aa10cc96121603b955 (patch)
tree2b7dabbccd006ddc28d1c79aa2574e1343629fc3
parentTruncate output file when compressing. OK deraadt@ (diff)
downloadwireguard-openbsd-a10ba14eead676aa6bc491aa10cc96121603b955.tar.xz
wireguard-openbsd-a10ba14eead676aa6bc491aa10cc96121603b955.zip
Zero out the firmware waking vector on successful resume from ACPI sleep.
ok deraadt@
-rw-r--r--sys/arch/amd64/amd64/acpi_machdep.c5
-rw-r--r--sys/arch/i386/i386/acpi_machdep.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/sys/arch/amd64/amd64/acpi_machdep.c b/sys/arch/amd64/amd64/acpi_machdep.c
index 726b2d45f62..09e0f4f445e 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.42 2010/07/27 16:53:11 deraadt Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.43 2010/07/29 00:29:49 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -243,6 +243,9 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
/* Resume path continues here */
+ /* Reset the vector */
+ sc->sc_facs->wakeup_vector = 0;
+
#if NISA > 0
i8259_default_setup();
#endif
diff --git a/sys/arch/i386/i386/acpi_machdep.c b/sys/arch/i386/i386/acpi_machdep.c
index 69d1b599fc2..27d5934509e 100644
--- a/sys/arch/i386/i386/acpi_machdep.c
+++ b/sys/arch/i386/i386/acpi_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: acpi_machdep.c,v 1.36 2010/07/27 16:53:10 deraadt Exp $ */
+/* $OpenBSD: acpi_machdep.c,v 1.37 2010/07/29 00:29:49 mlarkin Exp $ */
/*
* Copyright (c) 2005 Thorsten Lockert <tholo@sigmasoft.com>
*
@@ -261,6 +261,9 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state)
/* Resume path continues here */
+ /* Reset the vector */
+ sc->sc_facs->wakeup_vector = 0;
+
#if NISA > 0
isa_defaultirq();
#endif