git: 9644bc4a1126 - stable/13 - Decode couple arrays in NFIT table.

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Fri, 26 Aug 2022 02:50:01 UTC
The branch stable/13 has been updated by mav:

URL: https://cgit.FreeBSD.org/src/commit/?id=9644bc4a112615ba9ad6b7db3095ef399be5ca7b

commit 9644bc4a112615ba9ad6b7db3095ef399be5ca7b
Author:     Alexander Motin <mav@FreeBSD.org>
AuthorDate: 2022-08-19 01:30:38 +0000
Commit:     Alexander Motin <mav@FreeBSD.org>
CommitDate: 2022-08-26 02:49:39 +0000

    Decode couple arrays in NFIT table.
    
    MFC after:      1 week
    
    (cherry picked from commit 3b7935f33b50aa69637e722c3d3fd275c0efd3cd)
---
 usr.sbin/acpi/acpidump/acpi.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/usr.sbin/acpi/acpidump/acpi.c b/usr.sbin/acpi/acpidump/acpi.c
index c560a38411ba..6f758e60a176 100644
--- a/usr.sbin/acpi/acpidump/acpi.c
+++ b/usr.sbin/acpi/acpidump/acpi.c
@@ -1578,7 +1578,7 @@ static void
 acpi_print_nfit(ACPI_NFIT_HEADER *nfit)
 {
 	char *uuidstr;
-	uint32_t status;
+	uint32_t m, status;
 
 	ACPI_NFIT_SYSTEM_ADDRESS *sysaddr;
 	ACPI_NFIT_MEMORY_MAP *mmap;
@@ -1655,7 +1655,10 @@ acpi_print_nfit(ACPI_NFIT_HEADER *nfit)
 		    (u_int)ileave->InterleaveIndex);
 		printf("\tLineCount=%u\n", (u_int)ileave->LineCount);
 		printf("\tLineSize=%u\n", (u_int)ileave->LineSize);
-		/* XXX ileave->LineOffset[i] output is not supported */
+		for (m = 0; m < ileave->LineCount; m++) {
+			printf("\tLine%uOffset=0x%08x\n", (u_int)m + 1,
+			    (u_int)ileave->LineOffset[m]);
+		}
 		break;
 	case ACPI_NFIT_TYPE_SMBIOS:
 		smbios = (ACPI_NFIT_SMBIOS *)nfit;
@@ -1716,7 +1719,10 @@ acpi_print_nfit(ACPI_NFIT_HEADER *nfit)
 		fladdr = (ACPI_NFIT_FLUSH_ADDRESS *)nfit;
 		printf("\tDeviceHandle=%u\n", (u_int)fladdr->DeviceHandle);
 		printf("\tHintCount=%u\n", (u_int)fladdr->HintCount);
-		/* XXX fladdr->HintAddress[i] output is not supported */
+		for (m = 0; m < fladdr->HintCount; m++) {
+			printf("\tHintAddress%u=0x%016jx\n", (u_int)m + 1,
+			    (uintmax_t)fladdr->HintAddress[m]);
+		}
 		break;
 	case ACPI_NFIT_TYPE_CAPABILITIES:
 		caps = (ACPI_NFIT_CAPABILITIES *)nfit;