summaryrefslogtreecommitdiff
path: root/sys/arch/i386
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2005-12-16 19:00:31 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2005-12-16 19:00:31 +0000
commit29b5133eaa04fbb70c852c7917617913d9f5fa6f (patch)
treec6d0140082c49b486d2547bc849db18ed41b806a /sys/arch/i386
parente78549fa516a71b200faa5d49d79791551bdebc9 (diff)
Power down machine from acpi.
Help deraadt, ok jordan@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r--sys/arch/i386/i386/machdep.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/arch/i386/i386/machdep.c b/sys/arch/i386/i386/machdep.c
index e6177e83bc0..4f3226c84ff 100644
--- a/sys/arch/i386/i386/machdep.c
+++ b/sys/arch/i386/i386/machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: machdep.c,v 1.333 2005/11/23 09:32:46 mickey Exp $ */
+/* $OpenBSD: machdep.c,v 1.334 2005/12/16 19:00:30 marco Exp $ */
/* $NetBSD: machdep.c,v 1.214 1996/11/10 03:16:17 thorpej Exp $ */
/*-
@@ -132,6 +132,11 @@
#include <i386/isa/isa_machdep.h>
#include <i386/isa/nvram.h>
+#include "acpi.h"
+#if NACPI > 0
+#include <dev/acpi/acpivar.h>
+#endif
+
#include "apm.h"
#if NAPM > 0
#include <machine/apmvar.h>
@@ -2318,6 +2323,13 @@ haltsys:
doshutdownhooks();
if (howto & RB_HALT) {
+#if NACPI > 0
+ extern int acpi_s5;
+
+ if (acpi_s5)
+ acpi_powerdown();
+#endif
+
#if NAPM > 0
if (howto & RB_POWERDOWN) {
int rv;