Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 2017 18:46:34 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325670 - in head/sys/contrib/dev/acpica: . common compiler components/debugger components/dispatcher components/events components/namespace components/parser components/utilities include
Message-ID:  <201711101846.vAAIkYGo039679@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Fri Nov 10 18:46:34 2017
New Revision: 325670
URL: https://svnweb.freebsd.org/changeset/base/325670

Log:
  MFV:	r325668
  
  Merge ACPICA 20171110.

Modified:
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/dmtable.c
  head/sys/contrib/dev/acpica/common/dmtbdump.c
  head/sys/contrib/dev/acpica/common/dmtbinfo.c
  head/sys/contrib/dev/acpica/compiler/asldefine.h
  head/sys/contrib/dev/acpica/compiler/dttable2.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.h
  head/sys/contrib/dev/acpica/components/debugger/dbexec.c
  head/sys/contrib/dev/acpica/components/debugger/dbinput.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
  head/sys/contrib/dev/acpica/components/dispatcher/dswload.c
  head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c
  head/sys/contrib/dev/acpica/components/events/evregion.c
  head/sys/contrib/dev/acpica/components/namespace/nsconvert.c
  head/sys/contrib/dev/acpica/components/namespace/nsnames.c
  head/sys/contrib/dev/acpica/components/parser/psargs.c
  head/sys/contrib/dev/acpica/components/utilities/utdecode.c
  head/sys/contrib/dev/acpica/components/utilities/uterror.c
  head/sys/contrib/dev/acpica/components/utilities/utmutex.c
  head/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c
  head/sys/contrib/dev/acpica/components/utilities/uttrack.c
  head/sys/contrib/dev/acpica/components/utilities/utxferror.c
  head/sys/contrib/dev/acpica/include/acdebug.h
  head/sys/contrib/dev/acpica/include/acdisasm.h
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acmacros.h
  head/sys/contrib/dev/acpica/include/acnamesp.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/actbl1.h
  head/sys/contrib/dev/acpica/include/actbl2.h
  head/sys/contrib/dev/acpica/include/acutils.h
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)

Modified: head/sys/contrib/dev/acpica/changes.txt
==============================================================================
--- head/sys/contrib/dev/acpica/changes.txt	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/changes.txt	Fri Nov 10 18:46:34 2017	(r325670)
@@ -1,4 +1,57 @@
 ----------------------------------------
+10 November 2017. Summary of changes for version 20171110:
+
+
+1) ACPICA kernel-resident subsystem:
+
+This release implements full support for ACPI 6.2A:
+    NFIT - Added a new subtable, "Platform Capabilities Structure"
+No other changes to ACPICA were required, since ACPI 6.2A is primarily an 
+errata release of the specification.
+
+Other ACPI table changes:
+    IORT: Added the SMMUv3 Device ID mapping index. Hanjun Guo
+    PPTT: Added cache attribute flag definitions to actbl1.h. Jeremy 
+Linton
+
+Utilities: Modified the string/integer conversion functions to use 
+internal 64-bit divide support instead of a native divide. On 32-bit 
+platforms, a 64-bit divide typically requires a library function which 
+may not be present in the build (kernel or otherwise).
+
+Implemented a targeted error message for timeouts returned from the 
+Embedded Controller device driver. This is seen frequently enough to 
+special-case an AE_TIME returned from an EC operation region access:
+    "Timeout from EC hardware or EC device driver"
+
+Changed the "ACPI Exception" message prefix to "ACPI Error" so that all 
+runtime error messages have the identical prefix.
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+AcpiXtract: Fixed a problem with table header detection within the 
+acpidump file. Processing a table could be ended early if a 0x40 (@) 
+appears in the original binary table, resulting in the @ symbol appearing 
+in the decoded ASCII field at the end of the acpidump text line. The 
+symbol caused acpixtract to incorrectly think it had reached the end of 
+the current table and the beginning of a new table.
+
+AcpiXtract: Added an option (-f) to ignore some errors during table 
+extraction. This initial implementation ignores non-ASCII and non-
+printable characters found in the acpidump text file.
+
+TestSuite(ASLTS)/AcpiExec: Fixed and restored the memory usage statistics 
+for ASLTS. This feature is used to track memory allocations from 
+different memory caches within the ACPICA code. At the end of an ASLTS 
+run, these memory statistics are recorded and stored in a log file.
+
+Debugger (user-space version): Implemented a simple "Background" command. 
+Creates a new thread to execute a control method in the background, while 
+control returns to the debugger prompt to allow additional commands.
+    Syntax: Background <Namepath> [Arguments]
+
+----------------------------------------
 29 September 2017. Summary of changes for version 20170929:
 
 

Modified: head/sys/contrib/dev/acpica/common/dmtable.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmtable.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/common/dmtable.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -356,6 +356,7 @@ static const char           *AcpiDmNfitSubnames[] =
     "NVDIMM Control Region",            /* ACPI_NFIT_TYPE_CONTROL_REGION */
     "NVDIMM Block Data Window Region",  /* ACPI_NFIT_TYPE_DATA_REGION */
     "Flush Hint Address",               /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */
