merge new acpica trunk
authorchristos <christos@NetBSD.org>
Wed, 04 May 2016 19:27:57 +0000
branchtrunk
changeset 242292 0d4bc310e393
parent 242291 4f23a1894a51
child 242293 a1c4c53aa1ab
merge new acpica
sys/external/bsd/acpica/conf/files.acpica
sys/external/bsd/acpica/dist/common/dmtbdump.c
sys/external/bsd/acpica/dist/common/dmtbinfo.c
sys/external/bsd/acpica/dist/compiler/aslanalyze.c
sys/external/bsd/acpica/dist/compiler/aslcompile.c
sys/external/bsd/acpica/dist/compiler/aslcompiler.h
sys/external/bsd/acpica/dist/compiler/aslcompiler.l
sys/external/bsd/acpica/dist/compiler/aslfiles.c
sys/external/bsd/acpica/dist/compiler/aslload.c
sys/external/bsd/acpica/dist/compiler/asllookup.c
sys/external/bsd/acpica/dist/compiler/aslopcodes.c
sys/external/bsd/acpica/dist/compiler/aslpredef.c
sys/external/bsd/acpica/dist/compiler/aslprepkg.c
sys/external/bsd/acpica/dist/compiler/asltree.c
sys/external/bsd/acpica/dist/compiler/aslutils.c
sys/external/bsd/acpica/dist/compiler/aslwalks.c
sys/external/bsd/acpica/dist/compiler/aslxref.c
sys/external/bsd/acpica/dist/compiler/dtparser.y
sys/external/bsd/acpica/dist/compiler/prparser.y
sys/external/bsd/acpica/dist/debugger/dbcmds.c
sys/external/bsd/acpica/dist/debugger/dbinput.c
sys/external/bsd/acpica/dist/debugger/dbnames.c
sys/external/bsd/acpica/dist/debugger/dbutils.c
sys/external/bsd/acpica/dist/disassembler/dmbuffer.c
sys/external/bsd/acpica/dist/disassembler/dmcstyle.c
sys/external/bsd/acpica/dist/disassembler/dmresrcl2.c
sys/external/bsd/acpica/dist/disassembler/dmwalk.c
sys/external/bsd/acpica/dist/events/evregion.c
sys/external/bsd/acpica/dist/events/evrgnini.c
sys/external/bsd/acpica/dist/executer/exconfig.c
sys/external/bsd/acpica/dist/executer/exdump.c
sys/external/bsd/acpica/dist/hardware/hwxfsleep.c
sys/external/bsd/acpica/dist/include/acdisasm.h
sys/external/bsd/acpica/dist/include/acglobal.h
sys/external/bsd/acpica/dist/include/aclocal.h
sys/external/bsd/acpica/dist/include/acmacros.h
sys/external/bsd/acpica/dist/include/acnamesp.h
sys/external/bsd/acpica/dist/include/acoutput.h
sys/external/bsd/acpica/dist/include/acpixf.h
sys/external/bsd/acpica/dist/include/acresrc.h
sys/external/bsd/acpica/dist/include/actables.h
sys/external/bsd/acpica/dist/include/actbl1.h
sys/external/bsd/acpica/dist/include/actypes.h
sys/external/bsd/acpica/dist/include/acutils.h
sys/external/bsd/acpica/dist/namespace/nsdump.c
sys/external/bsd/acpica/dist/namespace/nseval.c
sys/external/bsd/acpica/dist/namespace/nsinit.c
sys/external/bsd/acpica/dist/namespace/nsxfeval.c
sys/external/bsd/acpica/dist/parser/psopinfo.c
sys/external/bsd/acpica/dist/resources/rsdump.c
sys/external/bsd/acpica/dist/resources/rsdumpinfo.c
sys/external/bsd/acpica/dist/resources/rsutils.c
sys/external/bsd/acpica/dist/tables/tbdata.c
sys/external/bsd/acpica/dist/tables/tbfadt.c
sys/external/bsd/acpica/dist/tables/tbinstal.c
sys/external/bsd/acpica/dist/tables/tbutils.c
sys/external/bsd/acpica/dist/tables/tbxfload.c
sys/external/bsd/acpica/dist/tools/acpixtract/acpixtract.c
sys/external/bsd/acpica/dist/utilities/utcache.c
sys/external/bsd/acpica/dist/utilities/utdebug.c
sys/external/bsd/acpica/dist/utilities/utdecode.c
sys/external/bsd/acpica/dist/utilities/utfileio.c
sys/external/bsd/acpica/dist/utilities/utglobal.c
sys/external/bsd/acpica/dist/utilities/uttrack.c
--- a/sys/external/bsd/acpica/conf/files.acpica	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/conf/files.acpica	Wed May 04 19:27:57 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.acpica,v 1.13 2016/01/09 21:44:55 christos Exp $
+# $NetBSD: files.acpica,v 1.14 2016/05/04 19:27:57 christos Exp $
 
 define		acpica
 makeoptions	acpi	CPPFLAGS+="-I$S/external/bsd/acpica/dist/include"
@@ -72,6 +72,7 @@
 file	events/evxfregn.c		acpica
 
 # executer/
+file	executer/exconcat.c		acpica
 file	executer/exconfig.c		acpica
 file	executer/exconvrt.c		acpica
 file	executer/excreate.c		acpica
@@ -177,6 +178,7 @@
 # utilities/
 file	utilities/utaddress.c		acpica
 file	utilities/utalloc.c		acpica
+file	utilities/utascii.c		acpica
 file	utilities/utbuffer.c		acpica
 file	utilities/utcache.c		acpica
 file	utilities/utcopy.c		acpica
--- a/sys/external/bsd/acpica/dist/common/dmtbdump.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbdump.c	Wed May 04 19:27:57 2016 +0000
@@ -1616,6 +1616,12 @@
             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 */
@@ -1767,6 +1773,12 @@
             IortSmmu = ACPI_ADD_PTR (ACPI_IORT_SMMU, IortNode, NodeOffset);
             break;
 
+        case ACPI_IORT_NODE_SMMU_V3:
+
+            InfoTable = AcpiDmTableInfoIort4;
+            Length = IortNode->Length - NodeOffset;
+            break;
+
         default:
 
             AcpiOsPrintf ("\n**** Unknown IORT node type 0x%X\n",
@@ -2885,6 +2897,11 @@
             InfoTable = AcpiDmTableInfoPcct1;
             break;
 
+        case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2:
+
+            InfoTable = AcpiDmTableInfoPcct2;
+            break;
+
         default:
 
             AcpiOsPrintf (
@@ -3133,7 +3150,7 @@
 {
     ACPI_STATUS             Status;
     UINT32                  Offset = sizeof (ACPI_TABLE_S3PT);
-    ACPI_S3PT_HEADER        *SubTable;
+    ACPI_FPDT_HEADER        *SubTable;
     ACPI_DMTABLE_INFO       *InfoTable;
     ACPI_TABLE_S3PT         *S3ptTable = ACPI_CAST_PTR (ACPI_TABLE_S3PT, Tables);
 
@@ -3146,7 +3163,7 @@
         return 0;
     }
 
-    SubTable = ACPI_ADD_PTR (ACPI_S3PT_HEADER, S3ptTable, Offset);
+    SubTable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, S3ptTable, Offset);
     while (Offset < S3ptTable->Length)
     {
         /* Common subtable header */
@@ -3198,7 +3215,7 @@
         /* Point to next subtable */
 
         Offset += SubTable->Length;
-        SubTable = ACPI_ADD_PTR (ACPI_S3PT_HEADER, SubTable, SubTable->Length);
+        SubTable = ACPI_ADD_PTR (ACPI_FPDT_HEADER, SubTable, SubTable->Length);
     }
 
     return (S3ptTable->Length);
--- a/sys/external/bsd/acpica/dist/common/dmtbinfo.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbinfo.c	Wed May 04 19:27:57 2016 +0000
@@ -150,8 +150,8 @@
 #define ACPI_EINJ0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
 #define ACPI_ERST0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_WHEA_HEADER,f)
 #define ACPI_FPDTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_HEADER,f)
-#define ACPI_FPDT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_BOOT,f)
-#define ACPI_FPDT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_S3PT_PTR,f)
+#define ACPI_FPDT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_BOOT_POINTER,f)
+#define ACPI_FPDT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_S3PT_POINTER,f)
 #define ACPI_GTDT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_GTDT_TIMER_BLOCK,f)
 #define ACPI_GTDT0a_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_GTDT_TIMER_ENTRY,f)
 #define ACPI_GTDT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_GTDT_WATCHDOG,f)
@@ -163,12 +163,14 @@
 #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)
 #define ACPI_IORT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_NAMED_COMPONENT,f)
 #define ACPI_IORT2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_ROOT_COMPLEX,f)
 #define ACPI_IORT3_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU,f)
+#define ACPI_IORT4_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_SMMU_V3,f)
 #define ACPI_IORTA_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_MEMORY_ACCESS,f)
 #define ACPI_IORTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_NODE,f)
 #define ACPI_IORTM_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_IORT_ID_MAPPING,f)
@@ -216,12 +218,13 @@
 #define ACPI_NFIT6_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_NFIT_FLUSH_ADDRESS,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)
 #define ACPI_PMTT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f)
 #define ACPI_PMTT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f)
 #define ACPI_PMTT1A_OFFSET(f)           (UINT16) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f)
 #define ACPI_PMTT2_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PMTT_PHYSICAL_COMPONENT,f)
 #define ACPI_PMTTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_PMTT_HEADER,f)
-#define ACPI_S3PTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_S3PT_HEADER,f)
+#define ACPI_S3PTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_FPDT_HEADER,f)
 #define ACPI_S3PT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_S3PT_RESUME,f)
 #define ACPI_S3PT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_S3PT_SUSPEND,f)
 #define ACPI_SLIC_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIC,f)
@@ -255,6 +258,7 @@
 #define ACPI_GTDT0a_FLAG_OFFSET(f,o)    ACPI_FLAG_OFFSET (ACPI_GTDT_TIMER_ENTRY,f,o)
 #define ACPI_GTDT1_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_GTDT_WATCHDOG,f,o)
 #define ACPI_IORT3_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_IORT_SMMU,f,o)
+#define ACPI_IORT4_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_IORT_SMMU_V3,f,o)
 #define ACPI_IORTA_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_IORT_MEMORY_ACCESS,f,o)
 #define ACPI_IORTM_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_IORT_ID_MAPPING,f,o)
 #define ACPI_LPITH_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_LPIT_HEADER,f,o)
@@ -276,6 +280,7 @@
 #define ACPI_NFIT4_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_NFIT_CONTROL_REGION,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)
 #define ACPI_PMTTH_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_PMTT_HEADER,f,o)
 #define ACPI_WDDT_FLAG_OFFSET(f,o)      ACPI_FLAG_OFFSET (ACPI_TABLE_WDDT,f,o)
 #define ACPI_EINJ0_FLAG_OFFSET(f,o)     ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
@@ -1094,11 +1099,7 @@
 ACPI_DMTABLE_INFO           AcpiDmTableInfoFpdt0[] =
 {
     {ACPI_DMT_UINT32,   ACPI_FPDT0_OFFSET (Reserved),               "Reserved", 0},
-    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (ResetEnd),               "Reset End", 0},
-    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (LoadStart),              "Load Image Start", 0},
-    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (StartupStart),           "Start Image Start", 0},
-    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (ExitServicesEntry),      "Exit Services Entry", 0},
-    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (ExitServicesExit),       "Exit Services Exit", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT1_OFFSET (Address),                "FPDT Boot Record Address", 0},
     ACPI_DMT_TERMINATOR
 };
 
@@ -1107,10 +1108,18 @@
 ACPI_DMTABLE_INFO           AcpiDmTableInfoFpdt1[] =
 {
     {ACPI_DMT_UINT32,   ACPI_FPDT1_OFFSET (Reserved),               "Reserved", 0},
-    {ACPI_DMT_UINT64,   ACPI_FPDT1_OFFSET (Address),                "S3PT Address", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT1_OFFSET (Address),                "S3PT Record Address", 0},
     ACPI_DMT_TERMINATOR
 };
 
+#if 0
+    /* Boot Performance Record, not supported at this time. */
+    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (ResetEnd),               "Reset End", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (LoadStart),              "Load Image Start", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (StartupStart),           "Start Image Start", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (ExitServicesEntry),      "Exit Services Entry", 0},
+    {ACPI_DMT_UINT64,   ACPI_FPDT0_OFFSET (ExitServicesExit),       "Exit Services Exit", 0},
+#endif
 
 /*******************************************************************************
  *
@@ -1342,6 +1351,26 @@
     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},
@@ -1536,6 +1565,23 @@
     ACPI_DMT_TERMINATOR
 };
 
+/* 0x04: SMMUv3 */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoIort4[] =
+{
+    {ACPI_DMT_UINT64,   ACPI_IORT4_OFFSET (BaseAddress),            "Base Address", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Flags),                  "Flags (decoded below)", 0},
+    {ACPI_DMT_FLAG0,    ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "COHACC Override", 0},
+    {ACPI_DMT_FLAG1,    ACPI_IORT4_FLAG_OFFSET (Flags, 0),          "HTTU Override", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Reserved),               "Reserved", 0},
+    {ACPI_DMT_UINT64,   ACPI_IORT4_OFFSET (VatosAddress),           "VATOS Address", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (Model),                  "Model", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (EventGsiv),              "Event GSIV", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (PriGsiv),                "PRI GSIV", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (GerrGsiv),               "GERR GSIV", 0},
+    {ACPI_DMT_UINT32,   ACPI_IORT4_OFFSET (SyncGsiv),               "Sync GSIV", 0},
+    ACPI_DMT_TERMINATOR
+};
 
 /*******************************************************************************
  *
@@ -2141,6 +2187,7 @@
     {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
 };
@@ -2187,7 +2234,10 @@
     {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (SubsystemVendorId),      "Subsystem Vendor Id", 0},
     {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (SubsystemDeviceId),      "Subsystem Device Id", 0},
     {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (SubsystemRevisionId),    "Subsystem Revision Id", 0},
-    {ACPI_DMT_UINT48,   ACPI_NFIT4_OFFSET (Reserved[0]),            "Reserved", 0},
+    {ACPI_DMT_UINT8,    ACPI_NFIT4_OFFSET (ValidFields),            "Valid Fields", 0},
+    {ACPI_DMT_UINT8,    ACPI_NFIT4_OFFSET (ManufacturingLocation),  "Manufacturing Location", 0},
+    {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (ManufacturingDate),      "Manufacturing Date", 0},
+    {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (Reserved[0]),            "Reserved", 0},
     {ACPI_DMT_UINT32,   ACPI_NFIT4_OFFSET (SerialNumber),           "Serial Number", 0},
     {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (Code),                   "Code", 0},
     {ACPI_DMT_UINT16,   ACPI_NFIT4_OFFSET (Windows),                "Window Count", 0},
@@ -2291,6 +2341,29 @@
     ACPI_DMT_TERMINATOR
 };
 
+/* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoPcct2[] =
+{
+    {ACPI_DMT_UINT32,   ACPI_PCCT2_OFFSET (DoorbellInterrupt),      "Doorbell Interrupt", 0},
+    {ACPI_DMT_UINT8,    ACPI_PCCT2_OFFSET (Flags),                  "Flags (Decoded Below)", DT_FLAG},
+    {ACPI_DMT_FLAG0,    ACPI_PCCT2_FLAG_OFFSET (Flags,0),           "Polarity", 0},
+    {ACPI_DMT_FLAG1,    ACPI_PCCT2_FLAG_OFFSET (Flags,0),           "Mode", 0},
+    {ACPI_DMT_UINT8,    ACPI_PCCT2_OFFSET (Reserved),               "Reserved", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (BaseAddress),            "Base Address", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (Length),                 "Address Length", 0},
+    {ACPI_DMT_GAS,      ACPI_PCCT2_OFFSET (DoorbellRegister),       "Doorbell Register", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (PreserveMask),           "Preserve Mask", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (WriteMask),              "Write Mask", 0},
+    {ACPI_DMT_UINT32,   ACPI_PCCT2_OFFSET (Latency),                "Command Latency", 0},
+    {ACPI_DMT_UINT32,   ACPI_PCCT2_OFFSET (MaxAccessRate),          "Maximum Access Rate", 0},
+    {ACPI_DMT_UINT16,   ACPI_PCCT2_OFFSET (MinTurnaroundTime),      "Minimum Turnaround Time", 0},
+    {ACPI_DMT_GAS,      ACPI_PCCT2_OFFSET (DoorbellAckRegister),    "Doorbell ACK Register", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (AckPreserveMask),        "ACK Preserve Mask", 0},
+    {ACPI_DMT_UINT64,   ACPI_PCCT2_OFFSET (AckWriteMask),           "ACK Write Mask", 0},
+    ACPI_DMT_TERMINATOR
+};
+
 
 /*******************************************************************************
  *
--- a/sys/external/bsd/acpica/dist/compiler/aslanalyze.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslanalyze.c	Wed May 04 19:27:57 2016 +0000
@@ -50,6 +50,15 @@
         ACPI_MODULE_NAME    ("aslanalyze")
 
 
+/* Local Prototypes */
+
+static ACPI_STATUS
+ApDeviceSubtreeWalk (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    void                    *Context);
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AnIsInternalMethod
@@ -308,6 +317,12 @@
 
     Node = ArgOp->Asl.Node;
 
+    if (!Node)
+    {
+        /* No error message, this can happen and is OK */
+
+        return;
+    }
 
     /* Examine the parent op of this method */
 
