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 -------------------------------...



details:   https://anonhg.NetBSD.org/src/rev/67a1ba41bae5
branches:  trunk
changeset: 823651:67a1ba41bae5
user:      christos <christos%NetBSD.org@localhost>
date:      Sun Apr 30 20:57:21 2017 +0000

description:
----------------------------------------
03 March 2017. Summary of changes for version 20170303:


0) ACPICA licensing:

The licensing information at the start of each source code module has
been updated. In addition to the Intel license, the dual GPLv2/BSD
license has been added for completeness. Now, a single version of the
source code should be suitable for all ACPICA customers. This is the
major change for this release since it affects all source code modules.


1) ACPICA kernel-resident subsystem:

Fixed two issues with the common asltypes.h header that could cause
problems in some environments: (Kim Jung-uk)
    Removed typedef for YY_BUFFER_STATE ?
       Fixes an error with earlier versions of Flex.
    Removed use of FILE typedef (which is only defined in stdio.h)


2) iASL Compiler/Disassembler and Tools:

Disassembler: fixed a regression introduced in 20170224. A fix for a
memory leak related to resource descriptor tags (names) could fault when
the disassembler was generated with 64-bit compilers.

The ASLTS test suite has been updated to implement a new testing
architecture. During generation of the suite from ASL source, both the
ASL and ASL+ compilers are now validated, as well as the disassembler
itself (Erik Schmauss). The architecture executes as follows:

    For every ASL source module:
        Compile (legacy ASL compilation)
        Disassemble the resulting AML to ASL+ source code
        Compile the new ASL+ module
        Perform a binary compare on the legacy AML and the new ASL+ AML
    The ASLTS suite then executes normally using the AML binaries.

----------------------------------------
24 February 2017. Summary of changes for version 20170224:


1) ACPICA kernel-resident subsystem:

Interpreter: Fixed two issues with the control method return value auto-
repair feature, where an attempt to double-delete an internal object
could result in an ACPICA warning (for _CID repair and others). No fault
occurs, however, because the attempted deletion (actually a release to an
internal cache) is detected and ignored via object poisoning.

Debugger: Fixed an AML interpreter mutex issue during the single stepping
of control methods. If certain debugger commands are executed during
stepping, a mutex aquire/release error could occur. Lv Zheng.

Fixed some issues generating ACPICA with the Intel C compiler by
restoring the original behavior and compiler-specific include file in
acenv.h. Lv Zheng.

Example Code and Data Size: These are the sizes for the OS-independent
acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The
debug version of the code includes the debug output trace mechanism and
has a much larger code and data size.

  Current Release:
    Non-Debug Version: 141.7K Code, 58.5K Data, 200.2K Total
    Debug Version:     207.5K Code, 82.7K Data, 290.2K Total
  Previous Release:
    Non-Debug Version: 137.4K Code, 52.6K Data, 190.0K Total
    Debug Version:     201.5K Code, 82.2K Data, 283.7K Total


2) iASL Compiler/Disassembler and Tools:

iASL/Disassembler: A preliminary version of a new ASL-to-ASL+ conversion
tool has been designed, implemented, and included in this release. The
key feature of this utility is that the original comments within the
input ASL file are preserved during the conversion process, and included
within the converted ASL+ file -- thus creating a transparent conversion
of existing ASL files to ASL+ (ASL 2.0). Erik Schmauss.

    Usage: iasl -ca <ASL-filename>  // Output is a .dsl file with
converted code

iASL/Disassembler: Improved the detection and correct disassembly of
Switch/Case operators. This feature detects sequences of if/elseif/else
operators that originated from ASL Switch/Case/Default operators and
emits the original operators. David Box.

iASL: Improved the IORT ACPI table support in the following areas. Lv
Zheng:
    Clear MappingOffset if the MappingCount is zero.
    Fix the disassembly of the SMMU GSU interrupt offset.
    Update the template file for the IORT table.

Disassembler: Enhanced the detection and disassembly of resource
template/descriptor within a Buffer object. An EndTag descriptor is now
required to have a zero second byte, since all known ASL compilers emit
this. This helps eliminate incorrect decisions when a buffer is
disassembled (false positives on resource templates).

