resolve conflicts. trunk
authorchristos <christos@NetBSD.org>
Mon, 13 Apr 2015 17:23:15 +0000
branchtrunk
changeset 234621 aa95c2927283
parent 234620 e7ce51fddfdc
child 234622 f222ac16d917
resolve conflicts.
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.l
sys/external/bsd/acpica/dist/compiler/aslerror.c
sys/external/bsd/acpica/dist/compiler/aslfileio.c
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/aslpredef.c
sys/external/bsd/acpica/dist/compiler/aslprepkg.c
sys/external/bsd/acpica/dist/compiler/aslsupport.l
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/dtcompile.c
sys/external/bsd/acpica/dist/compiler/dtfield.c
sys/external/bsd/acpica/dist/compiler/dtparser.y
sys/external/bsd/acpica/dist/compiler/dtsubtable.c
sys/external/bsd/acpica/dist/compiler/dttable.c
sys/external/bsd/acpica/dist/compiler/dtutils.c
sys/external/bsd/acpica/dist/compiler/prparser.y
sys/external/bsd/acpica/dist/compiler/prutils.c
sys/external/bsd/acpica/dist/debugger/dbcmds.c
sys/external/bsd/acpica/dist/debugger/dbdisply.c
sys/external/bsd/acpica/dist/debugger/dbexec.c
sys/external/bsd/acpica/dist/debugger/dbinput.c
sys/external/bsd/acpica/dist/debugger/dbmethod.c
sys/external/bsd/acpica/dist/debugger/dbnames.c
sys/external/bsd/acpica/dist/debugger/dbtest.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/dmresrc.c
sys/external/bsd/acpica/dist/disassembler/dmresrcl.c
sys/external/bsd/acpica/dist/disassembler/dmresrcl2.c
sys/external/bsd/acpica/dist/dispatcher/dscontrol.c
sys/external/bsd/acpica/dist/dispatcher/dsopcode.c
sys/external/bsd/acpica/dist/events/evrgnini.c
sys/external/bsd/acpica/dist/events/evxface.c
sys/external/bsd/acpica/dist/executer/exconfig.c
sys/external/bsd/acpica/dist/executer/exdebug.c
sys/external/bsd/acpica/dist/executer/exdump.c
sys/external/bsd/acpica/dist/hardware/hwesleep.c
sys/external/bsd/acpica/dist/hardware/hwsleep.c
sys/external/bsd/acpica/dist/hardware/hwxfsleep.c
sys/external/bsd/acpica/dist/include/acapps.h
sys/external/bsd/acpica/dist/include/acdebug.h
sys/external/bsd/acpica/dist/include/acdisasm.h
sys/external/bsd/acpica/dist/include/acexcep.h
sys/external/bsd/acpica/dist/include/acglobal.h
sys/external/bsd/acpica/dist/include/acinterp.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/acpiosxf.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/include/platform/acnetbsd.h
sys/external/bsd/acpica/dist/namespace/nsaccess.c
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/nsrepair2.c
sys/external/bsd/acpica/dist/namespace/nsxfeval.c
sys/external/bsd/acpica/dist/namespace/nsxfname.c
sys/external/bsd/acpica/dist/os_specific/service_layers/osfreebsdtbl.c
sys/external/bsd/acpica/dist/os_specific/service_layers/oslinuxtbl.c
sys/external/bsd/acpica/dist/parser/psopcode.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/resources/rsxface.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/tbxface.c
sys/external/bsd/acpica/dist/tables/tbxfroot.c
sys/external/bsd/acpica/dist/tools/acpidump/apfiles.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/uteval.c
sys/external/bsd/acpica/dist/utilities/utglobal.c
sys/external/bsd/acpica/dist/utilities/utmisc.c
sys/external/bsd/acpica/dist/utilities/utmutex.c
sys/external/bsd/acpica/dist/utilities/utosi.c
sys/external/bsd/acpica/dist/utilities/uttrack.c
sys/external/bsd/acpica/dist/utilities/utuuid.c
--- a/sys/external/bsd/acpica/dist/common/dmtbinfo.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbinfo.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -200,9 +200,7 @@
 #define ACPI_S3PTH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_S3PT_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_SLICH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SLIC_HEADER,f)
-#define ACPI_SLIC0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SLIC_KEY,f)
-#define ACPI_SLIC1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SLIC_MARKER,f)
+#define ACPI_SLIC_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIC,f)
 #define ACPI_SRATH_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SUBTABLE_HEADER,f)
 #define ACPI_SRAT0_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SRAT_CPU_AFFINITY,f)
 #define ACPI_SRAT1_OFFSET(f)            (UINT16) ACPI_OFFSET (ACPI_SRAT_MEM_AFFINITY,f)
@@ -2043,42 +2041,16 @@
 
 /*******************************************************************************
  *
- * SLIC - Software Licensing Description Table. There is no common table, just
- * the standard ACPI header and then subtables.
+ * SLIC - Software Licensing Description Table. This table contains the standard
+ * ACPI header followed by proprietary data structures
  *
  ******************************************************************************/
 
-/* Common Subtable header (one per Subtable) */
+/* Single subtable, a proprietary format, so treat it as a buffer */
 
-ACPI_DMTABLE_INFO           AcpiDmTableInfoSlicHdr[] =
-{
-    {ACPI_DMT_SLIC,     ACPI_SLICH_OFFSET (Type),                   "Subtable Type", 0},
-    {ACPI_DMT_UINT32,   ACPI_SLICH_OFFSET (Length),                 "Length", DT_LENGTH},
-    ACPI_DMT_TERMINATOR
-};
-
-ACPI_DMTABLE_INFO           AcpiDmTableInfoSlic0[] =
+ACPI_DMTABLE_INFO           AcpiDmTableInfoSlic[] =
 {
-    {ACPI_DMT_UINT8,    ACPI_SLIC0_OFFSET (KeyType),                "Key Type", 0},
-    {ACPI_DMT_UINT8,    ACPI_SLIC0_OFFSET (Version),                "Version", 0},
-    {ACPI_DMT_UINT16,   ACPI_SLIC0_OFFSET (Reserved),               "Reserved", 0},
-    {ACPI_DMT_UINT32,   ACPI_SLIC0_OFFSET (Algorithm),              "Algorithm", 0},
-    {ACPI_DMT_NAME4,    ACPI_SLIC0_OFFSET (Magic),                  "Magic", 0},
-    {ACPI_DMT_UINT32,   ACPI_SLIC0_OFFSET (BitLength),              "BitLength", 0},
-    {ACPI_DMT_UINT32,   ACPI_SLIC0_OFFSET (Exponent),               "Exponent", 0},
-    {ACPI_DMT_BUF128,   ACPI_SLIC0_OFFSET (Modulus[0]),             "Modulus", 0},
-    ACPI_DMT_TERMINATOR
-};
-
-ACPI_DMTABLE_INFO           AcpiDmTableInfoSlic1[] =
-{
-    {ACPI_DMT_UINT32,   ACPI_SLIC1_OFFSET (Version),                "Version", 0},
-    {ACPI_DMT_NAME6,    ACPI_SLIC1_OFFSET (OemId[0]),               "Oem ID", 0},
-    {ACPI_DMT_NAME8,    ACPI_SLIC1_OFFSET (OemTableId[0]),          "Oem Table ID", 0},
-    {ACPI_DMT_NAME8,    ACPI_SLIC1_OFFSET (WindowsFlag[0]),         "Windows Flag", 0},
-    {ACPI_DMT_UINT32,   ACPI_SLIC1_OFFSET (SlicVersion),            "SLIC Version", 0},
-    {ACPI_DMT_BUF16,    ACPI_SLIC1_OFFSET (Reserved[0]),            "Reserved", 0},
-    {ACPI_DMT_BUF128,   ACPI_SLIC1_OFFSET (Signature[0]),           "Signature", 0},
+    {ACPI_DMT_RAW_BUFFER, 0,                                        "Software Licensing Structure", 0},
     ACPI_DMT_TERMINATOR
 };
 
@@ -2091,7 +2063,7 @@
 
 ACPI_DMTABLE_INFO           AcpiDmTableInfoSlit[] =
 {
-    {ACPI_DMT_UINT64,   ACPI_SLIT_OFFSET (LocalityCount),          "Localities", 0},
+    {ACPI_DMT_UINT64,   ACPI_SLIT_OFFSET (LocalityCount),           "Localities", 0},
     ACPI_DMT_TERMINATOR
 };
 
--- a/sys/external/bsd/acpica/dist/compiler/aslanalyze.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslanalyze.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/compiler/aslcompile.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompile.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -118,10 +118,9 @@
     AslCompilerparse();
     UtEndEvent (Event);
 
-    /* Check for parse errors */
+    /* Check for parser-detected syntax errors */
 
-    Status = AslCheckForErrorExit ();
-    if (ACPI_FAILURE (Status))
+    if (Gbl_SyntaxError)
     {
         fprintf (stderr, "Compiler aborting due to parser-detected syntax error(s)\n");
         LsDumpParseTree ();
@@ -147,6 +146,13 @@
     Event = UtBeginEvent ("Flush source input");
     CmFlushSourceCode ();
 
+    /* Prune the parse tree if requested (debug purposes only) */
+
+    if (Gbl_PruneParseTree)
+    {
+        AslPruneParseTree (Gbl_PruneDepth, Gbl_PruneType);
+    }
+
     /* Optional parse tree dump, compiler debug output only */
 
     LsDumpParseTree ();
@@ -189,8 +195,16 @@
     Event = UtBeginEvent ("Constant folding via AML interpreter");
     DbgPrint (ASL_DEBUG_OUTPUT,
         "\nInterpreting compile-time constant expressions\n\n");
-    TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
-        OpcAmlConstantWalk, NULL, NULL);
+
+    if (Gbl_FoldConstants)
+    {
+        TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
+            OpcAmlConstantWalk, NULL, NULL);
+    }
+    else
+    {
+        DbgPrint (ASL_PARSE_OUTPUT, "    Optional folding disabled\n");
+    }
     UtEndEvent (Event);
 
     /* Update AML opcodes if necessary, after constant folding */
--- a/sys/external/bsd/acpica/dist/compiler/aslcompiler.l	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompiler.l	Mon Apr 13 17:23:15 2015 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -117,7 +117,49 @@
                               else {yyterminate ();} }
 ";"                         { count (0); return(';'); }
 
+    /* ASL Extension: Standard C operators */
 
+"~"                         { count (3); return (PARSEOP_EXP_NOT); }
+"!"                         { count (3); return (PARSEOP_EXP_LOGICAL_NOT); }
+"*"                         { count (3); return (PARSEOP_EXP_MULTIPLY); }
+"/"                         { count (3); return (PARSEOP_EXP_DIVIDE); }
+"%"                         { count (3); return (PARSEOP_EXP_MODULO); }
+"+"                         { count (3); return (PARSEOP_EXP_ADD); }
+"-"                         { count (3); return (PARSEOP_EXP_SUBTRACT); }
+">>"                        { count (3); return (PARSEOP_EXP_SHIFT_RIGHT); }
+"<<"                        { count (3); return (PARSEOP_EXP_SHIFT_LEFT); }
+"<"                         { count (3); return (PARSEOP_EXP_LESS); }
+">"                         { count (3); return (PARSEOP_EXP_GREATER); }
+"&"                         { count (3); return (PARSEOP_EXP_AND); }
+"<="                        { count (3); return (PARSEOP_EXP_LESS_EQUAL); }
+">="                        { count (3); return (PARSEOP_EXP_GREATER_EQUAL); }
+"=="                        { count (3); return (PARSEOP_EXP_EQUAL); }
+"!="                        { count (3); return (PARSEOP_EXP_NOT_EQUAL); }
+"|"                         { count (3); return (PARSEOP_EXP_OR); }
+"&&"                        { count (3); return (PARSEOP_EXP_LOGICAL_AND); }
+"||"                        { count (3); return (PARSEOP_EXP_LOGICAL_OR); }
+"++"                        { count (3); return (PARSEOP_EXP_INCREMENT); }
+"--"                        { count (3); return (PARSEOP_EXP_DECREMENT); }
+"^ "                        { count (3); return (PARSEOP_EXP_XOR); }
+
+    /* ASL Extension: Standard C assignment operators */
+
+"="                         { count (3); return (PARSEOP_EXP_EQUALS); }
+"+="                        { count (3); return (PARSEOP_EXP_ADD_EQ); }
+"-="                        { count (3); return (PARSEOP_EXP_SUB_EQ); }
+"*="                        { count (3); return (PARSEOP_EXP_MUL_EQ); }
+"/="                        { count (3); return (PARSEOP_EXP_DIV_EQ); }
+"%="                        { count (3); return (PARSEOP_EXP_MOD_EQ); }
+"<<="                       { count (3); return (PARSEOP_EXP_SHL_EQ); }
+">>="                       { count (3); return (PARSEOP_EXP_SHR_EQ); }
+"&="                        { count (3); return (PARSEOP_EXP_AND_EQ); }
+"^="                        { count (3); return (PARSEOP_EXP_XOR_EQ); }
+"|="                        { count (3); return (PARSEOP_EXP_OR_EQ); }
+
+
+    /*
+     * Begin standard ASL grammar
+     */
 0[xX]{HexDigitChar}+ |
 {DigitChar}+                { AslCompilerlval.i = UtDoConstant ((char *) AslCompilertext);
                                 count (1); return (PARSEOP_INTEGER); }
@@ -592,6 +634,44 @@
 "Transfer8_16"              { count (0); return (PARSEOP_XFERTYPE_8_16); }
 "Transfer16"                { count (0); return (PARSEOP_XFERTYPE_16); }
 
+    /* ToPld macro */
+
+"ToPLD"                     { count (0); return (PARSEOP_TOPLD); }
+
+"PLD_Revision"              { count (0); return (PARSEOP_PLD_REVISION); }
+"PLD_IgnoreColor"           { count (0); return (PARSEOP_PLD_IGNORECOLOR); }
+"PLD_Red"                   { count (0); return (PARSEOP_PLD_RED); }
+"PLD_Green"                 { count (0); return (PARSEOP_PLD_GREEN); }
+"PLD_Blue"                  { count (0); return (PARSEOP_PLD_BLUE); }
+"PLD_Width"                 { count (0); return (PARSEOP_PLD_WIDTH); }
+"PLD_Height"                { count (0); return (PARSEOP_PLD_HEIGHT); }
+"PLD_UserVisible"           { count (0); return (PARSEOP_PLD_USERVISIBLE); }
+"PLD_Dock"                  { count (0); return (PARSEOP_PLD_DOCK); }
+"PLD_Lid"                   { count (0); return (PARSEOP_PLD_LID); }
+"PLD_Panel"                 { count (0); return (PARSEOP_PLD_PANEL); }
+"PLD_VerticalPosition"      { count (0); return (PARSEOP_PLD_VERTICALPOSITION); }
+"PLD_HorizontalPosition"    { count (0); return (PARSEOP_PLD_HORIZONTALPOSITION); }
+"PLD_Shape"                 { count (0); return (PARSEOP_PLD_SHAPE); }
+"PLD_GroupOrientation"      { count (0); return (PARSEOP_PLD_GROUPORIENTATION); }
+"PLD_GroupToken"            { count (0); return (PARSEOP_PLD_GROUPTOKEN); }
+"PLD_GroupPosition"         { count (0); return (PARSEOP_PLD_GROUPPOSITION); }
+"PLD_Bay"                   { count (0); return (PARSEOP_PLD_BAY); }
+"PLD_Ejectable"             { count (0); return (PARSEOP_PLD_EJECTABLE); }
+"PLD_EjectRequired"         { count (0); return (PARSEOP_PLD_EJECTREQUIRED); }
+"PLD_CabinetNumber"         { count (0); return (PARSEOP_PLD_CABINETNUMBER); }
+"PLD_CardCageNumber"        { count (0); return (PARSEOP_PLD_CARDCAGENUMBER); }
+"PLD_Reference"             { count (0); return (PARSEOP_PLD_REFERENCE); }
+"PLD_Rotation"              { count (0); return (PARSEOP_PLD_ROTATION); }
+"PLD_Order"                 { count (0); return (PARSEOP_PLD_ORDER); }
+"PLD_Reserved"              { count (0); return (PARSEOP_PLD_RESERVED); }
+"PLD_VerticalOffset"        { count (0); return (PARSEOP_PLD_VERTICALOFFSET); }
+"PLD_HorizontalOffset"      { count (0); return (PARSEOP_PLD_HORIZONTALOFFSET); }
+
+
+    /* printf debug macros */
+"printf"                    { count (0); return (PARSEOP_PRINTF); }
+"fprintf"                   { count (0); return (PARSEOP_FPRINTF); }
+
     /* Predefined compiler names */
 
 "__DATE__"                  { count (0); return (PARSEOP___DATE__); }
@@ -628,10 +708,6 @@
                                 DbgPrint (ASL_PARSE_OUTPUT, "NameString: %s\n", s);
                                 return (PARSEOP_NAMESTRING); }
 
-"*" |
-"/"                         { count (1);
-                                AslCompilererror ("Parse error, expecting ASL keyword or name");}
-
 .                           { count (1);
                                 snprintf (MsgBuffer, sizeof(MsgBuffer),
                                     "Invalid character (0x%2.2X), expecting ASL keyword or name",
--- a/sys/external/bsd/acpica/dist/compiler/aslerror.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslerror.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -918,6 +918,8 @@
     const char              *CompilerMessage)
 {
 
+    Gbl_SyntaxError++;
+
     AslCommonError (ASL_ERROR, ASL_MSG_SYNTAX, Gbl_CurrentLineNumber,
         Gbl_LogicalLineNumber, Gbl_CurrentLineOffset,
         Gbl_CurrentColumn, Gbl_Files[ASL_FILE_INPUT].Filename,
--- a/sys/external/bsd/acpica/dist/compiler/aslfileio.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslfileio.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -68,8 +68,8 @@
     UINT8                   ErrorId)
 {
 
-    snprintf (MsgBuffer, sizeof(MsgBuffer), "\"%s\" (%s)", Gbl_Files[FileId].Filename,
-        strerror (errno));
+    snprintf (MsgBuffer, sizeof(MsgBuffer), "\"%s\" (%s) - %s", Gbl_Files[FileId].Filename,
+        Gbl_Files[FileId].Description, strerror (errno));
     AslCommonError (ASL_ERROR, ErrorId, 0, 0, 0, 0, NULL, MsgBuffer);
 }
 
@@ -98,6 +98,9 @@
     FILE                    *File;
 
 
+    Gbl_Files[FileId].Filename = Filename;
+    Gbl_Files[FileId].Handle = NULL;
+
     File = fopen (Filename, Mode);
     if (!File)
     {
@@ -105,8 +108,7 @@
         AslAbort ();
     }
 
-    Gbl_Files[FileId].Filename = Filename;
-    Gbl_Files[FileId].Handle   = File;
+    Gbl_Files[FileId].Handle = File;
 }
 
 
--- a/sys/external/bsd/acpica/dist/compiler/aslfiles.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslfiles.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -485,6 +485,8 @@
                 0, 0, 0, 0, NULL, NULL);
             return (AE_ERROR);
         }