@@ -573,6 +588,108 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    ApFindNameInDeviceTree
+ *
+ * PARAMETERS:  Name                - Name to search for
+ *              Op                  - Current parse op
+ *
+ * RETURN:      TRUE if name found in the same scope as Op.
+ *
+ * DESCRIPTION: Determine if a name appears in the same scope as Op, as either
+ *              a Method() or a Name(). "Same scope" can mean under an If or
+ *              Else statement.
+ *
+ * NOTE: Detects _HID/_ADR in this type of construct (legal in ACPI 6.1+)
+ *
+ * Scope (\_SB.PCI0)
+ * {
+ *     Device (I2C0)
+ *     {
+ *         If (SMD0 != 4) {
+ *             Name (_HID, "INT3442")
+ *         } Else {
+ *             Name (_ADR, 0x400)
+ *         }
+ *     }
+ * }
+ ******************************************************************************/
+
+BOOLEAN
+ApFindNameInDeviceTree (
+    char                    *Name,
+    ACPI_PARSE_OBJECT       *Op)
+{
+    ACPI_STATUS             Status;
+
+
+    Status = TrWalkParseTree (Op, ASL_WALK_VISIT_DOWNWARD,
+        ApDeviceSubtreeWalk, NULL, Name);
+
+    if (Status == AE_CTRL_TRUE)
+    {
+        return (TRUE);  /* Found a match */
+    }
+
+    return (FALSE);
+}
+
+
+/* Callback function for interface above */
+
+static ACPI_STATUS
+ApDeviceSubtreeWalk (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    void                    *Context)
+{
+    char                    *Name = ACPI_CAST_PTR (char, Context);
+
+
+    switch (Op->Asl.ParseOpcode)
+    {
+    case PARSEOP_DEVICE:
+
+        /* Level 0 is the starting device, ignore it */
+
+        if (Level > 0)
+        {
+            /* Ignore sub-devices */
+
+            return (AE_CTRL_DEPTH);
+        }
+        break;
+
+    case PARSEOP_NAME:
+    case PARSEOP_METHOD:
+
+        /* These are what we are looking for */
+
+        if (ACPI_COMPARE_NAME (Name, Op->Asl.NameSeg))
+        {
+            return (AE_CTRL_TRUE);
+        }
+        return (AE_CTRL_DEPTH);
+
+    case PARSEOP_SCOPE:
+    case PARSEOP_FIELD:
+    case PARSEOP_OPERATIONREGION:
+
+        /*
+         * We want to ignore these, because either they can be large
+         * subtrees or open a scope to somewhere else.
+         */
+        return (AE_CTRL_DEPTH);
+
+    default:
+        break;
+    }
+
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    ApFindNameInScope
  *
  * PARAMETERS:  Name                - Name to search for
--- a/sys/external/bsd/acpica/dist/compiler/aslcompile.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompile.c	Wed May 04 19:27:57 2016 +0000
@@ -138,7 +138,7 @@
 
     /* 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 @@
 
     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,12 +203,12 @@
 
     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,
-            OpcAmlConstantWalk, NULL, NULL);
+        TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
+            NULL, OpcAmlConstantWalk, NULL);
     }
     else
     {
@@ -220,16 +220,16 @@
 
     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 @@
     /* 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 @@
 
     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,17 @@
     LkFindUnreferencedObjects ();
     UtEndEvent (AslGbl_NamespaceEvent);
 
+    /* Resolve External Declarations */
+
+    if (Gbl_DoExternals)
+    {
+        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 +299,30 @@
     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 +330,10 @@
 
     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 +341,8 @@
     /* 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 +350,17 @@
     /* 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 +843,7 @@
     Gbl_ParseOpCount = 0;
     Gbl_ParseOpCacheNext = NULL;
     Gbl_ParseOpCacheLast = NULL;
-    RootNode = NULL;
+    Gbl_ParseTreeRoot = NULL;
 
     /* Generic string cache */
 
--- a/sys/external/bsd/acpica/dist/compiler/aslcompiler.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompiler.h	Wed May 04 19:27:57 2016 +0000
@@ -287,6 +287,10 @@
     char                    *Name,
     ACPI_PARSE_OBJECT       *Op);
 
+BOOLEAN
+ApFindNameInDeviceTree (
+    char                    *Name,
+    ACPI_PARSE_OBJECT       *Op);
 
 /*
  * aslerror - error handling/reporting
@@ -538,6 +542,14 @@
 
 
 /*
+ * aslpld - ToPLD macro support
+ */
+void
+OpcDoPld (
+    ACPI_PARSE_OBJECT       *Op);
+
+
+/*
  * aslprintf - Printf/Fprintf macros
  */
 void
@@ -652,7 +664,13 @@
  * 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 +687,25 @@
     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
@@ -676,6 +713,11 @@
 #define ASL_WALK_VISIT_TWICE        (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD)
 
 
+void
+TrSetParent (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_PARSE_OBJECT       *ParentOp);
+
 ACPI_PARSE_OBJECT *
 TrAllocateNode (
     UINT32                  ParseOpcode);
@@ -909,6 +951,24 @@
 
 
 /*
+ * 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 +983,31 @@
 #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 (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level);
+
+void
 UtDisplaySupportedTables (
     void);
 
@@ -948,16 +1028,7 @@
     UINT32                  Size);
 
 void
-UtLocalFree (
-    void		    *Allocated,
-    UINT32                  Size);
 
-void
-UtPrintFormattedName (
-    UINT16                  ParseOpcode,
-    UINT32                  Level);
-
-void
 UtDisplaySummary (
     UINT32                  FileId);
 
@@ -1011,12 +1082,6 @@
 UtDoConstant (
     char                    *String);
 
-ACPI_STATUS
-stroul64 (
-    char                    *String,
-    UINT32                  Base,
-    UINT64                  *RetInteger);
-
 
 /*
  * asluuid - UUID support
--- a/sys/external/bsd/acpica/dist/compiler/aslcompiler.l	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompiler.l	Wed May 04 19:27:57 2016 +0000
@@ -332,6 +332,7 @@
 "GpioInt"                   { count (1); return (PARSEOP_GPIO_INT); }
 "GpioIo"                    { count (1); return (PARSEOP_GPIO_IO); }
 "I2cSerialBus"              { count (1); return (PARSEOP_I2C_SERIALBUS); }
+"I2cSerialBusV2"            { count (1); return (PARSEOP_I2C_SERIALBUS_V2); }
 "Interrupt"                 { count (1); return (PARSEOP_INTERRUPT); }
 "IO"                        { count (1); return (PARSEOP_IO); }
 "IRQ"                       { count (1); return (PARSEOP_IRQ); }
@@ -344,9 +345,11 @@
 "QWordSpace"                { count (1); return (PARSEOP_QWORDSPACE); }
 "Register"                  { count (1); return (PARSEOP_REGISTER); }
 "SpiSerialBus"              { count (1); return (PARSEOP_SPI_SERIALBUS); }
+"SpiSerialBusV2"            { count (1); return (PARSEOP_SPI_SERIALBUS_V2); }
 "StartDependentFn"          { count (1); return (PARSEOP_STARTDEPENDENTFN); }
 "StartDependentFnNoPri"     { count (1); return (PARSEOP_STARTDEPENDENTFN_NOPRI); }
 "UartSerialBus"             { count (1); return (PARSEOP_UART_SERIALBUS); }
+"UartSerialBusV2"           { count (1); return (PARSEOP_UART_SERIALBUS_V2); }
 "VendorLong"                { count (1); return (PARSEOP_VENDORLONG); }
 "VendorShort"               { count (1); return (PARSEOP_VENDORSHORT); }
 "WordBusNumber"             { count (1); return (PARSEOP_WORDBUSNUMBER); }
@@ -672,9 +675,14 @@
 
 
     /* printf debug macros */
+
 "printf"                    { count (0); return (PARSEOP_PRINTF); }
 "fprintf"                   { count (0); return (PARSEOP_FPRINTF); }
 
+    /* Other macros */
+
+"For"                       { count (0); return (PARSEOP_FOR); }
+
     /* Predefined compiler names */
 
 "__DATE__"                  { count (0); return (PARSEOP___DATE__); }
--- a/sys/external/bsd/acpica/dist/compiler/aslfiles.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslfiles.c	Wed May 04 19:27:57 2016 +0000
@@ -633,6 +633,24 @@
         AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT);
     }
 
+    /* Create/Open a cross-reference output file if asked */
+
+    if (Gbl_CrossReferenceOutput)
+    {
+        Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_XREF);
+        if (!Filename)
+        {
+            AslCommonError (ASL_ERROR, ASL_MSG_DEBUG_FILENAME,
+                0, 0, 0, 0, NULL, NULL);
+            return (AE_ERROR);
+        }
+
+        FlOpenFile (ASL_FILE_XREF_OUTPUT, Filename, "w+t");
+
+        AslCompilerSignon (ASL_FILE_XREF_OUTPUT);
+        AslCompilerFileHeader (ASL_FILE_XREF_OUTPUT);
+    }
+
     /* Create/Open a listing output file if asked */
 
     if (Gbl_ListingFlag)
--- a/sys/external/bsd/acpica/dist/compiler/aslload.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslload.c	Wed May 04 19:27:57 2016 +0000
@@ -104,8 +104,6 @@
     ACPI_WALK_STATE         *WalkState;
 
 
-    DbgPrint (ASL_DEBUG_OUTPUT, "\nCreating namespace\n\n");
-
     /* Create a new walk state */
 
     WalkState = AcpiDsCreateWalkState (0, NULL, NULL, NULL);
@@ -700,6 +698,25 @@
                  */
                 Status = AE_OK;
             }
+            else if ((Node->Flags & ANOBJ_IS_EXTERNAL) &&
+                     (Op->Asl.ParseOpcode == PARSEOP_EXTERNAL) &&
+                     (ObjectType == ACPI_TYPE_ANY))
+            {
+                /* Allow update of externals of unknown type. */
+
+                if (AcpiNsOpensScope (ActualObjectType))
+                {
+                    Node->Type = (UINT8) ActualObjectType;
+                    Status = AE_OK;
+                }
+                else
+                {
+                    sprintf (MsgBuffer, "%s [%s]", Op->Asl.ExternalName,
+                        AcpiUtGetTypeName (Node->Type));
+                    AslError (ASL_ERROR, ASL_MSG_SCOPE_TYPE, Op, MsgBuffer);
+                    return_ACPI_STATUS (AE_OK);
+                }
+            }
             else
             {
                 /* Valid error, object already exists */
--- a/sys/external/bsd/acpica/dist/compiler/asllookup.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asllookup.c	Wed May 04 19:27:57 2016 +0000
@@ -207,6 +207,7 @@
     case ACPI_TYPE_POWER:
     case ACPI_TYPE_THERMAL:
     case ACPI_TYPE_LOCAL_RESOURCE:
+    case ACPI_TYPE_LOCAL_RESOURCE_FIELD: /* Names assigned to descriptor elements */
 
         return (AE_OK);
 
@@ -227,8 +228,8 @@
              * Issue a remark even if it is a reserved name (starts
              * with an underscore).
              */
-            snprintf (MsgBuffer, sizeof(MsgBuffer), "Name is within method [%4.4s]",
-                Next->Name.Ascii);
+            snprintf (MsgBuffer, sizeof(MsgBuffer), "Name [%4.4s] is within a method [%4.4s]",
+                Node->Name.Ascii, Next->Name.Ascii);
             AslError (ASL_REMARK, ASL_MSG_NOT_REFERENCED,
                 LkGetNameOp (Node->Op), MsgBuffer);
             return (AE_OK);
--- a/sys/external/bsd/acpica/dist/compiler/aslopcodes.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslopcodes.c	Wed May 04 19:27:57 2016 +0000
@@ -68,62 +68,9 @@
     ACPI_PARSE_OBJECT       *Op);
 
 static void
-OpcDoPld (
-    ACPI_PARSE_OBJECT       *Op);
-
-static void
 OpcDoUuId (
     ACPI_PARSE_OBJECT       *Op);
 
-static UINT8 *
-OpcEncodePldBuffer (
-    ACPI_PLD_INFO           *PldInfo);
-
-
-/* ToPld strings */
-
-static char *AslPldPanelList[] =
-{
-    "TOP",
-    "BOTTOM",
-    "LEFT",
-    "RIGHT",
-    "FRONT",
-    "BACK",
-    "UNKNOWN",
-    NULL
-};
-
-static char *AslPldVerticalPositionList[] =
-{
-    "UPPER",
-    "CENTER",
-    "LOWER",
-    NULL
-};
-
-static char *AslPldHorizontalPositionList[] =
-{
-    "LEFT",
-    "CENTER",
-    "RIGHT",
-    NULL
-};
-
-static char *AslPldShapeList[] =
-{
-    "ROUND",
-    "OVAL",
-    "SQUARE",
-    "VERTICALRECTANGLE",
-    "HORIZONTALRECTANGLE",
-    "VERTICALTRAPEZOID",
-    "HORIZONTALTRAPEZOID",
-    "UNKNOWN",
-    "CHAMFERED",
-    NULL
-};
-
 
 /*******************************************************************************
  *
@@ -709,651 +656,6 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    OpcEncodePldBuffer
- *
- * PARAMETERS:  PldInfo             - _PLD buffer struct (Using local struct)
- *
- * RETURN:      Encode _PLD buffer suitable for return value from _PLD
- *
- * DESCRIPTION: Bit-packs a _PLD buffer struct.
- *
- ******************************************************************************/
-
-static UINT8 *
-OpcEncodePldBuffer (
-    ACPI_PLD_INFO           *PldInfo)
-{
-    UINT32                  *Buffer;
-    UINT32                  Dword;
-
-
-    Buffer = ACPI_ALLOCATE_ZEROED (ACPI_PLD_BUFFER_SIZE);
-    if (!Buffer)
-    {
-        return (NULL);
-    }
-
-    /* First 32 bits */
-
-    Dword = 0;
-    ACPI_PLD_SET_REVISION       (&Dword, PldInfo->Revision);
-    ACPI_PLD_SET_IGNORE_COLOR   (&Dword, PldInfo->IgnoreColor);
-    ACPI_PLD_SET_RED            (&Dword, PldInfo->Red);
-    ACPI_PLD_SET_GREEN          (&Dword, PldInfo->Green);
-    ACPI_PLD_SET_BLUE           (&Dword, PldInfo->Blue);
-    ACPI_MOVE_32_TO_32          (&Buffer[0], &Dword);
-
-    /* Second 32 bits */
-
-    Dword = 0;
-    ACPI_PLD_SET_WIDTH          (&Dword, PldInfo->Width);
-    ACPI_PLD_SET_HEIGHT         (&Dword, PldInfo->Height);
-    ACPI_MOVE_32_TO_32          (&Buffer[1], &Dword);
-
-    /* Third 32 bits */
-
-    Dword = 0;
-    ACPI_PLD_SET_USER_VISIBLE   (&Dword, PldInfo->UserVisible);
-    ACPI_PLD_SET_DOCK           (&Dword, PldInfo->Dock);
-    ACPI_PLD_SET_LID            (&Dword, PldInfo->Lid);
-    ACPI_PLD_SET_PANEL          (&Dword, PldInfo->Panel);
-    ACPI_PLD_SET_VERTICAL       (&Dword, PldInfo->VerticalPosition);
-    ACPI_PLD_SET_HORIZONTAL     (&Dword, PldInfo->HorizontalPosition);
-    ACPI_PLD_SET_SHAPE          (&Dword, PldInfo->Shape);
-    ACPI_PLD_SET_ORIENTATION    (&Dword, PldInfo->GroupOrientation);
-    ACPI_PLD_SET_TOKEN          (&Dword, PldInfo->GroupToken);
-    ACPI_PLD_SET_POSITION       (&Dword, PldInfo->GroupPosition);
-    ACPI_PLD_SET_BAY            (&Dword, PldInfo->Bay);
-    ACPI_MOVE_32_TO_32          (&Buffer[2], &Dword);
-
-    /* Fourth 32 bits */
-
-    Dword = 0;
-    ACPI_PLD_SET_EJECTABLE      (&Dword, PldInfo->Ejectable);
-    ACPI_PLD_SET_OSPM_EJECT     (&Dword, PldInfo->OspmEjectRequired);
-    ACPI_PLD_SET_CABINET        (&Dword, PldInfo->CabinetNumber);
-    ACPI_PLD_SET_CARD_CAGE      (&Dword, PldInfo->CardCageNumber);
-    ACPI_PLD_SET_REFERENCE      (&Dword, PldInfo->Reference);
-    ACPI_PLD_SET_ROTATION       (&Dword, PldInfo->Rotation);
-    ACPI_PLD_SET_ORDER          (&Dword, PldInfo->Order);
-    ACPI_MOVE_32_TO_32          (&Buffer[3], &Dword);
-
-    if (PldInfo->Revision >= 2)
-    {
-        /* Fifth 32 bits */
-
-        Dword = 0;
-        ACPI_PLD_SET_VERT_OFFSET    (&Dword, PldInfo->VerticalOffset);
-        ACPI_PLD_SET_HORIZ_OFFSET   (&Dword, PldInfo->HorizontalOffset);
-        ACPI_MOVE_32_TO_32          (&Buffer[4], &Dword);
-    }
-
-    return (ACPI_CAST_PTR (UINT8, Buffer));
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    OpcFindName
- *
- * PARAMETERS:  List                - Array of char strings to be searched
- *              Name                - Char string to string for
- *              Index               - Index value to set if found
- *
- * RETURN:      TRUE if any names matched, FALSE otherwise
- *
- * DESCRIPTION: Match PLD name to value in lookup table. Sets Value to
- *              equivalent parameter value.
- *
- ******************************************************************************/
-
-static BOOLEAN
-OpcFindName (
-    char                    **List,
-    char                    *Name,
-    UINT64                  *Index)
-{
-    char                     *Str;
-    UINT32                   i;
-
-
-    AcpiUtStrupr (Name);
-
-    for (i = 0, Str = List[0]; Str; i++, Str = List[i])
-    {
-        if (!(strncmp (Str, Name, strlen (Name))))
-        {
-            *Index = i;
-            return (TRUE);
-        }
-    }
-
-    return (FALSE);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    OpcDoPld
- *
- * PARAMETERS:  Op                  - Parse node
- *
- * RETURN:      None
- *
- * DESCRIPTION: Convert ToPLD macro to 20-byte buffer
- *
- ******************************************************************************/
-
-static void
-OpcDoPld (
-    ACPI_PARSE_OBJECT       *Op)
-{
-    UINT8                   *Buffer;
-    ACPI_PARSE_OBJECT       *Node;
-    ACPI_PLD_INFO           PldInfo;
-    ACPI_PARSE_OBJECT       *NewOp;
-
-
-    if (!Op)
-    {
-        AslError(ASL_ERROR, ASL_MSG_NOT_EXIST, Op, NULL);
-        return;
-    }
-
-    if (Op->Asl.ParseOpcode != PARSEOP_TOPLD)
-    {
-        AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Op, NULL);
-        return;
-    }
-
-    memset (&PldInfo, 0, sizeof (ACPI_PLD_INFO));
-
-    Node = Op->Asl.Child;
-    while (Node)
-    {
-        switch (Node->Asl.ParseOpcode)
-        {
-        case PARSEOP_PLD_REVISION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 127)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            PldInfo.Revision = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_IGNORECOLOR:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 1)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            PldInfo.IgnoreColor = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_RED:
-        case PARSEOP_PLD_GREEN:
-        case PARSEOP_PLD_BLUE:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 255)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_RED)
-            {
-                PldInfo.Red = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else if (Node->Asl.ParseOpcode == PARSEOP_PLD_GREEN)
-            {
-                PldInfo.Green = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_BLUE */
-            {
-                PldInfo.Blue = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            break;
-
-        case PARSEOP_PLD_WIDTH:
-        case PARSEOP_PLD_HEIGHT:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 65535)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_WIDTH)
-            {
-                PldInfo.Width = (UINT16) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_HEIGHT */
-            {
-                PldInfo.Height = (UINT16) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        case PARSEOP_PLD_USERVISIBLE:
-        case PARSEOP_PLD_DOCK:
-        case PARSEOP_PLD_LID:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 1)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_USERVISIBLE)
-            {
-                PldInfo.UserVisible = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else if (Node->Asl.ParseOpcode == PARSEOP_PLD_DOCK)
-            {
-                PldInfo.Dock = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else
-            {
-                PldInfo.Lid = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        case PARSEOP_PLD_PANEL:
-
-            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
-            {
-                if (Node->Asl.Child->Asl.Value.Integer > 6)
-                {
-                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                    break;
-                }
-            }
-            else /* PARSEOP_STRING */
-            {
-                if (!OpcFindName(AslPldPanelList,
-                    Node->Asl.Child->Asl.Value.String,
-                    &Node->Asl.Child->Asl.Value.Integer))
-                {
-                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
-                    break;
-                }
-            }
-
-            PldInfo.Panel = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_VERTICALPOSITION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
-            {
-                if (Node->Asl.Child->Asl.Value.Integer > 2)
-                {
-                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                    break;
-                }
-            }
-            else /* PARSEOP_STRING */
-            {
-                if (!OpcFindName(AslPldVerticalPositionList,
-                    Node->Asl.Child->Asl.Value.String,
-                    &Node->Asl.Child->Asl.Value.Integer))
-                {
-                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
-                    break;
-                }
-            }
-
-            PldInfo.VerticalPosition = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_HORIZONTALPOSITION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
-            {
-                if (Node->Asl.Child->Asl.Value.Integer > 2)
-                {
-                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                    break;
-                }
-            }
-            else /* PARSEOP_STRING */
-            {
-                if (!OpcFindName(AslPldHorizontalPositionList,
-                    Node->Asl.Child->Asl.Value.String,
-                    &Node->Asl.Child->Asl.Value.Integer))
-                {
-                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
-                    break;
-                }
-            }
-
-            PldInfo.HorizontalPosition = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_SHAPE:
-
-            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
-            {
-                if (Node->Asl.Child->Asl.Value.Integer > 8)
-                {
-                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                    break;
-                }
-            }
-            else /* PARSEOP_STRING */
-            {
-                if (!OpcFindName(AslPldShapeList,
-                    Node->Asl.Child->Asl.Value.String,
-                    &Node->Asl.Child->Asl.Value.Integer))
-                {
-                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
-                    break;
-                }
-            }
-
-            PldInfo.Shape = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_GROUPORIENTATION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 1)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            PldInfo.GroupOrientation = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_GROUPTOKEN:
-        case PARSEOP_PLD_GROUPPOSITION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 255)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_GROUPTOKEN)
-            {
-                PldInfo.GroupToken = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_GROUPPOSITION */
-            {
-                PldInfo.GroupPosition = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        case PARSEOP_PLD_BAY:
-        case PARSEOP_PLD_EJECTABLE:
-        case PARSEOP_PLD_EJECTREQUIRED:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 1)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_BAY)
-            {
-                PldInfo.Bay = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else if (Node->Asl.ParseOpcode == PARSEOP_PLD_EJECTABLE)
-            {
-                PldInfo.Ejectable = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_EJECTREQUIRED */
-            {
-                PldInfo.OspmEjectRequired = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        case PARSEOP_PLD_CABINETNUMBER:
-        case PARSEOP_PLD_CARDCAGENUMBER:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 255)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_CABINETNUMBER)
-            {
-                PldInfo.CabinetNumber = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_CARDCAGENUMBER */
-            {
-                PldInfo.CardCageNumber = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        case PARSEOP_PLD_REFERENCE:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 1)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            PldInfo.Reference = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_ROTATION:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 7)
-            {
-                switch (Node->Asl.Child->Asl.Value.Integer)
-                {
-                case 45:
-
-                    Node->Asl.Child->Asl.Value.Integer = 1;
-                    break;
-
-                case 90:
-
-                    Node->Asl.Child->Asl.Value.Integer = 2;
-                    break;
-
-                case 135:
-
-                    Node->Asl.Child->Asl.Value.Integer = 3;
-                    break;
-
-                case 180:
-
-                    Node->Asl.Child->Asl.Value.Integer = 4;
-                    break;
-
-                case 225:
-
-                    Node->Asl.Child->Asl.Value.Integer = 5;
-                    break;
-
-                case 270:
-
-                    Node->Asl.Child->Asl.Value.Integer = 6;
-                    break;
-
-                case 315:
-
-                    Node->Asl.Child->Asl.Value.Integer = 7;
-                    break;
-
-                default:
-
-                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                    break;
-                }
-            }
-
-            PldInfo.Rotation = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_ORDER:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 31)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            PldInfo.Order = (UINT8) Node->Asl.Child->Asl.Value.Integer;
-            break;
-
-        case PARSEOP_PLD_VERTICALOFFSET:
-        case PARSEOP_PLD_HORIZONTALOFFSET:
-
-            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
-            {
-                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.Child->Asl.Value.Integer > 65535)
-            {
-                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
-                break;
-            }
-
-            if (Node->Asl.ParseOpcode == PARSEOP_PLD_VERTICALOFFSET)
-            {
-                PldInfo.VerticalOffset = (UINT16) Node->Asl.Child->Asl.Value.Integer;
-            }
-            else /* PARSEOP_PLD_HORIZONTALOFFSET */
-            {
-                PldInfo.HorizontalOffset = (UINT16) Node->Asl.Child->Asl.Value.Integer;
-            }
-
-            break;
-
-        default:
-
-            AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
-            break;
-        }
-
-        Node = Node->Asl.Next;
-    }
-
-    Buffer = OpcEncodePldBuffer(&PldInfo);
-
-    /* Change Op to a Buffer */
-
-    Op->Asl.ParseOpcode = PARSEOP_BUFFER;
-    Op->Common.AmlOpcode = AML_BUFFER_OP;
-
-    /* Disable further optimization */
-
-    Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
-    UtSetParseOpName (Op);
-
-    /* Child node is the buffer length */
-
-    NewOp = TrAllocateNode (PARSEOP_INTEGER);
-
-    NewOp->Asl.AmlOpcode = AML_BYTE_OP;
-    NewOp->Asl.Value.Integer = 20;
-    NewOp->Asl.Parent = Op;
-
-    Op->Asl.Child = NewOp;
-    Op = NewOp;
-
-    /* Peer to the child is the raw buffer data */
-
-    NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
-    NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
-    NewOp->Asl.AmlLength = 20;
-    NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
-    NewOp->Asl.Parent = Op->Asl.Parent;
-
-    Op->Asl.Next = NewOp;
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    OpcDoUuId
  *
  * PARAMETERS:  Op                  - Parse node
