feat: added shutdown command
This commit is contained in:
15
kernel/util/power.c
Normal file
15
kernel/util/power.c
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// Created by rick on 03-03-21.
|
||||
//
|
||||
|
||||
#include <drivers/ports.h>
|
||||
#include <attributes.h>
|
||||
#include <libk/libk.h>
|
||||
#include "power.h"
|
||||
|
||||
void 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);
|
||||
k_panics("Failed to shut down!\n");
|
||||
}
|
||||
Reference in New Issue
Block a user