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

Commit 25216865 authored by Lans Zhang's avatar Lans Zhang Committed by Rafael J. Wysocki
Browse files

ACPI, APEI: Fixup incorrect 64-bit access width firmware bug



The bit width check was introduced by 15afae60 (ACPI, APEI: Fix
incorrect APEI register bit width check and usage), and a fixup
for incorrect 32-bit width memory address was given by f712c71f
(ACPI, APEI: Fixup common access width firmware bug). Now there
is a similar symptom:

[Firmware Bug]: APEI: Invalid bit width + offset in GAR [0x12345000/64/0/3/0]

Another bogus BIOS reports an incorrect 64-bit width in trigger table.
Thus, apply to a similar workaround for 64-bit width memory address.

Signed-off-by: default avatarLans Zhang <jia.zhang@windriver.com>
Acked-by: default avatarGary Hade <garyhade@us.ibm.com>
Acked-by: default avatarMyron Stowe <myron.stowe@redhat.com>
Acked-by: default avatarJean Delvare <jdelvare@suse.de>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent f427e5f1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -590,6 +590,9 @@ static int apei_check_gar(struct acpi_generic_address *reg, u64 *paddr,
	if (bit_width == 32 && bit_offset == 0 && (*paddr & 0x03) == 0 &&
	    *access_bit_width < 32)
		*access_bit_width = 32;
	else if (bit_width == 64 && bit_offset == 0 && (*paddr & 0x07) == 0 &&
	    *access_bit_width < 64)
		*access_bit_width = 64;

	if ((bit_width + bit_offset) > *access_bit_width) {
		pr_warning(FW_BUG APEI_PFX