diffstat:

 sys/external/bsd/acpica/dist/changes.txt                   |  103 +-
 sys/external/bsd/acpica/dist/common/adisasm.c              |   39 +-
 sys/external/bsd/acpica/dist/common/adwalk.c               |    2 +-
 sys/external/bsd/acpica/dist/common/dmextern.c             |   25 +
 sys/external/bsd/acpica/dist/common/dmrestag.c             |    6 +-
 sys/external/bsd/acpica/dist/common/dmtables.c             |   22 +
 sys/external/bsd/acpica/dist/compiler/aslcodegen.c         |  101 +-
 sys/external/bsd/acpica/dist/compiler/asldebug.c           |   34 +
 sys/external/bsd/acpica/dist/compiler/asldefine.h          |    8 +-
 sys/external/bsd/acpica/dist/compiler/aslglobal.h          |   22 +-
 sys/external/bsd/acpica/dist/compiler/aslhelp.c            |    8 +-
 sys/external/bsd/acpica/dist/compiler/asllength.c          |    5 +-
 sys/external/bsd/acpica/dist/compiler/aslmap.c             |   36 +-
 sys/external/bsd/acpica/dist/compiler/asloffset.c          |    2 +-
 sys/external/bsd/acpica/dist/compiler/asloperands.c        |    7 +-
 sys/external/bsd/acpica/dist/compiler/aslprimaries.y       |   23 +-
 sys/external/bsd/acpica/dist/compiler/aslprintf.c          |    2 +-
 sys/external/bsd/acpica/dist/compiler/aslresources.y       |    9 +-
 sys/external/bsd/acpica/dist/compiler/aslrules.y           |   10 +-
 sys/external/bsd/acpica/dist/compiler/aslstartup.c         |   32 +
 sys/external/bsd/acpica/dist/compiler/asltypes.h           |   22 +-
 sys/external/bsd/acpica/dist/compiler/cvcompiler.c         |  890 +++++++++++++
 sys/external/bsd/acpica/dist/compiler/cvdisasm.c           |  423 ++++++
 sys/external/bsd/acpica/dist/compiler/cvparser.c           |  887 ++++++++++++
 sys/external/bsd/acpica/dist/compiler/dttable1.c           |    4 +
 sys/external/bsd/acpica/dist/compiler/dttemplate.h         |   72 +-
 sys/external/bsd/acpica/dist/debugger/dbxface.c            |    5 +-
 sys/external/bsd/acpica/dist/disassembler/dmdeferred.c     |    6 +-
 sys/external/bsd/acpica/dist/disassembler/dmnames.c        |    2 +-
 sys/external/bsd/acpica/dist/disassembler/dmopcode.c       |   85 +-
 sys/external/bsd/acpica/dist/disassembler/dmutils.c        |    8 +
 sys/external/bsd/acpica/dist/dispatcher/dsmthdat.c         |    3 +-
 sys/external/bsd/acpica/dist/dispatcher/dsobject.c         |   14 +-
 sys/external/bsd/acpica/dist/dispatcher/dswexec.c          |    2 +-
 sys/external/bsd/acpica/dist/dispatcher/dswload2.c         |    2 +-
 sys/external/bsd/acpica/dist/executer/exmisc.c             |   16 +-
 sys/external/bsd/acpica/dist/executer/exnames.c            |    4 +-
 sys/external/bsd/acpica/dist/executer/exoparg1.c           |   15 +-
 sys/external/bsd/acpica/dist/executer/exoparg2.c           |    4 +-
 sys/external/bsd/acpica/dist/executer/exoparg6.c           |   10 +-
 sys/external/bsd/acpica/dist/executer/exresolv.c           |    2 +-
 sys/external/bsd/acpica/dist/executer/exstore.c            |    4 +-
 sys/external/bsd/acpica/dist/executer/exstoren.c           |    2 +-
 sys/external/bsd/acpica/dist/generate/unix/Makefile.config |    9 +
 sys/external/bsd/acpica/dist/generate/unix/iasl/Makefile   |    3 +
 sys/external/bsd/acpica/dist/hardware/hwvalid.c            |   18 +-
 sys/external/bsd/acpica/dist/include/acconfig.h            |    1 +
 sys/external/bsd/acpica/dist/include/acconvert.h           |  204 ++
 sys/external/bsd/acpica/dist/include/acopcode.h            |    2 +
 sys/external/bsd/acpica/dist/include/actbl2.h              |   11 +
 sys/external/bsd/acpica/dist/include/amlcode.h             |  104 +-
 sys/external/bsd/acpica/dist/namespace/nsrepair.c          |   16 +-
 sys/external/bsd/acpica/dist/namespace/nsutils.c           |   31 +-
 sys/external/bsd/acpica/dist/parser/psargs.c               |   30 +-
 sys/external/bsd/acpica/dist/parser/psloop.c               |   39 +-
 sys/external/bsd/acpica/dist/parser/psobject.c             |   36 +
 sys/external/bsd/acpica/dist/parser/psparse.c              |    6 +-
 sys/external/bsd/acpica/dist/parser/pstree.c               |    9 +-
 sys/external/bsd/acpica/dist/parser/psutils.c              |   13 +
 sys/external/bsd/acpica/dist/tools/acpisrc/acpisrc.h       |    2 +-
 sys/external/bsd/acpica/dist/tools/acpisrc/astable.c       |    2 +
 sys/external/bsd/acpica/dist/utilities/utalloc.c           |   44 +
 sys/external/bsd/acpica/dist/utilities/utresrc.c           |   10 +
 sys/external/bsd/acpica/dist/utilities/utxferror.c         |   16 +-
 64 files changed, 3292 insertions(+), 292 deletions(-)

