svn commit: r295571 - in vendor-sys/acpica/dist: . generate/unix/iasl source/common source/compiler source/components/debugger source/components/disassembler source/components/dispatcher source/com...

Jung-uk Kim jkim at FreeBSD.org
Fri Feb 12 18:53:32 UTC 2016


Author: jkim
Date: Fri Feb 12 18:53:29 2016
New Revision: 295571
URL: https://svnweb.freebsd.org/changeset/base/295571

Log:
  Import ACPICA 20160212.

Added:
  vendor-sys/acpica/dist/source/compiler/asldebug.c   (contents, props changed)
  vendor-sys/acpica/dist/source/compiler/aslexternal.c   (contents, props changed)
  vendor-sys/acpica/dist/source/compiler/aslxrefout.c   (contents, props changed)
Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/generate/unix/iasl/Makefile
  vendor-sys/acpica/dist/source/common/adwalk.c
  vendor-sys/acpica/dist/source/common/ahids.c
  vendor-sys/acpica/dist/source/common/ahpredef.c
  vendor-sys/acpica/dist/source/common/dmextern.c
  vendor-sys/acpica/dist/source/common/dmtable.c
  vendor-sys/acpica/dist/source/common/dmtables.c
  vendor-sys/acpica/dist/source/common/dmtbdump.c
  vendor-sys/acpica/dist/source/common/dmtbinfo.c
  vendor-sys/acpica/dist/source/compiler/aslanalyze.c
  vendor-sys/acpica/dist/source/compiler/aslbtypes.c
  vendor-sys/acpica/dist/source/compiler/aslcodegen.c
  vendor-sys/acpica/dist/source/compiler/aslcompile.c
  vendor-sys/acpica/dist/source/compiler/aslcompiler.h
  vendor-sys/acpica/dist/source/compiler/asldefine.h
  vendor-sys/acpica/dist/source/compiler/aslfiles.c
  vendor-sys/acpica/dist/source/compiler/aslglobal.h
  vendor-sys/acpica/dist/source/compiler/asllength.c
  vendor-sys/acpica/dist/source/compiler/asllisting.c
  vendor-sys/acpica/dist/source/compiler/aslload.c
  vendor-sys/acpica/dist/source/compiler/aslmain.c
  vendor-sys/acpica/dist/source/compiler/aslmap.c
  vendor-sys/acpica/dist/source/compiler/aslmapoutput.c
  vendor-sys/acpica/dist/source/compiler/aslmethod.c
  vendor-sys/acpica/dist/source/compiler/aslopcodes.c
  vendor-sys/acpica/dist/source/compiler/asloperands.c
  vendor-sys/acpica/dist/source/compiler/asloptions.c
  vendor-sys/acpica/dist/source/compiler/aslprune.c
  vendor-sys/acpica/dist/source/compiler/aslrestype2s.c
  vendor-sys/acpica/dist/source/compiler/aslrules.y
  vendor-sys/acpica/dist/source/compiler/aslstubs.c
  vendor-sys/acpica/dist/source/compiler/asltransform.c
  vendor-sys/acpica/dist/source/compiler/asltree.c
  vendor-sys/acpica/dist/source/compiler/asltypes.h
  vendor-sys/acpica/dist/source/compiler/aslutils.c
  vendor-sys/acpica/dist/source/compiler/aslwalks.c
  vendor-sys/acpica/dist/source/compiler/aslxref.c
  vendor-sys/acpica/dist/source/compiler/dtparser.y
  vendor-sys/acpica/dist/source/compiler/prparser.y
  vendor-sys/acpica/dist/source/compiler/prscan.c
  vendor-sys/acpica/dist/source/components/debugger/dbcmds.c
  vendor-sys/acpica/dist/source/components/debugger/dbconvert.c
  vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c
  vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c
  vendor-sys/acpica/dist/source/components/events/evgpeblk.c
  vendor-sys/acpica/dist/source/components/events/evgpeinit.c
  vendor-sys/acpica/dist/source/components/events/evregion.c
  vendor-sys/acpica/dist/source/components/executer/exconfig.c
  vendor-sys/acpica/dist/source/components/executer/exoparg3.c
  vendor-sys/acpica/dist/source/components/hardware/hwxfsleep.c
  vendor-sys/acpica/dist/source/components/namespace/nseval.c
  vendor-sys/acpica/dist/source/components/namespace/nsinit.c
  vendor-sys/acpica/dist/source/components/parser/psargs.c
  vendor-sys/acpica/dist/source/components/tables/tbinstal.c
  vendor-sys/acpica/dist/source/components/tables/tbprint.c
  vendor-sys/acpica/dist/source/components/tables/tbutils.c
  vendor-sys/acpica/dist/source/components/tables/tbxfload.c
  vendor-sys/acpica/dist/source/components/utilities/utcache.c
  vendor-sys/acpica/dist/source/components/utilities/utdecode.c
  vendor-sys/acpica/dist/source/components/utilities/utnonansi.c
  vendor-sys/acpica/dist/source/components/utilities/uttrack.c
  vendor-sys/acpica/dist/source/components/utilities/utxferror.c
  vendor-sys/acpica/dist/source/components/utilities/utxfinit.c
  vendor-sys/acpica/dist/source/include/acdisasm.h
  vendor-sys/acpica/dist/source/include/acglobal.h
  vendor-sys/acpica/dist/source/include/aclocal.h
  vendor-sys/acpica/dist/source/include/acnamesp.h
  vendor-sys/acpica/dist/source/include/acoutput.h
  vendor-sys/acpica/dist/source/include/acpixf.h
  vendor-sys/acpica/dist/source/include/acpredef.h
  vendor-sys/acpica/dist/source/include/actbl.h
  vendor-sys/acpica/dist/source/include/actbl1.h
  vendor-sys/acpica/dist/source/include/actypes.h
  vendor-sys/acpica/dist/source/tools/acpiexec/aemain.c
  vendor-sys/acpica/dist/source/tools/acpisrc/asfile.c
  vendor-sys/acpica/dist/source/tools/acpisrc/astable.c
  vendor-sys/acpica/dist/source/tools/examples/examples.c

