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/486c4afdb9cd
branches:  trunk
changeset: 450902:486c4afdb9cd
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Apr 29 01:18:06 2019 +0000

description:
merge conflicts

diffstat:

 sys/external/bsd/acpica/dist/common/dmtbdump.c                       |    2 +-
 sys/external/bsd/acpica/dist/common/dmtbinfo.c                       |    2 +-
 sys/external/bsd/acpica/dist/compiler/aslanalyze.c                   |   16 +-
 sys/external/bsd/acpica/dist/compiler/aslcompile.c                   |  185 +++++-
 sys/external/bsd/acpica/dist/compiler/aslcompiler.h                  |   67 ++-
 sys/external/bsd/acpica/dist/compiler/aslcompiler.l                  |   13 +-
 sys/external/bsd/acpica/dist/compiler/aslerror.c                     |   30 +-
 sys/external/bsd/acpica/dist/compiler/aslfileio.c                    |    6 +-
 sys/external/bsd/acpica/dist/compiler/aslfiles.c                     |  255 +++++++++-
 sys/external/bsd/acpica/dist/compiler/aslload.c                      |   20 +-
 sys/external/bsd/acpica/dist/compiler/asllookup.c                    |    2 +-
 sys/external/bsd/acpica/dist/compiler/aslopcodes.c                   |    2 +-
 sys/external/bsd/acpica/dist/compiler/aslopt.c                       |   14 +-
 sys/external/bsd/acpica/dist/compiler/asloptions.c                   |    3 +-
 sys/external/bsd/acpica/dist/compiler/aslpredef.c                    |   10 +-
 sys/external/bsd/acpica/dist/compiler/aslprepkg.c                    |    2 +-
 sys/external/bsd/acpica/dist/compiler/aslsupport.l                   |   16 +-
 sys/external/bsd/acpica/dist/compiler/asltree.c                      |   72 ++-
 sys/external/bsd/acpica/dist/compiler/aslutils.c                     |  160 +++++-
 sys/external/bsd/acpica/dist/compiler/aslwalks.c                     |    2 +-
 sys/external/bsd/acpica/dist/compiler/aslxref.c                      |  152 +++++-
 sys/external/bsd/acpica/dist/compiler/dtcompile.c                    |   17 +-
 sys/external/bsd/acpica/dist/compiler/dtfield.c                      |    2 +-
 sys/external/bsd/acpica/dist/compiler/dtparser.y                     |    2 +-
 sys/external/bsd/acpica/dist/compiler/dtsubtable.c                   |    2 +-
 sys/external/bsd/acpica/dist/compiler/dttable.c                      |    2 +-
 sys/external/bsd/acpica/dist/compiler/dtutils.c                      |    2 +-
 sys/external/bsd/acpica/dist/compiler/prparser.y                     |    2 +-
 sys/external/bsd/acpica/dist/compiler/prutils.c                      |    3 +-
 sys/external/bsd/acpica/dist/debugger/dbcmds.c                       |    2 +-
 sys/external/bsd/acpica/dist/debugger/dbdisply.c                     |    6 +-
 sys/external/bsd/acpica/dist/debugger/dbexec.c                       |    8 +-
 sys/external/bsd/acpica/dist/debugger/dbinput.c                      |    2 +-
 sys/external/bsd/acpica/dist/debugger/dbmethod.c                     |    2 +-
 sys/external/bsd/acpica/dist/debugger/dbnames.c                      |    6 +-
 sys/external/bsd/acpica/dist/debugger/dbtest.c                       |  165 +++--
 sys/external/bsd/acpica/dist/debugger/dbutils.c                      |    2 +-
 sys/external/bsd/acpica/dist/disassembler/dmbuffer.c                 |   12 +-
 sys/external/bsd/acpica/dist/disassembler/dmcstyle.c                 |    6 +-
 sys/external/bsd/acpica/dist/disassembler/dmresrc.c                  |    6 +-
 sys/external/bsd/acpica/dist/disassembler/dmresrcl.c                 |    2 +-
 sys/external/bsd/acpica/dist/disassembler/dmresrcl2.c                |    2 +-
 sys/external/bsd/acpica/dist/disassembler/dmwalk.c                   |    2 +-
 sys/external/bsd/acpica/dist/dispatcher/dscontrol.c                  |    2 +-
 sys/external/bsd/acpica/dist/dispatcher/dsopcode.c                   |   21 +-
 sys/external/bsd/acpica/dist/dispatcher/dspkginit.c                  |    2 +-
 sys/external/bsd/acpica/dist/dispatcher/dsutils.c                    |    2 +-
 sys/external/bsd/acpica/dist/events/evregion.c                       |    4 +-
 sys/external/bsd/acpica/dist/events/evrgnini.c                       |   20 +-
 sys/external/bsd/acpica/dist/events/evxface.c                        |    2 +-
 sys/external/bsd/acpica/dist/executer/exconfig.c                     |    2 +-
 sys/external/bsd/acpica/dist/executer/exdebug.c                      |    2 +-
 sys/external/bsd/acpica/dist/executer/exdump.c                       |    2 +-
 sys/external/bsd/acpica/dist/hardware/hwesleep.c                     |    2 +-
 sys/external/bsd/acpica/dist/hardware/hwregs.c                       |    2 +-
 sys/external/bsd/acpica/dist/hardware/hwsleep.c                      |    2 +-
 sys/external/bsd/acpica/dist/hardware/hwxfsleep.c                    |    2 +-
 sys/external/bsd/acpica/dist/include/acapps.h                        |    4 +-
 sys/external/bsd/acpica/dist/include/acdebug.h                       |    5 +-
 sys/external/bsd/acpica/dist/include/acdisasm.h                      |    4 +-
 sys/external/bsd/acpica/dist/include/acexcep.h                       |    4 +-
 sys/external/bsd/acpica/dist/include/acglobal.h                      |    3 +-
 sys/external/bsd/acpica/dist/include/acinterp.h                      |    2 +-
 sys/external/bsd/acpica/dist/include/aclocal.h                       |    8 +-
 sys/external/bsd/acpica/dist/include/acmacros.h                      |    4 +-
 sys/external/bsd/acpica/dist/include/acnamesp.h                      |    2 +-
 sys/external/bsd/acpica/dist/include/acoutput.h                      |    4 +-
 sys/external/bsd/acpica/dist/include/acpiosxf.h                      |    2 +-
 sys/external/bsd/acpica/dist/include/acpixf.h                        |   22 +-
 sys/external/bsd/acpica/dist/include/acresrc.h                       |    2 +-
 sys/external/bsd/acpica/dist/include/actables.h                      |    2 +-
 sys/external/bsd/acpica/dist/include/actbl1.h                        |   22 +-
 sys/external/bsd/acpica/dist/include/actypes.h                       |   17 +-
 sys/external/bsd/acpica/dist/include/acutils.h                       |    2 +-
 sys/external/bsd/acpica/dist/include/platform/acgcc.h                |    2 +-
 sys/external/bsd/acpica/dist/include/platform/acnetbsd.h             |    4 +-
 sys/external/bsd/acpica/dist/namespace/nsaccess.c                    |    4 +-
 sys/external/bsd/acpica/dist/namespace/nsdump.c                      |    4 +-
 sys/external/bsd/acpica/dist/namespace/nseval.c                      |    2 +-
 sys/external/bsd/acpica/dist/namespace/nsinit.c                      |    6 +-
 sys/external/bsd/acpica/dist/namespace/nsrepair2.c                   |    6 +-
 sys/external/bsd/acpica/dist/namespace/nsxfeval.c                    |    2 +-
 sys/external/bsd/acpica/dist/namespace/nsxfname.c                    |    6 +-
 sys/external/bsd/acpica/dist/os_specific/service_layers/oslinuxtbl.c |   48 +-
 sys/external/bsd/acpica/dist/parser/psopcode.c                       |    2 +-
 sys/external/bsd/acpica/dist/parser/psopinfo.c                       |    2 +-
 sys/external/bsd/acpica/dist/resources/rsdump.c                      |    2 +-
 sys/external/bsd/acpica/dist/resources/rsdumpinfo.c                  |   16 +-
 sys/external/bsd/acpica/dist/resources/rsutils.c                     |    2 +-
 sys/external/bsd/acpica/dist/resources/rsxface.c                     |   10 +-
 sys/external/bsd/acpica/dist/tables/tbdata.c                         |    4 +-
 sys/external/bsd/acpica/dist/tables/tbfadt.c                         |    4 +-
 sys/external/bsd/acpica/dist/tables/tbinstal.c                       |    4 +-
 sys/external/bsd/acpica/dist/tables/tbutils.c                        |    4 +-
 sys/external/bsd/acpica/dist/tables/tbxface.c                        |   10 +-
 sys/external/bsd/acpica/dist/tables/tbxfload.c                       |   38 +-
 sys/external/bsd/acpica/dist/tables/tbxfroot.c                       |    2 +-
 sys/external/bsd/acpica/dist/tools/acpidump/apfiles.c                |   10 +-
 sys/external/bsd/acpica/dist/tools/acpixtract/acpixtract.c           |   14 +-
 sys/external/bsd/acpica/dist/utilities/utcache.c                     |    2 +-
 sys/external/bsd/acpica/dist/utilities/utdebug.c                     |    2 +-
 sys/external/bsd/acpica/dist/utilities/utdecode.c                    |   43 +-
 sys/external/bsd/acpica/dist/utilities/utdelete.c                    |    7 +-
 sys/external/bsd/acpica/dist/utilities/uteval.c                      |    2 +-
 sys/external/bsd/acpica/dist/utilities/utglobal.c                    |    2 +-
 sys/external/bsd/acpica/dist/utilities/utmisc.c                      |   10 +-
 sys/external/bsd/acpica/dist/utilities/utmutex.c                     |    2 +-
 sys/external/bsd/acpica/dist/utilities/utnonansi.c                   |    2 +-
 sys/external/bsd/acpica/dist/utilities/utobject.c                    |    2 +-
 sys/external/bsd/acpica/dist/utilities/utosi.c                       |    2 +-
 sys/external/bsd/acpica/dist/utilities/utprint.c                     |    2 +-
 sys/external/bsd/acpica/dist/utilities/uttrack.c                     |   11 +-
 sys/external/bsd/acpica/dist/utilities/utuuid.c                      |    2 +-
 113 files changed, 1274 insertions(+), 487 deletions(-)