@@ -1515,8 +817,11 @@
 
     case PARSEOP_EXTERNAL:
 
-        Op->Asl.Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
-        Op->Asl.Child->Asl.Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
+        if (Gbl_DoExternals == FALSE)
+        {
+            Op->Asl.Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
+            Op->Asl.Child->Asl.Next->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
+        }
         break;
 
     case PARSEOP_TIMER:
--- a/sys/external/bsd/acpica/dist/compiler/aslpredef.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslpredef.c	Wed May 04 19:27:57 2016 +0000
@@ -454,8 +454,8 @@
 
     if (Name[0] == 0)
     {
-        AcpiOsPrintf ("Found a null name, external = %s\n",
-            Op->Asl.ExternalName);
+        AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, Op,
+            "zero length name found");
     }
 
     /* All reserved names are prefixed with a single underscore */
--- a/sys/external/bsd/acpica/dist/compiler/aslprepkg.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslprepkg.c	Wed May 04 19:27:57 2016 +0000
@@ -52,7 +52,7 @@
 
 /* Local prototypes */
 
-static void
+static ACPI_PARSE_OBJECT *
 ApCheckPackageElements (
     const char                  *PredefinedName,
     ACPI_PARSE_OBJECT           *Op,
@@ -88,6 +88,11 @@
     UINT32                      Count,
     UINT32                      ExpectedCount);
 
+static void
+ApCustomPackage (
+    ACPI_PARSE_OBJECT           *ParentOp,
+    const ACPI_PREDEFINED_INFO  *Predefined);
+
 
 /*******************************************************************************
  *
@@ -168,6 +173,11 @@
 
     switch (Package->RetInfo.Type)
     {
+    case ACPI_PTYPE_CUSTOM:
+
+        ApCustomPackage (ParentOp, Predefined);
+        break;
+
     case ACPI_PTYPE1_FIXED:
         /*
          * The package count is fixed and there are no subpackages
@@ -382,6 +392,86 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    ApCustomPackage
+ *
+ * PARAMETERS:  ParentOp            - Parse op for the package
+ *              Predefined          - Pointer to package-specific info for
+ *                                    the method
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Validate packages that don't fit into the standard model and
+ *              require custom code.
+ *
+ * NOTE: Currently used for the _BIX method only. When needed for two or more
+ * methods, probably a detect/dispatch mechanism will be required.
+ *
+ ******************************************************************************/
+
+static void
+ApCustomPackage (
+    ACPI_PARSE_OBJECT           *ParentOp,
+    const ACPI_PREDEFINED_INFO  *Predefined)
+{
+    ACPI_PARSE_OBJECT           *Op;
+    UINT32                      Count;
+    UINT32                      ExpectedCount;
+    UINT32                      Version;
+
+
+    /* First child is the package length */
+
+    Op = ParentOp->Asl.Child;
+    Count = (UINT32) Op->Asl.Value.Integer;
+
+    /* Get the version number, must be Integer */
+
+    Op = Op->Asl.Next;
+    Version = (UINT32) Op->Asl.Value.Integer;
+    if (Op->Asl.ParseOpcode != PARSEOP_INTEGER)
+    {
+        AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, MsgBuffer);
+        return;
+    }
+
+    /* Validate count (# of elements) */
+
+    ExpectedCount = 21;         /* Version 1 */
+    if (Version == 0)
+    {
+        ExpectedCount = 20;     /* Version 0 */
+    }
+
+    if (Count < ExpectedCount)
+    {
+        ApPackageTooSmall (Predefined->Info.Name, ParentOp,
+            Count, ExpectedCount);
+        return;
+    }
+    else if (Count > ExpectedCount)
+    {
+        ApPackageTooLarge (Predefined->Info.Name, ParentOp,
+            Count, ExpectedCount);
+    }
+
+    /* Validate all elements of the package */
+
+    Op = ApCheckPackageElements (Predefined->Info.Name, Op,
+        ACPI_RTYPE_INTEGER, 16,
+        ACPI_RTYPE_STRING, 4);
+
+    /* Version 1 has a single trailing integer */
+
+    if (Version > 0)
+    {
+        ApCheckPackageElements (Predefined->Info.Name, Op,
+            ACPI_RTYPE_INTEGER, 1, 0, 0);
+    }
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    ApCheckPackageElements
  *
  * PARAMETERS:  PredefinedName      - Name of the predefined object
@@ -391,7 +481,9 @@
  *              Type2               - Object type for second group
  *              Count2              - Count for second group
  *
- * RETURN:      None
+ * RETURN:      Next Op peer in the parse tree, after all specified elements
+ *              have been validated. Used for multiple validations (calls
+ *              to this function).
  *
  * DESCRIPTION: Validate all elements of a package. Works with packages that
  *              are defined to contain up to two groups of different object
@@ -399,7 +491,7 @@
  *
  ******************************************************************************/
 
-static void
+static ACPI_PARSE_OBJECT *
 ApCheckPackageElements (
     const char              *PredefinedName,
     ACPI_PARSE_OBJECT       *Op,
@@ -431,6 +523,8 @@
         ApCheckObjectType (PredefinedName, Op, Type2, (i + Count1));
         Op = Op->Asl.Next;
     }
+
+    return (Op);
 }
 
 
--- a/sys/external/bsd/acpica/dist/compiler/asltree.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asltree.c	Wed May 04 19:27:57 2016 +0000
@@ -58,6 +58,29 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    TrSetParent
+ *
+ * PARAMETERS:  Op                  - To be set to new parent
+ *              ParentOp            - The parent
+ *
+ * RETURN:      None, sets Op parent directly
+ *
+ * DESCRIPTION: Change the parent of a parse op.
+ *
+ ******************************************************************************/
+
+void
+TrSetParent (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_PARSE_OBJECT       *ParentOp)
+{
+
+    Op->Asl.Parent = ParentOp;
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    TrGetNextNode
  *
  * PARAMETERS:  None
@@ -982,7 +1005,7 @@
     {
     case PARSEOP_ASL_CODE:
 
-        RootNode = Op;
+        Gbl_ParseTreeRoot = Op;
         Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
         DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
         break;
@@ -1111,7 +1134,7 @@
     {
     case PARSEOP_ASL_CODE:
 
-        RootNode = Op;
+        Gbl_ParseTreeRoot = Op;
         Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
         DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
         break;
@@ -1417,7 +1440,7 @@
     ACPI_STATUS             Status;
 
 
-    if (!RootNode)
+    if (!Gbl_ParseTreeRoot)
     {
         return (AE_OK);
     }
--- a/sys/external/bsd/acpica/dist/compiler/aslutils.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslutils.c	Wed May 04 19:27:57 2016 +0000
@@ -67,6 +67,33 @@
     char                    *Name);
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    UtIsBigEndianMachine
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      TRUE if machine is big endian
+ *              FALSE if machine is little endian
+ *
+ * DESCRIPTION: Detect whether machine is little endian or big endian.
+ *
+ ******************************************************************************/
+
+UINT8
+UtIsBigEndianMachine (
+    void)
+{
+    union {
+        UINT32              Integer;
+        UINT8               Bytes[4];
+    } Overlay =                 {0xFF000000};
+
+
+    return (Overlay.Bytes[0]); /* Returns 0xFF (TRUE) for big endian */
+}
+
+
 /******************************************************************************
  *
  * FUNCTION:    UtQueryForOverwrite
@@ -289,63 +316,6 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    UtConvertByteToHex
- *
- * PARAMETERS:  RawByte             - Binary data
- *              Buffer              - Pointer to where the hex bytes will be
- *                                    stored
- *
- * RETURN:      Ascii hex byte is stored in Buffer.
- *
- * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
- *              with "0x"
- *
- ******************************************************************************/
-
-void
-UtConvertByteToHex (
-    UINT8                   RawByte,
-    UINT8                   *Buffer)
-{
-
-    Buffer[0] = '0';
-    Buffer[1] = 'x';
-
-    Buffer[2] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 4);
-    Buffer[3] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 0);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    UtConvertByteToAsmHex
- *
- * PARAMETERS:  RawByte             - Binary data
- *              Buffer              - Pointer to where the hex bytes will be
- *                                    stored
- *
- * RETURN:      Ascii hex byte is stored in Buffer.
- *
- * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
- *              with '0', and a trailing 'h' is added.
- *
- ******************************************************************************/
-
-void
-UtConvertByteToAsmHex (
-    UINT8                   RawByte,
-    UINT8                   *Buffer)
-{
-
-    Buffer[0] = '0';
-    Buffer[1] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 4);
-    Buffer[2] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 0);
-    Buffer[3] = 'h';
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    DbgPrint
  *
  * PARAMETERS:  Type                - Type of output
@@ -388,43 +358,6 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    UtPrintFormattedName
- *
- * PARAMETERS:  ParseOpcode         - Parser keyword ID
- *              Level               - Indentation level
- *
- * RETURN:      None
- *
- * DESCRIPTION: Print the ascii name of the parse opcode.
- *
- ******************************************************************************/
-
-#define TEXT_OFFSET 10
-
-void
-UtPrintFormattedName (
-    UINT16                  ParseOpcode,
-    UINT32                  Level)
-{
-
-    if (Level)
-    {
-        DbgPrint (ASL_TREE_OUTPUT,
-            "%*s", (3 * Level), " ");
-    }
-    DbgPrint (ASL_TREE_OUTPUT,
-        " %-20.20s", UtGetOpName (ParseOpcode));
-
-    if (Level < TEXT_OFFSET)
-    {
-        DbgPrint (ASL_TREE_OUTPUT,
-            "%*s", (TEXT_OFFSET - Level) * 3, " ");
-    }
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    UtSetParseOpName
  *
  * PARAMETERS:  Op                  - Parse op to be named.
@@ -993,7 +926,9 @@
     char                    ErrBuf[64];
 
 
-    Status = stroul64 (String, 0, &Converted);
+    Status = AcpiUtStrtoul64 (String, ACPI_ANY_BASE,
+        ACPI_MAX64_BYTE_WIDTH, &Converted);
+
     if (ACPI_FAILURE (Status))
     {
         snprintf (ErrBuf, sizeof(ErrBuf), "%s %s\n", "Conversion error:",
@@ -1005,198 +940,62 @@
 }
 
 
-/* TBD: use version in ACPICA main code base? */
+#ifdef _OBSOLETE_FUNCTIONS
+/* Removed 01/2016 */
 
 /*******************************************************************************
  *
- * FUNCTION:    stroul64
+ * FUNCTION:    UtConvertByteToHex
  *
- * PARAMETERS:  String              - Null terminated string
- *              Terminater          - Where a pointer to the terminating byte
- *                                    is returned
- *              Base                - Radix of the string
+ * PARAMETERS:  RawByte             - Binary data
+ *              Buffer              - Pointer to where the hex bytes will be
+ *                                    stored
  *
- * RETURN:      Converted value
+ * RETURN:      Ascii hex byte is stored in Buffer.
  *
- * DESCRIPTION: Convert a string into an unsigned value.
+ * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
+ *              with "0x"
  *
  ******************************************************************************/
 
-ACPI_STATUS
-stroul64 (
-    char                    *String,
-    UINT32                  Base,
-    UINT64                  *RetInteger)
+void
+UtConvertByteToHex (
+    UINT8                   RawByte,
+    UINT8                   *Buffer)
 {
-    UINT32                  Index;
-    UINT32                  Sign;
-    UINT64                  ReturnValue = 0;
-    ACPI_STATUS             Status = AE_OK;
+
+    Buffer[0] = '0';
+    Buffer[1] = 'x';
+
+    Buffer[2] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 4);
+    Buffer[3] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 0);
+}
 
 
-    *RetInteger = 0;
-
-    switch (Base)
-    {
-    case 0:
-    case 8:
-    case 10:
-    case 16:
-
-        break;
-
-    default:
-        /*
-         * The specified Base parameter is not in the domain of
-         * this function:
-         */
-        return (AE_BAD_PARAMETER);
-    }
-
-    /* Skip over any white space in the buffer: */
-
-    while (isspace ((int) *String) || *String == '\t')
-    {
-        ++String;
-    }
-
-    /*
-     * The buffer may contain an optional plus or minus sign.
-     * If it does, then skip over it but remember what is was:
-     */
-    if (*String == '-')
-    {
-        Sign = ACPI_SIGN_NEGATIVE;
-        ++String;
-    }
-    else if (*String == '+')
-    {
-        ++String;
-        Sign = ACPI_SIGN_POSITIVE;
-    }
-    else
-    {
-        Sign = ACPI_SIGN_POSITIVE;
-    }
-
-    /*
-     * If the input parameter Base is zero, then we need to
-     * determine if it is octal, decimal, or hexadecimal:
-     */
-    if (Base == 0)
-    {
-        if (*String == '0')
-        {
-            if (tolower ((int) *(++String)) == 'x')
-            {
-                Base = 16;
-                ++String;
-            }
-            else
-            {
-                Base = 8;
-            }
-        }
-        else
-        {
-            Base = 10;
-        }
-    }
-
-    /*
-     * For octal and hexadecimal bases, skip over the leading
-     * 0 or 0x, if they are present.
-     */
-    if (Base == 8 && *String == '0')
-    {
-        String++;
-    }
+/*******************************************************************************
+ *
+ * FUNCTION:    UtConvertByteToAsmHex
+ *
+ * PARAMETERS:  RawByte             - Binary data
+ *              Buffer              - Pointer to where the hex bytes will be
+ *                                    stored
+ *
+ * RETURN:      Ascii hex byte is stored in Buffer.
+ *
+ * DESCRIPTION: Perform hex-to-ascii translation. The return data is prefixed
+ *              with '0', and a trailing 'h' is added.
+ *
+ ******************************************************************************/
 
-    if (Base == 16 &&
-        *String == '0' &&
-        tolower ((int) *(++String)) == 'x')
-    {
-        String++;
-    }
-
-    /* Main loop: convert the string to an unsigned long */
-
-    while (*String)
-    {
-        if (isdigit ((int) *String))
-        {
-            Index = ((UINT8) *String) - '0';
-        }
-        else
-        {
-            Index = (UINT8) toupper ((int) *String);
-            if (isupper ((int) Index))
-            {
-                Index = Index - 'A' + 10;
-            }
-            else
-            {
-                goto ErrorExit;
-            }
-        }
-
-        if (Index >= Base)
-        {
-            goto ErrorExit;
-        }
-
-        /* Check to see if value is out of range: */
+void
+UtConvertByteToAsmHex (
+    UINT8                   RawByte,
+    UINT8                   *Buffer)
+{
 
-        if (ReturnValue > ((ACPI_UINT64_MAX - (UINT64) Index) /
-            (UINT64) Base))
-        {
-            goto ErrorExit;
-        }
-        else
-        {
-            ReturnValue *= Base;
-            ReturnValue += Index;
-        }
-
-        ++String;
-    }
-
-
-    /* If a minus sign was present, then "the conversion is negated": */
-
-    if (Sign == ACPI_SIGN_NEGATIVE)
-    {
-        ReturnValue = (ACPI_UINT32_MAX - ReturnValue) + 1;
-    }
-
-    *RetInteger = ReturnValue;
-    return (Status);
-
-
-ErrorExit:
-    switch (Base)
-    {
-    case 8:
-
-        Status = AE_BAD_OCTAL_CONSTANT;
-        break;
-
-    case 10:
-
-        Status = AE_BAD_DECIMAL_CONSTANT;
-        break;
-
-    case 16:
-
-        Status = AE_BAD_HEX_CONSTANT;
-        break;
-
-    default:
-
-        /* Base validated above */
-
-        break;
-    }
-
-    return (Status);
+    Buffer[0] = '0';
+    Buffer[1] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 4);
+    Buffer[2] = (UINT8) AcpiUtHexToAsciiChar (RawByte, 0);
+    Buffer[3] = 'h';
 }
+#endif /* OBSOLETE_FUNCTIONS */
--- a/sys/external/bsd/acpica/dist/compiler/aslwalks.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslwalks.c	Wed May 04 19:27:57 2016 +0000
@@ -104,9 +104,12 @@
                  * The called method is untyped at this time (typically a
                  * forward reference).
                  *
-                 * Check for a recursive method call first.
+                 * Check for a recursive method call first. Note: the
+                 * Child->Node will be null if the method has not been
+                 * resolved.
                  */
-                if (Op->Asl.ParentMethod != Op->Asl.Child->Asl.Node->Op)
+                if (Op->Asl.Child->Asl.Node &&
+                    (Op->Asl.ParentMethod != Op->Asl.Child->Asl.Node->Op))
                 {
                     /* We must type the method here */
 
@@ -859,8 +862,19 @@
     case PARSEOP_DEREFOF:
     case PARSEOP_REFOF:
     case PARSEOP_INDEX:
+
+        return;
+
     case PARSEOP_METHODCALL:
-
+        /*
+         * A target is not allowed to be a method call.
+         * It is not supported by the ACPICA interpreter, nor is it
+         * supported by the MS ASL compiler or the MS interpreter.
+         * Although legal syntax up until ACPI 6.1, support for this
+         * will be removed for ACPI 6.2 (02/2016)
+         */
+        AslError (ASL_ERROR, ASL_MSG_SYNTAX,
+            TargetOperandOp, "Illegal method invocation as a target operand");
         return;
 
     default:
--- a/sys/external/bsd/acpica/dist/compiler/aslxref.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslxref.c	Wed May 04 19:27:57 2016 +0000
@@ -133,8 +133,6 @@
     ACPI_WALK_STATE         *WalkState;
 
 
-    DbgPrint (ASL_DEBUG_OUTPUT, "\nCross referencing namespace\n\n");
-
     /*
      * Create a new walk state for use when looking up names
      * within the namespace (Passed as context to the callbacks)
@@ -147,8 +145,8 @@
 
     /* Walk the entire parse tree */
 
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_TWICE, XfNamespaceLocateBegin,
-        XfNamespaceLocateEnd, WalkState);
+    TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_TWICE,
+        XfNamespaceLocateBegin, XfNamespaceLocateEnd, WalkState);
 
     ACPI_FREE (WalkState);
     return (AE_OK);
@@ -880,7 +878,8 @@
             NextOp = NextOp->Asl.Next;
         }
 
