forked from xt-sys/exectos
Fix AcGetAcpiTable() routine failing to validate FADT checksum on some ACPI 2.0 and older machines
This commit is contained in:
parent
9124574bc5
commit
f265810a5c
@ -148,18 +148,36 @@ AcGetAcpiTable(IN CONST UINT Signature,
|
||||
}
|
||||
|
||||
/* Verify table signature and checksum */
|
||||
if((TableHeader->Signature == Signature) && (AcpChecksumTable(TableHeader, TableHeader->Length) == 0))
|
||||
if((TableHeader->Signature == Signature))
|
||||
{
|
||||
/* Found valid ACPI table */
|
||||
*AcpiTable = TableHeader;
|
||||
return STATUS_EFI_SUCCESS;
|
||||
/* Found requested ACPI table */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* ACPI table not found */
|
||||
/* Make sure table was found */
|
||||
if(TableHeader->Signature != Signature)
|
||||
{
|
||||
/* ACPI table not found, return error */
|
||||
return STATUS_EFI_NOT_FOUND;
|
||||
}
|
||||
|
||||
/* Don't validate FADT on old, broken firmwares with ACPI 2.0 or older */
|
||||
if(TableHeader->Signature != ACPI_FADT_SIGNATURE || TableHeader->Revision > 2)
|
||||
{
|
||||
/* Validate table checksum */
|
||||
if(AcpChecksumTable(TableHeader, TableHeader->Length) != 0)
|
||||
{
|
||||
/* Checksum mismatch, return error */
|
||||
return STATUS_EFI_CRC_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
/* Found valid ACPI table, return success */
|
||||
*AcpiTable = TableHeader;
|
||||
return STATUS_EFI_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the Advanced Programmable Interrupt Controller (APIC) base address.
|
||||
*
|
||||
|
Loading…
Reference in New Issue
Block a user