feat: expanded ACPI support, initial support for S3 sleep
This commit is contained in:
1 parent
39b0424085
commit
4c7efa3203
39 files changed
+4403
-59
No files matched your search
@@ -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";
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in new issue
Block a user