Decode NFIT Platform Capabilities.

MFC after:	1 week
This commit is contained in:
Alexander Motin 2021-01-25 16:08:06 -05:00
parent dcd1e41f0c
commit 1b109c69ed

View File

@ -1562,7 +1562,8 @@ static const char *nfit_types[] = {
[ACPI_NFIT_TYPE_SMBIOS] = "SMBIOS", [ACPI_NFIT_TYPE_SMBIOS] = "SMBIOS",
[ACPI_NFIT_TYPE_CONTROL_REGION] = "Control Region", [ACPI_NFIT_TYPE_CONTROL_REGION] = "Control Region",
[ACPI_NFIT_TYPE_DATA_REGION] = "Data 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_CONTROL_REGION *ctlreg;
ACPI_NFIT_DATA_REGION *datareg; ACPI_NFIT_DATA_REGION *datareg;
ACPI_NFIT_FLUSH_ADDRESS *fladdr; ACPI_NFIT_FLUSH_ADDRESS *fladdr;
ACPI_NFIT_CAPABILITIES *caps;
if (nfit->Type < nitems(nfit_types)) if (nfit->Type < nitems(nfit_types))
printf("\tType=%s\n", nfit_types[nfit->Type]); 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); printf("\tHintCount=%u\n", (u_int)fladdr->HintCount);
/* XXX fladdr->HintAddress[i] output is not supported */ /* XXX fladdr->HintAddress[i] output is not supported */
break; 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;
} }
} }