---------------------------------------- trunk
authorchristos <christos@NetBSD.org>
Mon, 13 Apr 2015 17:21:01 +0000
branchtrunk
changeset 234620 e7ce51fddfdc
parent 234619 462a724d99cc
child 234621 aa95c2927283
---------------------------------------- 10 April 2015. Summary of changes for version 20150410: Reverted a change introduced in version 20150408 that caused a regression in the disassembler where incorrect operator symbols could be emitted. ---------------------------------------- 08 April 2015. Summary of changes for version 20150408: 1) ACPICA kernel-resident subsystem: Permanently set the return value for the _REV predefined name. It now returns 2 (was 5). This matches other ACPI implementations. _REV will be deprecated in the future, and is now defined to be 1 for ACPI 1.0, and 2 for ACPI 2.0 and later. It should never be used to differentiate or identify operating systems. Added the "Windows 2015" string to the _OSI support. ACPICA will now return TRUE to a query with this string. Fixed several issues with the local version of the printf function. Added the C99 compiler option (-std=c99) to the Unix makefiles. Current Release: Non-Debug Version: 99.9K Code, 27.4K Data, 127.3K Total Debug Version: 195.2K Code, 80.7K Data, 275.9K Total Previous Release: Non-Debug Version: 98.8K Code, 27.3K Data, 126.1K Total Debug Version: 192.1K Code, 79.8K Data, 271.9K Total 2) iASL Compiler/Disassembler and Tools: iASL: Implemented an enhancement to the constant folding feature to transform the parse tree to a simple Store operation whenever possible: Add (2, 3, X) ==> is converted to: Store (5, X) X = 2 + 3 ==> is converted to: Store (5, X) Updated support for the SLIC table (Software Licensing Description Table) in both the Data Table compiler and the disassembler. The SLIC table support now conforms to "Microsoft Software Licensing Tables (SLIC and MSDM). November 29, 2011. Copyright 2011 Microsoft". Note: Any SLIC data following the ACPI header is now defined to be "Proprietary Data", and as such, can only be entered or displayed as a hex data block. Implemented full support for the MSDM table as described in the document above. Note: The format of MSDM is similar to SLIC. Any MSDM data following the ACPI header is defined to be "Proprietary Data", and can only be entered or displayed as a hex data block. Implemented the -Pn option for the iASL Table Compiler (was only implemented for the ASL compiler). This option disables the iASL preprocessor. Disassembler: For disassembly of Data Tables, added a comment field around the Ascii equivalent data that is emitted as part of the "Raw Table Data" block. This prevents the iASL Preprocessor from possible confusion if/when the table is compiled. Disassembler: Added an option (-df) to force the disassembler to assume that the table being disassembled contains valid AML. This feature is useful for disassembling AML files that contain ACPI signatures other than DSDT or SSDT (such as OEMx or other signatures). Changes for the EFI version of the tools: 1) Fixed a build error/issue 2) Fixed a cast warning iASL: Fixed a path issue with the __FILE__ operator by making the directory prefix optional within the internal SplitInputFilename function. Debugger: Removed some unused global variables. Tests: Updated the makefile for proper generation of the AAPITS suite. ---------------------------------------- 04 February 2015. Summary of changes for version 20150204: ACPICA kernel-resident subsystem: Updated all ACPICA copyrights and signons to 2014. Added the 2014 copyright to all module headers and signons, including the standard Linux header. This affects virtually every file in the ACPICA core subsystem, iASL compiler, all ACPICA utilities, and the test suites. Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix GPE storm issues. A raw gpe handling mechanism was created to allow better handling of GPE storms that aren't easily managed by the normal handler. The raw handler allows disabling/renabling of the the GPE so that interrupt storms can be avoided in cases where events cannot be timely serviced. In this scenario, handlers should use the AcpiSetGpe() API to disable/enable the GPE. This API will leave the reference counts undisturbed, thereby preventing unintentional clearing of the GPE when the intent in only to temporarily disable it. Raw handlers allow enabling and disabling of a GPE by removing GPE register locking. As such, raw handlers much provide their own locks while using GPE API's to protect access to GPE data structures. Lv Zheng Events: Always modify GPE registers under the GPE lock. Applies GPE lock around AcpiFinishGpe() to protect access to GPE register values. Reported as bug by joe.liu@apple.com. Unix makefiles: Separate option to disable optimizations and _FORTIFY_SOURCE. This change removes the _FORTIFY_SOURCE flag from the NOOPT disable option and creates a separate flag (NOFORTIFY) for this purpose. Some toolchains may define _FORTIFY_SOURCE which leads redefined errors when building ACPICA. This allows disabling the option without also having to disable optimazations. David Box Current Release: Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total Debug Version: 199.2K Code, 82.4K Data, 281.6K Total ---------------------------------------- 07 November 2014. Summary of changes for version 20141107: This release is available at https://acpica.org/downloads This release introduces and implements language extensions to ASL that provide support for symbolic ("C-style") operators and expressions. These language extensions are known collectively as ASL+. 1) iASL Compiler/Disassembler and Tools: Disassembler: Fixed a problem with disassembly of the UartSerialBus macro. Changed "StopBitsNone" to the correct "StopBitsZero". David E. Box. Disassembler: Fixed the Unicode macro support to add escape sequences. All non-printable ASCII values are emitted as escape sequences, as well as the standard escapes for quote and backslash. Ensures that the disassembled macro can be correctly recompiled. iASL: Added Printf/Fprintf macros for formatted output. These macros are translated to existing AML Concatenate and Store operations. Printf writes to the ASL Debug object. Fprintf allows the specification of an ASL name as the target. Only a single format specifier is required, %o, since the AML interpreter dynamically converts objects to the required type. David E. Box. (old) Store (Concatenate (Concatenate (Concatenate (Concatenate (Concatenate (Concatenate (Concatenate ("", Arg0), ": Unexpected value for "), Arg1), ", "), Arg2), " at line "), Arg3), Debug) (new) Printf ("%o: Unexpected value for %o, %o at line %o", Arg0, Arg1, Arg2, Arg3) (old) Store (Concatenate (Concatenate (Concatenate (Concatenate ("", Arg1), ": "), Arg0), " Successful"), STR1) (new) Fprintf (STR1, "%o: %o Successful", Arg1, Arg0) iASL: Added debug options (-bp, -bt) to dynamically prune levels of the ASL parse tree before the AML code is generated. This allows blocks of ASL code to be removed in order to help locate and identify problem devices and/or code. David E. Box. AcpiExec: Added support (-fi) for an optional namespace object initialization file. This file specifies initial values for namespace objects as necessary for debugging and testing different ASL code paths that may be taken as a result of BIOS options. 2) Overview of symbolic operator support for ASL (ASL+) ------------------------------------------------------- As an extension to the ASL language, iASL implements support for symbolic (C-style) operators for math and logical expressions. This can greatly simplify ASL code as well as improve both readability and maintainability. These language extensions can exist concurrently with all legacy ASL code and expressions. The symbolic extensions are 100% compatible with existing AML interpreters, since no new AML opcodes are created. To implement the extensions, the iASL compiler transforms the symbolic expressions into the legacy ASL/AML equivalents at compile time. Full symbolic expressions are supported, along with the standard C precedence and associativity rules. Full disassembler support for the symbolic expressions is provided, and creates an automatic migration path for existing ASL code to ASL+ code via the disassembly process. By default, the disassembler now emits ASL+ code with symbolic expressions. An option (-dl) is provided to force the disassembler to emit legacy ASL code if desired. Below is the complete list of the currently supported symbolic operators with examples. See the iASL User Guide for additional information. ASL+ Syntax Legacy ASL Equivalent ----------- --------------------- // Math operators Z = X + Y Add (X, Y, Z) Z = X - Y Subtract (X, Y, Z) Z = X * Y Multiply (X, Y, Z) Z = X / Y Divide (X, Y, , Z) Z = X % Y Mod (X, Y, Z) Z = X << Y ShiftLeft (X, Y, Z) Z = X >> Y ShiftRight (X, Y, Z) Z = X & Y And (X, Y, Z) Z = X | Y Or (X, Y, Z) Z = X ^ Y Xor (X, Y, Z) Z = ~X Not (X, Z) X++ Increment (X) X-- Decrement (X) // Logical operators (X == Y) LEqual (X, Y) (X != Y) LNotEqual (X, Y) (X < Y) LLess (X, Y) (X > Y) LGreater (X, Y) (X <= Y) LLessEqual (X, Y) (X >= Y) LGreaterEqual (X, Y) (X && Y) LAnd (X, Y) (X || Y) LOr (X, Y) (!X) LNot (X) // Assignment and compound assignment operations X = Y Store (Y, X) X += Y Add (X, Y, X) X -= Y Subtract (X, Y, X) X *= Y Multiply (X, Y, X) X /= Y Divide (X, Y, , X) X %= Y Mod (X, Y, X) X <<= Y ShiftLeft (X, Y, X) X >>= Y ShiftRight (X, Y, X) X &= Y And (X, Y, X) X |= Y Or (X, Y, X) X ^= Y Xor (X, Y, X) 3) ASL+ Examples: ----------------- Legacy ASL: If (LOr (LOr (LEqual (And (R510, 0x03FB), 0x02E0), LEqual ( And (R520, 0x03FB), 0x02E0)), LOr (LEqual (And (R530, 0x03FB), 0x02E0), LEqual (And (R540, 0x03FB), 0x02E0)))) { And (MEMB, 0xFFFFFFF0, SRMB) Store (MEMB, Local2) Store (PDBM, Local1) And (PDBM, 0xFFFFFFFFFFFFFFF9, PDBM) Store (SRMB, MEMB) Or (PDBM, 0x02, PDBM) } ASL+ version: If (((R510 & 0x03FB) == 0x02E0) || ((R520 & 0x03FB) == 0x02E0) || ((R530 & 0x03FB) == 0x02E0) || ((R540 & 0x03FB) == 0x02E0)) { SRMB = (MEMB & 0xFFFFFFF0) Local2 = MEMB Local1 = PDBM PDBM &= 0xFFFFFFFFFFFFFFF9 MEMB = SRMB PDBM |= 0x02 } Legacy ASL: Store (0x1234, Local1) Multiply (Add (Add (Local1, TEST), 0x20), Local2, Local3) Multiply (Local2, Add (Add (Local1, TEST), 0x20), Local3) Add (Local1, Add (TEST, Multiply (0x20, Local2)), Local3) Store (Index (PKG1, 0x03), Local6) Store (Add (Local3, Local2), Debug) Add (Local1, 0x0F, Local2) Add (Local1, Multiply (Local2, Local3), Local2) Multiply (Add (Add (Local1, TEST), 0x20), ToBCD (Local1), Local3) ASL+ version: Local1 = 0x1234 Local3 = (((Local1 + TEST) + 0x20) * Local2) Local3 = (Local2 * ((Local1 + TEST) + 0x20)) Local3 = (Local1 + (TEST + (0x20 * Local2))) Local6 = Index (PKG1, 0x03) Debug = (Local3 + Local2) Local2 = (Local1 + 0x0F) Local2 = (Local1 + (Local2 * Local3)) Local3 = (((Local1 + TEST) + 0x20) * ToBCD (Local1))
sys/external/bsd/acpica/dist/changes.txt
sys/external/bsd/acpica/dist/common/acgetline.c
sys/external/bsd/acpica/dist/common/adfile.c
sys/external/bsd/acpica/dist/common/adisasm.c
sys/external/bsd/acpica/dist/common/adwalk.c
sys/external/bsd/acpica/dist/common/ahids.c
sys/external/bsd/acpica/dist/common/ahpredef.c
sys/external/bsd/acpica/dist/common/ahuuids.c
sys/external/bsd/acpica/dist/common/cmfsize.c
sys/external/bsd/acpica/dist/common/dmextern.c
sys/external/bsd/acpica/dist/common/dmrestag.c
sys/external/bsd/acpica/dist/common/dmtable.c
sys/external/bsd/acpica/dist/common/dmtbdump.c
sys/external/bsd/acpica/dist/common/getopt.c
sys/external/bsd/acpica/dist/compiler/aslascii.c
sys/external/bsd/acpica/dist/compiler/aslbtypes.c
sys/external/bsd/acpica/dist/compiler/aslcodegen.c
sys/external/bsd/acpica/dist/compiler/aslcompiler.h
sys/external/bsd/acpica/dist/compiler/asldefine.h
sys/external/bsd/acpica/dist/compiler/aslfold.c
sys/external/bsd/acpica/dist/compiler/aslglobal.h
sys/external/bsd/acpica/dist/compiler/aslhex.c
sys/external/bsd/acpica/dist/compiler/asllength.c
sys/external/bsd/acpica/dist/compiler/asllisting.c
sys/external/bsd/acpica/dist/compiler/asllistsup.c
sys/external/bsd/acpica/dist/compiler/aslmain.c
sys/external/bsd/acpica/dist/compiler/aslmap.c
sys/external/bsd/acpica/dist/compiler/aslmapenter.c
sys/external/bsd/acpica/dist/compiler/aslmapoutput.c
sys/external/bsd/acpica/dist/compiler/aslmaputils.c
sys/external/bsd/acpica/dist/compiler/aslmessages.c
sys/external/bsd/acpica/dist/compiler/aslmessages.h
sys/external/bsd/acpica/dist/compiler/aslmethod.c
sys/external/bsd/acpica/dist/compiler/aslnamesp.c
sys/external/bsd/acpica/dist/compiler/asloffset.c
sys/external/bsd/acpica/dist/compiler/aslopcodes.c
sys/external/bsd/acpica/dist/compiler/asloperands.c
sys/external/bsd/acpica/dist/compiler/aslopt.c
sys/external/bsd/acpica/dist/compiler/asloptions.c
sys/external/bsd/acpica/dist/compiler/aslparser.y
sys/external/bsd/acpica/dist/compiler/aslprintf.c
sys/external/bsd/acpica/dist/compiler/aslprune.c
sys/external/bsd/acpica/dist/compiler/aslresource.c
sys/external/bsd/acpica/dist/compiler/aslrestype1.c
sys/external/bsd/acpica/dist/compiler/aslrestype1i.c
sys/external/bsd/acpica/dist/compiler/aslrestype2.c
sys/external/bsd/acpica/dist/compiler/aslrestype2d.c
sys/external/bsd/acpica/dist/compiler/aslrestype2e.c
sys/external/bsd/acpica/dist/compiler/aslrestype2q.c
sys/external/bsd/acpica/dist/compiler/aslrestype2s.c
sys/external/bsd/acpica/dist/compiler/aslrestype2w.c
sys/external/bsd/acpica/dist/compiler/aslrules.y
sys/external/bsd/acpica/dist/compiler/aslstartup.c
sys/external/bsd/acpica/dist/compiler/aslstubs.c
sys/external/bsd/acpica/dist/compiler/aslsupport.y
sys/external/bsd/acpica/dist/compiler/asltokens.y
sys/external/bsd/acpica/dist/compiler/asltransform.c
sys/external/bsd/acpica/dist/compiler/asltypes.h
sys/external/bsd/acpica/dist/compiler/asltypes.y
sys/external/bsd/acpica/dist/compiler/asluuid.c
sys/external/bsd/acpica/dist/compiler/dtcompiler.h
sys/external/bsd/acpica/dist/compiler/dtexpress.c
sys/external/bsd/acpica/dist/compiler/dtio.c
sys/external/bsd/acpica/dist/compiler/dtparser.l
sys/external/bsd/acpica/dist/compiler/dttemplate.c
sys/external/bsd/acpica/dist/compiler/dttemplate.h
sys/external/bsd/acpica/dist/compiler/preprocess.h
sys/external/bsd/acpica/dist/compiler/prexpress.c
sys/external/bsd/acpica/dist/compiler/prmacros.c
sys/external/bsd/acpica/dist/compiler/prparser.l
sys/external/bsd/acpica/dist/compiler/prscan.c
sys/external/bsd/acpica/dist/debugger/dbconvert.c
sys/external/bsd/acpica/dist/debugger/dbfileio.c
sys/external/bsd/acpica/dist/debugger/dbhistry.c
sys/external/bsd/acpica/dist/debugger/dbstats.c
sys/external/bsd/acpica/dist/debugger/dbxface.c
sys/external/bsd/acpica/dist/disassembler/dmbuffer.c
sys/external/bsd/acpica/dist/disassembler/dmcstyle.c
sys/external/bsd/acpica/dist/disassembler/dmdeferred.c
sys/external/bsd/acpica/dist/disassembler/dmnames.c
sys/external/bsd/acpica/dist/disassembler/dmobject.c
sys/external/bsd/acpica/dist/disassembler/dmopcode.c
sys/external/bsd/acpica/dist/disassembler/dmresrcs.c
sys/external/bsd/acpica/dist/disassembler/dmutils.c
sys/external/bsd/acpica/dist/disassembler/dmwalk.c
sys/external/bsd/acpica/dist/dispatcher/dsargs.c
sys/external/bsd/acpica/dist/dispatcher/dsfield.c
sys/external/bsd/acpica/dist/dispatcher/dsinit.c
sys/external/bsd/acpica/dist/dispatcher/dsmethod.c
sys/external/bsd/acpica/dist/dispatcher/dsmthdat.c
sys/external/bsd/acpica/dist/dispatcher/dsobject.c
sys/external/bsd/acpica/dist/dispatcher/dsutils.c
sys/external/bsd/acpica/dist/dispatcher/dswexec.c
sys/external/bsd/acpica/dist/dispatcher/dswload.c
sys/external/bsd/acpica/dist/dispatcher/dswload2.c
sys/external/bsd/acpica/dist/dispatcher/dswscope.c
sys/external/bsd/acpica/dist/dispatcher/dswstate.c
sys/external/bsd/acpica/dist/events/evevent.c
sys/external/bsd/acpica/dist/events/evglock.c
sys/external/bsd/acpica/dist/events/evgpe.c
sys/external/bsd/acpica/dist/events/evgpeblk.c
sys/external/bsd/acpica/dist/events/evgpeinit.c
sys/external/bsd/acpica/dist/events/evgpeutil.c
sys/external/bsd/acpica/dist/events/evhandler.c
sys/external/bsd/acpica/dist/events/evmisc.c
sys/external/bsd/acpica/dist/events/evregion.c
sys/external/bsd/acpica/dist/events/evsci.c
sys/external/bsd/acpica/dist/events/evxfevnt.c
sys/external/bsd/acpica/dist/events/evxfgpe.c
sys/external/bsd/acpica/dist/events/evxfregn.c
sys/external/bsd/acpica/dist/executer/exconvrt.c
sys/external/bsd/acpica/dist/executer/excreate.c
sys/external/bsd/acpica/dist/executer/exfield.c
sys/external/bsd/acpica/dist/executer/exfldio.c
sys/external/bsd/acpica/dist/executer/exmisc.c
sys/external/bsd/acpica/dist/executer/exmutex.c
sys/external/bsd/acpica/dist/executer/exnames.c
sys/external/bsd/acpica/dist/executer/exoparg1.c
sys/external/bsd/acpica/dist/executer/exoparg2.c
sys/external/bsd/acpica/dist/executer/exoparg3.c
sys/external/bsd/acpica/dist/executer/exoparg6.c
sys/external/bsd/acpica/dist/executer/exprep.c
sys/external/bsd/acpica/dist/executer/exregion.c
sys/external/bsd/acpica/dist/executer/exresnte.c
sys/external/bsd/acpica/dist/executer/exresolv.c
sys/external/bsd/acpica/dist/executer/exresop.c
sys/external/bsd/acpica/dist/executer/exstore.c
sys/external/bsd/acpica/dist/executer/exstoren.c
sys/external/bsd/acpica/dist/executer/exstorob.c
sys/external/bsd/acpica/dist/executer/exsystem.c
sys/external/bsd/acpica/dist/executer/exutils.c
sys/external/bsd/acpica/dist/generate/unix/Makefile.config
sys/external/bsd/acpica/dist/generate/unix/acpidump/Makefile
sys/external/bsd/acpica/dist/generate/unix/acpiexec/Makefile
sys/external/bsd/acpica/dist/generate/unix/iasl/Makefile
sys/external/bsd/acpica/dist/hardware/hwacpi.c
sys/external/bsd/acpica/dist/hardware/hwgpe.c
sys/external/bsd/acpica/dist/hardware/hwpci.c
sys/external/bsd/acpica/dist/hardware/hwregs.c
sys/external/bsd/acpica/dist/hardware/hwtimer.c
sys/external/bsd/acpica/dist/hardware/hwvalid.c
sys/external/bsd/acpica/dist/hardware/hwxface.c
sys/external/bsd/acpica/dist/include/acbuffer.h
sys/external/bsd/acpica/dist/include/accommon.h
sys/external/bsd/acpica/dist/include/acconfig.h
sys/external/bsd/acpica/dist/include/acdispat.h
sys/external/bsd/acpica/dist/include/acevents.h
sys/external/bsd/acpica/dist/include/achware.h
sys/external/bsd/acpica/dist/include/acnames.h
sys/external/bsd/acpica/dist/include/acobject.h
sys/external/bsd/acpica/dist/include/acopcode.h
sys/external/bsd/acpica/dist/include/acoutput.h
sys/external/bsd/acpica/dist/include/acparser.h
sys/external/bsd/acpica/dist/include/acpi.h
sys/external/bsd/acpica/dist/include/acpredef.h
sys/external/bsd/acpica/dist/include/acrestyp.h
sys/external/bsd/acpica/dist/include/acstruct.h
sys/external/bsd/acpica/dist/include/actbl.h
sys/external/bsd/acpica/dist/include/actbl2.h
sys/external/bsd/acpica/dist/include/actbl3.h
sys/external/bsd/acpica/dist/include/amlcode.h
sys/external/bsd/acpica/dist/include/amlresrc.h
sys/external/bsd/acpica/dist/include/platform/accygwin.h
sys/external/bsd/acpica/dist/include/platform/acdragonfly.h
sys/external/bsd/acpica/dist/include/platform/acdragonflyex.h
sys/external/bsd/acpica/dist/include/platform/acefi.h
sys/external/bsd/acpica/dist/include/platform/acenv.h
sys/external/bsd/acpica/dist/include/platform/acenvex.h
sys/external/bsd/acpica/dist/include/platform/acfreebsd.h
sys/external/bsd/acpica/dist/include/platform/acgcc.h
sys/external/bsd/acpica/dist/include/platform/achaiku.h
sys/external/bsd/acpica/dist/include/platform/acintel.h
sys/external/bsd/acpica/dist/include/platform/aclinux.h
sys/external/bsd/acpica/dist/include/platform/aclinuxex.h
sys/external/bsd/acpica/dist/include/platform/acmacosx.h
sys/external/bsd/acpica/dist/include/platform/acmsvc.h
sys/external/bsd/acpica/dist/include/platform/acos2.h
sys/external/bsd/acpica/dist/include/platform/acwin.h
sys/external/bsd/acpica/dist/include/platform/acwin64.h
sys/external/bsd/acpica/dist/namespace/nsalloc.c
sys/external/bsd/acpica/dist/namespace/nsarguments.c
sys/external/bsd/acpica/dist/namespace/nsconvert.c
sys/external/bsd/acpica/dist/namespace/nsdumpdv.c
sys/external/bsd/acpica/dist/namespace/nsload.c
sys/external/bsd/acpica/dist/namespace/nsnames.c
sys/external/bsd/acpica/dist/namespace/nsobject.c
sys/external/bsd/acpica/dist/namespace/nsparse.c
sys/external/bsd/acpica/dist/namespace/nspredef.c
sys/external/bsd/acpica/dist/namespace/nsprepkg.c
sys/external/bsd/acpica/dist/namespace/nsrepair.c
sys/external/bsd/acpica/dist/namespace/nssearch.c
sys/external/bsd/acpica/dist/namespace/nsutils.c
sys/external/bsd/acpica/dist/namespace/nswalk.c
sys/external/bsd/acpica/dist/namespace/nsxfobj.c
sys/external/bsd/acpica/dist/os_specific/service_layers/osbsdtbl.c
sys/external/bsd/acpica/dist/os_specific/service_layers/osefitbl.c
sys/external/bsd/acpica/dist/os_specific/service_layers/osefixf.c
sys/external/bsd/acpica/dist/os_specific/service_layers/oslibcfs.c
sys/external/bsd/acpica/dist/os_specific/service_layers/osunixdir.c
sys/external/bsd/acpica/dist/os_specific/service_layers/osunixmap.c
sys/external/bsd/acpica/dist/os_specific/service_layers/osunixxf.c
sys/external/bsd/acpica/dist/os_specific/service_layers/oswindir.c
sys/external/bsd/acpica/dist/os_specific/service_layers/oswintbl.c
sys/external/bsd/acpica/dist/os_specific/service_layers/oswinxf.c
sys/external/bsd/acpica/dist/parser/psargs.c
sys/external/bsd/acpica/dist/parser/psloop.c
sys/external/bsd/acpica/dist/parser/psobject.c
sys/external/bsd/acpica/dist/parser/psparse.c
sys/external/bsd/acpica/dist/parser/psscope.c
sys/external/bsd/acpica/dist/parser/pstree.c
sys/external/bsd/acpica/dist/parser/psutils.c
sys/external/bsd/acpica/dist/parser/pswalk.c
sys/external/bsd/acpica/dist/parser/psxface.c
sys/external/bsd/acpica/dist/resources/rsaddr.c
sys/external/bsd/acpica/dist/resources/rscalc.c
sys/external/bsd/acpica/dist/resources/rscreate.c
sys/external/bsd/acpica/dist/resources/rsinfo.c
sys/external/bsd/acpica/dist/resources/rsio.c
sys/external/bsd/acpica/dist/resources/rsirq.c
sys/external/bsd/acpica/dist/resources/rslist.c
sys/external/bsd/acpica/dist/resources/rsmemory.c
sys/external/bsd/acpica/dist/resources/rsmisc.c
sys/external/bsd/acpica/dist/resources/rsserial.c
sys/external/bsd/acpica/dist/tables/tbfind.c
sys/external/bsd/acpica/dist/tables/tbprint.c
sys/external/bsd/acpica/dist/tables/tbxfload.c
sys/external/bsd/acpica/dist/tests/misc/grammar.asl
sys/external/bsd/acpica/dist/tools/acpibin/abcompare.c
sys/external/bsd/acpica/dist/tools/acpibin/abmain.c
sys/external/bsd/acpica/dist/tools/acpibin/acpibin.h
sys/external/bsd/acpica/dist/tools/acpidump/acpidump.h
sys/external/bsd/acpica/dist/tools/acpidump/apdump.c
sys/external/bsd/acpica/dist/tools/acpidump/apmain.c
sys/external/bsd/acpica/dist/tools/acpiexec/aecommon.h
sys/external/bsd/acpica/dist/tools/acpiexec/aeexec.c
sys/external/bsd/acpica/dist/tools/acpiexec/aehandlers.c
sys/external/bsd/acpica/dist/tools/acpiexec/aeinitfile.c
sys/external/bsd/acpica/dist/tools/acpiexec/aemain.c
sys/external/bsd/acpica/dist/tools/acpiexec/aeregion.c
sys/external/bsd/acpica/dist/tools/acpiexec/aetables.c
sys/external/bsd/acpica/dist/tools/acpiexec/aetables.h
sys/external/bsd/acpica/dist/tools/acpihelp/acpihelp.h
sys/external/bsd/acpica/dist/tools/acpihelp/ahamlops.c
sys/external/bsd/acpica/dist/tools/acpihelp/ahaslkey.c
sys/external/bsd/acpica/dist/tools/acpihelp/ahaslops.c
sys/external/bsd/acpica/dist/tools/acpihelp/ahdecode.c
sys/external/bsd/acpica/dist/tools/acpihelp/ahmain.c
sys/external/bsd/acpica/dist/tools/acpinames/acpinames.h
sys/external/bsd/acpica/dist/tools/acpinames/anmain.c
sys/external/bsd/acpica/dist/tools/acpinames/anstubs.c
sys/external/bsd/acpica/dist/tools/acpinames/antables.c
sys/external/bsd/acpica/dist/tools/acpisrc/acpisrc.h
sys/external/bsd/acpica/dist/tools/acpisrc/ascase.c
sys/external/bsd/acpica/dist/tools/acpisrc/asconvrt.c
sys/external/bsd/acpica/dist/tools/acpisrc/asfile.c
sys/external/bsd/acpica/dist/tools/acpisrc/asmain.c
sys/external/bsd/acpica/dist/tools/acpisrc/asremove.c
sys/external/bsd/acpica/dist/tools/acpisrc/astable.c
sys/external/bsd/acpica/dist/tools/acpisrc/asutils.c
sys/external/bsd/acpica/dist/tools/acpixtract/axmain.c
sys/external/bsd/acpica/dist/tools/examples/examples.c
sys/external/bsd/acpica/dist/tools/examples/examples.h
sys/external/bsd/acpica/dist/tools/examples/exstubs.c
sys/external/bsd/acpica/dist/tools/examples/extables.c
sys/external/bsd/acpica/dist/utilities/utaddress.c
sys/external/bsd/acpica/dist/utilities/utalloc.c
sys/external/bsd/acpica/dist/utilities/utbuffer.c
sys/external/bsd/acpica/dist/utilities/utclib.c
sys/external/bsd/acpica/dist/utilities/utcopy.c
sys/external/bsd/acpica/dist/utilities/utdelete.c
sys/external/bsd/acpica/dist/utilities/uterror.c
sys/external/bsd/acpica/dist/utilities/utexcep.c
sys/external/bsd/acpica/dist/utilities/utfileio.c
sys/external/bsd/acpica/dist/utilities/uthex.c
sys/external/bsd/acpica/dist/utilities/utids.c
sys/external/bsd/acpica/dist/utilities/utinit.c
sys/external/bsd/acpica/dist/utilities/utlock.c
sys/external/bsd/acpica/dist/utilities/utmath.c
sys/external/bsd/acpica/dist/utilities/utobject.c
sys/external/bsd/acpica/dist/utilities/utownerid.c
sys/external/bsd/acpica/dist/utilities/utpredef.c
sys/external/bsd/acpica/dist/utilities/utprint.c
sys/external/bsd/acpica/dist/utilities/utresrc.c
sys/external/bsd/acpica/dist/utilities/utstate.c
sys/external/bsd/acpica/dist/utilities/utstring.c
sys/external/bsd/acpica/dist/utilities/utxface.c
sys/external/bsd/acpica/dist/utilities/utxferror.c
sys/external/bsd/acpica/dist/utilities/utxfinit.c
sys/external/bsd/acpica/dist/utilities/utxfmutex.c
--- a/sys/external/bsd/acpica/dist/changes.txt	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/changes.txt	Mon Apr 13 17:21:01 2015 +0000
@@ -1,4 +1,302 @@
 ----------------------------------------
