Date: Mon, 18 May 2020 15:05:59 +0000 (UTC) From: Andrew Turner <andrew@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r361216 - head/usr.sbin/acpi/acpidump Message-ID: <202005181505.04IF5x0U073521@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: andrew Date: Mon May 18 15:05:59 2020 New Revision: 361216 URL: https://svnweb.freebsd.org/changeset/base/361216 Log: Allow the FACS and XFACS to be zero in acpidump. These are allowed to be zero when the hardware reduced APCI flag is set Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D23207 Modified: head/usr.sbin/acpi/acpidump/acpi.c Modified: head/usr.sbin/acpi/acpidump/acpi.c ============================================================================== --- head/usr.sbin/acpi/acpidump/acpi.c Mon May 18 15:03:52 2020 (r361215) +++ head/usr.sbin/acpi/acpidump/acpi.c Mon May 18 15:05:59 2020 (r361216) @@ -245,6 +245,7 @@ acpi_handle_fadt(ACPI_TABLE_HEADER *sdp) ACPI_TABLE_HEADER *dsdp; ACPI_TABLE_FACS *facs; ACPI_TABLE_FADT *fadt; + vm_offset_t addr; int fadt_revision; fadt = (ACPI_TABLE_FADT *)sdp; @@ -252,12 +253,17 @@ acpi_handle_fadt(ACPI_TABLE_HEADER *sdp) fadt_revision = acpi_get_fadt_revision(fadt); if (fadt_revision == 1) - facs = (ACPI_TABLE_FACS *)acpi_map_sdt(fadt->Facs); + addr = fadt->Facs; else - facs = (ACPI_TABLE_FACS *)acpi_map_sdt(fadt->XFacs); - if (memcmp(facs->Signature, ACPI_SIG_FACS, 4) != 0 || facs->Length < 64) - errx(1, "FACS is corrupt"); - acpi_print_facs(facs); + addr = fadt->XFacs; + if (addr != 0) { + facs = (ACPI_TABLE_FACS *)acpi_map_sdt(addr); + + if (memcmp(facs->Signature, ACPI_SIG_FACS, 4) != 0 || + facs->Length < 64) + errx(1, "FACS is corrupt"); + acpi_print_facs(facs); + } if (fadt_revision == 1) dsdp = (ACPI_TABLE_HEADER *)acpi_map_sdt(fadt->Dsdt);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202005181505.04IF5x0U073521>