diffs (truncated from 4535 to 300 lines):

diff -r af2a86c13752 -r 486c4afdb9cd sys/external/bsd/acpica/dist/common/dmtbdump.c
--- a/sys/external/bsd/acpica/dist/common/dmtbdump.c    Mon Apr 29 00:29:53 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbdump.c    Mon Apr 29 01:18:06 2019 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2018, Intel Corp.
+ * Copyright (C) 2000 - 2019, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -r af2a86c13752 -r 486c4afdb9cd sys/external/bsd/acpica/dist/common/dmtbinfo.c
--- a/sys/external/bsd/acpica/dist/common/dmtbinfo.c    Mon Apr 29 00:29:53 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbinfo.c    Mon Apr 29 01:18:06 2019 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2018, Intel Corp.
+ * Copyright (C) 2000 - 2019, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
diff -r af2a86c13752 -r 486c4afdb9cd sys/external/bsd/acpica/dist/compiler/aslanalyze.c
--- a/sys/external/bsd/acpica/dist/compiler/aslanalyze.c        Mon Apr 29 00:29:53 2019 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslanalyze.c        Mon Apr 29 01:18:06 2019 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2018, Intel Corp.
+ * Copyright (C) 2000 - 2019, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -455,14 +455,14 @@
 {
     ACPI_PARSE_OBJECT       *NextOp;
     UINT32                  GpeNumber;
-    char                    Name[ACPI_NAME_SIZE + 1];
-    char                    Target[ACPI_NAME_SIZE];
+    char                    Name[ACPI_NAMESEG_SIZE + 1];
+    char                    Target[ACPI_NAMESEG_SIZE];
 
 
     /* Need a null-terminated string version of NameSeg */
 
     ACPI_MOVE_32_TO_32 (Name, &Op->Asl.NameSeg);
-    Name[ACPI_NAME_SIZE] = 0;
+    Name[ACPI_NAMESEG_SIZE] = 0;
 
     /*
      * For a GPE method:
@@ -514,7 +514,7 @@
         if ((NextOp->Asl.ParseOpcode == PARSEOP_METHOD) ||
             (NextOp->Asl.ParseOpcode == PARSEOP_NAME))
         {
-            if (ACPI_COMPARE_NAME (Target, NextOp->Asl.NameSeg))
+            if (ACPI_COMPARE_NAMESEG (Target, NextOp->Asl.NameSeg))
             {
                 /* Found both _Exy and _Lxy in the same scope, error */
 
@@ -558,7 +558,7 @@
 
     /* We are only interested in _REG methods */
 
-    if (!ACPI_COMPARE_NAME (METHOD_NAME__REG, &Op->Asl.NameSeg))
+    if (!ACPI_COMPARE_NAMESEG (METHOD_NAME__REG, &Op->Asl.NameSeg))
     {
         return;
     }
@@ -664,7 +664,7 @@
 
         /* These are what we are looking for */
 
-        if (ACPI_COMPARE_NAME (Name, Op->Asl.NameSeg))
+        if (ACPI_COMPARE_NAMESEG (Name, Op->Asl.NameSeg))
         {
             return (AE_CTRL_TRUE);
         }
@@ -723,7 +723,7 @@
         if ((Next->Asl.ParseOpcode == PARSEOP_METHOD) ||
             (Next->Asl.ParseOpcode == PARSEOP_NAME))
         {
-            if (ACPI_COMPARE_NAME (Name, Next->Asl.NameSeg))
+            if (ACPI_COMPARE_NAMESEG (Name, Next->Asl.NameSeg))
             {
                 return (TRUE);
             }
diff -r af2a86c13752 -r 486c4afdb9cd sys/external/bsd/acpica/dist/compiler/aslcompile.c
--- a/sys/external/bsd/acpica/dist/compiler/aslcompile.c        Mon Apr 29 00:29:53 2019 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompile.c        Mon Apr 29 01:18:06 2019 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2018, Intel Corp.
+ * Copyright (C) 2000 - 2019, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -70,6 +70,10 @@
 CmDumpAllEvents (
     void);
 
+static void
+CmFinishFiles(
+    BOOLEAN                 DeleteAmlFile);
+
 
 /*******************************************************************************
  *
@@ -83,13 +87,13 @@
  *
  ******************************************************************************/
 
-int
+ACPI_STATUS
 CmDoCompile (
     void)
 {
-    ACPI_STATUS             Status;
     UINT8                   FullCompile;
     UINT8                   Event;
+    ASL_GLOBAL_FILE_NODE    *FileNode;
 
 
     FullCompile = UtBeginEvent ("*** Total Compile time ***");
@@ -113,7 +117,7 @@
         {
             UtEndEvent (Event);
             CmCleanupAndExit ();
-            return (0);
+            return (AE_OK);
         }
     }
     UtEndEvent (Event);
@@ -131,6 +135,12 @@
     {
         fprintf (stderr,
             "Compiler aborting due to parser-detected syntax error(s)\n");
+
+        /* Flag this error in the FileNode for compilation summary */
+
+        FileNode = FlGetCurrentFileNode ();
+        FileNode->ParserErrorDetected = TRUE;
+        AslGbl_ParserErrorDetected = TRUE;
         LsDumpParseTree ();
         goto ErrorExit;
     }
@@ -184,19 +194,35 @@
         OpcAmlOpcodeWalk, NULL);
     UtEndEvent (Event);
 
-    /*
-     * Now that the input is parsed, we can open the AML output file.
-     * Note: by default, the name of this file comes from the table
-     * descriptor within the input file.
-     */
-    Event = UtBeginEvent ("Open AML output file");
-    Status = FlOpenAmlOutputFile (AslGbl_OutputFilenamePrefix);
-    UtEndEvent (Event);
-    if (ACPI_FAILURE (Status))
-    {
-        AePrintErrorLog (ASL_FILE_STDERR);
-        return (-1);
-    }
+    UtEndEvent (FullCompile);
+    return (AE_OK);
+
+ErrorExit:
+    UtEndEvent (FullCompile);
+    return (AE_ERROR);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    CmDoAslMiddleAndBackEnd
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      Status of middle-end and back-end
+ *
+ * DESCRIPTION: Perform compiler middle-end (type checking and semantic
+ *              analysis) and back-end (code generation)
+ *
+ ******************************************************************************/
+
+int
+CmDoAslMiddleAndBackEnd (
+    void)
+{
+    UINT8                   Event;
+    ACPI_STATUS             Status;
+
 
     /* Interpret and generate all compile-time constants */
 
@@ -243,7 +269,6 @@
             AePrintErrorLog (ASL_FILE_STDOUT);
             UtDisplaySummary (ASL_FILE_STDOUT);
         }
-        UtEndEvent (FullCompile);
         return (0);
     }
 