+10 April 2015. Summary of changes for version 20150410:
+
+Reverted a change introduced in version 20150408 that caused
+a regression in the disassembler where incorrect operator
+symbols could be emitted.
+
+----------------------------------------
+08 April 2015. Summary of changes for version 20150408:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Permanently set the return value for the _REV predefined name. It now 
+returns 2 (was 5). This matches other ACPI implementations. _REV will be 
+deprecated in the future, and is now defined to be 1 for ACPI 1.0, and 2 
+for ACPI 2.0 and later. It should never be used to differentiate or 
+identify operating systems.
+
+Added the "Windows 2015" string to the _OSI support. ACPICA will now 
+return TRUE to a query with this string.
+
+Fixed several issues with the local version of the printf function.
+
+Added the C99 compiler option (-std=c99) to the Unix makefiles.
+
+  Current Release:
+    Non-Debug Version:  99.9K Code, 27.4K Data, 127.3K Total
+    Debug Version:     195.2K Code, 80.7K Data, 275.9K Total
+  Previous Release:
+    Non-Debug Version:  98.8K Code, 27.3K Data, 126.1K Total
+    Debug Version:     192.1K Code, 79.8K Data, 271.9K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Implemented an enhancement to the constant folding feature to 
+transform the parse tree to a simple Store operation whenever possible:
+    Add (2, 3, X) ==> is converted to: Store (5, X)
+    X = 2 + 3     ==> is converted to: Store (5, X)
+
+Updated support for the SLIC table (Software Licensing Description Table) 
+in both the Data Table compiler and the disassembler. The SLIC table 
+support now conforms to "Microsoft Software Licensing Tables (SLIC and 
+MSDM). November 29, 2011. Copyright 2011 Microsoft". Note: Any SLIC data 
+following the ACPI header is now defined to be "Proprietary Data", and as 
+such, can only be entered or displayed as a hex data block.
+
+Implemented full support for the MSDM table as described in the document 
+above. Note: The format of MSDM is similar to SLIC. Any MSDM data 
+following the ACPI header is defined to be "Proprietary Data", and can 
+only be entered or displayed as a hex data block.
+
+Implemented the -Pn option for the iASL Table Compiler (was only 
+implemented for the ASL compiler). This option disables the iASL 
+preprocessor.
+
+Disassembler: For disassembly of Data Tables, added a comment field 
+around the Ascii equivalent data that is emitted as part of the "Raw 
+Table Data" block. This prevents the iASL Preprocessor from possible 
+confusion if/when the table is compiled.
+
+Disassembler: Added an option (-df) to force the disassembler to assume 
+that the table being disassembled contains valid AML. This feature is 
+useful for disassembling AML files that contain ACPI signatures other 
+than DSDT or SSDT (such as OEMx or other signatures).
+
+Changes for the EFI version of the tools:
+1) Fixed a build error/issue
+2) Fixed a cast warning
+
+iASL: Fixed a path issue with the __FILE__ operator by making the 
+directory prefix optional within the internal SplitInputFilename 
+function.
+
+Debugger: Removed some unused global variables.
+
+Tests: Updated the makefile for proper generation of the AAPITS suite.
+
+----------------------------------------
+04 February 2015. Summary of changes for version 20150204:
+
+ACPICA kernel-resident subsystem:
+
+Updated all ACPICA copyrights and signons to 2014. Added the 2014 
+copyright to all module headers and signons, including the standard Linux 
+header. This affects virtually every file in the ACPICA core subsystem, 
+iASL compiler, all ACPICA utilities, and the test suites.
+
+Events: Introduce ACPI_GPE_DISPATCH_RAW_HANDLER to fix GPE storm issues.
+A raw gpe handling mechanism was created to allow better handling of GPE
+storms that aren't easily managed by the normal handler. The raw handler
+allows disabling/renabling of the the GPE so that interrupt storms can be
+avoided in cases where events cannot be timely serviced. In this 
+scenario, handlers should use the AcpiSetGpe() API to disable/enable the 
+GPE. This API will leave the reference counts undisturbed, thereby 
+preventing unintentional clearing of the GPE when the intent in only to 
+temporarily disable it. Raw handlers allow enabling and disabling of a 
+GPE by removing GPE register locking. As such, raw handlers much provide 
+their own locks while using GPE API's to protect access to GPE data 
+structures.
+Lv Zheng
+
+Events: Always modify GPE registers under the GPE lock.
+Applies GPE lock around AcpiFinishGpe() to protect access to GPE register
+values. Reported as bug by joe.liu@apple.com.
+
+Unix makefiles: Separate option to disable optimizations and 
+_FORTIFY_SOURCE. This change removes the _FORTIFY_SOURCE flag from the 
+NOOPT disable option and creates a separate flag (NOFORTIFY) for this 
+purpose. Some toolchains may define _FORTIFY_SOURCE which leads redefined 
+errors when building ACPICA. This allows disabling the option without 
+also having to disable optimazations.
+David Box
+
+  Current Release:
+    Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total
+    Debug Version:     199.2K Code, 82.4K Data, 281.6K Total
+
+----------------------------------------
+07 November 2014. Summary of changes for version 20141107:
+
+This release is available at https://acpica.org/downloads
+
+This release introduces and implements language extensions to ASL that 
+provide support for symbolic ("C-style") operators and expressions. These 
+language extensions are known collectively as ASL+.
+
+
+1) iASL Compiler/Disassembler and Tools:
+
+Disassembler: Fixed a problem with disassembly of the UartSerialBus 
+macro. Changed "StopBitsNone" to the correct "StopBitsZero". David E. 
+Box.
+
+Disassembler: Fixed the Unicode macro support to add escape sequences. 
+All non-printable ASCII values are emitted as escape sequences, as well 
+as the standard escapes for quote and backslash. Ensures that the 
+disassembled macro can be correctly recompiled.
+
+iASL: Added Printf/Fprintf macros for formatted output. These macros are 
+translated to existing AML Concatenate and Store operations. Printf 
+writes to the ASL Debug object. Fprintf allows the specification of an 
+ASL name as the target. Only a single format specifier is required, %o, 
+since the AML interpreter dynamically converts objects to the required 
+type. David E. Box.
+
+    (old)    Store (Concatenate (Concatenate (Concatenate (Concatenate
+                 (Concatenate (Concatenate (Concatenate ("", Arg0),
+                 ": Unexpected value for "), Arg1), ", "), Arg2),
+                 " at line "), Arg3), Debug)
+
+    (new)    Printf ("%o: Unexpected value for %o, %o at line %o",
+                 Arg0, Arg1, Arg2, Arg3)
+
+    (old)    Store (Concatenate (Concatenate (Concatenate (Concatenate
+                 ("", Arg1), ": "), Arg0), " Successful"), STR1)
+
+    (new)    Fprintf (STR1, "%o: %o Successful", Arg1, Arg0)
+
+iASL: Added debug options (-bp, -bt) to dynamically prune levels of the 
+ASL parse tree before the AML code is generated. This allows blocks of 
+ASL code to be removed in order to help locate and identify problem 
+devices and/or code. David E. Box.
+
+AcpiExec: Added support (-fi) for an optional namespace object 
+initialization file. This file specifies initial values for namespace 
+objects as necessary for debugging and testing different ASL code paths 
+that may be taken as a result of BIOS options.
+
+
+2) Overview of symbolic operator support for ASL (ASL+)
+-------------------------------------------------------
+
+As an extension to the ASL language, iASL implements support for symbolic 
+(C-style) operators for math and logical expressions. This can greatly 
+simplify ASL code as well as improve both readability and 
+maintainability. These language extensions can exist concurrently with 
+all legacy ASL code and expressions.
+
+The symbolic extensions are 100% compatible with existing AML 
+interpreters, since no new AML opcodes are created. To implement the 
+extensions, the iASL compiler transforms the symbolic expressions into 
+the legacy ASL/AML equivalents at compile time.
+
+Full symbolic expressions are supported, along with the standard C 
+precedence and associativity rules.
+
+Full disassembler support for the symbolic expressions is provided, and 
+creates an automatic migration path for existing ASL code to ASL+ code 
+via the disassembly process. By default, the disassembler now emits ASL+ 
+code with symbolic expressions. An option (-dl) is provided to force the 
+disassembler to emit legacy ASL code if desired.
+
+Below is the complete list of the currently supported symbolic operators 
+with examples. See the iASL User Guide for additional information.
+
+
+ASL+ Syntax      Legacy ASL Equivalent
+-----------      ---------------------
+
+    // Math operators
+
+Z = X + Y        Add (X, Y, Z)
+Z = X - Y        Subtract (X, Y, Z)
+Z = X * Y        Multiply (X, Y, Z)
+Z = X / Y        Divide (X, Y, , Z)
+Z = X % Y        Mod (X, Y, Z)
+Z = X << Y       ShiftLeft (X, Y, Z)
+Z = X >> Y       ShiftRight (X, Y, Z)
+Z = X & Y        And (X, Y, Z)
+Z = X | Y        Or (X, Y, Z)
+Z = X ^ Y        Xor (X, Y, Z)
+Z = ~X           Not (X, Z)
+X++              Increment (X)
+X--              Decrement (X)
+
+    // Logical operators
+
+(X == Y)         LEqual (X, Y)
+(X != Y)         LNotEqual (X, Y)
+(X < Y)          LLess (X, Y)
+(X > Y)          LGreater (X, Y)
+(X <= Y)         LLessEqual (X, Y)
+(X >= Y)         LGreaterEqual (X, Y)
+(X && Y)         LAnd (X, Y)
+(X || Y)         LOr (X, Y)
+(!X)             LNot (X)
+
+    // Assignment and compound assignment operations
+
+X = Y           Store (Y, X)
+X += Y          Add (X, Y, X)
+X -= Y          Subtract (X, Y, X)
+X *= Y          Multiply (X, Y, X)
+X /= Y          Divide (X, Y, , X)
+X %= Y          Mod (X, Y, X)
+X <<= Y         ShiftLeft (X, Y, X)
+X >>= Y         ShiftRight (X, Y, X)
+X &= Y          And (X, Y, X)
+X |= Y          Or (X, Y, X)
+X ^= Y          Xor (X, Y, X)
+
+
+3) ASL+ Examples:
+-----------------
+
+Legacy ASL:
+        If (LOr (LOr (LEqual (And (R510, 0x03FB), 0x02E0), LEqual (
+            And (R520, 0x03FB), 0x02E0)), LOr (LEqual (And (R530, 
+0x03FB), 
+            0x02E0), LEqual (And (R540, 0x03FB), 0x02E0))))
+        {
+            And (MEMB, 0xFFFFFFF0, SRMB)
+            Store (MEMB, Local2)
+            Store (PDBM, Local1)
+            And (PDBM, 0xFFFFFFFFFFFFFFF9, PDBM)
+            Store (SRMB, MEMB)
+            Or (PDBM, 0x02, PDBM)
+        }
+
+ASL+ version:
+        If (((R510 & 0x03FB) == 0x02E0) ||
+            ((R520 & 0x03FB) == 0x02E0) ||
+            ((R530 & 0x03FB) == 0x02E0) || 
+            ((R540 & 0x03FB) == 0x02E0))
+        {
+            SRMB = (MEMB & 0xFFFFFFF0)
+            Local2 = MEMB
+            Local1 = PDBM
+            PDBM &= 0xFFFFFFFFFFFFFFF9
+            MEMB = SRMB
+            PDBM |= 0x02
+        }
+
+Legacy ASL:
+        Store (0x1234, Local1)
+        Multiply (Add (Add (Local1, TEST), 0x20), Local2, Local3)
+        Multiply (Local2, Add (Add (Local1, TEST), 0x20), Local3)
+        Add (Local1, Add (TEST, Multiply (0x20, Local2)), Local3)
+        Store (Index (PKG1, 0x03), Local6)
+        Store (Add (Local3, Local2), Debug)
+        Add (Local1, 0x0F, Local2)
+        Add (Local1, Multiply (Local2, Local3), Local2)
+        Multiply (Add (Add (Local1, TEST), 0x20), ToBCD (Local1), Local3)
+
+ASL+ version:
+        Local1 = 0x1234
+        Local3 = (((Local1 + TEST) + 0x20) * Local2)
+        Local3 = (Local2 * ((Local1 + TEST) + 0x20))
+        Local3 = (Local1 + (TEST + (0x20 * Local2)))
+        Local6 = Index (PKG1, 0x03)
+        Debug = (Local3 + Local2)
+        Local2 = (Local1 + 0x0F)
+        Local2 = (Local1 + (Local2 * Local3))
+        Local3 = (((Local1 + TEST) + 0x20) * ToBCD (Local1))
+
+
+----------------------------------------
 26 September 2014. Summary of changes for version 20140926:
 
 1) ACPICA kernel-resident subsystem:
--- a/sys/external/bsd/acpica/dist/common/acgetline.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/acgetline.c	Mon Apr 13 17:21:01 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/common/adfile.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/adfile.c	Mon Apr 13 17:21:01 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
@@ -295,7 +295,10 @@
     char                    *Filename;
 
 
-    *OutDirectoryPath = NULL;
+    if (OutDirectoryPath)
+    {
+        *OutDirectoryPath = NULL;
+    }
 
     if (!InputPath)
     {
@@ -340,7 +343,10 @@
         return (AE_NO_MEMORY);
     }
 
-    *OutDirectoryPath = DirectoryPath;
+    if (OutDirectoryPath)
+    {
+        *OutDirectoryPath = DirectoryPath;
+    }
 
     if (OutFilename)
     {
--- a/sys/external/bsd/acpica/dist/common/adisasm.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/adisasm.c	Mon Apr 13 17:21:01 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,6 +64,11 @@
     char                    *Filename,
     ACPI_TABLE_HEADER       *Table);
 
+static ACPI_STATUS
+AdStoreTable (
+    ACPI_TABLE_HEADER       *Table,
+    UINT32                  *TableIndex);
+
 /* Stubs for ASL compiler */
 
 #ifndef ACPI_ASL_COMPILER
@@ -298,7 +303,7 @@
             return (Status);
         }
 
-        if (!AcpiGbl_DbOpt_disasm)
+        if (!AcpiGbl_DbOpt_Disasm)
         {
             return (AE_OK);
         }
@@ -337,7 +342,6 @@
         {
             fprintf (stderr, "Could not open output file %s\n", DisasmFilename);
             Status = AE_ERROR;
-            ACPI_FREE (DisasmFilename);
             goto Cleanup;
         }
 
@@ -346,9 +350,11 @@
 
     *OutFilename = DisasmFilename;
 
-    if (!AcpiUtIsAmlTable (Table))
+    /* ForceAmlDisassembly means to assume the table contains valid AML */
+
+    if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table))
     {
-        AdDisassemblerHeader (Filename);
+        AdDisassemblerHeader (Filename, ACPI_IS_DATA_TABLE);
         AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n",
             Table->Signature);
         AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength]  "
@@ -357,8 +363,12 @@
         AcpiDmDumpDataTable (Table);
         fprintf (stderr, "Acpi Data Table [%4.4s] decoded\n",
             Table->Signature);
-        fprintf (stderr, "Formatted output:  %s - %u bytes\n",
-            DisasmFilename, CmGetFileSize (File));
+
+        if (File)
+        {
+            fprintf (stderr, "Formatted output:  %s - %u bytes\n",
+                DisasmFilename, CmGetFileSize (File));
+        }
     }
     else
     {
@@ -376,8 +386,11 @@
         {
             AcpiOsPrintf ("/**** Before second load\n");
 
-            NsSetupNamespaceListing (File);
-            NsDisplayNamespace ();
+            if (File)
+            {
+                NsSetupNamespaceListing (File);
+                NsDisplayNamespace ();
+            }
             AcpiOsPrintf ("*****/\n");
         }
 
@@ -457,8 +470,11 @@
             if (AslCompilerdebug)
             {
                 AcpiOsPrintf ("/**** After second load and resource conversion\n");
-                NsSetupNamespaceListing (File);
-                NsDisplayNamespace ();
+                if (File)
+                {
+                    NsSetupNamespaceListing (File);
+                    NsDisplayNamespace ();
+                }
                 AcpiOsPrintf ("*****/\n");
 
                 AcpiDmDumpTree (AcpiGbl_ParseOpRoot);
@@ -476,7 +492,7 @@
 
         /* Optional displays */
 
-        if (AcpiGbl_DbOpt_disasm)
+        if (AcpiGbl_DbOpt_Disasm)
         {
             /* This is the real disassembly */
 
@@ -487,8 +503,11 @@
             AcpiDmDumpDataTable (Table);
 
             fprintf (stderr, "Disassembly completed\n");
-            fprintf (stderr, "ASL Output:    %s - %u bytes\n",
-                DisasmFilename, CmGetFileSize (File));
+            if (File)
+            {
+                fprintf (stderr, "ASL Output:    %s - %u bytes\n",
+                    DisasmFilename, CmGetFileSize (File));
+            }
 
             if (Gbl_MapfileFlag)
             {
@@ -502,12 +521,12 @@
 
 Cleanup:
 
-    if (Table && !AcpiUtIsAmlTable (Table))
+    if (Table && !AcpiGbl_ForceAmlDisassembly &&!AcpiUtIsAmlTable (Table))
     {
         ACPI_FREE (Table);
     }
 
-    if (OutToFile && File)
+    if (File)
     {
         if (AslCompilerdebug) /* Display final namespace, with transforms */
         {
@@ -530,6 +549,7 @@
  * FUNCTION:    AdDisassemblerHeader
  *
  * PARAMETERS:  Filename            - Input file for the table
+ *              TableType           - Either AML or DataTable
  *
  * RETURN:      None
  *
@@ -540,16 +560,34 @@
 
 void
 AdDisassemblerHeader (
-    char                    *Filename)
+    char                    *Filename,
+    UINT8                   TableType)
 {
     time_t                  Timer;
 
+
     time (&Timer);
 
     /* Header and input table info */
 
     AcpiOsPrintf ("/*\n");
-    AcpiOsPrintf (ACPI_COMMON_HEADER ("AML Disassembler", " * "));
+    AcpiOsPrintf (ACPI_COMMON_HEADER (AML_DISASSEMBLER_NAME, " * "));
+
+    if (TableType == ACPI_IS_AML_TABLE)
+    {
+        if (AcpiGbl_CstyleDisassembly)
+        {
+            AcpiOsPrintf (
+                " * Disassembling to symbolic ASL+ operators\n"
+                " *\n");
+        }
+        else
+        {
+            AcpiOsPrintf (
+                " * Disassembling to non-symbolic legacy ASL operators\n"
+                " *\n");
+        }
+    }
 
     AcpiOsPrintf (" * Disassembly of %s, %s", Filename, ctime (&Timer));
     AcpiOsPrintf (" *\n");
@@ -582,7 +620,7 @@
     /*
      * Print file header and dump original table header
      */
-    AdDisassemblerHeader (Filename);
+    AdDisassemblerHeader (Filename, ACPI_IS_AML_TABLE);
 
     AcpiOsPrintf (" * Original Table Header:\n");
     AcpiOsPrintf (" *     Signature        \"%4.4s\"\n",    Table->Signature);
@@ -690,7 +728,7 @@
         return (AE_NOT_EXIST);
     }
 
-    if (!AcpiGbl_DbOpt_verbose)
+    if (!AcpiGbl_DbOpt_Verbose)
     {
         AdCreateTableHeader (Filename, Table);
     }
@@ -698,7 +736,7 @@
     AcpiDmDisassemble (NULL, AcpiGbl_ParseOpRoot, ACPI_UINT32_MAX);
     MpEmitMappingInfo ();
 
-    if (AcpiGbl_DbOpt_verbose)
+    if (AcpiGbl_DbOpt_Verbose)
     {
         AcpiOsPrintf ("\n\nTable Header:\n");
         AcpiUtDebugDumpBuffer ((UINT8 *) Table, sizeof (ACPI_TABLE_HEADER),
@@ -713,6 +751,43 @@
 }
 
 
+/*******************************************************************************
+ *
+ * FUNCTION:    AdStoreTable
+ *
+ * PARAMETERS:  Table               - Table header
+ *              TableIndex          - Where the table index is returned
+ *
+ * RETURN:      Status and table index.
+ *
+ * DESCRIPTION: Add an ACPI table to the global table list
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AdStoreTable (
+    ACPI_TABLE_HEADER       *Table,
+    UINT32                  *TableIndex)
+{
+    ACPI_STATUS             Status;
+    ACPI_TABLE_DESC         *TableDesc;
+
+
+    Status = AcpiTbGetNextTableDescriptor (TableIndex, &TableDesc);
+    if (ACPI_FAILURE (Status))
+    {
+        return (Status);
+    }
+
+    /* Initialize added table */
+
+    AcpiTbInitTableDescriptor (TableDesc, ACPI_PTR_TO_PHYSADDR (Table),
+        ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, Table);
+    AcpiTbValidateTable (TableDesc);
+    return (AE_OK);
+}
+
+
 /******************************************************************************
  *
  * FUNCTION:    AdGetLocalTables
@@ -750,8 +825,7 @@
 
     /* Store DSDT in the Table Manager */
 
-    Status = AcpiTbStoreTable (0, NewTable, NewTable->Length,
-                0, &TableIndex);
+    Status = AdStoreTable (NewTable, &TableIndex);
     if (ACPI_FAILURE (Status))
     {
         fprintf (stderr, "Could not store DSDT\n");
@@ -844,9 +918,7 @@
 
     if (LoadTable)
     {
-        Status = AcpiTbStoreTable ((ACPI_PHYSICAL_ADDRESS) Table, Table,
-                    Table->Length, ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL,
-                    &TableIndex);
+        Status = AdStoreTable (Table, &TableIndex);
         if (ACPI_FAILURE (Status))
         {
             return (Status);
--- a/sys/external/bsd/acpica/dist/common/adwalk.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/adwalk.c	Mon Apr 13 17:21:01 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/common/ahids.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/ahids.c	Mon Apr 13 17:21:01 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/common/ahpredef.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/ahpredef.c	Mon Apr 13 17:21:01 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/common/ahuuids.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/ahuuids.c	Mon Apr 13 17:21:01 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/common/cmfsize.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/cmfsize.c	Mon Apr 13 17:21:01 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/common/dmextern.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmextern.c	Mon Apr 13 17:21:01 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/common/dmrestag.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmrestag.c	Mon Apr 13 17:21:01 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/common/dmtable.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtable.c	Mon Apr 13 17:21:01 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
@@ -241,13 +241,6 @@
     "Unknown SubTable Type"         /* Reserved */
 };
 
-static const char           *AcpiDmSlicSubnames[] =
-{
-    "Public Key Structure",
-    "Windows Marker Structure",
-    "Unknown SubTable Type"         /* Reserved */
-};
-
 static const char           *AcpiDmSratSubnames[] =
 {
     "Processor Local APIC/SAPIC Affinity",
@@ -339,6 +332,7 @@
     {ACPI_SIG_MCHI, AcpiDmTableInfoMchi,    NULL,           NULL,           TemplateMchi,   "Management Controller Host Interface table"},
     {ACPI_SIG_MPST, AcpiDmTableInfoMpst,    AcpiDmDumpMpst, DtCompileMpst,  TemplateMpst,   "Memory Power State Table"},
     {ACPI_SIG_MSCT, NULL,                   AcpiDmDumpMsct, DtCompileMsct,  TemplateMsct,   "Maximum System Characteristics Table"},
+    {ACPI_SIG_MSDM, NULL,                   AcpiDmDumpSlic, DtCompileSlic,  TemplateMsdm,   "Microsoft Data Management table"},
     {ACPI_SIG_MTMR, NULL,                   AcpiDmDumpMtmr, DtCompileMtmr,  TemplateMtmr,   "MID Timer Table"},
     {ACPI_SIG_PCCT, AcpiDmTableInfoPcct,    AcpiDmDumpPcct, DtCompilePcct,  TemplatePcct,   "Platform Communications Channel Table"},
     {ACPI_SIG_PMTT, NULL,                   AcpiDmDumpPmtt, DtCompilePmtt,  TemplatePmtt,   "Platform Memory Topology Table"},
@@ -515,10 +509,20 @@
             }
             else
             {
-                AcpiOsPrintf ("\n**** Unknown ACPI table type [%4.4s]\n\n",
+                AcpiOsPrintf ("\n**** Unknown ACPI table signature [%4.4s]\n\n",
+                    Table->Signature);
+
+                fprintf (stderr, "Unknown ACPI table signature [%4.4s], ",
                     Table->Signature);
-                fprintf (stderr, "Unknown ACPI table signature [%4.4s], decoding header only\n",
-                    Table->Signature);
+
+                if (!AcpiGbl_ForceAmlDisassembly)
+                {
+                    fprintf (stderr, "decoding ACPI table header only\n");
+                }
+                else
+                {
+                    fprintf (stderr, "assuming table contains valid AML code\n");
+                }
             }
         }
         else if (TableData->TableHandler)
@@ -686,6 +690,7 @@
     UINT32                  ByteLength;
     UINT8                   Temp8;
     UINT16                  Temp16;
+    UINT32                  Temp32;
     UINT64                  Value;
     ACPI_DMTABLE_DATA       *TableData;
     const char              *Name;
@@ -715,7 +720,8 @@
         if ((CurrentOffset >= TableLength) ||
             (SubtableLength && (Info->Offset >= SubtableLength)))
         {
-            AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
+            AcpiOsPrintf (
+                "**** ACPI table terminates in the middle of a data structure! (dump table)\n");
             return (AE_BAD_DATA);
         }
 
@@ -760,7 +766,6 @@
         case ACPI_DMT_UINT32:
         case ACPI_DMT_NAME4:
         case ACPI_DMT_SIG:
-        case ACPI_DMT_SLIC:
         case ACPI_DMT_LPIT:
 
             ByteLength = 4;
@@ -805,6 +810,12 @@
             ByteLength = 128;
             break;
 
+        case ACPI_DMT_BUFFER:
+        case ACPI_DMT_RAW_BUFFER:
+
+            ByteLength = SubtableLength;
+            break;
+
         case ACPI_DMT_STRING:
 
             ByteLength = ACPI_STRLEN (ACPI_CAST_PTR (char, Target)) + 1;
@@ -838,7 +849,8 @@
 
         if (CurrentOffset + ByteLength > TableLength)
         {
-            AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
+            AcpiOsPrintf (
+                "**** ACPI table terminates in the middle of a data structure!\n");
             return (AE_BAD_DATA);
         }
 
@@ -1005,8 +1017,9 @@
 
             AcpiOsPrintf ("%2.2X", *Target);
             Temp8 = AcpiDmGenerateChecksum (Table,
-                        ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
-                        ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
+                ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Length,
+                ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum);
+
             if (Temp8 != ACPI_CAST_PTR (ACPI_TABLE_HEADER, Table)->Checksum)
             {
                 AcpiOsPrintf (
@@ -1032,7 +1045,7 @@
                 Temp8 = ACPI_GAS_WIDTH_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, Temp8, AcpiDmGasAccessWidth[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGasAccessWidth[Temp8]);
             break;
 
         case ACPI_DMT_GAS:
@@ -1069,7 +1082,8 @@
                 Temp16 = ACPI_DMAR_TYPE_RESERVED;
             }
 
-            AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), AcpiDmDmarSubnames[Temp16]);
+            AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
+                AcpiDmDmarSubnames[Temp16]);
             break;
 
         case ACPI_DMT_DMAR_SCOPE:
@@ -1082,7 +1096,8 @@
                 Temp8 = ACPI_DMAR_SCOPE_TYPE_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmDmarScope[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmDmarScope[Temp8]);
             break;
 
         case ACPI_DMT_EINJACT:
@@ -1095,7 +1110,8 @@
                 Temp8 = ACPI_EINJ_ACTION_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmEinjActions[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmEinjActions[Temp8]);
             break;
 
         case ACPI_DMT_EINJINST:
@@ -1108,7 +1124,8 @@
                 Temp8 = ACPI_EINJ_INSTRUCTION_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmEinjInstructions[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmEinjInstructions[Temp8]);
             break;
 
         case ACPI_DMT_ERSTACT:
@@ -1121,7 +1138,8 @@
                 Temp8 = ACPI_ERST_ACTION_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmErstActions[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmErstActions[Temp8]);
             break;
 
         case ACPI_DMT_ERSTINST:
@@ -1134,7 +1152,8 @@
                 Temp8 = ACPI_ERST_INSTRUCTION_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmErstInstructions[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmErstInstructions[Temp8]);
             break;
 
         case ACPI_DMT_GTDT:
@@ -1147,7 +1166,8 @@
                 Temp8 = ACPI_GTDT_TYPE_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmGtdtSubnames[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmGtdtSubnames[Temp8]);
             break;
 
         case ACPI_DMT_HEST:
@@ -1160,12 +1180,15 @@
                 Temp16 = ACPI_HEST_TYPE_RESERVED;
             }
 
-            AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target), AcpiDmHestSubnames[Temp16]);
+            AcpiOsPrintf (UINT16_FORMAT, ACPI_GET16 (Target),
+                AcpiDmHestSubnames[Temp16]);
             break;
 
         case ACPI_DMT_HESTNTFY:
 
-            AcpiOsPrintf (STRING_FORMAT, "Hardware Error Notification Structure");
+            AcpiOsPrintf (STRING_FORMAT,
+                "Hardware Error Notification Structure");
+
             AcpiDmDumpTable (TableLength, CurrentOffset, Target,
                 sizeof (ACPI_HEST_NOTIFY), AcpiDmTableInfoHestNotify);
             AcpiOsPrintf ("\n");
@@ -1182,7 +1205,8 @@
                 Temp8 = ACPI_HEST_NOTIFY_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmHestNotifySubnames[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmHestNotifySubnames[Temp8]);
             break;
 
         case ACPI_DMT_MADT:
@@ -1195,7 +1219,8 @@
                 Temp8 = ACPI_MADT_TYPE_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmMadtSubnames[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmMadtSubnames[Temp8]);
             break;
 
         case ACPI_DMT_PCCT:
@@ -1208,7 +1233,8 @@
                 Temp8 = ACPI_PCCT_TYPE_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmPcctSubnames[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmPcctSubnames[Temp8]);
             break;
 
         case ACPI_DMT_PMTT:
@@ -1221,20 +1247,20 @@
                 Temp8 = ACPI_PMTT_TYPE_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmPmttSubnames[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmPmttSubnames[Temp8]);
             break;
 
-        case ACPI_DMT_SLIC:
-
-            /* SLIC subtable types */
+        case ACPI_DMT_RAW_BUFFER:
+            /*
+             * Currently only used for SLIC table
+             */
+            AcpiOsPrintf ("/* Proprietary data structure */ ");
 
-            Temp8 = *Target;
-            if (Temp8 > ACPI_SLIC_TYPE_RESERVED)
-            {
-                Temp8 = ACPI_SLIC_TYPE_RESERVED;
-            }
-
-            AcpiOsPrintf (UINT32_FORMAT, *Target, AcpiDmSlicSubnames[Temp8]);
+            AcpiDmDumpBuffer (Table, sizeof (ACPI_TABLE_HEADER),
+                ByteLength, sizeof (ACPI_TABLE_HEADER),
+                "Licensing Data", TRUE);
+            AcpiOsPrintf ("\n");
             break;
 
         case ACPI_DMT_SRAT:
@@ -1247,7 +1273,8 @@
                 Temp8 = ACPI_SRAT_TYPE_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmSratSubnames[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmSratSubnames[Temp8]);
             break;
 
         case ACPI_DMT_FADTPM:
@@ -1260,7 +1287,8 @@
                 Temp8 = ACPI_FADT_PM_RESERVED;
             }
 
-            AcpiOsPrintf (UINT8_FORMAT, *Target, AcpiDmFadtProfiles[Temp8]);
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmFadtProfiles[Temp8]);
             break;
 
         case ACPI_DMT_IVRS:
@@ -1295,26 +1323,14 @@
 
             /* LPIT subtable types */
 
-            Temp8 = *Target;
-            switch (Temp8)
+            Temp32 = ACPI_GET32 (Target);
+            if (Temp32 > ACPI_LPIT_TYPE_RESERVED)
             {
-            case ACPI_LPIT_TYPE_NATIVE_CSTATE:
-
-                Name = AcpiDmLpitSubnames[0];
-                break;
-
-            case ACPI_LPIT_TYPE_SIMPLE_IO:
-
-                Name = AcpiDmLpitSubnames[1];
-                break;
-
-            default:
-
-                Name = AcpiDmLpitSubnames[2];
-                break;
+                Temp32 = ACPI_LPIT_TYPE_RESERVED;
             }
 
