feat: added shutdown command

This commit is contained in:
2021-03-03 22:12:37 +01:00
parent c9102fbc65
commit 300e80c2e8
6 changed files with 71 additions and 25 deletions

View File

@@ -6,6 +6,17 @@
#define PORT_PIC_SLAVE_COMMAND 0xA0
#define PORT_PIC_SLAVE_DATA 0xA1
// https://wiki.osdev.org/PIT
#define PORT_PIT_COMMAND 0x43
#define PORT_PIT_DATA_0 0x40
#define PORT_PIT_DATA_1 0x41
#define PORT_PIT_DATA_3 0x42
// https://wiki.osdev.org/%228042%22_PS/2_Controller
#define PORT_PS2_DATA 0x60
#define PORT_PS2_STATUS 0x64
#define PORT_PS2_COMMAND 0x64
//http://www.osdever.net/FreeVGA/vga/crtcreg.htm#0A
#define PORT_REG_SCREEN_CTRL 0x3d4
#define PORT_REG_SCREEN_CTRL_CURSOR_H 0x0E
@@ -29,16 +40,14 @@
#define PORT_SERIAL_MODEM_STATUS 6
#define PORT_SERIAL_SCRATCH 6
// https://wiki.osdev.org/PIT
#define PORT_PIT_COMMAND 0x43
#define PORT_PIT_DATA_0 0x40
#define PORT_PIT_DATA_1 0x41
#define PORT_PIT_DATA_3 0x42
#define PORT_ACPI 0xB004
#define PORT_ACPI_SHUTDOWN 0x2000
// https://wiki.osdev.org/%228042%22_PS/2_Controller
#define PORT_PS2_DATA 0x60
#define PORT_PS2_STATUS 0x64
#define PORT_PS2_COMMAND 0x64
#define PORT_QEMU_COMMAND 0x604
#define PORT_QEMU_COMMAND_SHUTDOWN 0x2000
#define PORT_VBOX 0x4004
#define PORT_VBOX_SHUTDOWN 0x3400
// https://wiki.osdev.org/PCI
#define PORT_PCI_CONFIG_ADDRESS (0xCF8)