aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/dev/acpica/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/compiler')
-rw-r--r--sys/contrib/dev/acpica/compiler/aslcompile.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslcompiler.h4
-rw-r--r--sys/contrib/dev/acpica/compiler/aslcompiler.l9
-rw-r--r--sys/contrib/dev/acpica/compiler/aslload.c6
-rw-r--r--sys/contrib/dev/acpica/compiler/aslmessages.c8
-rw-r--r--sys/contrib/dev/acpica/compiler/aslmessages.h6
-rw-r--r--sys/contrib/dev/acpica/compiler/asloperands.c10
-rw-r--r--sys/contrib/dev/acpica/compiler/aslopt.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslpredef.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslprintf.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslresources.y4
-rw-r--r--sys/contrib/dev/acpica/compiler/aslsupport.l2
-rw-r--r--sys/contrib/dev/acpica/compiler/aslxref.c118
-rw-r--r--sys/contrib/dev/acpica/compiler/cvcompiler.c10
-rw-r--r--sys/contrib/dev/acpica/compiler/cvparser.c6
-rw-r--r--sys/contrib/dev/acpica/compiler/dtexpress.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/dtio.c2
-rw-r--r--sys/contrib/dev/acpica/compiler/dttable1.c24
-rw-r--r--sys/contrib/dev/acpica/compiler/dttable2.c5
-rw-r--r--sys/contrib/dev/acpica/compiler/dttemplate.h65
20 files changed, 228 insertions, 61 deletions
diff --git a/sys/contrib/dev/acpica/compiler/aslcompile.c b/sys/contrib/dev/acpica/compiler/aslcompile.c
index f94e94670fbc..f8fe84dc0f9b 100644
--- a/sys/contrib/dev/acpica/compiler/aslcompile.c
+++ b/sys/contrib/dev/acpica/compiler/aslcompile.c
@@ -494,6 +494,7 @@ CmDoCompile (
UtEndEvent (Event);
UtEndEvent (FullCompile);
+ AslCheckExpectedExceptions ();
CmCleanupAndExit ();
return (0);
@@ -811,7 +812,6 @@ CmCleanupAndExit (
BOOLEAN DeleteAmlFile = FALSE;
- AslCheckExpectedExceptions ();
AePrintErrorLog (ASL_FILE_STDERR);
if (AslGbl_DebugFlag)
{
diff --git a/sys/contrib/dev/acpica/compiler/aslcompiler.h b/sys/contrib/dev/acpica/compiler/aslcompiler.h
index cb2478331956..4b7c6646810f 100644
--- a/sys/contrib/dev/acpica/compiler/aslcompiler.h
+++ b/sys/contrib/dev/acpica/compiler/aslcompiler.h
@@ -702,7 +702,7 @@ OpnDoPackage (
/*
- * aslopt - optmization
+ * aslopt - optimization
*/
void
OptOptimizeNamePath (
@@ -1153,7 +1153,7 @@ OtXrefWalkPart1 (
/*
- * aslutils - common compiler utilites
+ * aslutils - common compiler utilities
*/
void
DbgPrint (
diff --git a/sys/contrib/dev/acpica/compiler/aslcompiler.l b/sys/contrib/dev/acpica/compiler/aslcompiler.l
index fb4333d1d853..88a1f425252b 100644
--- a/sys/contrib/dev/acpica/compiler/aslcompiler.l
+++ b/sys/contrib/dev/acpica/compiler/aslcompiler.l
@@ -692,7 +692,7 @@ NamePathTail [.]{NameSeg}
"IPMI" { count (0); return (PARSEOP_REGIONSPACE_IPMI); }
"GeneralPurposeIo" { count (0); return (PARSEOP_REGIONSPACE_GPIO); } /* ACPI 5.0 */
"GenericSerialBus" { count (0); return (PARSEOP_REGIONSPACE_GSBUS); } /* ACPI 5.0 */
-"PCC" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */
+"PlatformCommChannel" { count (0); return (PARSEOP_REGIONSPACE_PCC); } /* ACPI 5.0 */
"FFixedHW" { count (0); return (PARSEOP_REGIONSPACE_FFIXEDHW); }
/* ResourceTypeKeyword: Resource Usage - Resource Descriptors */
@@ -816,6 +816,13 @@ NamePathTail [.]{NameSeg}
s=UtLocalCacheCalloc (ACPI_NAME_SIZE + 1);
if (strcmp (AslCompilertext, "\\"))
{
+ /*
+ * According to the ACPI specification,
+ * NameSegments must have length of 4. If
+ * the NameSegment has length less than 4,
+ * they are padded with underscores to meet
+ * the required length.
+ */
strcpy (s, "____");
AcpiUtStrupr (AslCompilertext);
}
diff --git a/sys/contrib/dev/acpica/compiler/aslload.c b/sys/contrib/dev/acpica/compiler/aslload.c
index b663f7eb0c3d..86f4dd9055c1 100644
--- a/sys/contrib/dev/acpica/compiler/aslload.c
+++ b/sys/contrib/dev/acpica/compiler/aslload.c
@@ -331,8 +331,8 @@ LdLoadFieldElements (
* The name already exists in this scope
* But continue processing the elements
*/
- AslDualParseOpError (ASL_WARNING, ASL_MSG_EXTERN_COLLISION, Child,
- Child->Asl.Value.String, ASL_MSG_EXTERN_FOUND_HERE, Node->Op,
+ AslDualParseOpError (ASL_WARNING, ASL_MSG_NAME_EXISTS, Child,
+ Child->Asl.Value.String, ASL_MSG_FOUND_HERE, Node->Op,
Node->Op->Asl.ExternalName);
}
}
@@ -575,7 +575,7 @@ LdNamespace1Begin (
if (Status == AE_NOT_FOUND)
{
/*
- * This is either a foward reference or the object truly
+ * This is either a forward reference or the object truly
* does not exist. The two cases can only be differentiated
* during the cross-reference stage later. Mark the Op/Name
* as not-found for now to indicate the need for further
diff --git a/sys/contrib/dev/acpica/compiler/aslmessages.c b/sys/contrib/dev/acpica/compiler/aslmessages.c
index 544b5cd0c40f..7f47040c1ed5 100644
--- a/sys/contrib/dev/acpica/compiler/aslmessages.c
+++ b/sys/contrib/dev/acpica/compiler/aslmessages.c
@@ -353,15 +353,17 @@ const char *AslCompilerMsgs [] =
/* ASL_MSG_NULL_RESOURCE_TEMPLATE */ "Empty Resource Template (END_TAG only)",
/* ASL_MSG_FOUND_HERE */ "Original name creation/declaration below: ",
/* ASL_MSG_ILLEGAL_RECURSION */ "Illegal recursive call to method that creates named objects",
-/* ASL_MSG_EXTERN_COLLISION */ "A name cannot be defined and declared external in the same table",
-/* ASL_MSG_FOUND_HERE_EXTERN */ "Remove one of the declarations indicated above or below:",
+/* ASL_MSG_PLACE_HOLDER_00 */ "", /* TODO: fill in this slot with a new error message */
+/* ASL_MSG_PLACE_HOLDER_01 */ "", /* TODO: fill in this slot with a new error message */
/* ASL_MSG_OEM_TABLE_ID */ "Invalid OEM Table ID",
/* ASL_MSG_OEM_ID */ "Invalid OEM ID",
/* ASL_MSG_UNLOAD */ "Unload is not supported by all operating systems",
/* ASL_MSG_OFFSET */ "Unnecessary/redundant use of Offset operator",
/* ASL_MSG_LONG_SLEEP */ "Very long Sleep, greater than 1 second",
/* ASL_MSG_PREFIX_NOT_EXIST */ "One or more prefix Scopes do not exist",
-/* ASL_MSG_NAMEPATH_NOT_EXIST */ "One or more objects within the Pathname do not exist"
+/* ASL_MSG_NAMEPATH_NOT_EXIST */ "One or more objects within the Pathname do not exist",
+/* ASL_MSG_REGION_LENGTH */ "Operation Region declared with zero length",
+/* ASL_MSG_TEMPORARY_OBJECT */ "Object is created temporarily in another method and cannot be accessed"
};
/* Table compiler */
diff --git a/sys/contrib/dev/acpica/compiler/aslmessages.h b/sys/contrib/dev/acpica/compiler/aslmessages.h
index d2d26b6e9498..817e192e02cd 100644
--- a/sys/contrib/dev/acpica/compiler/aslmessages.h
+++ b/sys/contrib/dev/acpica/compiler/aslmessages.h
@@ -355,8 +355,8 @@ typedef enum
ASL_MSG_NULL_RESOURCE_TEMPLATE,
ASL_MSG_FOUND_HERE,
ASL_MSG_ILLEGAL_RECURSION,
- ASL_MSG_EXTERN_COLLISION,
- ASL_MSG_EXTERN_FOUND_HERE,
+ ASL_MSG_PLACE_HOLDER_00,
+ ASL_MSG_PLACE_HOLDER_01,
ASL_MSG_OEM_TABLE_ID,
ASL_MSG_OEM_ID,
ASL_MSG_UNLOAD,
@@ -364,6 +364,8 @@ typedef enum
ASL_MSG_LONG_SLEEP,
ASL_MSG_PREFIX_NOT_EXIST,
ASL_MSG_NAMEPATH_NOT_EXIST,
+ ASL_MSG_REGION_LENGTH,
+ ASL_MSG_TEMPORARY_OBJECT,
/* These messages are used by the Data Table compiler only */
diff --git a/sys/contrib/dev/acpica/compiler/asloperands.c b/sys/contrib/dev/acpica/compiler/asloperands.c
index a58150f3b594..2ca1d56a3ef6 100644
--- a/sys/contrib/dev/acpica/compiler/asloperands.c
+++ b/sys/contrib/dev/acpica/compiler/asloperands.c
@@ -657,6 +657,7 @@ OpnDoRegion (
ACPI_PARSE_OBJECT *Op)
{
ACPI_PARSE_OBJECT *Next;
+ ACPI_ADR_SPACE_TYPE SpaceId;
/* Opcode is parent node */
@@ -664,9 +665,10 @@ OpnDoRegion (
Next = Op->Asl.Child;
- /* Second child is the space ID*/
+ /* Second child is the space ID */
Next = Next->Asl.Next;
+ SpaceId = (ACPI_ADR_SPACE_TYPE) Next->Common.Value.Integer;
/* Third child is the region offset */
@@ -677,7 +679,13 @@ OpnDoRegion (
Next = Next->Asl.Next;
if (Next->Asl.ParseOpcode == PARSEOP_INTEGER)
{
+ /* Check for zero length */
+
Op->Asl.Value.Integer = Next->Asl.Value.Integer;
+ if (!Op->Asl.Value.Integer && (SpaceId < ACPI_NUM_PREDEFINED_REGIONS))
+ {
+ AslError (ASL_ERROR, ASL_MSG_REGION_LENGTH, Op, NULL);
+ }
}
else
{
diff --git a/sys/contrib/dev/acpica/compiler/aslopt.c b/sys/contrib/dev/acpica/compiler/aslopt.c
index eae22f299764..f12a2ffd19ec 100644
--- a/sys/contrib/dev/acpica/compiler/aslopt.c
+++ b/sys/contrib/dev/acpica/compiler/aslopt.c
@@ -814,7 +814,7 @@ OptOptimizeNamePath (
ACPI_FREE (ExternalNameString);
/*
- * Attempt an optmization depending on the type of namepath
+ * Attempt an optimization depending on the type of namepath
*/
if (Flags & (AML_NAMED | AML_CREATE))
{
diff --git a/sys/contrib/dev/acpica/compiler/aslpredef.c b/sys/contrib/dev/acpica/compiler/aslpredef.c
index 373ca42ec9e5..45d0840b10e7 100644
--- a/sys/contrib/dev/acpica/compiler/aslpredef.c
+++ b/sys/contrib/dev/acpica/compiler/aslpredef.c
@@ -449,7 +449,7 @@ ApCheckPredefinedReturnValue (
* DESCRIPTION: Check for a predefined name for a static object (created via
* the ASL Name operator). If it is a predefined ACPI name, ensure
* that the name does not require any arguments (which would
- * require a control method implemenation of the name), and that
+ * require a control method implementation of the name), and that
* the type of the object is one of the expected types for the
* predefined name.
*
diff --git a/sys/contrib/dev/acpica/compiler/aslprintf.c b/sys/contrib/dev/acpica/compiler/aslprintf.c
index 1dfc4ce04eac..3d1330bb392c 100644
--- a/sys/contrib/dev/acpica/compiler/aslprintf.c
+++ b/sys/contrib/dev/acpica/compiler/aslprintf.c
@@ -239,7 +239,7 @@ OpcDoFprintf (
* RETURN: None
*
* DESCRIPTION: Convert printf macro to a Store AML operation. The printf
- * macro parse tree is layed out as follows:
+ * macro parse tree is laid out as follows:
*
* Op - printf parse op
* Op->Child - Format string
diff --git a/sys/contrib/dev/acpica/compiler/aslresources.y b/sys/contrib/dev/acpica/compiler/aslresources.y
index 049d0a52ba02..1caff20c6cec 100644
--- a/sys/contrib/dev/acpica/compiler/aslresources.y
+++ b/sys/contrib/dev/acpica/compiler/aslresources.y
@@ -866,7 +866,7 @@ UartSerialBusTerm
OptionalBitsPerByte /* 05: BitsPerByte */
OptionalStopBits /* 06: StopBits */
',' ByteConstExpr /* 08: LinesInUse */
- OptionalEndian /* 09: Endianess */
+ OptionalEndian /* 09: Endianness */
OptionalParityType /* 10: Parity */
OptionalFlowControl /* 11: FlowControl */
',' WordConstExpr /* 13: Rx BufferSize */
@@ -891,7 +891,7 @@ UartSerialBusTermV2
OptionalBitsPerByte /* 05: BitsPerByte */
OptionalStopBits /* 06: StopBits */
',' ByteConstExpr /* 08: LinesInUse */
- OptionalEndian /* 09: Endianess */
+ OptionalEndian /* 09: Endianness */
OptionalParityType /* 10: Parity */
OptionalFlowControl /* 11: FlowControl */
',' WordConstExpr /* 13: Rx BufferSize */
diff --git a/sys/contrib/dev/acpica/compiler/aslsupport.l b/sys/contrib/dev/acpica/compiler/aslsupport.l
index 76993662a7c2..5cac84dc6df8 100644
--- a/sys/contrib/dev/acpica/compiler/aslsupport.l
+++ b/sys/contrib/dev/acpica/compiler/aslsupport.l
@@ -610,7 +610,7 @@ loop:
/*
* Check for nested comment -- can help catch cases where a previous
- * comment was accidently left unterminated
+ * comment was accidentally left unterminated
*/
if ((c1 == '/') && (c == '*'))
{
diff --git a/sys/contrib/dev/acpica/compiler/aslxref.c b/sys/contrib/dev/acpica/compiler/aslxref.c
index 185c17547161..38d78f643924 100644
--- a/sys/contrib/dev/acpica/compiler/aslxref.c
+++ b/sys/contrib/dev/acpica/compiler/aslxref.c
@@ -174,6 +174,12 @@ XfNamespaceLocateEnd (
UINT32 Level,
void *Context);
+static BOOLEAN
+XfValidateCrossReference (
+ ACPI_PARSE_OBJECT *Op,
+ const ACPI_OPCODE_INFO *OpInfo,
+ ACPI_NAMESPACE_NODE *Node);
+
static ACPI_PARSE_OBJECT *
XfGetParentMethod (
ACPI_PARSE_OBJECT *Op);
@@ -408,6 +414,7 @@ XfGetParentMethod (
return (NULL); /* No parent method found */
}
+
/*******************************************************************************
*
* FUNCTION: XfNamespaceLocateBegin
@@ -488,7 +495,7 @@ XfNamespaceLocateBegin (
Node->ArgCount = (UINT8)
(((UINT8) NextOp->Asl.Value.Integer) & 0x07);
- /* We will track all posible ArgXs */
+ /* We will track all possible ArgXs */
for (i = 0; i < ACPI_METHOD_NUM_ARGS; i++)
{
@@ -776,6 +783,15 @@ XfNamespaceLocateBegin (
return_ACPI_STATUS (Status);
}
+ /* Check for an attempt to access an object in another method */
+
+ if (!XfValidateCrossReference (Op, OpInfo, Node))
+ {
+ AslError (ASL_ERROR, ASL_MSG_TEMPORARY_OBJECT, Op,
+ Op->Asl.ExternalName);
+ return_ACPI_STATUS (Status);
+ }
+
/* Object was found above, check for an illegal forward reference */
if (Op->Asl.CompileFlags & OP_NOT_FOUND_DURING_LOAD)
@@ -1234,3 +1250,103 @@ XfNamespaceLocateEnd (
return_ACPI_STATUS (AE_OK);
}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: XfValidateCrossReference
+ *
+ * PARAMETERS: Op - Parse Op that references the object
+ * OpInfo - Parse Op info struct
+ * Node - Node for the referenced object
+ *
+ * RETURN: TRUE if the reference is legal, FALSE otherwise
+ *
+ * DESCRIPTION: Determine if a reference to another object is allowed.
+ *
+ * EXAMPLE:
+ * Method (A) {Name (INT1, 1)} Declaration of object INT1
+ * Method (B) (Store (2, \A.INT1)} Illegal reference to object INT1
+ * (INT1 is temporary, valid only during
+ * execution of A)
+ *
+ * NOTES:
+ * A null pointer returned by either XfGetParentMethod or
+ * UtGetParentMethod indicates that the parameter object is not
+ * within a control method.
+ *
+ * Five cases are handled: Case(Op, Node)
+ * 1) Case(0,0): Op is not within a method, Node is not --> OK
+ * 2) Case(0,1): Op is not within a method, but Node is --> Illegal
+ * 3) Case(1,0): Op is within a method, Node is not --> OK
+ * 4) Case(1,1): Both are within the same method --> OK
+ * 5) Case(1,1): Both are in methods, but not same method --> Illegal
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+XfValidateCrossReference (
+ ACPI_PARSE_OBJECT *Op,
+ const ACPI_OPCODE_INFO *OpInfo,
+ ACPI_NAMESPACE_NODE *Node)
+{
+ ACPI_PARSE_OBJECT *ReferencingMethodOp;
+ ACPI_NAMESPACE_NODE *ReferencedMethodNode;
+
+
+ /* Ignore actual named (and related) object declarations */
+
+ if (OpInfo->Flags & (AML_NAMED | AML_CREATE | AML_DEFER | AML_HAS_ARGS))
+ {
+ return (TRUE);
+ }
+
+ /*
+ * 1) Search upwards in parse tree for owner of the referencing object
+ * 2) Search upwards in namespace to find the owner of the referenced object
+ */
+ ReferencingMethodOp = XfGetParentMethod (Op);
+ ReferencedMethodNode = UtGetParentMethod (Node);
+
+ if (!ReferencingMethodOp && !ReferencedMethodNode)
+ {
+ /*
+ * 1) Case (0,0): Both Op and Node are not within methods
+ * --> OK
+ */
+ return (TRUE);
+ }
+
+ if (!ReferencingMethodOp && ReferencedMethodNode)
+ {
+ /*
+ * 2) Case (0,1): Op is not in a method, but Node is within a
+ * method --> illegal
+ */
+ return (FALSE);
+ }
+ else if (ReferencingMethodOp && !ReferencedMethodNode)
+ {
+ /*
+ * 3) Case (1,0): Op is within a method, but Node is not
+ * --> OK
+ */
+ return (TRUE);
+ }
+ else if (ReferencingMethodOp->Asl.Node == ReferencedMethodNode)
+ {
+ /*
+ * 4) Case (1,1): Both Op and Node are within the same method
+ * --> OK
+ */
+ return (TRUE);
+ }
+ else
+ {
+ /*
+ * 5) Case (1,1), Op and Node are in different methods
+ * --> Illegal
+ */
+ return (FALSE);
+ }
+}
diff --git a/sys/contrib/dev/acpica/compiler/cvcompiler.c b/sys/contrib/dev/acpica/compiler/cvcompiler.c
index ef645e2977d9..cef77b6eca99 100644
--- a/sys/contrib/dev/acpica/compiler/cvcompiler.c
+++ b/sys/contrib/dev/acpica/compiler/cvcompiler.c
@@ -168,7 +168,7 @@
*
* DESCRIPTION: Process a single line comment of a c Style comment. This
* function captures a line of a c style comment in a char* and
- * places the comment in the approperiate global buffer.
+ * places the comment in the appropriate global buffer.
*
******************************************************************************/
@@ -294,7 +294,7 @@ CvProcessComment (
* RETURN: none
*
* DESCRIPTION: Process a single line comment. This function captures a comment
- * in a char* and places the comment in the approperiate global
+ * in a char* and places the comment in the appropriate global
* buffer through CvPlaceComment
*
******************************************************************************/
@@ -333,7 +333,7 @@ CvProcessCommentType2 (
*
* would be lexically analyzed as a single comment.
*
- * Create a new string with the approperiate spaces. Since we need
+ * Create a new string with the appropriate spaces. Since we need
* to account for the proper spacing, the actual comment,
* extra 2 spaces so that this comment can be converted to the "/ *"
* style and the null terminator, the string would look something
@@ -380,7 +380,7 @@ CvProcessCommentType2 (
* RETURN: TotalCommentLength - Length of all comments within this op.
*
* DESCRIPTION: Calculate the length that the each comment takes up within Op.
- * Comments look like the follwoing: [0xA9 OptionBtye comment 0x00]
+ * Comments look like the following: [0xA9 OptionBtye comment 0x00]
* therefore, we add 1 + 1 + strlen (comment) + 1 to get the actual
* length of this comment.
*
@@ -963,7 +963,7 @@ CvAppendInlineComment (
* RETURN: None
*
* DESCRIPTION: Given type and CommentString, this function places the
- * CommentString in the approperiate global comment list or char*
+ * CommentString in the appropriate global comment list or char*
*
******************************************************************************/
diff --git a/sys/contrib/dev/acpica/compiler/cvparser.c b/sys/contrib/dev/acpica/compiler/cvparser.c
index bc07dbaf9e39..f62caaa0fb72 100644
--- a/sys/contrib/dev/acpica/compiler/cvparser.c
+++ b/sys/contrib/dev/acpica/compiler/cvparser.c
@@ -276,7 +276,7 @@ CvInitFileTree (
AcpiGbl_FileTreeRoot->File = AcpiGbl_OutputFile;
/*
- * Set this to true because we dont need to output
+ * Set this to true because we don't need to output
* an include statement for the topmost file
*/
AcpiGbl_FileTreeRoot->IncludeWritten = TRUE;
@@ -514,7 +514,7 @@ CvFileAddressLookup(
* RETURN: None
*
* DESCRIPTION: Takes a given parse op, looks up its Op->Common.Aml field
- * within the file tree and fills in approperiate file information
+ * within the file tree and fills in appropriate file information
* from a matching node within the tree.
* This is referred as ASL_CV_LABEL_FILENODE.
*
@@ -1005,7 +1005,7 @@ CvCaptureComments (
*
* RETURN: None
*
- * DESCRIPTION: Transfer all of the commments stored in global containers to the
+ * DESCRIPTION: Transfer all of the comments stored in global containers to the
* given Op. This will be invoked shortly after the parser creates
* a ParseOp.
* This is referred as ASL_CV_TRANSFER_COMMENTS.
diff --git a/sys/contrib/dev/acpica/compiler/dtexpress.c b/sys/contrib/dev/acpica/compiler/dtexpress.c
index 194b79942bbc..e7610c92382d 100644
--- a/sys/contrib/dev/acpica/compiler/dtexpress.c
+++ b/sys/contrib/dev/acpica/compiler/dtexpress.c
@@ -372,7 +372,7 @@ DtDoOperator (
*
* RETURN: Table offset associated with the label
*
- * DESCRIPTION: Lookup a lable and return its value.
+ * DESCRIPTION: Lookup a label and return its value.
*
*****************************************************************************/
diff --git a/sys/contrib/dev/acpica/compiler/dtio.c b/sys/contrib/dev/acpica/compiler/dtio.c
index 431f9f5fd5e3..9d6d21523fe9 100644
--- a/sys/contrib/dev/acpica/compiler/dtio.c
+++ b/sys/contrib/dev/acpica/compiler/dtio.c
@@ -375,7 +375,7 @@ DtParseLine (
return (AE_OK);
}
- /* All lines after "Raw Table Data" are ingored */
+ /* All lines after "Raw Table Data" are ignored */
if (strstr (LineBuffer, ACPI_RAW_TABLE_DATA_HEADER))
{
diff --git a/sys/contrib/dev/acpica/compiler/dttable1.c b/sys/contrib/dev/acpica/compiler/dttable1.c
index ce4545a78682..ea63dfc0d215 100644
--- a/sys/contrib/dev/acpica/compiler/dttable1.c
+++ b/sys/contrib/dev/acpica/compiler/dttable1.c
@@ -831,7 +831,7 @@ DtCompileDrtm (
DtInsertSubtable (ParentTable, Subtable);
/*
- * Using ACPI_SUB_PTR, We needn't define a seperate structure. Care
+ * Using ACPI_SUB_PTR, We needn't define a separate structure. Care
* should be taken to avoid accessing ACPI_TABLE_HADER fields.
*/
#if 0
@@ -1002,7 +1002,14 @@ DtCompileGtdt (
ACPI_SUBTABLE_HEADER *GtdtHeader;
ACPI_DMTABLE_INFO *InfoTable;
UINT32 GtCount;
+ ACPI_TABLE_HEADER *Header;
+
+
+ ParentTable = DtPeekSubtable ();
+ Header = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ParentTable->Buffer);
+
+ /* Compile the main table */
Status = DtCompileTable (PFieldList, AcpiDmTableInfoGtdt,
&Subtable);
@@ -1011,6 +1018,21 @@ DtCompileGtdt (
return (Status);
}
+ /* GTDT revision 3 later contains 2 extra fields before subtables */
+
+ if (Header->Revision > 2)
+ {
+ ParentTable = DtPeekSubtable ();
+ DtInsertSubtable (ParentTable, Subtable);
+
+ Status = DtCompileTable (PFieldList,
+ AcpiDmTableInfoGtdtEl2, &Subtable);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
+ }
+
ParentTable = DtPeekSubtable ();
DtInsertSubtable (ParentTable, Subtable);
diff --git a/sys/contrib/dev/acpica/compiler/dttable2.c b/sys/contrib/dev/acpica/compiler/dttable2.c
index e21fe37dada7..29b845a5a1ba 100644
--- a/sys/contrib/dev/acpica/compiler/dttable2.c
+++ b/sys/contrib/dev/acpica/compiler/dttable2.c
@@ -1733,6 +1733,11 @@ DtCompileSrat (
InfoTable = AcpiDmTableInfoSrat4;
break;
+ case ACPI_SRAT_TYPE_GENERIC_AFFINITY:
+
+ InfoTable = AcpiDmTableInfoSrat5;
+ break;
+
default:
DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SRAT");
diff --git a/sys/contrib/dev/acpica/compiler/dttemplate.h b/sys/contrib/dev/acpica/compiler/dttemplate.h
index 5fb3287ba1bc..cb1c58552ae2 100644
--- a/sys/contrib/dev/acpica/compiler/dttemplate.h
+++ b/sys/contrib/dev/acpica/compiler/dttemplate.h
@@ -545,34 +545,35 @@ const unsigned char TemplateFpdt[] =
const unsigned char TemplateGtdt[] =
{
- 0x47,0x54,0x44,0x54,0xe0,0x00,0x00,0x00, /* 00000000 "GTDT...." */
- 0x02,0xb0,0x4c,0x49,0x4e,0x41,0x52,0x4f, /* 00000008 "..LINARO" */
- 0x52,0x54,0x53,0x4d,0x56,0x45,0x56,0x38, /* 00000010 "RTSMVEV8" */
- 0x01,0x00,0x00,0x00,0x49,0x4e,0x54,0x4c, /* 00000018 "....INTL" */
- 0x24,0x04,0x14,0x20,0x00,0x00,0x00,0x00, /* 00000020 "$.. ...." */
+ 0x47,0x54,0x44,0x54,0xE8,0x00,0x00,0x00, /* 00000000 "GTDT...." */
+ 0x03,0x5D,0x4C,0x49,0x4E,0x41,0x52,0x4F, /* 00000008 ".]LINARO" */
+ 0x52,0x54,0x53,0x4D,0x56,0x45,0x56,0x38, /* 00000010 "RTSMVEV8" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x08,0x01,0x19,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
- 0x1d,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000030 "........" */
- 0x1e,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000038 "........" */
- 0x1b,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000040 "........" */
- 0x1a,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000048 "........" */
+ 0x1D,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000030 "........" */
+ 0x1E,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000038 "........" */
+ 0x1B,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000040 "........" */
+ 0x1A,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000048 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000050 "........" */
0x02,0x00,0x00,0x00,0x60,0x00,0x00,0x00, /* 00000058 "....`..." */
- 0x00,0x64,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000060 ".d......" */
- 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, /* 00000068 "........" */
- 0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000070 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
+ 0x43,0x00,0x00,0x00,0x21,0x00,0x00,0x00, /* 00000060 "C...!..." */
+ 0x00,0x64,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000068 ".d......" */
+ 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00, /* 00000070 "........" */
+ 0x14,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000078 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
- 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000088 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000090 "........" */
0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000098 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000a0 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000a8 "........" */
- 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000b0 "........" */
- 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000b8 "........" */
- 0x00,0x00,0x00,0x00,0x01,0x1c,0x00,0x00, /* 000000c0 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000c8 "........" */
- 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000d0 "........" */
- 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000d8 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000A0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000B8 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00, /* 000000C0 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x1C,0x00,0x00, /* 000000C8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000D8 "........" */
+ 0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00 /* 000000E0 "........" */
};
const unsigned char TemplateHest[] =
@@ -662,10 +663,10 @@ const unsigned char TemplateHest[] =
const unsigned char TemplateHmat[] =
{
0x48,0x4D,0x41,0x54,0x9C,0x00,0x00,0x00, /* 00000000 "HMAT...." */
- 0x00,0x54,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".TINTEL " */
+ 0x02,0x4D,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".MINTEL " */
0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45, /* 00000010 "TEMPLATE" */
0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x03,0x03,0x17,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
+ 0x08,0x01,0x19,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
0x00,0x00,0x00,0x00,0x28,0x00,0x00,0x00, /* 00000028 "....(..." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000030 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
@@ -817,10 +818,10 @@ const unsigned char TemplateLpit[] =
const unsigned char TemplateMadt[] =
{
0x41,0x50,0x49,0x43,0x5A,0x01,0x00,0x00, /* 00000000 "APICZ..." */
- 0x03,0xEA,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
+ 0x05,0xEF,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x10,0x04,0x15,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
+ 0x08,0x01,0x19,0x20,0x00,0x00,0x00,0x00, /* 00000020 "... ...." */
0x01,0x00,0x00,0x00,0x00,0x08,0x00,0x00, /* 00000028 "........" */
0x01,0x00,0x00,0x00,0x01,0x0C,0x01,0x00, /* 00000030 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
@@ -1375,11 +1376,11 @@ const unsigned char TemplateSpmi[] =
const unsigned char TemplateSrat[] =
{
- 0x53,0x52,0x41,0x54,0x9E,0x00,0x00,0x00, /* 00000000 "SRAT...." */
- 0x03,0x55,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".UINTEL " */
+ 0x53,0x52,0x41,0x54,0xBE,0x00,0x00,0x00, /* 00000000 "SRAT...." */
+ 0x03,0xE6,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 "..INTEL " */
0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
- 0x03,0x03,0x17,0x20,0x01,0x00,0x00,0x00, /* 00000020 "... ...." */
+ 0x29,0x06,0x18,0x20,0x01,0x00,0x00,0x00, /* 00000020 ").. ...." */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000028 "........" */
0x00,0x10,0x00,0x00,0x01,0x00,0x00,0x00, /* 00000030 "........" */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000038 "........" */
@@ -1394,7 +1395,11 @@ const unsigned char TemplateSrat[] =
0x03,0x12,0x00,0x00,0x00,0x00,0x00,0x00, /* 00000080 "........" */
0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00, /* 00000088 "........" */
0x00,0x00,0x04,0x0C,0x00,0x00,0x00,0x00, /* 00000090 "........" */
- 0x00,0x00,0x01,0x00,0x00,0x00 /* 00000098 "......" */
+ 0x00,0x00,0x01,0x00,0x00,0x00,0x05,0x20, /* 00000098 "....... " */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000A8 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, /* 000000B0 "........" */
+ 0x00,0x00,0x00,0x00,0x00,0x00 /* 000000B8 "......" */
};
const unsigned char TemplateStao[] =