diff options
Diffstat (limited to '')
-rw-r--r-- | src/arch/x86_common/acpi.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/arch/x86_common/acpi.c b/src/arch/x86_common/acpi.c new file mode 100644 index 0000000..2392185 --- /dev/null +++ b/src/arch/x86_common/acpi.c @@ -0,0 +1,13 @@ +#include <bindings.h> + +#define ACPI_INTERNAL +#include <sys/acpi.h> + +void acpi_sys_enable(struct acpi_state *state) { + outb(state->fadt->smi_command_port, state->fadt->acpi_enable); +} + +int acpi_sys_shutdown(struct acpi_state *state) { + outw((unsigned int) state->fadt->pm1_a_control_block, state->SLP_TYPb | state->SLP_EN); + return -1; +} |