summaryrefslogtreecommitdiff
path: root/source/common
diff options
context:
space:
mode:
Diffstat (limited to 'source/common')
-rw-r--r--source/common/acfileio.c2
-rw-r--r--source/common/adfile.c10
-rw-r--r--source/common/adisasm.c8
-rw-r--r--source/common/adwalk.c105
-rw-r--r--source/common/ahids.c1
-rw-r--r--source/common/ahpredef.c6
-rw-r--r--source/common/ahtable.c3
-rw-r--r--source/common/ahuuids.c4
-rw-r--r--source/common/dmextern.c520
-rw-r--r--source/common/dmrestag.c36
-rw-r--r--source/common/dmswitch.c679
-rw-r--r--source/common/dmtable.c79
-rw-r--r--source/common/dmtbdump.c350
-rw-r--r--source/common/dmtbinfo.c325
14 files changed, 1986 insertions, 142 deletions
diff --git a/source/common/acfileio.c b/source/common/acfileio.c
index ecd9f604cf4d..a334d541e78a 100644
--- a/source/common/acfileio.c
+++ b/source/common/acfileio.c
@@ -531,8 +531,6 @@ AcValidateTableHeader (
if (!AcpiUtValidNameseg (TableHeader.Signature))
{
- fprintf (stderr, "Invalid table signature: 0x%8.8X\n",
- *ACPI_CAST_PTR (UINT32, TableHeader.Signature));
return (AE_BAD_SIGNATURE);
}
diff --git a/source/common/adfile.c b/source/common/adfile.c
index 5fff07d3a13c..ac96156db245 100644
--- a/source/common/adfile.c
+++ b/source/common/adfile.c
@@ -316,11 +316,6 @@ FlGenerateFilename (
*/
NewFilename = UtStringCacheCalloc ((ACPI_SIZE)
strlen (InputFilename) + strlen (Suffix) + 2);
- if (!NewFilename)
- {
- return (NULL);
- }
-
strcpy (NewFilename, InputFilename);
/* Try to find the last dot in the filename */
@@ -364,11 +359,6 @@ FlStrdup (
NewString = UtStringCacheCalloc ((ACPI_SIZE) strlen (String) + 1);
- if (!NewString)
- {
- return (NULL);
- }
-
strcpy (NewString, String);
return (NewString);
}
diff --git a/source/common/adisasm.c b/source/common/adisasm.c
index 699cc8a81857..703691523fe2 100644
--- a/source/common/adisasm.c
+++ b/source/common/adisasm.c
@@ -537,7 +537,7 @@ AdDisassembleOneTable (
* the entire tree with the new information (namely, the
* number of arguments per method)
*/
- if (AcpiDmGetExternalMethodCount ())
+ if (AcpiDmGetUnresolvedExternalMethodCount ())
{
Status = AdReparseOneTable (Table, File, OwnerId);
if (ACPI_FAILURE (Status))
@@ -553,7 +553,7 @@ AdDisassembleOneTable (
* 1) Convert fixed-offset references to resource descriptors
* to symbolic references (Note: modifies namespace)
*/
- AcpiDmConvertResourceIndexes (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode);
+ AcpiDmConvertParseObjects (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode);
/* Optional displays */
@@ -616,7 +616,7 @@ AdReparseOneTable (
fprintf (stderr,
"\nFound %u external control methods, "
"reparsing with new information\n",
- AcpiDmGetExternalMethodCount ());
+ AcpiDmGetUnresolvedExternalMethodCount ());
/* Reparse, rebuild namespace */
@@ -642,7 +642,7 @@ AdReparseOneTable (
/* New namespace, add the external definitions first */
- AcpiDmAddExternalsToNamespace ();
+ AcpiDmAddExternalListToNamespace ();
/* For -ca option: clear the list of comment addresses. */
diff --git a/source/common/adwalk.c b/source/common/adwalk.c
index e1205e3bfa5e..887835cb0507 100644
--- a/source/common/adwalk.c
+++ b/source/common/adwalk.c
@@ -208,11 +208,16 @@ AcpiDmInspectPossibleArgs (
ACPI_PARSE_OBJECT *Op);
static ACPI_STATUS
-AcpiDmResourceDescendingOp (
+AcpiDmCommonDescendingOp (
ACPI_PARSE_OBJECT *Op,
UINT32 Level,
void *Context);
+static ACPI_STATUS
+AcpiDmProcessResourceDescriptors (
+ ACPI_PARSE_OBJECT *Op,
+ UINT32 Level,
+ void *Context);
/*******************************************************************************
*
@@ -395,21 +400,21 @@ AcpiDmCrossReferenceNamespace (
/*******************************************************************************
*
- * FUNCTION: AcpiDmConvertResourceIndexes
+ * FUNCTION: AcpiDmConvertParseObjects
*
* PARAMETERS: ParseTreeRoot - Root of the parse tree
* NamespaceRoot - Root of the internal namespace
*
* RETURN: None
*
- * DESCRIPTION: Convert fixed-offset references to resource descriptors to
- * symbolic references. Should only be called after namespace has
- * been cross referenced.
+ * DESCRIPTION: Begin parse tree walk to perform conversions needed for
+ * disassembly. These include resource descriptors and switch/case
+ * operations.
*
******************************************************************************/
void
-AcpiDmConvertResourceIndexes (
+AcpiDmConvertParseObjects (
ACPI_PARSE_OBJECT *ParseTreeRoot,
ACPI_NAMESPACE_NODE *NamespaceRoot)
{
@@ -443,9 +448,14 @@ AcpiDmConvertResourceIndexes (
Info.Level = 0;
Info.WalkState = WalkState;
- AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmResourceDescendingOp,
+ AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmCommonDescendingOp,
AcpiDmCommonAscendingOp, &Info);
ACPI_FREE (WalkState);
+
+ if (AcpiGbl_TempListHead) {
+ AcpiDmClearTempList();
+ }
+
return;
}
@@ -737,7 +747,6 @@ AcpiDmLoadDescendingOp (
WalkState = Info->WalkState;
OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
- ObjectType = OpInfo->ObjectType;
ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);
/* Only interested in operators that create new names */
@@ -754,7 +763,7 @@ AcpiDmLoadDescendingOp (
{
/* For all named operators, get the new name */
- Path = (char *) Op->Named.Path;
+ Path = Op->Named.Path;
if (!Path && Op->Common.AmlOpcode == AML_INT_NAMEDFIELD_OP)
{
@@ -875,7 +884,6 @@ AcpiDmXrefDescendingOp (
WalkState = Info->WalkState;
OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
- ObjectType = OpInfo->ObjectType;
ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);
if ((!(OpInfo->Flags & AML_NAMED)) &&
@@ -885,25 +893,6 @@ AcpiDmXrefDescendingOp (
{
goto Exit;
}
- else if (Op->Common.Parent &&
- Op->Common.Parent->Common.AmlOpcode == AML_EXTERNAL_OP)
- {
- /* External() NamePath */
-
- Path = Op->Common.Value.String;
- ObjectType = (ACPI_OBJECT_TYPE) Op->Common.Next->Common.Value.Integer;
- if (ObjectType == ACPI_TYPE_METHOD)
- {
- ParamCount = (UINT32)
- Op->Common.Next->Common.Next->Common.Value.Integer;
- }
-
- Flags |= ACPI_EXT_RESOLVED_REFERENCE | ACPI_EXT_ORIGIN_FROM_OPCODE;
- AcpiDmAddOpToExternalList (Op, Path,
- (UINT8) ObjectType, ParamCount, Flags);
-
- goto Exit;
- }
/* Get the NamePath from the appropriate place */
@@ -924,9 +913,10 @@ AcpiDmXrefDescendingOp (
Path = NextOp->Common.Value.String;
}
}
- else if (Op->Common.AmlOpcode == AML_SCOPE_OP)
+ else if (Op->Common.AmlOpcode == AML_SCOPE_OP ||
+ Op->Common.AmlOpcode == AML_EXTERNAL_OP)
{
- Path = (char *) Op->Named.Path;
+ Path = Op->Named.Path;
}
}
else if (OpInfo->Flags & AML_CREATE)
@@ -1060,21 +1050,59 @@ Exit:
return (AE_OK);
}
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmCommonDescendingOp
+ *
+ * PARAMETERS: ASL_WALK_CALLBACK
+ *
+ * RETURN: ACPI_STATUS
+ *
+ * DESCRIPTION: Perform parse tree preprocessing before main disassembly walk.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDmCommonDescendingOp (
+ ACPI_PARSE_OBJECT *Op,
+ UINT32 Level,
+ void *Context)
+{
+ ACPI_STATUS Status;
+
+ /* Resource descriptor conversion */
+
+ Status = AcpiDmProcessResourceDescriptors (Op, Level, Context);
+
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+
+ /* Switch/Case conversion */
+
+ Status = AcpiDmProcessSwitch (Op);
+
+ return (AE_OK);
+}
+
/*******************************************************************************
*
- * FUNCTION: AcpiDmResourceDescendingOp
+ * FUNCTION: AcpiDmProcessResourceDescriptors
*
* PARAMETERS: ASL_WALK_CALLBACK
*
- * RETURN: None
+ * RETURN: ACPI_STATUS
*
- * DESCRIPTION: Process one parse op during symbolic resource index conversion.
+ * DESCRIPTION: Convert fixed-offset references to resource descriptors to
+ * symbolic references. Should only be called after namespace has
+ * been cross referenced.
*
******************************************************************************/
static ACPI_STATUS
-AcpiDmResourceDescendingOp (
+AcpiDmProcessResourceDescriptors (
ACPI_PARSE_OBJECT *Op,
UINT32 Level,
void *Context)
@@ -1085,7 +1113,6 @@ AcpiDmResourceDescendingOp (
ACPI_OBJECT_TYPE ObjectType;
ACPI_STATUS Status;
-
WalkState = Info->WalkState;
OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
@@ -1111,10 +1138,10 @@ AcpiDmResourceDescendingOp (
* If so, convert the reference into a symbolic reference.
*/
AcpiDmCheckResourceReference (Op, WalkState);
+
return (AE_OK);
}
-
/*******************************************************************************
*
* FUNCTION: AcpiDmCommonAscendingOp
@@ -1135,14 +1162,11 @@ AcpiDmCommonAscendingOp (
void *Context)
{
ACPI_OP_WALK_INFO *Info = Context;
- const ACPI_OPCODE_INFO *OpInfo;
ACPI_OBJECT_TYPE ObjectType;
/* Close scope if necessary */
- OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
- ObjectType = OpInfo->ObjectType;
ObjectType = AslMapNamedOpcodeToDataType (Op->Asl.AmlOpcode);
if (AcpiNsOpensScope (ObjectType))
@@ -1153,7 +1177,6 @@ AcpiDmCommonAscendingOp (
return (AE_OK);
}
-
/*******************************************************************************
*
* FUNCTION: AcpiDmInspectPossibleArgs
diff --git a/source/common/ahids.c b/source/common/ahids.c
index 3f3bae3021cd..701d9f40b661 100644
--- a/source/common/ahids.c
+++ b/source/common/ahids.c
@@ -187,6 +187,7 @@ const AH_DEVICE_ID AslDeviceIds[] =
{"ACPI0011", "Generic Buttons Device"},
{"ACPI0012", "NVDIMM Root Device"},
{"ACPI0013", "Generic Event Device"},
+ {"ACPI0014", "Wireless Power Calibration Device"},
{"ADMA0F28", "Intel Audio DMA"},
{"AMCR0F28", "Intel Audio Machine Driver"},
{"ATK4001", "Asus Radio Control Button"},
diff --git a/source/common/ahpredef.c b/source/common/ahpredef.c
index 41e19f687b8a..edcfa2f04301 100644
--- a/source/common/ahpredef.c
+++ b/source/common/ahpredef.c
@@ -254,6 +254,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] =
AH_PREDEF ("_FPS", "Fan Performance States", "Returns a list of supported fan performance states"),
AH_PREDEF ("_FSL", "Fan Set Level", "Control method that sets the fan device's speed level (performance state)"),
AH_PREDEF ("_FST", "Fan Status", "Returns current status information for a fan device"),
+ AH_PREDEF ("_FUN", "Function Number", "Resource descriptor field"),
AH_PREDEF ("_GAI", "Get Averaging Interval", "Returns the power meter averaging interval"),
AH_PREDEF ("_GCP", "Get Capabilities", "Get device time capabilities"),
AH_PREDEF ("_GHL", "Get Hardware Limit", "Returns the hardware limit enforced by the power meter"),
@@ -270,6 +271,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] =
AH_PREDEF ("_GWS", "Get Wake Status", "Return status of wake alarms"),
AH_PREDEF ("_HE_", "High-Edge", "Interrupt triggering, Resource Descriptor field"),
AH_PREDEF ("_HID", "Hardware ID", "Returns a device's Plug and Play Hardware ID"),
+ AH_PREDEF ("_HMA", "Heterogeneous Memory Attributes", "Returns a list of HMAT structures."),
AH_PREDEF ("_HOT", "Hot Temperature", "Returns the critical temperature for sleep (entry to S4)"),
AH_PREDEF ("_HPP", "Hot Plug Parameters", "Returns a list of hot-plug information for a PCI device"),
AH_PREDEF ("_HPX", "Hot Plug Parameter Extensions", "Returns a list of hot-plug information for a PCI device. Supersedes _HPP"),
@@ -287,6 +289,9 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] =
AH_PREDEF ("_LL_", "Low Level", "Interrupt polarity, Resource Descriptor field"),
AH_PREDEF ("_LPD", "Low Power Dependencies", "Returns a list of dependencies for low power idle entry"),
AH_PREDEF ("_LPI", "Low Power Idle States", "Returns a list of supported low power idle states"),
+ AH_PREDEF ("_LSI", "Label Storage Information", "Returns information about the Label Storage Area associated with the NVDIMM object."),
+ AH_PREDEF ("_LSR", "Label Storage Read", "Returns label data from the Label Storage Area of the NVDIMM object."),
+ AH_PREDEF ("_LSW", "Label Storage Write", "Writes label data in to the Label Storage Area of the NVDIMM object."),
AH_PREDEF ("_MAF", "Maximum Address Fixed", "Resource Descriptor field"),
AH_PREDEF ("_MAT", "Multiple APIC Table Entry", "Returns a list of MADT APIC structure entries"),
AH_PREDEF ("_MAX", "Maximum Base Address", "Resource Descriptor field"),
@@ -439,6 +444,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] =
AH_PREDEF ("_UPC", "USB Port Capabilities", "Returns a list of USB port capabilities"),
AH_PREDEF ("_UPD", "User Presence Detect", "Returns user detection information"),
AH_PREDEF ("_UPP", "User Presence Polling", "Returns the recommended user presence polling interval"),
+ AH_PREDEF ("_VAL", "Pin Configuration Value", "Resource Descriptor field"),
AH_PREDEF ("_VEN", "Vendor Data", "Resource Descriptor field"),
AH_PREDEF ("_VPO", "Video Post Options", "Returns the implemented video post options"),
AH_PREDEF ("_Wxx", "Wake Event", "Method executed as a result of a wake event"),
diff --git a/source/common/ahtable.c b/source/common/ahtable.c
index 42a7944f5f95..38c1ea20e72c 100644
--- a/source/common/ahtable.c
+++ b/source/common/ahtable.c
@@ -218,6 +218,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] =
{ACPI_SIG_FPDT, "Firmware Performance Data Table"},
{ACPI_SIG_GTDT, "Generic Timer Description Table"},
{ACPI_SIG_HEST, "Hardware Error Source Table"},
+ {ACPI_SIG_HMAT, "Heterogeneous Memory Attributes Table"},
{ACPI_SIG_HPET, "High Precision Event Timer table"},
{ACPI_SIG_IORT, "IO Remapping Table"},
{ACPI_SIG_IVRS, "I/O Virtualization Reporting Structure"},
@@ -232,6 +233,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] =
{ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"},
{ACPI_SIG_PCCT, "Platform Communications Channel Table"},
{ACPI_SIG_PMTT, "Platform Memory Topology Table"},
+ {ACPI_SIG_PPTT, "Processor Properties Topology Table"},
{ACPI_SIG_RASF, "RAS Features Table"},
{ACPI_RSDP_NAME,"Root System Description Pointer"},
{ACPI_SIG_RSDT, "Root System Description Table"},
@@ -253,6 +255,7 @@ const AH_TABLE Gbl_AcpiSupportedTables[] =
{ACPI_SIG_WDDT, "Watchdog Description Table"},
{ACPI_SIG_WDRT, "Watchdog Resource Table"},
{ACPI_SIG_WPBT, "Windows Platform Binary Table"},
+ {ACPI_SIG_WSMT, "Windows SMM Security Migrations Table"},
{ACPI_SIG_XENV, "Xen Environment table"},
{ACPI_SIG_XSDT, "Extended System Description Table"},
{NULL, NULL}
diff --git a/source/common/ahuuids.c b/source/common/ahuuids.c
index f2b6244305b0..6e018a302c21 100644
--- a/source/common/ahuuids.c
+++ b/source/common/ahuuids.c
@@ -186,6 +186,10 @@ const AH_UUID Gbl_AcpiUuids[] =
{"Persistent Virtual Disk", UUID_PERSISTENT_VIRTUAL_DISK},
{"Persistent Virtual CD", UUID_PERSISTENT_VIRTUAL_CD},
+ {"[Processor Properties]", NULL},
+ {"Cache Properties", UUID_CACHE_PROPERTIES},
+ {"Physical Package Property", UUID_PHYSICAL_PROPERTY},
+
{"[Miscellaneous]", NULL},
{"Platform-wide Capabilities", UUID_PLATFORM_CAPABILITIES},
{"Dynamic Enumeration", UUID_DYNAMIC_ENUMERATION},
diff --git a/source/common/dmextern.c b/source/common/dmextern.c
index 818d2adc2052..6ae3c3793a86 100644
--- a/source/common/dmextern.c
+++ b/source/common/dmextern.c
@@ -199,6 +199,9 @@ static const char *AcpiGbl_DmTypeNames[] =
#define METHOD_SEPARATORS " \t,()\n"
+static const char *ExternalConflictMessage =
+ " // Conflicts with a later declaration";
+
/* Local prototypes */
@@ -211,6 +214,16 @@ AcpiDmNormalizeParentPrefix (
ACPI_PARSE_OBJECT *Op,
char *Path);
+static ACPI_STATUS
+AcpiDmGetExternalAndInternalPath (
+ ACPI_NAMESPACE_NODE *Node,
+ char **ExternalPath,
+ char **InternalPath);
+
+static ACPI_STATUS
+AcpiDmRemoveRootPrefix (
+ char **Path);
+
static void
AcpiDmAddPathToExternalList (
char *Path,
@@ -226,6 +239,21 @@ AcpiDmCreateNewExternal (
UINT32 Value,
UINT16 Flags);
+static void
+AcpiDmCheckForExternalConflict (
+ char *Path);
+
+static ACPI_STATUS
+AcpiDmResolveExternal (
+ char *Path,
+ UINT8 Type,
+ ACPI_NAMESPACE_NODE **Node);
+
+
+static void
+AcpiDmConflictingDeclaration (
+ char *Path);
+
/*******************************************************************************
*
@@ -582,7 +610,7 @@ AcpiDmGetExternalsFromFile (
{
/* Add the external(s) to the namespace */
- AcpiDmAddExternalsToNamespace ();
+ AcpiDmAddExternalListToNamespace ();
AcpiOsPrintf ("%s: Imported %u external method definitions\n",
Gbl_ExternalRefFilename, ImportCount);
@@ -698,6 +726,86 @@ AcpiDmAddOpToExternalList (
/*******************************************************************************
*
+ * FUNCTION: AcpiDmGetExternalAndInternalPath
+ *
+ * PARAMETERS: Node - Namespace node for object to be added
+ * ExternalPath - Will contain the external path of the node
+ * InternalPath - Will contain the internal path of the node
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Get the External and Internal path from the given node.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDmGetExternalAndInternalPath (
+ ACPI_NAMESPACE_NODE *Node,
+ char **ExternalPath,
+ char **InternalPath)
+{
+ ACPI_STATUS Status;
+
+
+ if (!Node)
+ {
+ return (AE_BAD_PARAMETER);
+ }
+
+ /* Get the full external and internal pathnames to the node */
+
+ *ExternalPath = AcpiNsGetExternalPathname (Node);
+ if (!*ExternalPath)
+ {
+ return (AE_BAD_PATHNAME);
+ }
+
+ Status = AcpiNsInternalizeName (*ExternalPath, InternalPath);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_FREE (*ExternalPath);
+ return (Status);
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmRemoveRootPrefix
+ *
+ * PARAMETERS: Path - Remove Root prefix from this Path
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Remove the root prefix character '\' from Path.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDmRemoveRootPrefix (
+ char **Path)
+{
+ char *InputPath = *Path;
+
+
+ if ((*InputPath == AML_ROOT_PREFIX) && (InputPath[1]))
+ {
+ if (!memmove(InputPath, InputPath+1, strlen(InputPath)))
+ {
+ return (AE_ERROR);
+ }
+
+ *Path = InputPath;
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmAddNodeToExternalList
*
* PARAMETERS: Node - Namespace node for object to be added
@@ -727,46 +835,27 @@ AcpiDmAddNodeToExternalList (
{
char *ExternalPath;
char *InternalPath;
- char *Temp;
ACPI_STATUS Status;
ACPI_FUNCTION_TRACE (DmAddNodeToExternalList);
-
- if (!Node)
- {
- return_VOID;
- }
-
/* Get the full external and internal pathnames to the node */
- ExternalPath = AcpiNsGetExternalPathname (Node);
- if (!ExternalPath)
- {
- return_VOID;
- }
-
- Status = AcpiNsInternalizeName (ExternalPath, &InternalPath);
+ Status = AcpiDmGetExternalAndInternalPath (Node, &ExternalPath, &InternalPath);
if (ACPI_FAILURE (Status))
{
- ACPI_FREE (ExternalPath);
return_VOID;
}
/* Remove the root backslash */
- if ((*ExternalPath == AML_ROOT_PREFIX) && (ExternalPath[1]))
+ Status = AcpiDmRemoveRootPrefix (&ExternalPath);
+ if (ACPI_FAILURE (Status))
{
- Temp = ACPI_ALLOCATE_ZEROED (strlen (ExternalPath) + 1);
- if (!Temp)
- {
- return_VOID;
- }
-
- strcpy (Temp, &ExternalPath[1]);
ACPI_FREE (ExternalPath);
- ExternalPath = Temp;
+ ACPI_FREE (InternalPath);
+ return_VOID;
}
/* Create the new External() declaration node */
@@ -1013,68 +1102,171 @@ AcpiDmCreateNewExternal (
/*******************************************************************************
*
- * FUNCTION: AcpiDmAddExternalsToNamespace
+ * FUNCTION: AcpiDmResolveExternal
*
- * PARAMETERS: None
+ * PARAMETERS: Path - Path of the external
+ * Type - Type of the external
+ * Node - Input node for AcpiNsLookup
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Resolve the external within the namespace by AcpiNsLookup.
+ * If the returned node is an external and has the same type
+ * we assume that it was either an existing external or a
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiDmResolveExternal (
+ char *Path,
+ UINT8 Type,
+ ACPI_NAMESPACE_NODE **Node)
+{
+ ACPI_STATUS Status;
+
+
+ Status = AcpiNsLookup (NULL, Path, Type,
+ ACPI_IMODE_LOAD_PASS1,
+ ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE,
+ NULL, Node);
+
+ if (!Node)
+ {
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "while adding external to namespace [%s]", Path));
+ }
+
+ /* Note the asl code "external(a) external(a)" is acceptable ASL */
+
+ else if ((*Node)->Type == Type &&
+ (*Node)->Flags & ANOBJ_IS_EXTERNAL)
+ {
+ return (AE_OK);
+ }
+ else
+ {
+ ACPI_EXCEPTION ((AE_INFO, AE_ERROR,
+ "[%s] has conflicting declarations", Path));
+ }
+
+ return (AE_ERROR);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmCreateSubobjectForExternal
+ *
+ * PARAMETERS: Type - Type of the external
+ * Node - Namespace node from AcpiNsLookup
+ * ParamCount - Value to be used for Method
*
* RETURN: None
*
- * DESCRIPTION: Add all externals to the namespace. Allows externals to be
+ * DESCRIPTION: Add one external to the namespace. Allows external to be
* "resolved".
*
******************************************************************************/
void
-AcpiDmAddExternalsToNamespace (
- void)
+AcpiDmCreateSubobjectForExternal (
+ UINT8 Type,
+ ACPI_NAMESPACE_NODE **Node,
+ UINT32 ParamCount)
{
- ACPI_STATUS Status;
- ACPI_NAMESPACE_NODE *Node;
ACPI_OPERAND_OBJECT *ObjDesc;
- ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList;
- while (External)
+ switch (Type)
{
- /* Add the external name (object) into the namespace */
+ case ACPI_TYPE_METHOD:
- Status = AcpiNsLookup (NULL, External->InternalPath, External->Type,
- ACPI_IMODE_LOAD_PASS1,
- ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE,
- NULL, &Node);
+ /* For methods, we need to save the argument count */
- if (ACPI_FAILURE (Status))
- {
- ACPI_EXCEPTION ((AE_INFO, Status,
- "while adding external to namespace [%s]",
- External->Path));
- }
+ ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
+ ObjDesc->Method.ParamCount = (UINT8) ParamCount;
+ (*Node)->Object = ObjDesc;
+ break;
- else switch (External->Type)
- {
- case ACPI_TYPE_METHOD:
+ case ACPI_TYPE_REGION:
- /* For methods, we need to save the argument count */
+ /* Regions require a region sub-object */
- ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_METHOD);
- ObjDesc->Method.ParamCount = (UINT8) External->Value;
- Node->Object = ObjDesc;
- break;
+ ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
+ ObjDesc->Region.Node = *Node;
+ (*Node)->Object = ObjDesc;
+ break;
- case ACPI_TYPE_REGION:
+ default:
- /* Regions require a region sub-object */
+ break;
+ }
+}
- ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_REGION);
- ObjDesc->Region.Node = Node;
- Node->Object = ObjDesc;
- break;
- default:
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmAddOneExternalToNamespace
+ *
+ * PARAMETERS: Path - External parse object
+ * Type - Type of parse object
+ * ParamCount - External method parameter count
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Add one external to the namespace by resolvign the external
+ * (by performing a namespace lookup) and annotating the resulting
+ * namespace node with the approperiate information if the type
+ * is ACPI_TYPE_REGION or ACPI_TYPE_METHOD.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmAddOneExternalToNamespace (
+ char *Path,
+ UINT8 Type,
+ UINT32 ParamCount)
+{
+ ACPI_STATUS Status;
+ ACPI_NAMESPACE_NODE *Node;
- break;
- }
+ Status = AcpiDmResolveExternal (Path, Type, &Node);
+
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ AcpiDmCreateSubobjectForExternal (Type, &Node, ParamCount);
+
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmAddExternalListToNamespace
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Add all externals within AcpiGbl_ExternalList to the namespace.
+ * Allows externals to be "resolved".
+ *
+ ******************************************************************************/
+
+void
+AcpiDmAddExternalListToNamespace (
+ void)
+{
+ ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList;
+
+
+ while (External)
+ {
+ AcpiDmAddOneExternalToNamespace (External->InternalPath,
+ External->Type, External->Value);
External = External->Next;
}
}
@@ -1082,23 +1274,28 @@ AcpiDmAddExternalsToNamespace (
/*******************************************************************************
*
- * FUNCTION: AcpiDmGetExternalMethodCount
+ * FUNCTION: AcpiDmGetUnresolvedExternalMethodCount
*
* PARAMETERS: None
*
- * RETURN: The number of control method externals in the external list
+ * RETURN: The number of unresolved control method externals in the
+ * external list
*
- * DESCRIPTION: Return the number of method externals that have been generated.
- * If any control method externals have been found, we must
- * re-parse the entire definition block with the new information
- * (number of arguments for the methods.) This is limitation of
- * AML, we don't know the number of arguments from the control
- * method invocation itself.
+ * DESCRIPTION: Return the number of unresolved external methods that have been
+ * generated. If any unresolved control method externals have been
+ * found, we must re-parse the entire definition block with the new
+ * information (number of arguments for the methods.)
+ * This is limitation of AML, we don't know the number of arguments
+ * from the control method invocation itself.
+ *
+ * Note: resolved external control methods are external control
+ * methods encoded with the AML_EXTERNAL_OP bytecode within the
+ * AML being disassembled.
*
******************************************************************************/
UINT32
-AcpiDmGetExternalMethodCount (
+AcpiDmGetUnresolvedExternalMethodCount (
void)
{
ACPI_EXTERNAL_LIST *External = AcpiGbl_ExternalList;
@@ -1107,7 +1304,8 @@ AcpiDmGetExternalMethodCount (
while (External)
{
- if (External->Type == ACPI_TYPE_METHOD)
+ if (External->Type == ACPI_TYPE_METHOD &&
+ !(External->Flags & ACPI_EXT_ORIGIN_FROM_OPCODE))
{
Count++;
}
@@ -1251,6 +1449,11 @@ AcpiDmEmitExternals (
}
}
+ if (AcpiGbl_ExternalList->Flags &= ACPI_EXT_CONFLICTING_DECLARATION)
+ {
+ AcpiOsPrintf ("%s", ExternalConflictMessage);
+ AcpiDmConflictingDeclaration (AcpiGbl_ExternalList->Path);
+ }
AcpiOsPrintf ("\n");
}
@@ -1273,6 +1476,106 @@ AcpiDmEmitExternals (
/*******************************************************************************
*
+ * FUNCTION: AcpiDmMarkExternalConflict
+ *
+ * PARAMETERS: Path - Namepath to search
+ *
+ * RETURN: ExternalList
+ *
+ * DESCRIPTION: Search the AcpiGbl_ExternalList for a matching path
+ *
+ ******************************************************************************/
+
+void
+AcpiDmMarkExternalConflict (
+ ACPI_NAMESPACE_NODE *Node)
+{
+ ACPI_EXTERNAL_LIST *ExternalList = AcpiGbl_ExternalList;
+ char *ExternalPath;
+ char *InternalPath;
+ char *Temp;
+ ACPI_STATUS Status;
+
+
+ ACPI_FUNCTION_TRACE (DmMarkExternalConflict);
+
+
+ if (Node->Flags & ANOBJ_IS_EXTERNAL)
+ {
+ return_VOID;
+ }
+
+ /* Get the full external and internal pathnames to the node */
+
+ Status = AcpiDmGetExternalAndInternalPath (Node,
+ &ExternalPath, &InternalPath);
+ if (ACPI_FAILURE (Status))
+ {
+ return_VOID;
+ }
+
+ /* Remove the root backslash */
+
+ Status = AcpiDmRemoveRootPrefix (&InternalPath);
+ if (ACPI_FAILURE (Status))
+ {
+ ACPI_FREE (InternalPath);
+ ACPI_FREE (ExternalPath);
+ return_VOID;
+ }
+
+ while (ExternalList)
+ {
+ Temp = ExternalList->InternalPath;
+ if ((*ExternalList->InternalPath == AML_ROOT_PREFIX) &&
+ (ExternalList->InternalPath[1]))
+ {
+ Temp++;
+ }
+
+ if (!strcmp (ExternalList->InternalPath, InternalPath))
+ {
+ ExternalList->Flags |= ACPI_EXT_CONFLICTING_DECLARATION;
+ }
+ ExternalList = ExternalList->Next;
+ }
+
+ ACPI_FREE (InternalPath);
+ ACPI_FREE (ExternalPath);
+
+ return_VOID;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmConflictingDeclaration
+ *
+ * PARAMETERS: Path - Path with conflicting declaration
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Emit a warning when printing conflicting ASL external
+ * declarations.
+ *
+ ******************************************************************************/
+
+static void
+AcpiDmConflictingDeclaration (
+ char *Path)
+{
+ fprintf (stderr,
+ " Warning - Emitting ASL code \"External (%s)\"\n"
+ " This is a conflicting declaration with some "
+ "other declaration within the ASL code.\n"
+ " This external declaration may need to be "
+ "deleted in order to recompile the dsl file.\n\n",
+ Path);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmEmitExternal
*
* PARAMETERS: Op External Parse Object
@@ -1280,7 +1583,8 @@ AcpiDmEmitExternals (
* RETURN: None
*
* DESCRIPTION: Emit an External() ASL statement for the current External
- * parse object
+ * parse object. Note: External Ops are named types so the
+ * namepath is contained within NameOp->Name.Path.
*
******************************************************************************/
@@ -1290,14 +1594,76 @@ AcpiDmEmitExternal (
ACPI_PARSE_OBJECT *TypeOp)
{
AcpiOsPrintf ("External (");
- AcpiDmNamestring (NameOp->Common.Value.Name);
- AcpiOsPrintf ("%s)\n",
+ AcpiDmNamestring (NameOp->Named.Path);
+ AcpiOsPrintf ("%s)",
AcpiDmGetObjectTypeName ((ACPI_OBJECT_TYPE) TypeOp->Common.Value.Integer));
+ AcpiDmCheckForExternalConflict (NameOp->Named.Path);
+ AcpiOsPrintf ("\n");
}
/*******************************************************************************
*
+ * FUNCTION: AcpiDmCheckForExternalConflict
+ *
+ * PARAMETERS: Path - Path to check
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Search the External List to see if the input Path has a
+ * conflicting declaration.
+ *
+ ******************************************************************************/
+
+static void
+AcpiDmCheckForExternalConflict (
+ char *Path)
+{
+ ACPI_EXTERNAL_LIST *ExternalList = AcpiGbl_ExternalList;
+ char *ListItemPath;
+ char *InputPath;
+
+
+ if (!Path)
+ {
+ return;
+ }
+
+ /* Move past the root prefix '\' */
+
+ InputPath = Path;
+ if ((*InputPath == AML_ROOT_PREFIX) && InputPath[1])
+ {
+ InputPath++;
+ }
+
+ while (ExternalList)
+ {
+ ListItemPath = ExternalList->Path;
+ if (ListItemPath)
+ {
+ /* Move past the root prefix '\' */
+
+ if ((*ListItemPath == AML_ROOT_PREFIX) &&
+ ListItemPath[1])
+ {
+ ListItemPath++;
+ }
+
+ if (!strcmp (ListItemPath, InputPath) &&
+ (ExternalList->Flags & ACPI_EXT_CONFLICTING_DECLARATION))
+ {
+ AcpiOsPrintf ("%s", ExternalConflictMessage);
+ AcpiDmConflictingDeclaration (Path);
+
+ return;
+ }
+ }
+ ExternalList = ExternalList->Next;
+ }
+}
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmUnresolvedWarning
*
* PARAMETERS: Type - Where to output the warning.
@@ -1311,7 +1677,7 @@ AcpiDmEmitExternal (
*
******************************************************************************/
-#if 0
+/*
Summary of the external control method problem:
When the -e option is used with disassembly, the various SSDTs are simply
@@ -1380,7 +1746,7 @@ disassembler, otherwise it does not know how to handle the method invocations.
In other words, if ABCD and EFGH are actually external control methods
appearing in an SSDT, the disassembler does not know what to do unless
the owning SSDT has been loaded via the -e option.
-#endif
+*/
static char ExternalWarningPart1[600];
static char ExternalWarningPart2[400];
diff --git a/source/common/dmrestag.c b/source/common/dmrestag.c
index 7753388a5b3e..5ba0f6b4feb5 100644
--- a/source/common/dmrestag.c
+++ b/source/common/dmrestag.c
@@ -424,6 +424,34 @@ static const ACPI_RESOURCE_TAG AcpiDmUartSerialBusTags[] =
{0, NULL}
};
+/* Subtype tables for PinFunction descriptor */
+
+static const ACPI_RESOURCE_TAG AcpiDmPinFunctionTags[] =
+{
+ {( 4 * 8), ACPI_RESTAG_INTERRUPTSHARE},
+ {( 6 * 8), ACPI_RESTAG_PINCONFIG},
+ {( 7 * 8), ACPI_RESTAG_FUNCTION},
+ {0, NULL}
+};
+
+/* Subtype tables for PinConfig descriptor */
+
+static const ACPI_RESOURCE_TAG AcpiDmPinConfigTags[] =
+{
+ {( 4 * 8), ACPI_RESTAG_INTERRUPTSHARE},
+ {( 6 * 8), ACPI_RESTAG_PINCONFIG_TYPE},
+ {( 7 * 8), ACPI_RESTAG_PINCONFIG_VALUE},
+ {0, NULL}
+};
+
+/* Subtype tables for PinGroupFunction descriptor */
+
+static const ACPI_RESOURCE_TAG AcpiDmPinGroupFunctionTags[] =
+{
+ {( 6 * 8), ACPI_RESTAG_FUNCTION},
+ {0, NULL}
+};
+
/* Subtype tables for Address descriptor type-specific flags */
static const ACPI_RESOURCE_TAG AcpiDmMemoryFlagTags[] =
@@ -488,8 +516,12 @@ static const ACPI_RESOURCE_TAG *AcpiGbl_ResourceTags[] =
AcpiDmAddress64Tags, /* 0x0A, ACPI_RESOURCE_NAME_QWORD_ADDRESS_SPACE */
AcpiDmExtendedAddressTags, /* 0x0B, ACPI_RESOURCE_NAME_EXTENDED_ADDRESS_SPACE */
NULL, /* 0x0C, ACPI_RESOURCE_NAME_GPIO - Use Subtype table below */
- NULL, /* 0x0D, Reserved */
- NULL /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use Subtype table below */
+ AcpiDmPinFunctionTags, /* 0x0D, ACPI_RESOURCE_NAME_PIN_FUNCTION */
+ NULL, /* 0x0E, ACPI_RESOURCE_NAME_SERIAL_BUS - Use Subtype table below */
+ AcpiDmPinConfigTags, /* 0x0F, ACPI_RESOURCE_NAME_PIN_CONFIG */
+ NULL, /* 0x10, ACPI_RESOURCE_NAME_PIN_GROUP */
+ AcpiDmPinGroupFunctionTags, /* 0x11, ACPI_RESOURCE_NAME_PIN_GROUP_FUNCTION */
+ AcpiDmPinConfigTags, /* 0x12, ACPI_RESOURCE_NAME_PIN_GROUP_CONFIG - Same as PinConfig */
};
/* GPIO Subtypes */
diff --git a/source/common/dmswitch.c b/source/common/dmswitch.c
new file mode 100644
index 000000000000..1641cbf9adea
--- /dev/null
+++ b/source/common/dmswitch.c
@@ -0,0 +1,679 @@
+/******************************************************************************
+ *
+ * Module Name: adwalk - Disassembler routines for switch statements
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************
+ *
+ * Alternatively, you may choose to be licensed under the terms of the
+ * following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Alternatively, you may choose to be licensed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ *****************************************************************************/
+
+#include "acpi.h"
+#include "accommon.h"
+#include "acparser.h"
+#include "amlcode.h"
+#include "acdisasm.h"
+#include "acdispat.h"
+#include "acnamesp.h"
+#include "acapps.h"
+
+
+#define _COMPONENT ACPI_CA_DISASSEMBLER
+ ACPI_MODULE_NAME ("dmswitch")
+
+static BOOLEAN
+AcpiDmIsSwitchBlock (
+ ACPI_PARSE_OBJECT *Op,
+ char **Temp);
+
+static BOOLEAN
+AcpiDmIsCaseBlock (
+ ACPI_PARSE_OBJECT *Op);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmProcessSwitch
+ *
+ * PARAMETERS: Op - Object to be examined
+ *
+ * RETURN: ACPI_STATUS
+ *
+ * DESCRIPTION: Walk function to create a list of all temporary (_T_) objects.
+ * If a While loop is found that can be converted to a Switch, do
+ * the conversion, remove the temporary name from the list, and
+ * mark the parse op with an IGNORE flag.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDmProcessSwitch (
+ ACPI_PARSE_OBJECT *Op)
+{
+ char *Temp = NULL;
+ ACPI_PARSE_OBJECT_LIST *NewTemp;
+ ACPI_PARSE_OBJECT_LIST *Current;
+ ACPI_PARSE_OBJECT_LIST *Previous;
+ BOOLEAN FoundTemp = FALSE;
+
+
+ switch (Op->Common.AmlOpcode)
+ {
+ case AML_NAME_OP:
+
+ Temp = (char *) (&Op->Named.Name);
+
+ if (!strncmp(Temp, "_T_", 3))
+ {
+ /* Allocate and init a new Temp List node */
+
+ NewTemp = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_PARSE_OBJECT_LIST));
+ if (!NewTemp)
+ {
+ return (AE_NO_MEMORY);
+ }
+
+ if (AcpiGbl_TempListHead)
+ {
+ Current = AcpiGbl_TempListHead;
+ AcpiGbl_TempListHead = NewTemp;
+ AcpiGbl_TempListHead->Op = Op;
+ AcpiGbl_TempListHead->Next = Current;
+ }
+ else
+ {
+ AcpiGbl_TempListHead = NewTemp;
+ AcpiGbl_TempListHead->Op = Op;
+ AcpiGbl_TempListHead->Next = NULL;
+ }
+ }
+ break;
+
+ case AML_WHILE_OP:
+
+ if (!AcpiDmIsSwitchBlock (Op, &Temp))
+ {
+ break;
+ }
+
+ /* Found a Switch */
+
+ Op->Common.DisasmOpcode = ACPI_DASM_SWITCH;
+
+ Previous = Current = AcpiGbl_TempListHead;
+ while (Current)
+ {
+ /* Note, if we get here Temp is not NULL */
+
+ if (!strncmp(Temp, (char *) (&Current->Op->Named.Name), 4))
+ {
+ /* Match found. Ignore disassembly */
+
+ Current->Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
+
+ /* Remove from list */
+
+ if (Current == AcpiGbl_TempListHead)
+ {
+ AcpiGbl_TempListHead = Current->Next;
+ }
+ else
+ {
+ Previous->Next = Current->Next;
+ }
+
+ Current->Op = NULL;
+ Current->Next = NULL;
+ ACPI_FREE (Current);
+ FoundTemp = TRUE;
+ break;
+ }
+
+ Previous = Current;
+ Current = Current->Next;
+ }
+
+ if (!FoundTemp)
+ {
+ fprintf (stderr,
+ "Warning: Declaration for temp name %.4s not found\n", Temp);
+ }
+ break;
+
+ default:
+ break;
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmClearTempList
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Removes any remaining temporary objects from global list and
+ * frees
+ *
+ ******************************************************************************/
+
+void
+AcpiDmClearTempList (
+ void)
+{
+ ACPI_PARSE_OBJECT_LIST *Current;
+
+
+ while (AcpiGbl_TempListHead)
+ {
+ Current = AcpiGbl_TempListHead;
+ AcpiGbl_TempListHead = AcpiGbl_TempListHead->Next;
+ Current->Op = NULL;
+ Current->Next = NULL;
+ ACPI_FREE (Current);
+ }
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmIsSwitchBlock
+ *
+ * PARAMETERS: Op - While Object
+ *
+ * RETURN: TRUE if While block can be converted to a Switch/Case block
+ *
+ * DESCRIPTION: Determines if While block is a Switch/Case statement. Modifies
+ * parse tree to allow for Switch/Case disassembly during walk.
+ *
+ * EXAMPLE: Example of parse tree to be converted
+ *
+ * While
+ * One
+ * Store
+ * ByteConst
+ * -NamePath-
+ * If
+ * LEqual
+ * -NamePath-
+ * Zero
+ * Return
+ * One
+ * Else
+ * Return
+ * WordConst
+ * Break
+ *
+ ******************************************************************************/
+
+BOOLEAN
+AcpiDmIsSwitchBlock (
+ ACPI_PARSE_OBJECT *Op,
+ char **Temp)
+{
+ ACPI_PARSE_OBJECT *OneOp;
+ ACPI_PARSE_OBJECT *StoreOp;
+ ACPI_PARSE_OBJECT *NamePathOp;
+ ACPI_PARSE_OBJECT *PredicateOp;
+ ACPI_PARSE_OBJECT *CurrentOp;
+ ACPI_PARSE_OBJECT *TempOp;
+
+
+ /* Check for One Op Predicate */
+
+ OneOp = AcpiPsGetArg (Op, 0);
+ if (!OneOp || (OneOp->Common.AmlOpcode != AML_ONE_OP))
+ {
+ return (FALSE);
+ }
+
+ /* Check for Store Op */
+
+ StoreOp = OneOp->Common.Next;
+ if (!StoreOp || (StoreOp->Common.AmlOpcode != AML_STORE_OP))
+ {
+ return (FALSE);
+ }
+
+ /* Check for Name Op with _T_ string */
+
+ NamePathOp = AcpiPsGetArg (StoreOp, 1);
+ if (!NamePathOp ||
+ (NamePathOp->Common.AmlOpcode != AML_INT_NAMEPATH_OP))
+ {
+ return (FALSE);
+ }
+
+ if (strncmp ((char *) (NamePathOp->Common.Value.Name), "_T_", 3))
+ {
+ return (FALSE);
+ }
+
+ *Temp = (char *) (NamePathOp->Common.Value.Name);
+
+ /* This is a Switch/Case control block */
+
+ /* Ignore the One Op Predicate */
+
+ OneOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
+
+ /* Ignore the Store Op, but not the children */
+
+ StoreOp->Common.DisasmOpcode = ACPI_DASM_IGNORE_SINGLE;
+
+ /*
+ * First arg of Store Op is the Switch condition.
+ * Mark it as a Switch predicate and as a parameter list for paren
+ * closing and correct indentation.
+ */
+ PredicateOp = AcpiPsGetArg (StoreOp, 0);
+ PredicateOp->Common.DisasmOpcode = ACPI_DASM_SWITCH_PREDICATE;
+ PredicateOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
+
+ /* Ignore the Name Op */
+
+ NamePathOp->Common.DisasmFlags = ACPI_PARSEOP_IGNORE;
+
+ /* Remaining opcodes are the Case statements (If/ElseIf's) */
+
+ CurrentOp = StoreOp->Common.Next;
+ while (AcpiDmIsCaseBlock (CurrentOp))
+ {
+ /* Block is a Case structure */
+
+ if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP)
+ {
+ /* ElseIf */
+
+ CurrentOp->Common.DisasmOpcode = ACPI_DASM_CASE;
+ CurrentOp = AcpiPsGetArg (CurrentOp, 0);
+ }
+
+ /* If */
+
+ CurrentOp->Common.DisasmOpcode = ACPI_DASM_CASE;
+
+ /*
+ * Mark the parse tree for Case disassembly. There are two
+ * types of Case statements. The first type of statement begins with
+ * an LEqual. The second starts with an LNot and uses a Match statement
+ * on a Package of constants.
+ */
+ TempOp = AcpiPsGetArg (CurrentOp, 0);
+ switch (TempOp->Common.AmlOpcode)
+ {
+ case (AML_LOGICAL_EQUAL_OP):
+
+ /* Ignore just the LEqual Op */
+
+ TempOp->Common.DisasmOpcode = ACPI_DASM_IGNORE_SINGLE;
+
+ /* Ignore the NamePath Op */
+
+ TempOp = AcpiPsGetArg (TempOp, 0);
+ TempOp->Common.DisasmFlags = ACPI_PARSEOP_IGNORE;
+
+ /*
+ * Second arg of LEqual will be the Case predicate.
+ * Mark it as a predicate and also as a parameter list for paren
+ * closing and correct indentation.
+ */
+ PredicateOp = TempOp->Common.Next;
+ PredicateOp->Common.DisasmOpcode = ACPI_DASM_SWITCH_PREDICATE;
+ PredicateOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
+ break;
+
+ case (AML_LOGICAL_NOT_OP):
+
+ /*
+ * The Package will be the predicate of the Case statement.
+ * It's under:
+ * LNOT
+ * LEQUAL
+ * MATCH
+ * PACKAGE
+ */
+
+ /* Get the LEqual Op from LNot */
+
+ TempOp = AcpiPsGetArg (TempOp, 0);
+
+ /* Get the Match Op from LEqual */
+
+ TempOp = AcpiPsGetArg (TempOp, 0);
+
+ /* Get the Package Op from Match */
+
+ PredicateOp = AcpiPsGetArg (TempOp, 0);
+
+ /* Mark as parameter list for paren closing */
+
+ PredicateOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
+
+ /*
+ * The Package list would be too deeply indented if we
+ * chose to simply ignore the all the parent opcodes, so
+ * we rearrange the parse tree instead.
+ */
+
+ /*
+ * Save the second arg of the If/Else Op which is the
+ * block code of code for this Case statement.
+ */
+ TempOp = AcpiPsGetArg (CurrentOp, 1);
+
+ /*
+ * Move the Package Op to the child (predicate) of the
+ * Case statement.
+ */
+ CurrentOp->Common.Value.Arg = PredicateOp;
+ PredicateOp->Common.Parent = CurrentOp;
+
+ /* Add the block code */
+
+ PredicateOp->Common.Next = TempOp;
+ break;
+
+ default:
+
+ /* Should never get here */
+ break;
+ }
+
+ /* Advance to next Case block */
+
+ CurrentOp = CurrentOp->Common.Next;
+ }
+
+ /* If CurrentOp is now an Else, then this is a Default block */
+
+ if (CurrentOp && CurrentOp->Common.AmlOpcode == AML_ELSE_OP)
+ {
+ CurrentOp->Common.DisasmOpcode = ACPI_DASM_DEFAULT;
+ }
+
+ /*
+ * From the first If advance to the Break op. It's possible to
+ * have an Else (Default) op here when there is only one Case
+ * statement, so check for it.
+ */
+ CurrentOp = StoreOp->Common.Next->Common.Next;
+ if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP)
+ {
+ CurrentOp = CurrentOp->Common.Next;
+ }
+
+ /* Ignore the Break Op */
+
+ CurrentOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
+ return (TRUE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDmIsCaseBlock
+ *
+ * PARAMETERS: Op - Object to test
+ *
+ * RETURN: TRUE if Object is beginning of a Case block.
+ *
+ * DESCRIPTION: Determines if an Object is the beginning of a Case block for a
+ * Switch/Case statement. Parse tree must be one of the following
+ * forms:
+ *
+ * Else (Optional)
+ * If
+ * LEqual
+ * -NamePath- _T_x
+ *
+ * Else (Optional)
+ * If
+ * LNot
+ * LEqual
+ * Match
+ * Package
+ * ByteConst
+ * -NamePath- _T_x
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AcpiDmIsCaseBlock (
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_PARSE_OBJECT *CurrentOp;
+
+
+ if (!Op)
+ {
+ return (FALSE);
+ }
+
+ /* Look for an If or ElseIf */
+
+ CurrentOp = Op;
+ if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP)
+ {
+ CurrentOp = AcpiPsGetArg (CurrentOp, 0);
+ if (!CurrentOp)
+ {
+ return (FALSE);
+ }
+ }
+
+ if (!CurrentOp || CurrentOp->Common.AmlOpcode != AML_IF_OP)
+ {
+ return (FALSE);
+ }
+
+ /* Child must be LEqual or LNot */
+
+ CurrentOp = AcpiPsGetArg (CurrentOp, 0);
+ if (!CurrentOp)
+ {
+ return (FALSE);
+ }
+
+ switch (CurrentOp->Common.AmlOpcode)
+ {
+ case (AML_LOGICAL_EQUAL_OP):
+
+ /* Next child must be NamePath with string _T_ */
+
+ CurrentOp = AcpiPsGetArg (CurrentOp, 0);
+ if (!CurrentOp || !CurrentOp->Common.Value.Name ||
+ strncmp(CurrentOp->Common.Value.Name, "_T_", 3))
+ {
+ return (FALSE);
+ }
+ break;
+
+ case (AML_LOGICAL_NOT_OP):
+
+ /* Child of LNot must be LEqual op */
+
+ CurrentOp = AcpiPsGetArg (CurrentOp, 0);
+ if (!CurrentOp || (CurrentOp->Common.AmlOpcode != AML_LOGICAL_EQUAL_OP))
+ {
+ return (FALSE);
+ }
+
+ /* Child of LNot must be Match op */
+
+ CurrentOp = AcpiPsGetArg (CurrentOp, 0);
+ if (!CurrentOp || (CurrentOp->Common.AmlOpcode != AML_MATCH_OP))
+ {
+ return (FALSE);
+ }
+
+ /* First child of Match must be Package op */
+
+ CurrentOp = AcpiPsGetArg (CurrentOp, 0);
+ if (!CurrentOp || (CurrentOp->Common.AmlOpcode != AML_PACKAGE_OP))
+ {
+ return (FALSE);
+ }
+
+ /* Third child of Match must be NamePath with string _T_ */
+
+ CurrentOp = AcpiPsGetArg (CurrentOp->Common.Parent, 2);
+ if (!CurrentOp || !CurrentOp->Common.Value.Name ||
+ strncmp(CurrentOp->Common.Value.Name, "_T_", 3))
+ {
+ return (FALSE);
+ }
+ break;
+
+ default:
+
+ return (FALSE);
+ }
+
+ return (TRUE);
+}
diff --git a/source/common/dmtable.c b/source/common/dmtable.c
index 4befd14d9455..b85bb0c3aa75 100644
--- a/source/common/dmtable.c
+++ b/source/common/dmtable.c
@@ -298,6 +298,7 @@ static const char *AcpiDmHestSubnames[] =
"PCI Express/PCI-X Bridge AER",
"Generic Hardware Error Source",
"Generic Hardware Error Source V2",
+ "IA-32 Deferred Machine Check",
"Unknown Subtable Type" /* Reserved */
};
@@ -314,9 +315,18 @@ static const char *AcpiDmHestNotifySubnames[] =
"SEA", /* ACPI 6.1 */
"SEI", /* ACPI 6.1 */
"GSIV", /* ACPI 6.1 */
+ "Software Delegated Exception", /* ACPI 6.2 */
"Unknown Notify Type" /* Reserved */
};
+static const char *AcpiDmHmatSubnames[] =
+{
+ "Memory Subystem Address Range",
+ "System Locality Latency and Bandwidth Information",
+ "Memory Side Cache Information",
+ "Unknown Structure Type" /* Reserved */
+};
+
static const char *AcpiDmMadtSubnames[] =
{
"Processor Local APIC", /* ACPI_MADT_TYPE_LOCAL_APIC */
@@ -355,6 +365,8 @@ static const char *AcpiDmPcctSubnames[] =
"Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
"HW-Reduced Comm Subspace", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */
"HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
+ "Extended PCC Master Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE */
+ "Extended PCC Slave Subspace", /* ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE */
"Unknown Subtable Type" /* Reserved */
};
@@ -366,12 +378,21 @@ static const char *AcpiDmPmttSubnames[] =
"Unknown Subtable Type" /* Reserved */
};
+static const char *AcpiDmPpttSubnames[] =
+{
+ "Processor Hierarchy Node", /* ACPI_PPTT_TYPE_PROCESSOR */
+ "Cache Type", /* ACPI_PPTT_TYPE_CACHE */
+ "ID", /* ACPI_PMTT_TYPE_ID */
+ "Unknown Subtable Type" /* Reserved */
+};
+
static const char *AcpiDmSratSubnames[] =
{
"Processor Local APIC/SAPIC Affinity",
"Memory Affinity",
"Processor Local x2APIC Affinity",
"GICC Affinity",
+ "GIC ITS Affinity", /* Acpi 6.2 */
"Unknown Subtable Type" /* Reserved */
};
@@ -452,6 +473,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_FPDT, NULL, AcpiDmDumpFpdt, DtCompileFpdt, TemplateFpdt},
{ACPI_SIG_GTDT, NULL, AcpiDmDumpGtdt, DtCompileGtdt, TemplateGtdt},
{ACPI_SIG_HEST, NULL, AcpiDmDumpHest, DtCompileHest, TemplateHest},
+ {ACPI_SIG_HMAT, NULL, AcpiDmDumpHmat, DtCompileHmat, TemplateHmat},
{ACPI_SIG_HPET, AcpiDmTableInfoHpet, NULL, NULL, TemplateHpet},
{ACPI_SIG_IORT, NULL, AcpiDmDumpIort, DtCompileIort, TemplateIort},
{ACPI_SIG_IVRS, NULL, AcpiDmDumpIvrs, DtCompileIvrs, TemplateIvrs},
@@ -466,6 +488,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit},
{ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct},
{ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt},
+ {ACPI_SIG_PPTT, NULL, AcpiDmDumpPptt, DtCompilePptt, TemplatePptt},
{ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf},
{ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt},
{ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt},
@@ -485,6 +508,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_WDDT, AcpiDmTableInfoWddt, NULL, NULL, TemplateWddt},
{ACPI_SIG_WDRT, AcpiDmTableInfoWdrt, NULL, NULL, TemplateWdrt},
{ACPI_SIG_WPBT, NULL, AcpiDmDumpWpbt, DtCompileWpbt, TemplateWpbt},
+ {ACPI_SIG_WSMT, AcpiDmTableInfoWsmt, NULL, NULL, TemplateWsmt},
{ACPI_SIG_XENV, AcpiDmTableInfoXenv, NULL, NULL, TemplateXenv},
{ACPI_SIG_XSDT, NULL, AcpiDmDumpXsdt, DtCompileXsdt, TemplateXsdt},
{NULL, NULL, NULL, NULL, NULL}
@@ -891,6 +915,7 @@ AcpiDmDumpTable (
case ACPI_DMT_MADT:
case ACPI_DMT_PCCT:
case ACPI_DMT_PMTT:
+ case ACPI_DMT_PPTT:
case ACPI_DMT_SRAT:
case ACPI_DMT_ASF:
case ACPI_DMT_HESTNTYP:
@@ -907,6 +932,7 @@ AcpiDmDumpTable (
case ACPI_DMT_UINT16:
case ACPI_DMT_DMAR:
case ACPI_DMT_HEST:
+ case ACPI_DMT_HMAT:
case ACPI_DMT_NFIT:
ByteLength = 2;
@@ -1088,6 +1114,31 @@ AcpiDmDumpTable (
AcpiOsPrintf ("%1.1X\n", (*Target >> 4) & 0x03);
break;
+ case ACPI_DMT_FLAGS4_0:
+
+ AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target) & 0x0F);
+ break;
+
+ case ACPI_DMT_FLAGS4_4:
+
+ AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 4) & 0x0F);
+ break;
+
+ case ACPI_DMT_FLAGS4_8:
+
+ AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 8) & 0x0F);
+ break;
+
+ case ACPI_DMT_FLAGS4_12:
+
+ AcpiOsPrintf ("%1.1X\n", (*(UINT32 *)Target >> 12) & 0x0F);
+ break;
+
+ case ACPI_DMT_FLAGS16_16:
+
+ AcpiOsPrintf ("%4.4X\n", (*(UINT32 *)Target >> 16) & 0xFFFF);
+ break;
+
/* Integer Data Types */
case ACPI_DMT_UINT8:
@@ -1409,6 +1460,20 @@ AcpiDmDumpTable (
AcpiDmHestNotifySubnames[Temp8]);
break;
+ case ACPI_DMT_HMAT:
+
+ /* HMAT subtable types */
+
+ Temp16 = *Target;
+ if (Temp16 > ACPI_HMAT_TYPE_RESERVED)
+ {
+ Temp16 = ACPI_HMAT_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT16_FORMAT, *Target,
+ AcpiDmHmatSubnames[Temp16]);
+ break;
+
case ACPI_DMT_IORTMEM:
AcpiOsPrintf (STRING_FORMAT,
@@ -1480,6 +1545,20 @@ AcpiDmDumpTable (
AcpiDmPmttSubnames[Temp8]);
break;
+ case ACPI_DMT_PPTT:
+
+ /* PPTT subtable types */
+
+ Temp8 = *Target;
+ if (Temp8 > ACPI_PPTT_TYPE_RESERVED)
+ {
+ Temp8 = ACPI_PPTT_TYPE_RESERVED;
+ }
+
+ AcpiOsPrintf (UINT8_FORMAT, *Target,
+ AcpiDmPpttSubnames[Temp8]);
+ break;
+
case ACPI_DMT_UNICODE:
if (ByteLength == 0)
diff --git a/source/common/dmtbdump.c b/source/common/dmtbdump.c
index e9339a8ba020..9441ca494ffc 100644
--- a/source/common/dmtbdump.c
+++ b/source/common/dmtbdump.c
@@ -1730,6 +1730,14 @@ AcpiDmDumpHest (
SubTableLength = sizeof (ACPI_HEST_GENERIC_V2);
break;
+ case ACPI_HEST_TYPE_IA32_DEFERRED_CHECK:
+
+ InfoTable = AcpiDmTableInfoHest11;
+ SubTableLength = sizeof (ACPI_HEST_IA_DEFERRED_CHECK);
+ BankCount = (ACPI_CAST_PTR (ACPI_HEST_IA_DEFERRED_CHECK,
+ SubTable))->NumHardwareBanks;
+ break;
+
default:
/* Cannot continue on unknown type - no length */
@@ -1784,6 +1792,203 @@ AcpiDmDumpHest (
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDumpHmat
+ *
+ * PARAMETERS: Table - A HMAT table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a HMAT.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpHmat (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ ACPI_HMAT_STRUCTURE *HmatStruct;
+ ACPI_HMAT_LOCALITY *HmatLocality;
+ ACPI_HMAT_CACHE *HmatCache;
+ UINT32 Offset;
+ UINT32 SubTableOffset;
+ UINT32 Length;
+ ACPI_DMTABLE_INFO *InfoTable;
+ UINT32 i, j;
+
+
+ /* Main table */
+
+ Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoHmat);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ Offset = sizeof (ACPI_TABLE_HMAT);
+
+ while (Offset < Table->Length)
+ {
+ AcpiOsPrintf ("\n");
+ SubTableOffset = 0;
+
+ /* Dump HMAT structure header */
+
+ HmatStruct = ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, Table, Offset);
+ if (HmatStruct->Length < sizeof (ACPI_HMAT_STRUCTURE))
+ {
+ AcpiOsPrintf ("Invalid HMAT structure length\n");
+ return;
+ }
+ Status = AcpiDmDumpTable (Table->Length, Offset, HmatStruct,
+ HmatStruct->Length, AcpiDmTableInfoHmatHdr);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ switch (HmatStruct->Type)
+ {
+ case ACPI_HMAT_TYPE_ADDRESS_RANGE:
+
+ InfoTable = AcpiDmTableInfoHmat0;
+ Length = sizeof (ACPI_HMAT_ADDRESS_RANGE);
+ break;
+
+ case ACPI_HMAT_TYPE_LOCALITY:
+
+ InfoTable = AcpiDmTableInfoHmat1;
+ Length = sizeof (ACPI_HMAT_LOCALITY);
+ break;
+
+ case ACPI_HMAT_TYPE_CACHE:
+
+ InfoTable = AcpiDmTableInfoHmat2;
+ Length = sizeof (ACPI_HMAT_CACHE);
+ break;
+
+ default:
+
+ AcpiOsPrintf ("\n**** Unknown HMAT structure type 0x%X\n",
+ HmatStruct->Type);
+
+ /* Attempt to continue */
+
+ goto NextSubTable;
+ }
+
+ /* Dump HMAT structure body */
+
+ if (HmatStruct->Length < Length)
+ {
+ AcpiOsPrintf ("Invalid HMAT structure length\n");
+ return;
+ }
+ Status = AcpiDmDumpTable (Table->Length, Offset, HmatStruct,
+ HmatStruct->Length, InfoTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ /* Dump HMAT structure additionals */
+
+ switch (HmatStruct->Type)
+ {
+ case ACPI_HMAT_TYPE_LOCALITY:
+
+ HmatLocality = ACPI_CAST_PTR (ACPI_HMAT_LOCALITY, HmatStruct);
+ SubTableOffset = sizeof (ACPI_HMAT_LOCALITY);
+
+ /* Dump initiator proximity domains */
+
+ if ((UINT32)(HmatStruct->Length - SubTableOffset) <
+ (UINT32)(HmatLocality->NumberOfInitiatorPDs * 4))
+ {
+ AcpiOsPrintf ("Invalid initiator proximity domain number\n");
+ return;
+ }
+ for (i = 0; i < HmatLocality->NumberOfInitiatorPDs; i++)
+ {
+ Status = AcpiDmDumpTable (Table->Length, Offset + SubTableOffset,
+ ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubTableOffset),
+ 4, AcpiDmTableInfoHmat1a);
+ SubTableOffset += 4;
+ }
+
+ /* Dump target proximity domains */
+
+ if ((UINT32)(HmatStruct->Length - SubTableOffset) <
+ (UINT32)(HmatLocality->NumberOfTargetPDs * 4))
+ {
+ AcpiOsPrintf ("Invalid target proximity domain number\n");
+ return;
+ }
+ for (i = 0; i < HmatLocality->NumberOfTargetPDs; i++)
+ {
+ Status = AcpiDmDumpTable (Table->Length, Offset + SubTableOffset,
+ ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubTableOffset),
+ 4, AcpiDmTableInfoHmat1b);
+ SubTableOffset += 4;
+ }
+
+ /* Dump latency/bandwidth entris */
+
+ if ((UINT32)(HmatStruct->Length - SubTableOffset) <
+ (UINT32)(HmatLocality->NumberOfInitiatorPDs *
+ HmatLocality->NumberOfTargetPDs * 2))
+ {
+ AcpiOsPrintf ("Invalid latency/bandwidth entry number\n");
+ return;
+ }
+ for (i = 0; i < HmatLocality->NumberOfInitiatorPDs; i++)
+ {
+ for (j = 0; j < HmatLocality->NumberOfTargetPDs; j++)
+ {
+ Status = AcpiDmDumpTable (Table->Length, Offset + SubTableOffset,
+ ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubTableOffset),
+ 2, AcpiDmTableInfoHmat1c);
+ SubTableOffset += 2;
+ }
+ }
+ break;
+
+ case ACPI_HMAT_TYPE_CACHE:
+
+ HmatCache = ACPI_CAST_PTR (ACPI_HMAT_CACHE, HmatStruct);
+ SubTableOffset = sizeof (ACPI_HMAT_CACHE);
+
+ /* Dump SMBIOS handles */
+
+ if ((UINT32)(HmatStruct->Length - SubTableOffset) <
+ (UINT32)(HmatCache->NumberOfSMBIOSHandles * 2))
+ {
+ AcpiOsPrintf ("Invalid SMBIOS handle number\n");
+ return;
+ }
+ for (i = 0; i < HmatCache->NumberOfSMBIOSHandles; i++)
+ {
+ Status = AcpiDmDumpTable (Table->Length, Offset + SubTableOffset,
+ ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubTableOffset),
+ 2, AcpiDmTableInfoHmat2a);
+ SubTableOffset += 2;
+ }
+ break;
+
+ default:
+
+ break;
+ }
+
+NextSubTable:
+ /* Point to next HMAT structure subtable */
+
+ Offset += (HmatStruct->Length);
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmDumpIort
*
* PARAMETERS: Table - A IORT table
@@ -3010,6 +3215,16 @@ AcpiDmDumpPcct (
InfoTable = AcpiDmTableInfoPcct2;
break;
+ case ACPI_PCCT_TYPE_EXT_PCC_MASTER_SUBSPACE:
+
+ InfoTable = AcpiDmTableInfoPcct3;
+ break;
+
+ case ACPI_PCCT_TYPE_EXT_PCC_SLAVE_SUBSPACE:
+
+ InfoTable = AcpiDmTableInfoPcct4;
+ break;
+
default:
AcpiOsPrintf (
@@ -3242,6 +3457,136 @@ AcpiDmDumpPmtt (
/*******************************************************************************
*
+ * FUNCTION: AcpiDmDumpPptt
+ *
+ * PARAMETERS: Table - A PMTT table
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Format the contents of a PPTT. This table type consists
+ * of an open-ended number of subtables.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmDumpPptt (
+ ACPI_TABLE_HEADER *Table)
+{
+ ACPI_STATUS Status;
+ ACPI_SUBTABLE_HEADER *SubTable;
+ ACPI_PPTT_PROCESSOR *PpttProcessor;
+ UINT8 Length;
+ UINT8 SubTableOffset;
+ UINT32 Offset = sizeof (ACPI_TABLE_FPDT);
+ ACPI_DMTABLE_INFO *InfoTable;
+ UINT32 i;
+
+
+ /* There is no main table (other than the standard ACPI header) */
+
+ /* Subtables */
+
+ Offset = sizeof (ACPI_TABLE_HEADER);
+ while (Offset < Table->Length)
+ {
+ AcpiOsPrintf ("\n");
+
+ /* Common subtable header */
+
+ SubTable = ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Table, Offset);
+ if (SubTable->Length < sizeof (ACPI_SUBTABLE_HEADER))
+ {
+ AcpiOsPrintf ("Invalid subtable length\n");
+ return;
+ }
+ Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
+ SubTable->Length, AcpiDmTableInfoPpttHdr);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+
+ switch (SubTable->Type)
+ {
+ case ACPI_PPTT_TYPE_PROCESSOR:
+
+ InfoTable = AcpiDmTableInfoPptt0;
+ Length = sizeof (ACPI_PPTT_PROCESSOR);
+ break;
+
+ case ACPI_PPTT_TYPE_CACHE:
+
+ InfoTable = AcpiDmTableInfoPptt1;
+ Length = sizeof (ACPI_PPTT_CACHE);
+ break;
+
+ case ACPI_PPTT_TYPE_ID:
+
+ InfoTable = AcpiDmTableInfoPptt2;
+ Length = sizeof (ACPI_PPTT_ID);
+ break;
+
+ default:
+
+ AcpiOsPrintf ("\n**** Unknown PPTT subtable type 0x%X\n\n",
+ SubTable->Type);
+
+ /* Attempt to continue */
+
+ goto NextSubTable;
+ }
+
+ if (SubTable->Length < Length)
+ {
+ AcpiOsPrintf ("Invalid subtable length\n");
+ return;
+ }
+ Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
+ SubTable->Length, InfoTable);
+ if (ACPI_FAILURE (Status))
+ {
+ return;
+ }
+ SubTableOffset = Length;
+
+ switch (SubTable->Type)
+ {
+ case ACPI_PPTT_TYPE_PROCESSOR:
+
+ PpttProcessor = ACPI_CAST_PTR (ACPI_PPTT_PROCESSOR, SubTable);
+
+ /* Dump SMBIOS handles */
+
+ if ((UINT8)(SubTable->Length - SubTableOffset) <
+ (UINT8)(PpttProcessor->NumberOfPrivResources * 4))
+ {
+ AcpiOsPrintf ("Invalid private resource number\n");
+ return;
+ }
+ for (i = 0; i < PpttProcessor->NumberOfPrivResources; i++)
+ {
+ Status = AcpiDmDumpTable (Table->Length, Offset + SubTableOffset,
+ ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, SubTable, SubTableOffset),
+ 4, AcpiDmTableInfoPptt0a);
+ SubTableOffset += 4;
+ }
+ break;
+
+ default:
+
+ break;
+ }
+
+NextSubTable:
+ /* Point to next subtable */
+
+ Offset += SubTable->Length;
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiDmDumpS3pt
*
* PARAMETERS: Table - A S3PT table
@@ -3498,6 +3843,11 @@ AcpiDmDumpSrat (
InfoTable = AcpiDmTableInfoSrat3;
break;
+ case ACPI_SRAT_TYPE_GIC_ITS_AFFINITY:
+
+ InfoTable = AcpiDmTableInfoSrat4;
+ break;
+
default:
AcpiOsPrintf ("\n**** Unknown SRAT subtable type 0x%X\n",
SubTable->Type);
diff --git a/source/common/dmtbinfo.c b/source/common/dmtbinfo.c
index 4d27267804cb..692763fd43a0 100644
--- a/source/common/dmtbinfo.c
+++ b/source/common/dmtbinfo.c
@@ -204,6 +204,7 @@
#define ACPI_GTDT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_GTDT,f)
#define ACPI_HEST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HEST,f)
#define ACPI_HPET_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HPET,f)
+#define ACPI_HMAT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HMAT,f)
#define ACPI_IORT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_IORT,f)
#define ACPI_IVRS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_IVRS,f)
#define ACPI_MADT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_MADT,f)
@@ -230,6 +231,7 @@
#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_WSMT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_WSMT,f)
#define ACPI_XENV_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_XENV,f)
/* Subtables */
@@ -273,8 +275,13 @@
#define ACPI_HEST8_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_AER_BRIDGE,f)
#define ACPI_HEST9_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC,f)
#define ACPI_HEST10_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC_V2,f)
+#define ACPI_HEST11_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_DEFERRED_CHECK,f)
#define ACPI_HESTN_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_NOTIFY,f)
#define ACPI_HESTB_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HEST_IA_ERROR_BANK,f)
+#define ACPI_HMAT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_ADDRESS_RANGE,f)
+#define ACPI_HMAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_LOCALITY,f)
+#define ACPI_HMAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_CACHE,f)
+#define ACPI_HMATH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_HMAT_STRUCTURE,f)
#define ACPI_IORT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ITS_GROUP,f)
#define ACPI_IORT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_NAMED_COMPONENT,f)
#define ACPI_IORT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_IORT_ROOT_COMPLEX,f)
@@ -329,11 +336,17 @@
#define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
#define ACPI_PCCT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f)
#define ACPI_PCCT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f)
+#define ACPI_PCCT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_EXT_PCC_MASTER,f)
+#define ACPI_PCCT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_EXT_PCC_SLAVE,f)
#define ACPI_PMTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f)
#define ACPI_PMTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f)
#define ACPI_PMTT1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f)
#define ACPI_PMTT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_PHYSICAL_COMPONENT,f)
#define ACPI_PMTTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_HEADER,f)
+#define ACPI_PPTTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
+#define ACPI_PPTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_PROCESSOR,f)
+#define ACPI_PPTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_CACHE,f)
+#define ACPI_PPTT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PPTT_ID,f)
#define ACPI_S3PTH_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_FPDT_HEADER,f)
#define ACPI_S3PT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_RESUME,f)
#define ACPI_S3PT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f)
@@ -343,6 +356,7 @@
#define ACPI_SRAT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f)
#define ACPI_SRAT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f)
#define ACPI_SRAT3_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GICC_AFFINITY,f)
+#define ACPI_SRAT4_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_SRAT_GIC_ITS_AFFINITY,f)
#define ACPI_TCPA_CLIENT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_CLIENT,f)
#define ACPI_TCPA_SERVER_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_SERVER,f)
#define ACPI_VRTC0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_VRTC_ENTRY,f)
@@ -355,11 +369,14 @@
/* Flags */
+#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)
#define ACPI_FADT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_FADT,f,o)
#define ACPI_FACS_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_FACS,f,o)
#define ACPI_HPET_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_HPET,f,o)
+#define ACPI_PPTT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PPTT_PROCESSOR,f,o)
+#define ACPI_PPTT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PPTT_CACHE,f,o)
#define ACPI_SRAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_CPU_AFFINITY,f,o)
#define ACPI_SRAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_MEM_AFFINITY,f,o)
#define ACPI_SRAT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_SRAT_X2APIC_CPU_AFFINITY,f,o)
@@ -367,6 +384,9 @@
#define ACPI_GTDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_GTDT,f,o)
#define ACPI_GTDT0a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_TIMER_ENTRY,f,o)
#define ACPI_GTDT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_GTDT_WATCHDOG,f,o)
+#define ACPI_HMAT0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HMAT_ADDRESS_RANGE,f,o)
+#define ACPI_HMAT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HMAT_LOCALITY,f,o)
+#define ACPI_HMAT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HMAT_CACHE,f,o)
#define ACPI_IORT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU,f,o)
#define ACPI_IORT3a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_GSI,f,o)
#define ACPI_IORT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_V3,f,o)
@@ -392,13 +412,17 @@
#define ACPI_PCCT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_PCCT,f,o)
#define ACPI_PCCT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED,f,o)
#define ACPI_PCCT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f,o)
+#define ACPI_PCCT3_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_EXT_PCC_MASTER,f,o)
+#define ACPI_PCCT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_EXT_PCC_SLAVE,f,o)
#define ACPI_PMTTH_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PMTT_HEADER,f,o)
#define ACPI_WDDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_WDDT,f,o)
+#define ACPI_WSMT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_WSMT,f,o)
#define ACPI_EINJ0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
#define ACPI_ERST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
#define ACPI_HEST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_IA_MACHINE_CHECK,f,o)
#define ACPI_HEST1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_IA_CORRECTED,f,o)
#define ACPI_HEST6_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_AER_ROOT,f,o)
+#define ACPI_HEST11_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_HEST_IA_DEFERRED_CHECK,f,o)
/*
* Required terminator for all tables below
@@ -780,7 +804,10 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoBert[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoBgrt[] =
{
{ACPI_DMT_UINT16, ACPI_BGRT_OFFSET (Version), "Version", 0},
- {ACPI_DMT_UINT8, ACPI_BGRT_OFFSET (Status), "Status", 0},
+ {ACPI_DMT_UINT8, ACPI_BGRT_OFFSET (Status), "Status (decoded below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_BGRT_FLAG_OFFSET (Status, 0), "Displayed", 0},
+ {ACPI_DMT_FLAGS1, ACPI_BGRT_FLAG_OFFSET (Status, 0), "Orientation Offset", 0},
+
{ACPI_DMT_UINT8, ACPI_BGRT_OFFSET (ImageType), "Image Type", 0},
{ACPI_DMT_UINT64, ACPI_BGRT_OFFSET (ImageAddress), "Image Address", 0},
{ACPI_DMT_UINT32, ACPI_BGRT_OFFSET (ImageOffsetX), "Image OffsetX", 0},
@@ -1349,6 +1376,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHest[] =
{ACPI_DMT_UINT16, ACPI_HEST6_OFFSET (Aer.Reserved1), "Reserved", 0}, \
{ACPI_DMT_UINT8, ACPI_HEST6_OFFSET (Aer.Flags), "Flags (decoded below)", DT_FLAG}, \
{ACPI_DMT_FLAG0, ACPI_HEST6_FLAG_OFFSET (Aer.Flags,0), "Firmware First", 0}, \
+ {ACPI_DMT_FLAG0, ACPI_HEST6_FLAG_OFFSET (Aer.Flags,0), "Global", 0}, \
{ACPI_DMT_UINT8, ACPI_HEST6_OFFSET (Aer.Enabled), "Enabled", 0}, \
{ACPI_DMT_UINT32, ACPI_HEST6_OFFSET (Aer.RecordsToPreallocate), "Records To Preallocate", 0}, \
{ACPI_DMT_UINT32, ACPI_HEST6_OFFSET (Aer.MaxSectionsPerRecord), "Max Sections Per Record", 0}, \
@@ -1373,6 +1401,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHest0[] =
{ACPI_DMT_UINT16, ACPI_HEST0_OFFSET (Reserved1), "Reserved1", 0},
{ACPI_DMT_UINT8, ACPI_HEST0_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_HEST0_FLAG_OFFSET (Flags,0), "Firmware First", 0},
+ {ACPI_DMT_FLAG2, ACPI_HEST0_FLAG_OFFSET (Flags,0), "GHES Assist", 0},
{ACPI_DMT_UINT8, ACPI_HEST0_OFFSET (Enabled), "Enabled", 0},
{ACPI_DMT_UINT32, ACPI_HEST0_OFFSET (RecordsToPreallocate), "Records To Preallocate", 0},
@@ -1392,6 +1421,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHest1[] =
{ACPI_DMT_UINT16, ACPI_HEST1_OFFSET (Reserved1), "Reserved1", 0},
{ACPI_DMT_UINT8, ACPI_HEST1_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_HEST1_FLAG_OFFSET (Flags,0), "Firmware First", 0},
+ {ACPI_DMT_FLAG2, ACPI_HEST1_FLAG_OFFSET (Flags,0), "GHES Assist", 0},
{ACPI_DMT_UINT8, ACPI_HEST1_OFFSET (Enabled), "Enabled", 0},
{ACPI_DMT_UINT32, ACPI_HEST1_OFFSET (RecordsToPreallocate), "Records To Preallocate", 0},
@@ -1482,6 +1512,27 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHest10[] =
ACPI_DMT_TERMINATOR
};
+/* 11: IA32 Deferred Machine Check */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoHest11[] =
+{
+ ACPI_DM_HEST_HEADER,
+ {ACPI_DMT_UINT16, ACPI_HEST11_OFFSET (Reserved1), "Reserved1", 0},
+ {ACPI_DMT_UINT8, ACPI_HEST11_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_HEST11_FLAG_OFFSET (Flags,0), "Firmware First", 0},
+ {ACPI_DMT_FLAG2, ACPI_HEST11_FLAG_OFFSET (Flags,0), "GHES Assist", 0},
+
+ {ACPI_DMT_UINT8, ACPI_HEST11_OFFSET (Enabled), "Enabled", 0},
+ {ACPI_DMT_UINT32, ACPI_HEST11_OFFSET (RecordsToPreallocate), "Records To Preallocate", 0},
+ {ACPI_DMT_UINT32, ACPI_HEST11_OFFSET (MaxSectionsPerRecord), "Max Sections Per Record", 0},
+ {ACPI_DMT_HESTNTFY, ACPI_HEST11_OFFSET (Notify), "Notify", 0},
+ {ACPI_DMT_UINT8, ACPI_HEST11_OFFSET (NumHardwareBanks), "Num Hardware Banks", 0},
+ {ACPI_DMT_UINT24, ACPI_HEST11_OFFSET (Reserved2[0]), "Reserved2", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Notification Structure */
+
ACPI_DMTABLE_INFO AcpiDmTableInfoHestNotify[] =
{
{ACPI_DMT_HESTNTYP, ACPI_HESTN_OFFSET (Type), "Notify Type", 0},
@@ -1537,6 +1588,105 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoHpet[] =
/*******************************************************************************
*
+ * HMAT - Heterogeneous Memory Attributes Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoHmat[] =
+{
+ {ACPI_DMT_UINT32, ACPI_HMAT_OFFSET (Reserved), "Reserved", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* Common HMAT structure header (one per Subtable) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoHmatHdr[] =
+{
+ {ACPI_DMT_HMAT, ACPI_HMATH_OFFSET (Type), "Structure Type", 0},
+ {ACPI_DMT_UINT16, ACPI_HMATH_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_HMATH_OFFSET (Length), "Length", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* HMAT subtables */
+
+/* 0x00: Memory Subsystem Address Range */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoHmat0[] =
+{
+ {ACPI_DMT_UINT16, ACPI_HMAT0_OFFSET (Flags), "Flags (decoded below)", 0},
+ {ACPI_DMT_FLAG0, ACPI_HMAT0_FLAG_OFFSET (Flags,0), "Processor Proximity Domain Valid", 0},
+ {ACPI_DMT_FLAG1, ACPI_HMAT0_FLAG_OFFSET (Flags,0), "Memory Proximity Domain Valid", 0},
+ {ACPI_DMT_FLAG2, ACPI_HMAT0_FLAG_OFFSET (Flags,0), "Reservation Hint", 0},
+ {ACPI_DMT_UINT16, ACPI_HMAT0_OFFSET (Reserved1), "Reserved1", 0},
+ {ACPI_DMT_UINT32, ACPI_HMAT0_OFFSET (ProcessorPD), "Processor Proximity Domain", 0},
+ {ACPI_DMT_UINT32, ACPI_HMAT0_OFFSET (MemoryPD), "Memory Proximity Domain", 0},
+ {ACPI_DMT_UINT32, ACPI_HMAT0_OFFSET (Reserved2), "Reserved2", 0},
+ {ACPI_DMT_UINT64, ACPI_HMAT0_OFFSET (PhysicalAddressBase), "Physical Address Range Base", 0},
+ {ACPI_DMT_UINT64, ACPI_HMAT0_OFFSET (PhysicalAddressLength), "Physical Address Range Size", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0x01: System Locality Latency and Bandwidth Information */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoHmat1[] =
+{
+ {ACPI_DMT_UINT8, ACPI_HMAT1_OFFSET (Flags), "Flags (decoded below)", 0},
+ {ACPI_DMT_FLAGS4_0, ACPI_HMAT1_FLAG_OFFSET (Flags,0), "Memory Hierarchy", 0},
+ {ACPI_DMT_UINT8, ACPI_HMAT1_OFFSET (DataType), "Data Type", 0},
+ {ACPI_DMT_UINT16, ACPI_HMAT1_OFFSET (Reserved1), "Reserved1", 0},
+ {ACPI_DMT_UINT32, ACPI_HMAT1_OFFSET (NumberOfInitiatorPDs), "Initiator Proximity Domains #", 0},
+ {ACPI_DMT_UINT32, ACPI_HMAT1_OFFSET (NumberOfTargetPDs), "Target Proximity Domains #", 0},
+ {ACPI_DMT_UINT32, ACPI_HMAT1_OFFSET (Reserved2), "Reserved2", 0},
+ {ACPI_DMT_UINT64, ACPI_HMAT1_OFFSET (EntryBaseUnit), "Entry Base Unit", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoHmat1a[] =
+{
+ {ACPI_DMT_UINT32, 0, "Initiator Proximity Domain List", DT_OPTIONAL},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoHmat1b[] =
+{
+ {ACPI_DMT_UINT32, 0, "Target Proximity Domain List", DT_OPTIONAL},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoHmat1c[] =
+{
+ {ACPI_DMT_UINT16, 0, "Entry", DT_OPTIONAL},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0x02: Memory Side Cache Information */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoHmat2[] =
+{
+ {ACPI_DMT_UINT32, ACPI_HMAT2_OFFSET (MemoryPD), "Memory Proximity Domain", 0},
+ {ACPI_DMT_UINT32, ACPI_HMAT2_OFFSET (Reserved1), "Reserved1", 0},
+ {ACPI_DMT_UINT64, ACPI_HMAT2_OFFSET (CacheSize), "Memory Side Cache Size", 0},
+ {ACPI_DMT_UINT32, ACPI_HMAT2_OFFSET (CacheAttributes), "Cache Attributes (decoded below)", 0},
+ {ACPI_DMT_FLAGS4_0, ACPI_HMAT2_FLAG_OFFSET (CacheAttributes,0), "Total Cache Levels", 0},
+ {ACPI_DMT_FLAGS4_4, ACPI_HMAT2_FLAG_OFFSET (CacheAttributes,0), "Cache Level", 0},
+ {ACPI_DMT_FLAGS4_8, ACPI_HMAT2_FLAG_OFFSET (CacheAttributes,0), "Cache Associativity", 0},
+ {ACPI_DMT_FLAGS4_12, ACPI_HMAT2_FLAG_OFFSET (CacheAttributes,0), "Write Policy", 0},
+ {ACPI_DMT_FLAGS16_16, ACPI_HMAT2_FLAG_OFFSET (CacheAttributes,0), "Cache Line Size", 0},
+ {ACPI_DMT_UINT16, ACPI_HMAT2_OFFSET (Reserved2), "Reserved2", 0},
+ {ACPI_DMT_UINT16, ACPI_HMAT2_OFFSET (NumberOfSMBIOSHandles), "SMBIOS Handle #", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoHmat2a[] =
+{
+ {ACPI_DMT_UINT16, 0, "SMBIOS Handle", DT_OPTIONAL},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* IORT - IO Remapping Table
*
******************************************************************************/
@@ -2406,7 +2556,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoNfit6a[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoPcct[] =
{
{ACPI_DMT_UINT32, ACPI_PCCT_OFFSET (Flags), "Flags (decoded below)", DT_FLAG},
- {ACPI_DMT_FLAG0, ACPI_PCCT_FLAG_OFFSET (Flags,0), "Doorbell", 0},
+ {ACPI_DMT_FLAG0, ACPI_PCCT_FLAG_OFFSET (Flags,0), "Platform", 0},
{ACPI_DMT_UINT64, ACPI_PCCT_OFFSET (Reserved), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
@@ -2440,7 +2590,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPcct0[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[] =
{
- {ACPI_DMT_UINT32, ACPI_PCCT1_OFFSET (DoorbellInterrupt), "Doorbell Interrupt", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT1_OFFSET (PlatformInterrupt), "Platform Interrupt", 0},
{ACPI_DMT_UINT8, ACPI_PCCT1_OFFSET (Flags), "Flags (Decoded Below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_PCCT1_FLAG_OFFSET (Flags,0), "Polarity", 0},
{ACPI_DMT_FLAG1, ACPI_PCCT1_FLAG_OFFSET (Flags,0), "Mode", 0},
@@ -2460,7 +2610,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[] =
ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[] =
{
- {ACPI_DMT_UINT32, ACPI_PCCT2_OFFSET (DoorbellInterrupt), "Doorbell Interrupt", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT2_OFFSET (PlatformInterrupt), "Platform Interrupt", 0},
{ACPI_DMT_UINT8, ACPI_PCCT2_OFFSET (Flags), "Flags (Decoded Below)", DT_FLAG},
{ACPI_DMT_FLAG0, ACPI_PCCT2_FLAG_OFFSET (Flags,0), "Polarity", 0},
{ACPI_DMT_FLAG1, ACPI_PCCT2_FLAG_OFFSET (Flags,0), "Mode", 0},
@@ -2473,12 +2623,73 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[] =
{ACPI_DMT_UINT32, ACPI_PCCT2_OFFSET (Latency), "Command Latency", 0},
{ACPI_DMT_UINT32, ACPI_PCCT2_OFFSET (MaxAccessRate), "Maximum Access Rate", 0},
{ACPI_DMT_UINT16, ACPI_PCCT2_OFFSET (MinTurnaroundTime), "Minimum Turnaround Time", 0},
- {ACPI_DMT_GAS, ACPI_PCCT2_OFFSET (DoorbellAckRegister), "Doorbell ACK Register", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT2_OFFSET (PlatformAckRegister), "Platform ACK Register", 0},
{ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (AckPreserveMask), "ACK Preserve Mask", 0},
{ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (AckWriteMask), "ACK Write Mask", 0},
ACPI_DMT_TERMINATOR
};
+/* 3: Extended PCC Master Subspace Type 3 (ACPI 6.2) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPcct3[] =
+{
+ {ACPI_DMT_UINT32, ACPI_PCCT3_OFFSET (PlatformInterrupt), "Platform Interrupt", 0},
+ {ACPI_DMT_UINT8, ACPI_PCCT3_OFFSET (Flags), "Flags (Decoded Below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_PCCT3_FLAG_OFFSET (Flags,0), "Polarity", 0},
+ {ACPI_DMT_FLAG1, ACPI_PCCT3_FLAG_OFFSET (Flags,0), "Mode", 0},
+ {ACPI_DMT_UINT8, ACPI_PCCT3_OFFSET (Reserved1), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT3_OFFSET (BaseAddress), "Base Address", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT3_OFFSET (Length), "Address Length", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT3_OFFSET (DoorbellRegister), "Doorbell Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT3_OFFSET (PreserveMask), "Preserve Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT3_OFFSET (WriteMask), "Write Mask", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT3_OFFSET (Latency), "Command Latency", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT3_OFFSET (MaxAccessRate), "Maximum Access Rate", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT3_OFFSET (MinTurnaroundTime), "Minimum Turnaround Time", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT3_OFFSET (PlatformAckRegister), "Platform ACK Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT3_OFFSET (AckPreserveMask), "ACK Preserve Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT3_OFFSET (AckSetMask), "ACK Set Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT3_OFFSET (Reserved2), "Reserved", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT3_OFFSET (CmdCompleteRegister), "Command Complete Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT3_OFFSET (CmdCompleteMask), "Command Complete Check Mask", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT3_OFFSET (CmdUpdateRegister), "Command Update Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT3_OFFSET (CmdUpdatePreserveMask), "Command Update Preserve Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT3_OFFSET (CmdUpdateSetMask), "Command Update Set Mask", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT3_OFFSET (ErrorStatusRegister), "Error Status Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT3_OFFSET (ErrorStatusMask), "Error Status Mask", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 4: Extended PCC Slave Subspace Type 4 (ACPI 6.2) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPcct4[] =
+{
+ {ACPI_DMT_UINT32, ACPI_PCCT4_OFFSET (PlatformInterrupt), "Platform Interrupt", 0},
+ {ACPI_DMT_UINT8, ACPI_PCCT4_OFFSET (Flags), "Flags (Decoded Below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_PCCT4_FLAG_OFFSET (Flags,0), "Polarity", 0},
+ {ACPI_DMT_FLAG1, ACPI_PCCT4_FLAG_OFFSET (Flags,0), "Mode", 0},
+ {ACPI_DMT_UINT8, ACPI_PCCT4_OFFSET (Reserved1), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT4_OFFSET (BaseAddress), "Base Address", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT4_OFFSET (Length), "Address Length", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT4_OFFSET (DoorbellRegister), "Doorbell Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT4_OFFSET (PreserveMask), "Preserve Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT4_OFFSET (WriteMask), "Write Mask", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT4_OFFSET (Latency), "Command Latency", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT4_OFFSET (MaxAccessRate), "Maximum Access Rate", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT4_OFFSET (MinTurnaroundTime), "Minimum Turnaround Time", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT4_OFFSET (PlatformAckRegister), "Platform ACK Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT4_OFFSET (AckPreserveMask), "ACK Preserve Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT4_OFFSET (AckSetMask), "ACK Set Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT4_OFFSET (Reserved2), "Reserved", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT4_OFFSET (CmdCompleteRegister), "Command Complete Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT4_OFFSET (CmdCompleteMask), "Command Complete Check Mask", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT4_OFFSET (CmdUpdateRegister), "Command Update Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT4_OFFSET (CmdUpdatePreserveMask), "Command Update Preserve Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT4_OFFSET (CmdUpdateSetMask), "Command Update Set Mask", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT4_OFFSET (ErrorStatusRegister), "Error Status Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT4_OFFSET (ErrorStatusMask), "Error Status Mask", 0},
+ ACPI_DMT_TERMINATOR
+};
/*******************************************************************************
*
@@ -2555,6 +2766,82 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt2[] =
/*******************************************************************************
*
+ * PPTT - Processor Properties Topology Table (ACPI 6.2)
+ *
+ ******************************************************************************/
+
+/* Main table consists of only the standard ACPI header - subtables follow */
+
+/* Common Subtable header (one per Subtable) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPpttHdr[] =
+{
+ {ACPI_DMT_PPTT, ACPI_PPTTH_OFFSET (Type), "Subtable Type", 0},
+ {ACPI_DMT_UINT8, ACPI_PPTTH_OFFSET (Length), "Length", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 0: Processor hierarchy node */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPptt0[] =
+{
+ {ACPI_DMT_UINT16, ACPI_PPTT0_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_PPTT0_OFFSET (Flags), "Flags", 0},
+ {ACPI_DMT_FLAG0, ACPI_PPTT0_FLAG_OFFSET (Flags,0), "Physical package", 0},
+ {ACPI_DMT_FLAG1, ACPI_PPTT0_FLAG_OFFSET (Flags,0), "ACPI Processor ID valid", 0},
+ {ACPI_DMT_UINT32, ACPI_PPTT0_OFFSET (Parent), "Parent", 0},
+ {ACPI_DMT_UINT32, ACPI_PPTT0_OFFSET (AcpiProcessorId), "ACPI Processor ID", 0},
+ {ACPI_DMT_UINT32, ACPI_PPTT0_OFFSET (NumberOfPrivResources), "Private Resource Number", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPptt0a[] =
+{
+ {ACPI_DMT_UINT32, 0, "Private Resource", DT_OPTIONAL},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 1: Cache type */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPptt1[] =
+{
+ {ACPI_DMT_UINT16, ACPI_PPTT1_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_PPTT1_OFFSET (Flags), "Flags", 0},
+ {ACPI_DMT_FLAG0, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Size valid", 0},
+ {ACPI_DMT_FLAG1, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Number of Sets valid", 0},
+ {ACPI_DMT_FLAG2, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Associativity valid", 0},
+ {ACPI_DMT_FLAG3, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Allocation Type valid", 0},
+ {ACPI_DMT_FLAG4, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Cache Type valid", 0},
+ {ACPI_DMT_FLAG5, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Write Policy valid", 0},
+ {ACPI_DMT_FLAG5, ACPI_PPTT1_FLAG_OFFSET (Flags,0), "Line Size valid", 0},
+ {ACPI_DMT_UINT32, ACPI_PPTT1_OFFSET (NextLevelOfCache), "Next Level of Cache", 0},
+ {ACPI_DMT_UINT32, ACPI_PPTT1_OFFSET (Size), "Size", 0},
+ {ACPI_DMT_UINT32, ACPI_PPTT1_OFFSET (NumberOfSets), "Number of Sets", 0},
+ {ACPI_DMT_UINT8, ACPI_PPTT1_OFFSET (Associativity), "Associativity", 0},
+ {ACPI_DMT_UINT8, ACPI_PPTT1_OFFSET (Attributes), "Attributes", 0},
+ {ACPI_DMT_FLAGS0, ACPI_PPTT1_OFFSET (Attributes), "Allocation Type", 0},
+ {ACPI_DMT_FLAGS2, ACPI_PPTT1_OFFSET (Attributes), "Cache Type", 0},
+ {ACPI_DMT_FLAG4, ACPI_PPTT1_OFFSET (Attributes), "Write Policy", 0},
+ {ACPI_DMT_UINT16, ACPI_PPTT1_OFFSET (LineSize), "Line Size", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* 2: ID */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPptt2[] =
+{
+ {ACPI_DMT_UINT16, ACPI_PPTT2_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_PPTT2_OFFSET (VendorId), "VENDOR_ID", 0},
+ {ACPI_DMT_UINT64, ACPI_PPTT2_OFFSET (Level1Id), "LEVEL_1_ID", 0},
+ {ACPI_DMT_UINT64, ACPI_PPTT2_OFFSET (Level2Id), "LEVEL_2_ID", 0},
+ {ACPI_DMT_UINT16, ACPI_PPTT2_OFFSET (MajorRev), "MAJOR_REV", 0},
+ {ACPI_DMT_UINT16, ACPI_PPTT2_OFFSET (MinorRev), "MINOR_REV", 0},
+ {ACPI_DMT_UINT16, ACPI_PPTT2_OFFSET (SpinRev), "SPIN_REV", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/*******************************************************************************
+ *
* RASF - RAS Feature table
*
******************************************************************************/
@@ -2779,7 +3066,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSrat2[] =
ACPI_DMT_TERMINATOR
};
-/* : GICC Affinity (ACPI 5.1) */
+/* 3: GICC Affinity (ACPI 5.1) */
ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[] =
{
@@ -2791,6 +3078,16 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoSrat3[] =
ACPI_DMT_TERMINATOR
};
+/* 4: GCC ITS Affinity (ACPI 6.2) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoSrat4[] =
+{
+ {ACPI_DMT_UINT32, ACPI_SRAT4_OFFSET (ProximityDomain), "Proximity Domain", 0},
+ {ACPI_DMT_UINT16, ACPI_SRAT4_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT32, ACPI_SRAT4_OFFSET (ItsId), "ITS ID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
/*******************************************************************************
*
@@ -3058,6 +3355,22 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoWpbt0[] =
/*******************************************************************************
*
+ * WSMT - Windows SMM Security Migrations Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoWsmt[] =
+{
+ {ACPI_DMT_UINT32, ACPI_WSMT_OFFSET (ProtectionFlags), "Protection Flags", 0},
+ {ACPI_DMT_FLAG0, ACPI_WSMT_FLAG_OFFSET (ProtectionFlags,0), "FIXED_COMM_BUFFERS", 0},
+ {ACPI_DMT_FLAG1, ACPI_WSMT_FLAG_OFFSET (ProtectionFlags,0), "COMM_BUFFER_NESTED_PTR_PROTECTION", 0},
+ {ACPI_DMT_FLAG2, ACPI_WSMT_FLAG_OFFSET (ProtectionFlags,0), "SYSTEM_RESOURCE_PROTECTION", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+
+/*******************************************************************************
+ *
* XENV - Xen Environment table (ACPI 6.0)
*
******************************************************************************/