+
+        Gbl_Files[ASL_FILE_AML_OUTPUT].Filename = Filename;
     }
 
     /* Open the output AML file in binary mode */
@@ -563,9 +565,14 @@
 
         if (!Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle)
         {
-            AslCommonError (ASL_ERROR, ASL_MSG_DEBUG_FILENAME,
-                0, 0, 0, 0, NULL, NULL);
-            return (AE_ERROR);
+            /*
+             * A problem with freopen is that on error,
+             * we no longer have stderr.
+             */
+            Gbl_DebugFlag = FALSE;
+            memcpy (stderr, stdout, sizeof (FILE));
+            FlFileError (ASL_FILE_DEBUG_OUTPUT, ASL_MSG_DEBUG_FILENAME);
+            AslAbort ();
         }
 
         AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT);
@@ -758,6 +765,26 @@
         AslCompilerFileHeader (ASL_FILE_NAMESPACE_OUTPUT);
     }
 
+    /* Create/Open a map file if requested */
+
+    if (Gbl_MapfileFlag)
+    {
+        Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_MAP);
+        if (!Filename)
+        {
+            AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
+                0, 0, 0, 0, NULL, NULL);
+            return (AE_ERROR);
+        }
+
+        /* Open the hex file, text mode (closed at compiler exit) */
+
+        FlOpenFile (ASL_FILE_MAP_OUTPUT, Filename, "w+t");
+
+        AslCompilerSignon (ASL_FILE_MAP_OUTPUT);
+        AslCompilerFileHeader (ASL_FILE_MAP_OUTPUT);
+    }
+
     return (AE_OK);
 }
 
--- a/sys/external/bsd/acpica/dist/compiler/aslload.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslload.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __ASLLOAD_C__
-
 #include "aslcompiler.h"
 #include "amlcode.h"
 #include "acdispat.h"
--- a/sys/external/bsd/acpica/dist/compiler/asllookup.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asllookup.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/compiler/aslpredef.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslpredef.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/compiler/aslprepkg.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslprepkg.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/compiler/aslsupport.l	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslsupport.l	Mon Apr 13 17:23:15 2015 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -69,6 +69,14 @@
 ASL_FILE_NODE               *Gbl_IncludeFileStack = NULL;
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    AslParserCleanup
+ *
+ * Used to delete the current buffer
+ *
+ ******************************************************************************/
+
 void
 AslParserCleanup (
     void)
@@ -188,7 +196,8 @@
 
 
     Fnode = Gbl_IncludeFileStack;
