Date: Mon, 25 Jan 2021 21:08:32 GMT From: Alexander Motin <mav@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 1b109c69ed62 - main - Decode NFIT Platform Capabilities. Message-ID: <202101252108.10PL8Wl7096793@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=1b109c69ed625ebf292c1d16f7a3efcab96722e5 commit 1b109c69ed625ebf292c1d16f7a3efcab96722e5 Author: Alexander Motin <mav@FreeBSD.org> AuthorDate: 2021-01-25 21:08:06 +0000 Commit: Alexander Motin <mav@FreeBSD.org> CommitDate: 2021-01-25 21:08:06 +0000 Decode NFIT Platform Capabilities. MFC after: 1 week --- usr.sbin/acpi/acpidump/acpi.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c index 27fe1de0a219..c573c02b7f92 100644 --- a/usr.sbin/acpi/acpidump/acpi.c +++ b/usr.sbin/acpi/acpidump/acpi.c @@ -1562,7 +1562,8 @@ static const char *nfit_types[] = { [ACPI_NFIT_TYPE_SMBIOS] = "SMBIOS", [ACPI_NFIT_TYPE_CONTROL_REGION] = "Control Region", [ACPI_NFIT_TYPE_DATA_REGION] = "Data Region", - [ACPI_NFIT_TYPE_FLUSH_ADDRESS] = "Flush Address" + [ACPI_NFIT_TYPE_FLUSH_ADDRESS] = "Flush Address", + [ACPI_NFIT_TYPE_CAPABILITIES] = "Platform Capabilities" }; @@ -1579,6 +1580,7 @@ acpi_print_nfit(ACPI_NFIT_HEADER *nfit) ACPI_NFIT_CONTROL_REGION *ctlreg; ACPI_NFIT_DATA_REGION *datareg; ACPI_NFIT_FLUSH_ADDRESS *fladdr; + ACPI_NFIT_CAPABILITIES *caps; if (nfit->Type < nitems(nfit_types)) printf("\tType=%s\n", nfit_types[nfit->Type]); @@ -1709,6 +1711,20 @@ acpi_print_nfit(ACPI_NFIT_HEADER *nfit) printf("\tHintCount=%u\n", (u_int)fladdr->HintCount); /* XXX fladdr->HintAddress[i] output is not supported */ break; + case ACPI_NFIT_TYPE_CAPABILITIES: + caps = (ACPI_NFIT_CAPABILITIES *)nfit; + printf("\tHighestCapability=%u\n", (u_int)caps->HighestCapability); + +#define PRINTFLAG(var, flag) printflag((var), ACPI_NFIT_CAPABILITY_## flag, #flag) + + printf("\tCapabilities="); + PRINTFLAG(caps->Capabilities, CACHE_FLUSH); + PRINTFLAG(caps->Capabilities, MEM_FLUSH); + PRINTFLAG(caps->Capabilities, MEM_MIRRORING); + PRINTFLAG_END(); + +#undef PRINTFLAG + break; } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202101252108.10PL8Wl7096793>