feat: expanded ACPI support, initial support for S3 sleep

This commit is contained in:
daniel committed 2026-03-15 00:55:19 +01:00
1 parent 39b0424085
commit 4c7efa3203
39 files changed
+4403 -59

No files matched your search

+25
View File
@@ -63,6 +63,31 @@ namespace Drivers::PS2 {
return g_DualChannel;
}
void Reinitialize() {
// Flush any stale data from the output buffer
FlushOutputBuffer();
// Re-enable both ports
SendCommand(CmdEnablePort1);
if (g_DualChannel) {
SendCommand(CmdEnablePort2);
}
// Re-enable interrupts and translation in the config byte
SendCommand(CmdReadConfig);
uint8_t config = ReadData();
config |= ConfigPort1Interrupt | ConfigPort1Translation;
if (g_DualChannel) {
config |= ConfigPort2Interrupt;
}
SendCommand(CmdWriteConfig);
SendData(config);
Kt::KernelLogStream(Kt::OK, "PS2") << "Controller re-enabled after S3 resume";
}
void Initialize() {
Kt::KernelLogStream(Kt::INFO, "PS2") << "Initializing PS/2 controller";
+5
View File
@@ -43,6 +43,11 @@ namespace Drivers::PS2 {
void Initialize();
// Lightweight re-enable after S3 resume. Skips the full self-test
// and port-test sequence (which can reset attached devices); just
// re-enables ports and interrupts so keyboard/mouse work again.
void Reinitialize();
void SendCommand(uint8_t command);
void SendData(uint8_t data);
uint8_t ReadData();