-        if (Node->Value != ASL_EXTERNAL_METHOD)
+        if (Node->Value != ASL_EXTERNAL_METHOD &&
+            Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_EXTERNAL)
         {
             /*
              * Check the parsed arguments with the number expected by the
--- a/sys/external/bsd/acpica/dist/compiler/dtparser.y	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtparser.y	Wed May 04 19:27:57 2016 +0000
@@ -171,15 +171,15 @@
 
       /* Default base for a non-prefixed integer is 16 */
 
-    | EXPOP_NUMBER                                  { stroul64 (DtParsertext, 16, &$$);}
+    | EXPOP_NUMBER                                  { AcpiUtStrtoul64 (DtParsertext, 16, ACPI_MAX64_BYTE_WIDTH, &$$);}
 
       /* Standard hex number (0x1234) */
 
-    | EXPOP_HEX_NUMBER                              { stroul64 (DtParsertext, 16, &$$);}
+    | EXPOP_HEX_NUMBER                              { AcpiUtStrtoul64 (DtParsertext, 16, ACPI_MAX64_BYTE_WIDTH, &$$);}
 
-      /* TBD: Decimal number with prefix (0d1234) - Not supported by stroul64 at this time */
+      /* TBD: Decimal number with prefix (0d1234) - Not supported by strtoul64 at this time */
 
-    | EXPOP_DECIMAL_NUMBER                          { stroul64 (DtParsertext, 10, &$$);}
+    | EXPOP_DECIMAL_NUMBER                          { AcpiUtStrtoul64 (DtParsertext, 10, ACPI_MAX64_BYTE_WIDTH, &$$);}
     ;
 %%
 
--- a/sys/external/bsd/acpica/dist/compiler/prparser.y	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/prparser.y	Wed May 04 19:27:57 2016 +0000
@@ -184,11 +184,11 @@
 
       /* Default base for a non-prefixed integer is 10 */
 
-    | EXPOP_NUMBER                                  { stroul64 (PrParsertext, 10, &$$);}
+    | EXPOP_NUMBER                                  { AcpiUtStrtoul64 (PrParsertext, 10, ACPI_MAX64_BYTE_WIDTH, &$$);}
 
       /* Standard hex number (0x1234) */
 
-    | EXPOP_HEX_NUMBER                              { stroul64 (PrParsertext, 16, &$$);}
+    | EXPOP_HEX_NUMBER                              { AcpiUtStrtoul64 (PrParsertext, 16, ACPI_MAX64_BYTE_WIDTH, &$$);}
     ;
 %%
 
--- a/sys/external/bsd/acpica/dist/debugger/dbcmds.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbcmds.c	Wed May 04 19:27:57 2016 +0000
@@ -405,7 +405,7 @@
         {
             /* If the pointer is null, the table has been unloaded */
 
-            ACPI_INFO ((AE_INFO, "%4.4s - Table has been unloaded",
+            ACPI_INFO (("%4.4s - Table has been unloaded",
                 TableDesc->Signature.Ascii));
         }
     }
--- a/sys/external/bsd/acpica/dist/debugger/dbinput.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbinput.c	Wed May 04 19:27:57 2016 +0000
@@ -720,7 +720,8 @@
 
     for (i = CMD_FIRST_VALID; AcpiGbl_DbCommands[i].Name; i++)
     {
-        if (strstr (AcpiGbl_DbCommands[i].Name, UserCommand) ==
+        if (strstr (
+            ACPI_CAST_PTR (char, AcpiGbl_DbCommands[i].Name), UserCommand) ==
             AcpiGbl_DbCommands[i].Name)
         {
             return (i);
--- a/sys/external/bsd/acpica/dist/debugger/dbnames.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbnames.c	Wed May 04 19:27:57 2016 +0000
@@ -798,7 +798,7 @@
         return (AE_OK);
     }
 
-    if (!AcpiUtValidAcpiName (Node->Name.Ascii))
+    if (!AcpiUtValidNameseg (Node->Name.Ascii))
     {
         AcpiOsPrintf ("Invalid AcpiName for Node %p\n", Node);
         return (AE_OK);
--- a/sys/external/bsd/acpica/dist/debugger/dbutils.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbutils.c	Wed May 04 19:27:57 2016 +0000
@@ -63,8 +63,6 @@
     UINT32                  Address);
 #endif
 
-static const char                 *Gbl_HexToAscii = "0123456789ABCDEF";
-
 
 /*******************************************************************************
  *
@@ -94,7 +92,9 @@
 
     for (i = 0; Arguments[i].Name; i++)
     {
-        if (strstr (Arguments[i].Name, UserArgument) == Arguments[i].Name)
+        if (strstr (
+            ACPI_CAST_PTR (char, Arguments[i].Name),
+            ACPI_CAST_PTR (char, UserArgument)) == Arguments[i].Name)
         {
             return (i);
         }
@@ -386,7 +386,7 @@
 
     for (i = 7; i >= 0; i--)
     {
-        Buffer[i] = Gbl_HexToAscii [Value & 0x0F];
+        Buffer[i] = AcpiGbl_UpperHexDigits [Value & 0x0F];
         Value = Value >> 4;
     }
 }
--- a/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c	Wed May 04 19:27:57 2016 +0000
@@ -73,53 +73,13 @@
     UINT8                   *ByteData,
     UINT32                  ByteCount);
 
-
-#define ACPI_BUFFER_BYTES_PER_LINE      8
+static const char *
+AcpiDmFindNameByIndex (
+    UINT64                  Index,
+    const char              **List);
 
 
-/* Strings for ToPld */
-
-static const char *DmPanelList[] =
-{
-    "TOP",
-    "BOTTOM",
-    "LEFT",
-    "RIGHT",
-    "FRONT",
-    "BACK",
-    "UNKNOWN",
-    NULL
-};
-
-static const char *DmVerticalPositionList[] =
-{
-    "UPPER",
-    "CENTER",
-    "LOWER",
-    NULL
-};
-
-static const char *DmHorizontalPositionList[] =
-{
-    "LEFT",
-    "CENTER",
-    "RIGHT",
-    NULL
-};
-
-static const char *DmShapeList[] =
-{
-    "ROUND",
-    "OVAL",
-    "SQUARE",
-    "VERTICALRECTANGLE",
-    "HORIZONTALRECTANGLE",
-    "VERTICALTRAPEZOID",
-    "HORIZONTALTRAPEZOID",
-    "UNKNOWN",
-    "CHAMFERED",
-    NULL
-};
+#define ACPI_BUFFER_BYTES_PER_LINE      8
 
 
 /*******************************************************************************
@@ -656,21 +616,21 @@
 static const char *
 AcpiDmFindNameByIndex (
     UINT64                  Index,
-    const char            **List)
+    const char              **List)
 {
-    const char              *Str;
-    UINT32                   i;
+    const char              *NameString;
+    UINT32                  i;
 
 
     /* Bounds check */
 
-    Str = List[0];
+    NameString = List[0];
     i = 0;
 
-    while(Str)
+    while (NameString)
     {
         i++;
-        Str = List[i];
+        NameString = List[i];
     }
 
     if (Index >= i)
@@ -698,12 +658,12 @@
  *
  ******************************************************************************/
 
-#define ACPI_PLD_OUTPUT08   "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT08P  "%*.s%-18s = 0x%X)\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT16   "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT16P  "%*.s%-18s = 0x%X)\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT24   "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUTSTR  "%*.s%-18s = \"%s\",\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT08   "%*.s%-22s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT08P  "%*.s%-22s = 0x%X)\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT16   "%*.s%-22s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT16P  "%*.s%-22s = 0x%X)\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT24   "%*.s%-22s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUTSTR  "%*.s%-22s = \"%s\",\n", ACPI_MUL_4 (Level), " "
 
 static void
 AcpiDmPldBuffer (
@@ -751,16 +711,16 @@
     AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Dock", PldInfo->Dock);
     AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Lid", PldInfo->Lid);
     AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Panel",
-        AcpiDmFindNameByIndex(PldInfo->Panel, DmPanelList));
+        AcpiDmFindNameByIndex(PldInfo->Panel, AcpiGbl_PldPanelList));
 
     AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_VerticalPosition",
-        AcpiDmFindNameByIndex(PldInfo->VerticalPosition, DmVerticalPositionList));
+        AcpiDmFindNameByIndex(PldInfo->VerticalPosition, AcpiGbl_PldVerticalPositionList));
 
     AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_HorizontalPosition",
-        AcpiDmFindNameByIndex(PldInfo->HorizontalPosition, DmHorizontalPositionList));
+        AcpiDmFindNameByIndex(PldInfo->HorizontalPosition, AcpiGbl_PldHorizontalPositionList));
 
     AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Shape",
-        AcpiDmFindNameByIndex(PldInfo->Shape, DmShapeList));
+        AcpiDmFindNameByIndex(PldInfo->Shape, AcpiGbl_PldShapeList));
     AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_GroupOrientation", PldInfo->GroupOrientation);
 
     AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_GroupToken", PldInfo->GroupToken);
--- a/sys/external/bsd/acpica/dist/disassembler/dmcstyle.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmcstyle.c	Wed May 04 19:27:57 2016 +0000
@@ -215,6 +215,7 @@
 
         Child1->Common.DisasmOpcode = ACPI_DASM_LNOT_SUFFIX;
         Op->Common.DisasmOpcode = ACPI_DASM_LNOT_PREFIX;
+        Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT;
 
         /* Save symbol string in the next child (not peer) */
 
@@ -378,7 +379,7 @@
 
                 /* Convert operator to compound assignment */
 
-                Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND;
+                Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT;
                 Child1->Common.OperatorSymbol = NULL;
                 return (TRUE);
             }
@@ -406,7 +407,7 @@
 
                 /* Convert operator to compound assignment */
 
-                Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND;
+                Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT;
                 Child1->Common.OperatorSymbol = NULL;
                 return (TRUE);
             }
@@ -522,6 +523,19 @@
         break;
     }
 
+    /*
+     * Nodes marked with ACPI_PARSEOP_PARAMLIST don't need a parens
+     * output here. We also need to check the parent to see if this op
+     * is part of a compound test (!=, >=, <=).
+     */
+    if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) ||
+       ((Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) &&
+        (Op->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX)))
+    {
+        /* Do Nothing. Paren already generated */
+        return (TRUE);
+    }
+
     /* All other operators, emit an open paren */
 
     AcpiOsPrintf ("(");
@@ -547,6 +561,7 @@
 AcpiDmCloseOperator (
     ACPI_PARSE_OBJECT       *Op)
 {
+    BOOLEAN                 IsCStyleOp = FALSE;
 
     /* Always emit paren if ASL+ disassembly disabled */
 
@@ -578,7 +593,7 @@
 
         /* Emit paren only if this is not a compound assignment */
 
-        if (Op->Common.DisasmFlags & ACPI_PARSEOP_COMPOUND)
+        if (Op->Common.DisasmFlags & ACPI_PARSEOP_COMPOUND_ASSIGNMENT)
         {
             return;
         }
@@ -589,6 +604,8 @@
         {
             AcpiOsPrintf (")");
         }
+
+        IsCStyleOp = TRUE;
         break;
 
     case AML_INDEX_OP:
@@ -616,7 +633,21 @@
         break;
     }
 
+    /*
+     * Nodes marked with ACPI_PARSEOP_PARAMLIST don't need a parens
+     * output here. We also need to check the parent to see if this op
+     * is part of a compound test (!=, >=, <=).
+     */
+    if (IsCStyleOp &&
+       ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) ||
+       ((Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) &&
+        (Op->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX))))
+    {
+        return;
+    }
+
     AcpiOsPrintf (")");
+    return;
 }
 
 
--- a/sys/external/bsd/acpica/dist/disassembler/dmresrcl2.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmresrcl2.c	Wed May 04 19:27:57 2016 +0000
@@ -504,7 +504,7 @@
     /* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
 
     AcpiDmIndent (Level);
-    AcpiOsPrintf ("I2cSerialBus (0x%4.4X, %s, 0x%8.8X,\n",
+    AcpiOsPrintf ("I2cSerialBusV2 (0x%4.4X, %s, 0x%8.8X,\n",
         Resource->I2cSerialBus.SlaveAddress,
         AcpiGbl_SmDecode [ACPI_GET_1BIT_FLAG (Resource->I2cSerialBus.Flags)],
         Resource->I2cSerialBus.ConnectionSpeed);
@@ -533,7 +533,11 @@
     /* Insert a descriptor name */
 
     AcpiDmDescriptorName ();
-    AcpiOsPrintf (",\n");
+
+    /* Share */
+
+    AcpiOsPrintf (", %s,\n",
+        AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->I2cSerialBus.Flags, 2)]);
 
     /* Dump the vendor data */
 
@@ -574,7 +578,7 @@
     /* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
 
     AcpiDmIndent (Level);
-    AcpiOsPrintf ("SpiSerialBus (0x%4.4X, %s, %s, 0x%2.2X,\n",
+    AcpiOsPrintf ("SpiSerialBusV2 (0x%4.4X, %s, %s, 0x%2.2X,\n",
         Resource->SpiSerialBus.DeviceSelection,
         AcpiGbl_DpDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags, 1)],
         AcpiGbl_WmDecode [ACPI_GET_1BIT_FLAG (Resource->SpiSerialBus.TypeSpecificFlags)],
@@ -612,7 +616,11 @@
     /* Insert a descriptor name */
 
     AcpiDmDescriptorName ();
-    AcpiOsPrintf (",\n");
+
+    /* Share */
+
+    AcpiOsPrintf (", %s,\n",
+        AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->SpiSerialBus.Flags, 2)]);
 
     /* Dump the vendor data */
 
@@ -653,7 +661,7 @@
     /* ConnectionSpeed, BitsPerByte, StopBits */
 
     AcpiDmIndent (Level);
-    AcpiOsPrintf ("UartSerialBus (0x%8.8X, %s, %s,\n",
+    AcpiOsPrintf ("UartSerialBusV2 (0x%8.8X, %s, %s,\n",
         Resource->UartSerialBus.DefaultBaudRate,
         AcpiGbl_BpbDecode [ACPI_EXTRACT_3BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 4)],
         AcpiGbl_SbDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->UartSerialBus.TypeSpecificFlags, 2)]);
@@ -694,7 +702,11 @@
     /* Insert a descriptor name */
 
     AcpiDmDescriptorName ();
-    AcpiOsPrintf (",\n");
+
+    /* Share */
+
+    AcpiOsPrintf (", %s,\n",
+        AcpiGbl_ShrDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->UartSerialBus.Flags, 2)]);
 
     /* Dump the vendor data */
 
--- a/sys/external/bsd/acpica/dist/disassembler/dmwalk.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmwalk.c	Wed May 04 19:27:57 2016 +0000
@@ -410,6 +410,7 @@
     const ACPI_OPCODE_INFO  *OpInfo;
     UINT32                  Name;
     ACPI_PARSE_OBJECT       *NextOp;
+    ACPI_PARSE_OBJECT       *NextOp2;
     UINT32                  AmlOffset;
 
 
@@ -436,8 +437,7 @@
                     AcpiUtDumpBuffer (
                         (Info->StartAml + Info->AmlOffset),
                         (Op->Common.Aml - Info->PreviousAml),
-                        DB_BYTE_DISPLAY,
-                        Info->AmlOffset);
+                        DB_BYTE_DISPLAY, Info->AmlOffset);
                     AcpiOsPrintf ("\n");
                 }
 
@@ -455,6 +455,33 @@
         return (AE_CTRL_DEPTH);
     }
 
+    if (Op->Common.AmlOpcode == AML_IF_OP)
+    {
+        NextOp = AcpiPsGetDepthNext (NULL, Op);
+        if (NextOp)
+        {
+            NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
+
+            /*
+             * A Zero predicate indicates the possibility of one or more
+             * External() opcodes within the If() block.
+             */
+            if (NextOp->Common.AmlOpcode == AML_ZERO_OP)
+            {
+                NextOp2 = NextOp->Common.Next;
+
+                if (NextOp2 &&
+                    (NextOp2->Common.AmlOpcode == AML_EXTERNAL_OP))
+                {
+                    /* Ignore the If 0 block and all children */
+
+                    Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
+                    return (AE_CTRL_DEPTH);
+                }
+            }
+        }
+    }
+
     /* Level 0 is at the Definition Block level */
 
     if (Level == 0)
@@ -487,7 +514,7 @@
         }
     }
     else if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
