Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/acpica/dist merge conflicts



details:   https://anonhg.NetBSD.org/src/rev/67c008e2c3e5
branches:  trunk
changeset: 455346:67c008e2c3e5
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Oct 15 16:13:39 2019 +0000

description:
merge conflicts

diffstat:

 sys/external/bsd/acpica/dist/compiler/aslcompile.c       |   30 +-
 sys/external/bsd/acpica/dist/compiler/aslcompiler.h      |   22 +-
 sys/external/bsd/acpica/dist/compiler/aslerror.c         |   12 +-
 sys/external/bsd/acpica/dist/compiler/aslfiles.c         |    6 +-
 sys/external/bsd/acpica/dist/compiler/aslload.c          |   88 +++++-
 sys/external/bsd/acpica/dist/compiler/asloptions.c       |    5 +
 sys/external/bsd/acpica/dist/compiler/aslsupport.l       |   18 +-
 sys/external/bsd/acpica/dist/compiler/aslutils.c         |  187 +++++++++---
 sys/external/bsd/acpica/dist/compiler/aslwalks.c         |  222 +++++++++++++-
 sys/external/bsd/acpica/dist/compiler/aslxref.c          |   47 ++-
 sys/external/bsd/acpica/dist/compiler/dtcompile.c        |   84 +++--
 sys/external/bsd/acpica/dist/compiler/dtcompilerparser.y |    9 +-
 sys/external/bsd/acpica/dist/compiler/dtfield.c          |    4 +-
 sys/external/bsd/acpica/dist/debugger/dbinput.c          |   10 +-
 sys/external/bsd/acpica/dist/debugger/dbmethod.c         |    5 +
 sys/external/bsd/acpica/dist/events/evxface.c            |    2 +-
 sys/external/bsd/acpica/dist/executer/exconfig.c         |   14 +-
 sys/external/bsd/acpica/dist/executer/exdump.c           |    6 +-
 sys/external/bsd/acpica/dist/include/acglobal.h          |    1 -
 sys/external/bsd/acpica/dist/include/aclocal.h           |    4 +-
 sys/external/bsd/acpica/dist/include/acnamesp.h          |    4 -
 sys/external/bsd/acpica/dist/include/acpiosxf.h          |    1 +
 sys/external/bsd/acpica/dist/include/acpixf.h            |   14 +-
 sys/external/bsd/acpica/dist/include/actypes.h           |   22 +-
 sys/external/bsd/acpica/dist/include/acutils.h           |    9 +-
 sys/external/bsd/acpica/dist/namespace/nsaccess.c        |   59 +++-
 sys/external/bsd/acpica/dist/namespace/nsdump.c          |    2 +-
 sys/external/bsd/acpica/dist/namespace/nseval.c          |  210 --------------
 sys/external/bsd/acpica/dist/namespace/nsinit.c          |   51 +--
 sys/external/bsd/acpica/dist/namespace/nsrepair2.c       |    2 +-
 sys/external/bsd/acpica/dist/tables/tbdata.c             |   14 +-
 sys/external/bsd/acpica/dist/tables/tbxfload.c           |    7 +
 sys/external/bsd/acpica/dist/tools/acpidump/apfiles.c    |   11 +-
 sys/external/bsd/acpica/dist/utilities/utdebug.c         |    4 +-
 sys/external/bsd/acpica/dist/utilities/utosi.c           |    3 +-
 35 files changed, 730 insertions(+), 459 deletions(-)

diffs (truncated from 2137 to 300 lines):

diff -r f31ad71f1a3f -r 67c008e2c3e5 sys/external/bsd/acpica/dist/compiler/aslcompile.c
--- a/sys/external/bsd/acpica/dist/compiler/aslcompile.c        Tue Oct 15 16:07:21 2019 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompile.c        Tue Oct 15 16:13:39 2019 +0000
@@ -116,7 +116,6 @@
         if (AslGbl_PreprocessOnly)
         {
             UtEndEvent (Event);
-            CmCleanupAndExit ();
             return (AE_OK);
         }
     }
@@ -746,10 +745,11 @@
  *
  ******************************************************************************/
 