@@ -259,7 +284,7 @@
     UtEndEvent (Event);
     if (ACPI_FAILURE (Status))
     {
-        goto ErrorExit;
+        return (-1);
     }
 
     /* Namespace cross-reference */
@@ -270,7 +295,7 @@
     Status = XfCrossReferenceNamespace ();
     if (ACPI_FAILURE (Status))
     {
-        goto ErrorExit;
+        return (-1);
     }
 
     /* Namespace - Check for non-referenced objects */
@@ -378,21 +403,47 @@
 
     Event = UtBeginEvent ("Generate AML code and write output files");
     DbgPrint (ASL_DEBUG_OUTPUT, "Writing AML byte code\n\n");
-    CgGenerateAmlOutput ();
+
+    AslGbl_CurrentDB = AslGbl_ParseTreeRoot->Asl.Child;
+
+    while (AslGbl_CurrentDB)
+    {
+        switch  (FlSwitchFileSet(AslGbl_CurrentDB->Asl.Filename))
+        {
+            case SWITCH_TO_DIFFERENT_FILE:
+                /*
+                 * Reset these parameters when definition blocks belong in
+                 * different files. If they belong in the same file, there is
+                 * no need to reset these parameters
+                 */
+                FlSeekFile (ASL_FILE_SOURCE_OUTPUT, 0);
+                AslGbl_SourceLine = 0;
+                AslGbl_NextError = AslGbl_ErrorLog;
+
+                /* fall-through */
+
+            case SWITCH_TO_SAME_FILE:
+
+                CgGenerateAmlOutput ();
+                CmDoOutputFiles ();
+                AslGbl_CurrentDB = AslGbl_CurrentDB->Asl.Next;
+
+                break;
+
+            default: /* FILE_NOT_FOUND */
+
+                /* The requested file could not be found. Get out of here */
+
+                AslGbl_CurrentDB = NULL;
+                break;
+        }
+    }
     UtEndEvent (Event);
 
     Event = UtBeginEvent ("Write optional output files");
-    CmDoOutputFiles ();
     UtEndEvent (Event);
 
-    UtEndEvent (FullCompile);
-    CmCleanupAndExit ();
     return (0);
-
-ErrorExit:
-    UtEndEvent (FullCompile);
-    CmCleanupAndExit ();
-    return (-1);
 }
 
 
@@ -699,11 +750,14 @@
 CmCleanupAndExit (
     void)
 {
-    UINT32                  i;
     BOOLEAN                 DeleteAmlFile = FALSE;
+    ASL_GLOBAL_FILE_NODE    *CurrentFileNode = AslGbl_FilesList;
 
 
-    AslCheckExpectedExceptions ();
+    /* Check if any errors occurred during compile */
+
+    (void) AslCheckForErrorExit ();
+
     AePrintErrorLog (ASL_FILE_STDERR);
     if (AslGbl_DebugFlag)
     {



Home | Main Index | Thread Index | Old Index