-            AcpiOsPrintf (UINT32_FORMAT, *Target, Name);
+            AcpiOsPrintf (UINT32_FORMAT, ACPI_GET32 (Target),
+                AcpiDmLpitSubnames[Temp32]);
             break;
 
         case ACPI_DMT_EXIT:
@@ -1331,8 +1347,10 @@
 
     if (TableOffset && !SubtableLength)
     {
-        /* If this table is not the main table, subtable must have valid length */
-
+        /*
+         * If this table is not the main table, the subtable must have a
+         * valid length
+         */
         AcpiOsPrintf ("Invalid zero length subtable\n");
         return (AE_BAD_DATA);
     }
--- a/sys/external/bsd/acpica/dist/common/dmtbdump.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtbdump.c	Mon Apr 13 17:21:01 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
@@ -59,14 +59,6 @@
     UINT32                  Revision,
     UINT32                  Length);
 
-static void
-AcpiDmDumpBuffer (
-    void                    *Table,
-    UINT32                  BufferOffset,
-    UINT32                  Length,
-    UINT32                  AbsoluteOffset,
-    char                    *Header);
-
 
 /*******************************************************************************
  *
@@ -78,6 +70,7 @@
  *              AbsoluteOffset      - Offset of buffer in the main ACPI table
  *              Header              - Name of the buffer field (printed on the
  *                                    first line only.)
+ *              MultiLine           - TRUE if a large, multi-line buffer
  *
  * RETURN:      None
  *
@@ -86,13 +79,14 @@
  *
  ******************************************************************************/
 
-static void
+void
 AcpiDmDumpBuffer (
     void                    *Table,
     UINT32                  BufferOffset,
     UINT32                  Length,
     UINT32                  AbsoluteOffset,
-    char                    *Header)
+    char                    *Header,
+    BOOLEAN                 MultiLine)
 {
     UINT8                   *Buffer;
     UINT32                  i;
@@ -110,10 +104,19 @@
     {
         if (!(i % 16))
         {
-            AcpiOsPrintf ("\n");
-            AcpiDmLineHeader (AbsoluteOffset,
-                ((Length - i) > 16) ? 16 : (Length - i), Header);
-            Header = NULL;
+            if (MultiLine)
+            {
+                /* Insert a backslash - line continuation character */
+
+                AcpiOsPrintf ("\\\n    ");
+            }
+            else
+            {
+                AcpiOsPrintf ("\n");
+                AcpiDmLineHeader (AbsoluteOffset,
+                    ((Length - i) > 16) ? 16 : (Length - i), Header);
+                Header = NULL;
+            }
         }
 
         AcpiOsPrintf ("%.02X ", *Buffer);
@@ -526,7 +529,7 @@
                 DataOffset++;
                 if (DataOffset > Table->Length)
                 {
-                    AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure!\n");
+                    AcpiOsPrintf ("**** ACPI table terminates in the middle of a data structure! (ASF! table)\n");
                     return;
                 }
             }
@@ -692,7 +695,7 @@
             InfoLength = SubSubTable->Length - SubSubOffset;
 
             AcpiDmDumpBuffer (SubSubTable, SubSubOffset, InfoLength,
-                Offset + SubOffset + SubSubOffset, "ResourceInfo");
+                Offset + SubOffset + SubSubOffset, "ResourceInfo", FALSE);
             SubSubOffset += InfoLength;
 
             /* Point to next sub-subtable */
@@ -812,7 +815,7 @@
         if (SubTable->OemDataOffset)
         {
             AcpiDmDumpBuffer (SubTable, SubTable->OemDataOffset, SubTable->OemDataLength,
-                Offset + SubTable->OemDataOffset, "OEM Data");
+                Offset + SubTable->OemDataOffset, "OEM Data", FALSE);
         }
 
         /* Point to next subtable */
@@ -2535,67 +2538,8 @@
 AcpiDmDumpSlic (
     ACPI_TABLE_HEADER       *Table)
 {
-    ACPI_STATUS             Status;
-    UINT32                  Offset = sizeof (ACPI_TABLE_SLIC);
-    ACPI_SLIC_HEADER        *SubTable;
-    ACPI_DMTABLE_INFO       *InfoTable;
-
-
-    /* There is no main SLIC table, only subtables */
-
-    SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, Table, Offset);
-    while (Offset < Table->Length)
-    {
-        /* Common subtable header */
-
-        AcpiOsPrintf ("\n");
-        Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
-                    SubTable->Length, AcpiDmTableInfoSlicHdr);
-        if (ACPI_FAILURE (Status))
-        {
-            return;
-        }
-
-        switch (SubTable->Type)
-        {
-        case ACPI_SLIC_TYPE_PUBLIC_KEY:
-
-            InfoTable = AcpiDmTableInfoSlic0;
-            break;
-
-        case ACPI_SLIC_TYPE_WINDOWS_MARKER:
-
-            InfoTable = AcpiDmTableInfoSlic1;
-            break;
-
-        default:
-
-            AcpiOsPrintf ("\n**** Unknown SLIC subtable type 0x%X\n", SubTable->Type);
-
-            /* Attempt to continue */
-
-            if (!SubTable->Length)
-            {
-                AcpiOsPrintf ("Invalid zero length subtable\n");
-                return;
-            }
-            goto NextSubTable;
-        }
-
-        AcpiOsPrintf ("\n");
-        Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
-                    SubTable->Length, InfoTable);
-        if (ACPI_FAILURE (Status))
-        {
-            return;
-        }
-
-NextSubTable:
-        /* Point to next subtable */
-
-        Offset += SubTable->Length;
-        SubTable = ACPI_ADD_PTR (ACPI_SLIC_HEADER, SubTable, SubTable->Length);
-    }
+    AcpiDmDumpTable (Table->Length, sizeof (ACPI_TABLE_HEADER), Table,
+                Table->Length - sizeof (*Table), AcpiDmTableInfoSlic);
 }
 
 
--- a/sys/external/bsd/acpica/dist/common/getopt.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/common/getopt.c	Mon Apr 13 17:21:01 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/aslascii.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslascii.c	Mon Apr 13 17:21:01 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/aslbtypes.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslbtypes.c	Mon Apr 13 17:21:01 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
@@ -374,6 +374,12 @@
     UINT32                  ThisNodeBtype = 0;
 
 
+    if (!Op)
+    {
+        AcpiOsPrintf ("Null Op in AnGetBtype\n");
+        return (ACPI_UINT32_MAX);
+    }
+
     if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG)     ||
         (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING)  ||
         (Op->Asl.ParseOpcode == PARSEOP_METHODCALL))
--- a/sys/external/bsd/acpica/dist/compiler/aslcodegen.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcodegen.c	Mon Apr 13 17:21:01 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
@@ -107,6 +107,12 @@
 
     TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
         CgAmlWriteWalk, NULL, NULL);
+
+    DbgPrint (ASL_TREE_OUTPUT,
+        "%*s Value    P_Op A_Op OpLen PByts Len  SubLen PSubLen OpPtr"
+        "    Parent   Child    Next     Flags    AcTyp    Final Col L\n",
+        76, " ");
+
     CgCloseTable ();
 }
 
@@ -138,7 +144,8 @@
         DbgPrint (ASL_TREE_OUTPUT,
             "Final parse tree used for AML output:\n");
         DbgPrint (ASL_TREE_OUTPUT,
-            "%*s Value    P_Op A_Op OpLen PByts Len  SubLen PSubLen OpPtr    Child    Parent   Flags    AcTyp    Final Col L\n",
+            "%*s Value    P_Op A_Op OpLen PByts Len  SubLen PSubLen OpPtr"
+            "    Parent   Child    Next     Flags    AcTyp    Final Col L\n",
             76, " ");
     }
 
@@ -161,7 +168,8 @@
     }
 
     DbgPrint (ASL_TREE_OUTPUT,
-    "%08X %04X %04X %01X     %04X  %04X %04X   %04X    %08X %08X %08X %08X %08X %04X  %02d  %02d\n",
+    "%08X %04X %04X %01X     %04X  %04X %04X   %04X    "
+    "%08X %08X %08X %08X %08X %08X %04X  %02d  %02d\n",
             /* 1  */ (UINT32) Op->Asl.Value.Integer,
             /* 2  */ Op->Asl.ParseOpcode,
             /* 3  */ Op->Asl.AmlOpcode,
@@ -171,13 +179,14 @@
             /* 7  */ Op->Asl.AmlSubtreeLength,
             /* 8  */ Op->Asl.Parent ? Op->Asl.Parent->Asl.AmlSubtreeLength : 0,
             /* 9  */ Op,
-            /* 10 */ Op->Asl.Child,
-            /* 11 */ Op->Asl.Parent,
-            /* 12 */ Op->Asl.CompileFlags,
-            /* 13 */ Op->Asl.AcpiBtype,
-            /* 14 */ Op->Asl.FinalAmlLength,
-            /* 15 */ Op->Asl.Column,
-            /* 16 */ Op->Asl.LineNumber);
+            /* 10 */ Op->Asl.Parent,
+            /* 11 */ Op->Asl.Child,
+            /* 12 */ Op->Asl.Next,
+            /* 13 */ Op->Asl.CompileFlags,
+            /* 14 */ Op->Asl.AcpiBtype,
+            /* 15 */ Op->Asl.FinalAmlLength,
+            /* 16 */ Op->Asl.Column,
+            /* 17 */ Op->Asl.LineNumber);
 
     /* Generate the AML for this node */
 
@@ -451,7 +460,7 @@
 
     /* Compiler version */
 
-    TableHeader.AslCompilerRevision = ASL_REVISION;
+    TableHeader.AslCompilerRevision = ACPI_CA_VERSION;
 
     /* Table length. Checksum zero for now, will rewrite later */
 
--- a/sys/external/bsd/acpica/dist/compiler/aslcompiler.h	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcompiler.h	Mon Apr 13 17:21:01 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
@@ -543,6 +543,27 @@
 
 
 /*
+ * aslprintf - Printf/Fprintf macros
+ */
+void
+OpcDoPrintf (
+    ACPI_PARSE_OBJECT       *Op);
+
+void
+OpcDoFprintf (
+    ACPI_PARSE_OBJECT       *Op);
+
+
+/*
+ * aslprune - parse tree pruner
+ */
+void
+AslPruneParseTree (
+    UINT32                  PruneDepth,
+    UINT32                  Type);
+
+
+/*
  * aslcodegen - code generation
  */
 void
@@ -665,6 +686,10 @@
     UINT32                  ParseOpcode);
 
 void
+TrPrintNodeCompileFlags (
+    UINT32                  Flags);
+
+void
 TrReleaseNode (
     ACPI_PARSE_OBJECT       *Op);
 
@@ -684,6 +709,20 @@
     UINT32                  ParseOpcode);
 
 ACPI_PARSE_OBJECT *
+TrCreateNullTarget (
+    void);
+
+ACPI_PARSE_OBJECT *
+TrCreateAssignmentNode (
+    ACPI_PARSE_OBJECT       *Target,
+    ACPI_PARSE_OBJECT       *Source);
+
+ACPI_PARSE_OBJECT *
+TrCreateTargetOperand (
+    ACPI_PARSE_OBJECT       *OriginalOp,
+    ACPI_PARSE_OBJECT       *ParentOp);
+
+ACPI_PARSE_OBJECT *
 TrCreateValuedLeafNode (
     UINT32                  ParseOpcode,
     UINT64                  Value);
--- a/sys/external/bsd/acpica/dist/compiler/asldefine.h	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asldefine.h	Mon Apr 13 17:21:01 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
@@ -48,9 +48,8 @@
 /*
  * Compiler versions and names
  */
-#define ASL_REVISION                ACPI_CA_VERSION
-#define ASL_COMPILER_NAME           "ASL Optimizing Compiler"
-#define AML_DISASSEMBLER_NAME       "AML Disassembler"
+#define ASL_COMPILER_NAME           "ASL+ Optimizing Compiler"
+#define AML_DISASSEMBLER_NAME       "AML/ASL+ Disassembler"
 #define ASL_INVOCATION_NAME         "iasl"
 #define ASL_CREATOR_ID              "INTL"
 
--- a/sys/external/bsd/acpica/dist/compiler/aslfold.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslfold.c	Mon Apr 13 17:21:01 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
@@ -76,199 +76,20 @@
     ACPI_PARSE_OBJECT       *Op,
     UINT64                  Value);
 
-
-/*******************************************************************************
- *
- * FUNCTION:    OpcAmlEvaluationWalk1
- *
- * PARAMETERS:  ASL_WALK_CALLBACK
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Descending callback for AML execution of constant subtrees
- *
- ******************************************************************************/
-
 static ACPI_STATUS
-OpcAmlEvaluationWalk1 (
+TrTransformToStoreOp (
     ACPI_PARSE_OBJECT       *Op,
-    UINT32                  Level,
-    void                    *Context)
-{
-    ACPI_WALK_STATE         *WalkState = Context;
-    ACPI_STATUS             Status;
-    ACPI_PARSE_OBJECT       *OutOp;
-
-
-    WalkState->Op = Op;
-    WalkState->Opcode = Op->Common.AmlOpcode;
-    WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
-
-    /* Copy child pointer to Arg for compatibility with Interpreter */
-
-    if (Op->Asl.Child)
-    {
-        Op->Common.Value.Arg = Op->Asl.Child;
-    }
-
-    /* Call AML dispatcher */
-
-    Status = AcpiDsExecBeginOp (WalkState, &OutOp);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("Constant interpretation failed - %s\n",
-                        AcpiFormatException (Status));
-    }
-
-    return (Status);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    OpcAmlEvaluationWalk2
- *
- * PARAMETERS:  ASL_WALK_CALLBACK
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Ascending callback for AML execution of constant subtrees
- *
- ******************************************************************************/
+    ACPI_WALK_STATE         *WalkState);
 
 static ACPI_STATUS
-OpcAmlEvaluationWalk2 (
+TrSimpleConstantReduction (
     ACPI_PARSE_OBJECT       *Op,
-    UINT32                  Level,
-    void                    *Context)
-{
-    ACPI_WALK_STATE         *WalkState = Context;
-    ACPI_STATUS             Status;
-
-
-    WalkState->Op = Op;
-    WalkState->Opcode = Op->Common.AmlOpcode;
-    WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
-
-    /* Copy child pointer to Arg for compatibility with Interpreter */
-
-    if (Op->Asl.Child)
-    {
-        Op->Common.Value.Arg = Op->Asl.Child;
-    }
-
-    /* Call AML dispatcher */
-
-    Status = AcpiDsExecEndOp (WalkState);
-    if (ACPI_FAILURE (Status))
-    {
-        AcpiOsPrintf ("Constant interpretation failed - %s\n",
-                        AcpiFormatException (Status));
-    }
-
-    return (Status);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    OpcAmlCheckForConstant
- *
- * PARAMETERS:  ASL_WALK_CALLBACK
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Check one Op for a type 3/4/5 AML opcode
- *
- ******************************************************************************/
-
-static ACPI_STATUS
-OpcAmlCheckForConstant (
-    ACPI_PARSE_OBJECT       *Op,
-    UINT32                  Level,
-    void                    *Context)
-{
-    ACPI_WALK_STATE         *WalkState = Context;
-
-
-    WalkState->Op = Op;
-    WalkState->Opcode = Op->Common.AmlOpcode;
-    WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
-
-    DbgPrint (ASL_PARSE_OUTPUT, "[%.4d] Opcode: %12.12s ",
-                Op->Asl.LogicalLineNumber, Op->Asl.ParseOpName);
+    ACPI_WALK_STATE         *WalkState);
 
-    /*
-     * These opcodes do not appear in the OpcodeInfo table, but
-     * they represent constants, so abort the constant walk now.
-     */
-    if ((WalkState->Opcode == AML_RAW_DATA_BYTE) ||
-        (WalkState->Opcode == AML_RAW_DATA_WORD) ||
-        (WalkState->Opcode == AML_RAW_DATA_DWORD) ||
-        (WalkState->Opcode == AML_RAW_DATA_QWORD))
-    {
-        WalkState->WalkType = ACPI_WALK_CONST_OPTIONAL;
-        return (AE_TYPE);
-    }
-
-    if (!(WalkState->OpInfo->Flags & AML_CONSTANT))
-    {
-        /* The opcode is not a Type 3/4/5 opcode */
-
-        if (Op->Asl.CompileFlags & NODE_IS_TARGET)
-        {
-            DbgPrint (ASL_PARSE_OUTPUT,
-                "**** Valid Target, cannot reduce ****\n");
-        }
-        else
-        {
-            DbgPrint (ASL_PARSE_OUTPUT,
-                "**** Not a Type 3/4/5 opcode ****\n");
-        }
-
-        if (WalkState->WalkType == ACPI_WALK_CONST_OPTIONAL)
-        {
-            /*
-             * We are looking at at normal expression to see if it can be
-             * reduced. It can't. No error
-             */
-            return (AE_TYPE);
-        }
-
-        /*
-         * This is an expression that MUST reduce to a constant, and it
-         * can't be reduced. This is an error
-         */
-        if (Op->Asl.CompileFlags & NODE_IS_TARGET)
-        {
-            AslError (ASL_ERROR, ASL_MSG_INVALID_TARGET, Op,
-                Op->Asl.ParseOpName);
-        }
-        else
-        {
-            AslError (ASL_ERROR, ASL_MSG_INVALID_CONSTANT_OP, Op,
-                Op->Asl.ParseOpName);
-        }
-
-        return (AE_TYPE);
-    }
-
-    /* Debug output */
-
-    DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345");
-
-    if (Op->Asl.CompileFlags & NODE_IS_TARGET)
-    {
-        DbgPrint (ASL_PARSE_OUTPUT, " TARGET");
-    }
-    if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG)
-    {
-        DbgPrint (ASL_PARSE_OUTPUT, " TERMARG");
-    }
-
-    DbgPrint (ASL_PARSE_OUTPUT, "\n");
-    return (AE_OK);
-}
+static void
+TrInstallReducedConstant (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_OPERAND_OBJECT     *ObjDesc);
 
 
 /*******************************************************************************
@@ -291,11 +112,12 @@
 {
     ACPI_WALK_STATE         *WalkState;
     ACPI_STATUS             Status = AE_OK;
-    ACPI_OPERAND_OBJECT     *ObjDesc;
-    ACPI_PARSE_OBJECT       *RootOp;
-    ACPI_PARSE_OBJECT       *OriginalParentOp;
-    UINT8                   WalkType;
+
 
+    if (Op->Asl.CompileFlags == 0)
+    {
+        return (AE_OK);
+    }
 
     /*
      * Only interested in subtrees that could possibly contain
@@ -307,26 +129,6 @@
         return (AE_OK);
     }
 
-    /* Set the walk type based on the reduction used for this op */
-
-    if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG)
-    {
-        /* Op is a TermArg, constant folding is merely optional */
-
-        if (!Gbl_FoldConstants)
-        {
-            return (AE_CTRL_DEPTH);
-        }
-
-        WalkType = ACPI_WALK_CONST_OPTIONAL;
-    }
-    else
-    {
-        /* Op is a DataObject, the expression MUST reduced to a constant */
-
-        WalkType = ACPI_WALK_CONST_REQUIRED;
-    }
-
     /* Create a new walk state */
 
     WalkState = AcpiDsCreateWalkState (0, NULL, NULL, NULL);
@@ -337,8 +139,6 @@
 
     WalkState->NextOp = NULL;
     WalkState->Params = NULL;
-    WalkState->WalkType = WalkType;
-    WalkState->CallerReturnDesc = &ObjDesc;
 
     /*
      * Examine the entire subtree -- all nodes must be constants
@@ -348,161 +148,481 @@
         OpcAmlCheckForConstant, NULL, WalkState);
 
     /*
-     * Did we find an entire subtree that contains all constants and type 3/4/5
-     * opcodes?  (Only AE_OK or AE_TYPE returned from above)
+     * Did we find an entire subtree that contains all constants
+     * and type 3/4/5 opcodes?
      */
-    if (Status == AE_TYPE)
+    switch (Status)
     {
-        /* Subtree cannot be reduced to a constant */
-
-        if (WalkState->WalkType == ACPI_WALK_CONST_OPTIONAL)
-        {
-            AcpiDsDeleteWalkState (WalkState);
-            return (AE_OK);
-        }
+    case AE_OK:
 
-        /* Don't descend any further, and use a default "constant" value */
-
-        Status = AE_CTRL_DEPTH;
-    }
-    else
-    {
-        /* Subtree can be reduced */
+        /* Simple case, like Add(3,4) -> 7 */
 
-        /* Allocate a new temporary root for this subtree */
+        Status = TrSimpleConstantReduction (Op, WalkState);
+        break;
 
-        RootOp = TrAllocateNode (PARSEOP_INTEGER);
-        if (!RootOp)
-        {
-            return (AE_NO_MEMORY);
-        }
+    case AE_CTRL_RETURN_VALUE:
 
-        RootOp->Common.AmlOpcode = AML_INT_EVAL_SUBTREE_OP;
-
-        OriginalParentOp = Op->Common.Parent;
-        Op->Common.Parent = RootOp;
+        /* More complex case, like Add(3,4,Local0) -> Store(7,Local0) */
 
-        /* Hand off the subtree to the AML interpreter */
+        Status = TrTransformToStoreOp (Op, WalkState);
+        break;
 
-        Status = TrWalkParseTree (Op, ASL_WALK_VISIT_TWICE,
-            OpcAmlEvaluationWalk1, OpcAmlEvaluationWalk2, WalkState);
-        Op->Common.Parent = OriginalParentOp;
-
-        /* TBD: we really *should* release the RootOp node */
+    case AE_TYPE:
 
-        if (ACPI_SUCCESS (Status))
-        {
-            TotalFolds++;
-
-            /* Get the final result */
+        AcpiDsDeleteWalkState (WalkState);
+        return (AE_OK);
 
-            Status = AcpiDsResultPop (&ObjDesc, WalkState);
-        }
-
-        /* Check for error from the ACPICA core */
-
-        if (ACPI_FAILURE (Status))
-        {
-            AslCoreSubsystemError (Op, Status,
-                "Failure during constant evaluation", FALSE);
-        }
+    default:
+        AcpiDsDeleteWalkState (WalkState);
+        break;
     }
 
     if (ACPI_FAILURE (Status))
     {
+        DbgPrint (ASL_PARSE_OUTPUT, "Cannot resolve, %s\n",
+            AcpiFormatException (Status));
+
         /* We could not resolve the subtree for some reason */
 
         AslError (ASL_ERROR, ASL_MSG_CONSTANT_EVALUATION, Op,
-            Op->Asl.ParseOpName);
+            (char *) AcpiFormatException (Status));
 
         /* Set the subtree value to ZERO anyway. Eliminates further errors */
 
         OpcUpdateIntegerNode (Op, 0);
     }
-    else
-    {
-        AslError (ASL_OPTIMIZATION, ASL_MSG_CONSTANT_FOLDED, Op,
-            Op->Asl.ParseOpName);
+
+    /* Abort the walk of this subtree, we are done with it */
+
+    return (AE_CTRL_DEPTH);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcAmlCheckForConstant
+ *
+ * PARAMETERS:  ASL_WALK_CALLBACK
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Check one Op for a type 3/4/5 AML opcode
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+OpcAmlCheckForConstant (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    void                    *Context)
+{
+    ACPI_WALK_STATE         *WalkState = Context;
+    ACPI_STATUS             Status = AE_OK;
+
+
+    WalkState->Op = Op;
+    WalkState->Opcode = Op->Common.AmlOpcode;
+    WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+
+    DbgPrint (ASL_PARSE_OUTPUT, "[%.4d] Opcode: %12.12s ",
+        Op->Asl.LogicalLineNumber, Op->Asl.ParseOpName);
 
-        /*
-         * Because we know we executed type 3/4/5 opcodes above, we know that
-         * the result must be either an Integer, String, or Buffer.
-         */
-        switch (ObjDesc->Common.Type)
+    /*
+     * TBD: Ignore buffer constants for now. The problem is that these
+     * constants have been transformed into RAW_DATA at this point, from
+     * the parse tree transform process which currently happens before
+     * the constant folding process. We may need to defer this transform
+     * for buffer until after the constant folding.
+     */
+    if (WalkState->Opcode == AML_BUFFER_OP)
+    {
+        Status = AE_TYPE;
+        goto CleanupAndExit;
+    }
+
+    /*
+     * These opcodes do not appear in the OpcodeInfo table, but
+     * they represent constants, so abort the constant walk now.
+     */
+    if ((WalkState->Opcode == AML_RAW_DATA_BYTE) ||
+        (WalkState->Opcode == AML_RAW_DATA_WORD) ||
+        (WalkState->Opcode == AML_RAW_DATA_DWORD) ||
+        (WalkState->Opcode == AML_RAW_DATA_QWORD))
+    {
+        DbgPrint (ASL_PARSE_OUTPUT, "RAW DATA");
+        Status = AE_TYPE;
+        goto CleanupAndExit;
+    }
+
+    /* Type 3/4/5 opcodes have the AML_CONSTANT flag set */
+
+    if (!(WalkState->OpInfo->Flags & AML_CONSTANT))
+    {
+        /* Not 3/4/5 opcode, but maybe can convert to STORE */
+
+        if (Op->Asl.CompileFlags & NODE_IS_TARGET)
         {
-        case ACPI_TYPE_INTEGER:
-
-            OpcUpdateIntegerNode (Op, ObjDesc->Integer.Value);
-
             DbgPrint (ASL_PARSE_OUTPUT,
-                "Constant expression reduced to (%s) %8.8X%8.8X\n",
-                Op->Asl.ParseOpName,
-                ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
-            break;
+                "**** Valid Target, transform to Store ****\n");
+            return (AE_CTRL_RETURN_VALUE);
+        }
+
+        /* Expression cannot be reduced */
 
-        case ACPI_TYPE_STRING:
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "**** Not a Type 3/4/5 opcode (%s) ****",
+             Op->Asl.ParseOpName);
+
+        Status = AE_TYPE;
+        goto CleanupAndExit;
+    }
+
+    /* Debug output */
+
+    DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345");
 
-            Op->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
-            Op->Common.AmlOpcode = AML_STRING_OP;
-            Op->Asl.AmlLength = ACPI_STRLEN (ObjDesc->String.Pointer) + 1;
-            Op->Common.Value.String = ObjDesc->String.Pointer;
+    if (Op->Asl.CompileFlags & NODE_IS_TARGET)
+    {
+        if (Op->Asl.ParseOpcode == PARSEOP_ZERO)
+        {
+            DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " NULL TARGET");
+        }
+        else
+        {
+            DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " VALID TARGET");
+        }
+    }
+    if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG)
+    {
+        DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " TERMARG");
+    }
 
-            DbgPrint (ASL_PARSE_OUTPUT,
-                "Constant expression reduced to (STRING) %s\n",
-                Op->Common.Value.String);
+CleanupAndExit:
+
+    /* Dump the node compile flags also */
 
-            break;
+    TrPrintNodeCompileFlags (Op->Asl.CompileFlags);
+    DbgPrint (ASL_PARSE_OUTPUT, "\n");
+    return (Status);
+}
 
-        case ACPI_TYPE_BUFFER:
 
-            Op->Asl.ParseOpcode = PARSEOP_BUFFER;
-            Op->Common.AmlOpcode = AML_BUFFER_OP;
-            Op->Asl.CompileFlags = NODE_AML_PACKAGE;
-            UtSetParseOpName (Op);
+/*******************************************************************************
+ *
+ * FUNCTION:    TrSimpleConstantReduction
+ *
+ * PARAMETERS:  Op                  - Parent operator to be transformed
+ *              WalkState           - Current walk state
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Reduce an entire AML operation to a single constant. The
+ *              operation must not have a target operand.
+ *
+ *              Add (32,64) --> 96
+ *
+ ******************************************************************************/
 
-            /* Child node is the buffer length */
+static ACPI_STATUS
+TrSimpleConstantReduction (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_WALK_STATE         *WalkState)
+{
+    ACPI_PARSE_OBJECT       *RootOp;
+    ACPI_PARSE_OBJECT       *OriginalParentOp;
+    ACPI_OPERAND_OBJECT     *ObjDesc;
+    ACPI_STATUS             Status;
 
-            RootOp = TrAllocateNode (PARSEOP_INTEGER);
+
+    DbgPrint (ASL_PARSE_OUTPUT,
+        "Simple subtree constant reduction, operator to constant\n");
+
+    /* Allocate a new temporary root for this subtree */
 
-            RootOp->Asl.AmlOpcode = AML_DWORD_OP;
-            RootOp->Asl.Value.Integer = ObjDesc->Buffer.Length;
-            RootOp->Asl.Parent = Op;
+    RootOp = TrAllocateNode (PARSEOP_INTEGER);
+    if (!RootOp)
+    {
+        return (AE_NO_MEMORY);
+    }
+
+    RootOp->Common.AmlOpcode = AML_INT_EVAL_SUBTREE_OP;
+
+    OriginalParentOp = Op->Common.Parent;
+    Op->Common.Parent = RootOp;
+
+    /* Hand off the subtree to the AML interpreter */
+
+    WalkState->CallerReturnDesc = &ObjDesc;
 
-            (void) OpcSetOptimalIntegerSize (RootOp);
+    Status = TrWalkParseTree (Op, ASL_WALK_VISIT_TWICE,
+        OpcAmlEvaluationWalk1, OpcAmlEvaluationWalk2, WalkState);
+
+    /* Restore original parse tree */
+
+    Op->Common.Parent = OriginalParentOp;
 
-            Op->Asl.Child = RootOp;
-            Op = RootOp;
-            UtSetParseOpName (Op);
+    if (ACPI_FAILURE (Status))
+    {
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "Constant Subtree evaluation(1), %s\n",
+            AcpiFormatException (Status));
+        return (Status);
+    }
+
+    /* Get the final result */
 
-            /* Peer to the child is the raw buffer data */
+    Status = AcpiDsResultPop (&ObjDesc, WalkState);
+    if (ACPI_FAILURE (Status))
+    {
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "Constant Subtree evaluation(2), %s\n",
+            AcpiFormatException (Status));
+        return (Status);
+    }
+
+    TrInstallReducedConstant (Op, ObjDesc);
+
+    UtSetParseOpName (Op);
+    Op->Asl.Child = NULL;
+    return (AE_OK);
+}
 
-            RootOp = TrAllocateNode (PARSEOP_RAW_DATA);
-            RootOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
-            RootOp->Asl.AmlLength = ObjDesc->Buffer.Length;
-            RootOp->Asl.Value.String = (char *) ObjDesc->Buffer.Pointer;
-            RootOp->Asl.Parent = Op->Asl.Parent;
 
-            Op->Asl.Next = RootOp;
-            Op = RootOp;
+/*******************************************************************************
+ *
+ * FUNCTION:    TrTransformToStoreOp
+ *
+ * PARAMETERS:  Op                  - Parent operator to be transformed
+ *              WalkState           - Current walk state
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Transforms a single AML operation with a constant and target
+ *              to a simple store operation:
+ *
+ *              Add (32,64,DATA) --> Store (96,DATA)
+ *
+ ******************************************************************************/
 
