aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/acpi
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2021-10-20 09:19:55 +0000
committerAndrew Turner <andrew@FreeBSD.org>2021-12-14 10:58:01 +0000
commitefa206137718f4881518a69e7760685a1f751a8f (patch)
treecdccd180df3148fc1993374e25f420c1c7a76a7e /usr.sbin/acpi
parentaa3b5d79b2acc508cca63c24251d65f4d2d76fa5 (diff)
downloadsrc-efa206137718f4881518a69e7760685a1f751a8f.tar.gz
src-efa206137718f4881518a69e7760685a1f751a8f.zip
Only change the fadt revision in acpidump on i386
There is a workaround in acpidump for an old IBM laptop. This is being hit on a modern arm64 system causing acpidump to use the wrong field when reading a later address. As the laptop has a 32-bit CPU the only FreeBSD support for it is i386. As such limit the workaround to that architecture. Reviewed by: emaste, jkim, jhb (all earlier version) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D32573 (cherry picked from commit 01593a0ff9f16e2cb23ab2ebc4ca3b8bd2434425)
Diffstat (limited to 'usr.sbin/acpi')
-rw-r--r--usr.sbin/acpi/acpidump/acpi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c
index adb5b968f441..0e91a85f6a90 100644
--- a/usr.sbin/acpi/acpidump/acpi.c
+++ b/usr.sbin/acpi/acpidump/acpi.c
@@ -219,16 +219,22 @@ acpi_get_fadt_revision(ACPI_TABLE_FADT *fadt)
if (addr_size == 8) {
fadt_revision = 2;
+#if defined(__i386__)
/*
* A few systems (e.g., IBM T23) have an RSDP that claims
* revision 2 but the 64 bit addresses are invalid. If
* revision 2 and the 32 bit address is non-zero but the
* 32 and 64 bit versions don't match, prefer the 32 bit
* version for all subsequent tables.
+ *
+ * The only known ACPI systems this affects are early
+ * implementations on 32-bit x86. Because of this limit the
+ * workaround to i386.
*/
if (fadt->Facs != 0 &&
(fadt->XFacs & 0xffffffff) != fadt->Facs)
fadt_revision = 1;
+#endif
} else
fadt_revision = 1;
return (fadt_revision);