+    "Platform Capabilities",            /* ACPI_NFIT_TYPE_CAPABILITIES */
     "Unknown Subtable Type"             /* Reserved */
 };
 

Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmtbdump.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/common/dmtbdump.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -3061,6 +3061,11 @@ AcpiDmDumpNfit (
             FieldOffset = sizeof (ACPI_NFIT_FLUSH_ADDRESS) - sizeof (UINT64);
             break;
 
+        case ACPI_NFIT_TYPE_CAPABILITIES:    /* ACPI 6.0A */
+
+            InfoTable = AcpiDmTableInfoNfit7;
+            break;
+
         default:
             AcpiOsPrintf ("\n**** Unknown NFIT subtable type 0x%X\n",
                 Subtable->Type);

Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmtbinfo.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/common/dmtbinfo.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -336,6 +336,7 @@
 #define ACPI_NFIT4_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_NFIT_CONTROL_REGION,f)
 #define ACPI_NFIT5_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_NFIT_DATA_REGION,f)
 #define ACPI_NFIT6_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_NFIT_FLUSH_ADDRESS,f)
+#define ACPI_NFIT7_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_NFIT_CAPABILITIES,f)
 #define ACPI_PCCT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
 #define ACPI_PCCT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f)
 #define ACPI_PCCT2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f)
@@ -419,6 +420,7 @@
 #define ACPI_NFIT0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_NFIT_SYSTEM_ADDRESS,f,o)
 #define ACPI_NFIT1_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_NFIT_MEMORY_MAP,f,o)
 #define ACPI_NFIT4_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_NFIT_CONTROL_REGION,f,o)
+#define ACPI_NFIT7_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_NFIT_CAPABILITIES,f,o)
 #define ACPI_PCCT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (ACPI_TABLE_PCCT,f,o)
 #define ACPI_PCCT1_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED,f,o)
 #define ACPI_PCCT2_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f,o)
@@ -1861,6 +1863,7 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoIort4[] =
     {ACPI_DMT_UINT8,    ACPI_IORT4_OFFSET (Pxm),                    "Proximity Domain", 0},
     {ACPI_DMT_UINT8,    ACPI_IORT4_OFFSET (Reserved1),              "Reserved", 0},
     {ACPI_DMT_UINT16,   ACPI_IORT4_OFFSET (Reserved2),              "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (IdMappingIndex),         "Device ID Mapping Index", 0},
     ACPI_DMT_TERMINATOR
 };
 
@@ -2561,6 +2564,18 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoNfit6[] =
 ACPI_DMTABLE_INFO           AcpiDmTableInfoNfit6a[] =
 {
     {ACPI_DMT_UINT64,   0,                                          "Hint Address", DT_OPTIONAL},
+    ACPI_DMT_TERMINATOR
+};
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoNfit7[] =
+{
+    {ACPI_DMT_UINT8,    ACPI_NFIT7_OFFSET (HighestCapability),      "Highest Capability", 0},
+    {ACPI_DMT_UINT24,   ACPI_NFIT7_OFFSET (Reserved[0]),            "Reserved", 0},
+    {ACPI_DMT_UINT32,   ACPI_NFIT7_OFFSET (Capabilities),           "Capabilities (decoded below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_NFIT7_FLAG_OFFSET (Capabilities,0),    "Cache Flush to NVDIMM", 0},
+    {ACPI_DMT_FLAG1,    ACPI_NFIT7_FLAG_OFFSET (Capabilities,0),    "Memory Flush to MVDIMM", 0},
+    {ACPI_DMT_FLAG2,    ACPI_NFIT7_FLAG_OFFSET (Capabilities,0),    "Memory Mirroring", 0},
+    {ACPI_DMT_UINT32,   ACPI_NFIT7_OFFSET (Reserved2),              "Reserved", 0},
     ACPI_DMT_TERMINATOR
 };
 

Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/asldefine.h	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/compiler/asldefine.h	Fri Nov 10 18:46:34 2017	(r325670)
@@ -162,7 +162,7 @@
 #define ASL_CREATOR_ID              "INTL"
 #define ASL_DEFINE                  "__IASL__"
 #define ASL_PREFIX                  "iASL: "
-#define ASL_COMPLIANCE              "Supports ACPI Specification Revision 6.2"
+#define ASL_COMPLIANCE              "Supports ACPI Specification Revision 6.2A"
 
 
 /* Configuration constants */

Modified: head/sys/contrib/dev/acpica/compiler/dttable2.c
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/dttable2.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/compiler/dttable2.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -697,6 +697,11 @@ DtCompileNfit (
             InfoTable = AcpiDmTableInfoNfit6;
             break;
 
+        case ACPI_NFIT_TYPE_CAPABILITIES:
+
+            InfoTable = AcpiDmTableInfoNfit7;
+            break;
+
         default:
 
             DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "NFIT");
@@ -740,7 +745,6 @@ DtCompileNfit (
             }
 
             Interleave->LineCount = Count;
-            DtPopSubtable ();
             break;
 
         case ACPI_NFIT_TYPE_SMBIOS:
@@ -786,7 +790,6 @@ DtCompileNfit (
             }
 
             Hint->HintCount = (UINT16) Count;
-            DtPopSubtable ();
             break;
 
         default:

Modified: head/sys/contrib/dev/acpica/compiler/dttemplate.h
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/dttemplate.h	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/compiler/dttemplate.h	Fri Nov 10 18:46:34 2017	(r325670)
@@ -696,53 +696,56 @@ const unsigned char TemplateHpet[] =
 
 const unsigned char TemplateIort[] =
 {
-    0x49,0x4F,0x52,0x54,0x74,0x01,0x00,0x00,  /* 00000000    "IORTt..." */
-    0x00,0xD2,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "..INTEL " */
-    0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45,  /* 00000010    "TEMPLATE" */
+    0x49,0x4F,0x52,0x54,0x90,0x01,0x00,0x00,  /* 00000000    "IORT...." */
+    0x00,0x5F,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "._INTEL " */
+    0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65,  /* 00000010    "Template" */
     0x00,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
-    0x19,0x01,0x17,0x20,0x05,0x00,0x00,0x00,  /* 00000020    "... ...." */
+    0x31,0x08,0x17,0x20,0x05,0x00,0x00,0x00,  /* 00000020    "1.. ...." */
     0x34,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000028    "4......." */
     0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,  /* 00000030    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000038    "........" */
     0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000040    "........" */
-    0x00,0x00,0x00,0x00,0x01,0x44,0x00,0x00,  /* 00000048    ".....D.." */
+    0x00,0x00,0x00,0x00,0x01,0x58,0x00,0x00,  /* 00000048    ".....X.." */
     0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000050    "........" */
-    0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000058    "0......." */
+    0x44,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000058    "D......." */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000060    "........" */
     0x00,0x5C,0x5F,0x53,0x42,0x2E,0x50,0x43,  /* 00000068    ".\_SB.PC" */
     0x49,0x30,0x2E,0x44,0x45,0x56,0x30,0x00,  /* 00000070    "I0.DEV0." */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000078    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000080    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000088    "........" */
-    0x02,0x34,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000090    ".4......" */
-    0x01,0x00,0x00,0x00,0x20,0x00,0x00,0x00,  /* 00000098    ".... ..." */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000A0    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000A8    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000B0    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000090    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000098    "........" */
+    0x00,0x00,0x00,0x00,0x02,0x34,0x00,0x00,  /* 000000A0    ".....4.." */
+    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 000000A8    "........" */
+    0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000B0    " ......." */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000B8    "........" */
-    0x00,0x00,0x00,0x00,0x03,0x60,0x00,0x00,  /* 000000C0    ".....`.." */
-    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 000000C8    "........" */
-    0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000D0    "L......." */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000D8    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000E0    "........" */
-    0x00,0x00,0x00,0x00,0x3C,0x00,0x00,0x00,  /* 000000E8    "....<..." */
-    0x00,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,  /* 000000F0    "....L..." */
-    0x00,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,  /* 000000F8    "....L..." */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000100    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000108    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000110    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000C0    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000C8    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000D0    "........" */
+    0x03,0x60,0x00,0x01,0x00,0x00,0x00,0x00,  /* 000000D8    ".`......" */
+    0x01,0x00,0x00,0x00,0x4C,0x00,0x00,0x00,  /* 000000E0    "....L..." */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000E8    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000F0    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 000000F8    "........" */
+    0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000100    "<......." */
+    0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000108    "L......." */
+    0x4C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000110    "L......." */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000118    "........" */
-    0x00,0x00,0x00,0x00,0x04,0x50,0x00,0x00,  /* 00000120    ".....P.." */
-    0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,  /* 00000128    "........" */
-    0x3C,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000130    "<......." */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000138    "........" */
-    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000140    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000120    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000128    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000130    "........" */
+    0x04,0x58,0x00,0x01,0x00,0x00,0x00,0x00,  /* 00000138    ".X......" */
+    0x01,0x00,0x00,0x00,0x44,0x00,0x00,0x00,  /* 00000140    "....D..." */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000148    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000150    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000158    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000160    "........" */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000168    "........" */
-    0x00,0x00,0x00,0x00                       /* 00000170    "...."     */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000170    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000178    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000180    "........" */
+    0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00   /* 00000188    "........" */
 };
 
 const unsigned char TemplateIvrs[] =
@@ -939,11 +942,11 @@ const unsigned char TemplateMsct[] =
 
 const unsigned char TemplateNfit[] =
 {
-    0x4E,0x46,0x49,0x54,0x70,0x01,0x00,0x00,  /* 00000000    "NFITp..." */
-    0x01,0x53,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    ".SINTEL " */
+    0x4E,0x46,0x49,0x54,0x80,0x01,0x00,0x00,  /* 00000000    "NFIT...." */
+    0x01,0x07,0x49,0x4E,0x54,0x45,0x4C,0x20,  /* 00000008    "..INTEL " */
     0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65,  /* 00000010    "Template" */
     0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
-    0x10,0x04,0x15,0x20,0x00,0x00,0x00,0x00,  /* 00000020    "... ...." */
+    0x29,0x09,0x17,0x20,0x00,0x00,0x00,0x00,  /* 00000020    ").. ...." */
     0x00,0x00,0x38,0x00,0x01,0x00,0x00,0x00,  /* 00000028    "..8....." */
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000030    "........" */
     0x30,0x05,0xAF,0x91,0x86,0x5D,0x0E,0x47,  /* 00000038    "0....].G" */
@@ -984,7 +987,9 @@ const unsigned char TemplateNfit[] =
     0x06,0x00,0x20,0x00,0x01,0x00,0x00,0x00,  /* 00000150    ".. ....." */
     0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x00,  /* 00000158    "........" */
     0x00,0x00,0x00,0x18,0x04,0x00,0x00,0x00,  /* 00000160    "........" */
-    0x00,0x00,0x00,0x18,0x06,0x00,0x00,0x00   /* 00000168    "........" */
+    0x00,0x00,0x00,0x18,0x06,0x00,0x00,0x00,  /* 00000168    "........" */
+    0x07,0x00,0x10,0x00,0x00,0x00,0x00,0x00,  /* 00000170    "........" */
+    0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00   /* 00000178    "........" */
 };
 
 const unsigned char TemplateMtmr[] =

Modified: head/sys/contrib/dev/acpica/components/debugger/dbexec.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/debugger/dbexec.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/components/debugger/dbexec.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -187,7 +187,11 @@ AcpiDbExecutionWalk (
     void                    *Context,
     void                    **ReturnValue);
 
+static void ACPI_SYSTEM_XFACE
+AcpiDbSingleExecutionThread (
+    void                    *Context);
 
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDbDeleteObjects
@@ -366,7 +370,7 @@ AcpiDbExecuteSetup (
     ACPI_FUNCTION_NAME (DbExecuteSetup);
 
 
-    /* Catenate the current scope to the supplied name */
+    /* Concatenate the current scope to the supplied name */
 
     Info->Pathname[0] = 0;
     if ((Info->Name[0] != '\\') &&
@@ -786,6 +790,124 @@ AcpiDbMethodThread (
                 AcpiFormatException (Status));
         }
     }
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbSingleExecutionThread
+ *
+ * PARAMETERS:  Context                 - Method info struct
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Create one thread and execute a method
+ *
+ ******************************************************************************/
+
+static void ACPI_SYSTEM_XFACE
+AcpiDbSingleExecutionThread (
+    void                    *Context)
+{
+    ACPI_DB_METHOD_INFO     *Info = Context;
+    ACPI_STATUS             Status;
+    ACPI_BUFFER             ReturnObj;
+
+
+    AcpiOsPrintf ("\n");
+
+    Status = AcpiDbExecuteMethod (Info, &ReturnObj);
+    if (ACPI_FAILURE (Status))
+    {
+        AcpiOsPrintf ("%s During evaluation of %s\n",
+            AcpiFormatException (Status), Info->Pathname);
+        return;
+    }
+
+    /* Display a return object, if any */
+
+    if (ReturnObj.Length)
+    {
+        AcpiOsPrintf ("Evaluation of %s returned object %p, "
+            "external buffer length %X\n",
+            AcpiGbl_DbMethodInfo.Pathname, ReturnObj.Pointer,
+            (UINT32) ReturnObj.Length);
+
+        AcpiDbDumpExternalObject (ReturnObj.Pointer, 1);
+    }
+
+    AcpiOsPrintf ("\nBackground thread completed\n%c ",
+        ACPI_DEBUGGER_COMMAND_PROMPT);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDbCreateExecutionThread
+ *
+ * PARAMETERS:  MethodNameArg           - Control method to execute
+ *              Arguments               - Array of arguments to the method
+ *              Types                   - Corresponding array of object types
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Create a single thread to evaluate a namespace object. Handles
+ *              arguments passed on command line for control methods.
+ *
+ ******************************************************************************/
+
+void
+AcpiDbCreateExecutionThread (
+    char                    *MethodNameArg,
+    char                    **Arguments,
+    ACPI_OBJECT_TYPE        *Types)
+{
+    ACPI_STATUS             Status;
+    UINT32                  i;
+
+
+    memset (&AcpiGbl_DbMethodInfo, 0, sizeof (ACPI_DB_METHOD_INFO));
+    AcpiGbl_DbMethodInfo.Name = MethodNameArg;
+    AcpiGbl_DbMethodInfo.InitArgs = 1;
+    AcpiGbl_DbMethodInfo.Args = AcpiGbl_DbMethodInfo.Arguments;
+    AcpiGbl_DbMethodInfo.Types = AcpiGbl_DbMethodInfo.ArgTypes;
+
+    /* Setup method arguments, up to 7 (0-6) */
+
+    for (i = 0; (i < ACPI_METHOD_NUM_ARGS) && *Arguments; i++)
+    {
+        AcpiGbl_DbMethodInfo.Arguments[i] = *Arguments;
+        Arguments++;
+
+        AcpiGbl_DbMethodInfo.ArgTypes[i] = *Types;
+        Types++;
+    }
+
+    Status = AcpiDbExecuteSetup (&AcpiGbl_DbMethodInfo);
+    if (ACPI_FAILURE (Status))
+    {
+        return;
+    }
+
+    /* Get the NS node, determines existence also */
+
+    Status = AcpiGetHandle (NULL, AcpiGbl_DbMethodInfo.Pathname,
+        &AcpiGbl_DbMethodInfo.Method);
+    if (ACPI_FAILURE (Status))
+    {
+        AcpiOsPrintf ("%s Could not get handle for %s\n",
+            AcpiFormatException (Status), AcpiGbl_DbMethodInfo.Pathname);
+        return;
+    }
+
+    Status = AcpiOsExecute (OSL_DEBUGGER_EXEC_THREAD,
+        AcpiDbSingleExecutionThread, &AcpiGbl_DbMethodInfo);
+    if (ACPI_FAILURE (Status))
+    {
+        return;
+    }
+
+    AcpiOsPrintf ("\nBackground thread started\n");
 }
 
 

Modified: head/sys/contrib/dev/acpica/components/debugger/dbinput.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/debugger/dbinput.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/components/debugger/dbinput.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -258,6 +258,7 @@ enum AcpiExDebuggerCommands
     CMD_UNLOAD,
 
     CMD_TERMINATE,
+    CMD_BACKGROUND,
     CMD_THREADS,
 
     CMD_TEST,
@@ -336,6 +337,7 @@ static const ACPI_DB_COMMAND_INFO   AcpiGbl_DbCommands
     {"UNLOAD",       1},
 
     {"TERMINATE",    0},
+    {"BACKGROUND",   1},
     {"THREADS",      3},
 
     {"TEST",         1},
@@ -346,102 +348,113 @@ static const ACPI_DB_COMMAND_INFO   AcpiGbl_DbCommands
 /*
  * Help for all debugger commands. First argument is the number of lines
  * of help to output for the command.
+ *
+ * Note: Some commands are not supported by the kernel-level version of
+ * the debugger.
  */
 static const ACPI_DB_COMMAND_HELP   AcpiGbl_DbCommandHelp[] =
 {
-    {0, "\nGeneral-Purpose Commands:",         "\n"},
-    {1, "  Allocations",                       "Display list of current memory allocations\n"},
-    {2, "  Dump <Address>|<Namepath>",         "\n"},
-    {0, "       [Byte|Word|Dword|Qword]",      "Display ACPI objects or memory\n"},
-    {1, "  Handlers",                          "Info about global handlers\n"},
-    {1, "  Help [Command]",                    "This help screen or individual command\n"},
-    {1, "  History",                           "Display command history buffer\n"},
-    {1, "  Level <DebugLevel>] [console]",     "Get/Set debug level for file or console\n"},
-    {1, "  Locks",                             "Current status of internal mutexes\n"},
-    {1, "  Osi [Install|Remove <name>]",       "Display or modify global _OSI list\n"},
-    {1, "  Quit or Exit",                      "Exit this command\n"},
-    {8, "  Stats <SubCommand>",                "Display namespace and memory statistics\n"},
-    {1, "     Allocations",                    "Display list of current memory allocations\n"},
-    {1, "     Memory",                         "Dump internal memory lists\n"},
-    {1, "     Misc",                           "Namespace search and mutex stats\n"},
-    {1, "     Objects",                        "Summary of namespace objects\n"},
-    {1, "     Sizes",                          "Sizes for each of the internal objects\n"},
-    {1, "     Stack",                          "Display CPU stack usage\n"},
-    {1, "     Tables",                         "Info about current ACPI table(s)\n"},
-    {1, "  Tables",                            "Display info about loaded ACPI tables\n"},
-    {1, "  ! <CommandNumber>",                 "Execute command from history buffer\n"},
-    {1, "  !!",                                "Execute last command again\n"},
+    {0, "\nNamespace Access:",                  "\n"},
+    {1, "  Businfo",                            "Display system bus info\n"},
+    {1, "  Disassemble <Method>",               "Disassemble a control method\n"},
+    {1, "  Find <AcpiName> (? is wildcard)",    "Find ACPI name(s) with wildcards\n"},
+    {1, "  Integrity",                          "Validate namespace integrity\n"},
+    {1, "  Methods",                            "Display list of loaded control methods\n"},
+    {1, "  Namespace [Object] [Depth]",         "Display loaded namespace tree/subtree\n"},
+    {1, "  Notify <Object> <Value>",            "Send a notification on Object\n"},
+    {1, "  Objects [ObjectType]",               "Display summary of all objects or just given type\n"},
+    {1, "  Owner <OwnerId> [Depth]",            "Display loaded namespace by object owner\n"},
+    {1, "  Paths",                              "Display full pathnames of namespace objects\n"},
+    {1, "  Predefined",                         "Check all predefined names\n"},
+    {1, "  Prefix [<Namepath>]",                "Set or Get current execution prefix\n"},
+    {1, "  References <Addr>",                  "Find all references to object at addr\n"},
+    {1, "  Resources [DeviceName]",             "Display Device resources (no arg = all devices)\n"},
+    {1, "  Set N <NamedObject> <Value>",        "Set value for named integer\n"},
+    {1, "  Template <Object>",                  "Format/dump a Buffer/ResourceTemplate\n"},
+    {1, "  Type <Object>",                      "Display object type\n"},
 
-    {0, "\nNamespace Access Commands:",        "\n"},
-    {1, "  Businfo",                           "Display system bus info\n"},
-    {1, "  Disassemble <Method>",              "Disassemble a control method\n"},
-    {1, "  Find <AcpiName> (? is wildcard)",   "Find ACPI name(s) with wildcards\n"},
-    {1, "  Integrity",                         "Validate namespace integrity\n"},
-    {1, "  Methods",                           "Display list of loaded control methods\n"},
-    {1, "  Namespace [Object] [Depth]",        "Display loaded namespace tree/subtree\n"},
-    {1, "  Notify <Object> <Value>",           "Send a notification on Object\n"},
-    {1, "  Objects [ObjectType]",              "Display summary of all objects or just given type\n"},
-    {1, "  Owner <OwnerId> [Depth]",           "Display loaded namespace by object owner\n"},
-    {1, "  Paths",                             "Display full pathnames of namespace objects\n"},
-    {1, "  Predefined",                        "Check all predefined names\n"},
-    {1, "  Prefix [<Namepath>]",               "Set or Get current execution prefix\n"},
-    {1, "  References <Addr>",                 "Find all references to object at addr\n"},
-    {1, "  Resources [DeviceName]",            "Display Device resources (no arg = all devices)\n"},
-    {1, "  Set N <NamedObject> <Value>",       "Set value for named integer\n"},
-    {1, "  Template <Object>",                 "Format/dump a Buffer/ResourceTemplate\n"},
-    {1, "  Type <Object>",                     "Display object type\n"},
+    {0, "\nControl Method Execution:",          "\n"},
+    {1, "  Evaluate <Namepath> [Arguments]",    "Evaluate object or control method\n"},
+    {1, "  Execute <Namepath> [Arguments]",     "Synonym for Evaluate\n"},
+#ifdef ACPI_APPLICATION
+    {1, "  Background <Namepath> [Arguments]",  "Evaluate object/method in a separate thread\n"},
+    {1, "  Thread <Threads><Loops><NamePath>",  "Spawn threads to execute method(s)\n"},
+#endif
+    {1, "  Debug <Namepath> [Arguments]",       "Single-Step a control method\n"},
+    {7, "  [Arguments] formats:",               "Control method argument formats\n"},
+    {1, "     Hex Integer",                     "Integer\n"},
+    {1, "     \"Ascii String\"",                "String\n"},
+    {1, "     (Hex Byte List)",                 "Buffer\n"},
+    {1, "         (01 42 7A BF)",               "Buffer example (4 bytes)\n"},
+    {1, "     [Package Element List]",          "Package\n"},
+    {1, "         [0x01 0x1234 \"string\"]",    "Package example (3 elements)\n"},
 
-    {0, "\nControl Method Execution Commands:","\n"},
-    {1, "  Arguments (or Args)",               "Display method arguments\n"},
-    {1, "  Breakpoint <AmlOffset>",            "Set an AML execution breakpoint\n"},
-    {1, "  Call",                              "Run to next control method invocation\n"},
-    {1, "  Debug <Namepath> [Arguments]",      "Single Step a control method\n"},
-    {6, "  Evaluate",                          "Synonym for Execute\n"},
-    {5, "  Execute <Namepath> [Arguments]",    "Execute control method\n"},
-    {1, "     Hex Integer",                    "Integer method argument\n"},
-    {1, "     \"Ascii String\"",               "String method argument\n"},
-    {1, "     (Hex Byte List)",                "Buffer method argument\n"},
-    {1, "     [Package Element List]",         "Package method argument\n"},
-    {5, "  Execute predefined",                "Execute all predefined (public) methods\n"},
-    {1, "  Go",                                "Allow method to run to completion\n"},
-    {1, "  Information",                       "Display info about the current method\n"},
-    {1, "  Into",                              "Step into (not over) a method call\n"},
-    {1, "  List [# of Aml Opcodes]",           "Display method ASL statements\n"},
-    {1, "  Locals",                            "Display method local variables\n"},
-    {1, "  Results",                           "Display method result stack\n"},
-    {1, "  Set <A|L> <#> <Value>",             "Set method data (Arguments/Locals)\n"},
-    {1, "  Stop",                              "Terminate control method\n"},
-    {5, "  Trace <State> [<Namepath>] [Once]", "Trace control method execution\n"},
-    {1, "     Enable",                         "Enable all messages\n"},
-    {1, "     Disable",                        "Disable tracing\n"},
-    {1, "     Method",                         "Enable method execution messages\n"},
-    {1, "     Opcode",                         "Enable opcode execution messages\n"},
-    {1, "  Tree",                              "Display control method calling tree\n"},
-    {1, "  <Enter>",                           "Single step next AML opcode (over calls)\n"},
-
+    {0, "\nMiscellaneous:",                     "\n"},
+    {1, "  Allocations",                        "Display list of current memory allocations\n"},
+    {2, "  Dump <Address>|<Namepath>",          "\n"},
+    {0, "       [Byte|Word|Dword|Qword]",       "Display ACPI objects or memory\n"},
+    {1, "  Handlers",                           "Info about global handlers\n"},
+    {1, "  Help [Command]",                     "This help screen or individual command\n"},
+    {1, "  History",                            "Display command history buffer\n"},
+    {1, "  Level <DebugLevel>] [console]",      "Get/Set debug level for file or console\n"},
+    {1, "  Locks",                              "Current status of internal mutexes\n"},
+    {1, "  Osi [Install|Remove <name>]",        "Display or modify global _OSI list\n"},
+    {1, "  Quit or Exit",                       "Exit this command\n"},
+    {8, "  Stats <SubCommand>",                 "Display namespace and memory statistics\n"},
+    {1, "     Allocations",                     "Display list of current memory allocations\n"},
+    {1, "     Memory",                          "Dump internal memory lists\n"},
+    {1, "     Misc",                            "Namespace search and mutex stats\n"},
+    {1, "     Objects",                         "Summary of namespace objects\n"},
+    {1, "     Sizes",                           "Sizes for each of the internal objects\n"},
+    {1, "     Stack",                           "Display CPU stack usage\n"},
+    {1, "     Tables",                          "Info about current ACPI table(s)\n"},
+    {1, "  Tables",                             "Display info about loaded ACPI tables\n"},
 #ifdef ACPI_APPLICATION
-    {0, "\nHardware Simulation Commands:",         "\n"},
-    {1, "  EnableAcpi",                        "Enable ACPI (hardware) mode\n"},
-    {1, "  Event <F|G> <Value>",               "Generate AcpiEvent (Fixed/GPE)\n"},
-    {1, "  Gpe <GpeNum> [GpeBlockDevice]",     "Simulate a GPE\n"},
-    {1, "  Gpes",                              "Display info on all GPE devices\n"},
-    {1, "  Sci",                               "Generate an SCI\n"},
-    {1, "  Sleep [SleepState]",                "Simulate sleep/wake sequence(s) (0-5)\n"},
+    {1, "  Terminate",                          "Delete namespace and all internal objects\n"},
+#endif
+    {1, "  ! <CommandNumber>",                  "Execute command from history buffer\n"},
+    {1, "  !!",                                 "Execute last command again\n"},
 
-    {0, "\nFile I/O Commands:",                "\n"},
-    {1, "  Close",                             "Close debug output file\n"},
-    {1, "  Load <Input Filename>",             "Load ACPI table from a file\n"},
-    {1, "  Open <Output Filename>",            "Open a file for debug output\n"},
-    {1, "  Unload <Namepath>",                 "Unload an ACPI table via namespace object\n"},
+    {0, "\nMethod and Namespace Debugging:",    "\n"},
+    {5, "  Trace <State> [<Namepath>] [Once]",  "Trace control method execution\n"},
+    {1, "     Enable",                          "Enable all messages\n"},
+    {1, "     Disable",                         "Disable tracing\n"},
+    {1, "     Method",                          "Enable method execution messages\n"},
+    {1, "     Opcode",                          "Enable opcode execution messages\n"},
+    {3, "  Test <TestName>",                    "Invoke a debug test\n"},
+    {1, "     Objects",                         "Read/write/compare all namespace data objects\n"},
+    {1, "     Predefined",                      "Validate all ACPI predefined names (_STA, etc.)\n"},
+    {1, "  Execute predefined",                 "Execute all predefined (public) methods\n"},
 
-    {0, "\nUser Space Commands:",              "\n"},
-    {1, "  Terminate",                         "Delete namespace and all internal objects\n"},
-    {1, "  Thread <Threads><Loops><NamePath>", "Spawn threads to execute method(s)\n"},
+    {0, "\nControl Method Single-Step Execution:","\n"},
+    {1, "  Arguments (or Args)",                "Display method arguments\n"},
+    {1, "  Breakpoint <AmlOffset>",             "Set an AML execution breakpoint\n"},
+    {1, "  Call",                               "Run to next control method invocation\n"},
+    {1, "  Go",                                 "Allow method to run to completion\n"},
+    {1, "  Information",                        "Display info about the current method\n"},
+    {1, "  Into",                               "Step into (not over) a method call\n"},
+    {1, "  List [# of Aml Opcodes]",            "Display method ASL statements\n"},
+    {1, "  Locals",                             "Display method local variables\n"},
+    {1, "  Results",                            "Display method result stack\n"},
+    {1, "  Set <A|L> <#> <Value>",              "Set method data (Arguments/Locals)\n"},
+    {1, "  Stop",                               "Terminate control method\n"},
+    {1, "  Tree",                               "Display control method calling tree\n"},
+    {1, "  <Enter>",                            "Single step next AML opcode (over calls)\n"},
 
-    {0, "\nDebug Test Commands:",              "\n"},
-    {3, "  Test <TestName>",                   "Invoke a debug test\n"},
-    {1, "     Objects",                        "Read/write/compare all namespace data objects\n"},
-    {1, "     Predefined",                     "Execute all ACPI predefined names (_STA, etc.)\n"},
+#ifdef ACPI_APPLICATION
+    {0, "\nFile Operations:",                   "\n"},
+    {1, "  Close",                              "Close debug output file\n"},
+    {1, "  Load <Input Filename>",              "Load ACPI table from a file\n"},
+    {1, "  Open <Output Filename>",             "Open a file for debug output\n"},
+    {1, "  Unload <Namepath>",                  "Unload an ACPI table via namespace object\n"},
+
+    {0, "\nHardware Simulation:",               "\n"},
+    {1, "  EnableAcpi",                         "Enable ACPI (hardware) mode\n"},
+    {1, "  Event <F|G> <Value>",                "Generate AcpiEvent (Fixed/GPE)\n"},
+    {1, "  Gpe <GpeNum> [GpeBlockDevice]",      "Simulate a GPE\n"},
+    {1, "  Gpes",                               "Display info on all GPE devices\n"},
+    {1, "  Sci",                                "Generate an SCI\n"},
+    {1, "  Sleep [SleepState]",                 "Simulate sleep/wake sequence(s) (0-5)\n"},
 #endif
     {0, NULL, NULL}
 };
@@ -571,11 +584,15 @@ AcpiDbDisplayHelp (
     {
         /* No argument to help, display help for all commands */
 
+        AcpiOsPrintf ("\nSummary of AML Debugger Commands\n\n");
+
         while (Next->Invocation)
         {
             AcpiOsPrintf ("%-38s%s", Next->Invocation, Next->Description);
             Next++;
         }
+        AcpiOsPrintf ("\n");
+
     }
     else
     {
@@ -1256,6 +1273,12 @@ AcpiDbCommandDispatch (
 
         AcpiGbl_DbTerminateLoop = TRUE;
         /*  AcpiInitialize (NULL);  */
+        break;
+
+    case CMD_BACKGROUND:
+
+        AcpiDbCreateExecutionThread (AcpiGbl_DbArgs[1], &AcpiGbl_DbArgs[2],
+            &AcpiGbl_DbArgTypes[2]);
         break;
 
     case CMD_THREADS:

Modified: head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/components/dispatcher/dsfield.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -340,7 +340,8 @@ AcpiDsCreateBufferField (
             ACPI_IMODE_LOAD_PASS1, Flags, WalkState, &Node);
         if (ACPI_FAILURE (Status))
         {
-            ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
+            ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                Arg->Common.Value.String, Status);
             return_ACPI_STATUS (Status);
         }
     }
@@ -524,7 +525,8 @@ AcpiDsGetFieldNames (
                     WalkState, &Info->ConnectionNode);
                 if (ACPI_FAILURE (Status))
                 {
-                    ACPI_ERROR_NAMESPACE (Child->Common.Value.Name, Status);
+                    ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                        Child->Common.Value.Name, Status);
                     return_ACPI_STATUS (Status);
                 }
             }
@@ -540,7 +542,8 @@ AcpiDsGetFieldNames (
                 WalkState, &Info->FieldNode);
             if (ACPI_FAILURE (Status))
             {
-                ACPI_ERROR_NAMESPACE ((char *) &Arg->Named.Name, Status);
+                ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                    (char *) &Arg->Named.Name, Status);
                 return_ACPI_STATUS (Status);
             }
             else
@@ -639,7 +642,8 @@ AcpiDsCreateField (
 #endif
         if (ACPI_FAILURE (Status))
         {
-            ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status);
+            ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                Arg->Common.Value.Name, Status);
             return_ACPI_STATUS (Status);
         }
     }
