Skip to content

Commit

Permalink
Tables: Update FADT handling
Browse files Browse the repository at this point in the history
Update a warning message
simplify versioning for "table too big" case.
  • Loading branch information
acpibob committed Mar 9, 2016
1 parent f328263 commit bca0c4c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 10 additions & 7 deletions source/components/tables/tbfadt.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,15 +492,16 @@ AcpiTbCreateLocalFadt (

/*
* Check if the FADT is larger than the largest table that we expect
* (the ACPI 5.0 version). If so, truncate the table, and issue
* a warning.
* (typically the current ACPI specification version). If so, truncate
* the table, and issue a warning.
*/
if (Length > sizeof (ACPI_TABLE_FADT))
{
ACPI_BIOS_WARNING ((AE_INFO,
"FADT (revision %u) is longer than ACPI 5.0 version, "
"FADT (revision %u) is longer than %s length, "
"truncating length %u to %u",
Table->Revision, Length, (UINT32) sizeof (ACPI_TABLE_FADT)));
Table->Revision, ACPI_FADT_CONFORMANCE, Length,
(UINT32) sizeof (ACPI_TABLE_FADT)));
}

/* Clear the entire local FADT */
Expand Down Expand Up @@ -748,9 +749,11 @@ AcpiTbConvertFadt (
(!Address64->Address && 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));
"Optional FADT field %s has valid %s but zero %s: "
"0x%8.8X%8.8X/0x%X", Name,
(Length ? "Length" : "Address"),
(Length ? "Address": "Length"),
ACPI_FORMAT_UINT64 (Address64->Address), Length));
}
}
}
Expand Down
2 changes: 2 additions & 0 deletions source/include/actbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -521,4 +521,6 @@ typedef struct acpi_table_desc
#define ACPI_FADT_V5_SIZE (UINT32) (ACPI_FADT_OFFSET (HypervisorId))
#define ACPI_FADT_V6_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT))

#define ACPI_FADT_CONFORMANCE "ACPI 6.1 (FADT version 6)"

#endif /* __ACTBL_H__ */

0 comments on commit bca0c4c

Please sign in to comment.