feat: added basic ACPI support using LAI

This commit is contained in:
2021-08-30 19:56:36 +02:00
parent 462dd90890
commit e37222c346
17 changed files with 729 additions and 44 deletions

View File

@@ -4,13 +4,12 @@
#include <attributes.h>
#include <myke/drivers/ports.h>
#include <lai/helpers/pm.h>
#include <myke/libk/libk.h>
#include <myke/util/power.h>
void att_noreturn power_shutdown() {
port_word_out(PORT_ACPI, PORT_ACPI_SHUTDOWN);
port_word_out(PORT_QEMU_COMMAND, PORT_QEMU_COMMAND_SHUTDOWN);
port_word_out(PORT_VBOX, PORT_VBOX_SHUTDOWN);
lai_enter_sleep(5);
k_panics("Failed to shut down!\n");
}