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/0ba95ffaacad
branches:  trunk
changeset: 847193:0ba95ffaacad
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Dec 14 16:33:12 2019 +0000

description:
----------------------------------------
13 December 2019. Summary of changes for version 20191213:


1) ACPICA kernel-resident subsystem:

Return a Buffer object for all fields created via the CreateField operator. Previously, an Integer would be returned if the size of the field was less than or equal to the current size of an Integer. 
Although this goes against the ACPI specification, it provides compatibility with other ACPI implementations. Also updated the ASLTS test suite to reflect this new behavior.

2) iASL Compiler/Disassembler and ACPICA tools:

iASL: Implemented detection of (and throw an error for) duplicate values for Case statements within a single Switch statement. Duplicate Integers, Strings, and Buffers are supported.

iASL: Fix error logging issue during multiple file compilation -- Switch to the correct input file during error node creation.

iASL: For duplicate named object creation, now emit an error instead of a warning - since this will cause a runtime error.

AcpiSrc: Add unix line-ending support for non-Windows builds.

iASL: Add an error condition for an attempt to create a NameString with > 255 NameSegs (the max allowable via the AML definition).


----------------------------------------
18 October 2019. Summary of changes for version 20191018:


1) ACPICA kernel-resident subsystem:

Debugger: added a new command: ?Fields [address space ID]?. This command
dumps the contents of all field units that are defined within the
namespace with a particular address space ID.

Modified the external interface AcpiLoadTable() to return a table index.
This table index can be used for unloading a table for debugging.
    ACPI_STATUS
    AcpiLoadTable (
        ACPI_TABLE_HEADER       *Table,
        UINT32                  *TableIndex))

Implemented a new external interface: AcpiUnloadTable() This new function
takes a table index as an argument and unloads the table. Useful for
debugging only.
    ACPI_STATUS
    AcpiUnloadTable (
        UINT32                  TableIndex))

Ported the AcpiNames utility to use the new table initialization
sequence. The utility was broken before this change. Also, it was
required to include most of the AML interpreter into the utility in order
to process table initialization (module-level code execution.)

Update for results from running Clang V8.0.1. This fixes all "dead
assignment" warnings. There are still several "Dereference of NULL
pointer" warnings, but these have been found to be false positive
warnings.


2) iASL Compiler/Disassembler and ACPICA tools:

iASL: numerous table compiler changes to ensure that the usage of
yacc/bison syntax is POSIX-compliant.

iASL/disassembler: several simple bug fixes in the data table
disassembler.

Acpiexec: expanded the initialization file (the -fi option) to initialize
strings, buffers, packages, and field units.