-         (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
+         (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)) &&
          (!(Op->Common.DisasmFlags & ACPI_PARSEOP_ELSEIF)) &&
          (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
     {
@@ -641,10 +668,10 @@
 
                 AcpiOsPrintf (", ");
                 NextOp = AcpiPsGetDepthNext (NULL, Op);
-                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
+                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
 
                 NextOp = NextOp->Common.Next;
-                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
+                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
                 return (AE_OK);
 
             case AML_PROCESSOR_OP:
@@ -653,13 +680,13 @@
 
                 AcpiOsPrintf (", ");
                 NextOp = AcpiPsGetDepthNext (NULL, Op);
-                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
+                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
 
                 NextOp = NextOp->Common.Next;
-                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
+                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
 
                 NextOp = NextOp->Common.Next;
-                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
+                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
                 return (AE_OK);
 
             case AML_MUTEX_OP:
@@ -718,12 +745,12 @@
                  * Bank Value. This is a TermArg in the middle of the parameter
                  * list, must handle it here.
                  *
-                 * Disassemble the TermArg parse tree. ACPI_PARSEOP_PARAMLIST
+                 * Disassemble the TermArg parse tree. ACPI_PARSEOP_PARAMETER_LIST
                  * eliminates newline in the output.
                  */
                 NextOp = NextOp->Common.Next;
 
-                Info->Flags = ACPI_PARSEOP_PARAMLIST;
+                Info->Flags = ACPI_PARSEOP_PARAMETER_LIST;
                 AcpiDmWalkParseTree (NextOp, AcpiDmDescendingOp,
                     AcpiDmAscendingOp, Info);
                 Info->Flags = 0;
@@ -785,11 +812,11 @@
 
             /* Normal Buffer, mark size as in the parameter list */
 
-            NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
+            NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
             return (AE_OK);
 
+        case AML_IF_OP:
         case AML_VAR_PACKAGE_OP:
-        case AML_IF_OP:
         case AML_WHILE_OP:
 
             /* The next op is the size or predicate parameter */
@@ -797,7 +824,7 @@
             NextOp = AcpiPsGetDepthNext (NULL, Op);
             if (NextOp)
             {
-                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
+                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
             }
             return (AE_OK);
 
@@ -808,7 +835,7 @@
             NextOp = AcpiPsGetDepthNext (NULL, Op);
             if (NextOp)
             {
-                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
+                NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMETER_LIST;
             }
             return (AE_OK);
 
@@ -907,14 +934,14 @@
         if (!AcpiDmCommaIfListMember (Op))
         {
             if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
-                 (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
+                 (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)) &&
                  (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
             {
                 /*
                  * This is a first-level element of a term list
                  * start a new line
                  */
-                if (!(Info->Flags & ACPI_PARSEOP_PARAMLIST))
+                if (!(Info->Flags & ACPI_PARSEOP_PARAMETER_LIST))
                 {
                     AcpiOsPrintf ("\n");
                 }
@@ -969,7 +996,7 @@
         if (!AcpiDmCommaIfListMember (Op))
         {
             if ((AcpiDmBlockType (Op->Common.Parent) & BLOCK_BRACE) &&
-                 (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)) &&
+                 (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)) &&
                  (Op->Common.AmlOpcode != AML_INT_BYTELIST_OP))
             {
                 /*
@@ -986,7 +1013,7 @@
             case AML_PACKAGE_OP:
             case AML_VAR_PACKAGE_OP:
 
-                if (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST))
+                if (!(Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST))
                 {
                     AcpiOsPrintf ("\n");
                 }
@@ -1000,17 +1027,17 @@
         break;
     }
 
-    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST)
+    if (Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST)
     {
         if ((Op->Common.Next) &&
-            (Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMLIST))
+            (Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST))
         {
             return (AE_OK);
         }
 
         /*
          * The parent Op is guaranteed to be valid because of the flag
-         * ACPI_PARSEOP_PARAMLIST -- which means that this op is part of
+         * ACPI_PARSEOP_PARAMETER_LIST -- which means that this op is part of
          * a parameter list and thus has a valid parent.
          */
         ParentOp = Op->Common.Parent;
--- a/sys/external/bsd/acpica/dist/events/evregion.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/events/evregion.c	Wed May 04 19:27:57 2016 +0000
@@ -99,7 +99,6 @@
 
     /* Run the _REG methods for OpRegions in each default address space */
 
-    AcpiGbl_RegMethodsEnabled = TRUE;
     for (i = 0; i < ACPI_NUM_DEFAULT_SPACES; i++)
     {
         /*
@@ -552,58 +551,6 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiEvAssociateRegMethod
- *
- * PARAMETERS:  RegionObj           - Region object
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Find and associate _REG method to a region
- *
- ******************************************************************************/
-
-void
-AcpiEvAssociateRegMethod (
-    ACPI_OPERAND_OBJECT     *RegionObj)
-{
-    ACPI_NAME               *RegNamePtr = (ACPI_NAME *)__UNCONST(METHOD_NAME__REG);
-    ACPI_NAMESPACE_NODE     *MethodNode;
-    ACPI_NAMESPACE_NODE     *Node;
-    ACPI_OPERAND_OBJECT     *RegionObj2;
-    ACPI_STATUS             Status;
-
-
-    ACPI_FUNCTION_TRACE (EvAssociateRegMethod);
-
-
-    RegionObj2 = AcpiNsGetSecondaryObject (RegionObj);
-    if (!RegionObj2)
-    {
-        return_VOID;
-    }
-
-    Node = RegionObj->Region.Node->Parent;
-
-    /* Find any "_REG" method associated with this region definition */
-
-    Status = AcpiNsSearchOneScope (
-        *RegNamePtr, Node, ACPI_TYPE_METHOD, &MethodNode);
-    if (ACPI_SUCCESS (Status))
-    {
-        /*
-         * The _REG method is optional and there can be only one per region
-         * definition. This will be executed when the handler is attached
-         * or removed
-         */
-        RegionObj2->Extra.Method_REG = MethodNode;
-    }
-
-    return_VOID;
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    AcpiEvExecuteRegMethod
  *
  * PARAMETERS:  RegionObj           - Region object
@@ -623,21 +570,45 @@
     ACPI_EVALUATE_INFO      *Info;
     ACPI_OPERAND_OBJECT     *Args[3];
     ACPI_OPERAND_OBJECT     *RegionObj2;
+    const ACPI_NAME         *RegNamePtr = ACPI_CAST_PTR (ACPI_NAME, METHOD_NAME__REG);
+    ACPI_NAMESPACE_NODE     *MethodNode;
+    ACPI_NAMESPACE_NODE     *Node;
     ACPI_STATUS             Status;
 
 
     ACPI_FUNCTION_TRACE (EvExecuteRegMethod);
 
 
+    if (!AcpiGbl_NamespaceInitialized ||
+        RegionObj->Region.Handler == NULL)
+    {
+        return_ACPI_STATUS (AE_OK);
+    }
+
     RegionObj2 = AcpiNsGetSecondaryObject (RegionObj);
     if (!RegionObj2)
     {
         return_ACPI_STATUS (AE_NOT_EXIST);
     }
 
-    if (RegionObj2->Extra.Method_REG == NULL ||
-        RegionObj->Region.Handler == NULL ||
-        !AcpiGbl_RegMethodsEnabled)
+    /*
+     * Find any "_REG" method associated with this region definition.
+     * The method should always be updated as this function may be
+     * invoked after a namespace change.
+     */
+    Node = RegionObj->Region.Node->Parent;
+    Status = AcpiNsSearchOneScope (
+        *RegNamePtr, Node, ACPI_TYPE_METHOD, &MethodNode);
+    if (ACPI_SUCCESS (Status))
+    {
+        /*
+         * The _REG method is optional and there can be only one per
+         * region definition. This will be executed when the handler is
+         * attached or removed.
+         */
+        RegionObj2->Extra.Method_REG = MethodNode;
+    }
+    if (RegionObj2->Extra.Method_REG == NULL)
     {
         return_ACPI_STATUS (AE_OK);
     }
--- a/sys/external/bsd/acpica/dist/events/evrgnini.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/events/evrgnini.c	Wed May 04 19:27:57 2016 +0000
@@ -582,7 +582,6 @@
         return_ACPI_STATUS (AE_OK);
     }
 
-    AcpiEvAssociateRegMethod (RegionObj);
     RegionObj->Common.Flags |= AOPOBJ_OBJECT_INITIALIZED;
 
     Node = RegionObj->Region.Node->Parent;
--- a/sys/external/bsd/acpica/dist/executer/exconfig.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exconfig.c	Wed May 04 19:27:57 2016 +0000
@@ -129,7 +129,10 @@
     /* Execute any module-level code that was found in the table */
 
     AcpiExExitInterpreter ();
-    AcpiNsExecModuleCodeList ();
+    if (AcpiGbl_GroupModuleLevelCode)
+    {
+        AcpiNsExecModuleCodeList ();
+    }
     AcpiExEnterInterpreter ();
 
     /*
@@ -276,7 +279,7 @@
     Status = AcpiGetTableByIndex (TableIndex, &Table);
     if (ACPI_SUCCESS (Status))
     {
-        ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "Dynamic OEM Table Load:"));
+        ACPI_INFO (("Dynamic OEM Table Load:"));
         AcpiTbPrintTableHeader (0, Table);
     }
 
@@ -516,7 +519,7 @@
 
     /* Install the new table into the local data structures */
 
-    ACPI_INFO ((AE_INFO, "Dynamic OEM Table Load:"));
+    ACPI_INFO (("Dynamic OEM Table Load:"));
     (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
 
     Status = AcpiTbInstallStandardTable (ACPI_PTR_TO_PHYSADDR (Table),
--- a/sys/external/bsd/acpica/dist/executer/exdump.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exdump.c	Wed May 04 19:27:57 2016 +0000
@@ -66,7 +66,7 @@
 static void
 AcpiExOutPointer (
     const char              *Title,
-    void                    *Value);
+    const void              *Value);
 
 static void
 AcpiExDumpObject (
@@ -380,8 +380,7 @@
     ACPI_EXDUMP_INFO        *Info)
 {
     UINT8                   *Target;
-    char                    *Name;
-    const char              *ReferenceName;
+    const char              *Name;
     UINT8                   Count;
     ACPI_OPERAND_OBJECT     *Start;
     ACPI_OPERAND_OBJECT     *Data = NULL;
@@ -472,9 +471,7 @@
 
         case ACPI_EXD_REFERENCE:
 
-            ReferenceName = AcpiUtGetReferenceName (ObjDesc);
-            AcpiExOutString (
-                "Class Name", ACPI_CAST_PTR (char, ReferenceName));
+            AcpiExOutString ("Class Name", AcpiUtGetReferenceName (ObjDesc));
             AcpiExDumpReferenceObj (ObjDesc);
             break;
 
@@ -980,7 +977,7 @@
 static void
 AcpiExOutPointer (
     const char              *Title,
-    void                    *Value)
+    const void              *Value)
 {
     AcpiOsPrintf ("%20s : %p\n", Title, Value);
 }
--- a/sys/external/bsd/acpica/dist/hardware/hwxfsleep.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/hardware/hwxfsleep.c	Wed May 04 19:27:57 2016 +0000
@@ -97,7 +97,7 @@
  *              PhysicalAddress     - 32-bit physical address of ACPI real mode
  *                                    entry point
  *              PhysicalAddress64   - 64-bit physical address of ACPI protected
- *                                    entry point
+ *                                    mode entry point
  *
  * RETURN:      Status
  *
@@ -153,7 +153,7 @@
  * PARAMETERS:  PhysicalAddress     - 32-bit physical address of ACPI real mode
  *                                    entry point
  *              PhysicalAddress64   - 64-bit physical address of ACPI protected
- *                                    entry point
+ *                                    mode entry point
  *
  * RETURN:      Status
  *
--- a/sys/external/bsd/acpica/dist/include/acdisasm.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/acdisasm.h	Wed May 04 19:27:57 2016 +0000
@@ -302,6 +302,7 @@
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHest7[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHest8[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHest9[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHest10[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHestNotify[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHestBank[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoHpet[];
@@ -318,6 +319,7 @@
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3a[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3b[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort3c[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIort4[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortAcc[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortHdr[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoIortMap[];
@@ -383,6 +385,7 @@
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcctHdr[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct0[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct1[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoPcct2[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRsdp1[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoRsdp2[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt[];
--- a/sys/external/bsd/acpica/dist/include/acglobal.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/acglobal.h	Wed May 04 19:27:57 2016 +0000
@@ -86,8 +86,6 @@
 ACPI_GLOBAL (UINT8,                     AcpiGbl_IntegerByteWidth);
 ACPI_GLOBAL (UINT8,                     AcpiGbl_IntegerNybbleWidth);
 
-ACPI_INIT_GLOBAL (UINT8,                AcpiGbl_GroupModuleLevelCode, FALSE);
-
 
 /*****************************************************************************
  *
@@ -170,7 +168,7 @@
 
 /* Initialization sequencing */
 
-ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_RegMethodsEnabled, FALSE);
+ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_NamespaceInitialized, FALSE);
 
 /* Misc */
 
@@ -191,6 +189,8 @@
 extern const char                      *AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS];
 extern const char                      *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS];
 extern const char                      *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
+extern const char                       AcpiGbl_LowerHexDigits[];
+extern const char                       AcpiGbl_UpperHexDigits[];
 extern const ACPI_OPCODE_INFO           AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
 
 
@@ -372,6 +372,14 @@
 
 #endif /* ACPI_DEBUGGER */
 
+#if defined (ACPI_DISASSEMBLER) || defined (ACPI_ASL_COMPILER)
+
+ACPI_GLOBAL (const char,                *AcpiGbl_PldPanelList[]);
+ACPI_GLOBAL (const char,                *AcpiGbl_PldVerticalPositionList[]);
+ACPI_GLOBAL (const char,                *AcpiGbl_PldHorizontalPositionList[]);
+ACPI_GLOBAL (const char,                *AcpiGbl_PldShapeList[]);
+
+#endif
 
 /*****************************************************************************
  *
--- a/sys/external/bsd/acpica/dist/include/aclocal.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/aclocal.h	Wed May 04 19:27:57 2016 +0000
@@ -89,7 +89,7 @@
 #define ACPI_MTX_MEMORY                 5   /* Debug memory tracking lists */
 
 #define ACPI_MAX_MUTEX                  5
-#define ACPI_NUM_MUTEX                  ACPI_MAX_MUTEX+1
+#define ACPI_NUM_MUTEX                  (ACPI_MAX_MUTEX+1)
 
 /* Lock structure for reader/writer interfaces */
 
@@ -110,12 +110,12 @@
 #define ACPI_LOCK_HARDWARE              1
 
 #define ACPI_MAX_LOCK                   1
-#define ACPI_NUM_LOCK                   ACPI_MAX_LOCK+1
+#define ACPI_NUM_LOCK                   (ACPI_MAX_LOCK+1)
 
 
 /* This Thread ID means that the mutex is not in use (unlocked) */
 
-#define ACPI_MUTEX_NOT_ACQUIRED         (ACPI_THREAD_ID) -1
+#define ACPI_MUTEX_NOT_ACQUIRED         ((ACPI_THREAD_ID) -1)
 
 /* This Thread ID means an invalid thread ID */
 
@@ -1024,24 +1024,24 @@
 
 /* Parse object flags */
 
-#define ACPI_PARSEOP_GENERIC            0x01
-#define ACPI_PARSEOP_NAMED              0x02
-#define ACPI_PARSEOP_DEFERRED           0x04
-#define ACPI_PARSEOP_BYTELIST           0x08
-#define ACPI_PARSEOP_IN_STACK           0x10
-#define ACPI_PARSEOP_TARGET             0x20
-#define ACPI_PARSEOP_IN_CACHE           0x80
+#define ACPI_PARSEOP_GENERIC                0x01
+#define ACPI_PARSEOP_NAMED_OBJECT           0x02
+#define ACPI_PARSEOP_DEFERRED               0x04
+#define ACPI_PARSEOP_BYTELIST               0x08
+#define ACPI_PARSEOP_IN_STACK               0x10
+#define ACPI_PARSEOP_TARGET                 0x20
+#define ACPI_PARSEOP_IN_CACHE               0x80
 
 /* Parse object DisasmFlags */
 
-#define ACPI_PARSEOP_IGNORE             0x01
-#define ACPI_PARSEOP_PARAMLIST          0x02
-#define ACPI_PARSEOP_EMPTY_TERMLIST     0x04
-#define ACPI_PARSEOP_PREDEF_CHECKED     0x08
-#define ACPI_PARSEOP_CLOSING_PAREN      0x10
-#define ACPI_PARSEOP_COMPOUND           0x20
-#define ACPI_PARSEOP_ASSIGNMENT         0x40
-#define ACPI_PARSEOP_ELSEIF             0x80
+#define ACPI_PARSEOP_IGNORE                 0x01
+#define ACPI_PARSEOP_PARAMETER_LIST         0x02
+#define ACPI_PARSEOP_EMPTY_TERMLIST         0x04
+#define ACPI_PARSEOP_PREDEFINED_CHECKED     0x08
+#define ACPI_PARSEOP_CLOSING_PAREN          0x10
+#define ACPI_PARSEOP_COMPOUND_ASSIGNMENT    0x20
+#define ACPI_PARSEOP_ASSIGNMENT             0x40
+#define ACPI_PARSEOP_ELSEIF                 0x80
 
 
 /*****************************************************************************
@@ -1284,6 +1284,7 @@
 #define ACPI_EXT_ORIGIN_FROM_FILE           0x02    /* External came from a file */
 #define ACPI_EXT_INTERNAL_PATH_ALLOCATED    0x04    /* Deallocate internal path on completion */
 #define ACPI_EXT_EXTERNAL_EMITTED           0x08    /* External() statement has been emitted */
+#define ACPI_EXT_ORIGIN_FROM_OPCODE         0x10    /* External came from a External() opcode */
 
 
 typedef struct acpi_external_file
--- a/sys/external/bsd/acpica/dist/include/acmacros.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/acmacros.h	Wed May 04 19:27:57 2016 +0000
@@ -264,14 +264,30 @@
 
 #define ACPI_IS_MISALIGNED(value)           (((ACPI_SIZE) value) & (sizeof(ACPI_SIZE)-1))
 
+/* Generic (power-of-two) rounding */
+
+#define ACPI_IS_POWER_OF_TWO(a)             (((a) & ((a) - 1)) == 0)
+
 /*
  * Bitmask creation
  * Bit positions start at zero.
  * MASK_BITS_ABOVE creates a mask starting AT the position and above
  * MASK_BITS_BELOW creates a mask starting one bit BELOW the position
+ * MASK_BITS_ABOVE/BELOW accpets a bit offset to create a mask
+ * MASK_BITS_ABOVE/BELOW_32/64 accpets a bit width to create a mask
+ * Note: The ACPI_INTEGER_BIT_SIZE check is used to bypass compiler
+ * differences with the shift operator
  */
 #define ACPI_MASK_BITS_ABOVE(position)      (~((ACPI_UINT64_MAX) << ((UINT32) (position))))
 #define ACPI_MASK_BITS_BELOW(position)      ((ACPI_UINT64_MAX) << ((UINT32) (position)))
+#define ACPI_MASK_BITS_ABOVE_32(width)      ((UINT32) ACPI_MASK_BITS_ABOVE(width))
+#define ACPI_MASK_BITS_BELOW_32(width)      ((UINT32) ACPI_MASK_BITS_BELOW(width))
+#define ACPI_MASK_BITS_ABOVE_64(width)      ((width) == ACPI_INTEGER_BIT_SIZE ? \
+                                                ACPI_UINT64_MAX : \
+                                                ACPI_MASK_BITS_ABOVE(width))
+#define ACPI_MASK_BITS_BELOW_64(width)      ((width) == ACPI_INTEGER_BIT_SIZE ? \
+                                                (UINT64) 0 : \
+                                                ACPI_MASK_BITS_BELOW(width))
 
 /* Bitfields within ACPI registers */
 
@@ -287,10 +303,10 @@
 /* Generic bitfield macros and masks */
 
 #define ACPI_GET_BITS(SourcePtr, Position, Mask) \
-    ((*SourcePtr >> Position) & Mask)
+    ((*(SourcePtr) >> (Position)) & (Mask))
 
 #define ACPI_SET_BITS(TargetPtr, Position, Mask, Value) \
-    (*TargetPtr |= ((Value & Mask) << Position))
+    (*(TargetPtr) |= (((Value) & (Mask)) << (Position)))
 
 #define ACPI_1BIT_MASK      0x00000001
 #define ACPI_2BIT_MASK      0x00000003
--- a/sys/external/bsd/acpica/dist/include/acnamesp.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/acnamesp.h	Wed May 04 19:27:57 2016 +0000
@@ -94,7 +94,7 @@
 
 ACPI_STATUS
 AcpiNsInitializeDevices (
-    void);
+    UINT32                  Flags);
 
 
 /*
@@ -265,7 +265,7 @@
 void
 AcpiNsPrintPathname (
     UINT32                  NumSegments,
-    char                    *Pathname);
+    const char              *Pathname);
 
 ACPI_STATUS
 AcpiNsDumpOneObject (
--- a/sys/external/bsd/acpica/dist/include/acoutput.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/acoutput.h	Wed May 04 19:27:57 2016 +0000
@@ -357,7 +357,7 @@
 
 #define ACPI_TRACE_ENTRY(Name, Function, Type, Param) \
     ACPI_FUNCTION_NAME (Name) \
-    Function (ACPI_DEBUG_PARAMETERS, (Type) (Param))
+    Function (ACPI_DEBUG_PARAMETERS, (const Type) (Param))
 
 /* The actual entry trace macros */
 
--- a/sys/external/bsd/acpica/dist/include/acpixf.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/acpixf.h	Wed May 04 19:27:57 2016 +0000
@@ -46,7 +46,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20160108
+#define ACPI_CA_VERSION                 0x20160422
 
 #include "acconfig.h"
 #include "actypes.h"
@@ -192,9 +192,9 @@
 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_DoNotUseXsdt, FALSE);
 
 /*
- * Optionally allow default region handlers to be overridden.
+ * Optionally support group module level code.
  */
-ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_OverrideDefaultRegionHandlers, FALSE);
+ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_GroupModuleLevelCode, FALSE);
 
 /*
  * Optionally use 32-bit FADT addresses if and when there is a conflict
@@ -1172,11 +1172,9 @@
     ...))
 
 ACPI_MSG_DEPENDENT_RETURN_VOID (
-ACPI_PRINTF_LIKE(3)
+ACPI_PRINTF_LIKE(1)
 void ACPI_INTERNAL_VAR_XFACE
 AcpiInfo (
-    const char              *ModuleName,
-    UINT32                  LineNumber,
     const char              *Format,
     ...))
 
--- a/sys/external/bsd/acpica/dist/include/acresrc.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/acresrc.h	Wed May 04 19:27:57 2016 +0000
@@ -131,7 +131,7 @@
     UINT8                   Opcode;
     UINT8                   Offset;
     const char              *Name;
-    const char * const      *Pointer;
+    const char              **Pointer;
 
 } ACPI_RSDUMP_INFO;
 
@@ -227,7 +227,7 @@
 ACPI_STATUS
 AcpiRsGetMethodData (
     ACPI_HANDLE             Handle,
-    char                    *Path,
+    const char              *Path,
     ACPI_BUFFER             *RetBuffer);
 
 ACPI_STATUS
--- a/sys/external/bsd/acpica/dist/include/actables.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/actables.h	Wed May 04 19:27:57 2016 +0000
@@ -246,10 +246,6 @@
 AcpiTbParseRootTable (
     ACPI_PHYSICAL_ADDRESS   RsdpAddress);
 
-BOOLEAN
-AcpiIsValidSignature (
-    char                    *Signature);
-
 
 /*
  * tbxfload
--- a/sys/external/bsd/acpica/dist/include/actbl1.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/actbl1.h	Wed May 04 19:27:57 2016 +0000
@@ -268,7 +268,8 @@
     ACPI_EINJ_CHECK_BUSY_STATUS             = 6,
     ACPI_EINJ_GET_COMMAND_STATUS            = 7,
     ACPI_EINJ_SET_ERROR_TYPE_WITH_ADDRESS   = 8,
-    ACPI_EINJ_ACTION_RESERVED               = 9,     /* 9 and greater are reserved */
+    ACPI_EINJ_GET_EXECUTE_TIMINGS           = 9,
+    ACPI_EINJ_ACTION_RESERVED               = 10,    /* 10 and greater are reserved */
     ACPI_EINJ_TRIGGER_ERROR                 = 0xFF   /* Except for this value */
 };
 
@@ -397,7 +398,8 @@
     ACPI_ERST_GET_ERROR_RANGE       = 13,
     ACPI_ERST_GET_ERROR_LENGTH      = 14,
     ACPI_ERST_GET_ERROR_ATTRIBUTES  = 15,
-    ACPI_ERST_ACTION_RESERVED       = 16    /* 16 and greater are reserved */
+    ACPI_ERST_EXECUTE_TIMINGS       = 16,
+    ACPI_ERST_ACTION_RESERVED       = 17    /* 17 and greater are reserved */
 };
 
 /* Values for Instruction field above */
@@ -489,7 +491,8 @@
     ACPI_HEST_TYPE_AER_ENDPOINT         = 7,
     ACPI_HEST_TYPE_AER_BRIDGE           = 8,
     ACPI_HEST_TYPE_GENERIC_ERROR        = 9,
-    ACPI_HEST_TYPE_RESERVED             = 10    /* 10 and greater are reserved */
+    ACPI_HEST_TYPE_GENERIC_ERROR_V2     = 10,
+    ACPI_HEST_TYPE_RESERVED             = 11    /* 11 and greater are reserved */
 };
 
 
@@ -578,7 +581,11 @@
     ACPI_HEST_NOTIFY_NMI        = 4,
     ACPI_HEST_NOTIFY_CMCI       = 5,    /* ACPI 5.0 */
     ACPI_HEST_NOTIFY_MCE        = 6,    /* ACPI 5.0 */
-    ACPI_HEST_NOTIFY_RESERVED   = 7     /* 7 and greater are reserved */
+    ACPI_HEST_NOTIFY_GPIO       = 7,    /* ACPI 6.0 */
+    ACPI_HEST_NOTIFY_SEA        = 8,    /* ACPI 6.1 */
+    ACPI_HEST_NOTIFY_SEI        = 9,    /* ACPI 6.1 */
+    ACPI_HEST_NOTIFY_GSIV       = 10,   /* ACPI 6.1 */
+    ACPI_HEST_NOTIFY_RESERVED   = 11    /* 11 and greater are reserved */
 };
 
 /* Values for ConfigWriteEnable bitfield above */
@@ -697,6 +704,27 @@
 } ACPI_HEST_GENERIC;
 
 
+/* 10: Generic Hardware Error Source, version 2 */
+
+typedef struct acpi_hest_generic_v2
+{
+    ACPI_HEST_HEADER        Header;
+    UINT16                  RelatedSourceId;
+    UINT8                   Reserved;
+    UINT8                   Enabled;
+    UINT32                  RecordsToPreallocate;
+    UINT32                  MaxSectionsPerRecord;
+    UINT32                  MaxRawDataLength;
+    ACPI_GENERIC_ADDRESS    ErrorStatusAddress;
+    ACPI_HEST_NOTIFY        Notify;
+    UINT32                  ErrorBlockLength;
+    ACPI_GENERIC_ADDRESS    ReadAckRegister;
+    UINT64                  ReadAckPreserve;
+    UINT64                  ReadAckWrite;
+
+} ACPI_HEST_GENERIC_V2;
+
+
 /* Generic Error Status block */
 
 typedef struct acpi_hest_generic_status
@@ -733,6 +761,35 @@
 
 } ACPI_HEST_GENERIC_DATA;
 
+/* Extension for revision 0x0300 */
+
+typedef struct acpi_hest_generic_data_v300
+{
+    UINT8                   SectionType[16];
+    UINT32                  ErrorSeverity;
+    UINT16                  Revision;
+    UINT8                   ValidationBits;
+    UINT8                   Flags;
+    UINT32                  ErrorDataLength;
+    UINT8                   FruId[16];
+    UINT8                   FruText[20];
+    UINT64                  TimeStamp;
+
+} ACPI_HEST_GENERIC_DATA_V300;
+
+/* Values for ErrorSeverity above */
+
+#define ACPI_HEST_GEN_ERROR_RECOVERABLE     0
+#define ACPI_HEST_GEN_ERROR_FATAL           1
+#define ACPI_HEST_GEN_ERROR_CORRECTED       2
+#define ACPI_HEST_GEN_ERROR_NONE            3
+
+/* Flags for ValidationBits above */
+
+#define ACPI_HEST_GEN_VALID_FRU_ID          (1)
+#define ACPI_HEST_GEN_VALID_FRU_STRING      (1<<1)
+#define ACPI_HEST_GEN_VALID_TIMESTAMP       (1<<2)
+
 
 /*******************************************************************************
  *
@@ -1095,7 +1152,7 @@
 
 /*******************************************************************************
  *
- * NFIT - NVDIMM Interface Table (ACPI 6.0)
+ * NFIT - NVDIMM Interface Table (ACPI 6.0+)
  *        Version 1
  *
  ******************************************************************************/
@@ -1187,6 +1244,7 @@
 #define ACPI_NFIT_MEM_NOT_ARMED         (1<<3)  /* 03: Memory Device is not armed */
 #define ACPI_NFIT_MEM_HEALTH_OBSERVED   (1<<4)  /* 04: Memory Device observed SMART/health events */
 #define ACPI_NFIT_MEM_HEALTH_ENABLED    (1<<5)  /* 05: SMART/health events enabled */
+#define ACPI_NFIT_MEM_MAP_FAILED        (1<<6)  /* 06: Mapping to SPA failed */
 
 
 /* 2: Interleave Structure */
@@ -1226,7 +1284,10 @@
     UINT16                  SubsystemVendorId;
     UINT16                  SubsystemDeviceId;
     UINT16                  SubsystemRevisionId;
-    UINT8                   Reserved[6];        /* Reserved, must be zero */
+    UINT8                   ValidFields;
+    UINT8                   ManufacturingLocation;
+    UINT16                  ManufacturingDate;
+    UINT8                   Reserved[2];        /* Reserved, must be zero */
     UINT32                  SerialNumber;
     UINT16                  Code;
     UINT16                  Windows;
@@ -1242,7 +1303,11 @@
 
 /* Flags */
 
-#define ACPI_NFIT_CONTROL_BUFFERED      (1)     /* Block Data Windows implementation is buffered */
+#define ACPI_NFIT_CONTROL_BUFFERED          (1)     /* Block Data Windows implementation is buffered */
+
+/* ValidFields bits */
+
+#define ACPI_NFIT_CONTROL_MFG_INFO_VALID    (1)     /* Manufacturing fields are valid */
 
 
 /* 5: NVDIMM Block Data Window Region Structure */
--- a/sys/external/bsd/acpica/dist/include/actypes.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/actypes.h	Wed May 04 19:27:57 2016 +0000
@@ -643,7 +643,8 @@
 #define ACPI_NOTIFY_SHUTDOWN_REQUEST    (UINT8) 0x0C
 #define ACPI_NOTIFY_AFFINITY_UPDATE     (UINT8) 0x0D
 
-#define ACPI_NOTIFY_MAX                 0x0D
+#define ACPI_GENERIC_NOTIFY_MAX         0x0D
+#define ACPI_SPECIFIC_NOTIFY_MAX        0x84
 
 /*
  * Types associated with ACPI names and objects. The first group of
@@ -1325,7 +1326,7 @@
  */
 typedef struct acpi_memory_list
 {
-    char                            *ListName;
+    const char                      *ListName;
     void                            *ListHead;
     UINT16                          ObjectSize;
     UINT16                          MaxDepth;
--- a/sys/external/bsd/acpica/dist/include/acutils.h	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/include/acutils.h	Wed May 04 19:27:57 2016 +0000
@@ -175,6 +175,25 @@
 
 
 /*
+ * utascii - ASCII utilities
+ */
+BOOLEAN
+AcpiUtValidNameseg (
+    char                    *Signature);
+
+BOOLEAN
+AcpiUtValidNameChar (
+    char                    Character,
+    UINT32                  Position);
+
+void
+AcpiUtCheckAndRepairAscii (
+    UINT8                   *Name,
+    char                    *RepairedName,
+    UINT32                  Count);
+
+
+/*
  * utnonansi - Non-ANSI C library functions
  */
 void
@@ -194,8 +213,14 @@
 AcpiUtStrtoul64 (
     char                    *String,
     UINT32                  Base,
+    UINT32                  MaxIntegerByteWidth,
     UINT64                  *RetInteger);
 
+/* Values for MaxIntegerByteWidth above */
+
+#define ACPI_MAX32_BYTE_WIDTH       4
+#define ACPI_MAX64_BYTE_WIDTH       8
+
 
 /*
  * utglobal - Global data structures and procedures
@@ -341,7 +366,7 @@
     const char              *FunctionName,
     const char              *ModuleName,
     UINT32                  ComponentId,
-    void                    *Pointer);
+    const void              *Pointer);
 
 void
 AcpiUtTraceU32 (
@@ -826,15 +851,6 @@
     char                    *Pathname);
 #endif
 
-BOOLEAN
-AcpiUtValidAcpiName (
-    char                    *Name);
-
-BOOLEAN
-AcpiUtValidAcpiChar (
-    char                    Character,
-    UINT32                  Position);
-
 void
 AcpiUtRepairName (
     char                    *Name);
--- a/sys/external/bsd/acpica/dist/namespace/nsdump.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nsdump.c	Wed May 04 19:27:57 2016 +0000
@@ -99,7 +99,7 @@
 void
 AcpiNsPrintPathname (
     UINT32                  NumSegments,
-    char                    *Pathname)
+    const char              *Pathname)
 {
     UINT32                  i;
 
@@ -139,6 +139,9 @@
 }
 
 
+#ifdef ACPI_OBSOLETE_FUNCTIONS
+/* Not used at this time, perhaps later */
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiNsDumpPathname
@@ -179,7 +182,7 @@
     AcpiOsPrintf ("\n");
     return_VOID;
 }
-
+#endif
 
 /*******************************************************************************
  *
--- a/sys/external/bsd/acpica/dist/namespace/nseval.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nseval.c	Wed May 04 19:27:57 2016 +0000
@@ -396,7 +396,7 @@
         AcpiUtRemoveReference (Prev);
     }
 
-    ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+    ACPI_INFO ((
         "Executed %u blocks of module-level executable AML code",
         MethodCount));
 
--- a/sys/external/bsd/acpica/dist/namespace/nsinit.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nsinit.c	Wed May 04 19:27:57 2016 +0000
@@ -46,6 +46,7 @@
 #include "acnamesp.h"
 #include "acdispat.h"
 #include "acinterp.h"
+#include "acevents.h"
 
 #define _COMPONENT          ACPI_NAMESPACE
         ACPI_MODULE_NAME    ("nsinit")
@@ -98,6 +99,8 @@
     ACPI_FUNCTION_TRACE (NsInitializeObjects);
 
 
+    ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+        "[Init] Completing Initialization of ACPI Objects\n"));
     ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH,
         "**** Starting initialization of namespace objects ****\n"));
     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
@@ -151,85 +154,141 @@
 
 ACPI_STATUS
 AcpiNsInitializeDevices (
-    void)
+    UINT32                  Flags)
 {
-    ACPI_STATUS             Status;
+    ACPI_STATUS             Status = AE_OK;
     ACPI_DEVICE_WALK_INFO   Info;
+    ACPI_HANDLE             Handle;
 
 
     ACPI_FUNCTION_TRACE (NsInitializeDevices);
 
 
-    /* Init counters */
+    if (!(Flags & ACPI_NO_DEVICE_INIT))
+    {
+        ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+            "[Init] Initializing ACPI Devices\n"));
+
+        /* Init counters */
 
-    Info.DeviceCount = 0;
-    Info.Num_STA = 0;
-    Info.Num_INI = 0;
+        Info.DeviceCount = 0;
+        Info.Num_STA = 0;
+        Info.Num_INI = 0;
+
+        ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
+            "Initializing Device/Processor/Thermal objects "
+            "and executing _INI/_STA methods:\n"));
 
-    ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
-        "Initializing Device/Processor/Thermal objects "
-        "and executing _INI/_STA methods:\n"));
+        /* Tree analysis: find all subtrees that contain _INI methods */
+
+        Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+            ACPI_UINT32_MAX, FALSE, AcpiNsFindIniMethods, NULL, &Info, NULL);
+        if (ACPI_FAILURE (Status))
+        {
+            goto ErrorExit;
+        }
 
-    /* Tree analysis: find all subtrees that contain _INI methods */
+        /* Allocate the evaluation information block */
+
+        Info.EvaluateInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EVALUATE_INFO));
+        if (!Info.EvaluateInfo)
+        {
+            Status = AE_NO_MEMORY;
+            goto ErrorExit;
+        }
 
-    Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-        ACPI_UINT32_MAX, FALSE, AcpiNsFindIniMethods, NULL, &Info, NULL);
-    if (ACPI_FAILURE (Status))
-    {
-        goto ErrorExit;
-    }
+        /*
+         * Execute the "global" _INI method that may appear at the root.
+         * This support is provided for Windows compatibility (Vista+) and
+         * is not part of the ACPI specification.
+         */
+        Info.EvaluateInfo->PrefixNode = AcpiGbl_RootNode;
+        Info.EvaluateInfo->RelativePathname = METHOD_NAME__INI;
+        Info.EvaluateInfo->Parameters = NULL;
+        Info.EvaluateInfo->Flags = ACPI_IGNORE_RETURN_VALUE;
+
+        Status = AcpiNsEvaluate (Info.EvaluateInfo);
+        if (ACPI_SUCCESS (Status))
+        {
+            Info.Num_INI++;
+        }
 
-    /* Allocate the evaluation information block */
+        /*
+         * Execute \_SB._INI.
+         * There appears to be a strict order requirement for \_SB._INI,
+         * which should be evaluated before any _REG evaluations.
+         */
+        Status = AcpiGetHandle (NULL, "\\_SB", &Handle);
+        if (ACPI_SUCCESS (Status))
+        {
+            memset (Info.EvaluateInfo, 0, sizeof (ACPI_EVALUATE_INFO));
+            Info.EvaluateInfo->PrefixNode = Handle;
+            Info.EvaluateInfo->RelativePathname = METHOD_NAME__INI;
+            Info.EvaluateInfo->Parameters = NULL;
+            Info.EvaluateInfo->Flags = ACPI_IGNORE_RETURN_VALUE;
 
-    Info.EvaluateInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_EVALUATE_INFO));
-    if (!Info.EvaluateInfo)
-    {
-        Status = AE_NO_MEMORY;
-        goto ErrorExit;
+            Status = AcpiNsEvaluate (Info.EvaluateInfo);
+            if (ACPI_SUCCESS (Status))
+            {
+                Info.Num_INI++;
+            }
+        }
     }
 
     /*
-     * Execute the "global" _INI method that may appear at the root. This
-     * support is provided for Windows compatibility (Vista+) and is not
-     * part of the ACPI specification.
+     * Run all _REG methods
+     *
+     * Note: Any objects accessed by the _REG methods will be automatically
+     * initialized, even if they contain executable AML (see the call to
+     * AcpiNsInitializeObjects below).
+     *
+     * Note: According to the ACPI specification, we actually needn't execute
+     * _REG for SystemMemory/SystemIo operation regions, but for PCI_Config
+     * operation regions, it is required to evaluate _REG for those on a PCI
+     * root bus that doesn't contain _BBN object. So this code is kept here
+     * in order not to break things.
      */
-    Info.EvaluateInfo->PrefixNode = AcpiGbl_RootNode;
-    Info.EvaluateInfo->RelativePathname = __UNCONST(METHOD_NAME__INI);
-    Info.EvaluateInfo->Parameters = NULL;
-    Info.EvaluateInfo->Flags = ACPI_IGNORE_RETURN_VALUE;
+    if (!(Flags & ACPI_NO_ADDRESS_SPACE_INIT))
+    {
+        ACPI_DEBUG_PRINT ((ACPI_DB_EXEC,
+            "[Init] Executing _REG OpRegion methods\n"));
 
-    Status = AcpiNsEvaluate (Info.EvaluateInfo);
-    if (ACPI_SUCCESS (Status))
-    {
-        Info.Num_INI++;
+        Status = AcpiEvInitializeOpRegions ();
+        if (ACPI_FAILURE (Status))
+        {
+            goto ErrorExit;
+        }
     }
 
-    /* Walk namespace to execute all _INIs on present devices */
-
-    Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-        ACPI_UINT32_MAX, FALSE, AcpiNsInitOneDevice, NULL, &Info, NULL);
-
-    /*
-     * Any _OSI requests should be completed by now. If the BIOS has
-     * requested any Windows OSI strings, we will always truncate
-     * I/O addresses to 16 bits -- for Windows compatibility.
-     */
-    if (AcpiGbl_OsiData >= ACPI_OSI_WIN_2000)
+    if (!(Flags & ACPI_NO_DEVICE_INIT))
     {
-        AcpiGbl_TruncateIoAddresses = TRUE;
-    }
+        /* Walk namespace to execute all _INIs on present devices */
+
+        Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
+            ACPI_UINT32_MAX, FALSE, AcpiNsInitOneDevice, NULL, &Info, NULL);
 
-    ACPI_FREE (Info.EvaluateInfo);
-    if (ACPI_FAILURE (Status))
-    {
-        goto ErrorExit;
+        /*
+         * Any _OSI requests should be completed by now. If the BIOS has
+         * requested any Windows OSI strings, we will always truncate
+         * I/O addresses to 16 bits -- for Windows compatibility.
+         */
+        if (AcpiGbl_OsiData >= ACPI_OSI_WIN_2000)
+        {
+            AcpiGbl_TruncateIoAddresses = TRUE;
+        }
+
+        ACPI_FREE (Info.EvaluateInfo);
+        if (ACPI_FAILURE (Status))
+        {
+            goto ErrorExit;
+        }
+
+        ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
+            "    Executed %u _INI methods requiring %u _STA executions "
+            "(examined %u objects)\n",
+            Info.Num_INI, Info.Num_STA, Info.DeviceCount));
     }
 
-    ACPI_DEBUG_PRINT_RAW ((ACPI_DB_INIT,
-        "    Executed %u _INI methods requiring %u _STA executions "
-        "(examined %u objects)\n",
-        Info.Num_INI, Info.Num_STA, Info.DeviceCount));
-
     return_ACPI_STATUS (Status);
 
 
@@ -611,33 +670,37 @@
      * Note: We know there is an _INI within this subtree, but it may not be
      * under this particular device, it may be lower in the branch.
      */
-    ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
-        ACPI_TYPE_METHOD, DeviceNode, METHOD_NAME__INI));
+    if (!ACPI_COMPARE_NAME (DeviceNode->Name.Ascii, "_SB_") ||
+        DeviceNode->Parent != AcpiGbl_RootNode)
+    {
+        ACPI_DEBUG_EXEC (AcpiUtDisplayInitPathname (
+            ACPI_TYPE_METHOD, DeviceNode, METHOD_NAME__INI));
 
-    memset (Info, 0, sizeof (ACPI_EVALUATE_INFO));
-    Info->PrefixNode = DeviceNode;
-    Info->RelativePathname = __UNCONST(METHOD_NAME__INI);
-    Info->Parameters = NULL;
-    Info->Flags = ACPI_IGNORE_RETURN_VALUE;
+        memset (Info, 0, sizeof (ACPI_EVALUATE_INFO));
+        Info->PrefixNode = DeviceNode;
+        Info->RelativePathname = METHOD_NAME__INI;
+        Info->Parameters = NULL;
+        Info->Flags = ACPI_IGNORE_RETURN_VALUE;
 
-    Status = AcpiNsEvaluate (Info);
-    if (ACPI_SUCCESS (Status))
-    {
-        WalkInfo->Num_INI++;
-    }
+        Status = AcpiNsEvaluate (Info);
+        if (ACPI_SUCCESS (Status))
+        {
+            WalkInfo->Num_INI++;
+        }
 
 #ifdef ACPI_DEBUG_OUTPUT
-    else if (Status != AE_NOT_FOUND)
-    {
-        /* Ignore error and move on to next device */
+        else if (Status != AE_NOT_FOUND)
+        {
+            /* Ignore error and move on to next device */
 
-        char *ScopeName = AcpiNsGetNormalizedPathname (DeviceNode, TRUE);
+            char *ScopeName = AcpiNsGetNormalizedPathname (DeviceNode, TRUE);
 
-        ACPI_EXCEPTION ((AE_INFO, Status, "during %s._INI execution",
-            ScopeName));
-        ACPI_FREE (ScopeName);
+            ACPI_EXCEPTION ((AE_INFO, Status, "during %s._INI execution",
+                ScopeName));
+            ACPI_FREE (ScopeName);
+        }
+#endif
     }
-#endif
 
     /* Ignore errors from above */
 
--- a/sys/external/bsd/acpica/dist/namespace/nsxfeval.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nsxfeval.c	Wed May 04 19:27:57 2016 +0000
@@ -304,13 +304,12 @@
     }
 
 
-#if 0
+#ifdef _FUTURE_FEATURE
 
     /*
      * Begin incoming argument count analysis. Check for too few args
      * and too many args.
      */
-
     switch (AcpiNsGetType (Info->Node))
     {
     case ACPI_TYPE_METHOD:
@@ -398,69 +397,74 @@
      * If we are expecting a return value, and all went well above,
      * copy the return value to an external object.
      */
-    if (ReturnBuffer)
+    if (!ReturnBuffer)
+    {
+        goto CleanupReturnObject;
+    }
+
+    if (!Info->ReturnObject)
+    {
+        ReturnBuffer->Length = 0;
+        goto Cleanup;
+    }
+
+    if (ACPI_GET_DESCRIPTOR_TYPE (Info->ReturnObject) ==
+        ACPI_DESC_TYPE_NAMED)
     {
-        if (!Info->ReturnObject)
+        /*
+         * If we received a NS Node as a return object, this means that
+         * the object we are evaluating has nothing interesting to
+         * return (such as a mutex, etc.)  We return an error because
+         * these types are essentially unsupported by this interface.
+         * We don't check up front because this makes it easier to add
+         * support for various types at a later date if necessary.
+         */
+        Status = AE_TYPE;
+        Info->ReturnObject = NULL;   /* No need to delete a NS Node */
+        ReturnBuffer->Length = 0;
+    }
+
+    if (ACPI_FAILURE (Status))
+    {
+        goto CleanupReturnObject;
+    }
+
+    /* Dereference Index and RefOf references */
+
+    AcpiNsResolveReferences (Info);
+
+    /* Get the size of the returned object */
+
+    Status = AcpiUtGetObjectSize (Info->ReturnObject,
+        &BufferSpaceNeeded);
+    if (ACPI_SUCCESS (Status))
+    {
+        /* Validate/Allocate/Clear caller buffer */
+
+        Status = AcpiUtInitializeBuffer (ReturnBuffer,
+            BufferSpaceNeeded);
+        if (ACPI_FAILURE (Status))
         {
-            ReturnBuffer->Length = 0;
+            /*
+             * Caller's buffer is too small or a new one can't
+             * be allocated
+             */
+            ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+                "Needed buffer size %X, %s\n",
+                (UINT32) BufferSpaceNeeded,
+                AcpiFormatException (Status)));
         }
         else
         {
-            if (ACPI_GET_DESCRIPTOR_TYPE (Info->ReturnObject) ==
-                ACPI_DESC_TYPE_NAMED)
-            {
-                /*
-                 * If we received a NS Node as a return object, this means that
-                 * the object we are evaluating has nothing interesting to
-                 * return (such as a mutex, etc.)  We return an error because
-                 * these types are essentially unsupported by this interface.
-                 * We don't check up front because this makes it easier to add
-                 * support for various types at a later date if necessary.
-                 */
-                Status = AE_TYPE;
-                Info->ReturnObject = NULL;   /* No need to delete a NS Node */
-                ReturnBuffer->Length = 0;
-            }
-
-            if (ACPI_SUCCESS (Status))
-            {
-                /* Dereference Index and RefOf references */
-
-                AcpiNsResolveReferences (Info);
-
-                /* Get the size of the returned object */
+            /* We have enough space for the object, build it */
 
-                Status = AcpiUtGetObjectSize (Info->ReturnObject,
-                    &BufferSpaceNeeded);
-                if (ACPI_SUCCESS (Status))
-                {
-                    /* Validate/Allocate/Clear caller buffer */
-
-                    Status = AcpiUtInitializeBuffer (ReturnBuffer,
-                        BufferSpaceNeeded);
-                    if (ACPI_FAILURE (Status))
-                    {
-                        /*
-                         * Caller's buffer is too small or a new one can't
-                         * be allocated
-                         */
-                        ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
-                            "Needed buffer size %X, %s\n",
-                            (UINT32) BufferSpaceNeeded,
-                            AcpiFormatException (Status)));
-                    }
-                    else
-                    {
-                        /* We have enough space for the object, build it */
-
-                        Status = AcpiUtCopyIobjectToEobject (
-                            Info->ReturnObject, ReturnBuffer);
-                    }
-                }
-            }
+            Status = AcpiUtCopyIobjectToEobject (
+                Info->ReturnObject, ReturnBuffer);
         }
     }
 