-            DbgPrint (ASL_PARSE_OUTPUT,
-                "Constant expression reduced to (BUFFER) length %X\n",
-                ObjDesc->Buffer.Length);
-            break;
+static ACPI_STATUS
+TrTransformToStoreOp (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_WALK_STATE         *WalkState)
+{
+    ACPI_PARSE_OBJECT       *OriginalTarget;
+    ACPI_PARSE_OBJECT       *NewTarget;
+    ACPI_PARSE_OBJECT       *Child1;
+    ACPI_PARSE_OBJECT       *Child2;
+    ACPI_OPERAND_OBJECT     *ObjDesc;
+    ACPI_PARSE_OBJECT       *NewParent;
+    ACPI_PARSE_OBJECT       *OriginalParent;
+    ACPI_STATUS             Status;
+
+
+    DbgPrint (ASL_PARSE_OUTPUT,
+        "Reduction/Transform to StoreOp: Store(Constant, Target)\n");
 
-        default:
+    /* Extract the operands */
+
+    Child1 = Op->Asl.Child;
+    Child2 = Child1->Asl.Next;
 
-            printf ("Unsupported return type: %s\n",
-                AcpiUtGetObjectTypeName (ObjDesc));
-            break;
+    /*
+     * Special case for DIVIDE -- it has two targets. The first
+     * is for the remainder and if present, we will not attempt
+     * to reduce the expression.
+     */
+    if (Op->Asl.ParseOpcode == PARSEOP_DIVIDE)
+    {
+        Child2 = Child2->Asl.Next;
+        if (Child2->Asl.ParseOpcode != PARSEOP_ZERO)
+        {
+            DbgPrint (ASL_PARSE_OUTPUT,
+                "Cannot reduce DIVIDE - has two targets\n\n");
+            return (AE_OK);
         }
     }
 
+    /*
+     * Create a NULL (zero) target so that we can use the
+     * interpreter to evaluate the expression.
+     */
+    NewTarget = TrCreateNullTarget ();
+    NewTarget->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
+
+    /* Handle one-operand cases (NOT, TOBCD, etc.) */
+
+    if (!Child2->Asl.Next)
+    {
+        Child2 = Child1;
+    }
+
+    /* Link in new NULL target as the last operand */
+
+    OriginalTarget = Child2->Asl.Next;
+    Child2->Asl.Next = NewTarget;
+    NewTarget->Asl.Parent = OriginalTarget->Asl.Parent;
+
+    NewParent = TrAllocateNode (PARSEOP_INTEGER);
+    NewParent->Common.AmlOpcode = AML_INT_EVAL_SUBTREE_OP;
+
+    OriginalParent = Op->Common.Parent;
+    Op->Common.Parent = NewParent;
+
+    /* Hand off the subtree to the AML interpreter */
+
+    WalkState->CallerReturnDesc = &ObjDesc;
+
+    Status = TrWalkParseTree (Op, ASL_WALK_VISIT_TWICE,
+        OpcAmlEvaluationWalk1, OpcAmlEvaluationWalk2, WalkState);
+    if (ACPI_FAILURE (Status))
+    {
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "Constant Subtree evaluation(3), %s\n",
+            AcpiFormatException (Status));
+        goto EvalError;
+    }
+
+    /* Get the final result */
+
+    Status = AcpiDsResultPop (&ObjDesc, WalkState);
+    if (ACPI_FAILURE (Status))
+    {
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "Constant Subtree evaluation(4), %s\n",
+            AcpiFormatException (Status));
+        goto EvalError;
+    }
+
+    /* Folded constant is in ObjDesc, store into Child1 */
+
+    TrInstallReducedConstant (Child1, ObjDesc);
+
+    /* Convert operator to STORE */
+
+    Op->Asl.ParseOpcode = PARSEOP_STORE;
+    Op->Asl.AmlOpcode = AML_STORE_OP;
     UtSetParseOpName (Op);
-    Op->Asl.Child = NULL;
+    Op->Common.Parent = OriginalParent;
+
+    /* Truncate any subtree expressions, they have been evaluated */
+
+    Child1->Asl.Child = NULL;
+    Child2->Asl.Child = NULL;
+
+    /* First child is the folded constant */
+
+    /* Second child will be the target */
+
+    Child1->Asl.Next = OriginalTarget;
+    return (AE_OK);
+
+
+EvalError:
+
+    /* Restore original links */
+
+    Op->Common.Parent = OriginalParent;
+    Child2->Asl.Next = OriginalTarget;
+    return (Status);
+}
+
 
-    AcpiDsDeleteWalkState (WalkState);
-    return (AE_CTRL_DEPTH);
+/*******************************************************************************
+ *
+ * FUNCTION:    TrInstallReducedConstant
+ *
+ * PARAMETERS:  Op                  - Parent operator to be transformed
+ *              ObjDesc             - Reduced constant to be installed
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Transform the original operator to a simple constant.
+ *              Handles Integers, Strings, and Buffers.
+ *
+ ******************************************************************************/
+
+static void
+TrInstallReducedConstant (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_OPERAND_OBJECT     *ObjDesc)
+{
+    ACPI_PARSE_OBJECT       *RootOp;
+
+
+    TotalFolds++;
+    AslError (ASL_OPTIMIZATION, ASL_MSG_CONSTANT_FOLDED, Op,
+        Op->Asl.ParseOpName);
+
+    /*
+     * Because we know we executed type 3/4/5 opcodes above, we know that
+     * the result must be either an Integer, String, or Buffer.
+     */
+    switch (ObjDesc->Common.Type)
+    {
+    case ACPI_TYPE_INTEGER:
+
+        OpcUpdateIntegerNode (Op, ObjDesc->Integer.Value);
+
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "Constant expression reduced to (%s) %8.8X%8.8X\n\n",
+            Op->Asl.ParseOpName,
+            ACPI_FORMAT_UINT64 (Op->Common.Value.Integer));
+        break;
+
+    case ACPI_TYPE_STRING:
+
+        Op->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
+        Op->Common.AmlOpcode = AML_STRING_OP;
+        Op->Asl.AmlLength = ACPI_STRLEN (ObjDesc->String.Pointer) + 1;
+        Op->Common.Value.String = ObjDesc->String.Pointer;
+
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "Constant expression reduced to (STRING) %s\n\n",
+            Op->Common.Value.String);
+
+        break;
+
+    case ACPI_TYPE_BUFFER:
+
+        Op->Asl.ParseOpcode = PARSEOP_BUFFER;
+        Op->Common.AmlOpcode = AML_BUFFER_OP;
+        Op->Asl.CompileFlags = NODE_AML_PACKAGE;
+        UtSetParseOpName (Op);
+
+        /* Child node is the buffer length */
+
+        RootOp = TrAllocateNode (PARSEOP_INTEGER);
+
+        RootOp->Asl.AmlOpcode = AML_DWORD_OP;
+        RootOp->Asl.Value.Integer = ObjDesc->Buffer.Length;
+        RootOp->Asl.Parent = Op;
+
+        (void) OpcSetOptimalIntegerSize (RootOp);
+
+        Op->Asl.Child = RootOp;
+        Op = RootOp;
+        UtSetParseOpName (Op);
+
+        /* Peer to the child is the raw buffer data */
+
+        RootOp = TrAllocateNode (PARSEOP_RAW_DATA);
+        RootOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
+        RootOp->Asl.AmlLength = ObjDesc->Buffer.Length;
+        RootOp->Asl.Value.String = (char *) ObjDesc->Buffer.Pointer;
+        RootOp->Asl.Parent = Op->Asl.Parent;
+
+        Op->Asl.Next = RootOp;
+        Op = RootOp;
+
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "Constant expression reduced to (BUFFER) length %X\n\n",
+            ObjDesc->Buffer.Length);
+        break;
+
+    default:
+        break;
+    }
 }
 
 
@@ -511,10 +631,11 @@
  * FUNCTION:    OpcUpdateIntegerNode
  *
  * PARAMETERS:  Op                  - Current parse object
+ *              Value               - Value for the integer op
  *
  * RETURN:      None
  *
- * DESCRIPTION: Update node to the correct integer type.
+ * DESCRIPTION: Update node to the correct Integer type and value
  *
  ******************************************************************************/
 
@@ -566,3 +687,98 @@
 
     Op->Asl.AmlLength = 0;
 }
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcAmlEvaluationWalk1
+ *
+ * PARAMETERS:  ASL_WALK_CALLBACK
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Descending callback for AML execution of constant subtrees
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+OpcAmlEvaluationWalk1 (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    void                    *Context)
+{
+    ACPI_WALK_STATE         *WalkState = Context;
+    ACPI_STATUS             Status;
+    ACPI_PARSE_OBJECT       *OutOp;
+
+
+    WalkState->Op = Op;
+    WalkState->Opcode = Op->Common.AmlOpcode;
+    WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+
+    /* Copy child pointer to Arg for compatibility with Interpreter */
+
+    if (Op->Asl.Child)
+    {
+        Op->Common.Value.Arg = Op->Asl.Child;
+    }
+
+    /* Call AML dispatcher */
+
+    Status = AcpiDsExecBeginOp (WalkState, &OutOp);
+    if (ACPI_FAILURE (Status))
+    {
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "%s Constant interpretation failed (1) - %s\n",
+            Op->Asl.ParseOpName, AcpiFormatException (Status));
+    }
+
+    return (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcAmlEvaluationWalk2
+ *
+ * PARAMETERS:  ASL_WALK_CALLBACK
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Ascending callback for AML execution of constant subtrees
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+OpcAmlEvaluationWalk2 (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    void                    *Context)
+{
+    ACPI_WALK_STATE         *WalkState = Context;
+    ACPI_STATUS             Status;
+
+
+    WalkState->Op = Op;
+    WalkState->Opcode = Op->Common.AmlOpcode;
+    WalkState->OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
+
+    /* Copy child pointer to Arg for compatibility with Interpreter */
+
+    if (Op->Asl.Child)
+    {
+        Op->Common.Value.Arg = Op->Asl.Child;
+    }
+
+    /* Call AML dispatcher */
+
+    Status = AcpiDsExecEndOp (WalkState);
+    if (ACPI_FAILURE (Status))
+    {
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "%s: Constant interpretation failed (2) - %s\n",
+            Op->Asl.ParseOpName, AcpiFormatException (Status));
+    }
+
+    return (Status);
+}
--- a/sys/external/bsd/acpica/dist/compiler/aslglobal.h	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslglobal.h	Mon Apr 13 17:21:01 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
@@ -127,6 +127,7 @@
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_CurrentLineNumber, 1);
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_LogicalLineNumber, 1);
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_CurrentLineOffset, 0);
+ASL_EXTERN UINT8                    ASL_INIT_GLOBAL (Gbl_SyntaxError, 0);
 
 /* Exception reporting */
 
@@ -173,6 +174,7 @@
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_DoTemplates, FALSE);
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_CompileGeneric, FALSE);
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_AllExceptionsDisabled, FALSE);
+ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_PruneParseTree, FALSE);
 
 
 #define HEX_OUTPUT_NONE             0
@@ -251,6 +253,8 @@
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_ReservedMethods, 0);
 ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_TableSignature, "NO_SIG");
 ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_TableId, "NO_ID");
+ASL_EXTERN UINT8                    ASL_INIT_GLOBAL (Gbl_PruneDepth, 0);
+ASL_EXTERN UINT16                   ASL_INIT_GLOBAL (Gbl_PruneType, 0);
 
 
 /* Static structures */
--- a/sys/external/bsd/acpica/dist/compiler/aslhex.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslhex.c	Mon Apr 13 17:21:01 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/asllength.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asllength.c	Mon Apr 13 17:21:01 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/asllisting.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asllisting.c	Mon Apr 13 17:21:01 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
@@ -270,7 +270,10 @@
 
     UtPrintFormattedName (Op->Asl.ParseOpcode, Level);
 
-    DbgPrint (ASL_TREE_OUTPUT, "    (%.4X)\n", Op->Asl.ParseOpcode);
+    DbgPrint (ASL_TREE_OUTPUT, "    (%.4X) Flags %8.8X",
+        Op->Asl.ParseOpcode, Op->Asl.CompileFlags);
+    TrPrintNodeCompileFlags (Op->Asl.CompileFlags);
+    DbgPrint (ASL_TREE_OUTPUT, "\n");
     return (AE_OK);
 }
 
--- a/sys/external/bsd/acpica/dist/compiler/asllistsup.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asllistsup.c	Mon Apr 13 17:21:01 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/aslmain.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmain.c	Mon Apr 13 17:21:01 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
@@ -187,13 +187,18 @@
     ACPI_OPTION ("-db",             "Do not translate Buffers to Resource Templates");
     ACPI_OPTION ("-dc <f1 f2 ...>", "Disassemble AML and immediately compile it");
     ACPI_OPTION ("",                "  (Obtain DSDT from current system if no input file)");
+    ACPI_OPTION ("-df",             "Force disassembler to assume table contains valid AML");
+    ACPI_OPTION ("-dl",             "Emit legacy ASL code only (no C-style operators)");
     ACPI_OPTION ("-e  <f1 f2 ...>", "Include ACPI table(s) for external symbol resolution");
     ACPI_OPTION ("-fe <file>",      "Specify external symbol declaration file");
     ACPI_OPTION ("-in",             "Ignore NoOp opcodes");
     ACPI_OPTION ("-vt",             "Dump binary table data in hex format within output file");
 
     printf ("\nDebug Options:\n");
-    ACPI_OPTION ("-bf -bt",         "Create debug file (full or parse tree only) (*.txt)");
+    ACPI_OPTION ("-bf",             "Create debug file (full output) (*.txt)");
+    ACPI_OPTION ("-bs",             "Create debug file (parse tree only) (*.txt)");
+    ACPI_OPTION ("-bp <depth>",     "Prune ASL parse tree");
+    ACPI_OPTION ("-bt <type>",      "Object type to be pruned from the parse tree");
     ACPI_OPTION ("-f",              "Ignore errors, force creation of AML output file(s)");
     ACPI_OPTION ("-m <size>",       "Set internal line buffer size (in Kbytes)");
     ACPI_OPTION ("-n",              "Parse only, no output generation");
--- a/sys/external/bsd/acpica/dist/compiler/aslmap.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmap.c	Mon Apr 13 17:21:01 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
@@ -222,7 +222,7 @@
 /* EXTENDEDIO */                OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
 /* EXTENDEDMEMORY */            OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
 /* EXTENDEDSPACE */             OP_TABLE_ENTRY (AML_RAW_DATA_QWORD,         0,                              0,                  ACPI_BTYPE_INTEGER),
-/* EXTERNAL */                  OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
+/* EXTERNAL */                  OP_TABLE_ENTRY (AML_EXTERNAL_OP,            0,                              0,                  0),
 /* FATAL */                     OP_TABLE_ENTRY (AML_FATAL_OP,               0,                              0,                  0),
 /* FIELD */                     OP_TABLE_ENTRY (AML_FIELD_OP,               0,                              NODE_AML_PACKAGE,   0),
 /* FINDSETLEFTBIT */            OP_TABLE_ENTRY (AML_FIND_SET_LEFT_BIT_OP,   0,                              0,                  ACPI_BTYPE_INTEGER),
@@ -446,7 +446,38 @@
 /* XFERTYPE_16 */               OP_TABLE_ENTRY (AML_BYTE_OP,                2,                              0,                  0),
 /* XOR */                       OP_TABLE_ENTRY (AML_BIT_XOR_OP,             0,                              0,                  ACPI_BTYPE_INTEGER),
 /* ZERO */                      OP_TABLE_ENTRY (AML_ZERO_OP,                0,                              0,                  ACPI_BTYPE_INTEGER),
-
+/* TOPLD */                     OP_TABLE_ENTRY (AML_DWORD_OP,               0,                              NODE_AML_PACKAGE,   ACPI_BTYPE_INTEGER),
+/* XFERSIZE_128 */              OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* REVISION */                  OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* IGNORECOLOR */               OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* RED */                       OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* GREEN */                     OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* BLUE */                      OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* WIDTH */                     OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* HEIGHT */                    OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* USERVISIBLE */               OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* DOCK */                      OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* LID */                       OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* PANEL */                     OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* VERTICALPOSITION */          OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* HORIZONTALPOSITION */        OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* SHAPE */                     OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* GROUPORIENTATION */          OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* GROUPTOKEN */                OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* GROUPPOSITION */             OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* BAY */                       OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* EJECTABLE */                 OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* EJECTREQUIRED */             OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* CABINETNUMBER */             OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* CARDCAGENUMBER */            OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* REFERENCE */                 OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* ROTATION */                  OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* ORDER */                     OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* RESERVED */                  OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* VERTICALOFFSET */            OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* HORIZONTALOFFSET */          OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
+/* PRINTF */                    OP_TABLE_ENTRY (AML_STORE_OP,               0,                              0,                  ACPI_BTYPE_DATA_REFERENCE),
+/* FPRINTF */                   OP_TABLE_ENTRY (AML_STORE_OP,               0,                              0,                  ACPI_BTYPE_DATA_REFERENCE),
 /*! [End] no source code translation !*/
 
 };
--- a/sys/external/bsd/acpica/dist/compiler/aslmapenter.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmapenter.c	Mon Apr 13 17:21:01 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
@@ -216,6 +216,7 @@
     ACPI_GPIO_INFO          *Info;
     ACPI_GPIO_INFO          *NextGpio;
     ACPI_GPIO_INFO          *PrevGpio;
+    char                    *Buffer;
 
 
     /*
@@ -223,8 +224,8 @@
      * sorted by both source device name and then the pin number. There is
      * one block per pin.
      */
-    Info = ACPI_CAST_PTR (ACPI_GPIO_INFO,
-        UtStringCacheCalloc (sizeof (ACPI_GPIO_INFO)));
+    Buffer = UtStringCacheCalloc (sizeof (ACPI_GPIO_INFO));
+    Info = ACPI_CAST_PTR (ACPI_GPIO_INFO, Buffer);
 
     NextGpio = Gbl_GpioList;
     PrevGpio = NULL;
@@ -293,14 +294,15 @@
     ACPI_SERIAL_INFO        *Info;
     ACPI_SERIAL_INFO        *NextSerial;
     ACPI_SERIAL_INFO        *PrevSerial;
+    char                    *Buffer;
 
 
     /*
      * Allocate a new info block and insert it into the global Serial list
      * sorted by both source device name and then the address.
      */
-    Info = ACPI_CAST_PTR (ACPI_SERIAL_INFO,
-        UtStringCacheCalloc (sizeof (ACPI_SERIAL_INFO)));
+    Buffer = UtStringCacheCalloc (sizeof (ACPI_SERIAL_INFO));
+    Info = ACPI_CAST_PTR (ACPI_SERIAL_INFO, Buffer);
 
     NextSerial = Gbl_SerialList;
     PrevSerial = NULL;
--- a/sys/external/bsd/acpica/dist/compiler/aslmapoutput.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmapoutput.c	Mon Apr 13 17:21:01 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
@@ -116,7 +116,7 @@
  * RETURN:      None
  *
  * DESCRIPTION: External interface.
- *              Create and open the mapfile and emit all of the collected
+ *              Map file has already been opened. Emit all of the collected
  *              hardware mapping information. Includes: GPIO information,
  *              Serial information, and a dump of the entire ACPI device tree.
  *
@@ -126,8 +126,6 @@
 MpEmitMappingInfo (
     void)
 {
-    char                    *NewFilename;
-
 
     /* Mapfile option enabled? */
 
@@ -136,22 +134,6 @@
         return;
     }
 
-    /* Create/Open a map file */
-
-    NewFilename = FlGenerateFilename (Gbl_OutputFilenamePrefix,
-        FILE_SUFFIX_MAP);
-    if (!NewFilename)
-    {
-        AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME,
-            0, 0, 0, 0, NULL, NULL);
-    }
-
-    /* Open the hex file, text mode (closed at compiler exit) */
-
-    FlOpenFile (ASL_FILE_MAP_OUTPUT, NewFilename, "w+t");
-    AslCompilerSignon (ASL_FILE_MAP_OUTPUT);
-    AslCompilerFileHeader (ASL_FILE_MAP_OUTPUT);
-
     if (!Gbl_GpioList)
     {
         FlPrintFile (ASL_FILE_MAP_OUTPUT,
@@ -630,9 +612,6 @@
 
     if (Op->Asl.Node == Info->TargetNode)
     {
-        DevicePathname = AcpiNsGetExternalPathname (
-            Info->TargetNode);
-
         while (ParentOp && (!ParentOp->Asl.Node))
         {
             ParentOp = ParentOp->Asl.Parent;
@@ -654,6 +633,8 @@
                 DevicePathname, HidString);
 
             Info->References++;
+
+            ACPI_FREE (DevicePathname);
         }
     }
 
--- a/sys/external/bsd/acpica/dist/compiler/aslmaputils.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmaputils.c	Mon Apr 13 17:21:01 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/aslmessages.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmessages.c	Mon Apr 13 17:21:01 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/aslmessages.h	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmessages.h	Mon Apr 13 17:21:01 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/aslmethod.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmethod.c	Mon Apr 13 17:21:01 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/aslnamesp.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslnamesp.c	Mon Apr 13 17:21:01 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/asloffset.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asloffset.c	Mon Apr 13 17:21:01 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/aslopcodes.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslopcodes.c	Mon Apr 13 17:21:01 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,9 +68,62 @@
     ACPI_PARSE_OBJECT       *Op);
 
 static void
+OpcDoPld (
+    ACPI_PARSE_OBJECT       *Op);
+
+static void
 OpcDoUuId (
     ACPI_PARSE_OBJECT       *Op);
 
+static UINT8 *
+OpcEncodePldBuffer (
+    ACPI_PLD_INFO           *PldInfo);
+
+
+/* ToPld strings */
+
+static char *AslPldPanelList[] =
+{
+    "TOP",
+    "BOTTOM",
+    "LEFT",
+    "RIGHT",
+    "FRONT",
+    "BACK",
+    "UNKNOWN",
+    NULL
+};
+
+static char *AslPldVerticalPositionList[] =
+{
+    "UPPER",
+    "CENTER",
+    "LOWER",
+    NULL
+};
+
+static char *AslPldHorizontalPositionList[] =
+{
+    "LEFT",
+    "CENTER",
+    "RIGHT",
+    NULL
+};
+
+static char *AslPldShapeList[] =
+{
+    "ROUND",
+    "OVAL",
+    "SQUARE",
+    "VERTICALRECTANGLE",
+    "HORIZONTALRECTANGLE",
+    "VERTICALTRAPEZOID",
+    "HORIZONTALTRAPEZOID",
+    "UNKNOWN",
+    "CHAMFERED",
+    NULL
+};
+
 
 /*******************************************************************************
  *
@@ -653,9 +706,698 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    OpcEncodePldBuffer
+ *
+ * PARAMETERS:  PldInfo             - _PLD buffer struct (Using local struct)
+ *
+ * RETURN:      Encode _PLD buffer suitable for return value from _PLD
+ *
+ * DESCRIPTION: Bit-packs a _PLD buffer struct.
+ *
+ ******************************************************************************/
+
+static UINT8 *
+OpcEncodePldBuffer (
+    ACPI_PLD_INFO           *PldInfo)
+{
+    UINT32                  *Buffer;
+    UINT32                  Dword;
+
+
+    Buffer = ACPI_ALLOCATE_ZEROED (ACPI_PLD_BUFFER_SIZE);
+    if (!Buffer)
+    {
+        return (NULL);
+    }
+
+    /* First 32 bits */
+
+    Dword = 0;
+    ACPI_PLD_SET_REVISION       (&Dword, PldInfo->Revision);
+    ACPI_PLD_SET_IGNORE_COLOR   (&Dword, PldInfo->IgnoreColor);
+    ACPI_PLD_SET_RED            (&Dword, PldInfo->Red);
+    ACPI_PLD_SET_GREEN          (&Dword, PldInfo->Green);
+    ACPI_PLD_SET_BLUE           (&Dword, PldInfo->Blue);
+    ACPI_MOVE_32_TO_32          (&Buffer[0], &Dword);
+
+    /* Second 32 bits */
+
+    Dword = 0;
+    ACPI_PLD_SET_WIDTH          (&Dword, PldInfo->Width);
+    ACPI_PLD_SET_HEIGHT         (&Dword, PldInfo->Height);
+    ACPI_MOVE_32_TO_32          (&Buffer[1], &Dword);
+
+    /* Third 32 bits */
+
+    Dword = 0;
+    ACPI_PLD_SET_USER_VISIBLE   (&Dword, PldInfo->UserVisible);
+    ACPI_PLD_SET_DOCK           (&Dword, PldInfo->Dock);
+    ACPI_PLD_SET_LID            (&Dword, PldInfo->Lid);
+    ACPI_PLD_SET_PANEL          (&Dword, PldInfo->Panel);
+    ACPI_PLD_SET_VERTICAL       (&Dword, PldInfo->VerticalPosition);
+    ACPI_PLD_SET_HORIZONTAL     (&Dword, PldInfo->HorizontalPosition);
+    ACPI_PLD_SET_SHAPE          (&Dword, PldInfo->Shape);
+    ACPI_PLD_SET_ORIENTATION    (&Dword, PldInfo->GroupOrientation);
+    ACPI_PLD_SET_TOKEN          (&Dword, PldInfo->GroupToken);
+    ACPI_PLD_SET_POSITION       (&Dword, PldInfo->GroupPosition);
+    ACPI_PLD_SET_BAY            (&Dword, PldInfo->Bay);
+    ACPI_MOVE_32_TO_32          (&Buffer[2], &Dword);
+
+    /* Fourth 32 bits */
+
+    Dword = 0;
+    ACPI_PLD_SET_EJECTABLE      (&Dword, PldInfo->Ejectable);
+    ACPI_PLD_SET_OSPM_EJECT     (&Dword, PldInfo->OspmEjectRequired);
+    ACPI_PLD_SET_CABINET        (&Dword, PldInfo->CabinetNumber);
+    ACPI_PLD_SET_CARD_CAGE      (&Dword, PldInfo->CardCageNumber);
+    ACPI_PLD_SET_REFERENCE      (&Dword, PldInfo->Reference);
+    ACPI_PLD_SET_ROTATION       (&Dword, PldInfo->Rotation);
+    ACPI_PLD_SET_ORDER          (&Dword, PldInfo->Order);
+    ACPI_MOVE_32_TO_32          (&Buffer[3], &Dword);
+
+    if (PldInfo->Revision >= 2)
+    {
+        /* Fifth 32 bits */
+
+        Dword = 0;
+        ACPI_PLD_SET_VERT_OFFSET    (&Dword, PldInfo->VerticalOffset);
+        ACPI_PLD_SET_HORIZ_OFFSET   (&Dword, PldInfo->HorizontalOffset);
+        ACPI_MOVE_32_TO_32          (&Buffer[4], &Dword);
+    }
+
+    return (ACPI_CAST_PTR (UINT8, Buffer));
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcStrupr (strupr)
+ *
+ * PARAMETERS:  SrcString           - The source string to convert
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Convert string to uppercase
+ *
+ * NOTE: This is not a POSIX function, so it appears here, not in utclib.c
+ *
+ ******************************************************************************/
+
+static void
+OpcStrupr (
+    char                    *SrcString)
+{
+    char                    *String;
+
+
+    if (!SrcString)
+    {
+        return;
+    }
+
+    /* Walk entire string, uppercasing the letters */
+
+    for (String = SrcString; *String; String++)
+    {
+        *String = (char) toupper ((int) *String);
+    }
+
+    return;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcFindName
+ *
+ * PARAMETERS:  List                - Array of char strings to be searched
+ *              Name                - Char string to string for
+ *              Index               - Index value to set if found
+ *
+ * RETURN:      TRUE if any names matched, FALSE otherwise
+ *
+ * DESCRIPTION: Match PLD name to value in lookup table. Sets Value to
+ *              equivalent parameter value.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+OpcFindName (
+    char                    **List,
+    char                    *Name,
+    UINT64                  *Index)
+{
+    char                     *Str;
+    UINT32                   i;
+
+
+    OpcStrupr (Name);
+
+    for (i = 0, Str = List[0]; Str; i++, Str = List[i])
+    {
+        if (!(ACPI_STRNCMP (Str, Name, ACPI_STRLEN (Name))))
+        {
+            *Index = i;
+            return (TRUE);
+        }
+    }
+
+    return (FALSE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcDoPld
+ *
+ * PARAMETERS:  Op                  - Parse node
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Convert ToPLD macro to 20-byte buffer
+ *
+ ******************************************************************************/
+
+static void
+OpcDoPld (
+    ACPI_PARSE_OBJECT       *Op)
+{
+    UINT8                   *Buffer;
+    ACPI_PARSE_OBJECT       *Node;
+    ACPI_PLD_INFO           PldInfo;
+    ACPI_PARSE_OBJECT       *NewOp;
+
+
+    if (!Op)
+    {
+        AslError(ASL_ERROR, ASL_MSG_NOT_EXIST, Op, NULL);
+        return;
+    }
+
+    if (Op->Asl.ParseOpcode != PARSEOP_TOPLD)
+    {
+        AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Op, NULL);
+        return;
+    }
+
+    Buffer = UtLocalCalloc (ACPI_PLD_BUFFER_SIZE);
+    if (!Buffer)
+    {
+        AslError(ASL_ERROR, ASL_MSG_BUFFER_ALLOCATION, Op, NULL);
+        return;
+    }
+
+    ACPI_MEMSET (&PldInfo, 0, sizeof (ACPI_PLD_INFO));
+
+    Node = Op->Asl.Child;
+    while (Node)
+    {
+        switch (Node->Asl.ParseOpcode)
+        {
+        case PARSEOP_PLD_REVISION:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 127)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            PldInfo.Revision = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            break;
+
+        case PARSEOP_PLD_IGNORECOLOR:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 1)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            PldInfo.IgnoreColor = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            break;
+
+        case PARSEOP_PLD_RED:
+        case PARSEOP_PLD_GREEN:
+        case PARSEOP_PLD_BLUE:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 255)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.ParseOpcode == PARSEOP_PLD_RED)
+            {
+                PldInfo.Red = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+            else if (Node->Asl.ParseOpcode == PARSEOP_PLD_GREEN)
+            {
+                PldInfo.Green = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+            else /* PARSEOP_PLD_BLUE */
+            {
+                PldInfo.Blue = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+            break;
+
+        case PARSEOP_PLD_WIDTH:
+        case PARSEOP_PLD_HEIGHT:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 65535)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.ParseOpcode == PARSEOP_PLD_WIDTH)
+            {
+                PldInfo.Width = (UINT16) Node->Asl.Child->Asl.Value.Integer;
+            }
+            else /* PARSEOP_PLD_HEIGHT */
+            {
+                PldInfo.Height = (UINT16) Node->Asl.Child->Asl.Value.Integer;
+            }
+
+            break;
+
+        case PARSEOP_PLD_USERVISIBLE:
+        case PARSEOP_PLD_DOCK:
+        case PARSEOP_PLD_LID:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 1)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.ParseOpcode == PARSEOP_PLD_USERVISIBLE)
+            {
+                PldInfo.UserVisible = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+            else if (Node->Asl.ParseOpcode == PARSEOP_PLD_DOCK)
+            {
+                PldInfo.Dock = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+            else
+            {
+                PldInfo.Lid = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+
+            break;
+
+        case PARSEOP_PLD_PANEL:
+
+            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
+            {
+                if (Node->Asl.Child->Asl.Value.Integer > 6)
+                {
+                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                    break;
+                }
+            }
+            else /* PARSEOP_STRING */
+            {
+                if (!OpcFindName(AslPldPanelList,
+                    Node->Asl.Child->Asl.Value.String,
+                    &Node->Asl.Child->Asl.Value.Integer))
+                {
+                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
+                    break;
+                }
+            }
+
+            PldInfo.Panel = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            break;
+
+        case PARSEOP_PLD_VERTICALPOSITION:
+
+            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
+            {
+                if (Node->Asl.Child->Asl.Value.Integer > 2)
+                {
+                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                    break;
+                }
+            }
+            else /* PARSEOP_STRING */
+            {
+                if (!OpcFindName(AslPldVerticalPositionList,
+                    Node->Asl.Child->Asl.Value.String,
+                    &Node->Asl.Child->Asl.Value.Integer))
+                {
+                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
+                    break;
+                }
+            }
+
+            PldInfo.VerticalPosition = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            break;
+
+        case PARSEOP_PLD_HORIZONTALPOSITION:
+
+            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
+            {
+                if (Node->Asl.Child->Asl.Value.Integer > 2)
+                {
+                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                    break;
+                }
+            }
+            else /* PARSEOP_STRING */
+            {
+                if (!OpcFindName(AslPldHorizontalPositionList,
+                    Node->Asl.Child->Asl.Value.String,
+                    &Node->Asl.Child->Asl.Value.Integer))
+                {
+                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
+                    break;
+                }
+            }
+
+            PldInfo.HorizontalPosition = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            break;
+
+        case PARSEOP_PLD_SHAPE:
+
+            if (Node->Asl.Child->Asl.ParseOpcode == PARSEOP_INTEGER)
+            {
+                if (Node->Asl.Child->Asl.Value.Integer > 8)
+                {
+                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                    break;
+                }
+            }
+            else /* PARSEOP_STRING */
+            {
+                if (!OpcFindName(AslPldShapeList,
+                    Node->Asl.Child->Asl.Value.String,
+                    &Node->Asl.Child->Asl.Value.Integer))
+                {
+                    AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Node, NULL);
+                    break;
+                }
+            }
+
+            PldInfo.Shape = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            break;
+
+        case PARSEOP_PLD_GROUPORIENTATION:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 1)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            PldInfo.GroupOrientation = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            break;
+
+        case PARSEOP_PLD_GROUPTOKEN:
+        case PARSEOP_PLD_GROUPPOSITION:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 255)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+
+            if (Node->Asl.ParseOpcode == PARSEOP_PLD_GROUPTOKEN)
+            {
+                PldInfo.GroupToken = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+            else /* PARSEOP_PLD_GROUPPOSITION */
+            {
+                PldInfo.GroupPosition = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+
+            break;
+
+        case PARSEOP_PLD_BAY:
+        case PARSEOP_PLD_EJECTABLE:
+        case PARSEOP_PLD_EJECTREQUIRED:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 1)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.ParseOpcode == PARSEOP_PLD_BAY)
+            {
+                PldInfo.Bay = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+            else if (Node->Asl.ParseOpcode == PARSEOP_PLD_EJECTABLE)
+            {
+                PldInfo.Ejectable = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+            else /* PARSEOP_PLD_EJECTREQUIRED */
+            {
+                PldInfo.OspmEjectRequired = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+
+            break;
+
+        case PARSEOP_PLD_CABINETNUMBER:
+        case PARSEOP_PLD_CARDCAGENUMBER:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 255)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.ParseOpcode == PARSEOP_PLD_CABINETNUMBER)
+            {
+                PldInfo.CabinetNumber = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+            else /* PARSEOP_PLD_CARDCAGENUMBER */
+            {
+                PldInfo.CardCageNumber = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            }
+
+            break;
+
+        case PARSEOP_PLD_REFERENCE:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 1)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            PldInfo.Reference = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            break;
+
+        case PARSEOP_PLD_ROTATION:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 7)
+            {
+                switch (Node->Asl.Child->Asl.Value.Integer)
+                {
+                case 45:
+
+                    Node->Asl.Child->Asl.Value.Integer = 1;
+                    break;
+
+                case 90:
+
+                    Node->Asl.Child->Asl.Value.Integer = 2;
+                    break;
+
+                case 135:
+
+                    Node->Asl.Child->Asl.Value.Integer = 3;
+                    break;
+
+                case 180:
+
+                    Node->Asl.Child->Asl.Value.Integer = 4;
+                    break;
+
+                case 225:
+
+                    Node->Asl.Child->Asl.Value.Integer = 5;
+                    break;
+
+                case 270:
+
+                    Node->Asl.Child->Asl.Value.Integer = 6;
+                    break;
+
+                case 315:
+
+                    Node->Asl.Child->Asl.Value.Integer = 7;
+                    break;
+
+                default:
+
+                    AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                    break;
+                }
+            }
+
+            PldInfo.Rotation = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            break;
+
+        case PARSEOP_PLD_ORDER:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 31)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            PldInfo.Order = (UINT8) Node->Asl.Child->Asl.Value.Integer;
+            break;
+
+        case PARSEOP_PLD_VERTICALOFFSET:
+        case PARSEOP_PLD_HORIZONTALOFFSET:
+
+            if (Node->Asl.Child->Asl.ParseOpcode != PARSEOP_INTEGER)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.Child->Asl.Value.Integer > 65535)
+            {
+                AslError(ASL_ERROR, ASL_MSG_RANGE, Node, NULL);
+                break;
+            }
+
+            if (Node->Asl.ParseOpcode == PARSEOP_PLD_VERTICALOFFSET)
+            {
+                PldInfo.VerticalOffset = (UINT16) Node->Asl.Child->Asl.Value.Integer;
+            }
+            else /* PARSEOP_PLD_HORIZONTALOFFSET */
+            {
+                PldInfo.HorizontalOffset = (UINT16) Node->Asl.Child->Asl.Value.Integer;
+            }
+
+            break;
+
+        default:
+
+            AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, Node, NULL);
+            break;
+        }
+
+        Node = Node->Asl.Next;
+    }
+
+    Buffer = OpcEncodePldBuffer(&PldInfo);
+
+    /* Change Op to a Buffer */
+
+    Op->Asl.ParseOpcode = PARSEOP_BUFFER;
+    Op->Common.AmlOpcode = AML_BUFFER_OP;
+
+    /* Disable further optimization */
+
+    Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
+    UtSetParseOpName (Op);
+
+    /* Child node is the buffer length */
+
+    NewOp = TrAllocateNode (PARSEOP_INTEGER);
+
+    NewOp->Asl.AmlOpcode     = AML_BYTE_OP;
+    NewOp->Asl.Value.Integer = 20;
+    NewOp->Asl.Parent        = Op;
+
+    Op->Asl.Child = NewOp;
+    Op = NewOp;
+
+    /* Peer to the child is the raw buffer data */
+
+    NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
+    NewOp->Asl.AmlOpcode     = AML_RAW_DATA_BUFFER;
+    NewOp->Asl.AmlLength     = 20;
+    NewOp->Asl.Value.String  = ACPI_CAST_PTR (char, Buffer);
+    NewOp->Asl.Parent        = Op->Asl.Parent;
+
+    Op->Asl.Next = NewOp;
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    OpcDoUuId
  *