diffs (truncated from 5385 to 300 lines):

diff -r 348b383e8c1c -r 67a1ba41bae5 sys/external/bsd/acpica/dist/changes.txt
--- a/sys/external/bsd/acpica/dist/changes.txt  Sun Apr 30 20:28:53 2017 +0000
+++ b/sys/external/bsd/acpica/dist/changes.txt  Sun Apr 30 20:57:21 2017 +0000
@@ -1,7 +1,108 @@
 ----------------------------------------
+03 March 2017. Summary of changes for version 20170303:
+
+
+0) ACPICA licensing:
+
+The licensing information at the start of each source code module has 
+been updated. In addition to the Intel license, the dual GPLv2/BSD 
+license has been added for completeness. Now, a single version of the 
+source code should be suitable for all ACPICA customers. This is the 
+major change for this release since it affects all source code modules.
+
+
+1) ACPICA kernel-resident subsystem: 
+
+Fixed two issues with the common asltypes.h header that could cause 
+problems in some environments: (Kim Jung-uk)
+    Removed typedef for YY_BUFFER_STATE ?
+       Fixes an error with earlier versions of Flex.
+    Removed use of FILE typedef (which is only defined in stdio.h)
+
+
+2) iASL Compiler/Disassembler and Tools: 
+
+Disassembler: fixed a regression introduced in 20170224. A fix for a 
+memory leak related to resource descriptor tags (names) could fault when 
+the disassembler was generated with 64-bit compilers.
+
+The ASLTS test suite has been updated to implement a new testing 
+architecture. During generation of the suite from ASL source, both the 
+ASL and ASL+ compilers are now validated, as well as the disassembler 
+itself (Erik Schmauss). The architecture executes as follows:
+
+    For every ASL source module:
+        Compile (legacy ASL compilation)
+        Disassemble the resulting AML to ASL+ source code
+        Compile the new ASL+ module
+        Perform a binary compare on the legacy AML and the new ASL+ AML
+    The ASLTS suite then executes normally using the AML binaries.
+
+----------------------------------------
+24 February 2017. Summary of changes for version 20170224:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Interpreter: Fixed two issues with the control method return value auto-
+repair feature, where an attempt to double-delete an internal object 
+could result in an ACPICA warning (for _CID repair and others). No fault 
+occurs, however, because the attempted deletion (actually a release to an 
+internal cache) is detected and ignored via object poisoning.
+
+Debugger: Fixed an AML interpreter mutex issue during the single stepping 
+of control methods. If certain debugger commands are executed during 
+stepping, a mutex aquire/release error could occur. Lv Zheng.
+
+Fixed some issues generating ACPICA with the Intel C compiler by 
+restoring the original behavior and compiler-specific include file in 
+acenv.h. Lv Zheng.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and 
+has a much larger code and data size.
+
+  Current Release:
+    Non-Debug Version: 141.7K Code, 58.5K Data, 200.2K Total
+    Debug Version:     207.5K Code, 82.7K Data, 290.2K Total
+  Previous Release:
+    Non-Debug Version: 137.4K Code, 52.6K Data, 190.0K Total
+    Debug Version:     201.5K Code, 82.2K Data, 283.7K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL/Disassembler: A preliminary version of a new ASL-to-ASL+ conversion 
+tool has been designed, implemented, and included in this release. The 
+key feature of this utility is that the original comments within the 
+input ASL file are preserved during the conversion process, and included 
+within the converted ASL+ file -- thus creating a transparent conversion 
+of existing ASL files to ASL+ (ASL 2.0). Erik Schmauss.
+
+    Usage: iasl -ca <ASL-filename>  // Output is a .dsl file with 
+converted code
+
+iASL/Disassembler: Improved the detection and correct disassembly of 
+Switch/Case operators. This feature detects sequences of if/elseif/else 
+operators that originated from ASL Switch/Case/Default operators and 
+emits the original operators. David Box.
+
+iASL: Improved the IORT ACPI table support in the following areas. Lv 
+Zheng:
+    Clear MappingOffset if the MappingCount is zero.
+    Fix the disassembly of the SMMU GSU interrupt offset.
+    Update the template file for the IORT table.
+
+Disassembler: Enhanced the detection and disassembly of resource 
+template/descriptor within a Buffer object. An EndTag descriptor is now 
+required to have a zero second byte, since all known ASL compilers emit 
+this. This helps eliminate incorrect decisions when a buffer is 
+disassembled (false positives on resource templates).
+
+----------------------------------------
 19 January 2017. Summary of changes for version 20170119:
 