@@ -769,7 +773,8 @@ AcpiDsInitFieldObjects (
                 Flags, WalkState, &Node);
             if (ACPI_FAILURE (Status))
             {
-                ACPI_ERROR_NAMESPACE ((char *) &Arg->Named.Name, Status);
+                ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                    (char *) &Arg->Named.Name, Status);
                 if (Status != AE_ALREADY_EXISTS)
                 {
                     return_ACPI_STATUS (Status);
@@ -834,7 +839,8 @@ AcpiDsCreateBankField (
 #endif
         if (ACPI_FAILURE (Status))
         {
-            ACPI_ERROR_NAMESPACE (Arg->Common.Value.Name, Status);
+            ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                Arg->Common.Value.Name, Status);
             return_ACPI_STATUS (Status);
         }
     }
@@ -847,7 +853,8 @@ AcpiDsCreateBankField (
         ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode);
     if (ACPI_FAILURE (Status))
     {
-        ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
+        ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+            Arg->Common.Value.String, Status);
         return_ACPI_STATUS (Status);
     }
 
@@ -920,7 +927,8 @@ AcpiDsCreateIndexField (
         ACPI_NS_SEARCH_PARENT, WalkState, &Info.RegisterNode);
     if (ACPI_FAILURE (Status))
     {
-        ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
+        ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+            Arg->Common.Value.String, Status);
         return_ACPI_STATUS (Status);
     }
 
@@ -932,7 +940,8 @@ AcpiDsCreateIndexField (
         ACPI_NS_SEARCH_PARENT, WalkState, &Info.DataRegisterNode);
     if (ACPI_FAILURE (Status))
     {
-        ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
+        ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+            Arg->Common.Value.String, Status);
         return_ACPI_STATUS (Status);
     }
 

Modified: head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/components/dispatcher/dsobject.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -223,7 +223,8 @@ AcpiDsBuildInternalObject (
                         ACPI_NAMESPACE_NODE, &(Op->Common.Node)));
                 if (ACPI_FAILURE (Status))
                 {
-                    ACPI_ERROR_NAMESPACE (Op->Common.Value.String, Status);
+                    ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                        Op->Common.Value.String, Status);
                     return_ACPI_STATUS (Status);
                 }
             }

Modified: head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/components/dispatcher/dsutils.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -732,7 +732,8 @@ AcpiDsCreateOperand (
 
             if (ACPI_FAILURE (Status))
             {
-                ACPI_ERROR_NAMESPACE (NameString, Status);
+                ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                    NameString, Status);
             }
         }
 

Modified: head/sys/contrib/dev/acpica/components/dispatcher/dswload.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/dispatcher/dswload.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/components/dispatcher/dswload.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -325,7 +325,7 @@ AcpiDsLoad1BeginOp (
 #endif
         if (ACPI_FAILURE (Status))
         {
-            ACPI_ERROR_NAMESPACE (Path, Status);
+            ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo, Path, Status);
             return_ACPI_STATUS (Status);
         }
 
@@ -495,7 +495,7 @@ AcpiDsLoad1BeginOp (
 
             if (ACPI_FAILURE (Status))
             {
-                ACPI_ERROR_NAMESPACE (Path, Status);
+                ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo, Path, Status);
                 return_ACPI_STATUS (Status);
             }
         }

Modified: head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -304,10 +304,12 @@ AcpiDsLoad2BeginOp (
                 }
                 else
                 {
-                    ACPI_ERROR_NAMESPACE (BufferPtr, Status);
+                    ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                        BufferPtr, Status);
                 }
 #else
-                ACPI_ERROR_NAMESPACE (BufferPtr, Status);
+                ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                    BufferPtr, Status);
 #endif
                 return_ACPI_STATUS (Status);
             }
@@ -462,7 +464,8 @@ AcpiDsLoad2BeginOp (
 
     if (ACPI_FAILURE (Status))
     {
-        ACPI_ERROR_NAMESPACE (BufferPtr, Status);
+        ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+            BufferPtr, Status);
         return_ACPI_STATUS (Status);
     }
 
@@ -844,7 +847,8 @@ AcpiDsLoad2EndOp (
         }
         else
         {
-            ACPI_ERROR_NAMESPACE (Arg->Common.Value.String, Status);
+            ACPI_ERROR_NAMESPACE (WalkState->ScopeInfo,
+                Arg->Common.Value.String, Status);
         }
         break;
 

Modified: head/sys/contrib/dev/acpica/components/events/evregion.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/events/evregion.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/components/events/evregion.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -423,6 +423,17 @@ AcpiEvAddressSpaceDispatch (
     {
         ACPI_EXCEPTION ((AE_INFO, Status, "Returned by Handler for [%s]",
             AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
+
+        /*
+         * Special case for an EC timeout. These are seen so frequently
+         * that an additional error message is helpful
+         */
+        if ((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_EC) &&
+            (Status == AE_TIME))
+        {
+            ACPI_ERROR ((AE_INFO,
+                "Timeout from EC hardware or EC device driver"));
+        }
     }
 
     if (!(HandlerDesc->AddressSpace.HandlerFlags &

Modified: head/sys/contrib/dev/acpica/components/namespace/nsconvert.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/namespace/nsconvert.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/components/namespace/nsconvert.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -644,7 +644,8 @@ AcpiNsConvertToReference (
     {
         /* Check if we are resolving a named reference within a package */
 
-        ACPI_ERROR_NAMESPACE (OriginalObject->String.Pointer, Status);
+        ACPI_ERROR_NAMESPACE (&ScopeInfo,
+            OriginalObject->String.Pointer, Status);
         goto ErrorExit;
     }
 

Modified: head/sys/contrib/dev/acpica/components/namespace/nsnames.c
==============================================================================
--- head/sys/contrib/dev/acpica/components/namespace/nsnames.c	Fri Nov 10 17:55:44 2017	(r325669)
+++ head/sys/contrib/dev/acpica/components/namespace/nsnames.c	Fri Nov 10 18:46:34 2017	(r325670)
@@ -158,7 +158,13 @@
 #define _COMPONENT          ACPI_NAMESPACE
         ACPI_MODULE_NAME    ("nsnames")
 
+/* Local Prototypes */
 
+static void
+AcpiNsNormalizePathname (
+    char                    *OriginalPath);
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiNsGetExternalPathname
@@ -506,4 +512,170 @@ AcpiNsGetNormalizedPathname (
     (void) AcpiNsBuildNormalizedPath (Node, NameBuffer, Size, NoTrailing);
 
     return_PTR (NameBuffer);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiNsBuildPrefixedPathname
+ *
+ * PARAMETERS:  PrefixScope         - Scope/Path that prefixes the internal path
+ *              InternalPath        - Name or path of the namespace node
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Construct a fully qualified pathname from a concatenation of:
+ *              1) Path associated with the PrefixScope namespace node
+ *              2) External path representation of the Internal path
+ *
+ ******************************************************************************/
+
+char *
+AcpiNsBuildPrefixedPathname (
+    ACPI_GENERIC_STATE      *PrefixScope,
+    const char              *InternalPath)
+{
+    ACPI_STATUS             Status;
+    char                    *FullPath = NULL;
+    char                    *ExternalPath = NULL;
+    char                    *PrefixPath = NULL;
+    UINT32                  PrefixPathLength = 0;
+
+
+    /* If there is a prefix, get the pathname to it */
+
+    if (PrefixScope && PrefixScope->Scope.Node)
+    {
+        PrefixPath = AcpiNsGetNormalizedPathname (PrefixScope->Scope.Node, TRUE);
+        if (PrefixPath)
+        {
+            PrefixPathLength = strlen (PrefixPath);
+        }
+    }
+
+    Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, InternalPath,
+        NULL, &ExternalPath);
+    if (ACPI_FAILURE (Status))
+    {
+        goto Cleanup;
+    }
+
+    /* Merge the prefix path and the path. 2 is for one dot and trailing null */
+
+    FullPath = ACPI_ALLOCATE_ZEROED (
+        PrefixPathLength + strlen (ExternalPath) + 2);
+    if (!FullPath)
+    {
+        goto Cleanup;
+    }
+
+    /* Don't merge if the External path is already fully qualified */
+
+    if (PrefixPath &&
+        (*ExternalPath != '\\') &&
+        (*ExternalPath != '^'))
+    {
+        strcat (FullPath, PrefixPath);
+        if (PrefixPath[1])
+        {
+            strcat (FullPath, ".");
+        }
+    }
+
+    AcpiNsNormalizePathname (ExternalPath);
+    strcat (FullPath, ExternalPath);
+
+Cleanup:
+    if (PrefixPath)
+    {
+        ACPI_FREE (PrefixPath);
+    }
+    if (ExternalPath)
+    {
+        ACPI_FREE (ExternalPath);
+    }
+
+    return (FullPath);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiNsNormalizePathname
+ *
+ * PARAMETERS:  OriginalPath        - Path to be normalized, in External format
+ *
+ * RETURN:      The original path is processed in-place
+ *
+ * DESCRIPTION: Remove trailing underscores from each element of a path.

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201711101846.vAAIkYGo039679>