Sync ACPICA with Intel's version 20181031.
authorSascha Wildner <saw@online.de>
Fri, 2 Nov 2018 08:58:43 +0000 (09:58 +0100)
committerSascha Wildner <saw@online.de>
Fri, 2 Nov 2018 09:00:21 +0000 (10:00 +0100)
* Fix an Operation Region regression, fixing accurate checking for
  region conflicts.

* Add support for 2-byte extended opcodes in the code that continues
  parsing during the table load phase.

* Eliminate a no longer used global variable.

For detailed list, please see sys/contrib/dev/acpica/changes.txt.

33 files changed:
sys/contrib/dev/acpica/changes.txt
sys/contrib/dev/acpica/source/common/dmtbdump3.c
sys/contrib/dev/acpica/source/common/dmtbinfo3.c
sys/contrib/dev/acpica/source/compiler/aslcompile.c
sys/contrib/dev/acpica/source/compiler/aslerror.c
sys/contrib/dev/acpica/source/compiler/aslload.c
sys/contrib/dev/acpica/source/compiler/aslmain.c
sys/contrib/dev/acpica/source/compiler/aslmessages.c
sys/contrib/dev/acpica/source/compiler/aslmessages.h
sys/contrib/dev/acpica/source/compiler/aslpredef.c
sys/contrib/dev/acpica/source/compiler/aslxref.c
sys/contrib/dev/acpica/source/compiler/dtio.c
sys/contrib/dev/acpica/source/compiler/dttable2.c
sys/contrib/dev/acpica/source/compiler/prscan.c
sys/contrib/dev/acpica/source/components/debugger/dbxface.c
sys/contrib/dev/acpica/source/components/dispatcher/dsopcode.c
sys/contrib/dev/acpica/source/components/dispatcher/dswload2.c
sys/contrib/dev/acpica/source/components/namespace/nsaccess.c
sys/contrib/dev/acpica/source/components/parser/psloop.c
sys/contrib/dev/acpica/source/components/parser/psobject.c
sys/contrib/dev/acpica/source/components/tables/tbxfload.c
sys/contrib/dev/acpica/source/include/acdisasm.h
sys/contrib/dev/acpica/source/include/acnamesp.h
sys/contrib/dev/acpica/source/include/acpixf.h
sys/contrib/dev/acpica/source/include/actbinfo.h
sys/contrib/dev/acpica/source/include/actbl3.h
sys/contrib/dev/acpica/source/tools/acpidump/apmain.c
sys/contrib/dev/acpica/source/tools/acpiexec/aemain.c
sys/contrib/dev/acpica/source/tools/acpiexec/aetables.c
sys/contrib/dev/acpica/source/tools/acpinames/anmain.c
sys/contrib/dev/acpica/source/tools/acpisrc/astable.c
sys/dev/acpica/acpi.c
usr.sbin/acpi/acpiexec/acpiexec.8

index c84aab6..91ac04c 100644 (file)
@@ -1,3 +1,53 @@
+----------------------------------------
+31 October 2018. Summary of changes for version 20181031:
+
+This release is available at https://acpica.org/downloads
+
+
+An Operation Region regression was fixed by properly adding address 
+ranges to a global list during initialization. This allows OS to 
+accurately check for overlapping regions between native devices (such as 
+PCI) and Operation regions as well as checking for region conflicts 
+between two Operation Regions.
+
+Added support for the 2-byte extended opcodes in the code/feature that 
+attempts to continue parsing during the table load phase. Skip parsing 
+Device declarations (and other extended opcodes) when an error occurs 
+during parsing. Previously, only single-byte opcodes were supported.
+
+Cleanup: Simplified the module-level code support by eliminating a 
+useless global variable (AcpiGbl_GroupModuleLeveCode).
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL/Preprocessor: Fixed a regression where an incorrect use of ACPI_FREE 
+could cause a fault in the preprocessor. This was an inadvertent side-
+effect from moving more allocations/frees to the local cache/memory 
+mechanism.
+
+iASL: Enhanced error detection by validating that all NameSeg elements 
+within a NamePatch actually exist. The previous behavior was spotty at 
+best, and such errors could be improperly ignored at compiler time (never 
+at runtime, however. There are two new error messages, as shown in the 
+examples below:
+
+dsdt.asl     33:     CreateByteField (TTTT.BXXX, 1, CBF1)
+Error    6161 -                              ^ One or more objects within 
+the Pathname do not exist (TTTT.BXXX)
+
+dsdt.asl     34:     CreateByteField (BUF1, UUUU.INT1, BBBB.CBF1)
+Error    6160 -        One or more prefix Scopes do not exist ^  
+(BBBB.CBF1)
+
+iASL: Disassembler/table-compiler: Added support for the static data 
+table TPM2 revision 3 (an older version of TPM2). The support has been 
+added for the compiler and the disassembler.
+
+Fixed compilation of DOS format data table file on Unix/Linux systems. 
+iASL now properly detects line continuations (\) for DOS format data 
+table definition language files on when executing on Unix/Linux.
+
 ----------------------------------------
 03 October 2018. Summary of changes for version 20181003:
 
index 3c1dea6..1bc3fa6 100644 (file)
@@ -486,6 +486,51 @@ AcpiDmDumpTcpa (
 }
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmDumpTpm2
+ *
+ * PARAMETERS:  Table               - A TPM2 table
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Format the contents of a TPM2.
+ *
+ ******************************************************************************/
+static void
+AcpiDmDumpTpm2Rev3 (
+    ACPI_TABLE_HEADER       *Table)
+{
+    UINT32                  Offset = sizeof (ACPI_TABLE_TPM23);
+    ACPI_TABLE_TPM23        *CommonHeader = ACPI_CAST_PTR (ACPI_TABLE_TPM23, Table);
+    ACPI_TPM23_TRAILER      *Subtable = ACPI_ADD_PTR (ACPI_TPM23_TRAILER, Table, Offset);
+    ACPI_STATUS             Status;
+
+
+    /* Main table */
+
+    Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoTpm23);
+    if (ACPI_FAILURE (Status))
+    {
+        return;
+    }
+
+    /* Optional subtable if start method is ACPI start method */
+
+    switch (CommonHeader->StartMethod)
+    {
+    case ACPI_TPM23_ACPI_START_METHOD:
+
+        Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+            Table->Length - Offset, AcpiDmTableInfoTpm23a);
+        break;
+
+    default:
+        break;
+    }
+}
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDmDumpTpm2
@@ -509,9 +554,16 @@ AcpiDmDumpTpm2 (
     ACPI_STATUS             Status;
 
 
+    if (Table->Revision == 3)
+    {
+        AcpiDmDumpTpm2Rev3(Table);
+        return;
+    }
+
     /* Main table */
 
     Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, AcpiDmTableInfoTpm2);