diffstat:

 sys/external/bsd/acpica/dist/changes.txt                          |   68 +++
 sys/external/bsd/acpica/dist/common/acgetline.c                   |    2 +-
 sys/external/bsd/acpica/dist/common/adisasm.c                     |    1 -
 sys/external/bsd/acpica/dist/common/adwalk.c                      |    4 +-
 sys/external/bsd/acpica/dist/common/dmtbdump1.c                   |   22 +-
 sys/external/bsd/acpica/dist/common/dmtbdump2.c                   |   24 +-
 sys/external/bsd/acpica/dist/common/dmtbdump3.c                   |    6 +-
 sys/external/bsd/acpica/dist/compiler/aslbtypes.c                 |    1 -
 sys/external/bsd/acpica/dist/compiler/asldefine.h                 |   10 +-
 sys/external/bsd/acpica/dist/compiler/aslkeywords.y               |    2 +-
 sys/external/bsd/acpica/dist/compiler/aslmessages.c               |    9 +-
 sys/external/bsd/acpica/dist/compiler/aslmessages.h               |    5 +
 sys/external/bsd/acpica/dist/compiler/aslmethod.c                 |   24 +-
 sys/external/bsd/acpica/dist/compiler/aslnamesp.c                 |    4 +
 sys/external/bsd/acpica/dist/compiler/aslresource.c               |    2 +-
 sys/external/bsd/acpica/dist/compiler/aslrestype2.c               |    3 -
 sys/external/bsd/acpica/dist/compiler/aslrestype2s.c              |    1 -
 sys/external/bsd/acpica/dist/compiler/aslstartup.c                |    4 -
 sys/external/bsd/acpica/dist/compiler/asltransform.c              |  204 +++++++++-
 sys/external/bsd/acpica/dist/compiler/cvdisasm.c                  |    9 +-
 sys/external/bsd/acpica/dist/compiler/cvparser.c                  |    1 -
 sys/external/bsd/acpica/dist/compiler/dtcompiler.h                |   38 +-
 sys/external/bsd/acpica/dist/compiler/dtcompilerparser.l          |   20 +-
 sys/external/bsd/acpica/dist/compiler/dtio.c                      |   98 ----
 sys/external/bsd/acpica/dist/compiler/dttable2.c                  |   24 +-
 sys/external/bsd/acpica/dist/debugger/dbconvert.c                 |    4 +
 sys/external/bsd/acpica/dist/debugger/dbfileio.c                  |    2 +-
 sys/external/bsd/acpica/dist/debugger/dbobject.c                  |    1 -
 sys/external/bsd/acpica/dist/disassembler/dmdeferred.c            |    4 +
 sys/external/bsd/acpica/dist/dispatcher/dsfield.c                 |   11 +-
 sys/external/bsd/acpica/dist/dispatcher/dswload.c                 |   22 +
 sys/external/bsd/acpica/dist/events/evgpeblk.c                    |    6 +-
 sys/external/bsd/acpica/dist/events/evgpeinit.c                   |    3 -
 sys/external/bsd/acpica/dist/events/evmisc.c                      |   17 +-
 sys/external/bsd/acpica/dist/executer/exfield.c                   |   10 +-
 sys/external/bsd/acpica/dist/generate/unix/acpinames/Makefile     |   42 ++
 sys/external/bsd/acpica/dist/include/acobject.h                   |    1 +
 sys/external/bsd/acpica/dist/include/acstruct.h                   |   13 +
 sys/external/bsd/acpica/dist/include/platform/acenv.h             |   15 +
 sys/external/bsd/acpica/dist/include/platform/acfreebsd.h         |    4 +
 sys/external/bsd/acpica/dist/namespace/nsconvert.c                |    2 +-
 sys/external/bsd/acpica/dist/os_specific/service_layers/oswinxf.c |    2 +-
 sys/external/bsd/acpica/dist/parser/psobject.c                    |    6 +-
 sys/external/bsd/acpica/dist/resources/rscreate.c                 |    4 +
 sys/external/bsd/acpica/dist/tests/misc/badcode.asl               |    2 +-
 sys/external/bsd/acpica/dist/tests/templates/Makefile             |   10 +-
 sys/external/bsd/acpica/dist/tools/acpiexec/aecommon.h            |    5 +-
 sys/external/bsd/acpica/dist/tools/acpiexec/aehandlers.c          |   13 +-
 sys/external/bsd/acpica/dist/tools/acpiexec/aeinitfile.c          |   85 ++-
 sys/external/bsd/acpica/dist/tools/acpiexec/aemain.c              |    2 +-
 sys/external/bsd/acpica/dist/tools/acpiexec/aetests.c             |   16 +-
 sys/external/bsd/acpica/dist/tools/acpihelp/ahdecode.c            |    2 +-
 sys/external/bsd/acpica/dist/tools/acpinames/anstubs.c            |   16 +-
 sys/external/bsd/acpica/dist/tools/acpisrc/asfile.c               |    2 +-
 sys/external/bsd/acpica/dist/tools/acpisrc/asmain.c               |    7 +
 sys/external/bsd/acpica/dist/tools/acpisrc/asremove.c             |    5 +-
 sys/external/bsd/acpica/dist/tools/acpisrc/astable.c              |    1 +
 sys/external/bsd/acpica/dist/utilities/utbuffer.c                 |   62 +-
 58 files changed, 723 insertions(+), 260 deletions(-)

