Date: Tue, 14 Dec 2021 11:07:23 GMT From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: efa206137718 - stable/13 - Only change the fadt revision in acpidump on i386 Message-ID: <202112141107.1BEB7Ncc040274@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=efa206137718f4881518a69e7760685a1f751a8f commit efa206137718f4881518a69e7760685a1f751a8f Author: Andrew Turner <andrew@FreeBSD.org> AuthorDate: 2021-10-20 09:19:55 +0000 Commit: Andrew Turner <andrew@FreeBSD.org> CommitDate: 2021-12-14 10:58:01 +0000 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) --- usr.sbin/acpi/acpidump/acpi.c | 6 ++++++ 1 file changed, 6 insertions(+) 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202112141107.1BEB7Ncc040274>