pr: ACPI Power Shutdown Implemented (#14)

* Flush PS/2 Devices on boot to avoid Locking dependent on the out buffer on real hardware / emulated PS2 over USB

Removed Slow and Unnessisarty flipping causing kconsole write slowdowns consequently speeding up the boot process

* sod wc

* ignoring dynamically created objects, added make run rule which will automatically detect the platform and then use the correct platform rule

* ACPI Power Shutdown
This commit is contained in:
Myles "Mellurboo" Wilson
2026-05-10 20:16:54 +01:00
committed by GitHub
parent 77744464e3
commit b85bb900e6
11 changed files with 516 additions and 98 deletions

25
src/drivers/acpi.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef ACPI_H
#define ACPI_H
int acpi_init(void);
__attribute__((noreturn)) void acpi_shutdown(void);
__attribute__((noreturn)) void acpi_reboot(void);
uint32_t acpi_irq_to_gsi(uint32_t irq);
uint16_t acpi_irq_flags(uint32_t irq);
//power stuff
#define PM1A_CNT fadt->pm1a_cnt_blk
#define PM1B_CNT fadt->pm1b_cnt_blk
#define ACPI_S5 0x5
#define SLP_EN (1 << 13)
#define ACPI_PM1_SLEEP_CMD(slp_typ) (((slp_typ) << 10) | SLP_EN)
void acpi_parse_s5(void);
__attribute__((noreturn)) void acpi_shutdown(void);
#endif