- * PARAMETERS:  Op        - Parse node
+ * PARAMETERS:  Op                  - Parse node
  *
  * RETURN:      None
  *
@@ -673,7 +1415,7 @@
     ACPI_PARSE_OBJECT       *NewOp;
 
 
-    InString = (char *) Op->Asl.Value.String;
+    InString = ACPI_CAST_PTR (char, Op->Asl.Value.String);
     Buffer = UtLocalCalloc (16);
 
     Status = AuValidateUuid (InString);
@@ -712,7 +1454,7 @@
     NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
     NewOp->Asl.AmlOpcode     = AML_RAW_DATA_BUFFER;
     NewOp->Asl.AmlLength     = 16;
-    NewOp->Asl.Value.String  = (char *) Buffer;
+    NewOp->Asl.Value.String  = ACPI_CAST_PTR (char, Buffer);
     NewOp->Asl.Parent        = Op->Asl.Parent;
 
     Op->Asl.Next = NewOp;
@@ -723,7 +1465,7 @@
  *
  * FUNCTION:    OpcGenerateAmlOpcode
  *
- * PARAMETERS:  Op        - Parse node
+ * PARAMETERS:  Op                  - Parse node
  *
  * RETURN:      None
  *
@@ -737,7 +1479,6 @@
 OpcGenerateAmlOpcode (
     ACPI_PARSE_OBJECT       *Op)
 {
-
     UINT16                  Index;
 
 
@@ -783,6 +1524,21 @@
         OpcDoEisaId (Op);
         break;
 
+    case PARSEOP_PRINTF:
+
+        OpcDoPrintf (Op);
+        break;
+
+    case PARSEOP_FPRINTF:
+
+        OpcDoFprintf (Op);
+        break;
+
+    case PARSEOP_TOPLD:
+
+        OpcDoPld (Op);
+        break;
+
     case PARSEOP_TOUUID:
 
         OpcDoUuId (Op);
--- a/sys/external/bsd/acpica/dist/compiler/asloperands.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asloperands.c	Mon Apr 13 17:21:01 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/aslopt.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslopt.c	Mon Apr 13 17:21:01 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/asloptions.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asloptions.c	Mon Apr 13 17:21:01 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
@@ -184,7 +184,7 @@
         }
         break;
 
-    case 'b':   /* Debug output options */
+    case 'b':   /* Debug options */
 
         switch (AcpiGbl_Optarg[0])
         {
@@ -193,10 +193,37 @@
             AslCompilerdebug = 1; /* same as yydebug */
             DtParserdebug = 1;
             PrParserdebug = 1;
+            Gbl_DebugFlag = TRUE;
+            break;
+
+        case 'p':   /* Prune ASL parse tree */
+
+            /* Get the required argument */
+
+            if (AcpiGetoptArgument (argc, argv))
+            {
+                return (-1);
+            }
+
+            Gbl_PruneParseTree = TRUE;
+            Gbl_PruneDepth = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
+            break;
+
+        case 's':
+
+            Gbl_DebugFlag = TRUE;
             break;
 
         case 't':
 
+            /* Get the required argument */
+
+            if (AcpiGetoptArgument (argc, argv))
+            {
+                return (-1);
+            }
+
+            Gbl_PruneType = (UINT8) strtoul (AcpiGbl_Optarg, NULL, 0);
             break;
 
         default:
@@ -205,9 +232,6 @@
             return (-1);
         }
 
-        /* Produce debug output file */
-
-        Gbl_DebugFlag = TRUE;
         break;
 
     case 'c':
@@ -250,6 +274,17 @@
 
             break;
 
+        case 'f':
+
+            AcpiGbl_ForceAmlDisassembly = TRUE;
+            break;
+
+        case 'l':   /* Use legacy ASL code (not ASL+) for disassembly */
+
+            Gbl_DoCompile = FALSE;
+            AcpiGbl_CstyleDisassembly = FALSE;
+            break;
+
         default:
 
             printf ("Unknown option: -d%s\n", AcpiGbl_Optarg);
@@ -530,7 +565,6 @@
 
         Gbl_OutputFilenamePrefix = AcpiGbl_Optarg;
         UtConvertBackslashes (Gbl_OutputFilenamePrefix);
-
         Gbl_UseDefaultAmlFilename = FALSE;
         break;
 
--- a/sys/external/bsd/acpica/dist/compiler/aslparser.y	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslparser.y	Mon Apr 13 17:21:01 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
@@ -73,7 +73,6 @@
 #define malloc              AslLocalAllocate
 #undef alloca
 #define alloca              AslLocalAllocate
-#undef yytname
 #define yytname             AslCompilername
 
 #define YYINITDEPTH         600             /* State stack depth */
@@ -100,7 +99,7 @@
  * These shift/reduce conflicts are expected. There should be zero
  * reduce/reduce conflicts.
  */
