Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b94cd811 authored by Bob Moore's avatar Bob Moore Committed by Rafael J. Wysocki
Browse files

ACPICA: Tables: Update FADT handling

ACPICA commit bca0c4cb063ee488c543e6f160fe89679a2338d6

Update a warning message
simplify versioning for "table too big" case.

Link: https://github.com/acpica/acpica/commit/bca0c4cb


Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLv Zheng <lv.zheng@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 3a9ca4d5
Loading
Loading
Loading
Loading
+11 −7
Original line number Original line Diff line number Diff line
@@ -385,14 +385,15 @@ void acpi_tb_create_local_fadt(struct acpi_table_header *table, u32 length)
{
{
	/*
	/*
	 * Check if the FADT is larger than the largest table that we expect
	 * 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
	 * (typically the current ACPI specification version). If so, truncate
	 * a warning.
	 * the table, and issue a warning.
	 */
	 */
	if (length > sizeof(struct acpi_table_fadt)) {
	if (length > sizeof(struct acpi_table_fadt)) {
		ACPI_BIOS_WARNING((AE_INFO,
		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",
				   "truncating length %u to %u",
				   table->revision, length,
				   table->revision, ACPI_FADT_CONFORMANCE,
				   length,
				   (u32)sizeof(struct acpi_table_fadt)));
				   (u32)sizeof(struct acpi_table_fadt)));
	}
	}


@@ -646,9 +647,12 @@ static void acpi_tb_convert_fadt(void)
			if ((address64->address && !length) ||
			if ((address64->address && !length) ||
			    (!address64->address && length)) {
			    (!address64->address && length)) {
				ACPI_BIOS_WARNING((AE_INFO,
				ACPI_BIOS_WARNING((AE_INFO,
						   "Optional FADT field %s has zero address or length: "
						   "Optional FADT field %s has valid %s but zero %s: "
						   "0x%8.8X%8.8X/0x%X",
						   "0x%8.8X%8.8X/0x%X", name,
						   name,
						   (length ? "Length" :
						    "Address"),
						   (length ? "Address" :
						    "Length"),
						   ACPI_FORMAT_UINT64
						   ACPI_FORMAT_UINT64
						   (address64->address),
						   (address64->address),
						   length));
						   length));
+3 −1
Original line number Original line Diff line number Diff line
@@ -223,7 +223,7 @@ struct acpi_table_facs {
/*******************************************************************************
/*******************************************************************************
 *
 *
 * FADT - Fixed ACPI Description Table (Signature "FACP")
 * FADT - Fixed ACPI Description Table (Signature "FACP")
 *        Version 4
 *        Version 6
 *
 *
 ******************************************************************************/
 ******************************************************************************/


@@ -413,4 +413,6 @@ struct acpi_table_desc {
#define ACPI_FADT_V5_SIZE       (u32) (ACPI_FADT_OFFSET (hypervisor_id))
#define ACPI_FADT_V5_SIZE       (u32) (ACPI_FADT_OFFSET (hypervisor_id))
#define ACPI_FADT_V6_SIZE       (u32) (sizeof (struct acpi_table_fadt))
#define ACPI_FADT_V6_SIZE       (u32) (sizeof (struct acpi_table_fadt))


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

#endif				/* __ACTBL_H__ */
#endif				/* __ACTBL_H__ */