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/82c738a9519a
branches:  trunk
changeset: 365505:82c738a9519a
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Aug 18 14:17:55 2018 +0000

description:
merge conflicts

diffstat:

 sys/external/bsd/acpica/dist/compiler/aslload.c    |  85 ++-------------------
 sys/external/bsd/acpica/dist/compiler/asloptions.c |   2 +-
 sys/external/bsd/acpica/dist/debugger/dbinput.c    |  10 ++-
 sys/external/bsd/acpica/dist/debugger/dbmethod.c   |   7 +-
 sys/external/bsd/acpica/dist/debugger/dbnames.c    |   1 +
 sys/external/bsd/acpica/dist/executer/exconfig.c   |  21 +++++
 sys/external/bsd/acpica/dist/hardware/hwregs.c     |  11 ++-
 sys/external/bsd/acpica/dist/hardware/hwsleep.c    |  19 +++-
 sys/external/bsd/acpica/dist/hardware/hwxfsleep.c  |  12 +-
 sys/external/bsd/acpica/dist/include/acdisasm.h    |   1 +
 sys/external/bsd/acpica/dist/include/acexcep.h     |   7 +
 sys/external/bsd/acpica/dist/include/aclocal.h     |   2 +-
 sys/external/bsd/acpica/dist/include/acnamesp.h    |  23 +++--
 sys/external/bsd/acpica/dist/include/acoutput.h    |   4 +-
 sys/external/bsd/acpica/dist/include/acpixf.h      |   2 +-
 sys/external/bsd/acpica/dist/include/acutils.h     |   4 +
 sys/external/bsd/acpica/dist/namespace/nsaccess.c  |  23 ++++-
 sys/external/bsd/acpica/dist/namespace/nsdump.c    |   4 +
 sys/external/bsd/acpica/dist/namespace/nseval.c    |   4 +-
 sys/external/bsd/acpica/dist/namespace/nsinit.c    |  82 ++++++++++++++++-----
 sys/external/bsd/acpica/dist/tables/tbdata.c       |   4 +-
 sys/external/bsd/acpica/dist/utilities/utdelete.c  |   2 +-
 22 files changed, 192 insertions(+), 138 deletions(-)

diffs (truncated from 729 to 300 lines):

diff -r a1a67a419557 -r 82c738a9519a sys/external/bsd/acpica/dist/compiler/aslload.c
--- a/sys/external/bsd/acpica/dist/compiler/aslload.c   Sat Aug 18 12:00:11 2018 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslload.c   Sat Aug 18 14:17:55 2018 +0000
@@ -125,7 +125,11 @@
 
     /* Dump the namespace if debug is enabled */
 
-    AcpiNsDumpTables (ACPI_NS_ALL, ACPI_UINT32_MAX);
+    if (AcpiDbgLevel & ACPI_LV_TABLES)
+    {
+        AcpiNsDumpTables (ACPI_NS_ALL, ACPI_UINT32_MAX);
+    }
+
     ACPI_FREE (WalkState);
     return (AE_OK);
 }
@@ -209,8 +213,7 @@
                     return (Status);
                 }
                 else if (Status == AE_ALREADY_EXISTS &&
-                    (Node->Flags & ANOBJ_IS_EXTERNAL) &&
-                    Node->OwnerId != WalkState->OwnerId)
+                    (Node->Flags & ANOBJ_IS_EXTERNAL))
                 {
                     Node->Type = (UINT8) ACPI_TYPE_LOCAL_REGION_FIELD;
                 }
@@ -362,7 +365,6 @@
     ACPI_PARSE_OBJECT       *Arg;
     UINT32                  i;
     BOOLEAN                 ForceNewScope = FALSE;
-    ACPI_OWNER_ID           OwnerId = 0;
     const ACPI_OPCODE_INFO  *OpInfo;
     ACPI_PARSE_OBJECT       *ParentOp;
 
@@ -373,23 +375,6 @@
     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Op %p [%s]\n",
         Op, Op->Asl.ParseOpName));
 
-    if (Op->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK)
-    {
-        /*
-         * Allocate an OwnerId for this block. This helps identify the owners
-         * of each namespace node. This is used in determining whether if
-         * certain external declarations cause redefinition errors.
-         */
-        Status = AcpiUtAllocateOwnerId (&OwnerId);
-        WalkState->OwnerId = OwnerId;
-        if (ACPI_FAILURE (Status))
-        {
-            AslCoreSubsystemError (Op, Status,
-                "Failure to allocate owner ID to this definition block.", FALSE);
-            return_ACPI_STATUS (Status);
-        }
-    }
-
     /*
      * We are only interested in opcodes that have an associated name
      * (or multiple names)
@@ -765,9 +750,7 @@
             {
                 /*
                  * Allow one create on an object or segment that was
-                 * previously declared External only if WalkState->OwnerId and
-                 * Node->OwnerId are different (meaning that the current WalkState
-                 * and the Node are in different tables).
+                 * previously declared External
                  */
                 Node->Flags &= ~ANOBJ_IS_EXTERNAL;
                 Node->Type = (UINT8) ObjectType;