+CleanupReturnObject:
+
     if (Info->ReturnObject)
     {
         /*
--- a/sys/external/bsd/acpica/dist/parser/psopinfo.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/parser/psopinfo.c	Wed May 04 19:27:57 2016 +0000
@@ -165,7 +165,7 @@
  *
  ******************************************************************************/
 
-char *
+const char *
 AcpiPsGetOpcodeName (
     UINT16                  Opcode)
 {
--- a/sys/external/bsd/acpica/dist/resources/rsdump.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/resources/rsdump.c	Wed May 04 19:27:57 2016 +0000
@@ -264,7 +264,7 @@
     UINT8                   *Target = NULL;
     UINT8                   *PreviousTarget;
     const char              *Name;
-    UINT8                    Count;
+    UINT8                   Count;
 
 
     /* First table entry must contain the table length (# of table entries) */
@@ -307,8 +307,7 @@
 
             if (Table->Pointer)
             {
-                AcpiRsOutString (Name, ACPI_CAST_PTR (char,
-                    Table->Pointer [*Target]));
+                AcpiRsOutString (Name, Table->Pointer [*Target]);
             }
             else
             {
@@ -335,20 +334,17 @@
 
         case ACPI_RSD_1BITFLAG:
 
-            AcpiRsOutString (Name, ACPI_CAST_PTR (char,
-                Table->Pointer [*Target & 0x01]));
+            AcpiRsOutString (Name, Table->Pointer [*Target & 0x01]);
             break;
 
         case ACPI_RSD_2BITFLAG:
 
-            AcpiRsOutString (Name, ACPI_CAST_PTR (char,
-                Table->Pointer [*Target & 0x03]));
+            AcpiRsOutString (Name, Table->Pointer [*Target & 0x03]);
             break;
 
         case ACPI_RSD_3BITFLAG:
 
-            AcpiRsOutString (Name, ACPI_CAST_PTR (char,
-                Table->Pointer [*Target & 0x07]));
+            AcpiRsOutString (Name, Table->Pointer [*Target & 0x07]);
             break;
 
         case ACPI_RSD_SHORTLIST:
--- a/sys/external/bsd/acpica/dist/resources/rsdumpinfo.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/resources/rsdumpinfo.c	Wed May 04 19:27:57 2016 +0000
@@ -265,19 +265,20 @@
     {ACPI_RSD_UINT8,    ACPI_RSD_OFFSET (CommonSerialBus.Type),             "Type",                     AcpiGbl_SbtDecode}, \
     {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.ProducerConsumer), "ProducerConsumer",         AcpiGbl_ConsumeDecode}, \
     {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.SlaveMode),        "SlaveMode",                AcpiGbl_SmDecode}, \
+    {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (CommonSerialBus.ConnectionSharing),"ConnectionSharing",        AcpiGbl_ShrDecode}, \
     {ACPI_RSD_UINT8,    ACPI_RSD_OFFSET (CommonSerialBus.TypeRevisionId),   "TypeRevisionId",           NULL}, \
     {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (CommonSerialBus.TypeDataLength),   "TypeDataLength",           NULL}, \
     {ACPI_RSD_SOURCE,   ACPI_RSD_OFFSET (CommonSerialBus.ResourceSource),   "ResourceSource",           NULL}, \
     {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (CommonSerialBus.VendorLength),     "VendorLength",             NULL}, \
     {ACPI_RSD_SHORTLISTX,ACPI_RSD_OFFSET (CommonSerialBus.VendorData),      "VendorData",               NULL},
 
-ACPI_RSDUMP_INFO        AcpiRsDumpCommonSerialBus[10] =
+ACPI_RSDUMP_INFO        AcpiRsDumpCommonSerialBus[11] =
 {
     {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpCommonSerialBus),    "Common Serial Bus",        NULL},
     ACPI_RS_DUMP_COMMON_SERIAL_BUS
 };
 
-ACPI_RSDUMP_INFO        AcpiRsDumpI2cSerialBus[13] =
+ACPI_RSDUMP_INFO        AcpiRsDumpI2cSerialBus[14] =
 {
     {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpI2cSerialBus),       "I2C Serial Bus",           NULL},
     ACPI_RS_DUMP_COMMON_SERIAL_BUS
@@ -286,7 +287,7 @@
     {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (I2cSerialBus.SlaveAddress),        "SlaveAddress",             NULL},
 };
 
-ACPI_RSDUMP_INFO        AcpiRsDumpSpiSerialBus[17] =
+ACPI_RSDUMP_INFO        AcpiRsDumpSpiSerialBus[18] =
 {
     {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpSpiSerialBus),       "Spi Serial Bus",           NULL},
     ACPI_RS_DUMP_COMMON_SERIAL_BUS
@@ -299,7 +300,7 @@
     {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (SpiSerialBus.ConnectionSpeed),     "ConnectionSpeed",          NULL},
 };
 
-ACPI_RSDUMP_INFO        AcpiRsDumpUartSerialBus[19] =
+ACPI_RSDUMP_INFO        AcpiRsDumpUartSerialBus[20] =
 {
     {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpUartSerialBus),       "Uart Serial Bus",         NULL},
     ACPI_RS_DUMP_COMMON_SERIAL_BUS
@@ -326,18 +327,20 @@
     {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Address.MaxAddressFixed),          "Max Relocatability",       AcpiGbl_MaxDecode}
 };
 
+static const char *AcpiGbl_MemoryRange[] = { "Memory Range" };
 ACPI_RSDUMP_INFO        AcpiRsDumpMemoryFlags[5] =
 {
-    {ACPI_RSD_LITERAL,  ACPI_RSD_TABLE_SIZE (AcpiRsDumpMemoryFlags),        "Resource Type",            (const void *) "Memory Range"},
+    {ACPI_RSD_LITERAL,  ACPI_RSD_TABLE_SIZE (AcpiRsDumpMemoryFlags),        "Resource Type",            AcpiGbl_MemoryRange},
     {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Address.Info.Mem.WriteProtect),    "Write Protect",            AcpiGbl_RwDecode},
     {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Address.Info.Mem.Caching),         "Caching",                  AcpiGbl_MemDecode},
     {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Address.Info.Mem.RangeType),       "Range Type",               AcpiGbl_MtpDecode},
     {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Address.Info.Mem.Translation),     "Translation",              AcpiGbl_TtpDecode}
 };
 
+static const char *AcpiGbl_IORange[] = { "I/O Range" };
 ACPI_RSDUMP_INFO        AcpiRsDumpIoFlags[4] =
 {
-    {ACPI_RSD_LITERAL,  ACPI_RSD_TABLE_SIZE (AcpiRsDumpIoFlags),            "Resource Type",            (const void *) "I/O Range"},
+    {ACPI_RSD_LITERAL,  ACPI_RSD_TABLE_SIZE (AcpiRsDumpIoFlags),            "Resource Type",            AcpiGbl_IORange },
     {ACPI_RSD_2BITFLAG, ACPI_RSD_OFFSET (Address.Info.Io.RangeType),        "Range Type",               AcpiGbl_RngDecode},
     {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Address.Info.Io.Translation),      "Translation",              AcpiGbl_TtpDecode},
     {ACPI_RSD_1BITFLAG, ACPI_RSD_OFFSET (Address.Info.Io.TranslationType),  "Translation Type",         AcpiGbl_TrsDecode}
--- a/sys/external/bsd/acpica/dist/resources/rsutils.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/resources/rsutils.c	Wed May 04 19:27:57 2016 +0000
@@ -740,7 +740,7 @@
 ACPI_STATUS
 AcpiRsGetMethodData (
     ACPI_HANDLE             Handle,
-    char                    *Path,
+    const char              *Path,
     ACPI_BUFFER             *RetBuffer)
 {
     ACPI_OPERAND_OBJECT     *ObjDesc;
--- a/sys/external/bsd/acpica/dist/tables/tbdata.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbdata.c	Wed May 04 19:27:57 2016 +0000
@@ -441,7 +441,7 @@
             ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
                 "%4.4s 0x%8.8X%8.8X"
                 " Attempted table install failed",
-                AcpiUtValidAcpiName (TableDesc->Signature.Ascii) ?
+                AcpiUtValidNameseg (TableDesc->Signature.Ascii) ?
                     TableDesc->Signature.Ascii : "????",
                 ACPI_FORMAT_UINT64 (TableDesc->Address)));
 
--- a/sys/external/bsd/acpica/dist/tables/tbfadt.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbfadt.c	Wed May 04 19:27:57 2016 +0000
@@ -56,7 +56,7 @@
     UINT8                   SpaceId,
     UINT8                   ByteWidth,
     UINT64                  Address,
-    char                    *RegisterName,
+    const char              *RegisterName,
     UINT8                   Flags);
 
 static void
@@ -212,7 +212,7 @@
     UINT8                   SpaceId,
     UINT8                   ByteWidth,
     UINT64                  Address,
-    char                    *RegisterName,
+    const char              *RegisterName,
     UINT8                   Flags)
 {
     UINT8                   BitWidth;
@@ -420,15 +420,16 @@
 
     /*
      * Check if the FADT is larger than the largest table that we expect
-     * (the ACPI 5.0 version). If so, truncate the table, and issue
-     * a warning.
+     * (typically the current ACPI specification version). If so, truncate
+     * the table, and issue a warning.
      */
     if (Length > sizeof (ACPI_TABLE_FADT))
     {
         ACPI_BIOS_WARNING ((AE_INFO,
-            "FADT (revision %u) is longer than ACPI 5.0 version, "
+            "FADT (revision %u) is longer than %s length, "
             "truncating length %u to %u",
-            Table->Revision, Length, (UINT32) sizeof (ACPI_TABLE_FADT)));
+            Table->Revision, ACPI_FADT_CONFORMANCE, Length,
+            (UINT32) sizeof (ACPI_TABLE_FADT)));
     }
 
     /* Clear the entire local FADT */
@@ -506,7 +507,7 @@
 AcpiTbConvertFadt (
     void)
 {
-    char                    *Name;
+    const char              *Name;
     ACPI_GENERIC_ADDRESS    *Address64;
     UINT32                  Address32;
     UINT8                   Length;
@@ -676,9 +677,11 @@
                 (!Address64->Address && Length))
             {
                 ACPI_BIOS_WARNING ((AE_INFO,
-                    "Optional FADT field %s has zero address or length: "
-                    "0x%8.8X%8.8X/0x%X",
-                    Name, ACPI_FORMAT_UINT64 (Address64->Address), Length));
+                    "Optional FADT field %s has valid %s but zero %s: "
+                    "0x%8.8X%8.8X/0x%X", Name,
+                    (Length ? "Length" : "Address"),
+                    (Length ? "Address": "Length"),
+                    ACPI_FORMAT_UINT64 (Address64->Address), Length));
             }
         }
     }
--- a/sys/external/bsd/acpica/dist/tables/tbinstal.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbinstal.c	Wed May 04 19:27:57 2016 +0000
@@ -292,7 +292,7 @@
         AcpiGbl_DisableSsdtTableInstall &&
         ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT))
     {
-        ACPI_INFO ((AE_INFO,
+        ACPI_INFO ((
             "Ignoring installation of %4.4s at %8.8X%8.8X",
             NewTableDesc.Signature.Ascii, ACPI_FORMAT_UINT64 (Address)));
         goto ReleaseAndExit;
@@ -326,7 +326,7 @@
             ACPI_BIOS_ERROR ((AE_INFO,
                 "Table has invalid signature [%4.4s] (0x%8.8X), "
                 "must be SSDT or OEMx",
-                AcpiUtValidAcpiName (NewTableDesc.Signature.Ascii) ?
+                AcpiUtValidNameseg (NewTableDesc.Signature.Ascii) ?
                     NewTableDesc.Signature.Ascii : "????",
                 NewTableDesc.Signature.Integer));
 
@@ -464,7 +464,7 @@
         return;
     }
 
-    ACPI_INFO ((AE_INFO, "%4.4s 0x%8.8X%8.8X"
+    ACPI_INFO (("%4.4s 0x%8.8X%8.8X"
         " %s table override, new table: 0x%8.8X%8.8X",
         OldTableDesc->Signature.Ascii,
         ACPI_FORMAT_UINT64 (OldTableDesc->Address),
--- a/sys/external/bsd/acpica/dist/tables/tbutils.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbutils.c	Wed May 04 19:27:57 2016 +0000
@@ -185,7 +185,7 @@
         ACPI_PTR_TO_PHYSADDR (NewTable),
         ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, NewTable);
 
-    ACPI_INFO ((AE_INFO,
+    ACPI_INFO ((
         "Forced DSDT copy: length 0x%05X copied locally, original unmapped",
         NewTable->Length));
 
@@ -411,36 +411,3 @@
     AcpiOsUnmapMemory (Table, Length);
     return_ACPI_STATUS (AE_OK);
 }
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiIsValidSignature
- *
- * PARAMETERS:  Signature           - Sig string to be validated
- *
- * RETURN:      TRUE if signature is has 4 valid ACPI characters
- *
- * DESCRIPTION: Validate an ACPI table signature.
- *
- ******************************************************************************/
-
-BOOLEAN
-AcpiIsValidSignature (
-    char                    *Signature)
-{
-    UINT32                  i;
-
-
-    /* Validate each character in the signature */
-
-    for (i = 0; i < ACPI_NAME_SIZE; i++)
-    {
-        if (!AcpiUtValidAcpiChar (Signature[i], i))
-        {
-            return (FALSE);
-        }
-    }
-
-    return (TRUE);
-}
--- a/sys/external/bsd/acpica/dist/tables/tbxfload.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbxfload.c	Wed May 04 19:27:57 2016 +0000
@@ -47,6 +47,7 @@
 #include "accommon.h"
 #include "acnamesp.h"
 #include "actables.h"
+#include "acevents.h"
 
 #define _COMPONENT          ACPI_TABLES
         ACPI_MODULE_NAME    ("tbxfload")
@@ -74,6 +75,25 @@
     ACPI_FUNCTION_TRACE (AcpiLoadTables);
 
 
+    /*
+     * Install the default operation region handlers. These are the
+     * handlers that are defined by the ACPI specification to be
+     * "always accessible" -- namely, SystemMemory, SystemIO, and
+     * PCI_Config. This also means that no _REG methods need to be
+     * run for these address spaces. We need to have these handlers
+     * installed before any AML code can be executed, especially any
+     * module-level code (11/2015).
+     * Note that we allow OSPMs to install their own region handlers
+     * between AcpiInitializeSubsystem() and AcpiLoadTables() to use
+     * their customized default region handlers.
+     */
+    Status = AcpiEvInstallRegionHandlers ();
+    if (ACPI_FAILURE (Status))
+    {
+        ACPI_EXCEPTION ((AE_INFO, Status, "During Region initialization"));
+        return_ACPI_STATUS (Status);
+    }
+
     /* Load the namespace from the tables */
 
     Status = AcpiTbLoadNamespace ();
@@ -91,6 +111,22 @@
             "While loading namespace from ACPI tables"));
     }
 
+    if (!AcpiGbl_GroupModuleLevelCode)
+    {
+        /*
+         * Initialize the objects that remain uninitialized. This
+         * runs the executable AML that may be part of the
+         * declaration of these objects:
+         * OperationRegions, BufferFields, Buffers, and Packages.
+         */
+        Status = AcpiNsInitializeObjects ();
+        if (ACPI_FAILURE (Status))
+        {
+            return_ACPI_STATUS (Status);
+        }
+    }
+
+    AcpiGbl_NamespaceInitialized = TRUE;
     return_ACPI_STATUS (Status);
 }
 
@@ -227,8 +263,8 @@
 
     if (!TablesFailed)
     {
-        ACPI_INFO ((AE_INFO,
-            "%u ACPI AML tables successfully acquired and loaded",
+        ACPI_INFO ((
+            "%u ACPI AML tables successfully acquired and loaded\n",
             TablesLoaded));
     }
     else
@@ -340,7 +376,7 @@
 
     /* Install the table and load it into the namespace */
 
-    ACPI_INFO ((AE_INFO, "Host-directed Dynamic ACPI Table Load:"));
+    ACPI_INFO (("Host-directed Dynamic ACPI Table Load:"));
     (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
 
     Status = AcpiTbInstallStandardTable (ACPI_PTR_TO_PHYSADDR (Table),
--- a/sys/external/bsd/acpica/dist/tools/acpixtract/acpixtract.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/tools/acpixtract/acpixtract.c	Wed May 04 19:27:57 2016 +0000
@@ -44,6 +44,13 @@
 #include "acpixtract.h"
 
 
+/* Local prototypes */
+
+static BOOLEAN
+AxIsFileAscii (
+    FILE                    *Handle);
+
+
 /******************************************************************************
  *
  * FUNCTION:    AxExtractTables
@@ -72,7 +79,8 @@
     unsigned int            FoundTable = 0;
     unsigned int            Instances = 0;
     unsigned int            ThisInstance;
-    char                    ThisSignature[4];
+    char                    ThisSignature[5];
+    char                    UpperSignature[5];
     int                     Status = 0;
     unsigned int            State = AX_STATE_FIND_HEADER;
 
@@ -86,17 +94,27 @@
         return (-1);
     }
 
+    if (!AxIsFileAscii (InputFile))
+    {
+        fclose (InputFile);
+        return (-1);
+    }
+
     if (Signature)
     {
+        strncpy (UpperSignature, Signature, 4);
+        UpperSignature[4] = 0;
+        AcpiUtStrupr (UpperSignature);
+
         /* Are there enough instances of the table to continue? */
 
-        AxNormalizeSignature (Signature);
+        AxNormalizeSignature (UpperSignature);
 
-        Instances = AxCountTableInstances (InputPathname, Signature);
+        Instances = AxCountTableInstances (InputPathname, UpperSignature);
         if (Instances < MinimumInstances)
         {
             printf ("Table [%s] was not found in %s\n",
-                Signature, InputPathname);
+                UpperSignature, InputPathname);
             fclose (InputFile);
             return (-1);
         }
@@ -126,7 +144,7 @@
             {
                 /* Ignore signatures that don't match */
 
-                if (!ACPI_COMPARE_NAME (ThisSignature, Signature))
+                if (!ACPI_COMPARE_NAME (ThisSignature, UpperSignature))
                 {
                     continue;
                 }
@@ -205,8 +223,7 @@
 
     if (!FoundTable)
     {
-        printf ("Table [%s] was not found in %s\n",
-            Signature, InputPathname);
+        printf ("No ACPI tables were found in %s\n", InputPathname);
     }
 
 
@@ -222,7 +239,7 @@
 
     if (Gbl_TableCount > 1)
     {
-        printf ("\n%d binary ACPI tables extracted\n",
+        printf ("\n%u binary ACPI tables extracted\n",
             Gbl_TableCount);
     }
 
@@ -276,6 +293,12 @@
         return (-1);
     }
 
+    if (!AxIsFileAscii (InputFile))
+    {
+        fclose (InputFile);
+        return (-1);
+    }
+
     /* Open the output file in binary mode */
 
     OutputFile = fopen (Gbl_OutputFilename, "w+b");
@@ -360,7 +383,7 @@
             ThisSignature, ThisTableBytesWritten, Gbl_OutputFilename);
     }
 
-    printf ("\n%d binary ACPI tables extracted and written to %s (%u bytes)\n",
+    printf ("\n%u binary ACPI tables extracted and written to %s (%u bytes)\n",
         Gbl_TableCount, Gbl_OutputFilename, TotalBytesWritten);
 
     fclose (InputFile);
@@ -401,6 +424,12 @@
         return (-1);
     }
 
+    if (!AxIsFileAscii (InputFile))
+    {
+        fclose (InputFile);
+        return (-1);
+    }
+
     /* Dump the headers for all tables found in the input file */
 
     printf ("\nSignature  Length      Revision   OemId    OemTableId"
@@ -442,6 +471,11 @@
             continue;
         }
 
+        if (!AcpiUtValidNameseg (TableHeader->Signature))
+        {
+            continue;
+        }
+
         /* Signature and Table length */
 
         Gbl_TableCount++;
@@ -470,7 +504,59 @@
             TableHeader->AslCompilerId, TableHeader->AslCompilerRevision);
     }
 
-    printf ("\nFound %u ACPI tables\n", Gbl_TableCount);
+    printf ("\nFound %u ACPI tables in %s\n", Gbl_TableCount, InputPathname);
     fclose (InputFile);
     return (0);
 }
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AxIsFileAscii
+ *
+ * PARAMETERS:  Handle              - To open input file
+ *
+ * RETURN:      TRUE if file is entirely ASCII and printable
+ *
+ * DESCRIPTION: Verify that the input file is entirely ASCII.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AxIsFileAscii (
+    FILE                    *Handle)
+{
+    UINT8                   Byte;
+
+
+    /* Read the entire file */
+
+    while (fread (&Byte, 1, 1, Handle) == 1)
+    {
+        /* Check for an ASCII character */
+
+        if (!ACPI_IS_ASCII (Byte))
+        {
+            goto ErrorExit;
+        }
+
+        /* Ensure character is either printable or a "space" char */
+
+        else if (!isprint (Byte) && !isspace (Byte))
+        {
+            goto ErrorExit;
+        }
+    }
+
+    /* File is OK (100% ASCII) */
+
+    fseek (Handle, 0, SEEK_SET);
+    return (TRUE);
+
+ErrorExit:
+
+    printf ("File is binary (contains non-text or non-ascii characters)\n");
+    fseek (Handle, 0, SEEK_SET);
+    return (FALSE);
+
+}
--- a/sys/external/bsd/acpica/dist/utilities/utcache.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utcache.c	Wed May 04 19:27:57 2016 +0000
@@ -278,7 +278,7 @@
     void                    *Object;
 
 
-    ACPI_FUNCTION_NAME (OsAcquireObject);
+    ACPI_FUNCTION_TRACE (OsAcquireObject);
 
 
     if (!Cache)
--- a/sys/external/bsd/acpica/dist/utilities/utdebug.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utdebug.c	Wed May 04 19:27:57 2016 +0000
@@ -53,15 +53,9 @@
 
 #ifdef ACPI_DEBUG_OUTPUT
 
-static ACPI_THREAD_ID       AcpiGbl_PrevThreadId = (ACPI_THREAD_ID) 0xFFFFFFFF;
-static const char           *AcpiGbl_FnEntryStr = "----Entry";
-static const char           *AcpiGbl_FnExitStr  = "----Exit-";
-
-/* Local prototypes */
-
-static const char *
-AcpiUtTrimFunctionName (
-    const char              *FunctionName);
+static ACPI_THREAD_ID       AcpiGbl_PreviousThreadId = (ACPI_THREAD_ID) 0xFFFFFFFF;
+static const char           *AcpiGbl_FunctionEntryPrefix = "----Entry";
+static const char           *AcpiGbl_FunctionExitPrefix  = "----Exit-";
 
 
 /*******************************************************************************
@@ -201,16 +195,16 @@
      * Thread tracking and context switch notification
      */
     ThreadId = AcpiOsGetThreadId ();
-    if (ThreadId != AcpiGbl_PrevThreadId)
+    if (ThreadId != AcpiGbl_PreviousThreadId)
     {
         if (ACPI_LV_THREADS & AcpiDbgLevel)
         {
             AcpiOsPrintf (
                 "\n**** Context Switch from TID %u to TID %u ****\n\n",
-                (UINT32) AcpiGbl_PrevThreadId, (UINT32) ThreadId);
+                (UINT32) AcpiGbl_PreviousThreadId, (UINT32) ThreadId);
         }
 
-        AcpiGbl_PrevThreadId = ThreadId;
+        AcpiGbl_PreviousThreadId = ThreadId;
         AcpiGbl_NestingLevel = 0;
     }
 