-    DbgPrint (ASL_PARSE_OUTPUT, "\nPop InputFile Stack, Fnode %p\n\n", Fnode);
+    DbgPrint (ASL_PARSE_OUTPUT,
+        "\nPop InputFile Stack, Fnode %p\n\n", Fnode);
 
     if (!Fnode)
     {
@@ -248,11 +257,11 @@
 
     Fnode = UtLocalCalloc (sizeof (ASL_FILE_NODE));
 
-    Fnode->File                 = yyin;
-    Fnode->Next                 = Gbl_IncludeFileStack;
-    Fnode->State                = YY_CURRENT_BUFFER;
-    Fnode->CurrentLineNumber    = Gbl_CurrentLineNumber;
-    Fnode->Filename             = Gbl_Files[ASL_FILE_INPUT].Filename;
+    Fnode->File = yyin;
+    Fnode->Next = Gbl_IncludeFileStack;
+    Fnode->State = YY_CURRENT_BUFFER;
+    Fnode->Filename = Gbl_Files[ASL_FILE_INPUT].Filename;
+    Fnode->CurrentLineNumber = Gbl_CurrentLineNumber;
 
     /* Push it on the stack */
 
@@ -263,7 +272,8 @@
     State = yy_create_buffer (InputFile, YY_BUF_SIZE);
     yy_switch_to_buffer (State);
 
-    DbgPrint (ASL_PARSE_OUTPUT, "\nPush InputFile Stack, returning %p\n\n", InputFile);
+    DbgPrint (ASL_PARSE_OUTPUT,
+        "\nPush InputFile Stack, returning %p\n\n", InputFile);
 
     /* Reset the global line count and filename */
 
@@ -313,7 +323,7 @@
  *
  * FUNCTION:    AslInsertLineBuffer
  *
- * PARAMETERS:  SourceChar      - One char from the input ASL source file
+ * PARAMETERS:  SourceChar          - One char from the input ASL source file
  *
  * RETURN:      None
  *
@@ -354,7 +364,8 @@
         *Gbl_LineBufPtr = (UINT8) SourceChar;
         Gbl_LineBufPtr++;
 
-        if (Gbl_LineBufPtr > (Gbl_CurrentLineBuffer + (Gbl_LineBufferSize - 1)))
+        if (Gbl_LineBufPtr >
+            (Gbl_CurrentLineBuffer + (Gbl_LineBufferSize - 1)))
         {
 #if 0
             /*
@@ -363,9 +374,9 @@
              */
             snprintf (MsgBuffer, sizeof(MsgBuffer), "Max %u", Gbl_LineBufferSize);
             AslCommonError (ASL_WARNING, ASL_MSG_LONG_LINE,
-                            Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
-                            Gbl_CurrentLineOffset, Gbl_CurrentColumn,
-                            Gbl_Files[ASL_FILE_INPUT].Filename, MsgBuffer);
+                Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
+                Gbl_CurrentLineOffset, Gbl_CurrentColumn,
+                Gbl_Files[ASL_FILE_INPUT].Filename, MsgBuffer);
 #endif
 
             AslResetCurrentLineBuffer ();
@@ -384,12 +395,12 @@
  *
  * FUNCTION:    count
  *
- * PARAMETERS:  yytext      - Contains the matched keyword.
- *              Type        - Keyword/Character type:
- *                             0 = anything except a keyword
- *                             1 = pseudo-keywords
- *                             2 = non-executable ASL keywords
- *                             3 = executable ASL keywords
+ * PARAMETERS:  yytext              - Contains the matched keyword.
+ *              Type                - Keyword/Character type:
+ *                                      0 = anything except a keyword
+ *                                      1 = pseudo-keywords
+ *                                      2 = non-executable ASL keywords
+ *                                      3 = executable ASL keywords
  *
  * RETURN:      None
  *
@@ -458,7 +469,7 @@
 
     /* Eat chars until end-of-comment */
 
-    while ((c = input()) != '*' && c != EOF)
+    while (((c = input ()) != '*') && (c != EOF))
     {
         AslInsertLineBuffer (c);
         c1 = c;
@@ -476,16 +487,16 @@
     if ((c1 == '/') && (c == '*'))
     {
         AslCommonError (ASL_WARNING, ASL_MSG_NESTED_COMMENT,
-                        Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
-                        Gbl_InputByteCount, Gbl_CurrentColumn,
-                        Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
+            Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
+            Gbl_InputByteCount, Gbl_CurrentColumn,
+            Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
     }
 
     /* Comment is closed only if the NEXT character is a slash */
 
     AslInsertLineBuffer (c);
 
-    if ((c1 = input()) != '/' && c1 != EOF)
+    if (((c1 = input ()) != '/') && (c1 != EOF))
     {
         unput(c1);
         goto loop;
@@ -505,9 +516,9 @@
      * Premature End-Of-File
      */
     AslCommonError (ASL_ERROR, ASL_MSG_EARLY_EOF,
-                    Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
-                    Gbl_CurrentLineOffset, Gbl_CurrentColumn,
-                    Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
+        Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
+        Gbl_CurrentLineOffset, Gbl_CurrentColumn,
+        Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
     return (FALSE);
 }
 
@@ -534,7 +545,7 @@
     AslInsertLineBuffer ('/');
     AslInsertLineBuffer ('/');
 
-    while ((c = input()) != '\n' && c != EOF)
+    while (((c = input ()) != '\n') && (c != EOF))
     {
         AslInsertLineBuffer (c);
     }
@@ -682,9 +693,9 @@
                 /* Unknown escape sequence issue warning, but use the character */
 
                 AslCommonError (ASL_WARNING, ASL_MSG_INVALID_ESCAPE,
-                                Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
-                                Gbl_CurrentLineOffset, Gbl_CurrentColumn,
-                                Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
+                    Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
+                    Gbl_CurrentLineOffset, Gbl_CurrentColumn,
+                    Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
                 break;
             }
             break;
@@ -709,9 +720,9 @@
                 if ((Digit == 0) || (Digit > ACPI_ASCII_MAX))
                 {
                     AslCommonError (ASL_WARNING, ASL_MSG_INVALID_STRING,
-                                    Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
-                                    Gbl_CurrentLineOffset, Gbl_CurrentColumn,
-                                    Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
+                        Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
+                        Gbl_CurrentLineOffset, Gbl_CurrentColumn,
+                        Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
                 }
                 else
                 {
@@ -753,9 +764,9 @@
                 if ((Digit == 0) || (Digit > ACPI_ASCII_MAX))
                 {
                     AslCommonError (ASL_WARNING, ASL_MSG_INVALID_STRING,
-                                    Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
-                                    Gbl_CurrentLineOffset, Gbl_CurrentColumn,
-                                    Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
+                        Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
+                        Gbl_CurrentLineOffset, Gbl_CurrentColumn,
+                        Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
                 }
                 else
                 {
@@ -797,9 +808,9 @@
      * Premature End-Of-File
      */
     AslCommonError (ASL_ERROR, ASL_MSG_EARLY_EOF,
-                    Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
-                    Gbl_CurrentLineOffset, Gbl_CurrentColumn,
-                    Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
+        Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
+        Gbl_CurrentLineOffset, Gbl_CurrentColumn,
+        Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
     return (FALSE);
 
 
@@ -813,9 +824,9 @@
     if (!CleanString)
     {
         AslCommonError (ASL_ERROR, ASL_MSG_MEMORY_ALLOCATION,
-                        Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
-                        Gbl_CurrentLineOffset, Gbl_CurrentColumn,
-                        Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
+            Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
+            Gbl_CurrentLineOffset, Gbl_CurrentColumn,
+            Gbl_Files[ASL_FILE_INPUT].Filename, NULL);
         return (FALSE);
     }
 
@@ -829,8 +840,8 @@
     /* Literal was too long */
 
     AslCommonError (ASL_ERROR, ASL_MSG_STRING_LENGTH,
-                    Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
-                    Gbl_CurrentLineOffset, Gbl_CurrentColumn,
-                    Gbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096");
+        Gbl_CurrentLineNumber, Gbl_LogicalLineNumber,
+        Gbl_CurrentLineOffset, Gbl_CurrentColumn,
+        Gbl_Files[ASL_FILE_INPUT].Filename, "Max length 4096");
     return (FALSE);
 }
--- a/sys/external/bsd/acpica/dist/compiler/asltree.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asltree.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -55,10 +55,6 @@
 TrGetNextNode (
     void);
 
-static char *
-TrGetNodeFlagName (
-    UINT32                  Flags);
-
 
 /*******************************************************************************
  *
@@ -187,7 +183,7 @@
     }
 
     DbgPrint (ASL_PARSE_OUTPUT,
-        "\nUpdateNode: Old - %s, New - %s\n\n",
+        "\nUpdateNode: Old - %s, New - %s\n",
         UtGetOpName (Op->Asl.ParseOpcode),
         UtGetOpName (ParseOpcode));
 
@@ -261,90 +257,140 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    TrGetNodeFlagName
+ * FUNCTION:    TrPrintNodeCompileFlags
  *
  * PARAMETERS:  Flags               - Flags word to be decoded
  *
- * RETURN:      Name string. Always returns a valid string pointer.
+ * RETURN:      None
  *
- * DESCRIPTION: Decode a flags word
+ * DESCRIPTION: Decode a flags word to text. Displays all flags that are set.
  *
  ******************************************************************************/
 
-static char *
-TrGetNodeFlagName (
+void
+TrPrintNodeCompileFlags (
     UINT32                  Flags)
 {
+    UINT32                  i;
+    UINT32                  FlagBit = 1;
+    char                    *FlagName = NULL;
 
-    switch (Flags)
+
+    for (i = 0; i < 32; i++)
     {
-    case NODE_VISITED:
+        switch (Flags & FlagBit)
+        {
+        case NODE_VISITED:
 
-        return ("NODE_VISITED");
+            FlagName = "NODE_VISITED";
+            break;
 
-    case NODE_AML_PACKAGE:
+        case NODE_AML_PACKAGE:
 
-        return ("NODE_AML_PACKAGE");
+            FlagName = "NODE_AML_PACKAGE";
+            break;
+
+        case NODE_IS_TARGET:
 
-    case NODE_IS_TARGET:
+            FlagName = "NODE_IS_TARGET";
+            break;
 
-        return ("NODE_IS_TARGET");
+        case NODE_IS_RESOURCE_DESC:
 
-    case NODE_IS_RESOURCE_DESC:
+            FlagName = "NODE_IS_RESOURCE_DESC";
+            break;
 
-        return ("NODE_IS_RESOURCE_DESC");
+        case NODE_IS_RESOURCE_FIELD:
 
-    case NODE_IS_RESOURCE_FIELD:
+            FlagName = "NODE_IS_RESOURCE_FIELD";
+            break;
+
+        case NODE_HAS_NO_EXIT:
 
-        return ("NODE_IS_RESOURCE_FIELD");
+            FlagName = "NODE_HAS_NO_EXIT";
+            break;
 
-    case NODE_HAS_NO_EXIT:
+        case NODE_IF_HAS_NO_EXIT:
+
+            FlagName = "NODE_IF_HAS_NO_EXIT";
+            break;
 
-        return ("NODE_HAS_NO_EXIT");
+        case NODE_NAME_INTERNALIZED:
 
-    case NODE_IF_HAS_NO_EXIT:
+            FlagName = "NODE_NAME_INTERNALIZED";
+            break;
+
+        case NODE_METHOD_NO_RETVAL:
 
-        return ("NODE_IF_HAS_NO_EXIT");
+            FlagName = "NODE_METHOD_NO_RETVAL";
+            break;
 
-    case NODE_NAME_INTERNALIZED:
+        case NODE_METHOD_SOME_NO_RETVAL:
 
-        return ("NODE_NAME_INTERNALIZED");
+            FlagName = "NODE_METHOD_SOME_NO_RETVAL";
+            break;
 
-    case NODE_METHOD_NO_RETVAL:
+        case NODE_RESULT_NOT_USED:
 
-        return ("NODE_METHOD_NO_RETVAL");
+            FlagName = "NODE_RESULT_NOT_USED";
+            break;
+
+        case NODE_METHOD_TYPED:
 
-    case NODE_METHOD_SOME_NO_RETVAL:
+            FlagName = "NODE_METHOD_TYPED";
+            break;
 
-        return ("NODE_METHOD_SOME_NO_RETVAL");
+        case NODE_COMPILE_TIME_CONST:
+
+            FlagName = "NODE_COMPILE_TIME_CONST";
+            break;
 
-    case NODE_RESULT_NOT_USED:
+        case NODE_IS_TERM_ARG:
 
-        return ("NODE_RESULT_NOT_USED");
+            FlagName = "NODE_IS_TERM_ARG";
+            break;
+
+        case NODE_WAS_ONES_OP:
 
-    case NODE_METHOD_TYPED:
+            FlagName = "NODE_WAS_ONES_OP";
+            break;
 
-        return ("NODE_METHOD_TYPED");
+        case NODE_IS_NAME_DECLARATION:
 
-    case NODE_COMPILE_TIME_CONST:
+            FlagName = "NODE_IS_NAME_DECLARATION";
+            break;
 
-        return ("NODE_COMPILE_TIME_CONST");
+        case NODE_COMPILER_EMITTED:
 
-    case NODE_IS_TERM_ARG:
+            FlagName = "NODE_COMPILER_EMITTED";
+            break;
+
+        case NODE_IS_DUPLICATE:
 
-        return ("NODE_IS_TERM_ARG");
+            FlagName = "NODE_IS_DUPLICATE";
+            break;
 
-    case NODE_WAS_ONES_OP:
+        case NODE_IS_RESOURCE_DATA:
+
+            FlagName = "NODE_IS_RESOURCE_DATA";
+            break;
 
-        return ("NODE_WAS_ONES_OP");
+        case NODE_IS_NULL_RETURN:
 
-    case NODE_IS_NAME_DECLARATION:
+            FlagName = "NODE_IS_NULL_RETURN";
+            break;
 
-        return ("NODE_IS_NAME_DECLARATION");
+        default:
+            break;
+        }
 
-    default:
+        if (FlagName)
+        {
+            DbgPrint (ASL_PARSE_OUTPUT, " %s", FlagName);
+            FlagName = NULL;
+        }
 
-        return ("Multiple Flags (or unknown flag) set");
+        FlagBit <<= 1;
     }
 }
 
@@ -368,15 +414,17 @@
     UINT32                  Flags)
 {
 
-    DbgPrint (ASL_PARSE_OUTPUT,
-        "\nSetNodeFlags: Op %p, %8.8X %s\n\n", Op, Flags,
-        TrGetNodeFlagName (Flags));
-
     if (!Op)
     {
         return (NULL);
     }
 
+    DbgPrint (ASL_PARSE_OUTPUT,
+        "\nSetNodeFlags: %s Op %p, %8.8X", Op->Asl.ParseOpName, Op, Flags);
+
+    TrPrintNodeCompileFlags (Flags);
+    DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
+
     Op->Asl.CompileFlags |= Flags;
     return (Op);
 }
@@ -448,6 +496,124 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    TrCreateAssignmentNode
+ *
+ * PARAMETERS:  Target              - Assignment target
+ *              Source              - Assignment source
+ *
+ * RETURN:      Pointer to the new node. Aborts on allocation failure
+ *
+ * DESCRIPTION: Implements the C-style '=' operator. It changes the parse
+ *              tree if possible to utilize the last argument of the math
+ *              operators which is a target operand -- thus saving invocation
+ *              of and additional Store() operator. An optimization.
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrCreateAssignmentNode (
+    ACPI_PARSE_OBJECT       *Target,
+    ACPI_PARSE_OBJECT       *Source)
+{
+    ACPI_PARSE_OBJECT       *TargetOp;
+    ACPI_PARSE_OBJECT       *SourceOp1;
+    ACPI_PARSE_OBJECT       *SourceOp2;
+    ACPI_PARSE_OBJECT       *Operator;
+
+
+    DbgPrint (ASL_PARSE_OUTPUT,
+        "\nTrCreateAssignmentNode  Line [%u to %u] Source %s Target %s\n",
+        Source->Asl.LineNumber, Source->Asl.EndLine,
+        UtGetOpName (Source->Asl.ParseOpcode),
+        UtGetOpName (Target->Asl.ParseOpcode));
+
+    TrSetNodeFlags (Target, NODE_IS_TARGET);
+
+    switch (Source->Asl.ParseOpcode)
+    {
+    /*
+     * Only these operators can be optimized because they have
+     * a target operand
+     */
+    case PARSEOP_ADD:
+    case PARSEOP_AND:
+    case PARSEOP_DIVIDE:
+    case PARSEOP_MOD:
+    case PARSEOP_MULTIPLY:
+    case PARSEOP_NOT:
+    case PARSEOP_OR:
+    case PARSEOP_SHIFTLEFT:
+    case PARSEOP_SHIFTRIGHT:
+    case PARSEOP_SUBTRACT:
+    case PARSEOP_XOR:
+
+        break;
+
+    /* Otherwise, just create a normal Store operator */
+
+    default:
+
+        goto CannotOptimize;
+    }
+
+    /*
+     * Transform the parse tree such that the target is moved to the
+     * last operand of the operator
+     */
+    SourceOp1 = Source->Asl.Child;
+    SourceOp2 = SourceOp1->Asl.Next;
+
+    /* NOT only has one operand, but has a target */
+
+    if (Source->Asl.ParseOpcode == PARSEOP_NOT)
+    {
+        SourceOp2 = SourceOp1;
+    }
+
+    /* DIVIDE has an extra target operand (remainder) */
+
+    if (Source->Asl.ParseOpcode == PARSEOP_DIVIDE)
+    {
+        SourceOp2 = SourceOp2->Asl.Next;
+    }
+
+    TargetOp = SourceOp2->Asl.Next;
+
+    /*
+     * Can't perform this optimization if there already is a target
+     * for the operator (ZERO is a "no target" placeholder).
+     */
+    if (TargetOp->Asl.ParseOpcode != PARSEOP_ZERO)
+    {
+        goto CannotOptimize;
+    }
+
+    /* Link in the target as the final operand */
+
+    SourceOp2->Asl.Next = Target;
+    Target->Asl.Parent = Source;
+
+    return (Source);
+
+
+CannotOptimize:
+
+    Operator = TrAllocateNode (PARSEOP_STORE);
+    TrLinkChildren (Operator, 2, Source, Target);
+
+    /* Set the appropriate line numbers for the new node */
+
+    Operator->Asl.LineNumber        = Target->Asl.LineNumber;
+    Operator->Asl.LogicalLineNumber = Target->Asl.LogicalLineNumber;
+    Operator->Asl.LogicalByteOffset = Target->Asl.LogicalByteOffset;
+    Operator->Asl.Column            = Target->Asl.Column;
+
+    return (Operator);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    TrCreateLeafNode
  *
  * PARAMETERS:  ParseOpcode         - New opcode to be assigned to the node
@@ -470,7 +636,40 @@
 
     DbgPrint (ASL_PARSE_OUTPUT,
         "\nCreateLeafNode  Ln/Col %u/%u NewNode %p  Op %s\n\n",
-        Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode));
+        Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode));
+
+    return (Op);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    TrCreateNullTarget
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      Pointer to the new node. Aborts on allocation failure
+ *
+ * DESCRIPTION: Create a "null" target node. This is defined by the ACPI
+ *              specification to be a zero AML opcode, and indicates that
+ *              no target has been specified for the parent operation
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrCreateNullTarget (
+    void)
+{
+    ACPI_PARSE_OBJECT       *Op;
+
+
+    Op = TrAllocateNode (PARSEOP_ZERO);
+    Op->Asl.CompileFlags |= (NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);
+
+    DbgPrint (ASL_PARSE_OUTPUT,
+        "\nCreateNullTarget  Ln/Col %u/%u NewNode %p  Op %s\n",
+        Op->Asl.LineNumber, Op->Asl.Column, Op,
+        UtGetOpName (Op->Asl.ParseOpcode));
 
     return (Op);
 }
@@ -502,7 +701,6 @@
     time_t                  CurrentTime;
     char                    *StaticTimeString;
     char                    *TimeString;
-    char                    *Path;
     char                    *Filename;
 
 
@@ -529,7 +727,7 @@
 
         /* Get the simple filename from the full path */
 
-        FlSplitInputPathname (Op->Asl.Filename, &Path, &Filename);
+        FlSplitInputPathname (Op->Asl.Filename, NULL, &Filename);
         Op->Asl.Value.String = Filename;
         break;
 
@@ -554,7 +752,7 @@
     }
 
     DbgPrint (ASL_PARSE_OUTPUT,
-        "\nCreateConstantLeafNode  Ln/Col %u/%u NewNode %p  Op %s  Value %8.8X%8.8X  ",
+        "\nCreateConstantLeafNode  Ln/Col %u/%u NewNode %p  Op %s  Value %8.8X%8.8X  \n",
         Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode),
         ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
     return (Op);
@@ -563,6 +761,81 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    TrCreateTargetOperand
+ *
+ * PARAMETERS:  OriginalOp          - Op to be copied
+ *
+ * RETURN:      Pointer to the new node. Aborts on allocation failure
+ *
+ * DESCRIPTION: Copy an existing node (and subtree). Used in ASL+ (C-style)
+ *              expressions where the target is the same as one of the
+ *              operands. A new node and subtree must be created from the
+ *              original so that the parse tree can be linked properly.
+ *
+ * NOTE:        This code is specific to target operands that are the last
+ *              operand in an ASL/AML operator. Meaning that the top-level
+ *              parse Op in a possible subtree has a NULL Next pointer.
+ *              This simplifies the recursion.
+ *
+ *              Subtree example:
+ *                  DeRefOf (Local1) += 32
+ *
+ *              This gets converted to:
+ *                  Add (DeRefOf (Local1), 32, DeRefOf (Local1))
+ *
+ *              Each DeRefOf has a single child, Local1. Even more complex
+ *              subtrees can be created via the Index and DeRefOf operators.
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrCreateTargetOperand (
+    ACPI_PARSE_OBJECT       *OriginalOp,
+    ACPI_PARSE_OBJECT       *ParentOp)
+{
+    ACPI_PARSE_OBJECT       *Op;
+
+
+    if (!OriginalOp)
+    {
+        return (NULL);
+    }
+
+    Op = TrGetNextNode ();
+
+    /* Copy the pertinent values (omit link pointer fields) */
+
+    Op->Asl.Value               = OriginalOp->Asl.Value;
+    Op->Asl.Filename            = OriginalOp->Asl.Filename;
+    Op->Asl.LineNumber          = OriginalOp->Asl.LineNumber;
+    Op->Asl.LogicalLineNumber   = OriginalOp->Asl.LogicalLineNumber;
+    Op->Asl.LogicalByteOffset   = OriginalOp->Asl.LogicalByteOffset;
+    Op->Asl.Column              = OriginalOp->Asl.Column;
+    Op->Asl.Flags               = OriginalOp->Asl.Flags;
+    Op->Asl.CompileFlags        = OriginalOp->Asl.CompileFlags;
+    Op->Asl.AmlOpcode           = OriginalOp->Asl.AmlOpcode;
+    Op->Asl.ParseOpcode         = OriginalOp->Asl.ParseOpcode;
+    Op->Asl.Parent              = ParentOp;
+    UtSetParseOpName (Op);
+
+    /* Copy a possible subtree below this node */
+
+    if (OriginalOp->Asl.Child)
+    {
+        Op->Asl.Child = TrCreateTargetOperand (OriginalOp->Asl.Child, Op);
+    }
+
+    if (OriginalOp->Asl.Next) /* Null for top-level node */
+    {
+        Op->Asl.Next = TrCreateTargetOperand (OriginalOp->Asl.Next, ParentOp);
+    }
+
+    return (Op);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    TrCreateValuedLeafNode
  *
  * PARAMETERS:  ParseOpcode         - New opcode to be assigned to the node
@@ -620,7 +893,8 @@
 
     case PARSEOP_INTEGER:
 
-        DbgPrint (ASL_PARSE_OUTPUT, "INTEGER");
+        DbgPrint (ASL_PARSE_OUTPUT, "INTEGER->%8.8X%8.8X",
+            ACPI_FORMAT_UINT64 (Value));
         break;
 
     default:
@@ -755,7 +1029,7 @@
     }
     va_end(ap);
 
-    DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
+    DbgPrint (ASL_PARSE_OUTPUT, "\n");
     return (Op);
 }
 
@@ -911,7 +1185,7 @@
 
 
     DbgPrint (ASL_PARSE_OUTPUT,
-        "\nLinkPeerNode: 1=%p (%s), 2=%p (%s)\n\n",
+        "\nLinkPeerNode: 1=%p (%s), 2=%p (%s)\n",
         Op1, Op1 ? UtGetOpName(Op1->Asl.ParseOpcode) : NULL,
         Op2, Op2 ? UtGetOpName(Op2->Asl.ParseOpcode) : NULL);
 
@@ -937,7 +1211,7 @@
     if (Op1 == Op2)
     {
         DbgPrint (ASL_DEBUG_OUTPUT,
-            "\n\n************* Internal error, linking node to itself %p\n\n\n",
+            "\n************* Internal error, linking node to itself %p\n",
             Op1);
         AslError (ASL_WARNING, ASL_MSG_COMPILER_INTERNAL, Op1,
             "Linking node to itself");
@@ -1021,7 +1295,7 @@
     }
     va_end (ap);
 
-    DbgPrint (ASL_PARSE_OUTPUT,"\n\n");
+    DbgPrint (ASL_PARSE_OUTPUT,"\n");
     return (Start);
 }
 
@@ -1048,7 +1322,7 @@
 
 
     DbgPrint (ASL_PARSE_OUTPUT,
-        "\nLinkChildNode: Parent=%p (%s), Child=%p (%s)\n\n",
+        "\nLinkChildNode: Parent=%p (%s), Child=%p (%s)\n",
         Op1, Op1 ? UtGetOpName(Op1->Asl.ParseOpcode): NULL,
         Op2, Op2 ? UtGetOpName(Op2->Asl.ParseOpcode): NULL);
 
--- a/sys/external/bsd/acpica/dist/compiler/aslutils.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslutils.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -503,8 +503,13 @@
 
     if (Gbl_FileType != ASL_INPUT_TYPE_ASCII_DATA)
     {
-        FlPrintFile (FileId,
-            ", %u Optimizations", Gbl_ExceptionCount[ASL_OPTIMIZATION]);
+        FlPrintFile (FileId, ", %u Optimizations",
+            Gbl_ExceptionCount[ASL_OPTIMIZATION]);
+
+        if (TotalFolds)
+        {
+            FlPrintFile (FileId, ", %u Constants Folded", TotalFolds);
+        }
     }
 
     FlPrintFile (FileId, "\n");
@@ -571,20 +576,36 @@
 {
     char                    *Buffer;
     ASL_CACHE_INFO          *Cache;
+    UINT32                  CacheSize = ASL_STRING_CACHE_SIZE;
 
 
-    if (Length > ASL_STRING_CACHE_SIZE)
+    if (Length > CacheSize)
     {
-        Buffer = UtLocalCalloc (Length);
-        return (Buffer);
+        CacheSize = Length;
+
+        if (Gbl_StringCacheList)
+        {
+            Cache = UtLocalCalloc (sizeof (Cache->Next) + CacheSize);
+
+            /* Link new cache buffer just following head of list */
+
+            Cache->Next = Gbl_StringCacheList->Next;
+            Gbl_StringCacheList->Next = Cache;
+
+            /* Leave cache management pointers alone as they pertain to head */
+
+            Gbl_StringCount++;
+            Gbl_StringSize += Length;
+
+            return (Cache->Buffer);
+        }
     }
 
     if ((Gbl_StringCacheNext + Length) >= Gbl_StringCacheLast)
     {
         /* Allocate a new buffer */
 
-        Cache = UtLocalCalloc (sizeof (Cache->Next) +
-            ASL_STRING_CACHE_SIZE);
+        Cache = UtLocalCalloc (sizeof (Cache->Next) + CacheSize);
 
         /* Link new cache buffer to head of list */
 
@@ -594,7 +615,7 @@
         /* Setup cache management pointers */
 
         Gbl_StringCacheNext = Cache->Buffer;
-        Gbl_StringCacheLast = Gbl_StringCacheNext + ASL_STRING_CACHE_SIZE;
+        Gbl_StringCacheLast = Gbl_StringCacheNext + CacheSize;
     }
 
     Gbl_StringCount++;
--- a/sys/external/bsd/acpica/dist/compiler/aslwalks.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslwalks.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -252,6 +252,13 @@
         }
         return (AE_OK);
 
+    case AML_EXTERNAL_OP:
+        /*
+         * Not really a "runtime" opcode since it used by disassembler only.
+         * The parser will find any issues with the operands.
+         */
+        return (AE_OK);
+
     default:
 
         break;
@@ -294,6 +301,13 @@
         {
             RequiredBtypes = AnMapArgTypeToBtype (ArgType);
 
+            if (!ArgOp)
+            {
+                AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, Op,
+                    "Null ArgOp in argument loop");
+                AslAbort ();
+            }
+
             ThisNodeBtype = AnGetBtype (ArgOp);
             if (ThisNodeBtype == ACPI_UINT32_MAX)
             {
@@ -381,9 +395,6 @@
                     break;
 
                 case PARSEOP_DEBUG:
-
-                    break;
-
                 case PARSEOP_REFOF:
                 case PARSEOP_INDEX:
                 default:
--- a/sys/external/bsd/acpica/dist/compiler/aslxref.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslxref.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -832,6 +832,8 @@
         if ((Op->Asl.Parent) &&
            ((Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_REFOF)      ||
             (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_DEREFOF)    ||
+            (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_PACKAGE)    ||
+            (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_VAR_PACKAGE)||
             (Op->Asl.Parent->Asl.ParseOpcode == PARSEOP_OBJECTTYPE)))
         {
             return_ACPI_STATUS (AE_OK);
--- a/sys/external/bsd/acpica/dist/compiler/dtcompile.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtcompile.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __DTCOMPILE_C__
 #define _DECLARE_DT_GLOBALS
 
 #include "aslcompiler.h"
@@ -103,13 +102,18 @@
 
     /* Preprocessor */
 
-    Event = UtBeginEvent ("Preprocess input file");
-    PrDoPreprocess ();
-    UtEndEvent (Event);
+    if (Gbl_PreprocessFlag)
+    {
+        /* Preprocessor */
 
-    if (Gbl_PreprocessOnly)
-    {
-        return (AE_OK);
+        Event = UtBeginEvent ("Preprocess input file");
+        PrDoPreprocess ();
+        UtEndEvent (Event);
+
+        if (Gbl_PreprocessOnly)
+        {
+            return (AE_OK);
+        }
     }
 
     /*
--- a/sys/external/bsd/acpica/dist/compiler/dtfield.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtfield.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __DTFIELD_C__
-
 #include "aslcompiler.h"
 #include "dtcompiler.h"
 
--- a/sys/external/bsd/acpica/dist/compiler/dtparser.y	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtparser.y	Mon Apr 13 17:23:15 2015 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/compiler/dtsubtable.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtsubtable.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __DTSUBTABLE_C__
-
 #include "aslcompiler.h"
 #include "dtcompiler.h"
 
--- a/sys/external/bsd/acpica/dist/compiler/dttable.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dttable.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __DTTABLE_C__
-
 /* Compile all complex data tables */
 
 #include "aslcompiler.h"
@@ -2242,15 +2240,11 @@
     DT_SUBTABLE             *Subtable;
     DT_SUBTABLE             *ParentTable;
     DT_FIELD                **PFieldList = (DT_FIELD **) List;
-    DT_FIELD                *SubtableStart;
-    ACPI_SLIC_HEADER        *SlicHeader;
-    ACPI_DMTABLE_INFO       *InfoTable;
 
 
     while (*PFieldList)
     {
-        SubtableStart = *PFieldList;
-        Status = DtCompileTable (PFieldList, AcpiDmTableInfoSlicHdr,
+        Status = DtCompileTable (PFieldList, AcpiDmTableInfoSlic,
                     &Subtable, TRUE);
         if (ACPI_FAILURE (Status))
         {
@@ -2260,35 +2254,6 @@
         ParentTable = DtPeekSubtable ();
         DtInsertSubtable (ParentTable, Subtable);
         DtPushSubtable (Subtable);
-
-        SlicHeader = ACPI_CAST_PTR (ACPI_SLIC_HEADER, Subtable->Buffer);
-
-        switch (SlicHeader->Type)
-        {
-        case ACPI_SLIC_TYPE_PUBLIC_KEY:
-
-            InfoTable = AcpiDmTableInfoSlic0;
-            break;
-
-        case ACPI_SLIC_TYPE_WINDOWS_MARKER:
-
-            InfoTable = AcpiDmTableInfoSlic1;
-            break;
-
-        default:
-
-            DtFatal (ASL_MSG_UNKNOWN_SUBTABLE, SubtableStart, "SLIC");
-            return (AE_ERROR);
-        }
-
-        Status = DtCompileTable (PFieldList, InfoTable, &Subtable, TRUE);
-        if (ACPI_FAILURE (Status))
-        {
-            return (Status);
-        }
-
-        ParentTable = DtPeekSubtable ();
-        DtInsertSubtable (ParentTable, Subtable);
         DtPopSubtable ();
     }
 
--- a/sys/external/bsd/acpica/dist/compiler/dtutils.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtutils.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __DTUTILS_C__
-
 #include "aslcompiler.h"
 #include "dtcompiler.h"
 #include "actables.h"
@@ -366,6 +364,7 @@
         break;
 
     case ACPI_DMT_BUFFER:
+    case ACPI_DMT_RAW_BUFFER:
     case ACPI_DMT_BUF7:
     case ACPI_DMT_BUF10:
     case ACPI_DMT_BUF16:
@@ -533,7 +532,6 @@
 
     case ACPI_DMT_UINT32:
     case ACPI_DMT_NAME4:
-    case ACPI_DMT_SLIC:
     case ACPI_DMT_SIG:
     case ACPI_DMT_LPIT:
 
@@ -590,6 +588,7 @@
         break;
 
     case ACPI_DMT_BUFFER:
+    case ACPI_DMT_RAW_BUFFER:
 
         Value = DtGetFieldValue (Field);
         if (Value)
--- a/sys/external/bsd/acpica/dist/compiler/prparser.y	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/prparser.y	Mon Apr 13 17:23:15 2015 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/compiler/prutils.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/prutils.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/debugger/dbcmds.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbcmds.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/debugger/dbdisply.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbdisply.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -900,7 +900,7 @@
                     GpeIndex = (i * ACPI_GPE_REGISTER_WIDTH) + j;
                     GpeEventInfo = &GpeBlock->EventInfo[GpeIndex];
 
-                    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+                    if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
                         ACPI_GPE_DISPATCH_NONE)
                     {
                         /* This GPE is not used (no method or handler), ignore it */
@@ -933,7 +933,7 @@
                         AcpiOsPrintf ("RunOnly, ");
                     }
 
-                    switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
+                    switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags))
                     {
                     case ACPI_GPE_DISPATCH_NONE:
 
@@ -944,6 +944,7 @@
 
                         AcpiOsPrintf ("Method");
                         break;
+
                     case ACPI_GPE_DISPATCH_HANDLER:
 
                         AcpiOsPrintf ("Handler");
@@ -961,10 +962,15 @@
                         AcpiOsPrintf ("Implicit Notify on %u devices", Count);
                         break;
 
+                    case ACPI_GPE_DISPATCH_RAW_HANDLER:
+
+                        AcpiOsPrintf ("RawHandler");
+                        break;
+
                     default:
 
                         AcpiOsPrintf ("UNKNOWN: %X",
-                            GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK);
+                            ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags));
                         break;
                     }
 
--- a/sys/external/bsd/acpica/dist/debugger/dbexec.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbexec.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/debugger/dbinput.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbinput.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/debugger/dbmethod.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbmethod.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -394,9 +394,9 @@
 
     /* Now we can disassemble the method */
 
-    AcpiGbl_DbOpt_verbose = FALSE;
+    AcpiGbl_DbOpt_Verbose = FALSE;
     AcpiDmDisassemble (NULL, Op, 0);
-    AcpiGbl_DbOpt_verbose = TRUE;
+    AcpiGbl_DbOpt_Verbose = TRUE;
 
     AcpiPsDeleteParseTree (Op);
 
--- a/sys/external/bsd/acpica/dist/debugger/dbnames.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbnames.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/debugger/dbtest.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbtest.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/debugger/dbutils.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbutils.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c	Mon Apr 13 17:23:15 2015 +0000
@@ -81,7 +81,7 @@
 
 /* Strings for ToPld */
 
-static char *DmPanelList[] =
+static const char *DmPanelList[] =
 {
     "TOP",
     "BOTTOM",
@@ -93,7 +93,7 @@
     NULL
 };
 
-static char *DmVerticalPositionList[] =
+static const char *DmVerticalPositionList[] =
 {
     "UPPER",
     "CENTER",
@@ -101,7 +101,7 @@
     NULL
 };
 
-static char *DmHorizontalPositionList[] =
+static const char *DmHorizontalPositionList[] =
 {
     "LEFT",
     "CENTER",
@@ -109,7 +109,7 @@
     NULL
 };
 
-static char *DmShapeList[] =
+static const char *DmShapeList[] =
 {
     "ROUND",
     "OVAL",
@@ -654,12 +654,12 @@
  *
  ******************************************************************************/
 
-static char *
+static const char *
 AcpiDmFindNameByIndex (
     UINT64                  Index,
-    char                    **List)
+    const char            **List)
 {
-    char                     *Str;
+    const char              *Str;
     UINT32                   i;
 
 
--- a/sys/external/bsd/acpica/dist/disassembler/dmcstyle.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmcstyle.c	Mon Apr 13 17:23:15 2015 +0000
@@ -56,7 +56,7 @@
 
 /* Local prototypes */
 
-static char *
+static const char *
 AcpiDmGetCompoundSymbol (
    UINT16                   AslOpcode);
 
@@ -96,7 +96,7 @@
     ACPI_PARSE_OBJECT       *Op,
     ACPI_OP_WALK_INFO       *Info)
 {
-    char                    *OperatorSymbol = NULL;
+    const char              *OperatorSymbol = NULL;
     ACPI_PARSE_OBJECT       *Child1;
     ACPI_PARSE_OBJECT       *Child2;
     ACPI_PARSE_OBJECT       *Target;
@@ -565,11 +565,11 @@
  *
  ******************************************************************************/
 
-static char *
+static const char *
 AcpiDmGetCompoundSymbol (
    UINT16                   AmlOpcode)
 {
-    char                    *Symbol;
+    const char               *Symbol;
 
 
     switch (AmlOpcode)
--- a/sys/external/bsd/acpica/dist/disassembler/dmresrc.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmresrc.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/disassembler/dmresrcl.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmresrcl.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/disassembler/dmresrcl2.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmresrcl2.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dscontrol.c	Mon Apr 13 17:23:15 2015 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __DSCONTROL_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "amlcode.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dsopcode.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsopcode.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __DSOPCODE_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
@@ -479,7 +477,7 @@
 
     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
         ObjDesc,
-        ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
+        ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
         ObjDesc->Region.Length));
 
     /* Now the address and length are valid for this opregion */
@@ -581,12 +579,12 @@
         return_ACPI_STATUS (AE_NOT_EXIST);
     }
 
-    ObjDesc->Region.Address = (ACPI_PHYSICAL_ADDRESS) ACPI_TO_INTEGER (Table);
+    ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
     ObjDesc->Region.Length = Table->Length;
 
     ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
         ObjDesc,
-        ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
+        ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
         ObjDesc->Region.Length));
 
     /* Now the address and length are valid for this opregion */