-This release is available at https://acpica.org/downloads
 
 1) General ACPICA software:
 
diff -r 348b383e8c1c -r 67a1ba41bae5 sys/external/bsd/acpica/dist/common/adisasm.c
--- a/sys/external/bsd/acpica/dist/common/adisasm.c     Sun Apr 30 20:28:53 2017 +0000
+++ b/sys/external/bsd/acpica/dist/common/adisasm.c     Sun Apr 30 20:57:21 2017 +0000
@@ -122,24 +122,36 @@
     Status = AcpiOsInitialize ();
     if (ACPI_FAILURE (Status))
     {
+        fprintf (stderr, "Could not initialize ACPICA subsystem: %s\n",
+            AcpiFormatException (Status));
+
         return (Status);
     }
 
     Status = AcpiUtInitGlobals ();
     if (ACPI_FAILURE (Status))
     {
+        fprintf (stderr, "Could not initialize ACPICA globals: %s\n",
+            AcpiFormatException (Status));
+
         return (Status);
     }
 
     Status = AcpiUtMutexInitialize ();
     if (ACPI_FAILURE (Status))
     {
+        fprintf (stderr, "Could not initialize ACPICA mutex objects: %s\n",
+            AcpiFormatException (Status));
+
         return (Status);
     }
 
     Status = AcpiNsRootInitialize ();
     if (ACPI_FAILURE (Status))
     {
+        fprintf (stderr, "Could not initialize ACPICA namespace: %s\n",
+            AcpiFormatException (Status));
+
         return (Status);
     }
 
@@ -149,7 +161,7 @@
     AcpiGbl_RootTableList.CurrentTableCount = 0;
     AcpiGbl_RootTableList.Tables = LocalTables;
 
-    return (Status);
+    return (AE_OK);
 }
 
 
@@ -326,6 +338,21 @@
     ACPI_OWNER_ID           OwnerId;
 
 
+#ifdef ACPI_ASL_COMPILER
+
+    /*
+     * For ASL-/ASL+ converter: replace the temporary "XXXX"
+     * table signature with the original. This "XXXX" makes
+     * it harder for the AML interpreter to run the badaml
+     * (.xxx) file produced from the converter in case if
+     * it fails to get deleted.
+     */
+    if (Gbl_CaptureComments)
+    {
+        strncpy (Table->Signature, AcpiGbl_TableSig, 4);
+    }
+#endif
+
     /* ForceAmlDisassembly means to assume the table contains valid AML */
 
     if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table))