-void
+int
 CmCleanupAndExit (
     void)
 {
+    int                     Status = 0;
     BOOLEAN                 DeleteAmlFile = FALSE;
     ASL_GLOBAL_FILE_NODE    *CurrentFileNode = AslGbl_FilesList;
 
@@ -808,20 +808,38 @@
     UtDisplaySummary (ASL_FILE_STDOUT);
 
     /*
-     * We will delete the AML file if there are errors and the
-     * force AML output option has not been used.
+     * Delete the AML file if there are errors and the force AML output option
+     * (-f) has not been used.
+     *
+     * Return -1 as a status of the compiler if no AML files are generated. If
+     * the AML file is generated in the presence of errors, return 0. In the
+     * latter case, the errors were ignored by the user so the compilation is
+     * considered successful.
      */
-    if (AslGbl_ParserErrorDetected || ((AslGbl_ExceptionCount[ASL_ERROR] > 0) &&
+    if (AslGbl_ParserErrorDetected || AslGbl_PreprocessOnly ||
+        ((AslGbl_ExceptionCount[ASL_ERROR] > 0) &&
         (!AslGbl_IgnoreErrors) &&
         AslGbl_Files[ASL_FILE_AML_OUTPUT].Handle))
     {
         DeleteAmlFile = TRUE;
+        Status = -1;
     }
 
     /* Close all open files */
 
     while (CurrentFileNode)
     {
+        /*
+         * Set the program return status based on file errors. If there are any
+         * errors and during compilation, the command is not considered
+         * successful.
+         */
+        if (Status != -1 && !AslGbl_IgnoreErrors &&
+            CurrentFileNode->ParserErrorDetected)
+        {
+            Status = -1;
+        }
+
         switch  (FlSwitchFileSet (CurrentFileNode->Files[ASL_FILE_INPUT].Filename))
         {
             case SWITCH_TO_SAME_FILE:
@@ -845,6 +863,8 @@
     {
         UtDeleteLocalCaches ();
     }
+
+    return (Status);
 }
 
 
diff -r f31ad71f1a3f -r 67c008e2c3e5 sys/external/bsd/acpica/dist/compiler/aslcompiler.h
--- a/sys/external/bsd/acpica/dist/compiler/aslcompiler.h       Tue Oct 15 16:07:21 2019 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompiler.h       Tue Oct 15 16:13:39 2019 +0000
@@ -158,7 +158,7 @@
 CmDoOutputFiles (
     void);
 
-void
+int
 CmCleanupAndExit (
     void);
 
@@ -944,6 +944,7 @@
 FlCloseFile (
     UINT32                  FileId);
 
+ACPI_PRINTF_LIKE (2)
 void
 FlPrintFile (
     UINT32                  FileId,
@@ -997,10 +998,6 @@
 FlGetCurrentFileNode (
     void);
 
-BOOLEAN
-FlInputFileExists (
-    char                    *InputFilename);
-
 
 /*
  * aslhwmap - hardware map summary
@@ -1091,6 +1088,7 @@
 /*
  * aslutils - common compiler utilities
  */
+ACPI_PRINTF_LIKE(2)
 void
 DbgPrint (
     UINT32                  Type,
@@ -1185,6 +1183,10 @@
     char                    *ExternalName,
     char                    **ConvertedName);
 
+BOOLEAN
+UtNameContainsAllPrefix (
+    ACPI_PARSE_OBJECT       *Op);
+
 void
 UtAttachNamepathToOwner (
     ACPI_PARSE_OBJECT       *Op,
@@ -1200,6 +1202,15 @@
 UtDoConstant (
     char                    *String);
 
+char *
+AcpiUtStrdup (
+    char                    *String);
+
+char *
+AcpiUtStrcat (
+    char                    *String1,
+    char                    *String2);
+
 
 /*
  * asluuid - UUID support
@@ -1501,6 +1512,7 @@
 /*
  * ASL/ASL+ converter debug
  */
+ACPI_PRINTF_LIKE (1)
 void
 CvDbgPrint (
     char                    *Fmt,
diff -r f31ad71f1a3f -r 67c008e2c3e5 sys/external/bsd/acpica/dist/compiler/aslerror.c
--- a/sys/external/bsd/acpica/dist/compiler/aslerror.c  Tue Oct 15 16:07:21 2019 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslerror.c  Tue Oct 15 16:13:39 2019 +0000
@@ -761,16 +761,8 @@
             return;
         }
 
-       if (!FlInputFileExists (Filename))
-       {
-            /*
-             * This means that this file is an include file. Record the .src
-             * file as the error message source because this file is not in
-             * the global file list.
-             */
-            Enode->SourceFilename =
-                FileNode->Files[ASL_FILE_SOURCE_OUTPUT].Filename;
-       }
+        Enode->SourceFilename =
+            FileNode->Files[ASL_FILE_SOURCE_OUTPUT].Filename;
     }
 }
 
diff -r f31ad71f1a3f -r 67c008e2c3e5 sys/external/bsd/acpica/dist/compiler/aslfiles.c
--- a/sys/external/bsd/acpica/dist/compiler/aslfiles.c  Tue Oct 15 16:07:21 2019 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslfiles.c  Tue Oct 15 16:13:39 2019 +0000
@@ -55,6 +55,10 @@
     ACPI_PARSE_OBJECT       *Op,
     char                    *Filename);
 
+static BOOLEAN
+FlInputFileExists (
+    char                    *InputFilename);
+
 #ifdef ACPI_OBSOLETE_FUNCTIONS
 ACPI_STATUS
 FlParseInputPathname (
@@ -142,7 +146,7 @@
  *
  ******************************************************************************/
 
-BOOLEAN
+static BOOLEAN
 FlInputFileExists (
     char                    *Filename)
 {
diff -r f31ad71f1a3f -r 67c008e2c3e5 sys/external/bsd/acpica/dist/compiler/aslload.c
--- a/sys/external/bsd/acpica/dist/compiler/aslload.c   Tue Oct 15 16:07:21 2019 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslload.c   Tue Oct 15 16:13:39 2019 +0000
@@ -56,6 +56,7 @@
 
 static ACPI_STATUS
 LdLoadFieldElements (
+    UINT32                  AmlType,
     ACPI_PARSE_OBJECT       *Op,
     ACPI_WALK_STATE         *WalkState);
 
@@ -82,6 +83,10 @@
     UINT32                  Level,
     void                    *Context);
 
+static void
+LdCheckSpecialNames (
+    ACPI_NAMESPACE_NODE     *Node,
+    ACPI_PARSE_OBJECT       *Op);
 
 /*******************************************************************************
  *
@@ -139,7 +144,8 @@
  *
  * FUNCTION:    LdLoadFieldElements
  *
- * PARAMETERS:  Op              - Parent node (Field)
+ * PARAMETERS:  AmlType         - Type to search
+ *              Op              - Parent node (Field)
  *              WalkState       - Current walk state
  *
  * RETURN:      Status
@@ -151,14 +157,33 @@
 
 static ACPI_STATUS
 LdLoadFieldElements (
+    UINT32                  AmlType,
     ACPI_PARSE_OBJECT       *Op,
     ACPI_WALK_STATE         *WalkState)
 {
     ACPI_PARSE_OBJECT       *Child = NULL;
+    ACPI_PARSE_OBJECT       *SourceRegion;
     ACPI_NAMESPACE_NODE     *Node;
     ACPI_STATUS             Status;
 
 
+    SourceRegion = UtGetArg (Op, 0);
+    if (SourceRegion)
+    {
+        Status = AcpiNsLookup (WalkState->ScopeInfo,
+            SourceRegion->Asl.Value.String,
+            AmlType, ACPI_IMODE_EXECUTE,
+            ACPI_NS_DONT_OPEN_SCOPE, NULL, &Node);
+        if (Status == AE_NOT_FOUND)
+        {
+            /*
+             * If the named object is not found, it means that it is either a
+             * forward reference or the named object does not exist.
+             */
+            SourceRegion->Asl.CompileFlags |= OP_NOT_FOUND_DURING_LOAD;
+        }
+    }
+
     /* Get the first named field element */
 
     switch (Op->Asl.AmlOpcode)
@@ -380,12 +405,16 @@
      */
     switch (Op->Asl.AmlOpcode)
     {
+    case AML_INDEX_FIELD_OP:
+
+        Status = LdLoadFieldElements (ACPI_TYPE_LOCAL_REGION_FIELD, Op, WalkState);
+        return (Status);
+
     case AML_BANK_FIELD_OP:
-    case AML_INDEX_FIELD_OP:
     case AML_FIELD_OP:
 
-        Status = LdLoadFieldElements (Op, WalkState);
-        break;
+        Status = LdLoadFieldElements (ACPI_TYPE_REGION, Op, WalkState);
+        return (Status);
 
     case AML_INT_CONNECTION_OP:
 
@@ -449,8 +478,7 @@
          * We only want references to named objects:
          *      Store (2, WXYZ) -> Attempt to resolve the name
          */
-        if ((OpInfo->Class == AML_CLASS_NAMED_OBJECT) &&
-            (OpInfo->Type != AML_TYPE_NAMED_FIELD))
+        if (OpInfo->Class == AML_CLASS_NAMED_OBJECT)
         {
             return (AE_OK);
         }
@@ -840,6 +868,10 @@
         }
     }
 
+    /* Check special names like _WAK and _PTS */
+
+    LdCheckSpecialNames (Node, Op);
+
     if (ForceNewScope)
     {



Home | Main Index | Thread Index | Old Index