--- a/sys/external/bsd/acpica/dist/events/evrgnini.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evrgnini.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __EVRGNINI_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acevents.h"
--- a/sys/external/bsd/acpica/dist/events/evxface.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evxface.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __EVXFACE_C__
 #define EXPORT_ACPI_INTERFACES
 
 #include "acpi.h"
@@ -53,6 +52,21 @@
 #define _COMPONENT          ACPI_EVENTS
         ACPI_MODULE_NAME    ("evxface")
 
+#if (!ACPI_REDUCED_HARDWARE)
+
+/* Local prototypes */
+
+static ACPI_STATUS
+AcpiEvInstallGpeHandler (
+    ACPI_HANDLE             GpeDevice,
+    UINT32                  GpeNumber,
+    UINT32                  Type,
+    BOOLEAN                 IsRawHandler,
+    ACPI_GPE_HANDLER        Address,
+    void                    *Context);
+
+#endif
+
 
 /*******************************************************************************
  *
@@ -823,27 +837,31 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiInstallGpeHandler
+ * FUNCTION:    AcpiEvInstallGpeHandler
  *
  * PARAMETERS:  GpeDevice       - Namespace node for the GPE (NULL for FADT
  *                                defined GPEs)
  *              GpeNumber       - The GPE number within the GPE block
  *              Type            - Whether this GPE should be treated as an
  *                                edge- or level-triggered interrupt.
+ *              IsRawHandler    - Whether this GPE should be handled using
+ *                                the special GPE handler mode.
  *              Address         - Address of the handler
  *              Context         - Value passed to the handler on each GPE
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Install a handler for a General Purpose Event.
+ * DESCRIPTION: Internal function to install a handler for a General Purpose
+ *              Event.
  *
  ******************************************************************************/
 
-ACPI_STATUS
-AcpiInstallGpeHandler (
+static ACPI_STATUS
+AcpiEvInstallGpeHandler (
     ACPI_HANDLE             GpeDevice,
     UINT32                  GpeNumber,
     UINT32                  Type,
+    BOOLEAN                 IsRawHandler,
     ACPI_GPE_HANDLER        Address,
     void                    *Context)
 {
@@ -853,7 +871,7 @@
     ACPI_CPU_FLAGS          Flags;
 
 
-    ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler);
+    ACPI_FUNCTION_TRACE (EvInstallGpeHandler);
 
 
     /* Parameter validation */
@@ -891,8 +909,10 @@
 
     /* Make sure that there isn't a handler there already */
 
-    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
-            ACPI_GPE_DISPATCH_HANDLER)
+    if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
+            ACPI_GPE_DISPATCH_HANDLER) ||
+        (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
+            ACPI_GPE_DISPATCH_RAW_HANDLER))
     {
         Status = AE_ALREADY_EXISTS;
         goto FreeAndExit;
@@ -909,8 +929,10 @@
      * automatically during initialization, in which case it has to be
      * disabled now to avoid spurious execution of the handler.
      */
-    if (((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) ||
-         (Handler->OriginalFlags & ACPI_GPE_DISPATCH_NOTIFY)) &&
+    if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
+            ACPI_GPE_DISPATCH_METHOD) ||
+         (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
+            ACPI_GPE_DISPATCH_NOTIFY)) &&
         GpeEventInfo->RuntimeCount)
     {
         Handler->OriginallyEnabled = TRUE;
@@ -931,7 +953,8 @@
     /* Setup up dispatch flags to indicate handler (vs. method/notify) */
 
     GpeEventInfo->Flags &= ~(ACPI_GPE_XRUPT_TYPE_MASK | ACPI_GPE_DISPATCH_MASK);
-    GpeEventInfo->Flags |= (UINT8) (Type | ACPI_GPE_DISPATCH_HANDLER);
+    GpeEventInfo->Flags |= (UINT8) (Type | (IsRawHandler ?
+        ACPI_GPE_DISPATCH_RAW_HANDLER : ACPI_GPE_DISPATCH_HANDLER));
 
     AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
 
@@ -946,11 +969,91 @@
     goto UnlockAndExit;
 }
 
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiInstallGpeHandler
+ *
+ * PARAMETERS:  GpeDevice       - Namespace node for the GPE (NULL for FADT
+ *                                defined GPEs)
+ *              GpeNumber       - The GPE number within the GPE block
+ *              Type            - Whether this GPE should be treated as an
+ *                                edge- or level-triggered interrupt.
+ *              Address         - Address of the handler
+ *              Context         - Value passed to the handler on each GPE
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Install a handler for a General Purpose Event.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallGpeHandler (
+    ACPI_HANDLE             GpeDevice,
+    UINT32                  GpeNumber,
+    UINT32                  Type,
+    ACPI_GPE_HANDLER        Address,
+    void                    *Context)
+{
+    ACPI_STATUS             Status;
+
+
+    ACPI_FUNCTION_TRACE (AcpiInstallGpeHandler);
+
+
+    Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type, FALSE,
+                Address, Context);
+
+    return_ACPI_STATUS (Status);
+}
+
 ACPI_EXPORT_SYMBOL (AcpiInstallGpeHandler)
 
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiInstallGpeRawHandler
+ *
+ * PARAMETERS:  GpeDevice       - Namespace node for the GPE (NULL for FADT
+ *                                defined GPEs)
+ *              GpeNumber       - The GPE number within the GPE block
+ *              Type            - Whether this GPE should be treated as an
+ *                                edge- or level-triggered interrupt.
+ *              Address         - Address of the handler
+ *              Context         - Value passed to the handler on each GPE
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Install a handler for a General Purpose Event.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiInstallGpeRawHandler (
+    ACPI_HANDLE             GpeDevice,
+    UINT32                  GpeNumber,
+    UINT32                  Type,
+    ACPI_GPE_HANDLER        Address,
+    void                    *Context)
+{
+    ACPI_STATUS             Status;
+
+
+    ACPI_FUNCTION_TRACE (AcpiInstallGpeRawHandler);
+
+
+    Status = AcpiEvInstallGpeHandler (GpeDevice, GpeNumber, Type, TRUE,
+                Address, Context);
+
+    return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiInstallGpeRawHandler)
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiRemoveGpeHandler
  *
  * PARAMETERS:  GpeDevice       - Namespace node for the GPE (NULL for FADT
@@ -1005,8 +1108,10 @@
 
     /* Make sure that a handler is indeed installed */
 
-    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) !=
-            ACPI_GPE_DISPATCH_HANDLER)
+    if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
+            ACPI_GPE_DISPATCH_HANDLER) &&
+        (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
+            ACPI_GPE_DISPATCH_RAW_HANDLER))
     {
         Status = AE_NOT_EXIST;
         goto UnlockAndExit;
@@ -1023,6 +1128,7 @@
     /* Remove the handler */
 
     Handler = GpeEventInfo->Dispatch.Handler;
+    GpeEventInfo->Dispatch.Handler = NULL;
 
     /* Restore Method node (if any), set dispatch flags */
 
@@ -1036,8 +1142,10 @@
      * enabled, it should be enabled at this point to restore the
      * post-initialization configuration.
      */
-    if (((Handler->OriginalFlags & ACPI_GPE_DISPATCH_METHOD) ||
-         (Handler->OriginalFlags & ACPI_GPE_DISPATCH_NOTIFY)) &&
+    if (((ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
+            ACPI_GPE_DISPATCH_METHOD) ||
+         (ACPI_GPE_DISPATCH_TYPE (Handler->OriginalFlags) ==
+            ACPI_GPE_DISPATCH_NOTIFY)) &&
         Handler->OriginallyEnabled)
     {
         (void) AcpiEvAddGpeReference (GpeEventInfo);
--- a/sys/external/bsd/acpica/dist/executer/exconfig.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exconfig.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __EXCONFIG_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exdebug.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exdebug.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __EXDEBUG_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exdump.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exdump.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __EXDUMP_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
@@ -786,7 +784,7 @@
         else
         {
             AcpiOsPrintf (" base %8.8X%8.8X Length %X\n",
-                ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
+                ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
                 ObjDesc->Region.Length);
         }
         break;
--- a/sys/external/bsd/acpica/dist/hardware/hwesleep.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/hardware/hwesleep.c	Mon Apr 13 17:23:15 2015 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/hardware/hwsleep.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/hardware/hwsleep.c	Mon Apr 13 17:23:15 2015 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/hardware/hwxfsleep.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/hardware/hwxfsleep.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/include/acapps.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acapps.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -52,7 +52,7 @@
 /* Common info for tool signons */
 
 #define ACPICA_NAME                 "Intel ACPI Component Architecture"
-#define ACPICA_COPYRIGHT            "Copyright (c) 2000 - 2014 Intel Corporation"
+#define ACPICA_COPYRIGHT            "Copyright (c) 2000 - 2015 Intel Corporation"
 
 #if ACPI_MACHINE_WIDTH == 64
 #define ACPI_WIDTH          "-64"
@@ -74,15 +74,15 @@
 #endif
 
 #define ACPI_COMMON_SIGNON(UtilityName) \
-    "\n%s\n%s version %8.8X%s [%s]\n%s\n\n", \
+    "\n%s\n%s version %8.8X%s\n%s\n\n", \
     ACPICA_NAME, \
-    UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, ACPI_DATE, \
+    UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \
     ACPICA_COPYRIGHT
 
 #define ACPI_COMMON_HEADER(UtilityName, Prefix) \
-    "%s%s\n%s%s version %8.8X%s [%s]\n%s%s\n%s\n", \
+    "%s%s\n%s%s version %8.8X%s\n%s%s\n%s\n", \
     Prefix, ACPICA_NAME, \
-    Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, ACPI_DATE, \
+    Prefix, UtilityName, ((UINT32) ACPI_CA_VERSION), ACPI_WIDTH, \
     Prefix, ACPICA_COPYRIGHT, \
     Prefix
 
--- a/sys/external/bsd/acpica/dist/include/acdebug.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acdebug.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -77,7 +77,7 @@
 
 
 #define PARAM_LIST(pl)                  pl
-#define DBTEST_OUTPUT_LEVEL(lvl)        if (AcpiGbl_DbOpt_verbose)
+#define DBTEST_OUTPUT_LEVEL(lvl)        if (AcpiGbl_DbOpt_Verbose)
 #define VERBOSE_PRINT(fp)               DBTEST_OUTPUT_LEVEL(lvl) {\
                                             AcpiOsPrintf PARAM_LIST(fp);}
 
--- a/sys/external/bsd/acpica/dist/include/acdisasm.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acdisasm.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -129,6 +129,7 @@
     /* Types used only for the Data Table Compiler */
 
     ACPI_DMT_BUFFER,
+    ACPI_DMT_RAW_BUFFER,  /* Large, multiple line buffer */
     ACPI_DMT_DEVICE_PATH,
     ACPI_DMT_LABEL,
     ACPI_DMT_PCI_PATH,
@@ -351,9 +352,7 @@
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt0[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoS3pt1[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSbst[];
-extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlicHdr[];
-extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlic0[];
-extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlic1[];
+extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlic[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSlit[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSpcr[];
 extern ACPI_DMTABLE_INFO        AcpiDmTableInfoSpmi[];
@@ -422,6 +421,15 @@
  * dmtbdump
  */
 void
+AcpiDmDumpBuffer (
+    void                    *Table,
+    UINT32                  BufferOffset,
+    UINT32                  Length,
+    UINT32                  AbsoluteOffset,
+    char                    *Header,
+    BOOLEAN                 MultiLine);
+
+void
 AcpiDmDumpAsf (
     ACPI_TABLE_HEADER       *Table);
 
@@ -979,11 +987,27 @@
 
 
 /*
+ * dmcstyle
+ */
+BOOLEAN
+AcpiDmCheckForSymbolicOpcode (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_OP_WALK_INFO       *Info);
+
+void
+AcpiDmCloseOperator (
+    ACPI_PARSE_OBJECT       *Op);
+
+
+/*
  * acdisasm
  */
 void
 AdDisassemblerHeader (
-    char                    *Filename);
+    char                    *Filename,
+    UINT8                   TableType);
 
+#define ACPI_IS_AML_TABLE   0
+#define ACPI_IS_DATA_TABLE  1
 
 #endif  /* __ACDISASM_H__ */
--- a/sys/external/bsd/acpica/dist/include/acexcep.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acexcep.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/include/acglobal.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acglobal.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -309,9 +309,11 @@
 
 ACPI_INIT_GLOBAL (UINT8,                AcpiGbl_NoResourceDisassembly, FALSE);
 ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_IgnoreNoopOperator, FALSE);
+ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_CstyleDisassembly, TRUE);
+ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_ForceAmlDisassembly, FALSE);
 
-ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DbOpt_disasm);
-ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DbOpt_verbose);
+ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DbOpt_Disasm);
+ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DbOpt_Verbose);
 ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_NumExternalMethods);
 ACPI_GLOBAL (UINT32,                    AcpiGbl_ResolvedExternalMethods);
 ACPI_GLOBAL (ACPI_EXTERNAL_LIST *,      AcpiGbl_ExternalList);
@@ -324,9 +326,7 @@
 ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_AbortMethod, FALSE);
 ACPI_INIT_GLOBAL (BOOLEAN,              AcpiGbl_MethodExecuting, FALSE);
 
-ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DbOpt_tables);
-ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DbOpt_stats);
-ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DbOpt_ini_methods);
+ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DbOpt_NoIniMethods);
 ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DbOpt_NoRegionSupport);
 ACPI_GLOBAL (BOOLEAN,                   AcpiGbl_DbOutputToFile);
 ACPI_GLOBAL (char *,                    AcpiGbl_DbBuffer);
--- a/sys/external/bsd/acpica/dist/include/acinterp.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acinterp.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/include/aclocal.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/aclocal.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,7 +54,7 @@
 
 /* Total number of aml opcodes defined */
 
-#define AML_NUM_OPCODES                 0x81
+#define AML_NUM_OPCODES                 0x82
 
 
 /* Forward declarations */
@@ -519,6 +519,7 @@
     UINT16                          BaseGpeNumber;  /* Base GPE number for this register */
     UINT8                           EnableForWake;  /* GPEs to keep enabled when sleeping */
     UINT8                           EnableForRun;   /* GPEs to keep enabled when running */
+    UINT8                           EnableMask;     /* Current mask of enabled GPEs */
 
 } ACPI_GPE_REGISTER_INFO;
 
@@ -868,6 +869,7 @@
     ACPI_DISASM_ONLY_MEMBERS (\
     UINT8                           DisasmFlags;    /* Used during AML disassembly */\
     UINT8                           DisasmOpcode;   /* Subtype used for disassembly */\
+    const char                      *OperatorSymbol;/* Used for C-style operator name strings */\
     char                            AmlOpName[16])  /* Op name (debug only) */
 
 
@@ -990,6 +992,8 @@
 #define ACPI_PARSEOP_EMPTY_TERMLIST     0x04
 #define ACPI_PARSEOP_PREDEF_CHECKED     0x08
 #define ACPI_PARSEOP_SPECIAL            0x10
+#define ACPI_PARSEOP_COMPOUND           0x20
+#define ACPI_PARSEOP_ASSIGNMENT         0x40
 
 
 /*****************************************************************************
--- a/sys/external/bsd/acpica/dist/include/acmacros.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acmacros.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -64,23 +64,12 @@
 #define ACPI_SET64(ptr, val)            (*ACPI_CAST64 (ptr) = (UINT64) (val))
 
 /*
- * printf() format helpers. These macros are workarounds for the difficulties
+ * printf() format helper. This macros is a workaround for the difficulties
  * with emitting 64-bit integers and 64-bit pointers with the same code
  * for both 32-bit and 64-bit hosts.
  */
 #define ACPI_FORMAT_UINT64(i)           ACPI_HIDWORD(i), ACPI_LODWORD(i)
 
-#if ACPI_MACHINE_WIDTH == 64
-#define ACPI_FORMAT_NATIVE_UINT(i)      ACPI_FORMAT_UINT64(i)
-#define ACPI_FORMAT_TO_UINT(i)          ACPI_FORMAT_UINT64(i)
-#define ACPI_PRINTF_UINT                 "0x%8.8X%8.8X"
-
-#else
-#define ACPI_FORMAT_NATIVE_UINT(i)      0, (UINT32) (i)
-#define ACPI_FORMAT_TO_UINT(i)          (UINT32) (i)
-#define ACPI_PRINTF_UINT                 "0x%8.8X"
-#endif
-
 
 /*
  * Macros for moving data around to/from buffers that are possibly unaligned.
--- a/sys/external/bsd/acpica/dist/include/acnamesp.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acnamesp.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/include/acpiosxf.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acpiosxf.h	Mon Apr 13 17:23:15 2015 +0000
@@ -7,7 +7,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/include/acpixf.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acpixf.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -46,7 +46,7 @@
 
 /* Current ACPICA subsystem version in YYYYMMDD format */
 
-#define ACPI_CA_VERSION                 0x20140926
+#define ACPI_CA_VERSION                 0x20150410
 
 #include "acconfig.h"
 #include "actypes.h"
