Now detecting FADT
This commit is contained in:
parent
28e1a4278d
commit
8603f22bcf
|
@ -175,29 +175,41 @@ static inline void IoInitRXSDT(void)
|
|||
static inline void IoSearchAcpiTables(void)
|
||||
{
|
||||
SDTHeader *xrsdt = AcpiSDT;
|
||||
SDTHeader *cur = NULL;
|
||||
SDTHeader *table = NULL;
|
||||
uint *curInt = NULL;
|
||||
ulong *curLong = NULL;
|
||||
register char checksum;
|
||||
int entries;
|
||||
|
||||
if (IoACPIVersion == 1)
|
||||
if (IoACPIVersion == 1) {
|
||||
entries = (xrsdt->length - sizeof(xrsdt)) / 4;
|
||||
else
|
||||
} else {
|
||||
entries = (xrsdt->length - sizeof(xrsdt)) / 8;
|
||||
}
|
||||
|
||||
KernLog("\tACPI detected %d entries\n", entries);
|
||||
|
||||
curInt = &(xrsdt->sdtTablePtr);
|
||||
curLong = &(xrsdt->sdtTablePtr);
|
||||
|
||||
for (int i = 0; i < entries; i++) {
|
||||
|
||||
cur = (SDTHeader *)((ulong)(xrsdt->sdtTablePtr));
|
||||
table = &cur[i];
|
||||
if (IoACPIVersion == 1)
|
||||
table = (SDTHeader *)curInt[i];
|
||||
else
|
||||
table = (SDTHeader *)curLong[i];
|
||||
|
||||
// Checksum calculation
|
||||
//checksum = DoChecksum(table, (size_t)table->length, 0, 0);
|
||||
|
||||
//KernLog("Checksum : %d\n", (int)checksum);
|
||||
|
||||
KernLog("\tACPI System Table id %s [%p]\n", table->signature, table);
|
||||
//KernLog("\tACPI RSDT[%d] %p\n", i, table);
|
||||
if (MmIsBusyZone(table)) {
|
||||
checksum = DoChecksum(table, (size_t)table->length, 0, 0);
|
||||
if (!checksum) {
|
||||
KernLog("\tACPI System Table %s (OEM %s) length %d [%p]\n",
|
||||
table->signature,
|
||||
table->OEMID,
|
||||
table->length,
|
||||
table);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue