git: 97c0b5ab18b6 - main - acpica: Import ACPICA 20210730
Jung-uk Kim
jkim at FreeBSD.org
Sat Jul 31 04:16:53 UTC 2021
The branch main has been updated by jkim:
URL: https://cgit.FreeBSD.org/src/commit/?id=97c0b5ab18b6131ab11ed03b38d5e239fc811a3e
commit 97c0b5ab18b6131ab11ed03b38d5e239fc811a3e
Author: Jung-uk Kim <jkim at FreeBSD.org>
AuthorDate: 2021-07-31 00:05:50 +0000
Commit: Jung-uk Kim <jkim at FreeBSD.org>
CommitDate: 2021-07-31 04:16:27 +0000
acpica: Import ACPICA 20210730
(cherry picked from commit 34cfdff1f386b2d7bf0a8ea873acf604753991e6)
---
sys/contrib/dev/acpica/changes.txt | 42 ++++
sys/contrib/dev/acpica/common/adisasm.c | 2 +-
sys/contrib/dev/acpica/common/ahtable.c | 1 +
sys/contrib/dev/acpica/common/dmtable.c | 147 ++++++++++++++
sys/contrib/dev/acpica/common/dmtbdump1.c | 219 +++++++++++++++++++++
sys/contrib/dev/acpica/common/dmtbdump3.c | 14 +-
sys/contrib/dev/acpica/common/dmtbinfo1.c | 138 +++++++++++++
sys/contrib/dev/acpica/common/dmtbinfo3.c | 3 +-
sys/contrib/dev/acpica/compiler/aslmethod.c | 83 +++++++-
sys/contrib/dev/acpica/compiler/aslutils.c | 6 +-
sys/contrib/dev/acpica/compiler/dtcompiler.h | 5 +
sys/contrib/dev/acpica/compiler/dtfield.c | 4 +-
sys/contrib/dev/acpica/compiler/dttable1.c | 217 ++++++++++++++++++++
sys/contrib/dev/acpica/compiler/dttable2.c | 26 ++-
sys/contrib/dev/acpica/compiler/dttemplate.h | 94 +++++++++
sys/contrib/dev/acpica/compiler/dtutils.c | 10 +-
.../dev/acpica/components/dispatcher/dswexec.c | 2 +-
sys/contrib/dev/acpica/include/acdisasm.h | 22 +++
sys/contrib/dev/acpica/include/acnames.h | 1 +
sys/contrib/dev/acpica/include/acoutput.h | 2 +-
sys/contrib/dev/acpica/include/acpixf.h | 2 +-
sys/contrib/dev/acpica/include/actbinfo.h | 15 ++
sys/contrib/dev/acpica/include/actbl1.h | 16 +-
sys/contrib/dev/acpica/include/actbl2.h | 194 ++++++++++++++++++
sys/contrib/dev/acpica/include/actbl3.h | 6 +
25 files changed, 1242 insertions(+), 29 deletions(-)
diff --git a/sys/contrib/dev/acpica/changes.txt b/sys/contrib/dev/acpica/changes.txt
index 31b4eaff62fb..64ca5cccdce4 100644
--- a/sys/contrib/dev/acpica/changes.txt
+++ b/sys/contrib/dev/acpica/changes.txt
@@ -1,3 +1,45 @@
+----------------------------------------
+30 July 2021. Summary of changes for version 20210730:
+
+This release is available at https://acpica.org/downloads
+
+1) ACPICA kernel-resident subsystem:
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iasl: Check usage of _CRS, _DIS, _PRS, and _SRS objects (July 2021).
+ Under the Device Object:
+ 1) If _DIS is present, must have a _CRS and _SRS
+ 2) If _PRS is present, must have a _CRS, _DIS, and _SRS
+ 3) If _SRS is present, must have a _CRS and _DIS
+A warning will be issued for each of these cases.
+Note: For existing ASL/projects, these warnings may be disabled by
+specifying this on the command line:
+"-vw 3141"
+
+iASL Table Disassembler/Table compiler: Fix for WPBT table with no
+command-line arguments. Handle the case where the Command-line
+Arguments table field does not exist (zero).
+
+Headers: Add new DBG2 Serial Port Subtypes
+The Microsoft Debug Port Table 2 (DBG2) specification revision
+September 21, 2020 comprises additional Serial Port Subtypes [1].
+Reflect that in the actbl1.h header file. Submitted by:
+semihalf-wojtas-marcin
+
+iASL: Add full support for the AEST table (data compiler)
+Includes support in the table compiler and the disassembler.
+
+Add PRMT module header to facilitate parsing.
+This structure is used in to parse PRMT in other Operating Systems
+that relies on using subtable headers in order to parse ACPI tables.
+Although the PRMT doesn't have "subtables" it has a list of module
+information structures that act as subtables.
+
+iASL: Table disassembler: Add missing strings to decode subtable types.
+Includes the MADT and CEDT tables.
+
+
----------------------------------------
04 June 2021. Summary of changes for version 20210604:
diff --git a/sys/contrib/dev/acpica/common/adisasm.c b/sys/contrib/dev/acpica/common/adisasm.c
index 1c45e52413fd..40ca45dc7bfd 100644
--- a/sys/contrib/dev/acpica/common/adisasm.c
+++ b/sys/contrib/dev/acpica/common/adisasm.c
@@ -478,7 +478,7 @@ AdDisassembleOneTable (
AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n",
Table->Signature);
AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength] "
- "FieldName : FieldValue\n */\n\n");
+ "FieldName : FieldValue (in hex)\n */\n\n");
AcpiDmDumpDataTable (Table);
fprintf (stderr, "Acpi Data Table [%4.4s] decoded\n",
diff --git a/sys/contrib/dev/acpica/common/ahtable.c b/sys/contrib/dev/acpica/common/ahtable.c
index b1da441deda4..d0eb397126f2 100644
--- a/sys/contrib/dev/acpica/common/ahtable.c
+++ b/sys/contrib/dev/acpica/common/ahtable.c
@@ -199,6 +199,7 @@ AcpiAhGetTableInfo (
*/
const AH_TABLE AcpiGbl_SupportedTables[] =
{
+ {ACPI_SIG_AEST, "Arm Error Source Table"},
{ACPI_SIG_ASF, "Alert Standard Format Table"},
{ACPI_SIG_BDAT, "BIOS Data ACPI Table"},
{ACPI_SIG_BERT, "Boot Error Record Table"},
diff --git a/sys/contrib/dev/acpica/common/dmtable.c b/sys/contrib/dev/acpica/common/dmtable.c
index cc72fa0512a8..cbef83364e73 100644
--- a/sys/contrib/dev/acpica/common/dmtable.c
+++ b/sys/contrib/dev/acpica/common/dmtable.c
@@ -174,6 +174,55 @@ AcpiAhGetTableInfo (
/* These tables map a subtable type to a description string */
+static const char *AcpiDmAestResourceNames[] =
+{
+ "Cache Resource",
+ "TLB Resource",
+ "Generic Resource",
+ "Unknown Resource Type" /* Reserved */
+};
+
+static const char *AcpiDmAestSubnames[] =
+{
+ "Processor Error Node",
+ "Memory Error Node",
+ "SMMU Error Node",
+ "Vendor-defined Error Node",
+ "GIC Error Node",
+ "Unknown Subtable Type" /* Reserved */
+};
+
+static const char *AcpiDmAestCacheNames[] =
+{
+ "Data Cache",
+ "Instruction Cache",
+ "Unified Cache",
+ "Unknown Cache Type" /* Reserved */
+};
+
+static const char *AcpiDmAestGicNames[] =
+{
+ "GIC CPU",
+ "GIC Distributor",
+ "GIC Redistributor",
+ "GIC ITS",
+ "Unknown GIC Interface Type" /* Reserved */
+};
+
+static const char *AcpiDmAestXfaceNames[] =
+{
+ "System Register Interface",
+ "Memory Mapped Interface",
+ "Unknown Interface Type" /* Reserved */
+};
+
+static const char *AcpiDmAestXruptNames[] =
+{
+ "Fault Handling Interrupt",
+ "Error Recovery Interrupt",
+ "Unknown Interrupt Type" /* Reserved */
+};
+
static const char *AcpiDmAsfSubnames[] =
{
"ASF Information",
@@ -533,6 +582,7 @@ static const char *AcpiDmGasAccessWidth[] =
const ACPI_DMTABLE_DATA AcpiDmTableData[] =
{
+ {ACPI_SIG_AEST, NULL, AcpiDmDumpAest, DtCompileAest, TemplateAest},
{ACPI_SIG_ASF, NULL, AcpiDmDumpAsf, DtCompileAsf, TemplateAsf},
{ACPI_SIG_BDAT, AcpiDmTableInfoBdat, NULL, NULL, TemplateBdat},
{ACPI_SIG_BERT, AcpiDmTableInfoBert, NULL, NULL, TemplateBert},
@@ -1006,6 +1056,10 @@ AcpiDmDumpTable (
case ACPI_DMT_RGRT:
case ACPI_DMT_SDEV:
case ACPI_DMT_SRAT:
+ case ACPI_DMT_AEST:
+ case ACPI_DMT_AEST_RES:
+ case ACPI_DMT_AEST_XFACE:
+ case ACPI_DMT_AEST_XRUPT:
case ACPI_DMT_ASF:
case ACPI_DMT_HESTNTYP:
case ACPI_DMT_FADTPM:
@@ -1035,6 +1089,8 @@ AcpiDmDumpTable (
break;
case ACPI_DMT_UINT32:
+ case ACPI_DMT_AEST_CACHE:
+ case ACPI_DMT_AEST_GIC:
case ACPI_DMT_NAME4:
case ACPI_DMT_SIG:
case ACPI_DMT_LPIT:
@@ -1087,6 +1143,12 @@ AcpiDmDumpTable (
ByteLength = 128;
break;
+ case ACPI_DMT_WPBT_UNICODE:
+
+ ByteLength = SubtableLength;
+ CurrentOffset = sizeof (ACPI_TABLE_WPBT);
+ break;
+
case ACPI_DMT_UNICODE:
case ACPI_DMT_BUFFER:
case ACPI_DMT_RAW_BUFFER:
@@ -1418,6 +1480,90 @@ AcpiDmDumpTable (
LastOutputBlankLine = TRUE;
break;
+ case ACPI_DMT_AEST:
+
+ /* AEST subtable types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_AEST_NODE_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_AEST_NODE_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmAestSubnames[Temp8]);
+ break;
+
+ case ACPI_DMT_AEST_CACHE:
+
+ /* AEST cache resource subtable */
+
+ Temp32 = *Target;
+ if (Temp32 > ACPI_AEST_CACHE_RESERVED)
+ {
+ Temp32 = ACPI_AEST_CACHE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT32_FORMAT, *Target,
+ AcpiDmAestCacheNames[Temp32]);
+ break;
+
+ case ACPI_DMT_AEST_GIC:
+
+ /* AEST GIC error subtable */
+
+ Temp32 = *Target;
+ if (Temp32 > ACPI_AEST_GIC_RESERVED)
+ {
+ Temp32 = ACPI_AEST_GIC_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT32_FORMAT, *Target,
+ AcpiDmAestGicNames[Temp32]);
+ break;
+
+ case ACPI_DMT_AEST_RES:
+
+ /* AEST resource type subtable */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_AEST_RESOURCE_RESERVED)
+ {
+ Temp8 = ACPI_AEST_RESOURCE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmAestResourceNames[Temp8]);
+ break;
+
+ case ACPI_DMT_AEST_XFACE:
+
+ /* AEST interface structure types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_AEST_XFACE_RESERVED)
+ {
+ Temp8 = ACPI_AEST_XFACE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmAestXfaceNames[Temp8]);
+ break;
+
+ case ACPI_DMT_AEST_XRUPT:
+
+ /* AEST interrupt structure types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_AEST_XRUPT_RESERVED)
+ {
+ Temp8 = ACPI_AEST_XRUPT_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmAestXruptNames[Temp8]);
+ break;
+
case ACPI_DMT_ASF:
/* ASF subtable types */
@@ -1704,6 +1850,7 @@ AcpiDmDumpTable (
break;
case ACPI_DMT_UNICODE:
+ case ACPI_DMT_WPBT_UNICODE:
if (ByteLength == 0)
{
diff --git a/sys/contrib/dev/acpica/common/dmtbdump1.c b/sys/contrib/dev/acpica/common/dmtbdump1.c
index d134c63f856a..a3f7f0a3c9d3 100644
--- a/sys/contrib/dev/acpica/common/dmtbdump1.c
+++ b/sys/contrib/dev/acpica/common/dmtbdump1.c
@@ -160,6 +160,225 @@
ACPI_MODULE_NAME ("dmtbdump1")
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmDumpAest
+ *
+ * PARAMETERS: Table - A AEST table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a AEST table
+ *
+ * NOTE: Assumes the following table structure:
+ * For all AEST Error Nodes:
+ * 1) An AEST Error Node, followed immediately by:
+ * 2) Any node-specific data
+ * 3) An Interface Structure (one)
+ * 4) A list (array) of Interrupt Structures
+ *
+ * AEST - ARM Error Source table. Conforms to:
+ * ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document Sep 2020
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpAest (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ UINT32 Offset = sizeof (ACPI_TABLE_HEADER);
+ ACPI_AEST_HEADER *Subtable;
+ ACPI_AEST_HEADER *NodeHeader;
+ ACPI_AEST_PROCESSOR *ProcessorSubtable;
+ ACPI_DMTABLE_INFO *InfoTable;
+ ACPI_SIZE Length;
+ UINT8 Type;
+
+
+ /* Very small, generic main table. AEST consists of mostly subtables */
+
+ while (Offset < Table->Length)
+ {
+ NodeHeader = ACPI_ADD_PTR (ACPI_AEST_HEADER, Table, Offset);
+
+ /* Dump the common error node (subtable) header */
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, NodeHeader,
+ NodeHeader->Length, AcpiDmTableInfoAestHdr);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ Type = NodeHeader->Type;
+
+ /* Setup the node-specific subtable based on the header Type field */
+
+ switch (Type)
+ {
+ case ACPI_AEST_PROCESSOR_ERROR_NODE:
+ InfoTable = AcpiDmTableInfoAestProcError;
+ Length = sizeof (ACPI_AEST_PROCESSOR);
+ break;
+
+ case ACPI_AEST_MEMORY_ERROR_NODE:
+ InfoTable = AcpiDmTableInfoAestMemError;
+ Length = sizeof (ACPI_AEST_MEMORY);
+ break;
+
+ case ACPI_AEST_SMMU_ERROR_NODE:
+ InfoTable = AcpiDmTableInfoAestSmmuError;
+ Length = sizeof (ACPI_AEST_SMMU);
+ break;
+
+ case ACPI_AEST_VENDOR_ERROR_NODE:
+ InfoTable = AcpiDmTableInfoAestVendorError;
+ Length = sizeof (ACPI_AEST_VENDOR);
+ break;
+
+ case ACPI_AEST_GIC_ERROR_NODE:
+ InfoTable = AcpiDmTableInfoAestGicError;
+ Length = sizeof (ACPI_AEST_GIC);
+ break;
+
+ /* Error case below */
+ default:
+
+ AcpiOsPrintf ("\n**** Unknown AEST Error Subtable type 0x%X\n",
+ Type);
+ return;
+ }
+
+ /* Point past the common header (to the node-specific data) */
+
+ Offset += sizeof (ACPI_AEST_HEADER);
+ Subtable = ACPI_ADD_PTR (ACPI_AEST_HEADER, Table, Offset);
+ AcpiOsPrintf ("\n");
+
+ /* Dump the node-specific subtable */
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, Subtable, Length,
+ InfoTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ AcpiOsPrintf ("\n");
+
+ if (Type == ACPI_AEST_PROCESSOR_ERROR_NODE)
+ {
+ /*
+ * Special handling for PROCESSOR_ERROR_NODE subtables
+ * (to handle the Resource Substructure via the ResourceType
+ * field).
+ */
+
+ /* Point past the node-specific data */
+
+ Offset += Length;
+ ProcessorSubtable = ACPI_CAST_PTR (ACPI_AEST_PROCESSOR, Subtable);
+
+ switch (ProcessorSubtable->ResourceType)
+ {
+ /* Setup the Resource Substructure subtable */
+
+ case ACPI_AEST_CACHE_RESOURCE:
+ InfoTable = AcpiDmTableInfoAestCacheRsrc;
+ Length = sizeof (ACPI_AEST_PROCESSOR_CACHE);
+ break;
+
+ case ACPI_AEST_TLB_RESOURCE:
+ InfoTable = AcpiDmTableInfoAestTlbRsrc;
+ Length = sizeof (ACPI_AEST_PROCESSOR_TLB);
+ break;
+
+ case ACPI_AEST_GENERIC_RESOURCE:
+ InfoTable = AcpiDmTableInfoAestGenRsrc;
+ Length = sizeof (ACPI_AEST_PROCESSOR_GENERIC);
+ AcpiOsPrintf ("Generic Resource Type (%X) is not supported at this time\n",
+ ProcessorSubtable->ResourceType);
+ break;
+
+ /* Error case below */
+ default:
+ AcpiOsPrintf ("\n**** Unknown AEST Processor Resource type 0x%X\n",
+ ProcessorSubtable->ResourceType);
+ return;
+ }
+
+ ProcessorSubtable = ACPI_ADD_PTR (ACPI_AEST_PROCESSOR, Table,
+ Offset);
+
+ /* Dump the resource substructure subtable */
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, ProcessorSubtable,
+ Length, InfoTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ AcpiOsPrintf ("\n");
+ }
+
+ /* Point past the resource substructure or the node-specific data */
+
+ Offset += Length;
+
+ /* Dump the interface structure, required to be present */
+
+ Subtable = ACPI_ADD_PTR (ACPI_AEST_HEADER, Table, Offset);
+ if (Subtable->Type >= ACPI_AEST_XFACE_RESERVED)
+ {
+ AcpiOsPrintf ("\n**** Unknown AEST Node Interface type 0x%X\n",
+ Subtable->Type);
+ return;
+ }
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+ sizeof (ACPI_AEST_NODE_INTERFACE), AcpiDmTableInfoAestXface);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Point past the interface structure */
+
+ AcpiOsPrintf ("\n");
+ Offset += sizeof (ACPI_AEST_NODE_INTERFACE);
+
+ /* Dump the entire interrupt structure array, if present */
+
+ if (NodeHeader->NodeInterruptOffset)
+ {
+ Length = NodeHeader->NodeInterruptCount;
+ Subtable = ACPI_ADD_PTR (ACPI_AEST_HEADER, Table, Offset);
+
+ while (Length)
+ {
+ /* Dump the interrupt structure */
+
+ Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+ sizeof (ACPI_AEST_NODE_INTERRUPT),
+ AcpiDmTableInfoAestXrupt);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Point to the next interrupt structure */
+
+ Offset += sizeof (ACPI_AEST_NODE_INTERRUPT);
+ Subtable = ACPI_ADD_PTR (ACPI_AEST_HEADER, Table, Offset);
+ Length--;
+ AcpiOsPrintf ("\n");
+ }
+ }
+ }
+}
+
+
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpAsf
diff --git a/sys/contrib/dev/acpica/common/dmtbdump3.c b/sys/contrib/dev/acpica/common/dmtbdump3.c
index 38404bc3317c..26cfe2f9b695 100644
--- a/sys/contrib/dev/acpica/common/dmtbdump3.c
+++ b/sys/contrib/dev/acpica/common/dmtbdump3.c
@@ -681,7 +681,7 @@ AcpiDmDumpViot (
ACPI_TABLE_VIOT *Viot;
ACPI_VIOT_HEADER *ViotHeader;
UINT16 Length;
- UINT16 Offset;
+ UINT32 Offset;
ACPI_DMTABLE_INFO *InfoTable;
/* Main table */
@@ -833,13 +833,12 @@ AcpiDmDumpWpbt (
{
ACPI_STATUS Status;
ACPI_TABLE_WPBT *Subtable;
- UINT32 Length = Table->Length;
UINT16 ArgumentsLength;
/* Dump the main table */
- Status = AcpiDmDumpTable (Length, 0, Table, 0, AcpiDmTableInfoWpbt);
+ Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoWpbt);
if (ACPI_FAILURE (Status))
{
return;
@@ -850,8 +849,11 @@ AcpiDmDumpWpbt (
Subtable = ACPI_CAST_PTR (ACPI_TABLE_WPBT, Table);
ArgumentsLength = Subtable->ArgumentsLength;
- /* Dump the arguments buffer */
+ /* Dump the arguments buffer if present */
- (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength,
- AcpiDmTableInfoWpbt0);
+ if (ArgumentsLength)
+ {
+ (void) AcpiDmDumpTable (Table->Length, 0, Table, ArgumentsLength,
+ AcpiDmTableInfoWpbt0);
+ }
}
diff --git a/sys/contrib/dev/acpica/common/dmtbinfo1.c b/sys/contrib/dev/acpica/common/dmtbinfo1.c
index a6c46e55bf0a..ff072285b64b 100644
--- a/sys/contrib/dev/acpica/common/dmtbinfo1.c
+++ b/sys/contrib/dev/acpica/common/dmtbinfo1.c
@@ -191,6 +191,144 @@
*/
+/*******************************************************************************
+ *
+ * AEST - ARM Error Source table. Conforms to:
+ * ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document Sep 2020
+ *
+ ******************************************************************************/
+
+/* Common Subtable header (one per Subtable) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestHdr[] =
+{
+ {ACPI_DMT_AEST, ACPI_AESTH_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT16, ACPI_AESTH_OFFSET (Length), "Length", DT_LENGTH},
+ {ACPI_DMT_UINT8, ACPI_AESTH_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_AESTH_OFFSET (NodeSpecificOffset), "Node Specific Offset", 0},
+ {ACPI_DMT_UINT32, ACPI_AESTH_OFFSET (NodeInterfaceOffset), "Node Interface Offset", 0},
+ {ACPI_DMT_UINT32, ACPI_AESTH_OFFSET (NodeInterruptOffset), "Node Interrupt Array Offset", 0},
+ {ACPI_DMT_UINT32, ACPI_AESTH_OFFSET (NodeInterruptCount), "Node Interrupt Array Count", 0},
+ {ACPI_DMT_UINT64, ACPI_AESTH_OFFSET (TimestampRate), "Timestamp Rate", 0},
+ {ACPI_DMT_UINT64, ACPI_AESTH_OFFSET (Reserved1), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_AESTH_OFFSET (ErrorInjectionRate), "Error Injection Rate", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/*
+ * AEST subtables (nodes)
+ */
+
+/* 0: Processor Error */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestProcError[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST0_OFFSET (ProcessorId), "Processor ID", 0},
+ {ACPI_DMT_AEST_RES, ACPI_AEST0_OFFSET (ResourceType), "Resource Type", 0},
+ {ACPI_DMT_UINT8, ACPI_AEST0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT8, ACPI_AEST0_OFFSET (Flags), "Flags (decoded Below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_AEST0_FLAG_OFFSET (Flags, 0), "Global", 0},
+ {ACPI_DMT_FLAG1, ACPI_AEST0_FLAG_OFFSET (Flags, 0), "Shared", 0},
+ {ACPI_DMT_UINT8, ACPI_AEST0_OFFSET (Revision), "Revision", 0},
+ {ACPI_DMT_UINT64, ACPI_AEST0_OFFSET (ProcessorAffinity), "Processor Affinity Structure", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0RT: Processor Cache Resource */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestCacheRsrc[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST0A_OFFSET (CacheReference), "Cache Reference", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0A_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 1RT: ProcessorTLB Resource */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestTlbRsrc[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST0B_OFFSET (TlbLevel), "TLB Level", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0B_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 2RT: Processor Generic Resource */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestGenRsrc[] =
+{
+ {ACPI_DMT_RAW_BUFFER, 0, "Resource", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 1: Memory Error */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestMemError[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST1_OFFSET (SratProximityDomain), "Srat Proximity Domain", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 2: Smmu Error */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestSmmuError[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST2_OFFSET (IortNodeReference), "Iort Node Reference", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST2_OFFSET (SubcomponentReference), "Subcomponent Reference", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 3: Vendor Defined */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestVendorError[] =
+{
+ {ACPI_DMT_UINT32, ACPI_AEST3_OFFSET (AcpiHid), "ACPI HID", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST3_OFFSET (AcpiUid), "ACPI UID", 0},
+ {ACPI_DMT_BUF16, ACPI_AEST3_OFFSET (VendorSpecificData), "Vendor Specific Data", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 4: Gic Error */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestGicError[] =
+{
+ {ACPI_DMT_AEST_GIC, ACPI_AEST4_OFFSET (InterfaceType), "GIC Interface Type", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST4_OFFSET (InstanceId), "Instance ID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* AestXface: Node Interface Structure */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestXface[] =
+{
+ {ACPI_DMT_AEST_XFACE, ACPI_AEST0D_OFFSET (Type), "Interface Type", 0},
+ {ACPI_DMT_UINT24, ACPI_AEST0D_OFFSET (Reserved[0]), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0D_OFFSET (Flags), "Flags (decoded below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_AEST0D_FLAG_OFFSET (Flags, 0), "Shared Interface", 0},
+ {ACPI_DMT_FLAG1, ACPI_AEST0D_FLAG_OFFSET (Flags, 0), "Clear MISCx Registers", 0},
+ {ACPI_DMT_UINT64, ACPI_AEST0D_OFFSET (Address), "Address", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0D_OFFSET (ErrorRecordIndex), "Error Record Index", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0D_OFFSET (ErrorRecordCount), "Error Record Count", 0},
+ {ACPI_DMT_UINT64, ACPI_AEST0D_OFFSET (ErrorRecordImplemented),"Error Record Implemented", 0},
+ {ACPI_DMT_UINT64, ACPI_AEST0D_OFFSET (ErrorStatusReporting), "Error Status Reporting", 0},
+ {ACPI_DMT_UINT64, ACPI_AEST0D_OFFSET (AddressingMode), "Addressing Mode", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* AestXrupt: Node Interrupt Structure */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoAestXrupt[] =
+{
+ {ACPI_DMT_AEST_XRUPT, ACPI_AEST0E_OFFSET (Type), "Interrupt Type", 0},
+ {ACPI_DMT_UINT16, ACPI_AEST0E_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT8, ACPI_AEST0E_OFFSET (Flags), "Flags (decoded below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_AEST0E_FLAG_OFFSET (Flags, 0), "Level Triggered", 0},
+ {ACPI_DMT_UINT32, ACPI_AEST0E_OFFSET (Gsiv), "Gsiv", 0},
+ {ACPI_DMT_UINT8, ACPI_AEST0E_OFFSET (IortId), "IortId", 0},
+ {ACPI_DMT_UINT24, ACPI_AEST0E_OFFSET (Reserved1[0]), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
/*******************************************************************************
*
* ASF - Alert Standard Format table (Signature "ASF!")
diff --git a/sys/contrib/dev/acpica/common/dmtbinfo3.c b/sys/contrib/dev/acpica/common/dmtbinfo3.c
index b34d59ced086..9b2e30814921 100644
--- a/sys/contrib/dev/acpica/common/dmtbinfo3.c
+++ b/sys/contrib/dev/acpica/common/dmtbinfo3.c
@@ -759,7 +759,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt0[] =
{
- {ACPI_DMT_UNICODE, sizeof (ACPI_TABLE_WPBT), "Command-line Arguments", 0},
+ {ACPI_DMT_WPBT_UNICODE, ACPI_WPBT2_OFFSET (UnicodeString), "Command-line Arguments", DT_DESCRIBES_OPTIONAL},
ACPI_DMT_TERMINATOR
};
@@ -834,6 +834,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoGeneric[][2] =
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_STRING, "String"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UNICODE, "Unicode"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_BUFFER, "Buffer"),
+ ACPI_DM_GENERIC_ENTRY (ACPI_DMT_BUF16, "BUF16"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_UUID, "GUID"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_STRING, "DevicePath"),
ACPI_DM_GENERIC_ENTRY (ACPI_DMT_LABEL, "Label"),
diff --git a/sys/contrib/dev/acpica/compiler/aslmethod.c b/sys/contrib/dev/acpica/compiler/aslmethod.c
index 53b6e0b1962b..a0cb02ae6dc8 100644
--- a/sys/contrib/dev/acpica/compiler/aslmethod.c
+++ b/sys/contrib/dev/acpica/compiler/aslmethod.c
@@ -205,6 +205,10 @@ MtMethodAnalysisWalkBegin (
UINT8 ActualArgs = 0;
BOOLEAN HidExists;
BOOLEAN AdrExists;
+ BOOLEAN PrsExists;
+ BOOLEAN CrsExists;
+ BOOLEAN SrsExists;
+ BOOLEAN DisExists;
/* Build cross-reference output file if requested */
@@ -536,8 +540,8 @@ MtMethodAnalysisWalkBegin (
if (!HidExists && !AdrExists)
{
- AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
- "Device object requires a _HID or _ADR in same scope");
+ AslError (ASL_ERROR, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "Device object requires a _HID or _ADR");
}
else if (HidExists && AdrExists)
{
@@ -549,6 +553,81 @@ MtMethodAnalysisWalkBegin (
AslError (ASL_WARNING, ASL_MSG_MULTIPLE_TYPES, Op,
"Device object requires either a _HID or _ADR, but not both");
}
+
+ /*
+ * Check usage of _CRS, _DIS, _PRS, and _SRS objects (July 2021).
+ *
+ * Under the Device Object:
+ *
+ * 1) If _DIS is present, must have a _CRS, _PRS, and _SRS
+ * 2) If _PRS is present, must have a _CRS and _SRS
+ * 3) If _SRS is present, must have a _CRS and _PRS
+ */
+ CrsExists = ApFindNameInDeviceTree (METHOD_NAME__CRS, Op);
+ DisExists = ApFindNameInDeviceTree (METHOD_NAME__DIS, Op);
+ PrsExists = ApFindNameInDeviceTree (METHOD_NAME__PRS, Op);
+ SrsExists = ApFindNameInDeviceTree (METHOD_NAME__SRS, Op);
+
+ /* 1) If _DIS is present, must have a _CRS, _PRS, and _SRS */
+
+ if (DisExists)
+ {
+ if (!CrsExists)
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "_DIS is missing a _CRS, requires a _CRS, _PRS, and a _SRS");
+ }
+
+ if (!PrsExists)
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "_DIS is missing a _PRS, requires a _CRS, _PRS, and a _SRS");
+ }
+
+ if (!SrsExists)
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "_DIS is missing a _SRS, requires a _CRS, _PRS, and a _SRS");
+ }
+ }
+
+ /* 2) If _PRS is present, must have a _CRS and _SRS */
+
+ if (PrsExists)
+ {
+ if (!CrsExists)
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "_PRS is missing a _CRS, requires a _CRS and a _SRS");
+ }
+
+ if (!SrsExists)
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "_PRS is missing a _SRS, requires a _CRS and a _SRS");
+ }
+ }
+
+ /* 3) If _SRS is present, must have a _CRS and _PRS */
+
+ if (SrsExists)
+ {
+ if (!CrsExists)
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "_SRS is missing a _CRS, requires a _CRS and a _PRS");
+ }
+ if (!PrsExists)
+ {
+ AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "_SRS is missing a _PRS, requires a _CRS and a _PRS");
+ }
+ if (!DisExists)
+ {
+ AslError (ASL_REMARK, ASL_MSG_MISSING_DEPENDENCY, Op,
+ "_SRS is missing a _DIS");
+ }
+ }
break;
case PARSEOP_EVENT:
diff --git a/sys/contrib/dev/acpica/compiler/aslutils.c b/sys/contrib/dev/acpica/compiler/aslutils.c
index ea5a7bf1fbf2..9c0fd5955ca0 100644
--- a/sys/contrib/dev/acpica/compiler/aslutils.c
+++ b/sys/contrib/dev/acpica/compiler/aslutils.c
@@ -434,18 +434,20 @@ UtDisplaySupportedTables (
printf ("\nACPI tables supported by iASL version %8.8X:\n"
- " (Compiler, Disassembler, Template Generator)\n\n",
+ " (Compiler, Disassembler, Template Generator)\n",
ACPI_CA_VERSION);
/* All ACPI tables with the common table header */
- printf ("\n Supported ACPI tables:\n");
+ printf ("\nKnown/Supported ACPI tables:\n");
for (TableData = AcpiGbl_SupportedTables, i = 1;
TableData->Signature; TableData++, i++)
{
printf ("%8u) %s %s\n", i,
TableData->Signature, TableData->Description);
}
+
+ printf ("\nTotal %u ACPI tables\n\n", i-1);
}
diff --git a/sys/contrib/dev/acpica/compiler/dtcompiler.h b/sys/contrib/dev/acpica/compiler/dtcompiler.h
index 2d563aecbc11..c58ad55cd6cb 100644
--- a/sys/contrib/dev/acpica/compiler/dtcompiler.h
+++ b/sys/contrib/dev/acpica/compiler/dtcompiler.h
@@ -565,6 +565,10 @@ ACPI_STATUS
DtCompileRsdp (
DT_FIELD **PFieldList);
+ACPI_STATUS
+DtCompileAest (
+ void **PFieldList);
+
ACPI_STATUS
DtCompileAsf (
void **PFieldList);
@@ -753,6 +757,7 @@ DtGetGenericTableInfo (
/* ACPI Table templates */
+extern const unsigned char TemplateAest[];
extern const unsigned char TemplateAsf[];
extern const unsigned char TemplateBoot[];
extern const unsigned char TemplateBdat[];
diff --git a/sys/contrib/dev/acpica/compiler/dtfield.c b/sys/contrib/dev/acpica/compiler/dtfield.c
index 77862a7ac45c..d80be9bcc6c6 100644
--- a/sys/contrib/dev/acpica/compiler/dtfield.c
+++ b/sys/contrib/dev/acpica/compiler/dtfield.c
@@ -434,14 +434,14 @@ DtCompileInteger (
{
if (Value != 1)
{
- DtError (ASL_WARNING, ASL_MSG_RESERVED_FIELD, Field,
+ DtError (ASL_ERROR, ASL_MSG_RESERVED_FIELD, Field,
"Must be one, setting to one");
Value = 1;
}
}
else if (Value != 0)
{
- DtError (ASL_WARNING, ASL_MSG_RESERVED_FIELD, Field,
+ DtError (ASL_ERROR, ASL_MSG_RESERVED_FIELD, Field,
"Must be zero, setting to zero");
Value = 0;
}
diff --git a/sys/contrib/dev/acpica/compiler/dttable1.c b/sys/contrib/dev/acpica/compiler/dttable1.c
index a533a51ab697..0ac3c147743a 100644
--- a/sys/contrib/dev/acpica/compiler/dttable1.c
+++ b/sys/contrib/dev/acpica/compiler/dttable1.c
@@ -170,6 +170,223 @@ static ACPI_DMTABLE_INFO TableInfoDmarPciPath[] =
};
+/******************************************************************************
+ *
+ * FUNCTION: DtCompileAest
+ *
+ * PARAMETERS: List - Current field list pointer
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Compile AEST.
+ *
+ * NOTE: Assumes the following table structure:
+ * For all AEST Error Nodes:
+ * 1) An AEST Error Node, followed immediately by:
+ * 2) Any node-specific data
+ * 3) An Interface Structure (one)
+ * 4) A list (array) of Interrupt Structures, the count as specified
+ * in the NodeInterruptCount field of the Error Node header.
+ *
+ * AEST - ARM Error Source table. Conforms to:
+ * ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document Sep 2020
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+DtCompileAest (
+ void **List)
+{
+ ACPI_AEST_HEADER *ErrorNodeHeader;
+ ACPI_AEST_PROCESSOR *AestProcessor;
+ DT_SUBTABLE *Subtable;
+ DT_SUBTABLE *ParentTable;
+ ACPI_DMTABLE_INFO *InfoTable;
+ ACPI_STATUS Status;
+ UINT32 i;
+ UINT32 Offset;
+ DT_FIELD **PFieldList = (DT_FIELD **) List;
+
+
+ while (*PFieldList)
+ {
+ /* Compile the common error node header */
*** 807 LINES SKIPPED ***
More information about the dev-commits-src-all
mailing list