@@ -503,7 +503,7 @@
 ACPI_EXTERNAL_RETURN_STATUS (
 ACPI_STATUS
 AcpiFindRootPointer (
-    ACPI_SIZE               *RsdpAddress))
+    ACPI_PHYSICAL_ADDRESS   *RsdpAddress))
 
 ACPI_EXTERNAL_RETURN_STATUS (
 ACPI_STATUS
@@ -704,6 +704,15 @@
 
 ACPI_HW_DEPENDENT_RETURN_STATUS (
 ACPI_STATUS
+AcpiInstallGpeRawHandler (
+    ACPI_HANDLE             GpeDevice,
+    UINT32                  GpeNumber,
+    UINT32                  Type,
+    ACPI_GPE_HANDLER        Address,
+    void                    *Context))
+
+ACPI_HW_DEPENDENT_RETURN_STATUS (
+ACPI_STATUS
 AcpiRemoveGpeHandler (
     ACPI_HANDLE             GpeDevice,
     UINT32                  GpeNumber,
@@ -888,6 +897,11 @@
 
 ACPI_HW_DEPENDENT_RETURN_STATUS (
 ACPI_STATUS
+AcpiEnableAllWakeupGpes (
+    void))
+
+ACPI_HW_DEPENDENT_RETURN_STATUS (
+ACPI_STATUS
 AcpiGetGpeDevice (
     UINT32                  GpeIndex,
     ACPI_HANDLE             *GpeDevice))
--- a/sys/external/bsd/acpica/dist/include/acresrc.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acresrc.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -352,8 +352,9 @@
 
 
 /*
- * rsdump
+ * rsdump - Debugger support
  */
+#ifdef ACPI_DEBUGGER
 void
 AcpiRsDumpResourceList (
     ACPI_RESOURCE           *Resource);
@@ -361,6 +362,7 @@
 void
 AcpiRsDumpIrqList (
     UINT8                   *RouteTable);
+#endif
 
 
 /*
--- a/sys/external/bsd/acpica/dist/include/actables.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/actables.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -70,8 +70,9 @@
  * tbdata - table data structure management
  */
 ACPI_STATUS
-AcpiTbGetNextRootIndex (
-    UINT32                  *TableIndex);
+AcpiTbGetNextTableDescriptor (
+    UINT32                  *TableIndex,
+    ACPI_TABLE_DESC         **TableDesc);
 
 void
 AcpiTbInitTableDescriptor (
@@ -173,14 +174,6 @@
     BOOLEAN                 Override,
     UINT32                  *TableIndex);
 
-ACPI_STATUS
-AcpiTbStoreTable (
-    ACPI_PHYSICAL_ADDRESS   Address,
-    ACPI_TABLE_HEADER       *Table,
-    UINT32                  Length,
-    UINT8                   Flags,
-    UINT32                  *TableIndex);
-
 void
 AcpiTbUninstallTable (
     ACPI_TABLE_DESC        *TableDesc);
--- a/sys/external/bsd/acpica/dist/include/actbl1.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/actbl1.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/include/actypes.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/actypes.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -201,9 +201,29 @@
 
 typedef INT32                           ACPI_NATIVE_INT;
 typedef UINT32                          ACPI_SIZE;
+
+#ifdef ACPI_32BIT_PHYSICAL_ADDRESS
+
+/*
+ * OSPMs can define this to shrink the size of the structures for 32-bit
+ * none PAE environment. ASL compiler may always define this to generate
+ * 32-bit OSPM compliant tables.
+ */
 typedef UINT32                          ACPI_IO_ADDRESS;
 typedef UINT32                          ACPI_PHYSICAL_ADDRESS;
 
+#else /* ACPI_32BIT_PHYSICAL_ADDRESS */
+
+/*
+ * It is reported that, after some calculations, the physical addresses can
+ * wrap over the 32-bit boundary on 32-bit PAE environment.
+ * https://bugzilla.kernel.org/show_bug.cgi?id=87971
+ */
+typedef UINT64                          ACPI_IO_ADDRESS;
+typedef UINT64                          ACPI_PHYSICAL_ADDRESS;
+
+#endif /* ACPI_32BIT_PHYSICAL_ADDRESS */
+
 #define ACPI_MAX_PTR                    ACPI_UINT32_MAX
 #define ACPI_SIZE_MAX                   ACPI_UINT32_MAX
 
@@ -721,34 +741,41 @@
  * The encoding of ACPI_EVENT_STATUS is illustrated below.
  * Note that a set bit (1) indicates the property is TRUE
  * (e.g. if bit 0 is set then the event is enabled).
- * +-------------+-+-+-+-+
- * |   Bits 31:4 |3|2|1|0|
- * +-------------+-+-+-+-+
- *          |     | | | |
- *          |     | | | +- Enabled?
- *          |     | | +--- Enabled for wake?
- *          |     | +----- Set?
- *          |     +------- Has a handler?
- *          +------------- <Reserved>
+ * +-------------+-+-+-+-+-+
+ * |   Bits 31:5 |4|3|2|1|0|
+ * +-------------+-+-+-+-+-+
+ *          |     | | | | |
+ *          |     | | | | +- Enabled?
+ *          |     | | | +--- Enabled for wake?
+ *          |     | | +----- Status bit set?
+ *          |     | +------- Enable bit set?
+ *          |     +--------- Has a handler?
+ *          +--------------- <Reserved>
  */
 typedef UINT32                          ACPI_EVENT_STATUS;
 
 #define ACPI_EVENT_FLAG_DISABLED        (ACPI_EVENT_STATUS) 0x00
 #define ACPI_EVENT_FLAG_ENABLED         (ACPI_EVENT_STATUS) 0x01
 #define ACPI_EVENT_FLAG_WAKE_ENABLED    (ACPI_EVENT_STATUS) 0x02
-#define ACPI_EVENT_FLAG_SET             (ACPI_EVENT_STATUS) 0x04
-#define ACPI_EVENT_FLAG_HAS_HANDLER     (ACPI_EVENT_STATUS) 0x08
+#define ACPI_EVENT_FLAG_STATUS_SET      (ACPI_EVENT_STATUS) 0x04
+#define ACPI_EVENT_FLAG_ENABLE_SET      (ACPI_EVENT_STATUS) 0x08
+#define ACPI_EVENT_FLAG_HAS_HANDLER     (ACPI_EVENT_STATUS) 0x10
+#define ACPI_EVENT_FLAG_SET             ACPI_EVENT_FLAG_STATUS_SET
 
 /* Actions for AcpiSetGpe, AcpiGpeWakeup, AcpiHwLowSetGpe */
 
 #define ACPI_GPE_ENABLE                 0
 #define ACPI_GPE_DISABLE                1
 #define ACPI_GPE_CONDITIONAL_ENABLE     2
+#define ACPI_GPE_SAVE_MASK              4
+
+#define ACPI_GPE_ENABLE_SAVE            (ACPI_GPE_ENABLE | ACPI_GPE_SAVE_MASK)
+#define ACPI_GPE_DISABLE_SAVE           (ACPI_GPE_DISABLE | ACPI_GPE_SAVE_MASK)
 
 /*
  * GPE info flags - Per GPE
  * +-------+-+-+---+
- * |  7:4  |3|2|1:0|
+ * |  7:5  |4|3|2:0|
  * +-------+-+-+---+
  *     |    | |  |
  *     |    | |  +-- Type of dispatch:to method, handler, notify, or none
@@ -760,13 +787,15 @@
 #define ACPI_GPE_DISPATCH_METHOD        (UINT8) 0x01
 #define ACPI_GPE_DISPATCH_HANDLER       (UINT8) 0x02
 #define ACPI_GPE_DISPATCH_NOTIFY        (UINT8) 0x03
-#define ACPI_GPE_DISPATCH_MASK          (UINT8) 0x03
+#define ACPI_GPE_DISPATCH_RAW_HANDLER   (UINT8) 0x04
+#define ACPI_GPE_DISPATCH_MASK          (UINT8) 0x07
+#define ACPI_GPE_DISPATCH_TYPE(flags)   ((UINT8) ((flags) & ACPI_GPE_DISPATCH_MASK))
 
-#define ACPI_GPE_LEVEL_TRIGGERED        (UINT8) 0x04
+#define ACPI_GPE_LEVEL_TRIGGERED        (UINT8) 0x08
 #define ACPI_GPE_EDGE_TRIGGERED         (UINT8) 0x00
-#define ACPI_GPE_XRUPT_TYPE_MASK        (UINT8) 0x04
+#define ACPI_GPE_XRUPT_TYPE_MASK        (UINT8) 0x08
 
-#define ACPI_GPE_CAN_WAKE               (UINT8) 0x08
+#define ACPI_GPE_CAN_WAKE               (UINT8) 0x10
 
 /*
  * Flags for GPE and Lock interfaces
@@ -1339,6 +1368,7 @@
 #define ACPI_OSI_WIN_VISTA_SP2          0x0A
 #define ACPI_OSI_WIN_7                  0x0B
 #define ACPI_OSI_WIN_8                  0x0C
+#define ACPI_OSI_WIN_10                 0x0D
 
 
 /* Definitions of file IO */
--- a/sys/external/bsd/acpica/dist/include/acutils.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/acutils.h	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -723,6 +723,12 @@
 AcpiUtMatchPredefinedMethod (
     char                        *Name);
 
+void
+AcpiUtGetExpectedReturnTypes (
+    char                    *Buffer,
+    UINT32                  ExpectedBtypes);
+
+#if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
 const ACPI_PREDEFINED_INFO *
 AcpiUtMatchResourceName (
     char                        *Name);
@@ -733,15 +739,11 @@
     const ACPI_PREDEFINED_INFO  *ThisName,
     BOOLEAN                     MultiLine);
 
-void
-AcpiUtGetExpectedReturnTypes (
-    char                    *Buffer,
-    UINT32                  ExpectedBtypes);
-
 UINT32
 AcpiUtGetResourceBitWidth (
     char                    *Buffer,
     UINT16                  Types);
+#endif
 
 
 /*
@@ -782,13 +784,6 @@
     UINT16                  Action,
     ACPI_GENERIC_STATE      **StateList);
 
-ACPI_STATUS
-AcpiUtCreatePkgStateAndPush (
-    void                    *InternalObject,
-    void                    *ExternalObject,
-    UINT16                  Index,
-    ACPI_GENERIC_STATE      **StateList);
-
 ACPI_GENERIC_STATE *
 AcpiUtCreateControlState (
     void);
@@ -827,9 +822,11 @@
 AcpiUtIsPciRootBridge (
     char                    *Id);
 
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
 BOOLEAN
 AcpiUtIsAmlTable (
     ACPI_TABLE_HEADER       *Table);
+#endif
 
 ACPI_STATUS
 AcpiUtWalkPackageTree (
@@ -918,6 +915,7 @@
 AcpiUtStrupr (
     char                    *SrcString);
 
+#ifdef ACPI_ASL_COMPILER
 void
 AcpiUtStrlwr (
     char                    *SrcString);
@@ -926,6 +924,7 @@
 AcpiUtStricmp (
     char                    *String1,
     char                    *String2);
+#endif
 
 ACPI_STATUS
 AcpiUtStrtoul64 (
@@ -938,9 +937,11 @@
     char                    *String,
     UINT16                  MaxLength);
 
+#if defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP
 void
 UtConvertBackslashes (
     char                    *Pathname);
+#endif
 
 BOOLEAN
 AcpiUtValidAcpiName (
@@ -1187,9 +1188,11 @@
 /*
  * utuuid -- UUID support functions
  */
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP|| defined ACPI_DISASSEMBLER)
 void
 AcpiUtConvertStringToUuid (
     const char              *InString,
     UINT8                   *UuidBuffer);
+#endif
 
 #endif /* _ACUTILS_H */
--- a/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/include/platform/acnetbsd.h	Mon Apr 13 17:23:15 2015 +0000
@@ -1,12 +1,12 @@
 /******************************************************************************
  *
  * Name: acnetbsd.h - OS specific defines, etc.
- *       $Revision: 1.11 $
+ *       $Revision: 1.12 $
  *
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -49,9 +49,9 @@
 
 #include "acgcc.h"
 
-#define ACPI_UINTPTR_T		uintptr_t
+#define ACPI_UINTPTR_T          uintptr_t
 #define ACPI_USE_LOCAL_CACHE
-#define ACPI_CAST_PTHREAD_T(x)    ((ACPI_THREAD_ID) ACPI_TO_INTEGER (x))
+#define ACPI_CAST_PTHREAD_T(x)  ((ACPI_THREAD_ID) ACPI_TO_INTEGER (x))
 
 #ifdef _LP64
 #define ACPI_MACHINE_WIDTH      64
@@ -127,10 +127,10 @@
 
 #define __cli()
 #define __sti()
+#define __cdecl
 
 /* XXX */
 #define __inline inline
-
 #endif /* defined(_KERNEL) || defined(_STANDALONE) */
 
 /* Always use NetBSD code over our local versions */
--- a/sys/external/bsd/acpica/dist/namespace/nsaccess.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nsaccess.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __NSACCESS_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "amlcode.h"
--- a/sys/external/bsd/acpica/dist/namespace/nsdump.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nsdump.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __NSDUMP_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acnamesp.h"
@@ -315,9 +313,9 @@
         {
         case ACPI_TYPE_PROCESSOR:
 
-            AcpiOsPrintf ("ID %02X Len %02X Addr %p\n",
+            AcpiOsPrintf ("ID %02X Len %02X Addr %8.8X%8.8X\n",
                 ObjDesc->Processor.ProcId, ObjDesc->Processor.Length,
-                ACPI_CAST_PTR (void, ObjDesc->Processor.Address));
+                ACPI_FORMAT_UINT64 (ObjDesc->Processor.Address));
             break;
 
         case ACPI_TYPE_DEVICE:
@@ -390,7 +388,7 @@
             if (ObjDesc->Region.Flags & AOPOBJ_DATA_VALID)
             {
                 AcpiOsPrintf (" Addr %8.8X%8.8X Len %.4X\n",
-                    ACPI_FORMAT_NATIVE_UINT (ObjDesc->Region.Address),
+                    ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
                     ObjDesc->Region.Length);
             }
             else
--- a/sys/external/bsd/acpica/dist/namespace/nseval.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nseval.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __NSEVAL_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
--- a/sys/external/bsd/acpica/dist/namespace/nsinit.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nsinit.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __NSXFINIT_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acnamesp.h"
--- a/sys/external/bsd/acpica/dist/namespace/nsrepair2.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nsrepair2.c	Mon Apr 13 17:23:15 2015 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,8 +42,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __NSREPAIR2_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acnamesp.h"
--- a/sys/external/bsd/acpica/dist/namespace/nsxfeval.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nsxfeval.c	Mon Apr 13 17:23:15 2015 +0000
@@ -6,7 +6,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __NSXFEVAL_C__
 #define EXPORT_ACPI_INTERFACES
 
 #include "acpi.h"
--- a/sys/external/bsd/acpica/dist/namespace/nsxfname.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/namespace/nsxfname.c	Mon Apr 13 17:23:15 2015 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,7 +42,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __NSXFNAME_C__
 #define EXPORT_ACPI_INTERFACES
 
 #include "acpi.h"
--- a/sys/external/bsd/acpica/dist/os_specific/service_layers/osfreebsdtbl.c	Mon Apr 13 17:21:01 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,898 +0,0 @@
-/******************************************************************************
- *
- * Module Name: osfreebsdtbl - FreeBSD OSL for obtaining ACPI tables
- *
- *****************************************************************************/
-
-/*
- * Copyright (C) 2000 - 2014, 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 "acpidump.h"
-
-#include <kenv.h>
-#include <unistd.h>
-#include <sys/param.h>
-#include <sys/sysctl.h>
-
-
-#define _COMPONENT          ACPI_OS_SERVICES
-        ACPI_MODULE_NAME    ("osfreebsdtbl")
-
-
-/* Local prototypes */
-
-static ACPI_STATUS
-OslTableInitialize (
-    void);
-
-static ACPI_STATUS
-OslMapTable (
-    ACPI_SIZE               Address,
-    char                    *Signature,
-    ACPI_TABLE_HEADER       **Table);
-
-static ACPI_STATUS
-OslAddTablesToList (
-    void);
-
-static ACPI_STATUS
-OslGetTableViaRoot (
-    char                    *Signature,
-    UINT32                  Instance,
-    ACPI_TABLE_HEADER       **Table,
-    ACPI_PHYSICAL_ADDRESS   *Address);
-
-
-/* Hints for RSDP */
-
-#define SYSTEM_KENV         "hint.acpi.0.rsdp"
-#define SYSTEM_SYSCTL       "machdep.acpi_root"
-
-/* Initialization flags */
-
-UINT8                   Gbl_TableListInitialized = FALSE;
-UINT8                   Gbl_MainTableObtained = FALSE;
-
-/* Local copies of main ACPI tables */
-
-ACPI_TABLE_RSDP         Gbl_Rsdp;
-ACPI_TABLE_FADT         *Gbl_Fadt;
-ACPI_TABLE_RSDT         *Gbl_Rsdt;
-ACPI_TABLE_XSDT         *Gbl_Xsdt;
-
-/* Fadt address */
-
-ACPI_PHYSICAL_ADDRESS   Gbl_FadtAddress;
-
-/* Revision of RSD PTR */
-
-UINT8                   Gbl_Revision;
-
-/* List of information about obtained ACPI tables */
-
-typedef struct          table_info
-{
-    struct table_info       *Next;
-    char                    Signature[4];
-    UINT32                  Instance;
-    ACPI_PHYSICAL_ADDRESS   Address;
-
-} OSL_TABLE_INFO;
-
-OSL_TABLE_INFO          *Gbl_TableListHead = NULL;
-
-
-/******************************************************************************
- *
- * FUNCTION:    AcpiOsGetTableByAddress
- *
- * PARAMETERS:  Address         - Physical address of the ACPI table
- *              Table           - Where a pointer to the table is returned
- *
- * RETURN:      Status; Table buffer is returned if AE_OK.
- *              AE_NOT_FOUND: A valid table was not found at the address
- *
- * DESCRIPTION: Get an ACPI table via a physical memory address.
- *
- *****************************************************************************/
-
-ACPI_STATUS
-AcpiOsGetTableByAddress (
-    ACPI_PHYSICAL_ADDRESS   Address,
-    ACPI_TABLE_HEADER       **Table)
-{
-    ACPI_TABLE_HEADER       *MappedTable;
-    ACPI_TABLE_HEADER       *LocalTable;
-    ACPI_STATUS             Status;
-
-
-    /* Validate the input physical address to avoid program crash */
-
-    if (Address < ACPI_HI_RSDP_WINDOW_BASE)
-    {
-        fprintf (stderr, "Invalid table address: 0x%8.8X%8.8X\n",
-            ACPI_FORMAT_UINT64 (Address));
-        return (AE_BAD_ADDRESS);
-    }
-
-    /* Map the table and validate it */
-
-    Status = OslMapTable (Address, NULL, &MappedTable);
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
-    /* Copy table to local buffer and return it */
-
-    LocalTable = calloc (1, MappedTable->Length);
-    if (!LocalTable)
-    {
-        AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-        return (AE_NO_MEMORY);
-    }
-
-    ACPI_MEMCPY (LocalTable, MappedTable, MappedTable->Length);
-    AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-
-    *Table = LocalTable;
-    return (AE_OK);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION:    AcpiOsGetTableByName
- *
- * PARAMETERS:  Signature       - ACPI Signature for desired table. Must be
- *                                a null terminated 4-character string.
- *              Instance        - Multiple table support for SSDT/UEFI (0...n)
- *                                Must be 0 for other tables.
- *              Table           - Where a pointer to the table is returned
- *              Address         - Where the table physical address is returned
- *
- * RETURN:      Status; Table buffer and physical address returned if AE_OK.
- *              AE_LIMIT: Instance is beyond valid limit
- *              AE_NOT_FOUND: A table with the signature was not found
- *
- * NOTE:        Assumes the input signature is uppercase.
- *
- *****************************************************************************/
-
-ACPI_STATUS
-AcpiOsGetTableByName (
-    char                    *Signature,
-    UINT32                  Instance,
-    ACPI_TABLE_HEADER       **Table,
-    ACPI_PHYSICAL_ADDRESS   *Address)
-{
-    ACPI_STATUS             Status;
-
-
-    /* Instance is only valid for SSDT/UEFI tables */
-
-    if (Instance &&
-        !ACPI_COMPARE_NAME (Signature, ACPI_SIG_SSDT) &&
-        !ACPI_COMPARE_NAME (Signature, ACPI_SIG_UEFI))
-    {
-        return (AE_LIMIT);
-    }
-
-    /* Initialize main tables */
-
-    Status = OslTableInitialize ();
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
-    /*
-     * If one of the main ACPI tables was requested (RSDT/XSDT/FADT),
-     * simply return it immediately.
-     */
-    if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_XSDT))
-    {
-        if (!Gbl_Revision)
-        {
-            return (AE_NOT_FOUND);
-        }
-
-        *Address = Gbl_Rsdp.XsdtPhysicalAddress;
-        *Table = (ACPI_TABLE_HEADER *) Gbl_Xsdt;
-        return (AE_OK);
-    }
-
-    if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_RSDT))
-    {
-        if (!Gbl_Rsdp.RsdtPhysicalAddress)
-        {
-            return (AE_NOT_FOUND);
-        }
-
-        *Address = Gbl_Rsdp.RsdtPhysicalAddress;
-        *Table = (ACPI_TABLE_HEADER *) Gbl_Rsdt;
-        return (AE_OK);
-    }
-
-    if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_FADT))
-    {
-        *Address = Gbl_FadtAddress;
-        *Table = (ACPI_TABLE_HEADER *) Gbl_Fadt;
-        return (AE_OK);
-    }
-
-    /* Not a main ACPI table, attempt to extract it from the RSDT/XSDT */
-
-    Status = OslGetTableViaRoot (Signature, Instance, Table, Address);
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
-    return (AE_OK);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION:    AcpiOsGetTableByIndex
- *
- * PARAMETERS:  Index           - Which table to get
- *              Table           - Where a pointer to the table is returned
- *              Instance        - Where a pointer to the table instance no. is
- *                                returned
- *              Address         - Where the table physical address is returned
- *
- * RETURN:      Status; Table buffer and physical address returned if AE_OK.
- *              AE_LIMIT: Index is beyond valid limit
- *
- * DESCRIPTION: Get an ACPI table via an index value (0 through n). Returns
- *              AE_LIMIT when an invalid index is reached. Index is not
- *              necessarily an index into the RSDT/XSDT.
- *
- *****************************************************************************/
-
-ACPI_STATUS
-AcpiOsGetTableByIndex (
-    UINT32                  Index,
-    ACPI_TABLE_HEADER       **Table,
-    UINT32                  *Instance,
-    ACPI_PHYSICAL_ADDRESS   *Address)
-{
-    OSL_TABLE_INFO          *Info;
-    ACPI_STATUS             Status;
-    UINT32                  i;
-
-
-    /* Initialize main tables */
-
-    Status = OslTableInitialize ();
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
-    /* Add all tables to list */
-
-    Status = OslAddTablesToList ();
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
-    /* Validate Index */
-
-    if (Index >= Gbl_TableListHead->Instance)
-    {
-        return (AE_LIMIT);
-    }
-
-    /* Point to the table list entry specified by the Index argument */
-
-    Info = Gbl_TableListHead;
-    for (i = 0; i <= Index; i++)
-    {
-        Info = Info->Next;
-    }
-
-    /* Now we can just get the table via the address or name */
-
-    if (Info->Address)
-    {
-        Status = AcpiOsGetTableByAddress (Info->Address, Table);
-        if (ACPI_SUCCESS (Status))
-        {
-            *Address = Info->Address;
-        }
-    }
-    else
-    {
-        Status = AcpiOsGetTableByName (Info->Signature, Info->Instance,
-            Table, Address);
-    }
-
-    if (ACPI_SUCCESS (Status))
-    {
-        *Instance = Info->Instance;
-    }
-    return (Status);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION:    OslTableInitialize
- *
- * PARAMETERS:  None
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Initialize ACPI table data. Get and store main ACPI tables to
- *              local variables. Main ACPI tables include RSDP, FADT, RSDT,
- *              and/or XSDT.
- *
- *****************************************************************************/
-
-static ACPI_STATUS
-OslTableInitialize (
-    void)
-{
-    char                    Buffer[32];
-    ACPI_TABLE_HEADER       *MappedTable;
-    UINT8                   *TableAddress;
-    UINT8                   *RsdpAddress;
-    ACPI_PHYSICAL_ADDRESS   RsdpBase;
-    ACPI_SIZE               RsdpSize;
-    ACPI_STATUS             Status;
-    u_long                  Address = 0;
-    size_t                  Length = sizeof (Address);
-
-
-    /* Get main ACPI tables from memory on first invocation of this function */
-
-    if (Gbl_MainTableObtained)
-    {
-        return (AE_OK);
-    }
-
-    /* Attempt to use kenv or sysctl to find RSD PTR record. */
-
-    if (Gbl_RsdpBase)
-    {
-        Address = Gbl_RsdpBase;
-    }
-    else if (kenv (KENV_GET, SYSTEM_KENV, Buffer, sizeof (Buffer)) > 0)
-    {
-        Address = ACPI_STRTOUL (Buffer, NULL, 0);
-    }
-    if (!Address)
-    {
-        if (sysctlbyname (SYSTEM_SYSCTL, &Address, &Length, NULL, 0) != 0)
-        {
-            Address = 0;
-        }
-    }
-    if (Address)
-    {
-        RsdpBase = Address;
-        RsdpSize = sizeof (Gbl_Rsdp);
-    }
-    else
-    {
-        RsdpBase = ACPI_HI_RSDP_WINDOW_BASE;
-        RsdpSize = ACPI_HI_RSDP_WINDOW_SIZE;
-    }
-
-    /* Get RSDP from memory */
-
-    RsdpAddress = AcpiOsMapMemory (RsdpBase, RsdpSize);
-    if (!RsdpAddress)
-    {
-        return (AE_BAD_ADDRESS);
-    }
-
-    /* Search low memory for the RSDP */
-
-    TableAddress = AcpiTbScanMemoryForRsdp (RsdpAddress, RsdpSize);
-    if (!TableAddress)
-    {
-        AcpiOsUnmapMemory (RsdpAddress, RsdpSize);
-        return (AE_ERROR);
-    }
-
-    ACPI_MEMCPY (&Gbl_Rsdp, TableAddress, sizeof (Gbl_Rsdp));
-    AcpiOsUnmapMemory (RsdpAddress, RsdpSize);
-
-    /* Get XSDT from memory */
-
-    if (Gbl_Rsdp.Revision)
-    {
-        Status = OslMapTable (Gbl_Rsdp.XsdtPhysicalAddress,
-            ACPI_SIG_XSDT, &MappedTable);
-        if (ACPI_FAILURE (Status))
-        {
-            return (Status);
-        }
-
-        Gbl_Revision = 2;
-        Gbl_Xsdt = calloc (1, MappedTable->Length);
-        if (!Gbl_Xsdt)
-        {
-            fprintf (stderr,
-                "XSDT: Could not allocate buffer for table of length %X\n",
-                MappedTable->Length);
-            AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-            return (AE_NO_MEMORY);
-        }
-
-        ACPI_MEMCPY (Gbl_Xsdt, MappedTable, MappedTable->Length);
-        AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-    }
-
-    /* Get RSDT from memory */
-
-    if (Gbl_Rsdp.RsdtPhysicalAddress)
-    {
-        Status = OslMapTable (Gbl_Rsdp.RsdtPhysicalAddress,
-            ACPI_SIG_RSDT, &MappedTable);
-        if (ACPI_FAILURE (Status))
-        {
-            return (Status);
-        }
-
-        Gbl_Rsdt = calloc (1, MappedTable->Length);
-        if (!Gbl_Rsdt)
-        {
-            fprintf (stderr,
-                "RSDT: Could not allocate buffer for table of length %X\n",
-                MappedTable->Length);
-            AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-            return (AE_NO_MEMORY);
-        }
-
-        ACPI_MEMCPY (Gbl_Rsdt, MappedTable, MappedTable->Length);
-        AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-    }
-
-    /* Get FADT from memory */
-
-    if (Gbl_Revision)
-    {
-        Gbl_FadtAddress = Gbl_Xsdt->TableOffsetEntry[0];
-    }
-    else
-    {
-        Gbl_FadtAddress = Gbl_Rsdt->TableOffsetEntry[0];
-    }
-
-    if (!Gbl_FadtAddress)
-    {
-        fprintf(stderr, "FADT: Table could not be found\n");
-        return (AE_ERROR);
-    }
-
-    Status = OslMapTable (Gbl_FadtAddress, ACPI_SIG_FADT, &MappedTable);
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
-    Gbl_Fadt = calloc (1, MappedTable->Length);
-    if (!Gbl_Fadt)
-    {
-        fprintf (stderr,
-            "FADT: Could not allocate buffer for table of length %X\n",
-            MappedTable->Length);
-        AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-        return (AE_NO_MEMORY);
-    }
-
-    ACPI_MEMCPY (Gbl_Fadt, MappedTable, MappedTable->Length);
-    AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-    Gbl_MainTableObtained = TRUE;
-    return (AE_OK);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION:    OslGetTableViaRoot
- *
- * PARAMETERS:  Signature       - ACPI Signature for common table. Must be
- *                                a null terminated 4-character string.
- *              Instance        - Multiple table support for SSDT/UEFI (0...n)
- *                                Must be 0 for other tables.
- *              Table           - Where a pointer to the table is returned
- *              Address         - Where the table physical address is returned
- *
- * RETURN:      Status; Table buffer and physical address returned if AE_OK.
- *              AE_LIMIT: Instance is beyond valid limit
- *              AE_NOT_FOUND: A table with the signature was not found
- *
- * DESCRIPTION: Get an ACPI table via the root table (RSDT/XSDT)
- *
- * NOTE:        Assumes the input signature is uppercase.
- *
- *****************************************************************************/
-
-static ACPI_STATUS
-OslGetTableViaRoot (
-    char                    *Signature,
-    UINT32                  Instance,
-    ACPI_TABLE_HEADER       **Table,
-    ACPI_PHYSICAL_ADDRESS   *Address)
-{
-    ACPI_TABLE_HEADER       *LocalTable = NULL;
-    ACPI_TABLE_HEADER       *MappedTable = NULL;
-    UINT8                   NumberOfTables;
-    UINT32                  CurrentInstance = 0;
-    ACPI_PHYSICAL_ADDRESS   TableAddress = 0;
-    ACPI_STATUS             Status;
-    UINT32                  i;
-
-
-    /* DSDT and FACS address must be extracted from the FADT */
-
-    if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_DSDT) ||
-        ACPI_COMPARE_NAME (Signature, ACPI_SIG_FACS))
-    {
-        /*
-         * Get the appropriate address, either 32-bit or 64-bit. Be very
-         * careful about the FADT length and validate table addresses.
-         * Note: The 64-bit addresses have priority.
-         */
-        if (ACPI_COMPARE_NAME (Signature, ACPI_SIG_DSDT))
-        {
-            if ((Gbl_Fadt->Header.Length >= MIN_FADT_FOR_XDSDT) &&
-                Gbl_Fadt->XDsdt)
-            {
-                TableAddress = (ACPI_PHYSICAL_ADDRESS) Gbl_Fadt->XDsdt;
-            }
-            else if ((Gbl_Fadt->Header.Length >= MIN_FADT_FOR_DSDT) &&
-                Gbl_Fadt->Dsdt)
-            {
-                TableAddress = (ACPI_PHYSICAL_ADDRESS) Gbl_Fadt->Dsdt;
-            }
-        }
-        else /* FACS */
-        {
-            if ((Gbl_Fadt->Header.Length >= MIN_FADT_FOR_XFACS) &&
-                Gbl_Fadt->XFacs)
-            {
-                TableAddress = (ACPI_PHYSICAL_ADDRESS) Gbl_Fadt->XFacs;
-            }
-            else if ((Gbl_Fadt->Header.Length >= MIN_FADT_FOR_FACS) &&
-                Gbl_Fadt->Facs)
-            {
-                TableAddress = (ACPI_PHYSICAL_ADDRESS) Gbl_Fadt->Facs;
-            }
-        }
-    }
-    else /* Case for a normal ACPI table */
-    {
-        if (Gbl_Revision)
-        {
-            NumberOfTables =
-                (Gbl_Xsdt->Header.Length - sizeof (Gbl_Xsdt->Header))
-                / sizeof (Gbl_Xsdt->TableOffsetEntry[0]);
-        }
-        else /* Use RSDT if XSDT is not available */
-        {
-            NumberOfTables =
-                (Gbl_Rsdt->Header.Length - sizeof (Gbl_Rsdt->Header))
-                / sizeof (Gbl_Rsdt->TableOffsetEntry[0]);
-        }
-
-        /* Search RSDT/XSDT for the requested table */
-
-        for (i = 0; i < NumberOfTables; i++)
-        {
-            if (Gbl_Revision)
-            {
-                TableAddress = Gbl_Xsdt->TableOffsetEntry[i];
-            }
-            else
-            {
-                TableAddress = Gbl_Rsdt->TableOffsetEntry[i];
-            }
-
-            MappedTable = AcpiOsMapMemory (TableAddress, sizeof (*MappedTable));
-            if (!MappedTable)
-            {
-                return (AE_BAD_ADDRESS);
-            }
-
-            /* Does this table match the requested signature? */
-
-            if (ACPI_COMPARE_NAME (MappedTable->Signature, Signature))
-            {
-
-                /* Match table instance (for SSDT/UEFI tables) */
-
-                if (CurrentInstance == Instance)
-                {
-                    AcpiOsUnmapMemory (MappedTable, sizeof (*MappedTable));
-                    break;
-                }
-
-                CurrentInstance++;
-            }
-
-            AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-            TableAddress = 0;
-        }
-    }
-
-    if (!TableAddress)
-    {
-        if (CurrentInstance)
-        {
-            return (AE_LIMIT);
-        }
-        return (AE_NOT_FOUND);
-    }
-
-    /* Now we can get the requested table */
-
-    Status = OslMapTable (TableAddress, Signature, &MappedTable);
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
-    /* Copy table to local buffer and return it */
-
-    LocalTable = calloc (1, MappedTable->Length);
-    if (!LocalTable)
-    {
-        AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-        return (AE_NO_MEMORY);
-    }
-
-    ACPI_MEMCPY (LocalTable, MappedTable, MappedTable->Length);
-    AcpiOsUnmapMemory (MappedTable, MappedTable->Length);
-    *Table = LocalTable;
-    *Address = TableAddress;
-    return (AE_OK);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION:    OslAddTablesToList
- *
- * PARAMETERS:  None
- *
- * RETURN:      Status; Table list is initialized if AE_OK.
- *
- * DESCRIPTION: Add ACPI tables to the table list.
- *
- *****************************************************************************/
-
-static ACPI_STATUS
-OslAddTablesToList(
-    void)
-{
-    ACPI_PHYSICAL_ADDRESS   TableAddress;
-    OSL_TABLE_INFO          *Info = NULL;
-    OSL_TABLE_INFO          *NewInfo;
-    ACPI_TABLE_HEADER       *Table;
-    UINT8                   Instance;
-    UINT8                   NumberOfTables;
-    int                     i;
-
-
-    /* Initialize the table list on first invocation */
-
-    if (Gbl_TableListInitialized)
-    {
-        return (AE_OK);
-    }
-
-    /* Add mandatory tables to global table list first */
-
-    for (i = 0; i < 4; i++)
-    {
-        NewInfo = calloc (1, sizeof (*NewInfo));
-        if (!NewInfo)
-        {
-            return (AE_NO_MEMORY);
-        }
-
-        switch (i) {
-        case 0:
-
-            Gbl_TableListHead = Info = NewInfo;
-            continue;
-
-        case 1:
-
-            ACPI_MOVE_NAME (NewInfo->Signature,
-                Gbl_Revision ? ACPI_SIG_XSDT : ACPI_SIG_RSDT);
-            break;
-
-        case 2:
-
-            ACPI_MOVE_NAME (NewInfo->Signature, ACPI_SIG_FACS);
-            break;
-
-        default:
-
-            ACPI_MOVE_NAME (NewInfo->Signature, ACPI_SIG_DSDT);
-
-        }
-
-        Info->Next = NewInfo;
-        Info = NewInfo;
-        Gbl_TableListHead->Instance++;
-    }
-
-    /* Add normal tables from RSDT/XSDT to global list */
-
-    if (Gbl_Revision)
-    {
-        NumberOfTables =
-            (Gbl_Xsdt->Header.Length - sizeof (Gbl_Xsdt->Header))
-            / sizeof (Gbl_Xsdt->TableOffsetEntry[0]);
-    }
-    else
-    {
-        NumberOfTables =
-            (Gbl_Rsdt->Header.Length - sizeof (Gbl_Rsdt->Header))
-            / sizeof (Gbl_Rsdt->TableOffsetEntry[0]);
-    }
-
-    for (i = 0; i < NumberOfTables; i++)
-    {
-        if (Gbl_Revision)
-        {
-            TableAddress = Gbl_Xsdt->TableOffsetEntry[i];
-        }
-        else
-        {
-            TableAddress = Gbl_Rsdt->TableOffsetEntry[i];
-        }
-
-        Table = AcpiOsMapMemory (TableAddress, sizeof (*Table));
-        if (!Table)
-        {
-            return (AE_BAD_ADDRESS);
-        }
-
-        Instance = 0;
-        NewInfo = Gbl_TableListHead;
-        while (NewInfo->Next != NULL)
-        {
-            NewInfo = NewInfo->Next;
-            if (ACPI_COMPARE_NAME (Table->Signature, NewInfo->Signature))
-            {
-                Instance++;
-            }
-        }
-
-        NewInfo = calloc (1, sizeof (*NewInfo));
-        if (!NewInfo)
-        {
-            AcpiOsUnmapMemory (Table, sizeof (*Table));
-            return (AE_NO_MEMORY);
-        }
-
-        ACPI_MOVE_NAME (NewInfo->Signature, Table->Signature);
-
-        AcpiOsUnmapMemory (Table, sizeof (*Table));
-
-        NewInfo->Instance = Instance;
-        NewInfo->Address = TableAddress;
-        Info->Next = NewInfo;
-        Info = NewInfo;
-        Gbl_TableListHead->Instance++;
-    }
-
-    Gbl_TableListInitialized = TRUE;
-    return (AE_OK);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION:    OslMapTable
- *
- * PARAMETERS:  Address             - Address of the table in memory
- *              Signature           - Optional ACPI Signature for desired table.
- *                                    Null terminated 4-character string.
- *              Table               - Where a pointer to the mapped table is
- *                                    returned
- *
- * RETURN:      Status; Mapped table is returned if AE_OK.
- *
- * DESCRIPTION: Map entire ACPI table into caller's address space. Also
- *              validates the table and checksum.
- *
- *****************************************************************************/
-
-static ACPI_STATUS
-OslMapTable (
-    ACPI_SIZE               Address,
-    char                    *Signature,
-    ACPI_TABLE_HEADER       **Table)
-{
-    ACPI_TABLE_HEADER       *MappedTable;
-    UINT32                  Length;
-
-
-    /* Map the header so we can get the table length */
-
-    MappedTable = AcpiOsMapMemory (Address, sizeof (*MappedTable));
-    if (!MappedTable)
-    {
-        return (AE_BAD_ADDRESS);
-    }
-
-    /* Check if table is valid */
-
-    if (!ApIsValidHeader (MappedTable))
-    {
-        AcpiOsUnmapMemory (MappedTable, sizeof (*MappedTable));
-        return (AE_BAD_HEADER);
-    }
-
-    /* If specified, signature must match */
-
-    if (Signature &&
-        !ACPI_COMPARE_NAME (Signature, MappedTable->Signature))
-    {
-        AcpiOsUnmapMemory (MappedTable, sizeof (*MappedTable));
-        return (AE_NOT_EXIST);
-    }
-
-    /* Map the entire table */
-
-    Length = MappedTable->Length;
-    AcpiOsUnmapMemory (MappedTable, sizeof (*MappedTable));
-
-    MappedTable = AcpiOsMapMemory (Address, Length);
-    if (!MappedTable)
-    {
-        return (AE_BAD_ADDRESS);
-    }
-
-    (void) ApIsValidChecksum (MappedTable);
-
-    *Table = MappedTable;
-
-    return (AE_OK);
-}
--- a/sys/external/bsd/acpica/dist/os_specific/service_layers/oslinuxtbl.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/os_specific/service_layers/oslinuxtbl.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -1319,7 +1319,7 @@
 
     if (isdigit ((int) Filename[ACPI_NAME_SIZE]))
     {
-        sscanf (&Filename[ACPI_NAME_SIZE], "%d", Instance);
+        sscanf (&Filename[ACPI_NAME_SIZE], "%u", Instance);
     }
     else if (strlen (Filename) != ACPI_NAME_SIZE)
     {
--- a/sys/external/bsd/acpica/dist/parser/psopcode.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/parser/psopcode.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -333,7 +333,11 @@
 /* ACPI 5.0 opcodes */
 
 /* 7F */ ACPI_OP ("-ConnectField-",     ARGP_CONNECTFIELD_OP,      ARGI_CONNECTFIELD_OP,       ACPI_TYPE_ANY,               AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           AML_HAS_ARGS),
-/* 80 */ ACPI_OP ("-ExtAccessField-",   ARGP_CONNECTFIELD_OP,      ARGI_CONNECTFIELD_OP,       ACPI_TYPE_ANY,               AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           0)
+/* 80 */ ACPI_OP ("-ExtAccessField-",   ARGP_CONNECTFIELD_OP,      ARGI_CONNECTFIELD_OP,       ACPI_TYPE_ANY,               AML_CLASS_INTERNAL,        AML_TYPE_BOGUS,           0),
+
+/* ACPI 6.0 opcodes */
+
+/* 81 */ ACPI_OP ("External",           ARGP_EXTERNAL_OP,          ARGI_EXTERNAL_OP,           ACPI_TYPE_ANY,               AML_CLASS_EXECUTE,/* ? */  AML_TYPE_EXEC_3A_0T_0R,   AML_FLAGS_EXEC_3A_0T_0R)
 
 /*! [End] no source code translation !*/
 };
--- a/sys/external/bsd/acpica/dist/parser/psopinfo.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/parser/psopinfo.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -226,7 +226,7 @@
 /*              8     9     A     B     C     D     E     F  */
 /* 0x00 */    0x00, 0x01, _UNK, _UNK, _UNK, _UNK, 0x02, _UNK,
 /* 0x08 */    0x03, _UNK, 0x04, 0x05, 0x06, 0x07, 0x6E, _UNK,
-/* 0x10 */    0x08, 0x09, 0x0a, 0x6F, 0x0b, _UNK, _UNK, _UNK,
+/* 0x10 */    0x08, 0x09, 0x0a, 0x6F, 0x0b, 0x81, _UNK, _UNK,
 /* 0x18 */    _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
 /* 0x20 */    _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK, _UNK,
 /* 0x28 */    _UNK, _UNK, _UNK, _UNK, _UNK, 0x63, _PFX, _PFX,
--- a/sys/external/bsd/acpica/dist/resources/rsdump.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/resources/rsdump.c	Mon Apr 13 17:23:15 2015 +0000
@@ -1,11 +1,11 @@
 /*******************************************************************************
  *
- * Module Name: rsdump - Functions to display the resource structures.
+ * Module Name: rsdump - AML debugger support for resource structures.
  *
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __RSDUMP_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acresrc.h"
@@ -50,8 +48,10 @@
 #define _COMPONENT          ACPI_RESOURCES
         ACPI_MODULE_NAME    ("rsdump")
 
-
-#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUGGER)
+/*
+ * All functions in this module are used by the AML Debugger only
+ */
+#if defined(ACPI_DEBUGGER)
 
 /* Local prototypes */
 
@@ -91,8 +91,8 @@
 
 static void
 AcpiRsDumpWordList (
-    UINT16                   Length,
-    UINT16                   *Data);
+    UINT16                  Length,
+    UINT16                  *Data);
 
 static void
 AcpiRsDumpDwordList (
@@ -101,8 +101,8 @@
 
 static void
 AcpiRsDumpShortByteList (
-    UINT8                  Length,
-    UINT8                  *Data);
+    UINT8                   Length,
+    UINT8                   *Data);
 
 static void
 AcpiRsDumpResourceSource (
@@ -115,7 +115,133 @@
 static void
 AcpiRsDumpDescriptor (
     void                    *Resource,
-    ACPI_RSDUMP_INFO *Table);
+    ACPI_RSDUMP_INFO        *Table);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiRsDumpResourceList
+ *
+ * PARAMETERS:  ResourceList        - Pointer to a resource descriptor list
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Dispatches the structure to the correct dump routine.
+ *
+ ******************************************************************************/
+
+void
+AcpiRsDumpResourceList (
+    ACPI_RESOURCE           *ResourceList)
+{
+    UINT32                  Count = 0;
+    UINT32                  Type;
+
+
+    ACPI_FUNCTION_ENTRY ();
+
+
+    /* Check if debug output enabled */
+
+    if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
+    {
+        return;
+    }
+
+    /* Walk list and dump all resource descriptors (END_TAG terminates) */
+
+    do
+    {
+        AcpiOsPrintf ("\n[%02X] ", Count);
+        Count++;
+
+        /* Validate Type before dispatch */
+
+        Type = ResourceList->Type;
+        if (Type > ACPI_RESOURCE_TYPE_MAX)
+        {
+            AcpiOsPrintf (
+                "Invalid descriptor type (%X) in resource list\n",
+                ResourceList->Type);
+            return;
+        }
+
+        /* Sanity check the length. It must not be zero, or we loop forever */
+
+        if (!ResourceList->Length)
+        {
+            AcpiOsPrintf (
+                "Invalid zero length descriptor in resource list\n");
+            return;
+        }
+
+        /* Dump the resource descriptor */
+
+        if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS)
+        {
+            AcpiRsDumpDescriptor (&ResourceList->Data,
+                AcpiGbl_DumpSerialBusDispatch[
+                    ResourceList->Data.CommonSerialBus.Type]);
+        }
+        else
+        {
+            AcpiRsDumpDescriptor (&ResourceList->Data,
+                AcpiGbl_DumpResourceDispatch[Type]);
+        }
+
+        /* Point to the next resource structure */
+
+        ResourceList = ACPI_NEXT_RESOURCE (ResourceList);
+
+        /* Exit when END_TAG descriptor is reached */
+
+    } while (Type != ACPI_RESOURCE_TYPE_END_TAG);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiRsDumpIrqList
+ *
+ * PARAMETERS:  RouteTable      - Pointer to the routing table to dump.
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Print IRQ routing table
+ *
+ ******************************************************************************/
+
+void
+AcpiRsDumpIrqList (
+    UINT8                   *RouteTable)
+{
+    ACPI_PCI_ROUTING_TABLE  *PrtElement;
+    UINT8                   Count;
+
+
+    ACPI_FUNCTION_ENTRY ();
+
+
+    /* Check if debug output enabled */
+
+    if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
+    {
+        return;
+    }
+
+    PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable);
+
+    /* Dump all table elements, Exit on zero length element */
+
+    for (Count = 0; PrtElement->Length; Count++)
+    {
+        AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count);
+        AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt);
+
+        PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE,
+            PrtElement, PrtElement->Length);
+    }
+}
 
 
 /*******************************************************************************
@@ -290,14 +416,16 @@
             /*
              * Common flags for all Address resources
              */
