about summary refs log tree commit diff
path: root/src/pOS/arch/x86/kernel/acpi.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pOS/arch/x86/kernel/acpi.cpp')
-rw-r--r--src/pOS/arch/x86/kernel/acpi.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/pOS/arch/x86/kernel/acpi.cpp b/src/pOS/arch/x86/kernel/acpi.cpp
new file mode 100644
index 0000000..7a8d3cd
--- /dev/null
+++ b/src/pOS/arch/x86/kernel/acpi.cpp
@@ -0,0 +1,18 @@
+#include <kernel/acpi.h>
+
+void ACPI::shutdown(void)
+{
+    System::outw(0x604, 0x2000); /* QEMU temp implementation */
+    ASSERT(false);
+}
+
+void ACPI::reboot(void)
+{
+    /* 8042 reset */
+    int8_t good = 0x02;
+    while (good & 0x02)
+        good = System::inb(0x64);
+    System::outb(0x64, 0xFE);
+
+    ASSERT(false);
+}