Add support for parsing the Watchdog Descriptor Table (WDDT)

Sponsored by:	Netflix
This commit is contained in:
scottl 2017-09-15 15:41:07 +00:00
parent d0e4a8e28e
commit 83dc8569c7
2 changed files with 38 additions and 0 deletions

View File

@ -65,6 +65,7 @@ static void acpi_handle_ecdt(ACPI_TABLE_HEADER *sdp);
static void acpi_handle_hpet(ACPI_TABLE_HEADER *sdp);
static void acpi_handle_mcfg(ACPI_TABLE_HEADER *sdp);
static void acpi_handle_slit(ACPI_TABLE_HEADER *sdp);
static void acpi_handle_wddt(ACPI_TABLE_HEADER *sdp);
static void acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain,
uint32_t flags);
static void acpi_print_srat_memory(ACPI_SRAT_MEM_AFFINITY *mp);
@ -678,6 +679,40 @@ acpi_handle_slit(ACPI_TABLE_HEADER *sdp)
printf(END_COMMENT);
}
static void
acpi_handle_wddt(ACPI_TABLE_HEADER *sdp)
{
ACPI_TABLE_WDDT *wddt;
printf(BEGIN_COMMENT);
acpi_print_sdt(sdp);
wddt = (ACPI_TABLE_WDDT *)sdp;
printf("\tSpecVersion=0x%04x, TableVersion=0x%04x\n",
wddt->SpecVersion, wddt->TableVersion);
printf("\tPciVendorId=0x%04x, Address=", wddt->PciVendorId);
acpi_print_gas(&wddt->Address);
printf("\n\tMaxCount=%u, MinCount=%u, Period=%ums\n",
wddt->MaxCount, wddt->MinCount, wddt->Period);
#define PRINTFLAG(var, flag) printflag((var), ACPI_WDDT_## flag, #flag)
printf("\tStatus=");
PRINTFLAG(wddt->Status, AVAILABLE);
PRINTFLAG(wddt->Status, ACTIVE);
PRINTFLAG(wddt->Status, TCO_OS_OWNED);
PRINTFLAG(wddt->Status, USER_RESET);
PRINTFLAG(wddt->Status, WDT_RESET);
PRINTFLAG(wddt->Status, POWER_FAIL);
PRINTFLAG(wddt->Status, UNKNOWN_RESET);
PRINTFLAG_END();
printf("\tCapability=");
PRINTFLAG(wddt->Capability, AUTO_RESET);
PRINTFLAG(wddt->Capability, ALERT_SUPPORT);
PRINTFLAG_END();
#undef PRINTFLAG
printf(END_COMMENT);
}
static void
acpi_print_srat_cpu(uint32_t apic_id, uint32_t proximity_domain,
uint32_t flags)
@ -1654,6 +1689,8 @@ acpi_handle_rsdt(ACPI_TABLE_HEADER *rsdp)
acpi_handle_dmar(sdp);
else if (!memcmp(sdp->Signature, ACPI_SIG_NFIT, 4))
acpi_handle_nfit(sdp);
else if (!memcmp(sdp->Signature, ACPI_SIG_WDDT, 4))
acpi_handle_wddt(sdp);
else {
printf(BEGIN_COMMENT);
acpi_print_sdt(sdp);

View File

@ -107,6 +107,7 @@ utility dumps contents of the following tables:
.It MCFG
.It RSD PTR
.It RSDT
.It WDDT
.El
.Pp
The RSDT contains a pointer to the physical memory address of the FACP