-            AcpiRsDumpAddressCommon (ACPI_CAST_PTR (ACPI_RESOURCE_DATA, Target));
+            AcpiRsDumpAddressCommon (ACPI_CAST_PTR (
+                ACPI_RESOURCE_DATA, Target));
             break;
 
         case ACPI_RSD_SOURCE:
             /*
              * Optional ResourceSource for Address resources
              */
-            AcpiRsDumpResourceSource (ACPI_CAST_PTR (ACPI_RESOURCE_SOURCE, Target));
+            AcpiRsDumpResourceSource (ACPI_CAST_PTR (
+                ACPI_RESOURCE_SOURCE, Target));
             break;
 
         default:
@@ -401,131 +529,6 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiRsDumpResourceList
- *
- * PARAMETERS:  ResourceList        - Pointer to a resource descriptor list
- *
- * RETURN:      None
- *
- * DESCRIPTION: Dispatches the structure to the correct dump routine.
- *
- ******************************************************************************/
-
-void
-AcpiRsDumpResourceList (
-    ACPI_RESOURCE           *ResourceList)
-{
-    UINT32                  Count = 0;
-    UINT32                  Type;
-
-
-    ACPI_FUNCTION_ENTRY ();
-
-
-    /* Check if debug output enabled */
-
-    if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
-    {
-        return;
-    }
-
-    /* Walk list and dump all resource descriptors (END_TAG terminates) */
-
-    do
-    {
-        AcpiOsPrintf ("\n[%02X] ", Count);
-        Count++;
-
-        /* Validate Type before dispatch */
-
-        Type = ResourceList->Type;
-        if (Type > ACPI_RESOURCE_TYPE_MAX)
-        {
-            AcpiOsPrintf (
-                "Invalid descriptor type (%X) in resource list\n",
-                ResourceList->Type);
-            return;
-        }
-
-        /* Sanity check the length. It must not be zero, or we loop forever */
-
-        if (!ResourceList->Length)
-        {
-            AcpiOsPrintf (
-                "Invalid zero length descriptor in resource list\n");
-            return;
-        }
-
-        /* Dump the resource descriptor */
-
-        if (Type == ACPI_RESOURCE_TYPE_SERIAL_BUS)
-        {
-            AcpiRsDumpDescriptor (&ResourceList->Data,
-                AcpiGbl_DumpSerialBusDispatch[ResourceList->Data.CommonSerialBus.Type]);
-        }
-        else
-        {
-            AcpiRsDumpDescriptor (&ResourceList->Data,
-                AcpiGbl_DumpResourceDispatch[Type]);
-        }
-
-        /* Point to the next resource structure */
-
-        ResourceList = ACPI_NEXT_RESOURCE (ResourceList);
-
-        /* Exit when END_TAG descriptor is reached */
-
-    } while (Type != ACPI_RESOURCE_TYPE_END_TAG);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiRsDumpIrqList
- *
- * PARAMETERS:  RouteTable      - Pointer to the routing table to dump.
- *
- * RETURN:      None
- *
- * DESCRIPTION: Print IRQ routing table
- *
- ******************************************************************************/
-
-void
-AcpiRsDumpIrqList (
-    UINT8                   *RouteTable)
-{
-    ACPI_PCI_ROUTING_TABLE  *PrtElement;
-    UINT8                   Count;
-
-
-    ACPI_FUNCTION_ENTRY ();
-
-
-    /* Check if debug output enabled */
-
-    if (!ACPI_IS_DEBUG_ENABLED (ACPI_LV_RESOURCES, _COMPONENT))
-    {
-        return;
-    }
-
-    PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, RouteTable);
-
-    /* Dump all table elements, Exit on zero length element */
-
-    for (Count = 0; PrtElement->Length; Count++)
-    {
-        AcpiOsPrintf ("\n[%02X] PCI IRQ Routing Table Package\n", Count);
-        AcpiRsDumpDescriptor (PrtElement, AcpiRsDumpPrt);
-
-        PrtElement = ACPI_ADD_PTR (ACPI_PCI_ROUTING_TABLE,
-                        PrtElement, PrtElement->Length);
-    }
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    AcpiRsOut*
  *
  * PARAMETERS:  Title       - Name of the resource field
@@ -622,8 +625,8 @@
 
 static void
 AcpiRsDumpShortByteList (
-    UINT8                  Length,
-    UINT8                  *Data)
+    UINT8                   Length,
+    UINT8                   *Data)
 {
     UINT8                   i;
 
--- a/sys/external/bsd/acpica/dist/resources/rsdumpinfo.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/resources/rsdumpinfo.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __RSDUMPINFO_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acresrc.h"
@@ -163,11 +161,12 @@
 {
     {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress16),          "16-Bit WORD Address Space",NULL},
     {ACPI_RSD_ADDRESS,  0,                                                  NULL,                       NULL},
-    {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (Address16.Granularity),            "Granularity",              NULL},
-    {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (Address16.Minimum),                "Address Minimum",          NULL},
-    {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (Address16.Maximum),                "Address Maximum",          NULL},
-    {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (Address16.TranslationOffset),      "Translation Offset",       NULL},
-    {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (Address16.AddressLength),          "Address Length",           NULL},
+    {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (Address16.Address.Granularity),    "Granularity",              NULL},
+    {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (Address16.Address.Minimum),        "Address Minimum",          NULL},
+    {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (Address16.Address.Maximum),        "Address Maximum",          NULL},
+    {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (Address16.Address.TranslationOffset),
+                                                                            "Translation Offset",       NULL},
+    {ACPI_RSD_UINT16,   ACPI_RSD_OFFSET (Address16.Address.AddressLength),  "Address Length",           NULL},
     {ACPI_RSD_SOURCE,   ACPI_RSD_OFFSET (Address16.ResourceSource),         NULL,                       NULL}
 };
 
