summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/common/dmtable.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/common/dmtable.c')
-rw-r--r--sys/contrib/dev/acpica/common/dmtable.c136
1 files changed, 77 insertions, 59 deletions
diff --git a/sys/contrib/dev/acpica/common/dmtable.c b/sys/contrib/dev/acpica/common/dmtable.c
index d33d86f..b1875f8 100644
--- a/sys/contrib/dev/acpica/common/dmtable.c
+++ b/sys/contrib/dev/acpica/common/dmtable.c
@@ -241,13 +241,6 @@ static const char *AcpiDmPmttSubnames[] =
"Unknown SubTable Type" /* Reserved */
};
-static const char *AcpiDmSlicSubnames[] =
-{
- "Public Key Structure",
- "Windows Marker Structure",
- "Unknown SubTable Type" /* Reserved */
-};
-
static const char *AcpiDmSratSubnames[] =
{
"Processor Local APIC/SAPIC Affinity",
@@ -339,6 +332,7 @@ ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_MCHI, AcpiDmTableInfoMchi, NULL, NULL, TemplateMchi, "Management Controller Host Interface table"},
{ACPI_SIG_MPST, AcpiDmTableInfoMpst, AcpiDmDumpMpst, DtCompileMpst, TemplateMpst, "Memory Power State Table"},
{ACPI_SIG_MSCT, NULL, AcpiDmDumpMsct, DtCompileMsct, TemplateMsct, "Maximum System Characteristics Table"},
+ {ACPI_SIG_MSDM, NULL, AcpiDmDumpSlic, DtCompileSlic, TemplateMsdm, "Microsoft Data Management table"},
{ACPI_SIG_MTMR, NULL, AcpiDmDumpMtmr, DtCompileMtmr, TemplateMtmr, "MID Timer Table"},
{ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct, "Platform Communications Channel Table"},
{ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt, "Platform Memory Topology Table"},
@@ -515,10 +509,20 @@ AcpiDmDumpDataTable (
}
else
{
- AcpiOsPrintf ("\n**** Unknown ACPI table type [%4.4s]\n\n",
+ AcpiOsPrintf ("\n**** Unknown ACPI table signature [%4.4s]\n\n",
Table->Signature);
- fprintf (stderr, "Unknown ACPI table signature [%4.4s], decoding header only\n",
+
+ fprintf (stderr, "Unknown ACPI table signature [%4.4s], ",
Table->Signature);
+
+ if (!AcpiGbl_ForceAmlDisassembly)
+ {
+ fprintf (stderr, "decoding ACPI table header only\n");
+ }
+ else
+ {
+ fprintf (stderr, "assuming table contains valid AML code\n");
+ }
}
}
else if (TableData->TableHandler)
@@ -686,6 +690,7 @@ AcpiDmDumpTable (
UINT32 ByteLength;
UINT8 Temp8;
UINT16 Temp16;
+ UINT32 Temp32;
UINT64 Value;
ACPI_DMTABLE_DATA *TableData;
const char *Name;
@@ -715,7 +720,8 @@ AcpiDmDumpTable (
if ((CurrentOffset >= TableLength) ||
(SubtableLength && (Info->Offset >= SubtableLength)))
{
- AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
+ AcpiOsPrintf (
+ "**** ACPI table terminates in the middle of a data structure! (dump table)\n");
return (AE_BAD_DATA);
}
@@ -760,7 +766,6 @@ AcpiDmDumpTable (
case ACPI_DMT_UINT32:
case ACPI_DMT_NAME4:
case ACPI_DMT_SIG:
- case ACPI_DMT_SLIC:
case ACPI_DMT_LPIT:
ByteLength = 4;
@@ -805,6 +810,12 @@ AcpiDmDumpTable (
ByteLength = 128;
break;
+ case ACPI_DMT_BUFFER:
+ case ACPI_DMT_RAW_BUFFER:
+
+ ByteLength = SubtableLength;
+ break;
+
case ACPI_DMT_STRING:
ByteLength = ACPI_STRLEN (ACPI_CAST_PTR (char, Target)) + 1;
@@ -838,7 +849,8 @@ AcpiDmDumpTable (
if (CurrentOffset + ByteLength > TableLength)
{
- AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
+ AcpiOsPrintf (
+ "**** ACPI table terminates in the middle of a data structure!\n");
return (AE_BAD_DATA);
}
@@ -1005,8 +1017,9 @@ AcpiDmDumpTable (
AcpiOsPrintf ("%2.2X", *Target);
Temp8 = AcpiDmGenerateChecksum (Table,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
+
if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum)
{
AcpiOsPrintf (
@@ -1032,7 +1045,7 @@ AcpiDmDumpTable (
Temp8 = ACPI_GAS_WIDTH_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, Temp8, AcpiDmGasAccessWidth[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGasAccessWidth[Temp8]);
break;
case ACPI_DMT_GAS:
@@ -1069,7 +1082,8 @@ AcpiDmDumpTable (
Temp16 = ACPI_DMAR_TYPE_RESERVED;
}
- AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), AcpiDmDmarSubnames[Temp16]);
+ AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
+ AcpiDmDmarSubnames[Temp16]);
break;
case ACPI_DMT_DMAR_SCOPE:
@@ -1082,7 +1096,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_DMAR_SCOPE_TYPE_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmDmarScope[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmDmarScope[Temp8]);
break;
case ACPI_DMT_EINJACT:
@@ -1095,7 +1110,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_EINJ_ACTION_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmEinjActions[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmEinjActions[Temp8]);
break;
case ACPI_DMT_EINJINST:
@@ -1108,7 +1124,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_EINJ_INSTRUCTION_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmEinjInstructions[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmEinjInstructions[Temp8]);
break;
case ACPI_DMT_ERSTACT:
@@ -1121,7 +1138,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_ERST_ACTION_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmErstActions[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmErstActions[Temp8]);
break;
case ACPI_DMT_ERSTINST:
@@ -1134,7 +1152,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_ERST_INSTRUCTION_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmErstInstructions[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmErstInstructions[Temp8]);
break;
case ACPI_DMT_GTDT:
@@ -1147,7 +1166,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_GTDT_TYPE_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGtdtSubnames[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmGtdtSubnames[Temp8]);
break;
case ACPI_DMT_HEST:
@@ -1160,12 +1180,15 @@ AcpiDmDumpTable (
Temp16 = ACPI_HEST_TYPE_RESERVED;
}
- AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), AcpiDmHestSubnames[Temp16]);
+ AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
+ AcpiDmHestSubnames[Temp16]);
break;
case ACPI_DMT_HESTNTFY:
- AcpiOsPrintf (STRING_FORMAT, "Hardware Error Notification Structure");
+ AcpiOsPrintf (STRING_FORMAT,
+ "Hardware Error Notification Structure");
+
AcpiDmDumpTable (TableLength, CurrentOffset, Target,
sizeof (ACPI_HEST_NOTIFY), AcpiDmTableInfoHestNotify);
AcpiOsPrintf ("\n");
@@ -1182,7 +1205,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_HEST_NOTIFY_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmHestNotifySubnames[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmHestNotifySubnames[Temp8]);
break;
case ACPI_DMT_MADT:
@@ -1195,7 +1219,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_MADT_TYPE_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmMadtSubnames[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmMadtSubnames[Temp8]);
break;
case ACPI_DMT_PCCT:
@@ -1208,7 +1233,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_PCCT_TYPE_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmPcctSubnames[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmPcctSubnames[Temp8]);
break;
case ACPI_DMT_PMTT:
@@ -1221,20 +1247,20 @@ AcpiDmDumpTable (
Temp8 = ACPI_PMTT_TYPE_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmPmttSubnames[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmPmttSubnames[Temp8]);
break;
- case ACPI_DMT_SLIC:
-
- /* SLIC subtable types */
-
- Temp8 = *Target;
- if (Temp8 > ACPI_SLIC_TYPE_RESERVED)
- {
- Temp8 = ACPI_SLIC_TYPE_RESERVED;
- }
+ case ACPI_DMT_RAW_BUFFER:
+ /*
+ * Currently only used for SLIC table
+ */
+ AcpiOsPrintf ("/* Proprietary data structure */ ");
- AcpiOsPrintf (UINT32_FORMAT, *Target, AcpiDmSlicSubnames[Temp8]);
+ AcpiDmDumpBuffer (Table, sizeof (ACPI_TABLE_HEADER),
+ ByteLength, sizeof (ACPI_TABLE_HEADER),
+ "Licensing Data", TRUE);
+ AcpiOsPrintf ("\n");
break;
case ACPI_DMT_SRAT:
@@ -1247,7 +1273,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_SRAT_TYPE_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmSratSubnames[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmSratSubnames[Temp8]);
break;
case ACPI_DMT_FADTPM:
@@ -1260,7 +1287,8 @@ AcpiDmDumpTable (
Temp8 = ACPI_FADT_PM_RESERVED;
}
- AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmFadtProfiles[Temp8]);
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmFadtProfiles[Temp8]);
break;
case ACPI_DMT_IVRS:
@@ -1295,26 +1323,14 @@ AcpiDmDumpTable (
/* LPIT subtable types */
- Temp8 = *Target;
- switch (Temp8)
+ Temp32 = ACPI_GET32 (Target);
+ if (Temp32 > ACPI_LPIT_TYPE_RESERVED)
{
- case ACPI_LPIT_TYPE_NATIVE_CSTATE:
-
- Name = AcpiDmLpitSubnames[0];
- break;
-
- case ACPI_LPIT_TYPE_SIMPLE_IO:
-
- Name = AcpiDmLpitSubnames[1];
- break;
-
- default:
-
- Name = AcpiDmLpitSubnames[2];
- break;
+ Temp32 = ACPI_LPIT_TYPE_RESERVED;
}
- AcpiOsPrintf (UINT32_FORMAT, *Target, Name);
+ AcpiOsPrintf (UINT32_FORMAT, ACPI_GET32 (Target),
+ AcpiDmLpitSubnames[Temp32]);
break;
case ACPI_DMT_EXIT:
@@ -1331,8 +1347,10 @@ AcpiDmDumpTable (
if (TableOffset && !SubtableLength)
{
- /* If this table is not the main table, subtable must have valid length */
-
+ /*
+ * If this table is not the main table, the subtable must have a
+ * valid length
+ */
AcpiOsPrintf ("Invalid zero length subtable\n");
return (AE_BAD_DATA);
}
OpenPOWER on IntegriCloud