Modified: vendor-sys/acpica/dist/changes.txt
==============================================================================
--- vendor-sys/acpica/dist/changes.txt	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/changes.txt	Fri Feb 12 18:53:29 2016	(r295571)
@@ -1,4 +1,66 @@
 ----------------------------------------
+12 February 2016. Summary of changes for version 20160212:
+
+This release is available at https://acpica.org/downloads
+
+1) ACPICA kernel-resident subsystem:
+
+Implemented full support for the ACPI 6.1 specification (released in 
+January). This version of the specification is available at:  
+http://www.uefi.org/specifications
+
+Only a relatively small number of changes were required in ACPICA to 
+support ACPI 6.1, in these areas:
+- New predefined names
+- New _HID values
+- A new subtable for HEST
+- A few other header changes for new values
+
+Ensure \_SB_._INI is executed before any _REG methods are executed. There 
+appears to be existing BIOS code that relies on this behavior. Lv Zheng.
+
+Reverted a change made in version 20151218 which enabled method 
+invocations to be targets of various ASL operators (SuperName and Target 
+grammar elements). While the new behavior is supported by the ACPI 
+specification, other AML interpreters do not support this behavior and 
+never will. The ACPI specification will be updated for ACPI 6.2 to remove 
+this support. Therefore, the change was reverted to the original ACPICA 
+behavior.
+
+ACPICA now supports the GCC 6 compiler.
+
+Current Release: (Note: build changes increased sizes)
+    Non-Debug Version: 136.2K Code, 51.5K Data, 187.7K Total
+    Debug Version:     200.4K Code, 82.0K Data, 282.4K Total
+Previous Release:
+    Non-Debug Version: 102.7K Code, 28.4K Data, 131.1K Total
+    Debug Version:     200.4K Code, 81.9K Data, 282.3K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Completed full support for the ACPI 6.0 External() AML opcode. The 
+compiler emits an external AML opcode for each ASL External statement. 
+This opcode is used by the disassembler to assist with the disassembly of 
+external control methods by specifying the required number of arguments 
+for the method. AML interpreters do not use this opcode. To ensure that 
+interpreters do not even see the opcode, a block of one or more external 
+opcodes is surrounded by an "If(0)" construct. As this feature becomes 
+commonly deployed in BIOS code, the ability of disassemblers to correctly 
+disassemble AML code will be greatly improved. David Box.
+
+iASL: Implemented support for an optional cross-reference output file. 
+The -lx option will create a the cross-reference file with the suffix 
+"xrf". Three different types of cross-reference are created in this file:
+- List of object references made from within each control method
+- Invocation (caller) list for each user-defined control method
+- List of references to each non-method object in the namespace
+
+iASL: Method invocations as ASL Target operands are now disallowed and 
+flagged as errors in preparation for ACPI 6.2 (see the description of the 
+problem above).
+
+----------------------------------------
 8 January 2016. Summary of changes for version 20160108:
 
 1) ACPICA kernel-resident subsystem:

Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/iasl/Makefile	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile	Fri Feb 12 18:53:29 2016	(r295571)
@@ -56,7 +56,9 @@ OBJECTS = \
 	$(OBJDIR)/aslbtypes.o\
 	$(OBJDIR)/aslcodegen.o\
 	$(OBJDIR)/aslcompile.o\
+	$(OBJDIR)/asldebug.o\
 	$(OBJDIR)/aslerror.o\
+	$(OBJDIR)/aslexternal.o\
 	$(OBJDIR)/aslfiles.o\
 	$(OBJDIR)/aslfileio.o\
 	$(OBJDIR)/aslfold.o\
@@ -100,6 +102,7 @@ OBJECTS = \
 	$(OBJDIR)/asluuid.o\
 	$(OBJDIR)/aslwalks.o\
 	$(OBJDIR)/aslxref.o\
+	$(OBJDIR)/aslxrefout.o\
 	$(OBJDIR)/cmfsize.o\
 	$(OBJDIR)/dbfileio.o\
 	$(OBJDIR)/dmbuffer.o\

Modified: vendor-sys/acpica/dist/source/common/adwalk.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/adwalk.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/common/adwalk.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -760,6 +760,7 @@ AcpiDmXrefDescendingOp (
     ACPI_OPERAND_OBJECT     *Object;
     UINT32                  ParamCount = 0;
     char                    *Pathname;
+    UINT16                  Flags = 0;
 
 
     WalkState = Info->WalkState;
@@ -774,7 +775,24 @@ AcpiDmXrefDescendingOp (
     {
         goto Exit;
     }
+    else if (Op->Common.Parent &&
+             Op->Common.Parent->Common.AmlOpcode == AML_EXTERNAL_OP)
+    {
+        /* External() NamePath */
+
+        Path = Op->Common.Value.String;
+        ObjectType = (ACPI_OBJECT_TYPE) Op->Common.Next->Common.Value.Integer;
+        if (ObjectType == ACPI_TYPE_METHOD)
+        {
+            ParamCount = (UINT32)
+                Op->Common.Next->Common.Next->Common.Value.Integer;
+        }
+
+        AcpiDmAddOpToExternalList (Op, Path,
+            (UINT8) ObjectType, ParamCount, Flags);
 
+        goto Exit;
+    }
 
     /* Get the NamePath from the appropriate place */
 
@@ -842,6 +860,7 @@ AcpiDmXrefDescendingOp (
         /* Node was created by an External() statement */
 
         Status = AE_NOT_FOUND;
+        Flags = ACPI_EXT_RESOLVED_REFERENCE;
     }
 
     if (ACPI_FAILURE (Status))
@@ -861,12 +880,12 @@ AcpiDmXrefDescendingOp (
                 if (Node)
                 {
                     AcpiDmAddNodeToExternalList (Node,
-                        (UINT8) ObjectType, 0, 0);
+                        (UINT8) ObjectType, 0, Flags);
                 }
                 else
                 {
                     AcpiDmAddOpToExternalList (Op, Path,
-                        (UINT8) ObjectType, 0, 0);
+                        (UINT8) ObjectType, 0, Flags);
                 }
             }
         }