-%expect 86
+%expect 89
 
 /*! [Begin] no source code translation */
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslprintf.c	Mon Apr 13 17:21:01 2015 +0000
@@ -0,0 +1,380 @@
+/******************************************************************************
+ *
+ * Module Name: aslprintf - ASL Printf/Fprintf macro support
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2015, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer,
+ *    without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *    substantially similar to the "NO WARRANTY" disclaimer below
+ *    ("Disclaimer") and any redistribution must be conditioned upon
+ *    including a substantially similar Disclaimer requirement for further
+ *    binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ *    of any contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include "aslcompiler.h"
+#include "aslcompiler.y.h"
+#include "amlcode.h"
+
+#define _COMPONENT          ACPI_COMPILER
+        ACPI_MODULE_NAME    ("aslprintf")
+
+
+/* Local prototypes */
+
+static void
+OpcCreateConcatenateNode (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_PARSE_OBJECT       *Node);
+
+static void
+OpcParsePrintf (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_PARSE_OBJECT       *DestOp);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcDoPrintf
+ *
+ * PARAMETERS:  Op                  - printf parse node
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Convert printf macro to a Store(..., Debug) AML operation.
+ *
+ ******************************************************************************/
+
+void
+OpcDoPrintf (
+    ACPI_PARSE_OBJECT       *Op)
+{
+    ACPI_PARSE_OBJECT       *DestOp;
+
+
+    /* Store destination is the Debug op */
+
+    DestOp = TrAllocateNode (PARSEOP_DEBUG);
+    DestOp->Asl.AmlOpcode = AML_DEBUG_OP;
+    DestOp->Asl.Parent = Op;
+    DestOp->Asl.LogicalLineNumber = Op->Asl.LogicalLineNumber;
+
+    OpcParsePrintf (Op, DestOp);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcDoFprintf
+ *
+ * PARAMETERS:  Op                  - fprintf parse node
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Convert fprintf macro to a Store AML operation.
+ *
+ ******************************************************************************/
+
+void
+OpcDoFprintf (
+    ACPI_PARSE_OBJECT       *Op)
+{
+    ACPI_PARSE_OBJECT       *DestOp;
+
+
+    /* Store destination is the first argument of fprintf */
+
+    DestOp = Op->Asl.Child;
+    Op->Asl.Child = DestOp->Asl.Next;
+    DestOp->Asl.Next = NULL;
+
+    OpcParsePrintf (Op, DestOp);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcParsePrintf
+ *
+ * PARAMETERS:  Op                  - Printf parse node
+ *              DestOp              - Destination of Store operation
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Convert printf macro to a Store AML operation. The printf
+ *              macro parse tree is layed out as follows:
+ *
+ *              Op        - printf parse op
+ *              Op->Child - Format string
+ *              Op->Next  - Format string arguments
+ *
+ ******************************************************************************/
+
+static void
+OpcParsePrintf (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_PARSE_OBJECT       *DestOp)
+{
+    char                    *Format;
+    char                    *StartPosition = NULL;
+    ACPI_PARSE_OBJECT       *ArgNode;
+    ACPI_PARSE_OBJECT       *NextNode;
+    UINT32                  StringLength = 0;
+    char                    *NewString;
+    BOOLEAN                 StringToProcess = FALSE;
+    ACPI_PARSE_OBJECT       *NewOp;
+
+
+    /* Get format string */
+
+    Format = ACPI_CAST_PTR (char, Op->Asl.Child->Asl.Value.String);
+    ArgNode = Op->Asl.Child->Asl.Next;
+
+    /*
+     * Detach argument list so that we can use a NULL check to distinguish
+     * the first concatenation operation we need to make
+     */
+    Op->Asl.Child = NULL;
+
+    for (; *Format; ++Format)
+    {
+        if (*Format != '%')
+        {
+            if (!StringToProcess)
+            {
+                /* Mark the beginning of a string */
+
+                StartPosition = Format;
+                StringToProcess = TRUE;
+            }
+
+            ++StringLength;
+            continue;
+        }
+
+        /* Save string, if any, to new string object and concat it */
+
+        if (StringToProcess)
+        {
+            NewString = UtStringCacheCalloc (StringLength + 1);
+            ACPI_STRNCPY (NewString, StartPosition, StringLength);
+
+            NewOp = TrAllocateNode (PARSEOP_STRING_LITERAL);
+            NewOp->Asl.Value.String = NewString;
+            NewOp->Asl.AmlOpcode = AML_STRING_OP;
+            NewOp->Asl.AcpiBtype = ACPI_BTYPE_STRING;
+            NewOp->Asl.LogicalLineNumber = Op->Asl.LogicalLineNumber;
+
+            OpcCreateConcatenateNode(Op, NewOp);
+
+            StringLength = 0;
+            StringToProcess = FALSE;
+        }
+
+        ++Format;
+
+        /*
+         * We have a format parameter and will need an argument to go
+         * with it
+         */
+        if (!ArgNode ||
+            ArgNode->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
+        {
+            AslError(ASL_ERROR, ASL_MSG_ARG_COUNT_LO, Op, NULL);
+            return;
+        }
+
+        /*
+         * We do not support sub-specifiers of printf (flags, width,
+         * precision, length). For specifiers we only support %x/%X for
+         * hex or %s for strings. Also, %o for generic "acpi object".
+         */
+        switch (*Format)
+        {
+        case 's':
+
+            if (ArgNode->Asl.ParseOpcode != PARSEOP_STRING_LITERAL)
+            {
+                AslError(ASL_ERROR, ASL_MSG_INVALID_TYPE, ArgNode,
+                    "String required");
+                return;
+            }
+
+            NextNode = ArgNode->Asl.Next;
+            ArgNode->Asl.Next = NULL;
+            OpcCreateConcatenateNode(Op, ArgNode);
+            ArgNode = NextNode;
+            continue;
+
+        case 'X':
+        case 'x':
+        case 'o':
+
+            NextNode = ArgNode->Asl.Next;
+            ArgNode->Asl.Next = NULL;
+
+            /*
+             * Append an empty string if the first argument is
+             * not a string. This will implicitly conver the 2nd
+             * concat source to a string per the ACPI specification.
+             */
+            if (!Op->Asl.Child)
+            {
+                NewOp = TrAllocateNode (PARSEOP_STRING_LITERAL);
+                NewOp->Asl.Value.String = "";
+                NewOp->Asl.AmlOpcode = AML_STRING_OP;
+                NewOp->Asl.AcpiBtype = ACPI_BTYPE_STRING;
+                NewOp->Asl.LogicalLineNumber = Op->Asl.LogicalLineNumber;
+
+                OpcCreateConcatenateNode(Op, NewOp);
+            }
+
+            OpcCreateConcatenateNode(Op, ArgNode);
+            ArgNode = NextNode;
+            break;
+
+        default:
+
+            AslError(ASL_ERROR, ASL_MSG_INVALID_OPERAND, Op,
+                "Unrecognized format specifier");
+            continue;
+        }
+    }
+
+    /* Process any remaining string */
+
+    if (StringToProcess)
+    {
+        NewString = UtStringCacheCalloc (StringLength + 1);
+        ACPI_STRNCPY (NewString, StartPosition, StringLength);
+
+        NewOp = TrAllocateNode (PARSEOP_STRING_LITERAL);
+        NewOp->Asl.Value.String = NewString;
+        NewOp->Asl.AcpiBtype = ACPI_BTYPE_STRING;
+        NewOp->Asl.AmlOpcode = AML_STRING_OP;
+        NewOp->Asl.LogicalLineNumber = Op->Asl.LogicalLineNumber;
+
+        OpcCreateConcatenateNode(Op, NewOp);
+    }
+
+    /*
+     * If we get here and there's no child node then Format
+     * was an empty string. Just make a no op.
+     */
+    if (!Op->Asl.Child)
+    {
+        Op->Asl.ParseOpcode = PARSEOP_NOOP;
+        AslError(ASL_WARNING, ASL_MSG_NULL_STRING, Op,
+            "Converted to NOOP");
+        return;
+    }
+
+     /* Check for erroneous extra arguments */
+
+    if (ArgNode &&
+        ArgNode->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
+    {
+        AslError(ASL_WARNING, ASL_MSG_ARG_COUNT_HI, ArgNode,
+            "Extra arguments ignored");
+    }
+
+    /* Change Op to a Store */
+
+    Op->Asl.ParseOpcode = PARSEOP_STORE;
+    Op->Common.AmlOpcode = AML_STORE_OP;
+    Op->Asl.CompileFlags  = 0;
+
+    /* Disable further optimization */
+
+    Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
+    UtSetParseOpName (Op);
+
+    /* Set Store destination */
+
+    Op->Asl.Child->Asl.Next = DestOp;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    OpcCreateConcatenateNode
+ *
+ * PARAMETERS:  Op                  - Parse node
+ *              Node                - Parse node to be concatenated
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Make Node the child of Op. If child node already exists, then
+ *              concat child with Node and makes concat node the child of Op.
+ *
+ ******************************************************************************/
+
+static void
+OpcCreateConcatenateNode (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_PARSE_OBJECT       *Node)
+{
+    ACPI_PARSE_OBJECT       *NewConcatOp;
+
+
+    if (!Op->Asl.Child)
+    {
+        Op->Asl.Child = Node;
+        Node->Asl.Parent = Op;
+        return;
+    }
+
+    NewConcatOp = TrAllocateNode (PARSEOP_CONCATENATE);
+    NewConcatOp->Asl.AmlOpcode = AML_CONCAT_OP;
+    NewConcatOp->Asl.AcpiBtype = 0x7;
+    NewConcatOp->Asl.LogicalLineNumber = Op->Asl.LogicalLineNumber;
+
+    /* First arg is child of Op*/
+
+    NewConcatOp->Asl.Child = Op->Asl.Child;
+    Op->Asl.Child->Asl.Parent = NewConcatOp;
+
+    /* Second arg is Node */
+
+    NewConcatOp->Asl.Child->Asl.Next = Node;
+    Node->Asl.Parent = NewConcatOp;
+
+    /* Third arg is Zero (not used) */
+
+    NewConcatOp->Asl.Child->Asl.Next->Asl.Next =
+        TrAllocateNode (PARSEOP_ZERO);
+    NewConcatOp->Asl.Child->Asl.Next->Asl.Next->Asl.Parent =
+        NewConcatOp;
+
+    Op->Asl.Child = NewConcatOp;
+    NewConcatOp->Asl.Parent = Op;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslprune.c	Mon Apr 13 17:21:01 2015 +0000
@@ -0,0 +1,239 @@
+/******************************************************************************
+ *
+ * Module Name: aslprune - Parse tree prune utility
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2015, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer,
+ *    without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *    substantially similar to the "NO WARRANTY" disclaimer below
+ *    ("Disclaimer") and any redistribution must be conditioned upon
+ *    including a substantially similar Disclaimer requirement for further
+ *    binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ *    of any contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include "aslcompiler.h"
+#include "aslcompiler.y.h"
+#include "acapps.h"
+
+#define _COMPONENT          ACPI_COMPILER
+        ACPI_MODULE_NAME    ("aslprune")
+
+
+/* Local prototypes */
+
+static ACPI_STATUS
+PrTreePruneWalk (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    void                    *Context);
+
+static void
+PrPrintObjectAtLevel (
+    UINT32                  Level,
+    const char              *ObjectName);
+
+
+typedef struct acpi_prune_info
+{
+    UINT32                  PruneLevel;
+    UINT16                  ParseOpcode;
+    UINT16                  Count;
+
+} ACPI_PRUNE_INFO;
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AslPruneParseTree
+ *
+ * PARAMETERS:  PruneDepth              - Number of levels to prune
+ *              Type                    - Prune type (Device, Method, etc.)
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Prune off one or more levels of the ASL parse tree
+ *
+ ******************************************************************************/
+
+void
+AslPruneParseTree (
+    UINT32                  PruneDepth,
+    UINT32                  Type)
+{
+    ACPI_PRUNE_INFO         PruneObj;
+
+
+    PruneObj.PruneLevel = PruneDepth;
+    PruneObj.Count = 0;
+
+    switch (Type)
+    {
+    case 0:
+        PruneObj.ParseOpcode = (UINT16) PARSEOP_DEVICE;
+        break;
+
+    case 1:
+        PruneObj.ParseOpcode = (UINT16) PARSEOP_METHOD;
+        break;
+
+    case 2:
+        PruneObj.ParseOpcode = (UINT16) PARSEOP_IF;
+        break;
+
+    default:
+        AcpiOsPrintf ("Unsupported type: %u\n", Type);
+        return;
+    }
+
+    AcpiOsPrintf ("Pruning parse tree, from depth %u\n",
+        PruneDepth);
+
+    AcpiOsPrintf ("\nRemoving Objects:\n");
+
+    TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD,
+        PrTreePruneWalk, NULL, ACPI_CAST_PTR (void, &PruneObj));
+
+    AcpiOsPrintf ("\n%u Total Objects Removed\n", PruneObj.Count);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    PrPrintObjectAtLevel
+ *
+ * PARAMETERS:  Level                   - Current nesting level
+ *              ObjectName              - ACPI name for the object
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Print object name with indent
+ *
+ ******************************************************************************/
+
+static void
+PrPrintObjectAtLevel (
+    UINT32                  Level,
+    const char              *ObjectName)
+{
+    UINT32                  i;
+
+
+    for (i = 0; i < Level; i++)
+    {
+        AcpiOsPrintf ("  ");
+    }
+
+    AcpiOsPrintf ("[%s] at Level [%u]\n", ObjectName, Level);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    PrTreePruneWalk
+ *
+ * PARAMETERS:  Parse tree walk callback
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Prune off one or more levels of the ASL parse tree
+ *
+ * Current objects that can be pruned are: Devices, Methods, and If/Else
+ * blocks.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+PrTreePruneWalk (
+    ACPI_PARSE_OBJECT       *Op,
+    UINT32                  Level,
+    void                    *Context)
+{
+    ACPI_PRUNE_INFO         *PruneObj = (ACPI_PRUNE_INFO *) Context;
+
+
+    /* We only care about objects below the Prune Level threshold */
+
+    if (Level <= PruneObj->PruneLevel)
+    {
+        return (AE_OK);
+    }
+
+    if ((Op->Asl.ParseOpcode != PruneObj->ParseOpcode) &&
+       !(Op->Asl.ParseOpcode == PARSEOP_ELSE &&
+             PruneObj->ParseOpcode == PARSEOP_IF))
+    {
+        return (AE_OK);
+    }
+
+    switch (Op->Asl.ParseOpcode)
+    {
+    case PARSEOP_METHOD:
+
+        AcpiOsPrintf ("Method");
+        PrPrintObjectAtLevel (Level, Op->Asl.Child->Asl.Value.Name);
+        Op->Asl.Child->Asl.Next->Asl.Next->Asl.Next->Asl.Next->Asl.Next->Asl.Next = NULL;
+        PruneObj->Count++;
+        break;
+
+    case PARSEOP_DEVICE:
+
+        AcpiOsPrintf ("Device");
+        PrPrintObjectAtLevel (Level, Op->Asl.Child->Asl.Value.Name);
+        Op->Asl.Child->Asl.Next = NULL;
+        PruneObj->Count++;
+        break;
+
+    case PARSEOP_IF:
+    case PARSEOP_ELSE:
+
+        if (Op->Asl.ParseOpcode == PARSEOP_ELSE)
+        {
+            PrPrintObjectAtLevel(Level, "Else");
+            Op->Asl.Child = NULL;
+        }
+        else
+        {
+            PrPrintObjectAtLevel(Level, "If");
+            Op->Asl.Child->Asl.Next = NULL;
+        }
+
+        PruneObj->Count++;
+        break;
+
+    default:
+
+        break;
+    }
+
+    return (AE_OK);
+}
--- a/sys/external/bsd/acpica/dist/compiler/aslresource.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslresource.c	Mon Apr 13 17:21:01 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/aslrestype1.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype1.c	Mon Apr 13 17:21:01 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/aslrestype1i.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype1i.c	Mon Apr 13 17:21:01 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/aslrestype2.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2.c	Mon Apr 13 17:21:01 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/aslrestype2d.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2d.c	Mon Apr 13 17:21:01 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/aslrestype2e.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2e.c	Mon Apr 13 17:21:01 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/aslrestype2q.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2q.c	Mon Apr 13 17:21:01 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/aslrestype2s.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2s.c	Mon Apr 13 17:21:01 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/aslrestype2w.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2w.c	Mon Apr 13 17:21:01 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/aslrules.y	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrules.y	Mon Apr 13 17:21:01 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
@@ -92,6 +92,149 @@
             '{' TermList '}'        {$$ = TrLinkChildren ($<n>3,7,$4,$6,$8,$10,$12,$14,$18);}
     ;
 
+    /*
+     * ASL Extensions: C-style math/logical operators and expressions.
+     * The implementation transforms these operators into the standard
+     * AML opcodes and syntax.
+     *
+     * Supported operators and precedence rules (high-to-low)
+     *
+     * NOTE: The operator precedence and associativity rules are
+     * implemented by the tokens in asltokens.y
+     *
+     * (left-to-right):
+     *  1)      ( ) expr++ expr--
+     *
+     * (right-to-left):
+     *  2)      ! ~
+     *
+     * (left-to-right):
+     *  3)      *   /   %
+     *  4)      +   -
+     *  5)      >>  <<
+     *  6)      <   >   <=  >=
+     *  7)      ==  !=
+     *  8)      &
+     *  9)      ^
+     *  10)     |
+     *  11)     &&
+     *  12)     ||
+     *
+     * (right-to-left):
+     *  13)     = += -= *= /= %= <<= >>= &= ^= |=
+     */
+Expression
+
+    /* Unary operators */
+
+    : PARSEOP_EXP_LOGICAL_NOT           {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
+        TermArg                         {$$ = TrLinkChildren ($<n>2,1,$3);}
+    | PARSEOP_EXP_NOT                   {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
+        TermArg                         {$$ = TrLinkChildren ($<n>2,2,$3,TrCreateNullTarget ());}
+
+    | SuperName PARSEOP_EXP_INCREMENT   {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
+                                        {$$ = TrLinkChildren ($<n>3,1,$1);}
+    | SuperName PARSEOP_EXP_DECREMENT   {$<n>$ = TrCreateLeafNode (PARSEOP_DECREMENT);}
+                                        {$$ = TrLinkChildren ($<n>3,1,$1);}
+
+    /* Binary operators: math and logical */
+
+    | TermArg PARSEOP_EXP_ADD           {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+    | TermArg PARSEOP_EXP_DIVIDE        {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
+                                            TrCreateNullTarget ());}
+    | TermArg PARSEOP_EXP_MODULO        {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+    | TermArg PARSEOP_EXP_MULTIPLY      {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+    | TermArg PARSEOP_EXP_SHIFT_LEFT    {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+    | TermArg PARSEOP_EXP_SHIFT_RIGHT   {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+    | TermArg PARSEOP_EXP_SUBTRACT      {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+
+    | TermArg PARSEOP_EXP_AND           {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+    | TermArg PARSEOP_EXP_OR            {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+    | TermArg PARSEOP_EXP_XOR           {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+
+    | TermArg PARSEOP_EXP_GREATER       {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+    | TermArg PARSEOP_EXP_GREATER_EQUAL {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATEREQUAL);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+    | TermArg PARSEOP_EXP_LESS          {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+    | TermArg PARSEOP_EXP_LESS_EQUAL    {$<n>$ = TrCreateLeafNode (PARSEOP_LLESSEQUAL);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+
+    | TermArg PARSEOP_EXP_EQUAL         {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+    | TermArg PARSEOP_EXP_NOT_EQUAL     {$<n>$ = TrCreateLeafNode (PARSEOP_LNOTEQUAL);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+
+    | TermArg PARSEOP_EXP_LOGICAL_AND   {$<n>$ = TrCreateLeafNode (PARSEOP_LAND);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+    | TermArg PARSEOP_EXP_LOGICAL_OR    {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+
+      /* Parentheses */
+
+    | '(' TermArg ')'                   { $$ = $2;}
+    ;
+
+EqualsTerm
+
+    /* All assignment-type operations */
+
+    : SuperName PARSEOP_EXP_EQUALS
+        TermArg                         {$$ = TrCreateAssignmentNode ($1, $3);}
+
+    | TermArg PARSEOP_EXP_ADD_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
+                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+
+    | TermArg PARSEOP_EXP_DIV_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
+                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+
+    | TermArg PARSEOP_EXP_MOD_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
+                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+
+    | TermArg PARSEOP_EXP_MUL_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
+                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+
+    | TermArg PARSEOP_EXP_SHL_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
+                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+
+    | TermArg PARSEOP_EXP_SHR_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
+                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+
+    | TermArg PARSEOP_EXP_SUB_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
+                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+
+    | TermArg PARSEOP_EXP_AND_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
+                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+
+    | TermArg PARSEOP_EXP_OR_EQ         {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
+                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+
+    | TermArg PARSEOP_EXP_XOR_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
+        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
+                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+    ;
+
+
 /* ACPI 3.0 -- allow semicolons between terms */
 
 TermList
@@ -106,8 +249,8 @@
     : Object                        {}
     | Type1Opcode                   {}
     | Type2Opcode                   {}
-    | Type2IntegerOpcode            {}
-    | Type2StringOpcode             {}
+    | Type2IntegerOpcode            {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
+    | Type2StringOpcode             {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
     | Type2BufferOpcode             {}
     | Type2BufferOrStringOpcode     {}
     | error                         {$$ = AslDoError(); yyclearin;}
@@ -188,7 +331,7 @@
     | ScopeTerm                     {}
     ;
 
-UserTerm
+MethodInvocationTerm
     : NameString '('                {TrUpdateNode (PARSEOP_METHODCALL, $1);}
         ArgList ')'                 {$$ = TrLinkChildNode ($1,$4);}
     ;
@@ -219,8 +362,8 @@
     ;
 
 Target
-    :                               {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);} /* Placeholder is a ZeroOp object */
-    | ','                           {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);} /* Placeholder is a ZeroOp object */
+    :                               {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
+    | ','                           {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
     | ',' SuperName                 {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);}
     ;
 
@@ -305,9 +448,10 @@
     | RefOfTerm                     {}
     | SizeOfTerm                    {}
     | StoreTerm                     {}
+    | EqualsTerm                    {}
     | TimerTerm                     {}
     | WaitTerm                      {}
-    | UserTerm                      {}
+    | MethodInvocationTerm          {}
     ;
 
 /*
@@ -315,7 +459,8 @@
  */
 
 Type2IntegerOpcode                  /* "Type3" opcodes */
-    : AddTerm                       {}
+    : Expression                    {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
+    | AddTerm                       {}
     | AndTerm                       {}
     | DecTerm                       {}
     | DivideTerm                    {}
@@ -361,7 +506,9 @@
     ;
 
 Type2BufferOrStringOpcode
-    : ConcatTerm                    {}
+    : ConcatTerm                    {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
+    | PrintfTerm                    {}
+    | FprintfTerm                   {}
     | MidTerm                       {}
     ;
 
@@ -387,6 +534,7 @@
 Type5Opcode
     : ResourceTemplateTerm          {}
     | UnicodeTerm                   {}
+    | ToPLDTerm                     {}
     | ToUUIDTerm                    {}
     ;
 
@@ -394,7 +542,7 @@
     : RefOfTerm                     {}
     | DerefOfTerm                   {}
     | IndexTerm                     {}
-    | UserTerm                      {}
+    | MethodInvocationTerm          {}
     ;
 
 IncludeTerm
@@ -1370,6 +1518,86 @@
         error ')'                   {$$ = AslDoError(); yyclearin;}
     ;
 
+PldKeyword
+    : PARSEOP_PLD_REVISION          {$$ = TrCreateLeafNode (PARSEOP_PLD_REVISION);}
+    | PARSEOP_PLD_IGNORECOLOR       {$$ = TrCreateLeafNode (PARSEOP_PLD_IGNORECOLOR);}
+    | PARSEOP_PLD_RED               {$$ = TrCreateLeafNode (PARSEOP_PLD_RED);}
+    | PARSEOP_PLD_GREEN             {$$ = TrCreateLeafNode (PARSEOP_PLD_GREEN);}
+    | PARSEOP_PLD_BLUE              {$$ = TrCreateLeafNode (PARSEOP_PLD_BLUE);}
+    | PARSEOP_PLD_WIDTH             {$$ = TrCreateLeafNode (PARSEOP_PLD_WIDTH);}
+    | PARSEOP_PLD_HEIGHT            {$$ = TrCreateLeafNode (PARSEOP_PLD_HEIGHT);}
+    | PARSEOP_PLD_USERVISIBLE       {$$ = TrCreateLeafNode (PARSEOP_PLD_USERVISIBLE);}
+    | PARSEOP_PLD_DOCK              {$$ = TrCreateLeafNode (PARSEOP_PLD_DOCK);}
+    | PARSEOP_PLD_LID               {$$ = TrCreateLeafNode (PARSEOP_PLD_LID);}
+    | PARSEOP_PLD_PANEL             {$$ = TrCreateLeafNode (PARSEOP_PLD_PANEL);}
+    | PARSEOP_PLD_VERTICALPOSITION  {$$ = TrCreateLeafNode (PARSEOP_PLD_VERTICALPOSITION);}
+    | PARSEOP_PLD_HORIZONTALPOSITION {$$ = TrCreateLeafNode (PARSEOP_PLD_HORIZONTALPOSITION);}
+    | PARSEOP_PLD_SHAPE             {$$ = TrCreateLeafNode (PARSEOP_PLD_SHAPE);}
+    | PARSEOP_PLD_GROUPORIENTATION  {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPORIENTATION);}
+    | PARSEOP_PLD_GROUPTOKEN        {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPTOKEN);}
+    | PARSEOP_PLD_GROUPPOSITION     {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPPOSITION);}
+    | PARSEOP_PLD_BAY               {$$ = TrCreateLeafNode (PARSEOP_PLD_BAY);}
+    | PARSEOP_PLD_EJECTABLE         {$$ = TrCreateLeafNode (PARSEOP_PLD_EJECTABLE);}
+    | PARSEOP_PLD_EJECTREQUIRED     {$$ = TrCreateLeafNode (PARSEOP_PLD_EJECTREQUIRED);}
+    | PARSEOP_PLD_CABINETNUMBER     {$$ = TrCreateLeafNode (PARSEOP_PLD_CABINETNUMBER);}
+    | PARSEOP_PLD_CARDCAGENUMBER    {$$ = TrCreateLeafNode (PARSEOP_PLD_CARDCAGENUMBER);}
+    | PARSEOP_PLD_REFERENCE         {$$ = TrCreateLeafNode (PARSEOP_PLD_REFERENCE);}
+    | PARSEOP_PLD_ROTATION          {$$ = TrCreateLeafNode (PARSEOP_PLD_ROTATION);}
+    | PARSEOP_PLD_ORDER             {$$ = TrCreateLeafNode (PARSEOP_PLD_ORDER);}
+    | PARSEOP_PLD_RESERVED          {$$ = TrCreateLeafNode (PARSEOP_PLD_RESERVED);}
+    | PARSEOP_PLD_VERTICALOFFSET    {$$ = TrCreateLeafNode (PARSEOP_PLD_VERTICALOFFSET);}
+    | PARSEOP_PLD_HORIZONTALOFFSET  {$$ = TrCreateLeafNode (PARSEOP_PLD_HORIZONTALOFFSET);}
+    ;
+
+PldKeywordList
+    :                               {$$ = NULL;}
+    | PldKeyword
+        PARSEOP_EXP_EQUALS Integer  {$$ = TrLinkChildren ($1,1,$3);}
+    | PldKeyword
+        PARSEOP_EXP_EQUALS String   {$$ = TrLinkChildren ($1,1,$3);}
+    | PldKeywordList ','            /* Allows a trailing comma at list end */
+    | PldKeywordList ','
+        PldKeyword
+        PARSEOP_EXP_EQUALS Integer  {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
+    | PldKeywordList ','
+        PldKeyword
+        PARSEOP_EXP_EQUALS String   {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
+    ;
+
+ToPLDTerm
+    : PARSEOP_TOPLD '('             {$<n>$ = TrCreateLeafNode (PARSEOP_TOPLD);}
+        PldKeywordList
+        ')'                         {$$ = TrLinkChildren ($<n>3,1,$4);}
+    | PARSEOP_TOPLD '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+PrintfArgList
+    :                               {$$ = NULL;}
+    | TermArg                       {$$ = $1;}
+    | PrintfArgList ','
+       TermArg                      {$$ = TrLinkPeerNode ($1, $3);}
+    ;
+
+PrintfTerm
+    : PARSEOP_PRINTF '('            {$<n>$ = TrCreateLeafNode (PARSEOP_PRINTF);}
+        StringData
+        PrintfArgList
+        ')'                         {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+    | PARSEOP_PRINTF '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+FprintfTerm
+    : PARSEOP_FPRINTF '('            {$<n>$ = TrCreateLeafNode (PARSEOP_FPRINTF);}
+        TermArg ','
+        StringData
+        PrintfArgList
+        ')'                         {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
+    | PARSEOP_FPRINTF '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
 ToStringTerm
     : PARSEOP_TOSTRING '('          {$<n>$ = TrCreateLeafNode (PARSEOP_TOSTRING);}
         TermArg
@@ -1691,7 +1919,7 @@
     | DebugTerm                     {}
     | Type6Opcode                   {}
 
-/* For ObjectType: SuperName except for UserTerm (method invocation) */
+/* For ObjectType: SuperName except for MethodInvocationTerm */
 
 ObjectTypeName
     : NameString                    {}
@@ -1702,7 +1930,7 @@
     | DerefOfTerm                   {}
     | IndexTerm                     {}
 
-/*    | UserTerm                      {} */  /* Caused reduce/reduce with Type6Opcode->UserTerm */
+/*    | MethodInvocationTerm          {} */  /* Caused reduce/reduce with Type6Opcode->MethodInvocationTerm */
     ;
 
 ArgTerm
--- a/sys/external/bsd/acpica/dist/compiler/aslstartup.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslstartup.c	Mon Apr 13 17:21:01 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
@@ -88,6 +88,7 @@
 
     /* Init compiler globals */
 
+    Gbl_SyntaxError = 0;
     Gbl_CurrentColumn = 0;
     Gbl_CurrentLineNumber = 1;
     Gbl_LogicalLineNumber = 1;
@@ -247,7 +248,7 @@
 
     /* This is where the disassembly happens */
 
-    AcpiGbl_DbOpt_disasm = TRUE;
+    AcpiGbl_DbOpt_Disasm = TRUE;
     Status = AdAmlDisassemble (AslToFile,
         Gbl_Files[ASL_FILE_INPUT].Filename, Gbl_OutputFilenamePrefix,
         &Gbl_Files[ASL_FILE_INPUT].Filename);
--- a/sys/external/bsd/acpica/dist/compiler/aslstubs.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslstubs.c	Mon Apr 13 17:21:01 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.y	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslsupport.y	Mon Apr 13 17:21:01 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/asltokens.y	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asltokens.y	Mon Apr 13 17:21:01 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
@@ -376,6 +376,88 @@
 %token <i> PARSEOP_XOR
 %token <i> PARSEOP_ZERO
 
+/* ToPld macro */
+
+%token <i> PARSEOP_TOPLD
+%token <i> PARSEOP_PLD_REVISION
+%token <i> PARSEOP_PLD_IGNORECOLOR
+%token <i> PARSEOP_PLD_RED
+%token <i> PARSEOP_PLD_GREEN
+%token <i> PARSEOP_PLD_BLUE
+%token <i> PARSEOP_PLD_WIDTH
+%token <i> PARSEOP_PLD_HEIGHT
+%token <i> PARSEOP_PLD_USERVISIBLE
+%token <i> PARSEOP_PLD_DOCK
+%token <i> PARSEOP_PLD_LID
+%token <i> PARSEOP_PLD_PANEL
+%token <i> PARSEOP_PLD_VERTICALPOSITION
+%token <i> PARSEOP_PLD_HORIZONTALPOSITION
+%token <i> PARSEOP_PLD_SHAPE
+%token <i> PARSEOP_PLD_GROUPORIENTATION
+%token <i> PARSEOP_PLD_GROUPTOKEN
+%token <i> PARSEOP_PLD_GROUPPOSITION
+%token <i> PARSEOP_PLD_BAY
+%token <i> PARSEOP_PLD_EJECTABLE
+%token <i> PARSEOP_PLD_EJECTREQUIRED
+%token <i> PARSEOP_PLD_CABINETNUMBER
+%token <i> PARSEOP_PLD_CARDCAGENUMBER
+%token <i> PARSEOP_PLD_REFERENCE
+%token <i> PARSEOP_PLD_ROTATION
+%token <i> PARSEOP_PLD_ORDER
+%token <i> PARSEOP_PLD_RESERVED
+%token <i> PARSEOP_PLD_VERTICALOFFSET
+%token <i> PARSEOP_PLD_HORIZONTALOFFSET
+
+/*
+ * C-style expression parser. These must appear after all of the
+ * standard ASL operators and keywords.
+ *
+ * Note: The order of these tokens implements the precedence rules
+ * (low precedence to high). See aslrules.y for an exhaustive list.
+ */
+%right <i> PARSEOP_EXP_EQUALS
+           PARSEOP_EXP_ADD_EQ
+           PARSEOP_EXP_SUB_EQ
+           PARSEOP_EXP_MUL_EQ
+           PARSEOP_EXP_DIV_EQ
+           PARSEOP_EXP_MOD_EQ
+           PARSEOP_EXP_SHL_EQ
+           PARSEOP_EXP_SHR_EQ
+           PARSEOP_EXP_AND_EQ
+           PARSEOP_EXP_XOR_EQ
+           PARSEOP_EXP_OR_EQ
+
+%left <i>  PARSEOP_EXP_LOGICAL_OR
+%left <i>  PARSEOP_EXP_LOGICAL_AND
+%left <i>  PARSEOP_EXP_OR
+%left <i>  PARSEOP_EXP_XOR
+%left <i>  PARSEOP_EXP_AND
+%left <i>  PARSEOP_EXP_EQUAL
+           PARSEOP_EXP_NOT_EQUAL
+%left <i>  PARSEOP_EXP_GREATER
+           PARSEOP_EXP_LESS
+           PARSEOP_EXP_GREATER_EQUAL
+           PARSEOP_EXP_LESS_EQUAL
+%left <i>  PARSEOP_EXP_SHIFT_RIGHT
+           PARSEOP_EXP_SHIFT_LEFT
+%left <i>  PARSEOP_EXP_ADD
+           PARSEOP_EXP_SUBTRACT
+%left <i>  PARSEOP_EXP_MULTIPLY
+           PARSEOP_EXP_DIVIDE
+           PARSEOP_EXP_MODULO
+
+%right <i> PARSEOP_EXP_NOT
+           PARSEOP_EXP_LOGICAL_NOT
+
+%left <i>  PARSEOP_EXP_INCREMENT
+           PARSEOP_EXP_DECREMENT
+
+%token <i> PARSEOP_PRINTF
+%token <i> PARSEOP_FPRINTF
+/* Specific parentheses tokens are not used at this time */
+           /* PARSEOP_EXP_PAREN_OPEN */
+           /* PARSEOP_EXP_PAREN_CLOSE */
+
 /*
  * Special functions. These should probably stay at the end of this
  * table.
--- a/sys/external/bsd/acpica/dist/compiler/asltransform.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asltransform.c	Mon Apr 13 17:21:01 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/asltypes.h	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asltypes.h	Mon Apr 13 17:21:01 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/asltypes.y	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asltypes.y	Mon Apr 13 17:21:01 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
@@ -74,7 +74,7 @@
 %type <n> Term
 %type <n> TermArg
 %type <n> TermList
-%type <n> UserTerm
+%type <n> MethodInvocationTerm
 
 /* Type4Opcode is obsolete */
 
@@ -285,8 +285,14 @@
 %type <n> ResourceMacroList
 %type <n> ResourceMacroTerm
 %type <n> ResourceTemplateTerm
+%type <n> PldKeyword
+%type <n> PldKeywordList
+%type <n> ToPLDTerm
 %type <n> ToUUIDTerm
 %type <n> UnicodeTerm
+%type <n> PrintfArgList
+%type <n> PrintfTerm
+%type <n> FprintfTerm
 
 /* Resource Descriptors */
 
@@ -379,3 +385,9 @@
 %type <n> OptionalWordConst
 %type <n> OptionalWordConstExpr
 %type <n> OptionalXferSize
+
+/*
+ * C-style expression parser
+ */
+%type <n> Expression
+%type <n> EqualsTerm
--- a/sys/external/bsd/acpica/dist/compiler/asluuid.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asluuid.c	Mon Apr 13 17:21:01 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/dtcompiler.h	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtcompiler.h	Mon Apr 13 17:21:01 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
@@ -85,15 +85,16 @@
  */
 typedef struct dt_field
 {
-    char                    *Name;      /* Field name (from name : value) */
-    char                    *Value;     /* Field value (from name : value) */
-    struct dt_field         *Next;      /* Next field */
-    struct dt_field         *NextLabel; /* If field is a label, next label */
-    UINT32                  Line;       /* Line number for this field */
-    UINT32                  ByteOffset; /* Offset in source file for field */
-    UINT32                  NameColumn; /* Start column for field name */
-    UINT32                  Column;     /* Start column for field value */
-    UINT32                  TableOffset;/* Binary offset within ACPI table */
+    char                    *Name;       /* Field name (from name : value) */
+    char                    *Value;      /* Field value (from name : value) */
+    UINT32                  StringLength;/* Length of Value */
+    struct dt_field         *Next;       /* Next field */
+    struct dt_field         *NextLabel;  /* If field is a label, next label */
+    UINT32                  Line;        /* Line number for this field */
+    UINT32                  ByteOffset;  /* Offset in source file for field */
+    UINT32                  NameColumn;  /* Start column for field name */
+    UINT32                  Column;      /* Start column for field value */
+    UINT32                  TableOffset; /* Binary offset within ACPI table */
     UINT8                   Flags;
 
 } DT_FIELD;
@@ -557,6 +558,7 @@
 extern const unsigned char  TemplateMchi[];
 extern const unsigned char  TemplateMpst[];
 extern const unsigned char  TemplateMsct[];
+extern const unsigned char  TemplateMsdm[];
 extern const unsigned char  TemplateMtmr[];
 extern const unsigned char  TemplatePcct[];
 extern const unsigned char  TemplatePmtt[];
--- a/sys/external/bsd/acpica/dist/compiler/dtexpress.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtexpress.c	Mon Apr 13 17:21:01 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 __DTEXPRESS_C__
-
 #include "aslcompiler.h"
 #include "dtcompiler.h"
 #include "dtparser.y.h"
--- a/sys/external/bsd/acpica/dist/compiler/dtio.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtio.c	Mon Apr 13 17:21:01 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 __DTIO_C__
-
 #include "aslcompiler.h"
 #include "dtcompiler.h"
 #include "acapps.h"
@@ -377,6 +375,7 @@
         Field->ByteOffset = Offset;
         Field->NameColumn = NameColumn;
         Field->Column = Column;
+        Field->StringLength = Length;
 
         DtLinkField (Field);
     }
@@ -416,6 +415,7 @@
     int                     c;
 
 
+    ACPI_MEMSET (Gbl_CurrentLineBuffer, 0, Gbl_LineBufferSize);
     for (i = 0; ;)
     {
         /*
@@ -941,11 +941,11 @@
 
     DbgPrint (ASL_DEBUG_OUTPUT,  "\nField List:\n"
         "LineNo   ByteOff  NameCol  Column   TableOff "
-        "Flags    %32s : %s\n\n", "Name", "Value");
+        "Flags %32s : %s\n\n", "Name", "Value");
     while (Field)
     {
         DbgPrint (ASL_DEBUG_OUTPUT,
-            "%.08X %.08X %.08X %.08X %.08X %.08X %32s : %s\n",
+            "%.08X %.08X %.08X %.08X %.08X %2.2X    %32s : %s\n",
             Field->Line, Field->ByteOffset, Field->NameColumn,
             Field->Column, Field->TableOffset, Field->Flags,
             Field->Name, Field->Value);
--- a/sys/external/bsd/acpica/dist/compiler/dtparser.l	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dtparser.l	Mon Apr 13 17:21:01 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/dttemplate.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dttemplate.c	Mon Apr 13 17:21:01 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/dttemplate.h	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/dttemplate.h	Mon Apr 13 17:21:01 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
@@ -662,6 +662,23 @@
     0x00,0x00,0x00,0x00,0x00                  /* 00000040    "....."    */
 };
 
+const unsigned char TemplateMsdm[] =
+{
+    0x4D,0x53,0x44,0x4D,0x64,0x00,0x00,0x00,  /* 00000000    "MSDMd..." */
+    0x01,0x34,0x49,0x6E,0x74,0x65,0x6C,0x00,  /* 00000008    ".4Intel." */
+    0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65,  /* 00000010    "Template" */
+    0x03,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
+    0x04,0x02,0x15,0x20,0x00,0x00,0x00,0x00,  /* 00000020    "... ...." */
+    0x0A,0x10,0x16,0x17,0x18,0x19,0x1A,0x1B,  /* 00000028    "........" */
+    0x1C,0x1D,0x1E,0x1F,0x20,0x21,0x22,0x23,  /* 00000030    ".... !"#" */
+    0x24,0x25,0x26,0x27,0x10,0x0A,0x15,0x16,  /* 00000038    "$%&'...." */
+    0x17,0x18,0x19,0x1A,0x1B,0x1C,0x1D,0x1E,  /* 00000040    "........" */
+    0x1F,0x20,0x21,0x22,0x23,0x24,0x25,0x26,  /* 00000048    ". !"#$%&" */
+    0x16,0x15,0x0A,0x10,0x16,0x17,0x18,0x19,  /* 00000050    "........" */
+    0x1A,0x1B,0x1C,0x1D,0x1E,0x1F,0x20,0x21,  /* 00000058    "...... !" */
+    0x22,0x23,0x24,0x25                       /* 00000060    ""#$%"     */
+};
+
 const unsigned char TemplateMpst[] =
 {
     0x4D,0x50,0x53,0x54,0xB6,0x00,0x00,0x00,  /* 00000000    "MPST...." */
--- a/sys/external/bsd/acpica/dist/compiler/preprocess.h	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/preprocess.h	Mon Apr 13 17:21:01 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/prexpress.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/prexpress.c	Mon Apr 13 17:21:01 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/prmacros.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/prmacros.c	Mon Apr 13 17:21:01 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/prparser.l	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/prparser.l	Mon Apr 13 17:21:01 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/prscan.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/prscan.c	Mon Apr 13 17:21:01 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/dbconvert.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbconvert.c	Mon Apr 13 17:21:01 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
@@ -361,7 +361,9 @@
     Dword = 0;
     ACPI_PLD_SET_REVISION       (&Dword, PldInfo->Revision);
     ACPI_PLD_SET_IGNORE_COLOR   (&Dword, PldInfo->IgnoreColor);
-    ACPI_PLD_SET_COLOR          (&Dword, PldInfo->Color);
+    ACPI_PLD_SET_RED            (&Dword, PldInfo->Red);
+    ACPI_PLD_SET_GREEN          (&Dword, PldInfo->Green);
+    ACPI_PLD_SET_BLUE           (&Dword, PldInfo->Blue);
     ACPI_MOVE_32_TO_32 (&Buffer[0], &Dword);
 
     /* Second 32 bits */
@@ -480,45 +482,47 @@
 
     /* First 32-bit dword */
 
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Revision", PldInfo->Revision);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "IgnoreColor", PldInfo->IgnoreColor);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Color", PldInfo->Color);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Revision", PldInfo->Revision);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_IgnoreColor", PldInfo->IgnoreColor);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Red", PldInfo->Red);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Green", PldInfo->Green);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Blue", PldInfo->Blue);
 
     /* Second 32-bit dword */
 
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Width", PldInfo->Width);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Height", PldInfo->Height);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Width", PldInfo->Width);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Height", PldInfo->Height);
 
     /* Third 32-bit dword */
 
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "UserVisible", PldInfo->UserVisible);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Dock", PldInfo->Dock);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Lid", PldInfo->Lid);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Panel", PldInfo->Panel);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "VerticalPosition", PldInfo->VerticalPosition);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "HorizontalPosition", PldInfo->HorizontalPosition);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Shape", PldInfo->Shape);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "GroupOrientation", PldInfo->GroupOrientation);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "GroupToken", PldInfo->GroupToken);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "GroupPosition", PldInfo->GroupPosition);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Bay", PldInfo->Bay);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_UserVisible", PldInfo->UserVisible);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Dock", PldInfo->Dock);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Lid", PldInfo->Lid);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Panel", PldInfo->Panel);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_VerticalPosition", PldInfo->VerticalPosition);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_HorizontalPosition", PldInfo->HorizontalPosition);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Shape", PldInfo->Shape);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_GroupOrientation", PldInfo->GroupOrientation);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_GroupToken", PldInfo->GroupToken);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_GroupPosition", PldInfo->GroupPosition);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Bay", PldInfo->Bay);
 
     /* Fourth 32-bit dword */
 
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Ejectable", PldInfo->Ejectable);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "OspmEjectRequired", PldInfo->OspmEjectRequired);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "CabinetNumber", PldInfo->CabinetNumber);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "CardCageNumber", PldInfo->CardCageNumber);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Reference", PldInfo->Reference);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Rotation", PldInfo->Rotation);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT, "Order", PldInfo->Order);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Ejectable", PldInfo->Ejectable);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_EjectRequired", PldInfo->OspmEjectRequired);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_CabinetNumber", PldInfo->CabinetNumber);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_CardCageNumber", PldInfo->CardCageNumber);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Reference", PldInfo->Reference);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Rotation", PldInfo->Rotation);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_Order", PldInfo->Order);
 
     /* Fifth 32-bit dword */
 
     if (BufferDesc->Buffer.Length > 16)
     {
-        AcpiOsPrintf (ACPI_PLD_OUTPUT, "VerticalOffset", PldInfo->VerticalOffset);
-        AcpiOsPrintf (ACPI_PLD_OUTPUT, "HorizontalOffset", PldInfo->HorizontalOffset);
+        AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_VerticalOffset", PldInfo->VerticalOffset);
+        AcpiOsPrintf (ACPI_PLD_OUTPUT, "PLD_HorizontalOffset", PldInfo->HorizontalOffset);
     }
 
     ACPI_FREE (PldInfo);
--- a/sys/external/bsd/acpica/dist/debugger/dbfileio.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbfileio.c	Mon Apr 13 17:21:01 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/debugger/dbhistry.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbhistry.c	Mon Apr 13 17:21:01 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/dbstats.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbstats.c	Mon Apr 13 17:21:01 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/dbxface.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/debugger/dbxface.c	Mon Apr 13 17:21:01 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
@@ -422,11 +422,9 @@
     AcpiGbl_DbConsoleDebugLevel = ACPI_NORMAL_DEFAULT | ACPI_LV_TABLES;
     AcpiGbl_DbOutputFlags       = ACPI_DB_CONSOLE_OUTPUT;
 
-    AcpiGbl_DbOpt_tables        = FALSE;
-    AcpiGbl_DbOpt_disasm        = FALSE;
-    AcpiGbl_DbOpt_stats         = FALSE;
-    AcpiGbl_DbOpt_verbose       = TRUE;
-    AcpiGbl_DbOpt_ini_methods   = TRUE;
+    AcpiGbl_DbOpt_Disasm        = FALSE;
+    AcpiGbl_DbOpt_Verbose       = TRUE;
+    AcpiGbl_DbOpt_NoIniMethods  = FALSE;
 
     AcpiGbl_DbBuffer = AcpiOsAllocate (ACPI_DEBUG_BUFFER_SIZE);
     if (!AcpiGbl_DbBuffer)
@@ -474,10 +472,9 @@
         }
     }
 
-    if (!AcpiGbl_DbOpt_verbose)
+    if (!AcpiGbl_DbOpt_Verbose)
     {
-        AcpiGbl_DbOpt_disasm = TRUE;
-        AcpiGbl_DbOpt_stats = FALSE;
+        AcpiGbl_DbOpt_Disasm = TRUE;
     }
 
     return_ACPI_STATUS (AE_OK);
--- a/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmbuffer.c	Mon Apr 13 17:21:01 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
@@ -79,6 +79,51 @@
 #define ACPI_BUFFER_BYTES_PER_LINE      8
 
 
+/* Strings for ToPld */
+
+static char *DmPanelList[] =
+{
+    "TOP",
+    "BOTTOM",
+    "LEFT",
+    "RIGHT",
+    "FRONT",
+    "BACK",
+    "UNKNOWN",
+    NULL
+};
+
+static char *DmVerticalPositionList[] =
+{
+    "UPPER",
+    "CENTER",
+    "LOWER",
+    NULL
+};
+
+static char *DmHorizontalPositionList[] =
+{
+    "LEFT",
+    "CENTER",
+    "RIGHT",
+    NULL
+};
+
+static char *DmShapeList[] =
+{
+    "ROUND",
+    "OVAL",
+    "SQUARE",
+    "VERTICALRECTANGLE",
+    "HORIZONTALRECTANGLE",
+    "VERTICALTRAPEZOID",
+    "HORIZONTALTRAPEZOID",
+    "UNKNOWN",
+    "CHAMFERED",
+    NULL
+};
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiDmDisasmByteList
@@ -232,8 +277,9 @@
         break;
 
     case ACPI_DASM_PLD_METHOD:
-
+#if 0
         AcpiDmDisasmByteList (Info->Level, ByteData, ByteCount);
+#endif
         AcpiDmPldBuffer (Info->Level, ByteData, ByteCount);
         break;
 
@@ -434,11 +480,12 @@
         return (FALSE);
     }
 
-    /* For each word, 1st byte must be ascii, 2nd byte must be zero */
+    /* For each word, 1st byte must be ascii (1-0x7F), 2nd byte must be zero */
 
     for (i = 0; i < (ByteCount - 2); i += 2)
     {
-        if ((!ACPI_IS_PRINT (ByteData[i])) ||
+        if ((ByteData[i] == 0) ||
+            (ByteData[i] > 0x7F) ||
             (ByteData[(ACPI_SIZE) i + 1] != 0))
         {
             return (FALSE);
@@ -534,9 +581,14 @@
     ACPI_PARSE_OBJECT       *Op)
 {
     ACPI_NAMESPACE_NODE     *Node;
+    ACPI_PARSE_OBJECT       *SizeOp;
     ACPI_PARSE_OBJECT       *ParentOp;
 
 
+    /* Buffer size is the buffer argument */
+
+    SizeOp = Op->Common.Value.Arg;
+
     ParentOp = Op->Common.Parent;
     if (!ParentOp)
     {
@@ -551,6 +603,9 @@
 
         if (ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__PLD))
         {
+            /* Ignore the Size argument in the disassembly of this buffer op */
+
+            SizeOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
             return (TRUE);
         }
 
@@ -573,6 +628,9 @@
 
             if (ACPI_COMPARE_NAME (Node->Name.Ascii, METHOD_NAME__PLD))
             {
+                /* Ignore the Size argument in the disassembly of this buffer op */
+
+                SizeOp->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
                 return (TRUE);
             }
         }
@@ -584,6 +642,51 @@
 
 /*******************************************************************************
  *
+ * FUNCTION:    AcpiDmFindNameByIndex
+ *
+ * PARAMETERS:  Index               - Index of array to check
+ *              List                - Array to reference
+ *
+ * RETURN:      String from List or empty string
+ *
+ * DESCRIPTION: Finds and returns the char string located at the given index
+ *              position in List.
+ *
+ ******************************************************************************/
+
+static char *
+AcpiDmFindNameByIndex (
+    UINT64                  Index,
+    char                    **List)
+{
+    char                     *Str;
+    UINT32                   i;
+
+
+    /* Bounds check */
+
+    Str = List[0];
+    i = 0;
+
+    while(Str)
+    {
+        i++;
+        Str = List[i];
+    }
+
+    if (Index >= i)
+    {
+        /* TBD: Add error msg */
+
+        return ("");
+    }
+
+    return (List[Index]);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AcpiDmPldBuffer
  *
  * PARAMETERS:  Level               - Current source code indentation level
@@ -596,9 +699,12 @@
  *
  ******************************************************************************/
 
-#define ACPI_PLD_OUTPUT08     "%*.s/* %18s : %-6.2X */\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT16   "%*.s/* %18s : %-6.4X */\n", ACPI_MUL_4 (Level), " "
-#define ACPI_PLD_OUTPUT24   "%*.s/* %18s : %-6.6X */\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT08   "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT08P  "%*.s%-18s = 0x%X)\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT16   "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT16P  "%*.s%-18s = 0x%X)\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUT24   "%*.s%-18s = 0x%X,\n", ACPI_MUL_4 (Level), " "
+#define ACPI_PLD_OUTPUTSTR  "%*.s%-18s = \"%s\",\n", ACPI_MUL_4 (Level), " "
 
 static void
 AcpiDmPldBuffer (
@@ -625,47 +731,63 @@
         return;
     }
 
+    AcpiOsPrintf ("\n");
+
     /* First 32-bit dword */
 
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "Revision", PldInfo->Revision);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "IgnoreColor", PldInfo->IgnoreColor);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT24,"Color", PldInfo->Color);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Revision", PldInfo->Revision);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_IgnoreColor", PldInfo->IgnoreColor);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Red", PldInfo->Red);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Green", PldInfo->Green);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Blue", PldInfo->Blue);
 
     /* Second 32-bit dword */
 
-    AcpiOsPrintf (ACPI_PLD_OUTPUT16,"Width", PldInfo->Width);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT16,"Height", PldInfo->Height);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT16,  "PLD_Width", PldInfo->Width);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT16,  "PLD_Height", PldInfo->Height);
 
     /* Third 32-bit dword */
 
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "UserVisible", PldInfo->UserVisible);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "Dock", PldInfo->Dock);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "Lid", PldInfo->Lid);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "Panel", PldInfo->Panel);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "VerticalPosition", PldInfo->VerticalPosition);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "HorizontalPosition", PldInfo->HorizontalPosition);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "Shape", PldInfo->Shape);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "GroupOrientation", PldInfo->GroupOrientation);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "GroupToken", PldInfo->GroupToken);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "GroupPosition", PldInfo->GroupPosition);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "Bay", PldInfo->Bay);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_UserVisible", PldInfo->UserVisible);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Dock", PldInfo->Dock);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Lid", PldInfo->Lid);
+    AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Panel",
+        AcpiDmFindNameByIndex(PldInfo->Panel, DmPanelList));
+    AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_VerticalPosition",
+        AcpiDmFindNameByIndex(PldInfo->VerticalPosition, DmVerticalPositionList));
+    AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_HorizontalPosition",
+        AcpiDmFindNameByIndex(PldInfo->HorizontalPosition, DmHorizontalPositionList));
+    AcpiOsPrintf (ACPI_PLD_OUTPUTSTR, "PLD_Shape",
+        AcpiDmFindNameByIndex(PldInfo->Shape, DmShapeList));
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_GroupOrientation", PldInfo->GroupOrientation);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_GroupToken", PldInfo->GroupToken);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_GroupPosition", PldInfo->GroupPosition);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Bay", PldInfo->Bay);
 
     /* Fourth 32-bit dword */
 
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "Ejectable", PldInfo->Ejectable);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "OspmEjectRequired", PldInfo->OspmEjectRequired);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "CabinetNumber", PldInfo->CabinetNumber);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "CardCageNumber", PldInfo->CardCageNumber);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "Reference", PldInfo->Reference);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "Rotation", PldInfo->Rotation);
-    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "Order", PldInfo->Order);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Ejectable", PldInfo->Ejectable);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_EjectRequired", PldInfo->OspmEjectRequired);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_CabinetNumber", PldInfo->CabinetNumber);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_CardCageNumber", PldInfo->CardCageNumber);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Reference", PldInfo->Reference);
+    AcpiOsPrintf (ACPI_PLD_OUTPUT08,  "PLD_Rotation", PldInfo->Rotation);
+
+    if (ByteCount < ACPI_PLD_REV1_BUFFER_SIZE)
+    {
+        AcpiOsPrintf (ACPI_PLD_OUTPUT08P, "PLD_Order", PldInfo->Order);
+    }
+    else
+    {
+        AcpiOsPrintf (ACPI_PLD_OUTPUT08, "PLD_Order", PldInfo->Order);
+    }
 
     /* Fifth 32-bit dword */
 
     if (ByteCount >= ACPI_PLD_REV1_BUFFER_SIZE)
     {
-        AcpiOsPrintf (ACPI_PLD_OUTPUT16,"VerticalOffset", PldInfo->VerticalOffset);
-        AcpiOsPrintf (ACPI_PLD_OUTPUT16,"HorizontalOffset", PldInfo->HorizontalOffset);
+        AcpiOsPrintf (ACPI_PLD_OUTPUT16, "PLD_VerticalOffset", PldInfo->VerticalOffset);
+        AcpiOsPrintf (ACPI_PLD_OUTPUT16P, "PLD_HorizontalOffset", PldInfo->HorizontalOffset);
     }
 
     ACPI_FREE (PldInfo);
@@ -692,6 +814,7 @@
     UINT16                  *WordData;
     UINT32                  WordCount;
     UINT32                  i;
+    int                     OutputValue;
 
 
     /* Extract the buffer info as a WORD buffer */
@@ -704,7 +827,23 @@
     AcpiOsPrintf ("\"");
     for (i = 0; i < (WordCount - 1); i++)
     {
-        AcpiOsPrintf ("%c", (int) WordData[i]);
+        OutputValue = (int) WordData[i];
+
+        /* Handle values that must be escaped */
+
+        if ((OutputValue == '\"') ||
+            (OutputValue == '\\'))
+        {
+            AcpiOsPrintf ("\\%c", OutputValue);
+        }
+        else if (!ACPI_IS_PRINT (OutputValue))
+        {
+            AcpiOsPrintf ("\\x%2.2X", OutputValue);
+        }
+        else
+        {
+            AcpiOsPrintf ("%c", OutputValue);
+        }
     }
 
     AcpiOsPrintf ("\")");
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmcstyle.c	Mon Apr 13 17:21:01 2015 +0000
@@ -0,0 +1,773 @@
+/*******************************************************************************
+ *
+ * Module Name: dmcstyle - Support for C-style operator disassembly
+ *
+ ******************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2015, Intel Corp.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions, and the following disclaimer,
+ *    without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ *    substantially similar to the "NO WARRANTY" disclaimer below
+ *    ("Disclaimer") and any redistribution must be conditioned upon
+ *    including a substantially similar Disclaimer requirement for further
+ *    binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ *    of any contributors may be used to endorse or promote products derived
+ *    from this software without specific prior written permission.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ * NO WARRANTY
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+ * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGES.
+ */
+
+#include "acpi.h"
+#include "accommon.h"
+#include "acparser.h"
+#include "amlcode.h"
+#include "acdisasm.h"
+#include "acdebug.h"
+
+#ifdef ACPI_DISASSEMBLER
+
+#define _COMPONENT          ACPI_CA_DEBUGGER
+        ACPI_MODULE_NAME    ("dmcstyle")
+
+
+/* Local prototypes */
+
+static char *
+AcpiDmGetCompoundSymbol (
+   UINT16                   AslOpcode);
+
+static void
+AcpiDmPromoteTarget (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_PARSE_OBJECT       *Target);
+
+static BOOLEAN
+AcpiDmIsValidTarget (
+    ACPI_PARSE_OBJECT       *Op);
+
+static BOOLEAN
+AcpiDmIsTargetAnOperand (
+    ACPI_PARSE_OBJECT       *Target,
+    ACPI_PARSE_OBJECT       *Operand,
+    BOOLEAN                 TopLevel);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmCheckForSymbolicOpcode
+ *
+ * PARAMETERS:  Op                  - Current parse object
+ *              Walk                - Current parse tree walk info
+ *
+ * RETURN:      TRUE if opcode can be converted to symbolic, FALSE otherwise
+ *
+ * DESCRIPTION: This is the main code that implements disassembly of AML code
+ *              to C-style operators. Called during descending phase of the
+ *              parse tree walk.
+ *
+ ******************************************************************************/
+
+BOOLEAN
+AcpiDmCheckForSymbolicOpcode (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_OP_WALK_INFO       *Info)
+{
+    char                    *OperatorSymbol = NULL;
+    ACPI_PARSE_OBJECT       *Child1;
+    ACPI_PARSE_OBJECT       *Child2;
+    ACPI_PARSE_OBJECT       *Target;
+
+
+    /* Exit immediately if ASL+ not enabled */
+
+    if (!AcpiGbl_CstyleDisassembly)
+    {
+        return (FALSE);
+    }
+
+    /* Get the first operand */
+
+    Child1 = AcpiPsGetArg (Op, 0);
+    if (!Child1)
+    {
+        return (FALSE);
+    }
+
+    /* Get the second operand */
+
+    Child2 = Child1->Common.Next;
+
+    /* Setup the operator string for this opcode */
+
+    switch (Op->Common.AmlOpcode)
+    {
+    case AML_ADD_OP:
+        OperatorSymbol = " + ";
+        break;
+
+    case AML_SUBTRACT_OP:
+        OperatorSymbol = " - ";
+        break;
+
+    case AML_MULTIPLY_OP:
+        OperatorSymbol = " * ";
+        break;
+
+    case AML_DIVIDE_OP:
+        OperatorSymbol = " / ";
+        break;
+
+    case AML_MOD_OP:
+        OperatorSymbol = " % ";
+        break;
+
+    case AML_SHIFT_LEFT_OP:
+        OperatorSymbol = " << ";
+        break;
+
+    case AML_SHIFT_RIGHT_OP:
+        OperatorSymbol = " >> ";
+        break;
+
+    case AML_BIT_AND_OP:
+        OperatorSymbol = " & ";
+        break;
+
+    case AML_BIT_OR_OP:
+        OperatorSymbol = " | ";
+        break;
+
+    case AML_BIT_XOR_OP:
+        OperatorSymbol = " ^ ";
+        break;
+
+    /* Logical operators, no target */
+
+    case AML_LAND_OP:
+        OperatorSymbol = " && ";
+        break;
+
+    case AML_LEQUAL_OP:
+        OperatorSymbol = " == ";
+        break;
+
+    case AML_LGREATER_OP:
+        OperatorSymbol = " > ";
+        break;
+
+    case AML_LLESS_OP:
+        OperatorSymbol = " < ";
+        break;
+
+    case AML_LOR_OP:
+        OperatorSymbol = " || ";
+        break;
+
+    case AML_LNOT_OP:
+        /*
+         * Check for the LNOT sub-opcodes. These correspond to
+         * LNotEqual, LLessEqual, and LGreaterEqual. There are
+         * no actual AML opcodes for these operators.
+         */
+        switch (Child1->Common.AmlOpcode)
+        {
+        case AML_LEQUAL_OP:
+            OperatorSymbol = " != ";
+            break;
+
+        case AML_LGREATER_OP:
+            OperatorSymbol = " <= ";
+            break;
+
+        case AML_LLESS_OP:
+            OperatorSymbol = " >= ";
+            break;
+
+        default:
+
+            /* Unary LNOT case, emit "!" immediately */
+
+            AcpiOsPrintf ("!");
+            return (TRUE);
+        }
+
+        Child1->Common.DisasmOpcode = ACPI_DASM_LNOT_SUFFIX;
+        Op->Common.DisasmOpcode = ACPI_DASM_LNOT_PREFIX;
+
+        /* Save symbol string in the next child (not peer) */
+
+        Child2 = AcpiPsGetArg (Child1, 0);
+        if (!Child2)
+        {
+            return (FALSE);
+        }
+
+        Child2->Common.OperatorSymbol = OperatorSymbol;
+        return (TRUE);
+
+#ifdef INDEX_SUPPORT
+    case AML_INDEX_OP:
+        Child1->Common.OperatorSymbol = " [";
+        Child2->Common.OperatorSymbol = "]";
+        break;
+#endif
+
+    /* Unary operators */
+
+    case AML_DECREMENT_OP:
+        OperatorSymbol = "--";
+        break;
+
+    case AML_INCREMENT_OP:
+        OperatorSymbol = "++";
+        break;
+
+    case AML_BIT_NOT_OP:
+    case AML_STORE_OP:
+        OperatorSymbol = NULL;
+        break;
+
+    default:
+        return (FALSE);
+    }
+
+    if (Child1->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX)
+    {
+        return (TRUE);
+    }
+
+    /*
+     * This is the key to how the disassembly of the C-style operators
+     * works. We save the operator symbol in the first child, thus
+     * deferring symbol output until after the first operand has been
+     * emitted.
+     */
+    if (!Child1->Common.OperatorSymbol)
+    {
+        Child1->Common.OperatorSymbol = OperatorSymbol;
+    }
+
+    /*
+     * Check for a valid target as the 3rd (or sometimes 2nd) operand
+     *
+     * Compound assignment operator support:
+     * Attempt to optimize constructs of the form:
+     *      Add (Local1, 0xFF, Local1)
+     * to:
+     *      Local1 += 0xFF
+     *
+     * Only the math operators and Store() have a target.
+     * Logicals have no target.
+     */
+    switch (Op->Common.AmlOpcode)
+    {
+    case AML_ADD_OP:
+    case AML_SUBTRACT_OP:
+    case AML_MULTIPLY_OP:
+    case AML_DIVIDE_OP:
+    case AML_MOD_OP:
+    case AML_SHIFT_LEFT_OP:
+    case AML_SHIFT_RIGHT_OP:
+    case AML_BIT_AND_OP:
+    case AML_BIT_OR_OP:
+    case AML_BIT_XOR_OP:
+
+        /* Target is 3rd operand */
+
+        Target = Child2->Common.Next;
+        if (Op->Common.AmlOpcode == AML_DIVIDE_OP)
+        {
+            /*
+             * Divide has an extra target operand (Remainder).
+             * If this extra target is specified, it cannot be converted
+             * to a C-style operator
+             */
+            if (AcpiDmIsValidTarget (Target))
+            {
+                Child1->Common.OperatorSymbol = NULL;
+                return (FALSE);
+            }
+
+            Target->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
+            Target = Target->Common.Next;
+        }
+
+        /* Parser should ensure there is at least a placeholder target */
+
+        if (!Target)
+        {
+            return (FALSE);
+        }
+
+        if (!AcpiDmIsValidTarget (Target))
+        {
+            /* Not a valid target (placeholder only, from parser) */
+            break;
+        }
+
+        /*
+         * Promote the target up to the first child in the parse
+         * tree. This is done because the target will be output
+         * first, in the form:
+         *     <Target> = Operands...
+         */
+        AcpiDmPromoteTarget (Op, Target);
+
+        /*
+         * Check for possible conversion to a "Compound Assignment".
+         *
+         * Determine if either operand is the same as the target
+         * and display compound assignment operator and other operand.
+         */
+        if ((AcpiDmIsTargetAnOperand (Target, Child1, TRUE)) ||
+            (AcpiDmIsTargetAnOperand (Target, Child2, TRUE)))
+        {
+            Target->Common.OperatorSymbol =
+                AcpiDmGetCompoundSymbol (Op->Common.AmlOpcode);
+
+            /* Convert operator to compound assignment */
+
+            Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND;
+            Child1->Common.OperatorSymbol = NULL;
+            return (TRUE);
+        }
+
+        /*
+         * If we are within a C-style expression, emit an extra open
+         * paren. Implemented by examining the parent op.
+         */
+        switch (Op->Common.Parent->Common.AmlOpcode)
+        {
+        case AML_ADD_OP:
+        case AML_SUBTRACT_OP:
+        case AML_MULTIPLY_OP:
+        case AML_DIVIDE_OP:
+        case AML_MOD_OP:
+        case AML_SHIFT_LEFT_OP:
+        case AML_SHIFT_RIGHT_OP:
+        case AML_BIT_AND_OP:
+        case AML_BIT_OR_OP:
+        case AML_BIT_XOR_OP:
+        case AML_LAND_OP:
+        case AML_LEQUAL_OP:
+        case AML_LGREATER_OP:
+        case AML_LLESS_OP:
+        case AML_LOR_OP:
+
+            Op->Common.DisasmFlags |= ACPI_PARSEOP_ASSIGNMENT;
+            AcpiOsPrintf ("(");
+            break;
+
+        default:
+            break;
+        }
+
+        /* Normal output for ASL/AML operators with a target operand */
+
+        Target->Common.OperatorSymbol = " = (";
+        return (TRUE);
+
+    /* Binary operators, no parens */
+
+    case AML_DECREMENT_OP:
+    case AML_INCREMENT_OP:
+        return (TRUE);
+
+#ifdef INDEX_SUPPORT
+    case AML_INDEX_OP:
+
+        /* Target is optional, 3rd operand */
+
+        Target = Child2->Common.Next;
+        if (AcpiDmIsValidTarget (Target))
+        {
+            AcpiDmPromoteTarget (Op, Target);
+
+            if (!Target->Common.OperatorSymbol)
+            {
+                Target->Common.OperatorSymbol = " = ";
+            }
+        }
+        return (TRUE);
+#endif
+
+    case AML_STORE_OP:
+        /*
+         * Target is the 2nd operand.
+         * We know the target is valid, it is not optional.
+         * In the parse tree, simply swap the target with the
+         * source so that the target is processed first.
+         */
+        Target = Child1->Common.Next;
+        AcpiDmPromoteTarget (Op, Target);
+
+        if (!Target->Common.OperatorSymbol)
+        {
+            Target->Common.OperatorSymbol = " = ";
+        }
+        return (TRUE);
+
+    case AML_BIT_NOT_OP:
+
+        /* Target is optional, 2nd operand */
+
+        Target = Child1->Common.Next;
+        if (!Target)
+        {
+            return (FALSE);
+        }
+
+        if (AcpiDmIsValidTarget (Target))
+        {
+            /* Valid target, not a placeholder */
+
+            AcpiDmPromoteTarget (Op, Target);
+            Target->Common.OperatorSymbol = " = ~";
+        }
+        else
+        {
+            /* No target. Emit this prefix operator immediately */
+
+            AcpiOsPrintf ("~");
+        }
+        return (TRUE);
+
+    default:
+        break;
+    }
+
+    /* All other operators, emit an open paren */
+
+    AcpiOsPrintf ("(");
+    return (TRUE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmCloseOperator
+ *
+ * PARAMETERS:  Op                  - Current parse object
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Closes an operator by adding a closing parentheses if and
+ *              when necessary. Called during ascending phase of the
+ *              parse tree walk.
+ *
+ ******************************************************************************/
+
+void
+AcpiDmCloseOperator (
+    ACPI_PARSE_OBJECT       *Op)
+{
+
+    /* Always emit paren if ASL+ disassembly disabled */
+
+    if (!AcpiGbl_CstyleDisassembly)
+    {
+        AcpiOsPrintf (")");
+        return;
+    }
+
+    /* Check if we need to add an additional closing paren */
+
+    switch (Op->Common.AmlOpcode)
+    {
+    case AML_ADD_OP:
+    case AML_SUBTRACT_OP:
+    case AML_MULTIPLY_OP:
+    case AML_DIVIDE_OP:
+    case AML_MOD_OP:
+    case AML_SHIFT_LEFT_OP:
+    case AML_SHIFT_RIGHT_OP:
+    case AML_BIT_AND_OP:
+    case AML_BIT_OR_OP:
+    case AML_BIT_XOR_OP:
+    case AML_LAND_OP:
+    case AML_LEQUAL_OP:
+    case AML_LGREATER_OP:
+    case AML_LLESS_OP:
+    case AML_LOR_OP:
+
+        /* Emit paren only if this is not a compound assignment */
+
+        if (Op->Common.DisasmFlags & ACPI_PARSEOP_COMPOUND)
+        {
+            return;
+        }
+
+        /* Emit extra close paren for assignment within an expression */
+
+        if (Op->Common.DisasmFlags & ACPI_PARSEOP_ASSIGNMENT)
+        {
+            AcpiOsPrintf (")");
+        }
+        break;
+
+
+    /* No need for parens for these */
+
+#ifdef INDEX_SUPPORT
+    case AML_INDEX_OP:
+#endif
+    case AML_DECREMENT_OP:
+    case AML_INCREMENT_OP:
+    case AML_LNOT_OP:
+    case AML_BIT_NOT_OP:
+    case AML_STORE_OP:
+        return;
+
+    default:
+
+        /* Always emit paren for non-ASL+ operators */
+        break;
+    }
+
+    AcpiOsPrintf (")");
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmGetCompoundSymbol
+ *
+ * PARAMETERS:  AslOpcode
+ *
+ * RETURN:      String containing the compound assignment symbol
+ *
+ * DESCRIPTION: Detect opcodes that can be converted to compound assignment,
+ *              return the appropriate operator string.
+ *
+ ******************************************************************************/
+
+static char *
+AcpiDmGetCompoundSymbol (
+   UINT16                   AmlOpcode)
+{
+    char                    *Symbol;
+
+
+    switch (AmlOpcode)
+    {
+    case AML_ADD_OP:
+        Symbol = " += ";
+        break;
+
+    case AML_SUBTRACT_OP:
+        Symbol = " -= ";
+        break;
+
+    case AML_MULTIPLY_OP:
+        Symbol = " *= ";
+        break;
+
+    case AML_DIVIDE_OP:
+        Symbol = " /= ";
+        break;
+
+    case AML_MOD_OP:
+        Symbol = " %= ";
+        break;
+
+    case AML_SHIFT_LEFT_OP:
+        Symbol = " <<= ";
+        break;
+
+    case AML_SHIFT_RIGHT_OP:
+        Symbol = " >>= ";
+        break;
+
+    case AML_BIT_AND_OP:
+        Symbol = " &= ";
+        break;
+
+    case AML_BIT_OR_OP:
+        Symbol = " |= ";
+        break;
+
+    case AML_BIT_XOR_OP:
+        Symbol = " ^= ";
+        break;
+
+    default:
+
+        /* No operator string for all other opcodes */
+        return (NULL);
+    }
+
+    return (Symbol);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmPromoteTarget
+ *
+ * PARAMETERS:  Op                  - Operator parse object
+ *              Target              - Target associate with the Op
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Transform the parse tree by moving the target up to the first
+ *              child of the Op.
+ *
+ ******************************************************************************/
+
+static void
+AcpiDmPromoteTarget (
+    ACPI_PARSE_OBJECT       *Op,
+    ACPI_PARSE_OBJECT       *Target)
+{
+    ACPI_PARSE_OBJECT       *Child;
+
+
+    /* Link target directly to the Op as first child */
+
+    Child = Op->Common.Value.Arg;
+    Op->Common.Value.Arg = Target;
+    Target->Common.Next = Child;
+
+    /* Find the last peer, it is linked to the target. Unlink it. */
+
+    while (Child->Common.Next != Target)
+    {
+        Child = Child->Common.Next;
+    }
+
+    Child->Common.Next = NULL;
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmIsValidTarget
+ *
+ * PARAMETERS:  Target              - Target Op from the parse tree
+ *
+ * RETURN:      TRUE if the Target is real. FALSE if it is just a placeholder
+ *              Op that was inserted by the parser.
+ *
+ * DESCRIPTION: Determine if a Target Op is a placeholder Op or a real Target.
+ *              In other words, determine if the optional target is used or
+ *              not.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AcpiDmIsValidTarget (
+    ACPI_PARSE_OBJECT       *Target)
+{
+
+    if ((Target->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
+        (Target->Common.Value.Arg == NULL))
+    {
+        return (FALSE);
+    }
+
+    return (TRUE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcpiDmIsTargetAnOperand
+ *
+ * PARAMETERS:  Target              - Target associated with the expression
+ *              Operand             - An operand associated with expression
+ *
+ * RETURN:      TRUE if expression can be converted to a compound assignment.
+ *              FALSE otherwise.
+ *
+ * DESCRIPTION: Determine if the Target duplicates the operand, in order to
+ *              detect if the expression can be converted to a compound
+ *              assigment. (+=, *=, etc.)
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AcpiDmIsTargetAnOperand (
+    ACPI_PARSE_OBJECT       *Target,
+    ACPI_PARSE_OBJECT       *Operand,
+    BOOLEAN                 TopLevel)
+{
+    const ACPI_OPCODE_INFO  *OpInfo;
+    BOOLEAN                 Same;
+
+
+    /*
+     * Opcodes must match. Note: ignoring the difference between nameseg
+     * and namepath for now. May be needed later.
+     */
+    if (Target->Common.AmlOpcode != Operand->Common.AmlOpcode)
+    {
+        return (FALSE);
+    }
+
+    /* Nodes should match, even if they are NULL */
+
+    if (Target->Common.Node != Operand->Common.Node)
+    {
+        return (FALSE);
+    }
+
+    /* Determine if a child exists */
+
+    OpInfo = AcpiPsGetOpcodeInfo (Operand->Common.AmlOpcode);
+    if (OpInfo->Flags & AML_HAS_ARGS)
+    {
+        Same = AcpiDmIsTargetAnOperand (Target->Common.Value.Arg,
+            Operand->Common.Value.Arg, FALSE);
+        if (!Same)
+        {
+            return (FALSE);
+        }
+    }
+
+    /* Check the next peer, as long as we are not at the top level */
+
+    if ((!TopLevel) &&
+         Target->Common.Next)
+    {
+        Same = AcpiDmIsTargetAnOperand (Target->Common.Next,
+            Operand->Common.Next, FALSE);
+        if (!Same)
+        {
+            return (FALSE);
+        }
+    }
+
+    /* Supress the duplicate operand at the top-level */
+
+    if (TopLevel)
+    {
+        Operand->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
+    }
+    return (TRUE);
+}
+
+#endif
--- a/sys/external/bsd/acpica/dist/disassembler/dmdeferred.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmdeferred.c	Mon Apr 13 17:21:01 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/dmnames.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmnames.c	Mon Apr 13 17:21:01 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/dmobject.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmobject.c	Mon Apr 13 17:21:01 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/dmopcode.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmopcode.c	Mon Apr 13 17:21:01 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,6 +54,7 @@
 #define _COMPONENT          ACPI_CA_DEBUGGER
         ACPI_MODULE_NAME    ("dmopcode")
 
+
 /* Local prototypes */
 
 static void
@@ -567,7 +568,6 @@
     ACPI_PARSE_OBJECT       *Op)
 {
 
-
     /* The next Op contains the SpaceId */
 
     Op = AcpiPsGetDepthNext (NULL, Op);
@@ -637,7 +637,6 @@
     ACPI_PARSE_OBJECT       *Op)
 {
 
-
     if (((UINT32) Op->Common.Value.Integer) > ACPI_MAX_MATCH_OPCODE)
     {
         AcpiOsPrintf ("/* Unknown Match Keyword encoding */");
@@ -694,27 +693,27 @@
 
     case ACPI_DASM_LNOT_SUFFIX:
 
-        switch (Op->Common.AmlOpcode)
+        if (!AcpiGbl_CstyleDisassembly)
         {
-        case AML_LEQUAL_OP:
-
-            AcpiOsPrintf ("LNotEqual");
-            break;
-
-        case AML_LGREATER_OP:
+            switch (Op->Common.AmlOpcode)
+            {
+            case AML_LEQUAL_OP:
+                AcpiOsPrintf ("LNotEqual");
+                break;
 
-            AcpiOsPrintf ("LLessEqual");
-            break;
-
-        case AML_LLESS_OP:
+            case AML_LGREATER_OP:
+                AcpiOsPrintf ("LLessEqual");
+                break;
 
-            AcpiOsPrintf ("LGreaterEqual");
-            break;
+            case AML_LLESS_OP:
+                AcpiOsPrintf ("LGreaterEqual");
+                break;
 
-        default:
+            default:
+                break;
+            }
+        }
 
-            break;
-        }
         Op->Common.DisasmOpcode = 0;
         Op->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE;
         return;
@@ -723,7 +722,6 @@
         break;
     }
 
-
     OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
 
     /* The op and arguments */
@@ -845,7 +843,7 @@
         else if (AcpiDmIsPldBuffer (Op))
         {
             Op->Common.DisasmOpcode = ACPI_DASM_PLD_METHOD;
-            AcpiOsPrintf ("Buffer");
+            AcpiOsPrintf ("ToPLD (");
         }
         else
         {
@@ -854,18 +852,6 @@
         }
         break;
 
-    case AML_INT_STATICSTRING_OP:
-
-        if (Op->Common.Value.String)
-        {
-            AcpiOsPrintf ("%s", Op->Common.Value.String);
-        }
-        else
-        {
-            AcpiOsPrintf ("\"<NULL STATIC STRING PTR>\"");
-        }
-        break;
-
     case AML_INT_NAMEPATH_OP:
 
         AcpiDmNamestring (Op->Common.Value.Name);
--- a/sys/external/bsd/acpica/dist/disassembler/dmresrcs.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmresrcs.c	Mon Apr 13 17:21:01 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/dmutils.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmutils.c	Mon Apr 13 17:21:01 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
@@ -256,6 +256,13 @@
 
     if (AcpiDmListType (Op->Common.Parent) & BLOCK_COMMA_LIST)
     {
+        /* Exit if Target has been marked IGNORE */
+
+        if (Op->Common.Next->Common.DisasmFlags & ACPI_PARSEOP_IGNORE)
+        {
+            return (FALSE);
+        }
+
         /* Check for a NULL target operand */
 
         if ((Op->Common.Next->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
@@ -279,7 +286,13 @@
             return (FALSE);
         }
 
-        AcpiOsPrintf (", ");
+        /* Emit comma only if this is not a C-style operator */
+
+        if (!Op->Common.OperatorSymbol)
+        {
+            AcpiOsPrintf (", ");
+        }
+
         return (TRUE);
     }
 
--- a/sys/external/bsd/acpica/dist/disassembler/dmwalk.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/disassembler/dmwalk.c	Mon Apr 13 17:21:01 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
@@ -285,7 +285,8 @@
     case AML_BUFFER_OP:
 
         if ((Op->Common.DisasmOpcode == ACPI_DASM_UNICODE) ||
-            (Op->Common.DisasmOpcode == ACPI_DASM_UUID))
+            (Op->Common.DisasmOpcode == ACPI_DASM_UUID) ||
+            (Op->Common.DisasmOpcode == ACPI_DASM_PLD_METHOD))
         {
             return (BLOCK_NONE);
         }
@@ -301,6 +302,17 @@
 
         return (BLOCK_PAREN);
 
+    case AML_INT_METHODCALL_OP:
+
+        if (Op->Common.Parent &&
+            ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
+             (Op->Common.Parent->Common.AmlOpcode == AML_VAR_PACKAGE_OP)))
+        {
+            /* This is a reference to a method, not an invocation */
+
+            return (BLOCK_NONE);
+        }
+
     default:
 
         OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
@@ -477,13 +489,20 @@
      * keep track of the current column.
      */
     Info->Count++;
-    if (Info->Count /* +Info->LastLevel */ > 10)
+    if (Info->Count /* +Info->LastLevel */ > 12)
     {
         Info->Count = 0;
         AcpiOsPrintf ("\n");
         AcpiDmIndent (Info->LastLevel + 1);
     }
 
+    /* If ASL+ is enabled, check for a C-style operator */
+
+    if (AcpiDmCheckForSymbolicOpcode (Op, Info))
+    {
+        return (AE_OK);
+    }
+
     /* Print the opcode name */
 
     AcpiDmDisassembleOneOp (NULL, Info, Op);
@@ -543,7 +562,7 @@
 
                 if (Op->Common.AmlOpcode != AML_INT_NAMEDFIELD_OP)
                 {
-                    if (AcpiGbl_DbOpt_verbose)
+                    if (AcpiGbl_DbOpt_Verbose)
                     {
                         (void) AcpiPsDisplayObjectPathname (NULL, Op);
                     }
@@ -563,7 +582,6 @@
                 AcpiDmPredefinedDescription (Op);
                 break;
 
-
             case AML_NAME_OP:
 
                 /* Check for _HID and related EISAID() */
@@ -572,13 +590,11 @@
                 AcpiOsPrintf (", ");
                 break;
 
-
             case AML_REGION_OP:
 
                 AcpiDmRegionFlags (Op);
                 break;
 
-
             case AML_POWER_RES_OP:
 
                 /* Mark the next two Ops as part of the parameter list */
@@ -591,7 +607,6 @@
                 NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
                 return (AE_OK);
 
-
             case AML_PROCESSOR_OP:
 
                 /* Mark the next three Ops as part of the parameter list */
@@ -607,20 +622,17 @@
                 NextOp->Common.DisasmFlags |= ACPI_PARSEOP_PARAMLIST;
                 return (AE_OK);
 
-
             case AML_MUTEX_OP:
             case AML_DATA_REGION_OP:
 
                 AcpiOsPrintf (", ");
                 return (AE_OK);
 
-
             case AML_EVENT_OP:
             case AML_ALIAS_OP:
 
                 return (AE_OK);
 
-
             case AML_SCOPE_OP:
             case AML_DEVICE_OP:
             case AML_THERMAL_ZONE_OP:
@@ -628,7 +640,6 @@
                 AcpiOsPrintf (")");
                 break;
 
-
             default:
 
                 AcpiOsPrintf ("*** Unhandled named opcode %X\n",
@@ -825,9 +836,9 @@
     {
     case BLOCK_PAREN:
 
-        /* Completed an op that has arguments, add closing paren */
+        /* Completed an op that has arguments, add closing paren if needed */
 
-        AcpiOsPrintf (")");
+        AcpiDmCloseOperator (Op);
 
         if (Op->Common.AmlOpcode == AML_NAME_OP)
         {
@@ -999,8 +1010,21 @@
     {
         Info->Level++;
     }
+
+    /*
+     * For ASL+, check for and emit a C-style symbol. If valid, the
+     * symbol string has been deferred until after the first operand
+     */
+    if (AcpiGbl_CstyleDisassembly)
+    {
+        if (Op->Asl.OperatorSymbol)
+        {
+            AcpiOsPrintf ("%s", Op->Asl.OperatorSymbol);
+            Op->Asl.OperatorSymbol = NULL;
+        }
+    }
+
     return (AE_OK);
 }
 
-
 #endif  /* ACPI_DISASSEMBLER */
--- a/sys/external/bsd/acpica/dist/dispatcher/dsargs.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsargs.c	Mon Apr 13 17:21:01 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 __DSARGS_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dsfield.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsfield.c	Mon Apr 13 17:21:01 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 __DSFIELD_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "amlcode.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dsinit.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsinit.c	Mon Apr 13 17:21:01 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 __DSINIT_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acdispat.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dsmethod.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsmethod.c	Mon Apr 13 17:21:01 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 __DSMETHOD_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acdispat.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dsmthdat.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsmthdat.c	Mon Apr 13 17:21:01 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 __DSMTHDAT_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acdispat.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dsobject.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsobject.c	Mon Apr 13 17:21:01 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 __DSOBJECT_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dsutils.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dsutils.c	Mon Apr 13 17:21:01 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 __DSUTILS_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
@@ -601,6 +599,15 @@
                                 ACPI_OPERAND_OBJECT, AcpiGbl_RootNode);
                     Status = AE_OK;
                 }
+                else if (ParentOp->Common.AmlOpcode == AML_EXTERNAL_OP)
+                {
+                    /* TBD: May only be temporary */
+
+                    ObjDesc = AcpiUtCreateStringObject ((ACPI_SIZE) NameLength);
+
+                    ACPI_STRNCPY (ObjDesc->String.Pointer, NameString, NameLength);
+                    Status = AE_OK;
+                }
                 else
                 {
                     /*
--- a/sys/external/bsd/acpica/dist/dispatcher/dswexec.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dswexec.c	Mon Apr 13 17:21:01 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 __DSWEXEC_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dswload.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dswload.c	Mon Apr 13 17:21:01 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 __DSWLOAD_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dswload2.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dswload2.c	Mon Apr 13 17:21:01 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 __DSWLOAD2_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dswscope.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dswscope.c	Mon Apr 13 17:21:01 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 __DSWSCOPE_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acdispat.h"
--- a/sys/external/bsd/acpica/dist/dispatcher/dswstate.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/dispatcher/dswstate.c	Mon Apr 13 17:21:01 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 __DSWSTATE_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
--- a/sys/external/bsd/acpica/dist/events/evevent.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evevent.c	Mon Apr 13 17:21:01 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/events/evglock.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evglock.c	Mon Apr 13 17:21:01 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/events/evgpe.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evgpe.c	Mon Apr 13 17:21:01 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
@@ -131,18 +131,6 @@
     ACPI_FUNCTION_TRACE (EvEnableGpe);
 
 
-    /*
-     * We will only allow a GPE to be enabled if it has either an associated
-     * method (_Lxx/_Exx) or a handler, or is using the implicit notify
-     * feature. Otherwise, the GPE will be immediately disabled by
-     * AcpiEvGpeDispatch the first time it fires.
-     */
-    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
-        ACPI_GPE_DISPATCH_NONE)
-    {
-        return_ACPI_STATUS (AE_NO_HANDLER);
-    }
-
     /* Clear the GPE (of stale events) */
 
     Status = AcpiHwClearGpe (GpeEventInfo);
@@ -153,7 +141,7 @@
 
     /* Enable the requested GPE */
 
-    Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
+    Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE_SAVE);
     return_ACPI_STATUS (Status);
 }
 
@@ -243,7 +231,7 @@
         Status = AcpiEvUpdateGpeEnableMask (GpeEventInfo);
         if (ACPI_SUCCESS (Status))
         {
-            Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE);
+            Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_DISABLE_SAVE);
         }
 
         if (ACPI_FAILURE (Status))
@@ -383,7 +371,11 @@
 {
     ACPI_STATUS             Status;
     ACPI_GPE_BLOCK_INFO     *GpeBlock;
+    ACPI_NAMESPACE_NODE     *GpeDevice;
     ACPI_GPE_REGISTER_INFO  *GpeRegisterInfo;
+    ACPI_GPE_EVENT_INFO     *GpeEventInfo;
+    UINT32                  GpeNumber;
+    ACPI_GPE_HANDLER_INFO   *GpeHandlerInfo;
     UINT32                  IntStatus = ACPI_INTERRUPT_NOT_HANDLED;
     UINT8                   EnabledStatusByte;
     UINT32                  StatusReg;
@@ -414,6 +406,8 @@
     GpeBlock = GpeXruptList->GpeBlockListHead;
     while (GpeBlock)
     {
+        GpeDevice = GpeBlock->Node;
+
         /*
          * Read all of the 8-bit GPE status and enable registers in this GPE
          * block, saving all of them. Find all currently active GP events.
@@ -482,16 +476,55 @@
             {
                 /* Examine one GPE bit */
 
+                GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i *
+                    ACPI_GPE_REGISTER_WIDTH) + j];
+                GpeNumber = j + GpeRegisterInfo->BaseGpeNumber;
+
                 if (EnabledStatusByte & (1 << j))
                 {
-                    /*
-                     * Found an active GPE. Dispatch the event to a handler
-                     * or method.
-                     */
-                    IntStatus |= AcpiEvGpeDispatch (GpeBlock->Node,
-                        &GpeBlock->EventInfo[((ACPI_SIZE) i *
-                            ACPI_GPE_REGISTER_WIDTH) + j],
-                        j + GpeRegisterInfo->BaseGpeNumber);
+                    /* Invoke global event handler if present */
+
+                    AcpiGpeCount++;
+                    if (AcpiGbl_GlobalEventHandler)
+                    {
+                        AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE,
+                            GpeDevice, GpeNumber,
+                            AcpiGbl_GlobalEventHandlerContext);
+                    }
+
+                    /* Found an active GPE */
+
+                    if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
+                        ACPI_GPE_DISPATCH_RAW_HANDLER)
+                    {
+                        /* Dispatch the event to a raw handler */
+
+                        GpeHandlerInfo = GpeEventInfo->Dispatch.Handler;
+
+                        /*
+                         * There is no protection around the namespace node
+                         * and the GPE handler to ensure a safe destruction
+                         * because:
+                         * 1. The namespace node is expected to always
+                         *    exist after loading a table.
+                         * 2. The GPE handler is expected to be flushed by
+                         *    AcpiOsWaitEventsComplete() before the
+                         *    destruction.
+                         */
+                        AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
+                        IntStatus |= GpeHandlerInfo->Address (
+                            GpeDevice, GpeNumber, GpeHandlerInfo->Context);
+                        Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
+                    }
+                    else
+                    {
+                        /*
+                         * Dispatch the event to a standard handler or
+                         * method.
+                         */
+                        IntStatus |= AcpiEvGpeDispatch (GpeDevice,
+                            GpeEventInfo, GpeNumber);
+                    }
                 }
             }
         }
