mirror of
https://github.com/subhobhai943/SUB-OS.git
synced 2026-10-26 09:02:46 +00:00
feat: Massive OS expansion with IPC, Sound & TTS, Block layer, FAT32/ext2/sysfs, Signals, Syscalls, Modules, Drivers & 50+ LazyBox applets
This commit is contained in:
1 parent
5662be29f5
commit
d680335f05
64 files changed
+2370
-166
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#include <drivers/acpi.h>
|
||||
#include <arch/x86_64/io.h>
|
||||
#include <arch/x86_64/pit.h>
|
||||
#include <kernel/printk.h>
|
||||
|
||||
void acpi_init(void) {
|
||||
printk(KERN_INFO "ACPI: Advanced Configuration & Power Interface subsystem initialized\n");
|
||||
}
|
||||
|
||||
void acpi_poweroff(void) {
|
||||
printk(KERN_INFO "ACPI: Entering S5 Soft-Off State...\n");
|
||||
pit_sleep(100);
|
||||
outw(0x604, 0x2000); // QEMU Poweroff
|
||||
outw(0xB004, 0x2000); // Bochs Poweroff
|
||||
outw(0x4004, 0x3400); // VirtualBox Poweroff
|
||||
}
|
||||
|
||||
void acpi_reboot(void) {
|
||||
printk(KERN_INFO "ACPI: Triggering system reset...\n");
|
||||
pit_sleep(100);
|
||||
outb(0x64, 0xFE); // 8042 Keyboard controller pulse
|
||||
outb(0xCF9, 0x06); // PCI reset
|
||||
}
|
||||
Reference in new issue
Block a user