+
     if (ACPI_FAILURE (Status))
     {
         return;
index c82e3db..33d9928 100644 (file)
@@ -446,6 +446,26 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoTcpaServer[] =
  *
  ******************************************************************************/
 
+/* TPM2 revision 3 */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoTpm23[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_TPM23_OFFSET (Reserved),           "Reserved", 0},
+    {ACPI_DMT_UINT64,   ACPI_TPM23_OFFSET (ControlAddress),     "Control Address", 0},
+    {ACPI_DMT_UINT32,   ACPI_TPM23_OFFSET (StartMethod),        "Start Method", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* Trailer in the case that StartMethod == 2 */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoTpm23a[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_TPM23A_OFFSET (Reserved),          "Reserved", DT_OPTIONAL},
+    ACPI_DMT_TERMINATOR
+};
+
+/* TPM2 revision 4 */
+
 ACPI_DMTABLE_INFO           AcpiDmTableInfoTpm2[] =
 {
     {ACPI_DMT_UINT16,   ACPI_TPM2_OFFSET (PlatformClass),           "Platform Class", 0},
index e08442e..4ae1907 100644 (file)
@@ -858,7 +858,7 @@ CmCleanupAndExit (
 
     if (AslGbl_ExceptionCount[ASL_ERROR] > ASL_MAX_ERROR_COUNT)
     {
-        printf ("\nMaximum error count (%u) exceeded\n",
+        printf ("\nMaximum error count (%d) exceeded\n",
             ASL_MAX_ERROR_COUNT);
     }
 
index 6d45cd4..10ea3ec 100644 (file)
@@ -1097,7 +1097,7 @@ AslExpectException (
 
     if (AslGbl_ExpectedMessagesIndex >= ASL_MAX_EXPECTED_MESSAGES)
     {
-        printf ("Too many messages have been registered as expected (max %u)\n",
+        printf ("Too many messages have been registered as expected (max %d)\n",
             ASL_MAX_DISABLED_MESSAGES);
         return (AE_LIMIT);
     }
@@ -1144,7 +1144,7 @@ AslDisableException (
 
     if (AslGbl_DisabledMessagesIndex >= ASL_MAX_DISABLED_MESSAGES)
     {
-        printf ("Too many messages have been disabled (max %u)\n",
+        printf ("Too many messages have been disabled (max %d)\n",
             ASL_MAX_DISABLED_MESSAGES);
         return (AE_LIMIT);
     }
index 5bb0a85..7f29b90 100644 (file)
@@ -417,10 +417,8 @@ LdLoadResourceElements (
         {
             Status = AcpiNsLookup (WalkState->ScopeInfo,
                 InitializerOp->Asl.ExternalName,
-                ACPI_TYPE_LOCAL_RESOURCE_FIELD,
-                ACPI_IMODE_LOAD_PASS1,
-                ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE,
-                NULL, &Node);
+                ACPI_TYPE_LOCAL_RESOURCE_FIELD, ACPI_IMODE_LOAD_PASS1,
+                ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
@@ -687,8 +685,7 @@ LdNamespace1Begin (
          * handle this case. Perhaps someday this case can go away.
          */
         Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
-            ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT,
-            WalkState, &(Node));
+            ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, WalkState, &Node);
         if (ACPI_FAILURE (Status))
         {
             if (Status == AE_NOT_FOUND)
@@ -696,23 +693,26 @@ LdNamespace1Begin (
                 /* The name was not found, go ahead and create it */
 
                 Status = AcpiNsLookup (WalkState->ScopeInfo, Path,
-                    ACPI_TYPE_LOCAL_SCOPE,
-                    ACPI_IMODE_LOAD_PASS1, Flags,
-                    WalkState, &(Node));
+                    ACPI_TYPE_LOCAL_SCOPE, ACPI_IMODE_LOAD_PASS1,
+                    Flags, WalkState, &Node);
                 if (ACPI_FAILURE (Status))
                 {
                     return_ACPI_STATUS (Status);
                 }
 
-                /*
-                 * However, this is an error -- primarily because the MS
-                 * interpreter can't handle a forward reference from the
-                 * Scope() operator.
-                 */
-                AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
-                    Op->Asl.ExternalName);
-                AslError (ASL_ERROR, ASL_MSG_SCOPE_FWD_REF, Op,
-                    Op->Asl.ExternalName);
+                /* However, this is an error -- operand to Scope must exist */
+
+                if (strlen (Op->Asl.ExternalName) == ACPI_NAME_SIZE)
+                {
+                    AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
+                        Op->Asl.ExternalName);
+                }
+                else
+                {
+                    AslError (ASL_ERROR, ASL_MSG_NAMEPATH_NOT_EXIST, Op,
+                        Op->Asl.ExternalName);
+                }
+
                 goto FinishNode;
             }
 
@@ -824,7 +824,6 @@ LdNamespace1Begin (
         break;
     }
 
-
     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Loading name: %s, (%s)\n",
         Op->Asl.ExternalName, AcpiUtGetTypeName (ObjectType)));
 
@@ -832,6 +831,18 @@ LdNamespace1Begin (
 
     Flags |= ACPI_NS_ERROR_IF_FOUND;
 
+    /*
+     * For opcodes that enter new names into the namespace,
+     * all prefix NameSegs must exist.
+     */
+    WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Asl.AmlOpcode);
+    if (((WalkState->OpInfo->Flags & AML_NAMED) ||
+        (WalkState->OpInfo->Flags & AML_CREATE)) &&
+        (Op->Asl.AmlOpcode != AML_EXTERNAL_OP))
+    {
+        Flags |= ACPI_NS_PREFIX_MUST_EXIST;
+    }
+
     /*
      * Enter the named type into the internal namespace. We enter the name
      * as we go downward in the parse tree. Any necessary subobjects that
@@ -915,8 +926,20 @@ LdNamespace1Begin (
                 return_ACPI_STATUS (AE_OK);
             }
         }
+        else if (AE_NOT_FOUND)
+        {
+            /*
+             * One or more prefix NameSegs of the NamePath do not exist
+             * (all of them must exist). Attempt to continue compilation
+             * by setting the current scope to the root.
+             */
+            Node = AcpiGbl_RootNode;
+            Status = AE_OK;
+        }
         else
         {
+            /* Flag all other errors as coming from the ACPICA core */
+
             AslCoreSubsystemError (Op, Status,
                 "Failure from namespace lookup", FALSE);
             return_ACPI_STATUS (Status);
@@ -1043,10 +1066,10 @@ LdNamespace2Begin (
 
     if (Op->Asl.ParseOpcode == PARSEOP_ALIAS)
     {
-        /* Complete the alias node by getting and saving the target node */
-
-        /* First child is the alias target */
-
+        /*
+         * Complete the alias node by getting and saving the target node.
+         * First child is the alias target
+         */
         Arg = Op->Asl.Child;
 
         /* Get the target pathname */
@@ -1070,18 +1093,34 @@ LdNamespace2Begin (
         {
             if (Status == AE_NOT_FOUND)
             {
-                AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
-                    Op->Asl.ExternalName);
+                /* Standalone NameSeg vs. NamePath */
+
+                if (strlen (Arg->Asl.ExternalName) == ACPI_NAME_SIZE)
+                {
+                    AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
+                        Arg->Asl.ExternalName);
+                }
+                else
+                {
+                    AslError (ASL_ERROR, ASL_MSG_NAMEPATH_NOT_EXIST, Op,
+                        Arg->Asl.ExternalName);
+                }
 
+#if 0
+/*
+ * NOTE: Removed 10/2018 to enhance compiler error reporting. No
+ * regressions seen.
+ */
                 /*
                  * The name was not found, go ahead and create it.
                  * This prevents more errors later.
                  */
                 Status = AcpiNsLookup (WalkState->ScopeInfo, Path,
-                    ACPI_TYPE_ANY,
-                    ACPI_IMODE_LOAD_PASS1, ACPI_NS_NO_UPSEARCH,
-                    WalkState, &(Node));
-                return (AE_OK);
+                    ACPI_TYPE_ANY, ACPI_IMODE_LOAD_PASS1,
+                    ACPI_NS_NO_UPSEARCH, WalkState, &Node);
+#endif
+                return (Status);
+/* Removed: return (AE_OK)*/
             }
 
             AslCoreSubsystemError (Op, Status,
index 4f24bb3..70386f8 100644 (file)
@@ -329,7 +329,7 @@ AslSignalHandler (
 
     default:
 
-        printf (ASL_PREFIX "Unknown interrupt signal (%u)\n", Sig);
+        printf (ASL_PREFIX "Unknown interrupt signal (%d)\n", Sig);
         break;
     }
 
index 14e140b..2329718 100644 (file)
@@ -285,7 +285,7 @@ const char                      *AslCompilerMsgs [] =
 /*    ASL_MSG_NON_ASCII */                  "Invalid characters found in file",
 /*    ASL_MSG_NON_ZERO */                   "Operand evaluates to zero",
 /*    ASL_MSG_NOT_EXIST */                  "Object does not exist",
-/*    ASL_MSG_NOT_FOUND */                  "Object not found or not accessible from scope",
+/*    ASL_MSG_NOT_FOUND */                  "Object not found or not accessible from current scope",
 /*    ASL_MSG_NOT_METHOD */                 "Not a control method, cannot invoke",
 /*    ASL_MSG_NOT_PARAMETER */              "Not a parameter, used as local only",
 /*    ASL_MSG_NOT_REACHABLE */              "Object is not accessible from this scope",
@@ -359,7 +359,9 @@ const char                      *AslCompilerMsgs [] =
 /*    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_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"
 };
 
 /* Table compiler */
index 907744a..c932ade 100644 (file)
@@ -362,6 +362,8 @@ typedef enum
     ASL_MSG_UNLOAD,
     ASL_MSG_OFFSET,
     ASL_MSG_LONG_SLEEP,
+    ASL_MSG_PREFIX_NOT_EXIST,
+    ASL_MSG_NAMEPATH_NOT_EXIST,
 
     /* These messages are used by the Data Table compiler only */
 
index bc30fe9..ae80641 100644 (file)
@@ -222,7 +222,7 @@ ApCheckForPredefinedMethod (
 
         if (MethodInfo->NumArguments != 0)
         {
-            sprintf (AslGbl_MsgBuffer, "%s requires %u", Op->Asl.ExternalName, 0);
+            sprintf (AslGbl_MsgBuffer, "%s requires %d", Op->Asl.ExternalName, 0);
 
             AslError (ASL_WARNING, ASL_MSG_RESERVED_ARG_COUNT_HI, Op,
                 AslGbl_MsgBuffer);
index 5273ea8..8b21357 100644 (file)
@@ -718,11 +718,34 @@ XfNamespaceLocateBegin (
             }
             else
             {
-                /* Check for a fully qualified path */
+                /* The NamePath contains multiple NameSegs */
 
-                if (Path[0] == AML_ROOT_PREFIX)
+                if ((OpInfo->Flags & AML_CREATE) ||
+                    (OpInfo->ObjectType == ACPI_TYPE_LOCAL_ALIAS))
                 {
-                    /* Gave full path, the object does not exist */
+                    /*
+                     * The new name is the last parameter. For the
+                     * CreateXXXXField and Alias operators
+                     */
+                    NextOp = Op->Asl.Child;
+                    while (!(NextOp->Asl.CompileFlags & OP_IS_NAME_DECLARATION))
+                    {
+                        NextOp = NextOp->Asl.Next;
+                    }
+
+                    AslError (ASL_ERROR, ASL_MSG_PREFIX_NOT_EXIST, NextOp,
+                        NextOp->Asl.ExternalName);
+                }
+                else if (OpInfo->Flags & AML_NAMED)
+                {
+                    /* The new name is the first parameter */
+
+                    AslError (ASL_ERROR, ASL_MSG_PREFIX_NOT_EXIST, Op,
+                        Op->Asl.ExternalName);
+                }
+                else if (Path[0] == AML_ROOT_PREFIX)
+                {
+                    /* Full namepath from root, the object does not exist */
 
                     AslError (ASL_ERROR, ASL_MSG_NOT_EXIST, Op,
                         Op->Asl.ExternalName);
@@ -730,11 +753,20 @@ XfNamespaceLocateBegin (
                 else
                 {
                     /*
-                     * We can't tell whether it doesn't exist or just
-                     * can't be reached.
+                     * Generic "not found" error. Cannot determine whether it
+                     * doesn't exist or just can't be reached. However, we
+                     * can differentiate between a NameSeg vs. NamePath.
                      */
-                    AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
-                        Op->Asl.ExternalName);
+                    if (strlen (Op->Asl.ExternalName) == ACPI_NAME_SIZE)
+                    {
+                        AslError (ASL_ERROR, ASL_MSG_NOT_FOUND, Op,
+                            Op->Asl.ExternalName);
+                    }
+                    else
+                    {
+                        AslError (ASL_ERROR, ASL_MSG_NAMEPATH_NOT_EXIST, Op,
+                            Op->Asl.ExternalName);
+                    }
                 }
             }
 
index b15d3b9..bd18905 100644 (file)
@@ -236,7 +236,7 @@ DtTrim (
 
     /* Skip lines that start with a space */
 
-    if (!strcmp (String, " "))
+    if (*String == 0 || !strcmp (String, " "))
     {
         ReturnString = UtLocalCacheCalloc (1);
         return (ReturnString);
@@ -258,7 +258,7 @@ DtTrim (
 
     while (End >= Start)
     {
-        if (*End == '\r' || *End == '\n')
+        if (*End == '\n')
         {
             End--;
             continue;
@@ -522,6 +522,7 @@ DtGetNextLine (
     UINT32                  CurrentLineOffset;
     UINT32                  i;
     int                     c;
+    int                     c1;
 
 
     memset (AslGbl_CurrentLineBuffer, 0, AslGbl_LineBufferSize);
@@ -569,6 +570,29 @@ DtGetNextLine (
             c = '\n';
             State = DT_NORMAL_TEXT;
         }
+        else if (c == '\r')
+        {
+            c1 = getc (Handle);
+            if (c1 == '\n')
+            {
+                /*
+                 * Skip the carriage return as if it didn't exist. This is
+                 * onlt meant for input files in DOS format in unix. fopen in
+                 * unix may not support "text mode" and leaves CRLF intact.
+                 */
+                c = '\n';
+            }
+            else
+            {
+                /* This was not a CRLF. Only a CR */
+
+                ungetc(c1, Handle);
+
+                DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL,
+                    "Carriage return without linefeed detected");
+                return (ASL_EOF);
+            }
+        }
 
         switch (State)
         {
index 3f97037..0b196a2 100644 (file)
@@ -1876,6 +1876,62 @@ DtCompileTcpa (
 }
 
 
+/******************************************************************************
+ *
+ * FUNCTION:    DtCompileTpm2Rev3
+ *
+ * PARAMETERS:  PFieldList          - Current field list pointer
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Compile TPM2 revision 3
+ *
+ *****************************************************************************/
+static ACPI_STATUS
+DtCompileTpm2Rev3 (
+    void                    **List)
+{
+    DT_FIELD                **PFieldList = (DT_FIELD **) List;
+    DT_SUBTABLE             *Subtable;
+    ACPI_TABLE_TPM23        *Tpm23Header;
+    DT_SUBTABLE             *ParentTable;
+    ACPI_STATUS             Status = AE_OK;
+
+
+    Status = DtCompileTable (PFieldList, AcpiDmTableInfoTpm23,
+        &Subtable);
+
+    ParentTable = DtPeekSubtable ();
+    DtInsertSubtable (ParentTable, Subtable);
+    Tpm23Header = ACPI_CAST_PTR (ACPI_TABLE_TPM23, ParentTable->Buffer);
+
+    /* Subtable type depends on the StartMethod */
+
+    switch (Tpm23Header->StartMethod)
+    {
+    case ACPI_TPM23_ACPI_START_METHOD:
+
+        /* Subtable specific to to ARM_SMC */
+
+        Status = DtCompileTable (PFieldList, AcpiDmTableInfoTpm23a,
+            &Subtable);
+        if (ACPI_FAILURE (Status))
+        {
+            return (Status);
+        }
+
+        ParentTable = DtPeekSubtable ();
+        DtInsertSubtable (ParentTable, Subtable);
+        break;
+
+    default:
+        break;
+    }
+
+    return (Status);
+}
+
+
 /******************************************************************************
  *
  * FUNCTION:    DtCompileTpm2
@@ -1897,8 +1953,18 @@ DtCompileTpm2 (
     ACPI_TABLE_TPM2         *Tpm2Header;
     DT_SUBTABLE             *ParentTable;
     ACPI_STATUS             Status = AE_OK;
+    ACPI_TABLE_HEADER       *Header;
 
 
+    ParentTable = DtPeekSubtable ();
+
+    Header = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ParentTable->Buffer);
+
+    if (Header->Revision == 3)
+    {
+        return (DtCompileTpm2Rev3 (List));
+    }
+
     /* Compile the main table */
 
     Status = DtCompileTable (PFieldList, AcpiDmTableInfoTpm2,
index 580b47f..325569e 100644 (file)
@@ -1259,7 +1259,6 @@ PrPopDirective (
         AslGbl_DirectiveInfo[Info->Directive].Name,
         Info->Argument, AslGbl_IgnoringThisCodeBlock ? "TRUE" : "FALSE");
 
-    ACPI_FREE (Info);
     return (AE_OK);
 }
 
index c906370..61c187f 100644 (file)
@@ -175,6 +175,12 @@ AcpiDbMethodEnd (
     ACPI_WALK_STATE         *WalkState);
 #endif
 
+#ifdef ACPI_DISASSEMBLER
+static ACPI_PARSE_OBJECT *
+AcpiDbGetDisplayOp (
+    ACPI_WALK_STATE         *WalkState,
+    ACPI_PARSE_OBJECT       *Op);
+#endif
 
 /*******************************************************************************
  *
@@ -274,6 +280,74 @@ AcpiDbSignalBreakPoint (
 }
 
 
+#ifdef ACPI_DISASSEMBLER
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbGetDisplayOp
+ *
+ * PARAMETERS:  WalkState       - Current walk
+ *              Op              - Current executing op (from aml interpreter)
+ *
+ * RETURN:      Opcode to display
+ *
+ * DESCRIPTION: Find the opcode to display during single stepping
+ *
+ ******************************************************************************/
+
+static ACPI_PARSE_OBJECT *
+AcpiDbGetDisplayOp (
+    ACPI_WALK_STATE         *WalkState,
+    ACPI_PARSE_OBJECT       *Op)
+{
+    ACPI_PARSE_OBJECT       *DisplayOp;
+    ACPI_PARSE_OBJECT       *ParentOp;
+
+    DisplayOp = Op;
+    ParentOp = Op->Common.Parent;
+    if (ParentOp)
+    {
+        if ((WalkState->ControlState) &&
+            (WalkState->ControlState->Common.State ==
+                ACPI_CONTROL_PREDICATE_EXECUTING))
+        {
+            /*
+             * We are executing the predicate of an IF or WHILE statement
+             * Search upwards for the containing IF or WHILE so that the
+             * entire predicate can be displayed.
+             */
+            while (ParentOp)
+            {
+                if ((ParentOp->Common.AmlOpcode == AML_IF_OP) ||
+                    (ParentOp->Common.AmlOpcode == AML_WHILE_OP))
+                {
+                    DisplayOp = ParentOp;
+                    break;
+                }
+                ParentOp = ParentOp->Common.Parent;
+            }
+        }
+        else
+        {
+            while (ParentOp)
+            {
+                if ((ParentOp->Common.AmlOpcode == AML_IF_OP)     ||
+                    (ParentOp->Common.AmlOpcode == AML_ELSE_OP)   ||
+                    (ParentOp->Common.AmlOpcode == AML_SCOPE_OP)  ||
+                    (ParentOp->Common.AmlOpcode == AML_METHOD_OP) ||
+                    (ParentOp->Common.AmlOpcode == AML_WHILE_OP))
+                {
+                    break;
+                }
+                DisplayOp = ParentOp;
+                ParentOp = ParentOp->Common.Parent;
+            }
+        }
+    }
+    return DisplayOp;
+}
+#endif
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDbSingleStep
@@ -297,8 +371,6 @@ AcpiDbSingleStep (
     ACPI_PARSE_OBJECT       *Next;
     ACPI_STATUS             Status = AE_OK;
     UINT32                  OriginalDebugLevel;
-    ACPI_PARSE_OBJECT       *DisplayOp;
-    ACPI_PARSE_OBJECT       *ParentOp;
     UINT32                  AmlOffset;
 
 
@@ -394,53 +466,11 @@ AcpiDbSingleStep (
         Next = Op->Common.Next;
         Op->Common.Next = NULL;
 
-
-        DisplayOp = Op;
-        ParentOp = Op->Common.Parent;
-        if (ParentOp)
-        {
-            if ((WalkState->ControlState) &&
-                (WalkState->ControlState->Common.State ==
-                    ACPI_CONTROL_PREDICATE_EXECUTING))
-            {
-                /*
-                 * We are executing the predicate of an IF or WHILE statement
-                 * Search upwards for the containing IF or WHILE so that the
-                 * entire predicate can be displayed.
-                 */
-                while (ParentOp)
-                {
-                    if ((ParentOp->Common.AmlOpcode == AML_IF_OP) ||
-                        (ParentOp->Common.AmlOpcode == AML_WHILE_OP))
-                    {
-                        DisplayOp = ParentOp;
-                        break;
-                    }
-                    ParentOp = ParentOp->Common.Parent;
-                }
-            }
-            else
-            {
-                while (ParentOp)
-                {
-                    if ((ParentOp->Common.AmlOpcode == AML_IF_OP)     ||
-                        (ParentOp->Common.AmlOpcode == AML_ELSE_OP)   ||
-                        (ParentOp->Common.AmlOpcode == AML_SCOPE_OP)  ||
-                        (ParentOp->Common.AmlOpcode == AML_METHOD_OP) ||
-                        (ParentOp->Common.AmlOpcode == AML_WHILE_OP))
-                    {
-                        break;
-                    }
-                    DisplayOp = ParentOp;
-                    ParentOp = ParentOp->Common.Parent;
-                }
-            }
-        }
-
         /* Now we can disassemble and display it */
 
 #ifdef ACPI_DISASSEMBLER
-        AcpiDmDisassemble (WalkState, DisplayOp, ACPI_UINT32_MAX);
+        AcpiDmDisassemble (WalkState, AcpiDbGetDisplayOp (WalkState, Op),
+            ACPI_UINT32_MAX);
 #else
         /*
          * The AML Disassembler is not configured - at least we can
index 038993c..ca2cd47 100644 (file)
@@ -586,6 +586,9 @@ AcpiDsEvalRegionOperands (
         ObjDesc, ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
         ObjDesc->Region.Length));
 
+    Status = AcpiUtAddAddressRange (ObjDesc->Region.SpaceId,
+        ObjDesc->Region.Address, ObjDesc->Region.Length, Node);
+
     /* Now the address and length are valid for this opregion */
 
     ObjDesc->Region.Flags |= AOPOBJ_DATA_VALID;
index 9bc6ecf..4b6e41d 100644 (file)
@@ -448,6 +448,15 @@ AcpiDsLoad2BeginOp (
         }
 #endif
 
+        /*
+         * For name creation opcodes, the full namepath prefix must
+         * exist, except for the final (new) nameseg.
+         */
+        if (WalkState->OpInfo->Flags & AML_NAMED)
+        {
+            Flags |= ACPI_NS_PREFIX_MUST_EXIST;
+        }
+
         /* Add new entry or lookup existing entry */
 
         Status = AcpiNsLookup (WalkState->ScopeInfo, BufferPtr, ObjectType,
index af97c51..11c652e 100644 (file)
@@ -421,6 +421,7 @@ AcpiNsLookup (
     ACPI_OBJECT_TYPE        ThisSearchType;
     UINT32                  SearchParentFlag = ACPI_NS_SEARCH_PARENT;
     UINT32                  LocalFlags;
+    ACPI_INTERPRETER_MODE   LocalInterpreterMode;
 
 
     ACPI_FUNCTION_TRACE (NsLookup);
@@ -670,6 +671,7 @@ AcpiNsLookup (
      */
     ThisSearchType = ACPI_TYPE_ANY;
     CurrentNode = ThisNode;
+
     while (NumSegments && CurrentNode)
     {
         NumSegments--;
@@ -704,6 +706,16 @@ AcpiNsLookup (
             }
         }
 
+        /* Handle opcodes that create a new NameSeg via a full NamePath */
+
+        LocalInterpreterMode = InterpreterMode;
+        if ((Flags & ACPI_NS_PREFIX_MUST_EXIST) && (NumSegments > 0))
+        {
+            /* Every element of the path must exist (except for the final NameSeg) */
+
+            LocalInterpreterMode = ACPI_IMODE_EXECUTE;
+        }
+
         /* Extract one ACPI name from the front of the pathname */
 
         ACPI_MOVE_32_TO_32 (&SimpleName, Path);
@@ -711,11 +723,18 @@ AcpiNsLookup (
         /* Try to find the single (4 character) ACPI name */
 
         Status = AcpiNsSearchAndEnter (SimpleName, WalkState, CurrentNode,
-            InterpreterMode, ThisSearchType, LocalFlags, &ThisNode);
+            LocalInterpreterMode, ThisSearchType, LocalFlags, &ThisNode);
         if (ACPI_FAILURE (Status))
         {
             if (Status == AE_NOT_FOUND)
             {
+#if !defined ACPI_ASL_COMPILER /* Note: iASL reports this error by itself, not needed here */
+                if (Flags & ACPI_NS_PREFIX_MUST_EXIST)
+                {
+                    AcpiOsPrintf (ACPI_MSG_BIOS_ERROR
+                        "Object does not exist: %4.4s\n", &SimpleName);
+                }
+#endif
                 /* Name not found in ACPI namespace */
 
                 ACPI_DEBUG_PRINT ((ACPI_DB_NAMES,
index ef517b5..9625834 100644 (file)
@@ -298,7 +298,7 @@ AcpiPsGetArguments (
          * future. Use of this option can cause problems with AML code that
          * depends upon in-order immediate execution of module-level code.
          */
-        if (AcpiGbl_GroupModuleLevelCode &&
+        if (!AcpiGbl_ExecuteTablesAsMethods &&
             (WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2) &&
             ((WalkState->ParseFlags & ACPI_PARSE_DISASSEMBLE) == 0))
         {
@@ -566,6 +566,7 @@ AcpiPsParseLoop (
     ACPI_PARSE_OBJECT       *Op = NULL;     /* current op */
     ACPI_PARSE_STATE        *ParserState;
     UINT8                   *AmlOpStart = NULL;
+    UINT8                   OpcodeLength;
 
 
     ACPI_FUNCTION_TRACE_PTR (PsParseLoop, WalkState);
@@ -654,7 +655,7 @@ AcpiPsParseLoop (
                  * status to AE_OK to proceed with the table load.
                  */
                 if ((WalkState->ParseFlags & ACPI_PARSE_MODULE_LEVEL) &&
-                    Status == AE_ALREADY_EXISTS)
+                    ((Status == AE_ALREADY_EXISTS) || (Status == AE_NOT_FOUND)))
                 {
                     Status = AE_OK;
                 }
@@ -686,9 +687,20 @@ AcpiPsParseLoop (
                      * the scope op because the parse failure indicates that
                      * the device may not exist.
                      */
-                    ACPI_ERROR ((AE_INFO, "Skip parsing opcode %s",
-                        AcpiPsGetOpcodeName (WalkState->Opcode)));
-                    WalkState->ParserState.Aml = WalkState->Aml + 1;
+                    ACPI_INFO (("Skipping parse of AML opcode: %s (0x%4.4X)",
+                        AcpiPsGetOpcodeName (WalkState->Opcode), WalkState->Opcode));
+
+                    /*
+                     * Determine the opcode length before skipping the opcode.
+                     * An opcode can be 1 byte or 2 bytes in length.
+                     */
+                    OpcodeLength = 1;
+                    if ((WalkState->Opcode & 0xFF00) == AML_EXTENDED_OPCODE)
+                    {
+                        OpcodeLength = 2;
+                    }
+                    WalkState->ParserState.Aml = WalkState->Aml + OpcodeLength;
+
                     WalkState->ParserState.Aml =
                         AcpiPsGetNextPackageEnd(&WalkState->ParserState);
                     WalkState->Aml = WalkState->ParserState.Aml;
index 8d6f81b..ca7ab0a 100644 (file)
@@ -773,7 +773,7 @@ AcpiPsCompleteOp (
              * because there could be correct AML beyond the parts that caused
              * the runtime error.
              */
-            ACPI_ERROR ((AE_INFO, "Ignore error and continue table load"));
+            ACPI_INFO (("Ignoring error and continuing table load"));
             return_ACPI_STATUS (AE_OK);
         }
         return_ACPI_STATUS (Status);
index 0119b68..a956806 100644 (file)
@@ -219,7 +219,7 @@ AcpiLoadTables (
             "While loading namespace from ACPI tables"));
     }
 
-    if (AcpiGbl_ExecuteTablesAsMethods || !AcpiGbl_GroupModuleLevelCode)
+    if (AcpiGbl_ExecuteTablesAsMethods)
     {
         /*
          * If the module-level code support is enabled, initialize the objects
index b774b20..edd108d 100644 (file)
@@ -561,6 +561,8 @@ extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTcpaServer[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTpm2[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTpm2a[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTpm211[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTpm23[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoTpm23a[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoUefi[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoVrtc[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoVrtc0[];
index 1e3db8d..7c2083d 100644 (file)
 #define ACPI_NS_TEMPORARY           0x0040
 #define ACPI_NS_OVERRIDE_IF_FOUND   0x0080
 #define ACPI_NS_EARLY_INIT          0x0100
+#define ACPI_NS_PREFIX_MUST_EXIST   0x0200
 
 /* Flags for AcpiNsWalkNamespace */
 
index aaf284c..27e9aa7 100644 (file)
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20181003
+#define ACPI_CA_VERSION                 0x20181031
 
 #include "acconfig.h"
 #include "actypes.h"
@@ -300,13 +300,6 @@ ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_CopyDsdtLocally, FALSE);
  */
 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_DoNotUseXsdt, FALSE);
 
-/*
- * Optionally support group module level code.
- * NOTE, this is essentially obsolete and will be removed soon
- * (01/2018).
- */
-ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_GroupModuleLevelCode, FALSE);
-
 /*
  * Optionally support module level code by parsing an entire table as
  * a method as it is loaded. Default is TRUE.
index 347a394..19eeecc 100644 (file)
 #define ACPI_STAO_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_STAO,f)
 #define ACPI_TCPA_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_HDR,f)
 #define ACPI_TPM2_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f)
+#define ACPI_TPM23_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM23,f)
 #define ACPI_UEFI_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
 #define ACPI_WAET_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_WAET,f)
 #define ACPI_WDAT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_WDAT,f)
 #define ACPI_TCPA_SERVER_OFFSET(f)      (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_SERVER,f)
 #define ACPI_TPM2A_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_TPM2_TRAILER,f)
 #define ACPI_TPM211_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_TPM2_ARM_SMC,f)
+#define ACPI_TPM23A_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_TPM23_TRAILER,f)
 #define ACPI_VRTC0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_VRTC_ENTRY,f)
 #define ACPI_WDAT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_WDAT_ENTRY,f)
 
index d4c1583..99b466c 100644 (file)
@@ -552,6 +552,34 @@ typedef struct acpi_table_tcpa_server
  *
  ******************************************************************************/
 
+/* Revision 3 */
+
+typedef struct acpi_table_tpm23
+{
+    ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
+    UINT32                  Reserved;
+    UINT64                  ControlAddress;
+    UINT32                  StartMethod;
+
+} ACPI_TABLE_TPM23;
+
+/* Value for StartMethod above */
+
+#define ACPI_TPM23_ACPI_START_METHOD                 2
+
+/*
+ * Optional trailer for revision 3. If start method is 2, there is a 4 byte
+ * reserved area of all zeros.
+ */
+typedef struct acpi_tmp23_trailer
+{
+    UINT32                  Reserved;
+
+} ACPI_TPM23_TRAILER;
+
+
+/* Revision 4 */
+
 typedef struct acpi_table_tpm2
 {
     ACPI_TABLE_HEADER       Header;             /* Common ACPI table header */
index 55003af..3db37ef 100644 (file)
@@ -268,7 +268,7 @@ ApInsertAction (
     CurrentAction++;
     if (CurrentAction > AP_MAX_ACTIONS)
     {
-        fprintf (stderr, "Too many table options (max %u)\n", AP_MAX_ACTIONS);
+        fprintf (stderr, "Too many table options (max %d)\n", AP_MAX_ACTIONS);
         return (-1);
     }
 
index b1781b5..e8ae348 100644 (file)
@@ -255,7 +255,8 @@ usage (
     ACPI_OPTION ("-df",                 "Disable Local fault handler");
     ACPI_OPTION ("-di",                 "Disable execution of STA/INI methods during init");
     ACPI_OPTION ("-do",                 "Disable Operation Region address simulation");
-    ACPI_OPTION ("-dp",                 "Disable TermList parsing for scope objects");
+    ACPI_OPTION ("-dp",                 "Disable loading DSDT/SSDT as a control method\n"
+                  "                      (enable legacy grouping of module-level code)");
     ACPI_OPTION ("-dr",                 "Disable repair of method return values");
     ACPI_OPTION ("-ds",                 "Disable method auto-serialization");
     ACPI_OPTION ("-dt",                 "Disable allocation tracking (performance)");
@@ -265,7 +266,6 @@ usage (
     ACPI_OPTION ("-ef",                 "Enable display of final memory statistics");
     ACPI_OPTION ("-ei",                 "Enable additional tests for ACPICA interfaces");
     ACPI_OPTION ("-el",                 "Enable loading of additional test tables");
-    ACPI_OPTION ("-em",                 "Enable (legacy) grouping of module-level code");
     ACPI_OPTION ("-es",                 "Enable Interpreter Slack Mode");
     ACPI_OPTION ("-et",                 "Enable debug semaphore timeout");
     printf ("\n");
@@ -319,7 +319,7 @@ AeDoOptions (
 
         if (strlen (AcpiGbl_Optarg) > (AE_BUFFER_SIZE -1))
         {
-            printf ("**** The length of command line (%u) exceeded maximum (%u)\n",
+            printf ("**** The length of command line (%u) exceeded maximum (%d)\n",
                 (UINT32) strlen (AcpiGbl_Optarg), (AE_BUFFER_SIZE -1));
             return (-1);
         }
@@ -406,11 +406,6 @@ AeDoOptions (
             AcpiGbl_LoadTestTables = TRUE;
             break;
 
-        case 'm':
-
-            AcpiGbl_GroupModuleLevelCode = TRUE;
-            break;
-
         case 's':
 
             AcpiGbl_EnableInterpreterSlack = TRUE;
@@ -625,7 +620,6 @@ main (
     /* Module-level code. Use new architecture */
 
     AcpiGbl_ExecuteTablesAsMethods = TRUE;
-    AcpiGbl_GroupModuleLevelCode = FALSE;
 
     /*
      * Initialize ACPICA and start debugger thread.
index 4137f7b..a3dcdf8 100644 (file)
@@ -675,18 +675,10 @@ AeLoadTables (
      * for an existing name.
      */
     Status = AcpiInstallMethod (MethodCode);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("%s, Could not install method\n",
-            AcpiFormatException (Status));
-    }
+    ACPI_CHECK_OK (AcpiInstallMethod, Status);
 
     Status = AcpiInstallMethod (MethodCode);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("%s, Could not install method\n",
-            AcpiFormatException (Status));
-    }
+    ACPI_CHECK_OK (AcpiInstallMethod, Status);
 
     return (AE_OK);
 }
index 57b421e..70e34d6 100644 (file)
@@ -240,7 +240,6 @@ main (
     /* Set flags so that the interpreter is not used */
 
     AcpiGbl_ExecuteTablesAsMethods = FALSE;
-    AcpiGbl_GroupModuleLevelCode = TRUE;
 
     Status = AcpiInitializeSubsystem ();
     ACPI_CHECK_OK (AcpiInitializeSubsystem, Status);
index 031d715..4e1685e 100644 (file)
@@ -680,6 +680,7 @@ ACPI_TYPED_IDENTIFIER_TABLE           AcpiIdentifiers[] = {
     {"ACPI_TABLE_STAO",                     SRC_TYPE_STRUCT},
     {"ACPI_TABLE_TCPA",                     SRC_TYPE_STRUCT},
     {"ACPI_TABLE_TPM2",                     SRC_TYPE_STRUCT},
+    {"ACPI_TABLE_TPM23",                    SRC_TYPE_STRUCT},
     {"ACPI_TABLE_UEFI",                     SRC_TYPE_STRUCT},
     {"ACPI_TABLE_WAET",                     SRC_TYPE_STRUCT},
     {"ACPI_TABLE_WDAT",                     SRC_TYPE_STRUCT},
@@ -833,6 +834,7 @@ ACPI_TYPED_IDENTIFIER_TABLE           AcpiIdentifiers[] = {
     {"ACPI_TABLE_TCPA_CLIENT",              SRC_TYPE_STRUCT},
     {"ACPI_TABLE_TCPA_SERVER",              SRC_TYPE_STRUCT},
     {"ACPI_TPM2_TRAILER",                   SRC_TYPE_STRUCT},
+    {"ACPI_TPM23_TRAILER",                  SRC_TYPE_STRUCT},
     {"ACPI_TPM2_ARM_SMC",                   SRC_TYPE_STRUCT},
     {"ACPI_WDAT_ENTRY",                     SRC_TYPE_STRUCT},
 
index 5fc06e9..a31371c 100644 (file)
@@ -522,7 +522,8 @@ acpi_attach(device_t dev)
     AcpiGbl_DoNotUseXsdt = acpi_ignore_xsdt ? TRUE : FALSE;
     AcpiGbl_EnableAmlDebugObject = acpi_debug_objects ? TRUE : FALSE;
     AcpiGbl_EnableInterpreterSlack = acpi_interpreter_slack ? TRUE : FALSE;
-    AcpiGbl_GroupModuleLevelCode = acpi_group_module_level_code ? TRUE : FALSE;
+    AcpiGbl_ExecuteTablesAsMethods = acpi_group_module_level_code ?
+       FALSE : TRUE;
     AcpiGbl_Use32BitFadtAddresses = acpi_fadt_addr32 ? TRUE : FALSE;
     AcpiGbl_Use32BitFacsAddresses = acpi_facs_addr32 ? TRUE : FALSE;
 
index d3ee5f2..160bf12 100644 (file)
@@ -28,7 +28,7 @@
 .\" OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd June 2, 2018
+.Dd November 1, 2018
 .Dt ACPIEXEC 8
 .Os
 .Sh NAME
@@ -52,7 +52,8 @@ Disable execution of STA/INI methods during init.
 .It Fl do
 Disable Operation Region address simulation.
 .It Fl dp
-Disable TermList parsing for scope objects.
+Disable loading DSDT/SSDT as a control method
+(enable legacy grouping of module-level code).
 .It Fl dr
 Disable repair of method return values.
 .It Fl ds
@@ -67,8 +68,6 @@ Enable display of final memory statistics.
 Enable additional tests for ACPICA interfaces.
 .It Fl el
 Enable loading of additional test tables.
-.It Fl em
-Enable (legacy) grouping of module-level code.
 .It Fl es
 Enable Interpreter Slack Mode.
 .It Fl et