@@ -527,8 +560,7 @@
     void                    *Context)
 {
     ACPI_GPE_EVENT_INFO     *GpeEventInfo = Context;
-    ACPI_STATUS             Status;
-    ACPI_GPE_EVENT_INFO     *LocalGpeEventInfo;
+    ACPI_STATUS             Status = AE_OK;
     ACPI_EVALUATE_INFO      *Info;
     ACPI_GPE_NOTIFY_INFO    *Notify;
 
@@ -536,49 +568,9 @@
     ACPI_FUNCTION_TRACE (EvAsynchExecuteGpeMethod);
 
 
-    /* Allocate a local GPE block */
-
-    LocalGpeEventInfo = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_GPE_EVENT_INFO));
-    if (!LocalGpeEventInfo)
-    {
-        ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
-            "while handling a GPE"));
-        return_VOID;
-    }
-
-    Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
-    if (ACPI_FAILURE (Status))
-    {
-        ACPI_FREE (LocalGpeEventInfo);
-        return_VOID;
-    }
-
-    /* Must revalidate the GpeNumber/GpeBlock */
-
-    if (!AcpiEvValidGpeEvent (GpeEventInfo))
-    {
-        Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
-        ACPI_FREE (LocalGpeEventInfo);
-        return_VOID;
-    }
-
-    /*
-     * Take a snapshot of the GPE info for this level - we copy the info to
-     * prevent a race condition with RemoveHandler/RemoveBlock.
-     */
-    ACPI_MEMCPY (LocalGpeEventInfo, GpeEventInfo,
-        sizeof (ACPI_GPE_EVENT_INFO));
-
-    Status = AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
-    if (ACPI_FAILURE (Status))
-    {
-        ACPI_FREE (LocalGpeEventInfo);
-        return_VOID;
-    }
-
     /* Do the correct dispatch - normal method or implicit notify */
 
-    switch (LocalGpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
+    switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags))
     {
     case ACPI_GPE_DISPATCH_NOTIFY:
         /*
@@ -592,7 +584,7 @@
          * June 2012: Expand implicit notify mechanism to support
          * notifies on multiple device objects.
          */
-        Notify = LocalGpeEventInfo->Dispatch.NotifyList;
+        Notify = GpeEventInfo->Dispatch.NotifyList;
         while (ACPI_SUCCESS (Status) && Notify)
         {
             Status = AcpiEvQueueNotifyRequest (Notify->DeviceNode,
@@ -617,7 +609,7 @@
              * Invoke the GPE Method (_Lxx, _Exx) i.e., evaluate the
              * _Lxx/_Exx control method that corresponds to this GPE
              */
-            Info->PrefixNode = LocalGpeEventInfo->Dispatch.MethodNode;
+            Info->PrefixNode = GpeEventInfo->Dispatch.MethodNode;
             Info->Flags = ACPI_IGNORE_RETURN_VALUE;
 
             Status = AcpiNsEvaluate (Info);
@@ -628,23 +620,26 @@
         {
             ACPI_EXCEPTION ((AE_INFO, Status,
                 "while evaluating GPE method [%4.4s]",
-                AcpiUtGetNodeName (LocalGpeEventInfo->Dispatch.MethodNode)));
+                AcpiUtGetNodeName (GpeEventInfo->Dispatch.MethodNode)));
         }
         break;
 
     default:
 
-        return_VOID; /* Should never happen */
+        goto ErrorExit; /* Should never happen */
     }
 
     /* Defer enabling of GPE until all notify handlers are done */
 
     Status = AcpiOsExecute (OSL_NOTIFY_HANDLER,
-                AcpiEvAsynchEnableGpe, LocalGpeEventInfo);
-    if (ACPI_FAILURE (Status))
+                AcpiEvAsynchEnableGpe, GpeEventInfo);
+    if (ACPI_SUCCESS (Status))
     {
-        ACPI_FREE (LocalGpeEventInfo);
+        return_VOID;
     }
+
+ErrorExit:
+    AcpiEvAsynchEnableGpe (GpeEventInfo);
     return_VOID;
 }
 
@@ -668,11 +663,13 @@
     void                    *Context)
 {
     ACPI_GPE_EVENT_INFO     *GpeEventInfo = Context;
+    ACPI_CPU_FLAGS          Flags;
 
 
+    Flags = AcpiOsAcquireLock (AcpiGbl_GpeLock);
     (void) AcpiEvFinishGpe (GpeEventInfo);
+    AcpiOsReleaseLock (AcpiGbl_GpeLock, Flags);
 
-    ACPI_FREE (GpeEventInfo);
     return;
 }
 
@@ -713,7 +710,7 @@
 
     /*
      * Enable this GPE, conditionally. This means that the GPE will
-     * only be physically enabled if the EnableForRun bit is set
+     * only be physically enabled if the EnableMask bit is set
      * in the EventInfo.
      */
     (void) AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_CONDITIONAL_ENABLE);
@@ -751,15 +748,6 @@
     ACPI_FUNCTION_TRACE (EvGpeDispatch);
 
 
-    /* Invoke global event handler if present */
-
-    AcpiGpeCount++;
-    if (AcpiGbl_GlobalEventHandler)
-    {
-        AcpiGbl_GlobalEventHandler (ACPI_EVENT_TYPE_GPE, GpeDevice,
-             GpeNumber, AcpiGbl_GlobalEventHandlerContext);
-    }
-
     /*
      * Always disable the GPE so that it does not keep firing before
      * any asynchronous activity completes (either from the execution
@@ -802,7 +790,7 @@
      * If there is neither a handler nor a method, leave the GPE
      * disabled.
      */
-    switch (GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK)
+    switch (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags))
     {
     case ACPI_GPE_DISPATCH_HANDLER:
 
--- a/sys/external/bsd/acpica/dist/events/evgpeblk.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evgpeblk.c	Mon Apr 13 17:21:01 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
@@ -518,8 +518,9 @@
              * Ignore GPEs that have no corresponding _Lxx/_Exx method
              * and GPEs that are used to wake the system
              */
-            if (((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_NONE) ||
-                ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) == ACPI_GPE_DISPATCH_HANDLER) ||
+            if ((ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_NONE) ||
+                (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_HANDLER) ||
+                (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) == ACPI_GPE_DISPATCH_RAW_HANDLER) ||
                 (GpeEventInfo->Flags & ACPI_GPE_CAN_WAKE))
             {
                 continue;
--- a/sys/external/bsd/acpica/dist/events/evgpeinit.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evgpeinit.c	Mon Apr 13 17:21:01 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
@@ -419,15 +419,17 @@
         return_ACPI_STATUS (AE_OK);
     }
 
-    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))
     {
         /* If there is already a handler, ignore this GPE method */
 
         return_ACPI_STATUS (AE_OK);
     }
 
-    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+    if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
             ACPI_GPE_DISPATCH_METHOD)
     {
         /*
--- a/sys/external/bsd/acpica/dist/events/evgpeutil.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evgpeutil.c	Mon Apr 13 17:21:01 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
@@ -115,60 +115,6 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    AcpiEvValidGpeEvent
- *
- * PARAMETERS:  GpeEventInfo                - Info for this GPE
- *
- * RETURN:      TRUE if the GpeEvent is valid
- *
- * DESCRIPTION: Validate a GPE event. DO NOT CALL FROM INTERRUPT LEVEL.
- *              Should be called only when the GPE lists are semaphore locked
- *              and not subject to change.
- *
- ******************************************************************************/
-
-BOOLEAN
-AcpiEvValidGpeEvent (
-    ACPI_GPE_EVENT_INFO     *GpeEventInfo)
-{
-    ACPI_GPE_XRUPT_INFO     *GpeXruptBlock;
-    ACPI_GPE_BLOCK_INFO     *GpeBlock;
-
-
-    ACPI_FUNCTION_ENTRY ();
-
-
-    /* No need for spin lock since we are not changing any list elements */
-
-    /* Walk the GPE interrupt levels */
-
-    GpeXruptBlock = AcpiGbl_GpeXruptListHead;
-    while (GpeXruptBlock)
-    {
-        GpeBlock = GpeXruptBlock->GpeBlockListHead;
-
-        /* Walk the GPE blocks on this interrupt level */
-
-        while (GpeBlock)
-        {
-            if ((&GpeBlock->EventInfo[0] <= GpeEventInfo) &&
-                (&GpeBlock->EventInfo[GpeBlock->GpeCount] > GpeEventInfo))
-            {
-                return (TRUE);
-            }
-
-            GpeBlock = GpeBlock->Next;
-        }
-
-        GpeXruptBlock = GpeXruptBlock->Next;
-    }
-
-    return (FALSE);
-}
-
-
-/*******************************************************************************
- *
  * FUNCTION:    AcpiEvGetGpeDevice
  *
  * PARAMETERS:  GPE_WALK_CALLBACK
@@ -416,8 +362,10 @@
             GpeEventInfo = &GpeBlock->EventInfo[((ACPI_SIZE) i *
                 ACPI_GPE_REGISTER_WIDTH) + j];
 
-            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))
             {
                 /* Delete an installed handler block */
 
@@ -425,7 +373,7 @@
                 GpeEventInfo->Dispatch.Handler = NULL;
                 GpeEventInfo->Flags &= ~ACPI_GPE_DISPATCH_MASK;
             }
-            else if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+            else if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
                     ACPI_GPE_DISPATCH_NOTIFY)
             {
                 /* Delete the implicit notification device list */
--- a/sys/external/bsd/acpica/dist/events/evhandler.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evhandler.c	Mon Apr 13 17:21:01 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 __EVHANDLER_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acevents.h"
--- a/sys/external/bsd/acpica/dist/events/evmisc.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evmisc.c	Mon Apr 13 17:21:01 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/events/evregion.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evregion.c	Mon Apr 13 17:21:01 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 __EVREGION_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acevents.h"
@@ -290,7 +288,7 @@
     ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
         "Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
         &RegionObj->Region.Handler->AddressSpace, Handler,
-        ACPI_FORMAT_NATIVE_UINT (Address),
+        ACPI_FORMAT_UINT64 (Address),
         AcpiUtGetRegionName (RegionObj->Region.SpaceId)));
 
     if (!(HandlerDesc->AddressSpace.HandlerFlags &
--- a/sys/external/bsd/acpica/dist/events/evsci.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evsci.c	Mon Apr 13 17:21:01 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/events/evxfevnt.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evxfevnt.c	Mon Apr 13 17:21:01 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 __EVXFEVNT_C__
 #define EXPORT_ACPI_INTERFACES
 
 #include "acpi.h"
@@ -402,7 +401,8 @@
 
     if (InByte)
     {
-        LocalEventStatus |= ACPI_EVENT_FLAG_ENABLED;
+        LocalEventStatus |=
+            (ACPI_EVENT_FLAG_ENABLED | ACPI_EVENT_FLAG_ENABLE_SET);
     }
 
     /* Fixed event currently active? */
@@ -416,7 +416,7 @@
 
     if (InByte)
     {
-        LocalEventStatus |= ACPI_EVENT_FLAG_SET;
+        LocalEventStatus |= ACPI_EVENT_FLAG_STATUS_SET;
     }
 
     (*EventStatus) = LocalEventStatus;
--- a/sys/external/bsd/acpica/dist/events/evxfgpe.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evxfgpe.c	Mon Apr 13 17:21:01 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 __EVXFGPE_C__
 #define EXPORT_ACPI_INTERFACES
 
 #include "acpi.h"
@@ -148,7 +147,7 @@
     GpeEventInfo = AcpiEvGetGpeEventInfo (GpeDevice, GpeNumber);
     if (GpeEventInfo)
     {
-        if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) !=
+        if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) !=
             ACPI_GPE_DISPATCH_NONE)
         {
             Status = AcpiEvAddGpeReference (GpeEventInfo);
@@ -222,12 +221,21 @@
  * RETURN:      Status
  *
  * DESCRIPTION: Enable or disable an individual GPE. This function bypasses
- *              the reference count mechanism used in the AcpiEnableGpe and
- *              AcpiDisableGpe interfaces -- and should be used with care.
+ *              the reference count mechanism used in the AcpiEnableGpe(),
+ *              AcpiDisableGpe() interfaces.
+ *              This API is typically used by the GPE raw handler mode driver
+ *              to switch between the polling mode and the interrupt mode after
+ *              the driver has enabled the GPE.
+ *              The APIs should be invoked in this order:
+ *               AcpiEnableGpe()              <- Ensure the reference count > 0
+ *               AcpiSetGpe(ACPI_GPE_DISABLE) <- Enter polling mode
+ *               AcpiSetGpe(ACPI_GPE_ENABLE)  <- Leave polling mode
+ *               AcpiDisableGpe()             <- Decrease the reference count
  *
- * Note: Typically used to disable a runtime GPE for short period of time,
- * then re-enable it, without disturbing the existing reference counts. This
- * is useful, for example, in the Embedded Controller (EC) driver.
+ * Note: If a GPE is shared by 2 silicon components, then both the drivers
+ *       should support GPE polling mode or disabling the GPE for long period
+ *       for one driver may break the other. So use it with care since all
+ *       firmware _Lxx/_Exx handlers currently rely on the GPE interrupt mode.
  *
  ******************************************************************************/
 
@@ -262,7 +270,7 @@
     {
     case ACPI_GPE_ENABLE:
 
-        Status = AcpiEvEnableGpe (GpeEventInfo);
+        Status = AcpiHwLowSetGpe (GpeEventInfo, ACPI_GPE_ENABLE);
         break;
 
     case ACPI_GPE_DISABLE:
@@ -431,7 +439,7 @@
      * known as an "implicit notify". Note: The GPE is assumed to be
      * level-triggered (for windows compatibility).
      */
-    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+    if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
             ACPI_GPE_DISPATCH_NONE)
     {
         /*
@@ -446,7 +454,7 @@
      * If we already have an implicit notify on this GPE, add
      * this device to the notify list.
      */
-    if ((GpeEventInfo->Flags & ACPI_GPE_DISPATCH_MASK) ==
+    if (ACPI_GPE_DISPATCH_TYPE (GpeEventInfo->Flags) ==
             ACPI_GPE_DISPATCH_NOTIFY)
     {
         /* Ensure that the device is not already in the list */
@@ -803,6 +811,44 @@
 ACPI_EXPORT_SYMBOL (AcpiEnableAllRuntimeGpes)
 
 
+/******************************************************************************
+ *
+ * FUNCTION:    AcpiEnableAllWakeupGpes
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Enable all "wakeup" GPEs and disable all of the other GPEs, in
+ *              all GPE blocks.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiEnableAllWakeupGpes (
+    void)
+{
+    ACPI_STATUS             Status;
+
+
+    ACPI_FUNCTION_TRACE (AcpiEnableAllWakeupGpes);
+
+
+    Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
+    if (ACPI_FAILURE (Status))
+    {
+        return_ACPI_STATUS (Status);
+    }
+
+    Status = AcpiHwEnableAllWakeupGpes ();
+    (void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
+
+    return_ACPI_STATUS (Status);
+}
+
+ACPI_EXPORT_SYMBOL (AcpiEnableAllWakeupGpes)
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AcpiInstallGpeBlock
--- a/sys/external/bsd/acpica/dist/events/evxfregn.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/events/evxfregn.c	Mon Apr 13 17:21:01 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 __EVXFREGN_C__
 #define EXPORT_ACPI_INTERFACES
 
 #include "acpi.h"
--- a/sys/external/bsd/acpica/dist/executer/exconvrt.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exconvrt.c	Mon Apr 13 17:21:01 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 __EXCONVRT_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/excreate.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/excreate.c	Mon Apr 13 17:21:01 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 __EXCREATE_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exfield.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exfield.c	Mon Apr 13 17:21:01 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 __EXFIELD_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acdispat.h"
--- a/sys/external/bsd/acpica/dist/executer/exfldio.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exfldio.c	Mon Apr 13 17:21:01 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 __EXFLDIO_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
@@ -291,13 +289,13 @@
     }
 
     ACPI_DEBUG_PRINT_RAW ((ACPI_DB_BFIELD,
-        " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %p\n",
+        " Region [%s:%X], Width %X, ByteBase %X, Offset %X at %8.8X%8.8X\n",
         AcpiUtGetRegionName (RgnDesc->Region.SpaceId),
         RgnDesc->Region.SpaceId,
         ObjDesc->CommonField.AccessByteWidth,
         ObjDesc->CommonField.BaseByteOffset,
         FieldDatumByteOffset,
-        ACPI_CAST_PTR (void, (RgnDesc->Region.Address + RegionOffset))));
+        ACPI_FORMAT_UINT64 (RgnDesc->Region.Address + RegionOffset)));
 
     /* Invoke the appropriate AddressSpace/OpRegion handler */
 
--- a/sys/external/bsd/acpica/dist/executer/exmisc.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exmisc.c	Mon Apr 13 17:21:01 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 __EXMISC_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exmutex.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exmutex.c	Mon Apr 13 17:21:01 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 __EXMUTEX_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exnames.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exnames.c	Mon Apr 13 17:21:01 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 __EXNAMES_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exoparg1.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exoparg1.c	Mon Apr 13 17:21:01 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 __EXOPARG1_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
--- a/sys/external/bsd/acpica/dist/executer/exoparg2.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exoparg2.c	Mon Apr 13 17:21:01 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 __EXOPARG2_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acparser.h"
--- a/sys/external/bsd/acpica/dist/executer/exoparg3.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exoparg3.c	Mon Apr 13 17:21:01 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 __EXOPARG3_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
@@ -127,7 +125,18 @@
         /* Might return while OS is shutting down, just continue */
 
         ACPI_FREE (Fatal);
-        break;
+        goto Cleanup;
+
+    case AML_EXTERNAL_OP:
+        /*
+         * If the interpreter sees this opcode, just ignore it. The External
+         * op is intended for use by disassemblers in order to properly
+         * disassemble control method invocations. The opcode or group of
+         * opcodes should be surrounded by an "if (0)" clause to ensure that
+         * AML interpreters never see the opcode.
+         */
+        Status = AE_OK;
+        goto Cleanup;
 
     default:
 
--- a/sys/external/bsd/acpica/dist/executer/exoparg6.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exoparg6.c	Mon Apr 13 17:21:01 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 __EXOPARG6_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exprep.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exprep.c	Mon Apr 13 17:21:01 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 __EXPREP_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exregion.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exregion.c	Mon Apr 13 17:21:01 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 __EXREGION_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
@@ -177,8 +175,8 @@
          * one page, which is similar to the original code that used a 4k
          * maximum window.
          */
-        PageBoundaryMapLength =
-            ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address;
+        PageBoundaryMapLength = (ACPI_SIZE)
+            (ACPI_ROUND_UP (Address, ACPI_DEFAULT_PAGE_SIZE) - Address);
         if (PageBoundaryMapLength == 0)
         {
             PageBoundaryMapLength = ACPI_DEFAULT_PAGE_SIZE;
@@ -191,13 +189,12 @@
 
         /* Create a new mapping starting at the address given */
 
-        MemInfo->MappedLogicalAddress = AcpiOsMapMemory (
-            (ACPI_PHYSICAL_ADDRESS) Address, MapLength);
+        MemInfo->MappedLogicalAddress = AcpiOsMapMemory (Address, MapLength);
         if (!MemInfo->MappedLogicalAddress)
         {
             ACPI_ERROR ((AE_INFO,
                 "Could not map memory at 0x%8.8X%8.8X, size %u",
-                ACPI_FORMAT_NATIVE_UINT (Address), (UINT32) MapLength));
+                ACPI_FORMAT_UINT64 (Address), (UINT32) MapLength));
             MemInfo->MappedLength = 0;
             return_ACPI_STATUS (AE_NO_MEMORY);
         }
@@ -217,7 +214,7 @@
 
     ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
         "System-Memory (width %u) R/W %u Address=%8.8X%8.8X\n",
-        BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address)));
+        BitWidth, Function, ACPI_FORMAT_UINT64 (Address)));
 
     /*
      * Perform the memory read or write
@@ -340,7 +337,7 @@
 
     ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
         "System-IO (width %u) R/W %u Address=%8.8X%8.8X\n",
-        BitWidth, Function, ACPI_FORMAT_NATIVE_UINT (Address)));
+        BitWidth, Function, ACPI_FORMAT_UINT64 (Address)));
 
     /* Decode the function parameter */
 
--- a/sys/external/bsd/acpica/dist/executer/exresnte.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exresnte.c	Mon Apr 13 17:21:01 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 __EXRESNTE_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acdispat.h"
--- a/sys/external/bsd/acpica/dist/executer/exresolv.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exresolv.c	Mon Apr 13 17:21:01 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 __EXRESOLV_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "amlcode.h"
--- a/sys/external/bsd/acpica/dist/executer/exresop.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exresop.c	Mon Apr 13 17:21:01 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 __EXRESOP_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "amlcode.h"
--- a/sys/external/bsd/acpica/dist/executer/exstore.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exstore.c	Mon Apr 13 17:21:01 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 __EXSTORE_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acdispat.h"
--- a/sys/external/bsd/acpica/dist/executer/exstoren.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exstoren.c	Mon Apr 13 17:21:01 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 __EXSTOREN_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exstorob.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exstorob.c	Mon Apr 13 17:21:01 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 __EXSTOROB_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exsystem.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exsystem.c	Mon Apr 13 17:21:01 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 __EXSYSTEM_C__
-
 #include "acpi.h"
 #include "accommon.h"
 #include "acinterp.h"
--- a/sys/external/bsd/acpica/dist/executer/exutils.c	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/executer/exutils.c	Mon Apr 13 17:21:01 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 __EXUTILS_C__
-
 /*
  * DEFINE_AML_GLOBALS is tested in amlcode.h
  * to determine whether certain global names should be "defined" or only
--- a/sys/external/bsd/acpica/dist/generate/unix/Makefile.config	Mon Apr 13 17:15:39 2015 +0000
+++ b/sys/external/bsd/acpica/dist/generate/unix/Makefile.config	Mon Apr 13 17:21:01 2015 +0000
@@ -59,6 +59,10 @@
 HOST =       _FreeBSD
 endif
 
+ifeq ($(UNAME_S), NetBSD)
+HOST =       _NetBSD
+endif
+
 ifeq ($(HOST), _APPLE)
 INSTALL  =   cp
 INSTALLFLAGS ?= -f
@@ -140,7 +144,15 @@
 # some compilers such as gcc 4.4
 #
 ifneq ($(NOOPT),TRUE)
-OPT_CFLAGS += -O2 -D_FORTIFY_SOURCE=2
+OPT_CFLAGS += -O2
+endif
+
+#
+# Optionally disable fortify source. This option can cause
+# compile errors in toolchains where it is already defined.
+#
+ifneq ($(NOFORTIFY),TRUE)
+OPT_CFLAGS += -D_FORTIFY_SOURCE=2
 endif
 
 CFLAGS += \
@@ -153,7 +165,7 @@
 # to -Wall are not automatically included in -Wall.
 #
 CWARNINGFLAGS = \
-    -ansi\
+    -std=c99\
     -Wall\
     -Wbad-function-cast\
     -Wdeclaration-after-statement\
@@ -233,4 +245,3 @@