@@ -325,7 +319,7 @@
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s\n", AcpiGbl_FnEntryStr);
+            "%s\n", AcpiGbl_FunctionEntryPrefix);
     }
 }
 
@@ -355,7 +349,7 @@
     const char              *FunctionName,
     const char              *ModuleName,
     UINT32                  ComponentId,
-    void                    *Pointer)
+    const void              *Pointer)
 {
 
     AcpiGbl_NestingLevel++;
@@ -367,7 +361,7 @@
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s %p\n", AcpiGbl_FnEntryStr, Pointer);
+            "%s %p\n", AcpiGbl_FunctionEntryPrefix, Pointer);
     }
 }
 
@@ -407,7 +401,7 @@
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s %s\n", AcpiGbl_FnEntryStr, String);
+            "%s %s\n", AcpiGbl_FunctionEntryPrefix, String);
     }
 }
 
@@ -447,7 +441,7 @@
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s %08X\n", AcpiGbl_FnEntryStr, Integer);
+            "%s %08X\n", AcpiGbl_FunctionEntryPrefix, Integer);
     }
 }
 
@@ -482,7 +476,7 @@
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s\n", AcpiGbl_FnExitStr);
+            "%s\n", AcpiGbl_FunctionExitPrefix);
     }
 
     if (AcpiGbl_NestingLevel)
@@ -528,14 +522,14 @@
         {
             AcpiDebugPrint (ACPI_LV_FUNCTIONS,
                 LineNumber, FunctionName, ModuleName, ComponentId,
-                "%s %s\n", AcpiGbl_FnExitStr,
+                "%s %s\n", AcpiGbl_FunctionExitPrefix,
                 AcpiFormatException (Status));
         }
         else
         {
             AcpiDebugPrint (ACPI_LV_FUNCTIONS,
                 LineNumber, FunctionName, ModuleName, ComponentId,
-                "%s ****Exception****: %s\n", AcpiGbl_FnExitStr,
+                "%s ****Exception****: %s\n", AcpiGbl_FunctionExitPrefix,
                 AcpiFormatException (Status));
         }
     }
@@ -581,7 +575,7 @@
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s %8.8X%8.8X\n", AcpiGbl_FnExitStr,
+            "%s %8.8X%8.8X\n", AcpiGbl_FunctionExitPrefix,
             ACPI_FORMAT_UINT64 (Value));
     }
 
@@ -626,7 +620,7 @@
     {
         AcpiDebugPrint (ACPI_LV_FUNCTIONS,
             LineNumber, FunctionName, ModuleName, ComponentId,
-            "%s %p\n", AcpiGbl_FnExitStr, Ptr);
+            "%s %p\n", AcpiGbl_FunctionExitPrefix, Ptr);
     }
 
     if (AcpiGbl_NestingLevel)
--- a/sys/external/bsd/acpica/dist/utilities/utdecode.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utdecode.c	Wed May 04 19:27:57 2016 +0000
@@ -506,7 +506,7 @@
 
 /* Names for Notify() values, used for debug output */
 
-static const char           *AcpiGbl_GenericNotify[ACPI_NOTIFY_MAX + 1] =
+static const char           *AcpiGbl_GenericNotify[ACPI_GENERIC_NOTIFY_MAX + 1] =
 {
     /* 00 */ "Bus Check",
     /* 01 */ "Device Check",
@@ -520,32 +520,35 @@
     /* 09 */ "Device PLD Check",
     /* 0A */ "Reserved",
     /* 0B */ "System Locality Update",
-    /* 0C */ "Shutdown Request",
+    /* 0C */ "Shutdown Request", /* Reserved in ACPI 6.0 */
     /* 0D */ "System Resource Affinity Update"
 };
 
-static const char           *AcpiGbl_DeviceNotify[4] =
+static const char           *AcpiGbl_DeviceNotify[5] =
 {
     /* 80 */ "Status Change",
     /* 81 */ "Information Change",
     /* 82 */ "Device-Specific Change",
-    /* 83 */ "Device-Specific Change"
+    /* 83 */ "Device-Specific Change",
+    /* 84 */ "Reserved"
 };
 
-static const char           *AcpiGbl_ProcessorNotify[4] =
+static const char           *AcpiGbl_ProcessorNotify[5] =
 {
     /* 80 */ "Performance Capability Change",
     /* 81 */ "C-State Change",
     /* 82 */ "Throttling Capability Change",
-    /* 83 */ "Device-Specific Change"
+    /* 83 */ "Guaranteed Change",
+    /* 84 */ "Minimum Excursion"
 };
 
-static const char           *AcpiGbl_ThermalNotify[4] =
+static const char           *AcpiGbl_ThermalNotify[5] =
 {
     /* 80 */ "Thermal Status Change",
     /* 81 */ "Thermal Trip Point Change",
     /* 82 */ "Thermal Device List Change",
-    /* 83 */ "Thermal Relationship Change"
+    /* 83 */ "Thermal Relationship Change",
+    /* 84 */ "Reserved"
 };
 
 
@@ -555,23 +558,23 @@
     ACPI_OBJECT_TYPE        Type)
 {
 
-    /* 00 - 0D are common to all object types */
+    /* 00 - 0D are "common to all object types" (from ACPI Spec) */
 
-    if (NotifyValue <= ACPI_NOTIFY_MAX)
+    if (NotifyValue <= ACPI_GENERIC_NOTIFY_MAX)
     {
         return (AcpiGbl_GenericNotify[NotifyValue]);
     }
 
-    /* 0D - 7F are reserved */
+    /* 0E - 7F are reserved */
 
     if (NotifyValue <= ACPI_MAX_SYS_NOTIFY)
     {
         return ("Reserved");
     }
 
-    /* 80 - 83 are per-object-type */
+    /* 80 - 84 are per-object-type */
 
-    if (NotifyValue <= 0x83)
+    if (NotifyValue <= ACPI_SPECIFIC_NOTIFY_MAX)
     {
         switch (Type)
         {
--- a/sys/external/bsd/acpica/dist/utilities/utfileio.c	Wed May 04 18:59:55 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,358 +0,0 @@
-/*******************************************************************************
- *
- * Module Name: utfileio - simple file I/O routines
- *
- ******************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2015, Intel Corp.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions, and the following disclaimer,
- *    without modification.
- * 2. Redistributions in binary form must reproduce at minimum a disclaimer
- *    substantially similar to the "NO WARRANTY" disclaimer below
- *    ("Disclaimer") and any redistribution must be conditioned upon
- *    including a substantially similar Disclaimer requirement for further
- *    binary redistribution.
- * 3. Neither the names of the above-listed copyright holders nor the names
- *    of any contributors may be used to endorse or promote products derived
- *    from this software without specific prior written permission.
- *
- * Alternatively, this software may be distributed under the terms of the
- * GNU General Public License ("GPL") version 2 as published by the Free
- * Software Foundation.
- *
- * NO WARRANTY
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
- * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
- * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGES.
- */
-
-#include "acpi.h"
-#include "accommon.h"
-#include "actables.h"
-#include "acapps.h"
-
-#ifdef ACPI_ASL_COMPILER
-#include "aslcompiler.h"
-#endif
-
-
-#define _COMPONENT          ACPI_CA_DEBUGGER
-        ACPI_MODULE_NAME    ("utfileio")
-
-
-#ifdef ACPI_APPLICATION
-
-/* Local prototypes */
-
-static ACPI_STATUS
-AcpiUtCheckTextModeCorruption (
-    UINT8                   *Table,
-    UINT32                  TableLength,
-    UINT32                  FileLength);
-
-static ACPI_STATUS
-AcpiUtReadTable (
-    FILE                    *fp,
-    ACPI_TABLE_HEADER       **Table,
-    UINT32                  *TableLength);
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiUtCheckTextModeCorruption
- *
- * PARAMETERS:  Table           - Table buffer
- *              TableLength     - Length of table from the table header
- *              FileLength      - Length of the file that contains the table
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Check table for text mode file corruption where all linefeed
- *              characters (LF) have been replaced by carriage return linefeed
- *              pairs (CR/LF).
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiUtCheckTextModeCorruption (
-    UINT8                   *Table,
-    UINT32                  TableLength,
-    UINT32                  FileLength)
-{
-    UINT32                  i;
-    UINT32                  Pairs = 0;
-
-
-    if (TableLength != FileLength)
-    {
-        ACPI_WARNING ((AE_INFO,
-            "File length (0x%X) is not the same as the table length (0x%X)",
-            FileLength, TableLength));
-    }
-
-    /* Scan entire table to determine if each LF has been prefixed with a CR */
-
-    for (i = 1; i < FileLength; i++)
-    {
-        if (Table[i] == 0x0A)
-        {
-            if (Table[i - 1] != 0x0D)
-            {
-                /* The LF does not have a preceding CR, table not corrupted */
-
-                return (AE_OK);
-            }
-            else
-            {
-                /* Found a CR/LF pair */
-
-                Pairs++;
-            }
-            i++;
-        }
-    }
-
-    if (!Pairs)
-    {
-        return (AE_OK);
-    }
-
-    /*
-     * Entire table scanned, each CR is part of a CR/LF pair --
-     * meaning that the table was treated as a text file somewhere.
-     *
-     * NOTE: We can't "fix" the table, because any existing CR/LF pairs in the
-     * original table are left untouched by the text conversion process --
-     * meaning that we cannot simply replace CR/LF pairs with LFs.
-     */
-    AcpiOsPrintf ("Table has been corrupted by text mode conversion\n");
-    AcpiOsPrintf ("All LFs (%u) were changed to CR/LF pairs\n", Pairs);
-    AcpiOsPrintf ("Table cannot be repaired!\n");
-    return (AE_BAD_VALUE);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiUtReadTable
- *
- * PARAMETERS:  fp              - File that contains table
- *              Table           - Return value, buffer with table
- *              TableLength     - Return value, length of table
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Load the DSDT from the file pointer
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-AcpiUtReadTable (
-    FILE                    *fp,
-    ACPI_TABLE_HEADER       **Table,
-    UINT32                  *TableLength)
-{
-    ACPI_TABLE_HEADER       TableHeader;
-    UINT32                  Actual;
-    ACPI_STATUS             Status;
-    UINT32                  FileSize;
-    BOOLEAN                 StandardHeader = TRUE;
-    INT32                   Count;
-
-    /* Get the file size */
-
-    FileSize = CmGetFileSize (fp);
-    if (FileSize == ACPI_UINT32_MAX)
-    {
-        return (AE_ERROR);
-    }
-
-    if (FileSize < 4)
-    {
-        return (AE_BAD_HEADER);
-    }
-
-    /* Read the signature */
-
-    fseek (fp, 0, SEEK_SET);
-
-    Count = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), fp);
-    if (Count != sizeof (ACPI_TABLE_HEADER))
-    {
-        AcpiOsPrintf ("Could not read the table header\n");
-        return (AE_BAD_HEADER);
-    }
-
-    /* The RSDP table does not have standard ACPI header */
-
-    if (ACPI_VALIDATE_RSDP_SIG (TableHeader.Signature))
-    {
-        *TableLength = FileSize;
-        StandardHeader = FALSE;
-    }
-    else
-    {
-
-#if 0
-        /* Validate the table header/length */
-
-        Status = AcpiTbValidateTableHeader (&TableHeader);
-        if (ACPI_FAILURE (Status))
-        {
-            AcpiOsPrintf ("Table header is invalid!\n");
-            return (Status);
-        }
-#endif
-
-        /* File size must be at least as long as the Header-specified length */
-
-        if (TableHeader.Length > FileSize)
-        {
-            AcpiOsPrintf (
-                "TableHeader length [0x%X] greater than the input file size [0x%X]\n",
-                TableHeader.Length, FileSize);
-
-#ifdef ACPI_ASL_COMPILER
-            AcpiOsPrintf ("File is corrupt or is ASCII text -- "
-                "it must be a binary file\n");
-#endif
-            return (AE_BAD_HEADER);
-        }
-
-#ifdef ACPI_OBSOLETE_CODE
-        /* We only support a limited number of table types */
-
-        if (!ACPI_COMPARE_NAME ((char *) TableHeader.Signature, ACPI_SIG_DSDT) &&
-            !ACPI_COMPARE_NAME ((char *) TableHeader.Signature, ACPI_SIG_PSDT) &&
-            !ACPI_COMPARE_NAME ((char *) TableHeader.Signature, ACPI_SIG_SSDT))
-        {
-            AcpiOsPrintf ("Table signature [%4.4s] is invalid or not supported\n",
-                (char *) TableHeader.Signature);
-            ACPI_DUMP_BUFFER (&TableHeader, sizeof (ACPI_TABLE_HEADER));
-            return (AE_ERROR);
-        }
-#endif
-
-        *TableLength = TableHeader.Length;
-    }
-
-    /* Allocate a buffer for the table */
-
-    *Table = AcpiOsAllocate ((size_t) FileSize);
-    if (!*Table)
-    {
-        AcpiOsPrintf (
-            "Could not allocate memory for ACPI table %4.4s (size=0x%X)\n",
-            TableHeader.Signature, *TableLength);
-        return (AE_NO_MEMORY);
-    }
-
-    /* Get the rest of the table */
-
-    fseek (fp, 0, SEEK_SET);
-    Actual = fread (*Table, 1, (size_t) FileSize, fp);
-    if (Actual == FileSize)
-    {
-        if (StandardHeader)
-        {
-            /* Now validate the checksum */
-
-            Status = AcpiTbVerifyChecksum ((void *) *Table,
-                        ACPI_CAST_PTR (ACPI_TABLE_HEADER, *Table)->Length);
-
-            if (Status == AE_BAD_CHECKSUM)
-            {
-                Status = AcpiUtCheckTextModeCorruption ((UINT8 *) *Table,
-                            FileSize, (*Table)->Length);
-                return (Status);
-            }
-        }
-        return (AE_OK);
-    }
-
-    if (Actual > 0)
-    {
-        AcpiOsPrintf ("Warning - reading table, asked for %X got %X\n",
-            FileSize, Actual);
-        return (AE_OK);
-    }
-
-    AcpiOsPrintf ("Error - could not read the table file\n");
-    AcpiOsFree (*Table);
-    *Table = NULL;
-    *TableLength = 0;
-    return (AE_ERROR);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiUtReadTableFromFile
- *
- * PARAMETERS:  Filename         - File where table is located
- *              Table            - Where a pointer to the table is returned
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Get an ACPI table from a file
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiUtReadTableFromFile (
-    char                    *Filename,
-    ACPI_TABLE_HEADER       **Table)
-{
-    FILE                    *File;
-    UINT32                  FileSize;
-    UINT32                  TableLength;
-    ACPI_STATUS             Status = AE_ERROR;
-
-
-    /* Open the file, get current size */
-
-    File = fopen (Filename, "rb");
-    if (!File)
-    {
-        perror ("Could not open input file");
-        return (Status);
-    }
-
-    FileSize = CmGetFileSize (File);
-    if (FileSize == ACPI_UINT32_MAX)
-    {
-        goto Exit;
-    }
-
-    /* Get the entire file */
-
-    fprintf (stderr, "Reading ACPI table from file %10s - Length %.8u (0x%06X)\n",
-        Filename, FileSize, FileSize);
-
-    Status = AcpiUtReadTable (File, Table, &TableLength);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("Could not get table from the file\n");
-    }
-
-Exit:
-    fclose(File);
-    return (Status);
-}
-
-#endif
--- a/sys/external/bsd/acpica/dist/utilities/utglobal.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utglobal.c	Wed May 04 19:27:57 2016 +0000
@@ -87,6 +87,12 @@
 };
 
 
+/* Hex-to-ascii */
+
+const char                  AcpiGbl_LowerHexDigits[] = "0123456789abcdef";
+const char                  AcpiGbl_UpperHexDigits[] = "0123456789ABCDEF";
+
+
 /*******************************************************************************
  *
  * Namespace globals
@@ -179,6 +185,55 @@
 };
 #endif /* !ACPI_REDUCED_HARDWARE */
 
+
+#if defined (ACPI_DISASSEMBLER) || defined (ACPI_ASL_COMPILER)
+
+/* ToPld macro: compile/disassemble strings */
+
+const char              *AcpiGbl_PldPanelList[] =
+{
+    "TOP",
+    "BOTTOM",
+    "LEFT",
+    "RIGHT",
+    "FRONT",
+    "BACK",
+    "UNKNOWN",
+    NULL
+};
+
+const char              *AcpiGbl_PldVerticalPositionList[] =
+{
+    "UPPER",
+    "CENTER",
+    "LOWER",
+    NULL
+};
+
+const char              *AcpiGbl_PldHorizontalPositionList[] =
+{
+    "LEFT",
+    "CENTER",
+    "RIGHT",
+    NULL
+};
+
+const char              *AcpiGbl_PldShapeList[] =
+{
+    "ROUND",
+    "OVAL",
+    "SQUARE",
+    "VERTICALRECTANGLE",
+    "HORIZONTALRECTANGLE",
+    "VERTICALTRAPEZOID",
+    "HORIZONTALTRAPEZOID",
+    "UNKNOWN",
+    "CHAMFERED",
+    NULL
+};
+#endif
+
+
 /* Public globals */
 
 ACPI_EXPORT_SYMBOL (AcpiGbl_FADT)
--- a/sys/external/bsd/acpica/dist/utilities/uttrack.c	Wed May 04 18:59:55 2016 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/uttrack.c	Wed May 04 19:27:57 2016 +0000
@@ -775,7 +775,7 @@
 
     if (!NumOutstanding)
     {
-        ACPI_INFO ((AE_INFO, "No outstanding allocations"));
+        ACPI_INFO (("No outstanding allocations"));
     }
     else
     {