mirror of
https://github.com/JannisHeydemann/BoredOS.git
synced 2026-05-30 02:16:58 +00:00
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:
committed by
GitHub
parent
77744464e3
commit
b85bb900e6
25
src/drivers/acpi.h
Normal file
25
src/drivers/acpi.h
Normal 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
|
||||
Reference in New Issue
Block a user