feat: expanded ACPI support, initial support for S3 sleep
This commit is contained in:
@@ -58,14 +58,34 @@ namespace Hal {
|
||||
result.DsdtAddress = fadt->Dsdt;
|
||||
}
|
||||
|
||||
// FACS address (for waking vector)
|
||||
if (fadt->Header.Length >= offsetof(Table, X_FirmwareControl) + 8 && fadt->X_FirmwareControl != 0) {
|
||||
result.FacsAddress = fadt->X_FirmwareControl;
|
||||
} else {
|
||||
result.FacsAddress = fadt->FirmwareCtrl;
|
||||
}
|
||||
|
||||
result.PM1aEventBlock = fadt->PM1aEventBlock;
|
||||
result.PM1bEventBlock = fadt->PM1bEventBlock;
|
||||
result.PM1aControlBlock = fadt->PM1aControlBlock;
|
||||
result.PM1bControlBlock = fadt->PM1bControlBlock;
|
||||
result.PM2ControlBlock = fadt->PM2ControlBlock;
|
||||
result.PMTimerBlock = fadt->PMTimerBlock;
|
||||
result.GPE0Block = fadt->GPE0Block;
|
||||
result.GPE1Block = fadt->GPE1Block;
|
||||
result.SMI_CommandPort = fadt->SMI_CommandPort;
|
||||
result.SCI_Interrupt = fadt->SCI_Interrupt;
|
||||
result.PM1EventLength = fadt->PM1EventLength;
|
||||
result.GPE0Length = fadt->GPE0Length;
|
||||
result.GPE1Length = fadt->GPE1Length;
|
||||
result.AcpiEnable = fadt->AcpiEnable;
|
||||
result.AcpiDisable = fadt->AcpiDisable;
|
||||
result.Flags = fadt->Flags;
|
||||
result.Valid = true;
|
||||
|
||||
KernelLogStream(INFO, "FADT") << "DSDT at " << base::hex << result.DsdtAddress;
|
||||
KernelLogStream(INFO, "FADT") << "FACS at " << base::hex << result.FacsAddress;
|
||||
KernelLogStream(INFO, "FADT") << "PM1a_EVT_BLK: " << base::hex << (uint64_t)result.PM1aEventBlock;
|
||||
KernelLogStream(INFO, "FADT") << "PM1a_CNT_BLK: " << base::hex << (uint64_t)result.PM1aControlBlock;
|
||||
|
||||
if (result.PM1bControlBlock != 0) {
|
||||
|
||||
Reference in New Issue
Block a user