diffs (truncated from 2233 to 300 lines):

diff -r 65136ce72045 -r 0ba95ffaacad sys/external/bsd/acpica/dist/changes.txt
--- a/sys/external/bsd/acpica/dist/changes.txt  Sat Dec 14 15:40:43 2019 +0000
+++ b/sys/external/bsd/acpica/dist/changes.txt  Sat Dec 14 16:33:12 2019 +0000
@@ -1,4 +1,72 @@
 ----------------------------------------
+13 December 2019. Summary of changes for version 20191213:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Return a Buffer object for all fields created via the CreateField operator. Previously, an Integer would be returned if the size of the field was less than or equal to the current size of an 
Integer. Although this goes against the ACPI specification, it provides compatibility with other ACPI implementations. Also updated the ASLTS test suite to reflect this new behavior.
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: Implemented detection of (and throw an error for) duplicate values for Case statements within a single Switch statement. Duplicate Integers, Strings, and Buffers are supported.
+
+iASL: Fix error logging issue during multiple file compilation -- Switch to the correct input file during error node creation.
+
+iASL: For duplicate named object creation, now emit an error instead of a warning - since this will cause a runtime error.
+
+AcpiSrc: Add unix line-ending support for non-Windows builds.
+
+iASL: Add an error condition for an attempt to create a NameString with > 255 NameSegs (the max allowable via the AML definition).
+
+
+----------------------------------------
+18 October 2019. Summary of changes for version 20191018:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Debugger: added a new command: ?Fields [address space ID]?. This command 
+dumps the contents of all field units that are defined within the 
+namespace with a particular address space ID.
+
+Modified the external interface AcpiLoadTable() to return a table index. 
+This table index can be used for unloading a table for debugging.
+    ACPI_STATUS
+    AcpiLoadTable (
+        ACPI_TABLE_HEADER       *Table,
+        UINT32                  *TableIndex))
+
+Implemented a new external interface: AcpiUnloadTable() This new function 
+takes a table index as an argument and unloads the table. Useful for 
+debugging only.
+    ACPI_STATUS
+    AcpiUnloadTable (
+        UINT32                  TableIndex))
+
+Ported the AcpiNames utility to use the new table initialization 
+sequence. The utility was broken before this change. Also, it was 
+required to include most of the AML interpreter into the utility in order 
+to process table initialization (module-level code execution.)
+
+Update for results from running Clang V8.0.1. This fixes all "dead 
+assignment" warnings. There are still several "Dereference of NULL 
+pointer" warnings, but these have been found to be false positive 
+warnings.
+
+
+2) iASL Compiler/Disassembler and ACPICA tools:
+
+iASL: numerous table compiler changes to ensure that the usage of 
+yacc/bison syntax is POSIX-compliant.
+
+iASL/disassembler: several simple bug fixes in the data table 
+disassembler.
+
+Acpiexec: expanded the initialization file (the -fi option) to initialize 
+strings, buffers, packages, and field units.
+
+
+----------------------------------------
 16 August 2019. Summary of changes for version 20190816:
 
 This release is available at https://acpica.org/downloads
diff -r 65136ce72045 -r 0ba95ffaacad sys/external/bsd/acpica/dist/common/acgetline.c
--- a/sys/external/bsd/acpica/dist/common/acgetline.c   Sat Dec 14 15:40:43 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/acgetline.c   Sat Dec 14 16:33:12 2019 +0000
@@ -424,7 +424,7 @@
                  * Ignore the various keys like insert/delete/home/end, etc.
                  * But we must eat the final character of the ESC sequence.
                  */
-                InputChar = getchar ();
+                (void) getchar ();
                 continue;
 
             default:
diff -r 65136ce72045 -r 0ba95ffaacad sys/external/bsd/acpica/dist/common/adisasm.c
--- a/sys/external/bsd/acpica/dist/common/adisasm.c     Sat Dec 14 15:40:43 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/adisasm.c     Sat Dec 14 16:33:12 2019 +0000
@@ -638,7 +638,6 @@
             {
                 ExternalFileList = ExternalFileList->Next;
                 GlobalStatus = AE_TYPE;
-                Status = AE_OK;
                 continue;
             }
 
diff -r 65136ce72045 -r 0ba95ffaacad sys/external/bsd/acpica/dist/common/adwalk.c
--- a/sys/external/bsd/acpica/dist/common/adwalk.c      Sat Dec 14 15:40:43 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/adwalk.c      Sat Dec 14 16:33:12 2019 +0000
@@ -493,7 +493,9 @@
         return (AE_OK);
     }
 
+#ifdef ACPI_UNDER_DEVELOPMENT
     OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+#endif
 
     switch (Op->Common.AmlOpcode)
     {
@@ -992,7 +994,7 @@
     /* Switch/Case conversion */
 
     Status = AcpiDmProcessSwitch (Op);
-    return (AE_OK);
+    return (Status);
 }
 
 
diff -r 65136ce72045 -r 0ba95ffaacad sys/external/bsd/acpica/dist/common/dmtbdump1.c
--- a/sys/external/bsd/acpica/dist/common/dmtbdump1.c   Sat Dec 14 15:40:43 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbdump1.c   Sat Dec 14 16:33:12 2019 +0000
@@ -366,7 +366,6 @@
                 {
                     return;
                 }
-                SubSubOffset += InfoLength;
             }
 
             /* Point to next sub-subtable */
@@ -1293,7 +1292,6 @@
     while (Offset < Table->Length)
     {
         AcpiOsPrintf ("\n");
-        SubtableOffset = 0;
 
         /* Dump HMAT structure header */
 
@@ -1376,6 +1374,11 @@
                 Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
                     ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
                     4, AcpiDmTableInfoHmat1a);
+                if (ACPI_FAILURE (Status))
+                {
+                    return;
+                }
+
                 SubtableOffset += 4;
             }
 
@@ -1392,6 +1395,11 @@
                 Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
                     ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
                     4, AcpiDmTableInfoHmat1b);
+                if (ACPI_FAILURE (Status))
+                {
+                    return;
+                }
+
                 SubtableOffset += 4;
             }
 
@@ -1411,6 +1419,11 @@
                     Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
                         ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
                         2, AcpiDmTableInfoHmat1c);
+                    if (ACPI_FAILURE(Status))
+                    {
+                        return;
+                    }
+
                     SubtableOffset += 2;
                 }
             }
@@ -1434,6 +1447,11 @@
                 Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
                     ACPI_ADD_PTR (ACPI_HMAT_STRUCTURE, HmatStruct, SubtableOffset),
                     2, AcpiDmTableInfoHmat2a);
+                if (ACPI_FAILURE (Status))
+                {
+                    return;
+                }
+
                 SubtableOffset += 2;
             }
             break;
diff -r 65136ce72045 -r 0ba95ffaacad sys/external/bsd/acpica/dist/common/dmtbdump2.c
--- a/sys/external/bsd/acpica/dist/common/dmtbdump2.c   Sat Dec 14 15:40:43 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbdump2.c   Sat Dec 14 16:33:12 2019 +0000
@@ -79,6 +79,7 @@
     ACPI_DMTABLE_INFO       *InfoTable;
     char                    *String;
     UINT32                  i;
+    UINT32                  MappingByteLength;
 
 
     /* Main table */
@@ -206,6 +207,11 @@
                     Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
                         ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, NodeOffset),
                         4, AcpiDmTableInfoIort0a);