@@ -475,6 +502,7 @@
     ACPI_OWNER_ID           OwnerId)
 {
     ACPI_STATUS             Status;
+    ACPI_COMMENT_ADDR_NODE  *AddrListHead;
 
 
     fprintf (stderr,
@@ -508,6 +536,15 @@
 
     AcpiDmAddExternalsToNamespace ();
 
+    /* For -ca option: clear the list of comment addresses. */
+
+    while (AcpiGbl_CommentAddrListHead)
+    {
+        AddrListHead= AcpiGbl_CommentAddrListHead;
+        AcpiGbl_CommentAddrListHead = AcpiGbl_CommentAddrListHead->Next;
+        AcpiOsFree(AddrListHead);
+    }
+
     /* Parse the table again. No need to reload it, however */
 
     Status = AdParseTable (Table, NULL, FALSE, FALSE);
diff -r 348b383e8c1c -r 67a1ba41bae5 sys/external/bsd/acpica/dist/common/adwalk.c
--- a/sys/external/bsd/acpica/dist/common/adwalk.c      Sun Apr 30 20:28:53 2017 +0000
+++ b/sys/external/bsd/acpica/dist/common/adwalk.c      Sun Apr 30 20:57:21 2017 +0000
@@ -878,7 +878,7 @@
              * method.
              */
             if (!(Op->Asl.Parent &&
-                (Op->Asl.Parent->Asl.AmlOpcode == AML_COND_REF_OF_OP)))
+                (Op->Asl.Parent->Asl.AmlOpcode == AML_CONDITIONAL_REF_OF_OP)))
             {
                 if (Node)
                 {
diff -r 348b383e8c1c -r 67a1ba41bae5 sys/external/bsd/acpica/dist/common/dmextern.c
--- a/sys/external/bsd/acpica/dist/common/dmextern.c    Sun Apr 30 20:28:53 2017 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmextern.c    Sun Apr 30 20:57:21 2017 +0000
@@ -1165,6 +1165,31 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDmEmitExternal
+ *
+ * PARAMETERS:  Op                  External Parse Object
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Emit an External() ASL statement for the current External
+ *              parse object
+ *
+ ******************************************************************************/
+
+void
+AcpiDmEmitExternal (
+    ACPI_PARSE_OBJECT       *NameOp,
+    ACPI_PARSE_OBJECT       *TypeOp)
+{
+    AcpiOsPrintf ("External (");
+    AcpiDmNamestring (NameOp->Common.Value.Name);
+    AcpiOsPrintf ("%s)\n",
+        AcpiDmGetObjectTypeName ((ACPI_OBJECT_TYPE) TypeOp->Common.Value.Integer));
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDmUnresolvedWarning
  *
  * PARAMETERS:  Type                - Where to output the warning.
diff -r 348b383e8c1c -r 67a1ba41bae5 sys/external/bsd/acpica/dist/common/dmrestag.c
--- a/sys/external/bsd/acpica/dist/common/dmrestag.c    Sun Apr 30 20:28:53 2017 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmrestag.c    Sun Apr 30 20:57:21 2017 +0000
@@ -693,8 +693,10 @@
     AcpiPsInitOp (IndexOp, AML_INT_NAMEPATH_OP);
     IndexOp->Common.Value.String = InternalPath;
 
-    /* We will need the tag later. Cheat by putting it in the Node field */
-
+    /*
+     * We will need the tag later. Cheat by putting it in the Node field.
+     * Note, Tag is a const that is part of a lookup table.
+     */
     IndexOp->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Tag);
     return (InternalPath);
 }
diff -r 348b383e8c1c -r 67a1ba41bae5 sys/external/bsd/acpica/dist/common/dmtables.c
--- a/sys/external/bsd/acpica/dist/common/dmtables.c    Sun Apr 30 20:28:53 2017 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtables.c    Sun Apr 30 20:57:21 2017 +0000
@@ -47,6 +47,8 @@
 #include "actables.h"
 #include "acparser.h"
 #include "acapps.h"
+#include "acmacros.h"
+#include "acconvert.h"
 
 
 #define _COMPONENT          ACPI_TOOLS
@@ -202,6 +204,14 @@
     AcpiOsPrintf (" */\n");
 
     /*
+     * Print comments that come before this definition block.
+     */
+    if (Gbl_CaptureComments)
+    {
+        ASL_CV_PRINT_ONE_COMMENT(AcpiGbl_ParseOpRoot,AML_COMMENT_STANDARD, NULL, 0);
+    }
+
+    /*
      * Open the ASL definition block.
      *
      * Note: the AMLFilename string is left zero-length in order to just let
@@ -388,6 +398,7 @@
 



Home | Main Index | Thread Index | Old Index