aboutsummaryrefslogtreecommitdiff
path: root/shutdown/acpi_shutdown.h
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2019-03-02 15:31:04 -0800
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-03-02 15:32:08 -0800
commit99a69fd8b6034214c0729e9a3a684bbe9d541eb0 (patch)
tree5c6faf43f8e14bbfdb5647e396362a592ce08772 /shutdown/acpi_shutdown.h
parent33421955afb21c5e89a85f0b8f19c3644b18c8ae (diff)
downloadhurd-99a69fd8b6034214c0729e9a3a684bbe9d541eb0.tar.gz
hurd-99a69fd8b6034214c0729e9a3a684bbe9d541eb0.tar.bz2
hurd-99a69fd8b6034214c0729e9a3a684bbe9d541eb0.zip
Add shutdown RPC && ACPI specific disappear routine
* Makefile (prog-subdirs): Add shutdown. * hurd/hurd_types.defs (shutdown_t): New type. * hurd/hurd_types.h (shutdown_t): New type. * hurd/shutdown.defs: New file. * shutdown: New directory.
Diffstat (limited to 'shutdown/acpi_shutdown.h')
-rw-r--r--shutdown/acpi_shutdown.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/shutdown/acpi_shutdown.h b/shutdown/acpi_shutdown.h
new file mode 100644
index 00000000..50b7f1f6
--- /dev/null
+++ b/shutdown/acpi_shutdown.h
@@ -0,0 +1,18 @@
+#ifndef _ACPI_SHUTDOWN_H_
+#define _ACPI_SHUTDOWN_H_
+
+#include <hurd/paths.h>
+
+#define _SERVERS_ACPI _SERVERS "/acpi/tables"
+#define SERVERS_ACPI_FADT _SERVERS_ACPI "/FACP"
+#define SLP_TYP0 (0x0 << 10)
+#define SLP_TYP5 (0x5 << 10)
+#define SLP_EN (0x1 << 13)
+#define SCI_EN 1
+#define SMI_CMD_OFFSET 12
+#define SMI_EN_OFFSET 16
+#define PM1A_CTL_OFFSET 28
+
+void disappear_via_acpi(void);
+
+#endif