acpica: Import ACPICA 20210730

(cherry picked from commit 34cfdff1f386b2d7bf0a8ea873acf604753991e6)
This commit is contained in:
Jung-uk Kim 2021-07-30 20:05:50 -04:00
parent 155f15118a
commit 97c0b5ab18
25 changed files with 1242 additions and 29 deletions

View File

@ -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:

View File

@ -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",

View File

@ -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"},

View File

@ -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)
{

View File

@ -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

View File

@ -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);
}
}

View File

@ -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!")

View File

@ -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"),

View File

@ -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:

View File

@ -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);
}

View File

@ -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[];

View File

@ -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;
}

View File

@ -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 */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoAestHdr,
&Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
/* Everything past the error node header will be a subtable */
DtPushSubtable (Subtable);
/*
* Compile the node-specific structure (Based on the error
* node header Type field)
*/
ErrorNodeHeader = ACPI_CAST_PTR (ACPI_AEST_HEADER, Subtable->Buffer);
/* Point past the common error node header */
Offset = sizeof (ACPI_AEST_HEADER);
ErrorNodeHeader->NodeSpecificOffset = Offset;
/* Decode the error node type */
switch (ErrorNodeHeader->Type)
{
case ACPI_AEST_PROCESSOR_ERROR_NODE:
InfoTable = AcpiDmTableInfoAestProcError;
break;
case ACPI_AEST_MEMORY_ERROR_NODE:
InfoTable = AcpiDmTableInfoAestMemError;
break;
case ACPI_AEST_SMMU_ERROR_NODE:
InfoTable = AcpiDmTableInfoAestSmmuError;
break;
case ACPI_AEST_VENDOR_ERROR_NODE:
InfoTable = AcpiDmTableInfoAestVendorError;
break;
case ACPI_AEST_GIC_ERROR_NODE:
InfoTable = AcpiDmTableInfoAestGicError;
break;
/* Error case below */
default:
AcpiOsPrintf ("Unknown AEST Subtable Type: %X\n",
ErrorNodeHeader->Type);
return (AE_ERROR);
}
Status = DtCompileTable (PFieldList, InfoTable, &Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Point past the node-specific structure */
Offset += Subtable->Length;
ErrorNodeHeader->NodeInterfaceOffset = Offset;
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
/* Compile any additional node-specific substructures */
if (ErrorNodeHeader->Type == ACPI_AEST_PROCESSOR_ERROR_NODE)
{
/*
* Special handling for PROCESSOR_ERROR_NODE subtables
* (to handle the Resource Substructure via the ResourceType
* field).
*/
AestProcessor = ACPI_CAST_PTR (ACPI_AEST_PROCESSOR,
Subtable->Buffer);
switch (AestProcessor->ResourceType)
{
case ACPI_AEST_CACHE_RESOURCE:
InfoTable = AcpiDmTableInfoAestCacheRsrc;
break;
case ACPI_AEST_TLB_RESOURCE:
InfoTable = AcpiDmTableInfoAestTlbRsrc;
break;
case ACPI_AEST_GENERIC_RESOURCE:
InfoTable = AcpiDmTableInfoAestGenRsrc;
AcpiOsPrintf ("Generic Resource Type (%X) is not supported at this time\n",
AestProcessor->ResourceType);
return (AE_ERROR);
/* Error case below */
default:
AcpiOsPrintf ("Unknown AEST Processor Resource Type: %X\n",
AestProcessor->ResourceType);
return (AE_ERROR);
}
Status = DtCompileTable (PFieldList, InfoTable, &Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
/* Point past the resource substructure subtable */
Offset += Subtable->Length;
ErrorNodeHeader->NodeInterfaceOffset = Offset;
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
}
/* Compile the (required) node interface structure */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoAestXface,
&Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ErrorNodeHeader->NodeInterruptOffset = 0;
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
/* Compile each of the node interrupt structures */
if (ErrorNodeHeader->NodeInterruptCount)
{
/* Point to the first interrupt structure */
Offset += Subtable->Length;
ErrorNodeHeader->NodeInterruptOffset = Offset;
}
/* Compile each of the interrupt structures */
for (i = 0; i < ErrorNodeHeader->NodeInterruptCount; i++)
{
Status = DtCompileTable (PFieldList, AcpiDmTableInfoAestXrupt,
&Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
}
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
}
/* Prepare for the next AEST Error node */
DtPopSubtable ();
}
return (AE_OK);
}
/******************************************************************************
*
* FUNCTION: DtCompileAsf

View File

@ -2678,13 +2678,11 @@ DtCompileWpbt (
DT_SUBTABLE *ParentTable;
ACPI_TABLE_WPBT *Table;
ACPI_STATUS Status;
UINT16 Length;
/* Compile the main table */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt,
&Subtable);
Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt, &Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
@ -2692,11 +2690,23 @@ DtCompileWpbt (
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer);
/*
* Exit now if there are no arguments specified. This is indicated by:
* The "Command-line Arguments" field has not been specified (if specified,
* it will be the last field in the field list -- after the main table).
* Set the Argument Length in the main table to zero.
*/
if (!*PFieldList)
{
Table->ArgumentsLength = 0;
return (AE_OK);
}
/* Compile the argument list subtable */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt0,
&Subtable);
Status = DtCompileTable (PFieldList, AcpiDmTableInfoWpbt0, &Subtable);
if (ACPI_FAILURE (Status))
{
return (Status);
@ -2704,11 +2714,7 @@ DtCompileWpbt (
/* Extract the length of the Arguments buffer, insert into main table */
Length = (UINT16) Subtable->TotalLength;
Table = ACPI_CAST_PTR (ACPI_TABLE_WPBT, ParentTable->Buffer);
Table->ArgumentsLength = Length;
ParentTable = DtPeekSubtable ();
Table->ArgumentsLength = (UINT16) Subtable->TotalLength;
DtInsertSubtable (ParentTable, Subtable);
return (AE_OK);
}

View File

@ -155,6 +155,100 @@
/* Templates for ACPI data tables */
const unsigned char TemplateAest[] =
{
0x41,0x45,0x53,0x54,0xCC,0x02,0x00,0x00, /* 00000000 "AEST...." */
0x01,0x2A,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".*INTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
0x04,0x06,0x21,0x20,0x00,0x80,0x00,0x00, /* 00000020 "..! ...." */
0x2C,0x00,0x00,0x00,0x44,0x00,0x00,0x00, /* 00000028 ",...D..." */
0x74,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000030 "t......." */
0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000038 "....gE#." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000040 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000048 "........" */
0xCD,0xFE,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000058 "....gE#." */
0x33,0x33,0x22,0x22,0x00,0x00,0x00,0x00, /* 00000060 "33""...." */
0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00, /* 00000068 "........" */
0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000070 "....gE#." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000078 "........" */
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
0x11,0x11,0x11,0x01,0x00,0x00,0x00,0x00, /* 00000090 "........" */
0x01,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x78, /* 00000098 ".......x" */
0x56,0x00,0x00,0x00,0x00,0x74,0x00,0x00, /* 000000A0 "V....t.." */
0x2C,0x00,0x00,0x00,0x44,0x00,0x00,0x00, /* 000000A8 ",...D..." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 000000B8 "....gE#." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000C8 "........" */
0x11,0x11,0x00,0x00,0x01,0x00,0x01,0x00, /* 000000D0 "........" */
0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 000000D8 "....gE#." */
0x67,0x67,0x67,0x67,0x00,0x00,0x00,0x00, /* 000000E0 "gggg...." */
0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00, /* 000000E8 "........" */
0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 000000F0 "....gE#." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000F8 "........" */
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000100 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000108 "........" */
0x11,0x11,0x11,0x01,0x00,0x00,0x00,0x00, /* 00000110 "........" */
0x01,0x60,0x00,0x00,0x2C,0x00,0x00,0x00, /* 00000118 ".`..,..." */
0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000120 "0......." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000128 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000130 "........" */
0x00,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x89, /* 00000138 "........" */
0x67,0x45,0x23,0x01,0xAA,0xAA,0x00,0x00, /* 00000140 "gE#....." */
0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000148 "........" */
0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000150 "....gE#." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000158 "........" */
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000160 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000168 "........" */
0x11,0x11,0x11,0x01,0x00,0x00,0x00,0x00, /* 00000170 "........" */
0x02,0x64,0x00,0x00,0x2C,0x00,0x00,0x00, /* 00000178 ".d..,..." */
0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000180 "4......." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000188 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000190 "........" */
0x00,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x89, /* 00000198 "........" */
0x67,0x45,0x23,0x01,0x55,0x55,0x55,0x55, /* 000001A0 "gE#.UUUU" */
0x66,0x66,0x66,0x66,0x01,0x00,0x00,0x00, /* 000001A8 "ffff...." */
0x03,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x89, /* 000001B0 "........" */
0x67,0x45,0x23,0x01,0x00,0x00,0x00,0x00, /* 000001B8 "gE#....." */
0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000001C0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001C8 "........" */
0x00,0x00,0x00,0x00,0x11,0x11,0x11,0x01, /* 000001D0 "........" */
0x00,0x00,0x00,0x00,0x03,0x74,0x00,0x00, /* 000001D8 ".....t.." */
0x2C,0x00,0x00,0x00,0x44,0x00,0x00,0x00, /* 000001E0 ",...D..." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001E8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001F0 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000001F8 "........" */
0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000200 "....gE#." */
0x33,0x33,0x33,0x33,0x44,0x44,0x44,0x44, /* 00000208 "3333DDDD" */
0x12,0x23,0x34,0x45,0x56,0x67,0x78,0x89, /* 00000210 ".#4EVgx." */
0x9A,0xAB,0xBC,0xCD,0xDE,0xEF,0xFF,0x55, /* 00000218 ".......U" */
0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00, /* 00000220 "........" */
0xEF,0xCD,0xAB,0x89,0x67,0x45,0x23,0x01, /* 00000228 "....gE#." */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000230 "........" */
0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000238 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000240 "........" */
0x11,0x11,0x11,0x01,0x00,0x00,0x00,0x00, /* 00000248 "........" */
0x04,0x7C,0x00,0x00,0x2C,0x00,0x00,0x00, /* 00000250 ".|..,..." */
0x34,0x00,0x00,0x00,0x64,0x00,0x00,0x00, /* 00000258 "4...d..." */
0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000260 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000268 "........" */
0x00,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x89, /* 00000270 "........" */
0x67,0x45,0x23,0x01,0x03,0x00,0x00,0x00, /* 00000278 "gE#....." */
0x88,0x88,0x77,0x77,0x00,0x00,0x00,0x00, /* 00000280 "..ww...." */
0x03,0x00,0x00,0x00,0xEF,0xCD,0xAB,0x89, /* 00000288 "........" */
0x67,0x45,0x23,0x01,0x00,0x00,0x00,0x00, /* 00000290 "gE#....." */
0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000298 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000002A0 "........" */
0x00,0x00,0x00,0x00,0x11,0x11,0x11,0x01, /* 000002A8 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000002B0 "........" */
0xBB,0xBB,0xAA,0xAA,0xCC,0x00,0x00,0x00, /* 000002B8 "........" */
0x01,0x00,0x00,0x01,0xEF,0xCD,0xAB,0x78, /* 000002C0 ".......x" */
0x56,0x00,0x00,0x00 /* 000002C8 "V..." */
};
const unsigned char TemplateAsf[] =
{
0x41,0x53,0x46,0x21,0x72,0x00,0x00,0x00, /* 00000000 "ASF!r..." */

View File

@ -452,6 +452,7 @@ DtGetFieldType (
break;
case ACPI_DMT_UNICODE:
case ACPI_DMT_WPBT_UNICODE:
Type = DT_FIELD_TYPE_UNICODE;
break;
@ -586,6 +587,10 @@ DtGetFieldLength (
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:
@ -616,6 +621,8 @@ DtGetFieldLength (
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:
@ -734,12 +741,13 @@ DtGetFieldLength (
break;
case ACPI_DMT_UNICODE:
case ACPI_DMT_WPBT_UNICODE:
Value = DtGetFieldValue (Field);
/* TBD: error if Value is NULL? (as below?) */
ByteLength = (strlen (Value) + 1) * sizeof(UINT16);
ByteLength = (strlen (Value) + 1) * sizeof (UINT16);
break;
default:

View File

@ -737,7 +737,7 @@ AcpiDsExecEndOp (
if (ACPI_SUCCESS (Status))
{
Status = AcpiExWriteDataToField (ObjDesc, Op->Common.Node->Object, NULL);
if ACPI_FAILURE (Status)
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status, "While writing to buffer field"));
}

View File

@ -250,6 +250,12 @@ typedef enum
/* Types that are specific to particular ACPI tables */
ACPI_DMT_AEST,
ACPI_DMT_AEST_CACHE,
ACPI_DMT_AEST_GIC,
ACPI_DMT_AEST_RES,
ACPI_DMT_AEST_XFACE,
ACPI_DMT_AEST_XRUPT,
ACPI_DMT_ASF,
ACPI_DMT_CEDT,
ACPI_DMT_DMAR,
@ -283,6 +289,7 @@ typedef enum
ACPI_DMT_SRAT,
ACPI_DMT_TPM2,
ACPI_DMT_VIOT,
ACPI_DMT_WPBT_UNICODE,
/* Special opcodes */
@ -360,6 +367,17 @@ extern const char *AcpiGbl_AccessTypes[];
extern const char *AcpiGbl_UpdateRules[];
extern const char *AcpiGbl_MatchOps[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestProcError[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestCacheRsrc[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestTlbRsrc[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestGenRsrc[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestMemError[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestSmmuError[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestVendorError[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestGicError[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestXface[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestXrupt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1a[];
@ -681,6 +699,10 @@ AcpiDmDumpUnicode (
UINT32 BufferOffset,
UINT32 ByteLength);
void
AcpiDmDumpAest (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpAsf (
ACPI_TABLE_HEADER *Table);

View File

@ -162,6 +162,7 @@
#define METHOD_NAME__CLS "_CLS"
#define METHOD_NAME__CRS "_CRS"
#define METHOD_NAME__DDN "_DDN"
#define METHOD_NAME__DIS "_DIS"
#define METHOD_NAME__DMA "_DMA"
#define METHOD_NAME__HID "_HID"
#define METHOD_NAME__INI "_INI"

View File

@ -561,7 +561,7 @@
/* Conditional execution */
#define ACPI_DEBUG_EXEC(a) a
#define ACPI_DEBUG_ONLY_MEMBERS(a) a;
#define ACPI_DEBUG_ONLY_MEMBERS(a) a
#define _VERBOSE_STRUCTURES

View File

@ -154,7 +154,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20210604
#define ACPI_CA_VERSION 0x20210730
#include <contrib/dev/acpica/include/acconfig.h>
#include <contrib/dev/acpica/include/actypes.h>

View File

@ -205,11 +205,23 @@
#define ACPI_WDDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDDT,f)
#define ACPI_WDRT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WDRT,f)
#define ACPI_WPBT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WPBT,f)
#define ACPI_WPBT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_WPBT_UNICODE,f)
#define ACPI_WSMT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WSMT,f)
#define ACPI_XENV_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_XENV,f)
/* Subtables */
#define ACPI_AESTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_HEADER,f)
#define ACPI_AEST0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR,f)
#define ACPI_AEST0A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR_CACHE,f)
#define ACPI_AEST0B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR_TLB,f)
#define ACPI_AEST0C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_PROCESSOR_GENERIC,f)
#define ACPI_AEST1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_MEMORY,f)
#define ACPI_AEST2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_SMMU,f)
#define ACPI_AEST3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_VENDOR,f)
#define ACPI_AEST4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_GIC,f)
#define ACPI_AEST0D_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_NODE_INTERFACE,f)
#define ACPI_AEST0E_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_AEST_NODE_INTERRUPT,f)
#define ACPI_ASF0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_INFO,f)
#define ACPI_ASF1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT,f)
#define ACPI_ASF1a_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_ASF_ALERT_DATA,f)
@ -379,6 +391,9 @@
/* Flags */
#define ACPI_AEST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_PROCESSOR,f,o)
#define ACPI_AEST0D_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_NODE_INTERFACE,f,o)
#define ACPI_AEST0E_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_NODE_INTERRUPT,f,o)
#define ACPI_BGRT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_BGRT,f,o)
#define ACPI_DRTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_DRTM,f,o)
#define ACPI_DRTM1a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_DRTM_RESOURCE,f,o)

View File

@ -168,6 +168,7 @@
* file. Useful because they make it more difficult to inadvertently type in
* the wrong signature.
*/
#define ACPI_SIG_AEST "AEST" /* Arm Error Source Table */
#define ACPI_SIG_ASF "ASF!" /* Alert Standard Format table */
#define ACPI_SIG_BERT "BERT" /* Boot Error Record Table */
#define ACPI_SIG_BGRT "BGRT" /* Boot Graphics Resource Table */
@ -701,7 +702,7 @@ typedef struct acpi_csrt_descriptor
* DBG2 - Debug Port Table 2
* Version 0 (Both main table and subtables)
*
* Conforms to "Microsoft Debug Port Table 2 (DBG2)", December 10, 2015
* Conforms to "Microsoft Debug Port Table 2 (DBG2)", September 21, 2020
*
******************************************************************************/
@ -758,11 +759,24 @@ typedef struct acpi_dbg2_device
#define ACPI_DBG2_16550_COMPATIBLE 0x0000
#define ACPI_DBG2_16550_SUBSET 0x0001
#define ACPI_DBG2_MAX311XE_SPI 0x0002
#define ACPI_DBG2_ARM_PL011 0x0003
#define ACPI_DBG2_MSM8X60 0x0004
#define ACPI_DBG2_16550_NVIDIA 0x0005
#define ACPI_DBG2_TI_OMAP 0x0006
#define ACPI_DBG2_APM88XXXX 0x0008
#define ACPI_DBG2_MSM8974 0x0009
#define ACPI_DBG2_SAM5250 0x000A
#define ACPI_DBG2_INTEL_USIF 0x000B
#define ACPI_DBG2_IMX6 0x000C
#define ACPI_DBG2_ARM_SBSA_32BIT 0x000D
#define ACPI_DBG2_ARM_SBSA_GENERIC 0x000E
#define ACPI_DBG2_ARM_DCC 0x000F
#define ACPI_DBG2_BCM2835 0x0010
#define ACPI_DBG2_SDM845_1_8432MHZ 0x0011
#define ACPI_DBG2_16550_WITH_GAS 0x0012
#define ACPI_DBG2_SDM845_7_372MHZ 0x0013
#define ACPI_DBG2_INTEL_LPSS 0x0014
#define ACPI_DBG2_1394_STANDARD 0x0000

View File

@ -213,6 +213,193 @@
*/
/*******************************************************************************
*
* AEST - Arm Error Source Table
*
* Conforms to: ACPI for the Armv8 RAS Extensions 1.1 Platform Design Document
* September 2020.
*
******************************************************************************/
typedef struct acpi_table_aest
{
ACPI_TABLE_HEADER Header;
void *NodeArray[];
} ACPI_TABLE_AEST;
/* Common Subtable header - one per Node Structure (Subtable) */
typedef struct acpi_aest_hdr
{
UINT8 Type;
UINT16 Length;
UINT8 Reserved;
UINT32 NodeSpecificOffset;
UINT32 NodeInterfaceOffset;
UINT32 NodeInterruptOffset;
UINT32 NodeInterruptCount;
UINT64 TimestampRate;
UINT64 Reserved1;
UINT64 ErrorInjectionRate;
} ACPI_AEST_HEADER;
/* Values for Type above */
#define ACPI_AEST_PROCESSOR_ERROR_NODE 0
#define ACPI_AEST_MEMORY_ERROR_NODE 1
#define ACPI_AEST_SMMU_ERROR_NODE 2
#define ACPI_AEST_VENDOR_ERROR_NODE 3
#define ACPI_AEST_GIC_ERROR_NODE 4
#define ACPI_AEST_NODE_TYPE_RESERVED 5 /* 5 and above are reserved */
/*
* AEST subtables (Error nodes)
*/
/* 0: Processor Error */
typedef struct acpi_aest_processor
{
UINT32 ProcessorId;
UINT8 ResourceType;
UINT8 Reserved;
UINT8 Flags;
UINT8 Revision;
UINT64 ProcessorAffinity;
} ACPI_AEST_PROCESSOR;
/* Values for ResourceType above, related structs below */
#define ACPI_AEST_CACHE_RESOURCE 0
#define ACPI_AEST_TLB_RESOURCE 1
#define ACPI_AEST_GENERIC_RESOURCE 2
#define ACPI_AEST_RESOURCE_RESERVED 3 /* 3 and above are reserved */
/* 0R: Processor Cache Resource Substructure */
typedef struct acpi_aest_processor_cache
{
UINT32 CacheReference;
UINT32 Reserved;
} ACPI_AEST_PROCESSOR_CACHE;
/* Values for CacheType above */
#define ACPI_AEST_CACHE_DATA 0
#define ACPI_AEST_CACHE_INSTRUCTION 1
#define ACPI_AEST_CACHE_UNIFIED 2
#define ACPI_AEST_CACHE_RESERVED 3 /* 3 and above are reserved */
/* 1R: Processor TLB Resource Substructure */
typedef struct acpi_aest_processor_tlb
{
UINT32 TlbLevel;
UINT32 Reserved;
} ACPI_AEST_PROCESSOR_TLB;
/* 2R: Processor Generic Resource Substructure */
typedef struct acpi_aest_processor_generic
{
UINT8 *Resource;
} ACPI_AEST_PROCESSOR_GENERIC;
/* 1: Memory Error */
typedef struct acpi_aest_memory
{
UINT32 SratProximityDomain;
} ACPI_AEST_MEMORY;
/* 2: Smmu Error */
typedef struct acpi_aest_smmu
{
UINT32 IortNodeReference;
UINT32 SubcomponentReference;
} ACPI_AEST_SMMU;
/* 3: Vendor Defined */
typedef struct acpi_aest_vendor
{
UINT32 AcpiHid;
UINT32 AcpiUid;
UINT8 VendorSpecificData[16];
} ACPI_AEST_VENDOR;
/* 4: Gic Error */
typedef struct acpi_aest_gic
{
UINT32 InterfaceType;
UINT32 InstanceId;
} ACPI_AEST_GIC;
/* Values for InterfaceType above */
#define ACPI_AEST_GIC_CPU 0
#define ACPI_AEST_GIC_DISTRIBUTOR 1
#define ACPI_AEST_GIC_REDISTRIBUTOR 2
#define ACPI_AEST_GIC_ITS 3
#define ACPI_AEST_GIC_RESERVED 4 /* 4 and above are reserved */
/* Node Interface Structure */
typedef struct acpi_aest_node_interface
{
UINT8 Type;
UINT8 Reserved[3];
UINT32 Flags;
UINT64 Address;
UINT32 ErrorRecordIndex;
UINT32 ErrorRecordCount;
UINT64 ErrorRecordImplemented;
UINT64 ErrorStatusReporting;
UINT64 AddressingMode;
} ACPI_AEST_NODE_INTERFACE;
/* Values for Type field above */
#define ACPI_AEST_NODE_SYSTEM_REGISTER 0
#define ACPI_AEST_NODE_MEMORY_MAPPED 1
#define ACPI_AEST_XFACE_RESERVED 2 /* 2 and above are reserved */
/* Node Interrupt Structure */
typedef struct acpi_aest_node_interrupt
{
UINT8 Type;
UINT8 Reserved[2];
UINT8 Flags;
UINT32 Gsiv;
UINT8 IortId;
UINT8 Reserved1[3];
} ACPI_AEST_NODE_INTERRUPT;
/* Values for Type field above */
#define ACPI_AEST_NODE_FAULT_HANDLING 0
#define ACPI_AEST_NODE_ERROR_RECOVERY 1
#define ACPI_AEST_XRUPT_RESERVED 2 /* 2 and above are reserved */
/*******************************************************************************
*
* BDAT - BIOS Data ACPI Table
@ -2163,6 +2350,13 @@ typedef struct acpi_table_prmt_header
} ACPI_TABLE_PRMT_HEADER;
typedef struct acpi_prmt_module_header
{
UINT16 Revision;
UINT16 Length;
} ACPI_PRMT_MODULE_HEADER;
typedef struct acpi_prmt_module_info
{
UINT16 Revision;

View File

@ -955,6 +955,12 @@ typedef struct acpi_table_wpbt
} ACPI_TABLE_WPBT;
typedef struct acpi_wpbt_unicode
{
UINT16 *UnicodeString;
} ACPI_WPBT_UNICODE;
/*******************************************************************************
*