Modified: vendor-sys/acpica/dist/source/common/ahids.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/ahids.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/common/ahids.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -75,6 +75,10 @@ const AH_DEVICE_ID  AslDeviceIds[] =
     {"ACPI000D",    "Power Meter Device"},
     {"ACPI000E",    "Time and Alarm Device"},
     {"ACPI000F",    "User Presence Detection Device"},
+    {"ACPI0010",    "Processor Container Device"},
+    {"ACPI0011",    "Generic Buttons Device"},
+    {"ACPI0012",    "NVDIMM Root Device"},
+    {"ACPI0013",    "Generic Event Device"},
     {"ADMA0F28",    "Intel Audio DMA"},
     {"AMCR0F28",    "Intel Audio Machine Driver"},
     {"ATK4001",     "Asus Radio Control Button"},
@@ -185,6 +189,7 @@ const AH_DEVICE_ID  AslDeviceIds[] =
     {"PNP0C12",     "Device Bay Controller"},
     {"PNP0C14",     "Windows Management Instrumentation Device"},
     {"PNP0C15",     "Docking Station"},
+    {"PNP0C33",     "Error Device"},
     {"PNP0C40",     "Standard Button Controller"},
     {"PNP0C50",     "HID Protocol Device (I2C bus)"},
     {"PNP0C60",     "Display Sensor Device"},

Modified: vendor-sys/acpica/dist/source/common/ahpredef.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/ahpredef.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/common/ahpredef.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -140,6 +140,7 @@ const AH_PREDEFINED_NAME    AslPredefine
     AH_PREDEF ("_FDI",    "Floppy Drive Information", "Returns a floppy drive information block"),
     AH_PREDEF ("_FDM",    "Floppy Drive Mode", "Sets a floppy drive speed"),
     AH_PREDEF ("_FIF",    "Fan Information", "Returns fan device information"),
+    AH_PREDEF ("_FIT",    "Firmware Interface Table", "Returns a list of NFIT structures"),
     AH_PREDEF ("_FIX",    "Fixed Register Resource Provider", "Returns a list of devices that implement FADT register blocks"),
     AH_PREDEF ("_FLC",    "Flow Control", "Flow control, Resource Descriptor field"),
     AH_PREDEF ("_FPS",    "Fan Performance States", "Returns a list of supported fan performance states"),
@@ -332,8 +333,10 @@ const AH_PREDEFINED_NAME    AslPredefine
     AH_PREDEF ("_UPP",    "User Presence Polling", "Returns the recommended user presence polling interval"),
     AH_PREDEF ("_VEN",    "Vendor Data", "Resource Descriptor field"),
     AH_PREDEF ("_VPO",    "Video Post Options", "Returns the implemented video post options"),
-    AH_PREDEF ("_WAK",    "Wake", "Inform AML that the system has just awakened"),
     AH_PREDEF ("_Wxx",    "Wake Event", "Method executed as a result of a wake event"),
+    AH_PREDEF ("_WAK",    "Wake", "Inform AML that the system has just awakened"),
+    AH_PREDEF ("_WPC",    "Wireless Power Calibration", "Calibrate power and notify wireless device"),
+    AH_PREDEF ("_WPP",    "Wireless Power Polling", "Get recommended polling interval"),
     AH_PREDEF (NULL,      NULL, NULL)
 };
 

