git: 0f763fade1af - stable/12 - Decode NFIT Platform Capabilities.
Alexander Motin
mav at FreeBSD.org
Mon Feb 1 01:54:06 UTC 2021
The branch stable/12 has been updated by mav:
URL: https://cgit.FreeBSD.org/src/commit/?id=0f763fade1af150b0c977c3c626fa1c38856956b
commit 0f763fade1af150b0c977c3c626fa1c38856956b
Author: Alexander Motin <mav at FreeBSD.org>
AuthorDate: 2021-01-25 21:08:06 +0000
Commit: Alexander Motin <mav at FreeBSD.org>
CommitDate: 2021-02-01 01:53:57 +0000
Decode NFIT Platform Capabilities.
(cherry picked from commit 1b109c69ed625ebf292c1d16f7a3efcab96722e5)
---
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 61bdad11eb17..f0ba4ee73e84 100644
--- a/usr.sbin/acpi/acpidump/acpi.c
+++ b/usr.sbin/acpi/acpidump/acpi.c
@@ -1556,7 +1556,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"
};
@@ -1573,6 +1574,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]);
@@ -1703,6 +1705,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;
}
}
More information about the dev-commits-src-all
mailing list