+                    if (ACPI_FAILURE (Status))
+                    {
+                        return;
+                    }
+
                     NodeOffset += 4;
                 }
             }
@@ -217,8 +223,10 @@
 
             if (IortNode->Length > NodeOffset)
             {
+                MappingByteLength =
+                    IortNode->MappingCount * sizeof (ACPI_IORT_ID_MAPPING);
                 Status = AcpiDmDumpTable (Table->Length, Offset + NodeOffset,
-                    Table, IortNode->Length - NodeOffset,
+                    Table, IortNode->Length - NodeOffset - MappingByteLength,
                     AcpiDmTableInfoIort1a);
                 if (ACPI_FAILURE (Status))
                 {
@@ -302,7 +310,6 @@
         /* Point to next node subtable */
 
         Offset += IortNode->Length;
-        IortNode = ACPI_ADD_PTR (ACPI_IORT_NODE, IortNode, IortNode->Length);
     }
 }
 
@@ -1103,7 +1110,6 @@
             /* Has a variable number of 32-bit values at the end */
 
             InfoTable = AcpiDmTableInfoNfit2;
-            Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable);
             FieldOffset = sizeof (ACPI_NFIT_INTERLEAVE);
             break;
 
@@ -1128,7 +1134,6 @@
             /* Has a variable number of 64-bit addresses at the end */
 
             InfoTable = AcpiDmTableInfoNfit6;
-            Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable);
             FieldOffset = sizeof (ACPI_NFIT_FLUSH_ADDRESS) - sizeof (UINT64);
             break;
 
@@ -1165,6 +1170,7 @@
         {
         case ACPI_NFIT_TYPE_INTERLEAVE:
 
+            Interleave = ACPI_CAST_PTR (ACPI_NFIT_INTERLEAVE, Subtable);
             for (i = 0; i < Interleave->LineCount; i++)
             {
                 Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset,
@@ -1200,6 +1206,7 @@
 
         case ACPI_NFIT_TYPE_FLUSH_ADDRESS:
 
+            Hint = ACPI_CAST_PTR (ACPI_NFIT_FLUSH_ADDRESS, Subtable);
             for (i = 0; i < Hint->HintCount; i++)
             {
                 Status = AcpiDmDumpTable (Table->Length, Offset + FieldOffset,
@@ -1698,6 +1705,11 @@
                 Status = AcpiDmDumpTable (Table->Length, Offset + SubtableOffset,
                     ACPI_ADD_PTR (ACPI_SUBTABLE_HEADER, Subtable, SubtableOffset),
                     4, AcpiDmTableInfoPptt0a);
+                if (ACPI_FAILURE (Status))
+                {
+                    return;
+                }
+
                 SubtableOffset += 4;
             }
             break;
@@ -1955,6 +1967,10 @@
                 Status = AcpiDmDumpTable (Table->Length, 0,
                     ACPI_ADD_PTR (UINT8, Pcie, VendorDataOffset),
                     VendorDataLength, AcpiDmTableInfoSdev1b);
+                if (ACPI_FAILURE (Status))
+                {
+                    return;
+                }
             }
             break;
 
diff -r 65136ce72045 -r 0ba95ffaacad sys/external/bsd/acpica/dist/common/dmtbdump3.c
--- a/sys/external/bsd/acpica/dist/common/dmtbdump3.c   Sat Dec 14 15:40:43 2019 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbdump3.c   Sat Dec 14 16:33:12 2019 +0000
@@ -302,7 +302,7 @@
         Namepath = ACPI_ADD_PTR (char, Table, Offset);
         StringLength = strlen (Namepath) + 1;
 
-        AcpiDmLineHeader (Offset, StringLength, "Namestring");
+        AcpiDmLineHeader (Offset, StringLength, "Namepath");
         AcpiOsPrintf ("\"%s\"\n", Namepath);
 
         /* Point to next namepath */
@@ -418,7 +418,7 @@
     {



Home | Main Index | Thread Index | Old Index