@@ -175,11 +174,12 @@
 {
     {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress32),         "32-Bit DWORD Address Space", NULL},
     {ACPI_RSD_ADDRESS,  0,                                                  NULL,                       NULL},
-    {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (Address32.Granularity),            "Granularity",              NULL},
-    {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (Address32.Minimum),                "Address Minimum",          NULL},
-    {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (Address32.Maximum),                "Address Maximum",          NULL},
-    {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (Address32.TranslationOffset),      "Translation Offset",       NULL},
-    {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (Address32.AddressLength),          "Address Length",           NULL},
+    {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (Address32.Address.Granularity),    "Granularity",              NULL},
+    {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (Address32.Address.Minimum),        "Address Minimum",          NULL},
+    {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (Address32.Address.Maximum),        "Address Maximum",          NULL},
+    {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (Address32.Address.TranslationOffset),
+                                                                            "Translation Offset",       NULL},
+    {ACPI_RSD_UINT32,   ACPI_RSD_OFFSET (Address32.Address.AddressLength),  "Address Length",           NULL},
     {ACPI_RSD_SOURCE,   ACPI_RSD_OFFSET (Address32.ResourceSource),         NULL,                       NULL}
 };
 
@@ -187,11 +187,12 @@
 {
     {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpAddress64),          "64-Bit QWORD Address Space", NULL},
     {ACPI_RSD_ADDRESS,  0,                                                  NULL,                       NULL},
-    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (Address64.Granularity),            "Granularity",              NULL},
-    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (Address64.Minimum),                "Address Minimum",          NULL},
-    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (Address64.Maximum),                "Address Maximum",          NULL},
-    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (Address64.TranslationOffset),      "Translation Offset",       NULL},
-    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (Address64.AddressLength),          "Address Length",           NULL},
+    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (Address64.Address.Granularity),    "Granularity",              NULL},
+    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (Address64.Address.Minimum),        "Address Minimum",          NULL},
+    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (Address64.Address.Maximum),        "Address Maximum",          NULL},
+    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (Address64.Address.TranslationOffset),
+                                                                            "Translation Offset",       NULL},
+    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (Address64.Address.AddressLength),  "Address Length",           NULL},
     {ACPI_RSD_SOURCE,   ACPI_RSD_OFFSET (Address64.ResourceSource),         NULL,                       NULL}
 };
 
@@ -199,11 +200,13 @@
 {
     {ACPI_RSD_TITLE,    ACPI_RSD_TABLE_SIZE (AcpiRsDumpExtAddress64),       "64-Bit Extended Address Space", NULL},
     {ACPI_RSD_ADDRESS,  0,                                                  NULL,                       NULL},
-    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.Granularity),         "Granularity",              NULL},
-    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.Minimum),             "Address Minimum",          NULL},
-    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.Maximum),             "Address Maximum",          NULL},
-    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.TranslationOffset),   "Translation Offset",       NULL},
-    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.AddressLength),       "Address Length",           NULL},
+    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.Address.Granularity), "Granularity",              NULL},
+    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.Address.Minimum),     "Address Minimum",          NULL},
+    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.Address.Maximum),     "Address Maximum",          NULL},
+    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.Address.TranslationOffset),
+                                                                            "Translation Offset",       NULL},
+    {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.Address.AddressLength),
+                                                                            "Address Length",           NULL},
     {ACPI_RSD_UINT64,   ACPI_RSD_OFFSET (ExtAddress64.TypeSpecific),        "Type-Specific Attribute",  NULL}
 };
 
--- a/sys/external/bsd/acpica/dist/resources/rsutils.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/resources/rsutils.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __RSUTILS_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acnamesp.h"
--- a/sys/external/bsd/acpica/dist/resources/rsxface.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/resources/rsxface.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __RSXFACE_C__
 #define EXPORT_ACPI_INTERFACES
 
 #include "acpi.h"
@@ -62,11 +61,11 @@
     ACPI_COPY_FIELD(Out, In, MinAddressFixed);           \
     ACPI_COPY_FIELD(Out, In, MaxAddressFixed);           \
     ACPI_COPY_FIELD(Out, In, Info);                      \
-    ACPI_COPY_FIELD(Out, In, Granularity);               \
-    ACPI_COPY_FIELD(Out, In, Minimum);                   \
-    ACPI_COPY_FIELD(Out, In, Maximum);                   \
-    ACPI_COPY_FIELD(Out, In, TranslationOffset);         \
-    ACPI_COPY_FIELD(Out, In, AddressLength);             \
+    ACPI_COPY_FIELD(Out, In, Address.Granularity);       \
+    ACPI_COPY_FIELD(Out, In, Address.Minimum);           \
+    ACPI_COPY_FIELD(Out, In, Address.Maximum);           \
+    ACPI_COPY_FIELD(Out, In, Address.TranslationOffset); \
+    ACPI_COPY_FIELD(Out, In, Address.AddressLength);     \
     ACPI_COPY_FIELD(Out, In, ResourceSource);
 
 
--- a/sys/external/bsd/acpica/dist/tables/tbdata.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbdata.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __TBDATA_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acnamesp.h"
@@ -123,7 +121,8 @@
     case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
     case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
 
-        Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, TableDesc->Address);
+        Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
+                    ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
         break;
 
     default:
@@ -229,7 +228,8 @@
     case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
     case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
 
-        TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER, Address);
+        TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
+                        ACPI_PHYSADDR_TO_PTR (Address));
         if (!TableHeader)
         {
             return (AE_NO_MEMORY);
@@ -439,11 +439,11 @@
         if (ACPI_FAILURE (Status))
         {
             ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
-                "%4.4s " ACPI_PRINTF_UINT
+                "%4.4s 0x%8.8X%8.8X"
                 " Attempted table install failed",
                 AcpiUtValidAcpiName (TableDesc->Signature.Ascii) ?
                     TableDesc->Signature.Ascii : "????",
-                ACPI_FORMAT_TO_UINT (TableDesc->Address)));
+                ACPI_FORMAT_UINT64 (TableDesc->Address)));
             goto InvalidateAndExit;
         }
     }
@@ -531,21 +531,24 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiTbGetNextRootIndex
+ * FUNCTION:    AcpiTbGetNextTableDescriptor
  *
  * PARAMETERS:  TableIndex          - Where table index is returned
+ *              TableDesc           - Where table descriptor is returned
  *
- * RETURN:      Status and table index.
+ * RETURN:      Status and table index/descriptor.
  *
  * DESCRIPTION: Allocate a new ACPI table entry to the global table list
  *
  ******************************************************************************/
 
 ACPI_STATUS
-AcpiTbGetNextRootIndex (
-    UINT32                  *TableIndex)
+AcpiTbGetNextTableDescriptor (
+    UINT32                  *TableIndex,
+    ACPI_TABLE_DESC         **TableDesc)
 {
     ACPI_STATUS             Status;
+    UINT32                  i;
 
 
     /* Ensure that there is room for the table in the Root Table List */
@@ -560,8 +563,18 @@
         }
     }
 
-    *TableIndex = AcpiGbl_RootTableList.CurrentTableCount;
+    i = AcpiGbl_RootTableList.CurrentTableCount;
     AcpiGbl_RootTableList.CurrentTableCount++;
+
+    if (TableIndex)
+    {
+        *TableIndex = i;
+    }
+    if (TableDesc)
+    {
+        *TableDesc = &AcpiGbl_RootTableList.Tables[i];
+    }
+
     return (AE_OK);
 }
 
--- a/sys/external/bsd/acpica/dist/tables/tbfadt.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbfadt.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __TBFADT_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "actables.h"
--- a/sys/external/bsd/acpica/dist/tables/tbinstal.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbinstal.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __TBINSTAL_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "actables.h"
@@ -203,8 +201,8 @@
                 ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
     if (ACPI_FAILURE (Status))
     {
-        ACPI_ERROR ((AE_INFO, "Could not acquire table length at %p",
-            ACPI_CAST_PTR (void, Address)));
+        ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X",
+            ACPI_FORMAT_UINT64 (Address)));
         return_ACPI_STATUS (Status);
     }
 
@@ -270,8 +268,8 @@
     Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, Flags);
     if (ACPI_FAILURE (Status))
     {
-        ACPI_ERROR ((AE_INFO, "Could not acquire table length at %p",
-            ACPI_CAST_PTR (void, Address)));
+        ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X",
+            ACPI_FORMAT_UINT64 (Address)));
         return_ACPI_STATUS (Status);
     }
 
@@ -283,8 +281,8 @@
         AcpiGbl_DisableSsdtTableInstall &&
         ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT))
     {
-        ACPI_INFO ((AE_INFO, "Ignoring installation of %4.4s at %p",
-            NewTableDesc.Signature.Ascii, ACPI_CAST_PTR (void, Address)));
+        ACPI_INFO ((AE_INFO, "Ignoring installation of %4.4s at %8.8X%8.8X",
+            NewTableDesc.Signature.Ascii, ACPI_FORMAT_UINT64 (Address)));
         goto ReleaseAndExit;
     }
 
@@ -370,7 +368,6 @@
                  */
                 AcpiTbUninstallTable (&NewTableDesc);
                 *TableIndex = i;
-               (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
                 return_ACPI_STATUS (AE_OK);
             }
         }
@@ -378,7 +375,7 @@
 
     /* Add the table to the global root table list */
 
-    Status = AcpiTbGetNextRootIndex (&i);
+    Status = AcpiTbGetNextTableDescriptor (&i, NULL);
     if (ACPI_FAILURE (Status))
     {
         goto ReleaseAndExit;
@@ -461,11 +458,11 @@
         return;
     }
 
-    ACPI_INFO ((AE_INFO, "%4.4s " ACPI_PRINTF_UINT
-        " %s table override, new table: " ACPI_PRINTF_UINT,
+    ACPI_INFO ((AE_INFO, "%4.4s 0x%8.8X%8.8X"
+        " %s table override, new table: 0x%8.8X%8.8X",
         OldTableDesc->Signature.Ascii,
-        ACPI_FORMAT_TO_UINT (OldTableDesc->Address),
-        OverrideType, ACPI_FORMAT_TO_UINT (NewTableDesc.Address)));
+        ACPI_FORMAT_UINT64 (OldTableDesc->Address),
+        OverrideType, ACPI_FORMAT_UINT64 (NewTableDesc.Address)));
 
     /* We can now uninstall the original table */
 
@@ -487,49 +484,6 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiTbStoreTable
- *
- * PARAMETERS:  Address             - Table address
- *              Table               - Table header
- *              Length              - Table length
- *              Flags               - Install flags
- *              TableIndex          - Where the table index is returned
- *
- * RETURN:      Status and table index.
- *
- * DESCRIPTION: Add an ACPI table to the global table list
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiTbStoreTable (
-    ACPI_PHYSICAL_ADDRESS   Address,
-    ACPI_TABLE_HEADER       *Table,
-    UINT32                  Length,
-    UINT8                   Flags,
-    UINT32                  *TableIndex)
-{
-    ACPI_STATUS             Status;
-    ACPI_TABLE_DESC         *TableDesc;
-
-
-    Status = AcpiTbGetNextRootIndex (TableIndex);
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
-
-    /* Initialize added table */
-
-    TableDesc = &AcpiGbl_RootTableList.Tables[*TableIndex];
-    AcpiTbInitTableDescriptor (TableDesc, Address, Flags, Table);
-    TableDesc->Pointer = Table;
-    return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    AcpiTbUninstallTable
  *
  * PARAMETERS:  TableDesc           - Table descriptor
@@ -560,7 +514,7 @@
     if ((TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) ==
         ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL)
     {
-        ACPI_FREE (ACPI_CAST_PTR (void, TableDesc->Address));
+        ACPI_FREE (ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
     }
 
     TableDesc->Address = ACPI_PTR_TO_PHYSADDR (NULL);
--- a/sys/external/bsd/acpica/dist/tables/tbutils.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbutils.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __TBUTILS_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "actables.h"
--- a/sys/external/bsd/acpica/dist/tables/tbxface.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbxface.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __TBXFACE_C__
 #define EXPORT_ACPI_INTERFACES
 
 #include "acpi.h"
--- a/sys/external/bsd/acpica/dist/tables/tbxfroot.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/tables/tbxfroot.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __TBXFROOT_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "actables.h"
@@ -160,7 +158,7 @@
 
 ACPI_STATUS
 AcpiFindRootPointer (
-    ACPI_SIZE               *TableAddress)
+    ACPI_PHYSICAL_ADDRESS   *TableAddress)
 {
     UINT8                   *TablePtr;
     UINT8                   *MemRover;
@@ -220,7 +218,7 @@
 
             PhysicalAddress += (UINT32) ACPI_PTR_DIFF (MemRover, TablePtr);
 
-            *TableAddress = PhysicalAddress;
+            *TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
             return_ACPI_STATUS (AE_OK);
         }
     }
@@ -251,7 +249,7 @@
         PhysicalAddress = (UINT32)
             (ACPI_HI_RSDP_WINDOW_BASE + ACPI_PTR_DIFF (MemRover, TablePtr));
 
-        *TableAddress = PhysicalAddress;
+        *TableAddress = (ACPI_PHYSICAL_ADDRESS) PhysicalAddress;
         return_ACPI_STATUS (AE_OK);
     }
 
--- a/sys/external/bsd/acpica/dist/tools/acpidump/apfiles.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/tools/acpidump/apfiles.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/tools/acpixtract/acpixtract.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/tools/acpixtract/acpixtract.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/utilities/utcache.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utcache.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __UTCACHE_C__
-
 #include "acpi.h"
 #include "accommon.h"
 
--- a/sys/external/bsd/acpica/dist/utilities/utdebug.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utdebug.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __UTDEBUG_C__
 #define EXPORT_ACPI_INTERFACES
 
 #include "acpi.h"
--- a/sys/external/bsd/acpica/dist/utilities/utdecode.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utdecode.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __UTDECODE_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acnamesp.h"
--- a/sys/external/bsd/acpica/dist/utilities/uteval.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/uteval.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __UTEVAL_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acnamesp.h"
--- a/sys/external/bsd/acpica/dist/utilities/utglobal.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utglobal.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,7 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __UTGLOBAL_C__
 #define EXPORT_ACPI_INTERFACES
 #define DEFINE_ACPI_GLOBALS
 
@@ -112,12 +111,19 @@
     {"_SB_",    ACPI_TYPE_DEVICE,           NULL},
     {"_SI_",    ACPI_TYPE_LOCAL_SCOPE,      NULL},
     {"_TZ_",    ACPI_TYPE_DEVICE,           NULL},
-    {"_REV",    ACPI_TYPE_INTEGER,          (char *) ACPI_CA_SUPPORT_LEVEL},
+    /*
+     * March, 2015:
+     * The _REV object is in the process of being deprecated, because
+     * other ACPI implementations permanently return 2. Thus, it
+     * has little or no value. Return 2 for compatibility with
+     * other ACPI implementations.
+     */
+    {"_REV",    ACPI_TYPE_INTEGER,          ACPI_CAST_PTR (char, 2)},
     {"_OS_",    ACPI_TYPE_STRING,           ACPI_OS_NAME},
-    {"_GL_",    ACPI_TYPE_MUTEX,            (char *) 1},
+    {"_GL_",    ACPI_TYPE_MUTEX,            ACPI_CAST_PTR (char, 1)},
 
 #if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
-    {"_OSI",    ACPI_TYPE_METHOD,           (char *) 1},
+    {"_OSI",    ACPI_TYPE_METHOD,           ACPI_CAST_PTR (char, 1)},
 #endif
 
     /* Table terminator */
--- a/sys/external/bsd/acpica/dist/utilities/utmisc.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utmisc.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __UTMISC_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acnamesp.h"
@@ -86,6 +84,7 @@
 }
 
 
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP)
 /*******************************************************************************
  *
  * FUNCTION:    AcpiUtIsAmlTable
@@ -116,6 +115,7 @@
 
     return (FALSE);
 }
+#endif
 
 
 /*******************************************************************************
--- a/sys/external/bsd/acpica/dist/utilities/utmutex.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utmutex.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  ******************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __UTMUTEX_C__
-
 #include "acpi.h"
 #include "accommon.h"
 
--- a/sys/external/bsd/acpica/dist/utilities/utosi.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utosi.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __UTOSI_C__
-
 #include "acpi.h"
 #include "accommon.h"
 
@@ -107,6 +105,7 @@
     {__UNCONST("Windows 2009"),        NULL, 0, ACPI_OSI_WIN_7},            /* Windows 7 and Server 2008 R2 - Added 09/2009 */
     {__UNCONST("Windows 2012"),        NULL, 0, ACPI_OSI_WIN_8},            /* Windows 8 and Server 2012 - Added 08/2012 */
     {__UNCONST("Windows 2013"),        NULL, 0, ACPI_OSI_WIN_8},            /* Windows 8.1 and Server 2012 R2 - Added 01/2014 */
+    {__UNCONST("Windows 2015"),        NULL, 0, ACPI_OSI_WIN_10},           /* Windows 10 - Added 03/2015 */
 
 	/* Feature Group Strings */
 
--- a/sys/external/bsd/acpica/dist/utilities/uttrack.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/uttrack.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -52,8 +52,6 @@
  * occurs in the body of AcpiUtFree.
  */
 
-#define __UTTRACK_C__
-
 #include "acpi.h"
 #include "accommon.h"
 
--- a/sys/external/bsd/acpica/dist/utilities/utuuid.c	Mon Apr 13 17:21:01 2015 +0000
+++ b/sys/external/bsd/acpica/dist/utilities/utuuid.c	Mon Apr 13 17:23:15 2015 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2014, Intel Corp.
+ * Copyright (C) 2000 - 2015, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -41,8 +41,6 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#define __UTUUID_C__
-
 #include "acpi.h"
 #include "accommon.h"
 
@@ -50,6 +48,7 @@
         ACPI_MODULE_NAME    ("utuuid")
 
 
+#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP || defined ACPI_DISASSEMBLER)
 /*
  * UUID support functions.
  *
@@ -101,3 +100,4 @@
             AcpiUtAsciiCharToHex (InString[AcpiGbl_MapToUuidOffset[i] + 1]);
     }
 }
+#endif