@@ -784,18 +767,6 @@
                 }
 
                 Status = AE_OK;
-
-                if (Node->OwnerId == WalkState->OwnerId &&
-                    !(Node->Flags & IMPLICIT_EXTERNAL))
-                {
-                    AslDualParseOpError (ASL_WARNING, ASL_MSG_EXTERN_COLLISION, Op,
-                        Op->Asl.ExternalName, ASL_MSG_EXTERN_FOUND_HERE, Node->Op,
-                        Node->Op->Asl.ExternalName);
-                }
-                if (Node->Flags & IMPLICIT_EXTERNAL)
-                {
-                    Node->Flags &= ~IMPLICIT_EXTERNAL;
-                }
             }
             else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) &&
                      (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
@@ -803,53 +774,15 @@
                 /*
                  * Allow externals in same scope as the definition of the
                  * actual object. Similar to C. Allows multiple definition
-                 * blocks that refer to each other in the same file. However,
-                 * do not allow name declaration and an external declaration
-                 * within the same table. This is considered a re-declaration.
+                 * blocks that refer to each other in the same file.
                  */
                 Status = AE_OK;
-
-                if (Node->OwnerId == WalkState->OwnerId)
-                {
-                    AslDualParseOpError (ASL_WARNING, ASL_MSG_EXTERN_COLLISION, Op,
-                        Op->Asl.ExternalName, ASL_MSG_EXTERN_FOUND_HERE, Node->Op,
-                        Node->Op->Asl.ExternalName);
-                }
             }
             else if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
                      (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) &&
                      (ObjectType == ACPI_TYPE_ANY))
             {
-                /*
-                 * Allow update of externals of unknown type.
-                 * In the case that multiple definition blocks are being
-                 * parsed, updating the OwnerId allows enables subsequent calls
-                 * of this method to understand which table the most recent
-                 * external declaration was seen. Without this OwnerId update,
-                 * code like the following is allowed to compile:
-                 *
-                 * DefinitionBlock("externtest.aml", "DSDT", 0x02, "Intel", "Many", 0x00000001)
-                 * {
-                 *     External(ERRS,methodobj)
-                 *     Method (MAIN)
-                 *     {
-                 *         Name(NUM2, 0)
-                 *         ERRS(1,2,3)
-                 *     }
-                 * }
-                 *
-                 * DefinitionBlock("externtest.aml", "SSDT", 0x02, "Intel", "Many", 0x00000001)
-                 * {
-                 *     if (0)
-                 *     {
-                 *         External(ERRS,methodobj)
-                 *     }
-                 *     Method (ERRS,3)
-                 *     {}
-                 *
-                 * }
-                 */
-                Node->OwnerId = WalkState->OwnerId;
+                /* Allow update of externals of unknown type. */
 
                 if (AcpiNsOpensScope (ActualObjectType))
                 {
diff -r a1a67a419557 -r 82c738a9519a sys/external/bsd/acpica/dist/compiler/asloptions.c
--- a/sys/external/bsd/acpica/dist/compiler/asloptions.c        Sat Aug 18 12:00:11 2018 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asloptions.c        Sat Aug 18 14:17:55 2018 +0000
@@ -972,7 +972,7 @@
      * Process all lines in the response file. There must be one complete
      * option per line
      */
-    while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ResponseFile))
+    while (fgets (StringBuffer, ASL_STRING_BUFFER_SIZE, ResponseFile))
     {
         /* Compress all tokens, allowing us to use a single argv entry */
 
diff -r a1a67a419557 -r 82c738a9519a sys/external/bsd/acpica/dist/debugger/dbinput.c
--- a/sys/external/bsd/acpica/dist/debugger/dbinput.c   Sat Aug 18 12:00:11 2018 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbinput.c   Sat Aug 18 14:17:55 2018 +0000
@@ -861,7 +861,11 @@
     case CMD_DISASSEMBLE:
     case CMD_DISASM:
 
+#ifdef ACPI_DISASSEMBLER
         (void) AcpiDbDisassembleMethod (AcpiGbl_DbArgs[1]);
+#else
+        AcpiOsPrintf ("The AML Disassembler is not configured/present\n");
+#endif
         break;
 
     case CMD_DUMP:
@@ -975,7 +979,11 @@
 
     case CMD_LIST:
 
-        AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op);
+#ifdef ACPI_DISASSEMBLER
+        AcpiDbDisassembleAml (AcpiGbl_DbArgs[1], Op);;
+#else
+        AcpiOsPrintf ("The AML Disassembler is not configured/present\n");
+#endif
         break;
 
     case CMD_LOCKS:
diff -r a1a67a419557 -r 82c738a9519a sys/external/bsd/acpica/dist/debugger/dbmethod.c
--- a/sys/external/bsd/acpica/dist/debugger/dbmethod.c  Sat Aug 18 12:00:11 2018 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbmethod.c  Sat Aug 18 14:17:55 2018 +0000
@@ -285,6 +285,7 @@
 }
 
 
+#ifdef ACPI_DISASSEMBLER
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDbDisassembleAml
@@ -318,9 +319,7 @@
         NumStatements = strtoul (Statements, NULL, 0);
     }
 
-#ifdef ACPI_DISASSEMBLER
     AcpiDmDisassemble (NULL, Op, NumStatements);
-#endif
 }
 
 
@@ -403,8 +402,6 @@
     WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
 
     Status = AcpiPsParseAml (WalkState);
-
-#ifdef ACPI_DISASSEMBLER
     (void) AcpiDmParseDeferredOps (Op);
 
     /* Now we can disassemble the method */
@@ -412,7 +409,6 @@
     AcpiGbl_DmOpt_Verbose = FALSE;
     AcpiDmDisassemble (NULL, Op, 0);
     AcpiGbl_DmOpt_Verbose = TRUE;
-#endif
 
     AcpiPsDeleteParseTree (Op);
 
@@ -423,6 +419,7 @@
     AcpiUtReleaseOwnerId (&ObjDesc->Method.OwnerId);
     return (AE_OK);
 }
+#endif
 
 
 /*******************************************************************************
diff -r a1a67a419557 -r 82c738a9519a sys/external/bsd/acpica/dist/debugger/dbnames.c
--- a/sys/external/bsd/acpica/dist/debugger/dbnames.c   Sat Aug 18 12:00:11 2018 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbnames.c   Sat Aug 18 14:17:55 2018 +0000
@@ -414,6 +414,7 @@
     }
     else
     {
+        Info.Count = 0;
         Info.OwnerId = ACPI_OWNER_ID_MAX;
         Info.DebugLevel = ACPI_UINT32_MAX;
         Info.DisplayType = ACPI_DISPLAY_SUMMARY | ACPI_DISPLAY_SHORT;
diff -r a1a67a419557 -r 82c738a9519a sys/external/bsd/acpica/dist/executer/exconfig.c
--- a/sys/external/bsd/acpica/dist/executer/exconfig.c  Sat Aug 18 12:00:11 2018 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exconfig.c  Sat Aug 18 14:17:55 2018 +0000
@@ -233,6 +233,11 @@
         return_ACPI_STATUS (Status);
     }
 
+    /* Complete the initialization/resolution of package objects */
+
+    Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT,
+        ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL);
+
     /* Parameter Data (optional) */
 
     if (ParameterNode)
@@ -506,6 +511,11 @@
         return_ACPI_STATUS (Status);
     }
 
+    /* Complete the initialization/resolution of package objects */
+
+    Status = AcpiNsWalkNamespace (ACPI_TYPE_PACKAGE, ACPI_ROOT_OBJECT,
+        ACPI_UINT32_MAX, 0, AcpiNsInitOnePackage, NULL, NULL, NULL);
+
     /* Store the DdbHandle into the Target operand */
 
     Status = AcpiExStore (DdbHandle, Target, WalkState);
@@ -559,6 +569,17 @@
         "Received request to unload an ACPI table"));
 
     /*
+     * May 2018: Unload is no longer supported for the following reasons:
+     * 1) A correct implementation on some hosts may not be possible.
+     * 2) Other ACPI implementations do not correctly/fully support it.
+     * 3) It requires host device driver support which does not exist.
+     *    (To properly support namespace unload out from underneath.)
+     * 4) This AML operator has never been seen in the field.
+     */
+    ACPI_EXCEPTION ((AE_INFO, AE_NOT_IMPLEMENTED,
+        "AML Unload operator is not supported"));
+
+    /*
      * Validate the handle
      * Although the handle is partially validated in AcpiExReconfiguration()
      * when it calls AcpiExResolveOperands(), the handle is more completely
diff -r a1a67a419557 -r 82c738a9519a sys/external/bsd/acpica/dist/hardware/hwregs.c
--- a/sys/external/bsd/acpica/dist/hardware/hwregs.c    Sat Aug 18 12:00:11 2018 +0000
+++ b/sys/external/bsd/acpica/dist/hardware/hwregs.c    Sat Aug 18 14:17:55 2018 +0000
@@ -616,13 +616,20 @@
     case ACPI_REGISTER_PM2_CONTROL:          /* 8-bit access */
 
         Status = AcpiHwRead (&Value64, &AcpiGbl_FADT.XPm2ControlBlock);
-        Value = (UINT32) Value64;
+        if (ACPI_SUCCESS (Status))
+        {
+            Value = (UINT32) Value64;
+        }
         break;
 



Home | Main Index | Thread Index | Old Index