Table manager: deploy new firmware error/warning interfaces.

Emit firmware error/warning messages where appropriate for table
and FADT errors.
This commit is contained in:
Robert Moore 2012-06-27 13:24:33 -07:00
parent 2b8106e4c2
commit 57d81a1b09
4 changed files with 29 additions and 24 deletions

View File

@ -410,7 +410,7 @@ AcpiTbCreateLocalFadt (
*/
if (Length > sizeof (ACPI_TABLE_FADT))
{
ACPI_WARNING ((AE_INFO,
ACPI_BIOS_WARNING ((AE_INFO,
"FADT (revision %u) is longer than ACPI 5.0 version, "
"truncating length %u to %u",
Table->Revision, Length, (UINT32) sizeof (ACPI_TABLE_FADT)));
@ -558,8 +558,9 @@ AcpiTbConvertFadt (
if (Address64->Address && Address32 &&
(Address64->Address != (UINT64) Address32))
{
ACPI_ERROR ((AE_INFO,
"32/64X address mismatch in %s: 0x%8.8X/0x%8.8X%8.8X, using 32",
ACPI_BIOS_ERROR ((AE_INFO,
"32/64X address mismatch in FADT/%s: "
"0x%8.8X/0x%8.8X%8.8X, using 32",
FadtInfoTable[i].Name, Address32,
ACPI_FORMAT_UINT64 (Address64->Address)));
}
@ -618,7 +619,7 @@ AcpiTbValidateFadt (
if (AcpiGbl_FADT.Facs &&
(AcpiGbl_FADT.XFacs != (UINT64) AcpiGbl_FADT.Facs))
{
ACPI_WARNING ((AE_INFO,
ACPI_BIOS_WARNING ((AE_INFO,
"32/64X FACS address mismatch in FADT - "
"0x%8.8X/0x%8.8X%8.8X, using 32",
AcpiGbl_FADT.Facs, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XFacs)));
@ -629,7 +630,7 @@ AcpiTbValidateFadt (
if (AcpiGbl_FADT.Dsdt &&
(AcpiGbl_FADT.XDsdt != (UINT64) AcpiGbl_FADT.Dsdt))
{
ACPI_WARNING ((AE_INFO,
ACPI_BIOS_WARNING ((AE_INFO,
"32/64X DSDT address mismatch in FADT - "
"0x%8.8X/0x%8.8X%8.8X, using 32",
AcpiGbl_FADT.Dsdt, ACPI_FORMAT_UINT64 (AcpiGbl_FADT.XDsdt)));
@ -665,8 +666,8 @@ AcpiTbValidateFadt (
if (Address64->Address &&
(Address64->BitWidth != ACPI_MUL_8 (Length)))
{
ACPI_WARNING ((AE_INFO,
"32/64X length mismatch in %s: %u/%u",
ACPI_BIOS_WARNING ((AE_INFO,
"32/64X length mismatch in FADT/%s: %u/%u",
Name, ACPI_MUL_8 (Length), Address64->BitWidth));
}
@ -678,9 +679,9 @@ AcpiTbValidateFadt (
*/
if (!Address64->Address || !Length)
{
ACPI_ERROR ((AE_INFO,
"Required field %s has zero address and/or length:"
" 0x%8.8X%8.8X/0x%X",
ACPI_BIOS_ERROR ((AE_INFO,
"Required FADT field %s has zero address and/or length: "
"0x%8.8X%8.8X/0x%X",
Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
}
}
@ -694,8 +695,8 @@ AcpiTbValidateFadt (
if ((Address64->Address && !Length) ||
(!Address64->Address && Length))
{
ACPI_WARNING ((AE_INFO,
"Optional field %s has zero address or length: "
ACPI_BIOS_WARNING ((AE_INFO,
"Optional FADT field %s has zero address or length: "
"0x%8.8X%8.8X/0x%X",
Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
}
@ -746,8 +747,8 @@ AcpiTbSetupFadtRegisters (
(FadtInfoTable[i].DefaultLength > 0) &&
(FadtInfoTable[i].DefaultLength != Target64->BitWidth))
{
ACPI_WARNING ((AE_INFO,
"Invalid length for %s: %u, using default %u",
ACPI_BIOS_WARNING ((AE_INFO,
"Invalid length for FADT/%s: %u, using default %u",
FadtInfoTable[i].Name, Target64->BitWidth,
FadtInfoTable[i].DefaultLength));

View File

@ -229,8 +229,9 @@ AcpiTbAddTable (
(!ACPI_COMPARE_NAME (TableDesc->Pointer->Signature, ACPI_SIG_SSDT)) &&
(ACPI_STRNCMP (TableDesc->Pointer->Signature, "OEM", 3)))
{
ACPI_ERROR ((AE_INFO,
"Table has invalid signature [%4.4s] (0x%8.8X), must be SSDT or OEMx",
ACPI_BIOS_ERROR ((AE_INFO,
"Table has invalid signature [%4.4s] (0x%8.8X), "
"must be SSDT or OEMx",
AcpiUtValidAcpiName (*(UINT32 *) TableDesc->Pointer->Signature) ?
TableDesc->Pointer->Signature : "????",
*(UINT32 *) TableDesc->Pointer->Signature));

View File

@ -359,8 +359,9 @@ AcpiTbVerifyChecksum (
if (Checksum)
{
ACPI_WARNING ((AE_INFO,
"Incorrect checksum in table [%4.4s] - 0x%2.2X, should be 0x%2.2X",
ACPI_BIOS_WARNING ((AE_INFO,
"Incorrect checksum in table [%4.4s] - 0x%2.2X, "
"should be 0x%2.2X",
Table->Signature, Table->Checksum,
(UINT8) (Table->Checksum - Checksum)));
@ -428,8 +429,9 @@ AcpiTbCheckDsdtHeader (
if (AcpiGbl_OriginalDsdtHeader.Length != AcpiGbl_DSDT->Length ||
AcpiGbl_OriginalDsdtHeader.Checksum != AcpiGbl_DSDT->Checksum)
{
ACPI_ERROR ((AE_INFO,
"The DSDT has been corrupted or replaced - old, new headers below"));
ACPI_BIOS_ERROR ((AE_INFO,
"The DSDT has been corrupted or replaced - "
"old, new headers below"));
AcpiTbPrintTableHeader (0, &AcpiGbl_OriginalDsdtHeader);
AcpiTbPrintTableHeader (0, AcpiGbl_DSDT);
@ -537,7 +539,7 @@ AcpiTbInstallTable (
if (Signature &&
!ACPI_COMPARE_NAME (Table->Signature, Signature))
{
ACPI_ERROR ((AE_INFO,
ACPI_BIOS_ERROR ((AE_INFO,
"Invalid signature 0x%X for ACPI table, expected [%s]",
*ACPI_CAST_PTR (UINT32, Table->Signature), Signature));
goto UnmapAndExit;
@ -656,7 +658,7 @@ AcpiTbGetRootTableEntry (
{
/* Will truncate 64-bit address to 32 bits, issue warning */
ACPI_WARNING ((AE_INFO,
ACPI_BIOS_WARNING ((AE_INFO,
"64-bit Physical Address in XSDT is too large (0x%8.8X%8.8X),"
" truncating",
ACPI_FORMAT_UINT64 (Address64)));
@ -758,7 +760,8 @@ AcpiTbParseRootTable (
if (Length < sizeof (ACPI_TABLE_HEADER))
{
ACPI_ERROR ((AE_INFO, "Invalid length 0x%X in RSDT/XSDT", Length));
ACPI_BIOS_ERROR ((AE_INFO,
"Invalid table length 0x%X in RSDT/XSDT", Length));
return_ACPI_STATUS (AE_INVALID_TABLE_LENGTH);
}

View File

@ -306,7 +306,7 @@ AcpiFindRootPointer (
/* A valid RSDP was not found */
ACPI_ERROR ((AE_INFO, "A valid RSDP was not found"));
ACPI_BIOS_ERROR ((AE_INFO, "A valid RSDP was not found"));
return_ACPI_STATUS (AE_NOT_FOUND);
}