Modified: vendor-sys/acpica/dist/source/common/dmextern.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmextern.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/common/dmextern.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -754,6 +754,46 @@ AcpiDmAddPathToExternalList (
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDmEternalIsMatch
+ *
+ * PARAMETERS:  NamePath            - Path to match to External Name
+ *              ExternalPath        - External NamePath to be matched
+ *
+ * RETURN:      BOOLEAN
+ *
+ * DESCRIPTION: Returns TRUE if NamePath matches the last NamePath-length
+ *              characters of ExternalPath.
+ *
+ *              External (_SB_.DEV0.ABCD) will match:
+ *                  _SB_.DEV0.ABCD
+ *                  DEV0.ABCD
+ *                  ABCD
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AcpiDmExternalIsMatch (
+    const char *            NamePath,
+    const char *            ListNamePath)
+{
+    BOOLEAN                 Match = FALSE;
+
+
+    if (strlen (ListNamePath) >= strlen (NamePath))
+    {
+        if (!strcmp (ListNamePath +
+            (strlen (ListNamePath) - strlen (NamePath)), NamePath))
+        {
+            return (TRUE);
+        }
+    }
+
+    return (Match);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDmCreateNewExternal
  *
  * PARAMETERS:  ExternalPath        - External path to the object
@@ -808,11 +848,14 @@ AcpiDmCreateNewExternal (
     NextExternal = AcpiGbl_ExternalList;
     while (NextExternal)
     {
-        if (!strcmp (ExternalPath, NextExternal->Path))
+        /* Check for duplicates */
+
+        if (AcpiDmExternalIsMatch (ExternalPath, NextExternal->Path))
         {
             /* Duplicate method, check that the Value (ArgCount) is the same */
 
             if ((NextExternal->Type == ACPI_TYPE_METHOD) &&
+                (NextExternal->Flags & ANOBJ_IS_EXTERNAL) &&
                 (NextExternal->Value != Value) &&
                 (Value > 0))
             {
@@ -830,6 +873,11 @@ AcpiDmCreateNewExternal (
                 NextExternal->Value = Value;
             }
 
+            /* Update flags. */
+
+            NextExternal->Flags |= Flags;
+            NextExternal->Flags &= ~ACPI_EXT_INTERNAL_PATH_ALLOCATED;
+
             return_ACPI_STATUS (AE_ALREADY_EXISTS);
         }
 
@@ -1266,76 +1314,85 @@ appearing in an SSDT, the disassembler d
 the owning SSDT has been loaded via the -e option.
 #endif
 
+static char             ExternalWarningPart1[600];
+static char             ExternalWarningPart2[400];
+static char             ExternalWarningPart3[400];
+static char             ExternalWarningPart4[200];
+
 void
 AcpiDmUnresolvedWarning (
     UINT8                   Type)
 {
+    char                    *Format;
+    char                    Pad[] = "     *";
+    char                    NoPad[] = "";
+
 
     if (!AcpiGbl_NumExternalMethods)
     {
         return;
     }
 
+    if (AcpiGbl_NumExternalMethods == AcpiGbl_ResolvedExternalMethods)
+    {
+        return;
+    }
+
+    Format = Type ? Pad : NoPad;
+
+    sprintf (ExternalWarningPart1,
+        "%s iASL Warning: There were %u external control methods found during\n"
+        "%s disassembly, but only %u %s resolved (%u unresolved). Additional\n"
+        "%s ACPI tables may be required to properly disassemble the code. This\n"
+        "%s resulting disassembler output file may not compile because the\n"
+        "%s disassembler did not know how many arguments to assign to the\n"
+        "%s unresolved methods. Note: SSDTs can be dynamically loaded at\n"
+        "%s runtime and may or may not be available via the host OS.\n",
+        Format, AcpiGbl_NumExternalMethods, Format, AcpiGbl_ResolvedExternalMethods,
+        (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"),
+        (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods),
+        Format, Format, Format, Format, Format);
+
+    sprintf (ExternalWarningPart2,
+        "%s To specify the tables needed to resolve external control method\n"
+        "%s references, the -e option can be used to specify the filenames.\n"
+        "%s Example iASL invocations:\n"
+        "%s     iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml\n"
+        "%s     iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml\n"
+        "%s     iasl -e ssdt*.aml -d dsdt.aml\n",
+        Format, Format, Format, Format, Format, Format);
+
+    sprintf (ExternalWarningPart3,
+        "%s In addition, the -fe option can be used to specify a file containing\n"
+        "%s control method external declarations with the associated method\n"
+        "%s argument counts. Each line of the file must be of the form:\n"
+        "%s     External (<method pathname>, MethodObj, <argument count>)\n"
+        "%s Invocation:\n"
+        "%s     iasl -fe refs.txt -d dsdt.aml\n",
+        Format, Format, Format, Format, Format, Format);
+
+    sprintf (ExternalWarningPart4,
+        "%s The following methods were unresolved and many not compile properly\n"
+        "%s because the disassembler had to guess at the number of arguments\n"
+        "%s required for each:\n",
+        Format, Format, Format);
+
     if (Type)
     {
         if (!AcpiGbl_ExternalFileList)
         {
             /* The -e option was not specified */
 
-           AcpiOsPrintf ("    /*\n"
-                "     * iASL Warning: There were %u external control methods found during\n"
-                "     * disassembly, but additional ACPI tables to resolve these externals\n"
-                "     * were not specified. This resulting disassembler output file may not\n"
-                "     * compile because the disassembler did not know how many arguments\n"
-                "     * to assign to these methods. To specify the tables needed to resolve\n"
-                "     * external control method references, the -e option can be used to\n"
-                "     * specify the filenames. Note: SSDTs can be dynamically loaded at\n"
-                "     * runtime and may or may not be available via the host OS.\n"
-                "     * Example iASL invocations:\n"
-                "     *     iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml\n"
-                "     *     iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml\n"
-                "     *     iasl -e ssdt*.aml -d dsdt.aml\n"
-                "     *\n"
-                "     * In addition, the -fe option can be used to specify a file containing\n"
-                "     * control method external declarations with the associated method\n"
-                "     * argument counts. Each line of the file must be of the form:\n"
-                "     *     External (<method pathname>, MethodObj, <argument count>)\n"
-                "     * Invocation:\n"
-                "     *     iasl -fe refs.txt -d dsdt.aml\n"
-                "     *\n"
-                "     * The following methods were unresolved and many not compile properly\n"
-                "     * because the disassembler had to guess at the number of arguments\n"
-                "     * required for each:\n"
-                "     */\n",
-               AcpiGbl_NumExternalMethods);
+           AcpiOsPrintf ("    /*\n%s     *\n%s     *\n%s     *\n%s     */\n",
+               ExternalWarningPart1, ExternalWarningPart2, ExternalWarningPart3,
+               ExternalWarningPart4);
         }
-        else if (AcpiGbl_NumExternalMethods != AcpiGbl_ResolvedExternalMethods)
+        else
         {
             /* The -e option was specified, but there are still some unresolved externals */
 
-            AcpiOsPrintf ("    /*\n"
-                "     * iASL Warning: There were %u external control methods found during\n"
-                "     * disassembly, but only %u %s resolved (%u unresolved). Additional\n"
-                "     * ACPI tables may be required to properly disassemble the code. This\n"
-                "     * resulting disassembler output file may not compile because the\n"
-                "     * disassembler did not know how many arguments to assign to the\n"
-                "     * unresolved methods. Note: SSDTs can be dynamically loaded at\n"
-                "     * runtime and may or may not be available via the host OS.\n"
-                "     *\n"
-                "     * If necessary, the -fe option can be used to specify a file containing\n"
-                "     * control method external declarations with the associated method\n"
-                "     * argument counts. Each line of the file must be of the form:\n"
-                "     *     External (<method pathname>, MethodObj, <argument count>)\n"
-                "     * Invocation:\n"
-                "     *     iasl -fe refs.txt -d dsdt.aml\n"
-                "     *\n"
-                "     * The following methods were unresolved and many not compile properly\n"
-                "     * because the disassembler had to guess at the number of arguments\n"
-                "     * required for each:\n"
-                "     */\n",
-                AcpiGbl_NumExternalMethods, AcpiGbl_ResolvedExternalMethods,
-                (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"),
-                (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods));
+            AcpiOsPrintf ("    /*\n%s     *\n     *\n     */\n",
+               ExternalWarningPart1, ExternalWarningPart3, ExternalWarningPart4);
         }
     }
     else
@@ -1344,50 +1401,15 @@ AcpiDmUnresolvedWarning (
         {
             /* The -e option was not specified */
 
-            fprintf (stderr, "\n"
-                "iASL Warning: There were %u external control methods found during\n"
-                "disassembly, but additional ACPI tables to resolve these externals\n"
-                "were not specified. The resulting disassembler output file may not\n"
-                "compile because the disassembler did not know how many arguments\n"
-                "to assign to these methods. To specify the tables needed to resolve\n"
-                "external control method references, the -e option can be used to\n"
-                "specify the filenames. Note: SSDTs can be dynamically loaded at\n"
-                "runtime and may or may not be available via the host OS.\n"
-                "Example iASL invocations:\n"
-                "    iasl -e ssdt1.aml ssdt2.aml ssdt3.aml -d dsdt.aml\n"
-                "    iasl -e dsdt.aml ssdt2.aml -d ssdt1.aml\n"
-                "    iasl -e ssdt*.aml -d dsdt.aml\n"
-                "\n"
-                "In addition, the -fe option can be used to specify a file containing\n"
-                "control method external declarations with the associated method\n"
-                "argument counts. Each line of the file must be of the form:\n"
-                "    External (<method pathname>, MethodObj, <argument count>)\n"
-                "Invocation:\n"
-                "    iasl -fe refs.txt -d dsdt.aml\n",
-                AcpiGbl_NumExternalMethods);
+            fprintf (stderr, "\n%s\n%s\n%s\n",
+               ExternalWarningPart1, ExternalWarningPart2, ExternalWarningPart3);
         }
-        else if (AcpiGbl_NumExternalMethods != AcpiGbl_ResolvedExternalMethods)
+        else
         {
             /* The -e option was specified, but there are still some unresolved externals */
 
-            fprintf (stderr, "\n"
-                "iASL Warning: There were %u external control methods found during\n"
-                "disassembly, but only %u %s resolved (%u unresolved). Additional\n"
-                "ACPI tables may be required to properly disassemble the code. The\n"
-                "resulting disassembler output file may not compile because the\n"
-                "disassembler did not know how many arguments to assign to the\n"
-                "unresolved methods. Note: SSDTs can be dynamically loaded at\n"
-                "runtime and may or may not be available via the host OS.\n"
-                "\n"
-                "If necessary, the -fe option can be used to specify a file containing\n"
-                "control method external declarations with the associated method\n"
-                "argument counts. Each line of the file must be of the form:\n"
-                "    External (<method pathname>, MethodObj, <argument count>)\n"
-                "Invocation:\n"
-                "    iasl -fe refs.txt -d dsdt.aml\n",
-                AcpiGbl_NumExternalMethods, AcpiGbl_ResolvedExternalMethods,
-                (AcpiGbl_ResolvedExternalMethods > 1 ? "were" : "was"),
-                (AcpiGbl_NumExternalMethods - AcpiGbl_ResolvedExternalMethods));
+            fprintf (stderr, "\n%s\n%s\n",
+               ExternalWarningPart1, ExternalWarningPart3);
         }
     }
 }

Modified: vendor-sys/acpica/dist/source/common/dmtable.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtable.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/common/dmtable.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -196,6 +196,7 @@ static const char           *AcpiDmHestS
     "PCI Express AER (AER Endpoint)",
     "PCI Express/PCI-X Bridge AER",
     "Generic Hardware Error Source",
+    "Generic Hardware Error Source V2",
     "Unknown Subtable Type"         /* Reserved */
 };
 

Modified: vendor-sys/acpica/dist/source/common/dmtables.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtables.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/common/dmtables.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -145,6 +145,11 @@ AdCreateTableHeader (
     UINT8                   Checksum;
 
 
+    /* Reset globals for External statements */
+
+    AcpiGbl_NumExternalMethods = 0;
+    AcpiGbl_ResolvedExternalMethods = 0;
+
     /*
      * Print file header and dump original table header
      */

Modified: vendor-sys/acpica/dist/source/common/dmtbdump.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtbdump.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/common/dmtbdump.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -1616,6 +1616,12 @@ AcpiDmDumpHest (
             SubTableLength = sizeof (ACPI_HEST_GENERIC);
             break;
 
+        case ACPI_HEST_TYPE_GENERIC_ERROR_V2:
+
+            InfoTable = AcpiDmTableInfoHest10;
+            SubTableLength = sizeof (ACPI_HEST_GENERIC_V2);
+            break;
+
         default:
 
             /* Cannot continue on unknown type - no length */

Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtbinfo.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/common/dmtbinfo.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -163,6 +163,7 @@
 #define ACPI_HEST7_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_AER,f)
 #define ACPI_HEST8_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_AER_BRIDGE,f)
 #define ACPI_HEST9_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC,f)
+#define ACPI_HEST10_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_HEST_GENERIC_V2,f)
 #define ACPI_HESTN_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_NOTIFY,f)
 #define ACPI_HESTB_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_HEST_IA_ERROR_BANK,f)
 #define ACPI_IORT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_ITS_GROUP,f)
@@ -1342,6 +1343,26 @@ ACPI_DMTABLE_INFO           AcpiDmTableI
     ACPI_DMT_TERMINATOR
 };
 
+/* 10: Generic Hardware Error Source - Version 2 */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoHest10[] =
+{
+    ACPI_DM_HEST_HEADER,
+    {ACPI_DMT_UINT16,   ACPI_HEST10_OFFSET (RelatedSourceId),       "Related Source Id", 0},
+    {ACPI_DMT_UINT8,    ACPI_HEST10_OFFSET (Reserved),              "Reserved", 0},
+    {ACPI_DMT_UINT8,    ACPI_HEST10_OFFSET (Enabled),               "Enabled", 0},
+    {ACPI_DMT_UINT32,   ACPI_HEST10_OFFSET (RecordsToPreallocate),  "Records To Preallocate", 0},
+    {ACPI_DMT_UINT32,   ACPI_HEST10_OFFSET (MaxSectionsPerRecord),  "Max Sections Per Record", 0},
+    {ACPI_DMT_UINT32,   ACPI_HEST10_OFFSET (MaxRawDataLength),      "Max Raw Data Length", 0},
+    {ACPI_DMT_GAS,      ACPI_HEST10_OFFSET (ErrorStatusAddress),    "Error Status Address", 0},
+    {ACPI_DMT_HESTNTFY, ACPI_HEST10_OFFSET (Notify),                "Notify", 0},
+    {ACPI_DMT_UINT32,   ACPI_HEST10_OFFSET (ErrorBlockLength),      "Error Status Block Length", 0},
+    {ACPI_DMT_GAS,      ACPI_HEST10_OFFSET (ReadAckRegister),       "Read Ack Register", 0},
+    {ACPI_DMT_UINT64,   ACPI_HEST10_OFFSET (ReadAckPreserve),       "Read Ack Preserve", 0},
+    {ACPI_DMT_UINT64,   ACPI_HEST10_OFFSET (ReadAckWrite),          "Read Ack Write", 0},
+    ACPI_DMT_TERMINATOR
+};
+
 ACPI_DMTABLE_INFO           AcpiDmTableInfoHestNotify[] =
 {
     {ACPI_DMT_HESTNTYP, ACPI_HESTN_OFFSET (Type),                   "Notify Type", 0},
@@ -2141,6 +2162,7 @@ ACPI_DMTABLE_INFO           AcpiDmTableI
     {ACPI_DMT_FLAG3,    ACPI_NFIT1_FLAG_OFFSET (Flags,0),           "Device not armed", 0},
     {ACPI_DMT_FLAG4,    ACPI_NFIT1_FLAG_OFFSET (Flags,0),           "Health events observed", 0},
     {ACPI_DMT_FLAG5,    ACPI_NFIT1_FLAG_OFFSET (Flags,0),           "Health events enabled", 0},
+    {ACPI_DMT_FLAG6,    ACPI_NFIT1_FLAG_OFFSET (Flags,0),           "Mapping failed", 0},
     {ACPI_DMT_UINT16,   ACPI_NFIT1_OFFSET (Reserved),               "Reserved", 0},
     ACPI_DMT_TERMINATOR
 };

Modified: vendor-sys/acpica/dist/source/compiler/aslanalyze.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslanalyze.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -308,6 +308,12 @@ AnCheckMethodReturnValue (
 
     Node = ArgOp->Asl.Node;
 
+    if (!Node)
+    {
+        /* No error message, this can happen and is OK */
+
+        return;
+    }
 
     /* Examine the parent op of this method */
 

Modified: vendor-sys/acpica/dist/source/compiler/aslbtypes.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslbtypes.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/compiler/aslbtypes.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -408,12 +408,25 @@ AnGetBtype (
         Node = Op->Asl.Node;
         if (!Node)
         {
+            /* These are not expected to have a node at this time */
+
+            if ((Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CREATEWORDFIELD) ||
+                (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CREATEDWORDFIELD) ||
+                (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CREATEQWORDFIELD) ||
+                (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CREATEBYTEFIELD) ||
+                (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CREATEBITFIELD) ||
+                (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CREATEFIELD)    ||
+                (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_CONDREFOF))
+            {
+                return (ACPI_UINT32_MAX - 1);
+            }
+
             DbgPrint (ASL_DEBUG_OUTPUT,
                 "No attached Nsnode: [%s] at line %u name [%s], "
-                "ignoring typecheck\n",
+                "ignoring typecheck. Parent [%s]\n",
                 Op->Asl.ParseOpName, Op->Asl.LineNumber,
-                Op->Asl.ExternalName);
-            return (ACPI_UINT32_MAX);
+                Op->Asl.ExternalName, Op->Asl.Parent->Asl.ParseOpName);
+            return (ACPI_UINT32_MAX - 1);
         }
 
         ThisNodeBtype = AnMapEtypeToBtype (Node->Type);

Modified: vendor-sys/acpica/dist/source/compiler/aslcodegen.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcodegen.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/compiler/aslcodegen.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -97,22 +97,16 @@ CgGenerateAmlOutput (
     void)
 {
 
-    DbgPrint (ASL_DEBUG_OUTPUT, "\nWriting AML\n\n");
-
     /* Generate the AML output file */
 
     FlSeekFile (ASL_FILE_SOURCE_OUTPUT, 0);
     Gbl_SourceLine = 0;
     Gbl_NextError = Gbl_ErrorLog;
 
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
         CgAmlWriteWalk, NULL, NULL);
 
-    DbgPrint (ASL_TREE_OUTPUT,
-        "%*s Value    P_Op A_Op OpLen PByts Len  SubLen PSubLen OpPtr"
-        "    Parent   Child    Next     Flags    AcTyp    Final Col L#  EL#  LL#  ELL#\n",
-        76, " ");
-
+    DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_HEADER2);
     CgCloseTable ();
 }
 
@@ -136,40 +130,43 @@ CgAmlWriteWalk (
     void                    *Context)
 {
 
-    /*
-     * Print header at level 0. Alignment assumes 32-bit pointers
-     */
-    if (!Level)
+    /* Generate the AML for this node */
+
+    CgWriteNode (Op);
+
+    if (!Gbl_DebugFlag)
     {
-        DbgPrint (ASL_TREE_OUTPUT,
-            "Final parse tree used for AML output:\n");
-        DbgPrint (ASL_TREE_OUTPUT,
-            "%*s Value    P_Op A_Op OpLen PByts Len  SubLen PSubLen OpPtr"
-            "    Parent   Child    Next     Flags    AcTyp    Final Col L#  EL#  LL#  ELL#\n",
-            76, " ");
+        return (AE_OK);
     }
 
-    /* Debug output */
-
-    DbgPrint (ASL_TREE_OUTPUT,
-        "%5.5d [%2d]", Op->Asl.LogicalLineNumber, Level);
-    UtPrintFormattedName (Op->Asl.ParseOpcode, Level);
+    /* Print header at level 0. Alignment assumes 32-bit pointers */
 
-    if (Op->Asl.ParseOpcode == PARSEOP_NAMESEG    ||
-        Op->Asl.ParseOpcode == PARSEOP_NAMESTRING ||
-        Op->Asl.ParseOpcode == PARSEOP_METHODCALL)
+    if (!Level)
     {
         DbgPrint (ASL_TREE_OUTPUT,
-            "%10.32s      ", Op->Asl.ExternalName);
+            "\nFinal parse tree used for AML output:\n");
+        DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_HEADER2);
     }
-    else
+
+    /* Dump ParseOp name and possible value */
+
+    switch (Op->Asl.ParseOpcode)
     {
-        DbgPrint (ASL_TREE_OUTPUT, "                ");
+    case PARSEOP_NAMESEG:
+    case PARSEOP_NAMESTRING:
+    case PARSEOP_METHODCALL:
+    case PARSEOP_STRING_LITERAL:
+
+        UtDumpStringOp (Op, Level);
+        break;
+
+    default:
+
+        UtDumpBasicOp (Op, Level);
+        break;
     }
 
-    DbgPrint (ASL_TREE_OUTPUT,
-        "%08X %04X %04X %01X     %04X  %04X %04X   %04X    "
-        "%08X %08X %08X %08X %08X %08X %04X  %02d  %02d   %02d   %02d   %02d\n",
+    DbgPrint (ASL_TREE_OUTPUT, ASL_PARSE_TREE_DEBUG2,
         /* 1  */ (UINT32) Op->Asl.Value.Integer,
         /* 2  */ Op->Asl.ParseOpcode,
         /* 3  */ Op->Asl.AmlOpcode,
@@ -191,9 +188,6 @@ CgAmlWriteWalk (
         /* 19 */ Op->Asl.LogicalLineNumber,
         /* 20 */ Op->Asl.EndLogicalLine);
 
-    /* Generate the AML for this node */
-
-    CgWriteNode (Op);
     return (AE_OK);
 }
 
@@ -558,7 +552,7 @@ CgCloseTable (
 
     /* Process all definition blocks */
 
-    Op = RootNode->Asl.Child;
+    Op = Gbl_ParseTreeRoot->Asl.Child;
     while (Op)
     {
         CgUpdateHeader (Op);
@@ -590,7 +584,6 @@ CgWriteNode (
     /* TBD: this may not be the best place for this check */
 
     if ((Op->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)  ||
-        (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL)     ||
         (Op->Asl.ParseOpcode == PARSEOP_INCLUDE)      ||
         (Op->Asl.ParseOpcode == PARSEOP_INCLUDE_END))
     {

Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompile.c	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/compiler/aslcompile.c	Fri Feb 12 18:53:29 2016	(r295571)
@@ -138,7 +138,7 @@ CmDoCompile (
 
     /* Did the parse tree get successfully constructed? */
 
-    if (!RootNode)
+    if (!Gbl_ParseTreeRoot)
     {
         /*
          * If there are no errors, then we have some sort of
@@ -166,22 +166,22 @@ CmDoCompile (
 
     LsDumpParseTree ();
 
-    OpcGetIntegerWidth (RootNode->Asl.Child);
+    OpcGetIntegerWidth (Gbl_ParseTreeRoot->Asl.Child);
     UtEndEvent (Event);
 
     /* Pre-process parse tree for any operator transforms */
 
     Event = UtBeginEvent ("Parse tree transforms");
     DbgPrint (ASL_DEBUG_OUTPUT, "\nParse tree transforms\n\n");
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
-        TrAmlTransformWalk, NULL, NULL);
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
+        TrAmlTransformWalkBegin, TrAmlTransformWalkEnd, NULL);
     UtEndEvent (Event);
 
     /* Generate AML opcodes corresponding to the parse tokens */
 
     Event = UtBeginEvent ("Generate AML opcodes");
-    DbgPrint (ASL_DEBUG_OUTPUT, "\nGenerating AML opcodes\n\n");
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_UPWARD, NULL,
+    DbgPrint (ASL_DEBUG_OUTPUT, "Generating AML opcodes\n\n");
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
         OpcAmlOpcodeWalk, NULL);
     UtEndEvent (Event);
 
@@ -203,11 +203,11 @@ CmDoCompile (
 
     Event = UtBeginEvent ("Constant folding via AML interpreter");
     DbgPrint (ASL_DEBUG_OUTPUT,
-        "\nInterpreting compile-time constant expressions\n\n");
+        "Interpreting compile-time constant expressions\n\n");
 
     if (Gbl_FoldConstants)
     {
-        TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
+        TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
             OpcAmlConstantWalk, NULL, NULL);
     }
     else
@@ -220,16 +220,16 @@ CmDoCompile (
 
     Event = UtBeginEvent ("Updating AML opcodes after constant folding");
     DbgPrint (ASL_DEBUG_OUTPUT,
-        "\nUpdating AML opcodes after constant folding\n\n");
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_UPWARD,
+        "Updating AML opcodes after constant folding\n\n");
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
         NULL, OpcAmlOpcodeUpdateWalk, NULL);
     UtEndEvent (Event);
 
     /* Calculate all AML package lengths */
 
     Event = UtBeginEvent ("Generate AML package lengths");
-    DbgPrint (ASL_DEBUG_OUTPUT, "\nGenerating Package lengths\n\n");
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_UPWARD, NULL,
+    DbgPrint (ASL_DEBUG_OUTPUT, "Generating Package lengths\n\n");
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
         LnPackageLengthWalk, NULL);
     UtEndEvent (Event);
 
@@ -255,7 +255,8 @@ CmDoCompile (
     /* Namespace loading */
 
     Event = UtBeginEvent ("Create ACPI Namespace");
-    Status = LdLoadNamespace (RootNode);
+    DbgPrint (ASL_DEBUG_OUTPUT, "Creating ACPI Namespace\n\n");
+    Status = LdLoadNamespace (Gbl_ParseTreeRoot);
     UtEndEvent (Event);
     if (ACPI_FAILURE (Status))
     {
@@ -266,6 +267,7 @@ CmDoCompile (
 
     AslGbl_NamespaceEvent = UtBeginEvent (
         "Cross reference parse tree and Namespace");
+    DbgPrint (ASL_DEBUG_OUTPUT, "Cross referencing namespace\n\n");
     Status = XfCrossReferenceNamespace ();
     if (ACPI_FAILURE (Status))
     {
@@ -277,6 +279,14 @@ CmDoCompile (
     LkFindUnreferencedObjects ();
     UtEndEvent (AslGbl_NamespaceEvent);
 
+    /* Resolve External Declarations */
+
+    Event = UtBeginEvent ("Resolve all Externals");
+    DbgPrint (ASL_DEBUG_OUTPUT, "\nResolve Externals\n\n");
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
+        ExAmlExternalWalkBegin, ExAmlExternalWalkEnd, NULL);
+    UtEndEvent (Event);
+
     /*
      * Semantic analysis. This can happen only after the
      * namespace has been loaded and cross-referenced.
@@ -286,17 +296,30 @@ CmDoCompile (
     Event = UtBeginEvent ("Analyze control method return types");
     AnalysisWalkInfo.MethodStack = NULL;
 
-    DbgPrint (ASL_DEBUG_OUTPUT, "\nSemantic analysis - Method analysis\n\n");
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_TWICE,
+    DbgPrint (ASL_DEBUG_OUTPUT, "Semantic analysis - Method analysis\n\n");
+
+    if (Gbl_CrossReferenceOutput)
+    {
+        OtPrintHeaders ("Part 1: Object Reference Map "
+            "(Object references from within each control method)");
+    }
+
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
         MtMethodAnalysisWalkBegin,
         MtMethodAnalysisWalkEnd, &AnalysisWalkInfo);
     UtEndEvent (Event);
 
+    /* Generate the object cross-reference file if requested */
+
+    Event = UtBeginEvent ("Generate cross-reference file");
+    OtCreateXrefFile ();
+    UtEndEvent (Event);
+
     /* Semantic error checking part two - typing of method returns */
 
     Event = UtBeginEvent ("Determine object types returned by methods");
-    DbgPrint (ASL_DEBUG_OUTPUT, "\nSemantic analysis - Method typing\n\n");
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_UPWARD,
+    DbgPrint (ASL_DEBUG_OUTPUT, "Semantic analysis - Method typing\n\n");
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
         NULL, AnMethodTypingWalkEnd, NULL);
     UtEndEvent (Event);
 
@@ -304,10 +327,10 @@ CmDoCompile (
 
     Event = UtBeginEvent ("Analyze AML operand types");
     DbgPrint (ASL_DEBUG_OUTPUT,
-        "\nSemantic analysis - Operand type checking\n\n");
+        "Semantic analysis - Operand type checking\n\n");
     if (Gbl_DoTypechecking)
     {
-        TrWalkParseTree (RootNode, ASL_WALK_VISIT_UPWARD,
+        TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
             NULL, AnOperandTypecheckWalkEnd, &AnalysisWalkInfo);
     }
     UtEndEvent (Event);
@@ -315,8 +338,8 @@ CmDoCompile (
     /* Semantic error checking part four - other miscellaneous checks */
 
     Event = UtBeginEvent ("Miscellaneous analysis");
-    DbgPrint (ASL_DEBUG_OUTPUT, "\nSemantic analysis - miscellaneous\n\n");
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
+    DbgPrint (ASL_DEBUG_OUTPUT, "Semantic analysis - miscellaneous\n\n");
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
         AnOtherSemanticAnalysisWalkBegin,
         NULL, &AnalysisWalkInfo);
     UtEndEvent (Event);
@@ -324,16 +347,17 @@ CmDoCompile (
     /* Calculate all AML package lengths */
 
     Event = UtBeginEvent ("Finish AML package length generation");
-    DbgPrint (ASL_DEBUG_OUTPUT, "\nGenerating Package lengths\n\n");
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_UPWARD, NULL,
+    DbgPrint (ASL_DEBUG_OUTPUT, "Generating Package lengths\n\n");
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
         LnInitLengthsWalk, NULL);
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_UPWARD, NULL,
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD, NULL,
         LnPackageLengthWalk, NULL);
     UtEndEvent (Event);
 
     /* Code generation - emit the AML */
 
     Event = UtBeginEvent ("Generate AML code and write output files");
+    DbgPrint (ASL_DEBUG_OUTPUT, "Writing AML byte code\n\n");
     CgGenerateAmlOutput ();
     UtEndEvent (Event);
 
@@ -816,7 +840,7 @@ CmDeleteCaches (
     Gbl_ParseOpCount = 0;
     Gbl_ParseOpCacheNext = NULL;
     Gbl_ParseOpCacheLast = NULL;
-    RootNode = NULL;
+    Gbl_ParseTreeRoot = NULL;
 
     /* Generic string cache */
 

Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompiler.h	Fri Feb 12 18:19:32 2016	(r295570)
+++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h	Fri Feb 12 18:53:29 2016	(r295571)
@@ -652,7 +652,13 @@ ApCheckPackage (
  * asltransform - parse tree transformations
  */
 ACPI_STATUS
-TrAmlTransformWalk (
+TrAmlTransformWalkBegin (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    void                    *Context);
+
+ACPI_STATUS
+TrAmlTransformWalkEnd (
     ACPI_PARSE_OBJECT       *Op,
     UINT32                  Level,
     void                    *Context);
@@ -669,6 +675,25 @@ TrWalkParseTree (
     ASL_WALK_CALLBACK       AscendingCallback,
     void                    *Context);
 
+/*
+ * aslexternal - External opcode support
+ */
+ACPI_STATUS
+ExAmlExternalWalkBegin (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    void                    *Context);
+
+ACPI_STATUS
+ExAmlExternalWalkEnd (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    void                    *Context);
+
+void
+ExDoExternal (
+    ACPI_PARSE_OBJECT       *Op);
+
 /* Values for "Visitation" parameter above */
 
 #define ASL_WALK_VISIT_DOWNWARD     0x01
@@ -909,6 +934,24 @@ XfCrossReferenceNamespace (
 
 
 /*
+ * aslxrefout
+ */
+void
+OtPrintHeaders (
+    char                    *Message);
+
+void
+OtCreateXrefFile (
+    void);
+
+void
+OtXrefWalkPart1 (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    ASL_METHOD_INFO         *MethodInfo);
+
+
+/*
  * aslutils - common compiler utilites
  */
 void
@@ -923,11 +966,31 @@ DbgPrint (
 #define ASL_PARSE_OUTPUT    1
 #define ASL_TREE_OUTPUT     2
 
+UINT8
+UtIsBigEndianMachine (
+    void);
+
 BOOLEAN
 UtQueryForOverwrite (
     char                    *Pathname);
 
 void
+UtDumpStringOp (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level);
+
+void
+UtDumpIntegerOp (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    UINT32                  IntegerLength);
+
+void
+UtDumpBasicOp (

*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***


More information about the svn-src-all mailing list