import new acpica: trunk
authorchristos <christos@NetBSD.org>
Sat, 09 Jan 2016 19:54:49 +0000
branchtrunk
changeset 240046 f07d95be48eb
parent 240045 038edecd6a4e
child 240047 98168cf40e6f
import new acpica: ---------------------------------------- 8 January 2016. Summary of changes for version 20160108: 1) ACPICA kernel-resident subsystem: Updated all ACPICA copyrights and signons to 2016: Added the 2016 copyright to all source code module headers and utility/tool signons. This includes the standard Linux dual-license header. This affects virtually every file in the ACPICA core subsystem, iASL compiler, all ACPICA utilities, and the ACPICA test suite. Fixed a regression introduced in version 20151218 concerning the execution of so-called module-level ASL/AML code. Namespace objects created under a module-level If() construct were not properly/fully entered into the namespace and could cause an interpreter fault when accessed. Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. Current Release: Non-Debug Version: 102.7K Code, 28.4K Data, 131.1K Total Debug Version: 200.4K Code, 81.9K Data, 282.4K Total Previous Release: Non-Debug Version: 102.6K Code, 28.4K Data, 131.0K Total Debug Version: 200.3K Code, 81.9K Data, 282.3K Total 2) iASL Compiler/Disassembler and Tools: Fixed a problem with the compilation of the GpioIo and GpioInt resource descriptors. The _PIN field name was incorrectly defined to be an array of 32-bit values, but the _PIN values are in fact 16 bits each. This would cause incorrect bit width warnings when using Word (16-bit) fields to access the descriptors. ---------------------------------------- 18 December 2015. Summary of changes for version 20151218: 1) ACPICA kernel-resident subsystem: Implemented per-AML-table execution of "module-level code" as individual ACPI tables are loaded into the namespace during ACPICA initialization. In other words, any module-level code within an AML table is executed immediately after the table is loaded, instead of batched and executed after all of the tables have been loaded. This provides compatibility with other ACPI implementations. ACPICA BZ 1219. Bob Moore, Lv Zheng, David Box. To fully support the feature above, the default operation region handlers for the SystemMemory, SystemIO, and PCI_Config address spaces are now installed before any ACPI tables are loaded. This enables module-level code to access these address spaces during the table load and module- level code execution phase. ACPICA BZ 1220. Bob Moore, Lv Zheng, David Box. Implemented several changes to the internal _REG support in conjunction with the changes above. Also, changes to the AcpiExec/AcpiNames/Examples utilities for the changes above. Although these tools were changed, host operating systems that simply use the default handlers for SystemMemory, SystemIO, and PCI_Config spaces should not require any update. Lv Zheng. For example, in the code below, DEV1 is conditionally added to the namespace by the DSDT via module-level code that accesses an operation region. The SSDT references DEV1 via the Scope operator. DEV1 must be created immediately after the DSDT is loaded in order for the SSDT to successfully reference DEV1. Previously, this code would cause an AE_NOT_EXIST exception during the load of the SSDT. Now, this code is fully supported by ACPICA. DefinitionBlock ("", "DSDT", 2, "Intel", "DSDT1", 1) { OperationRegion (OPR1, SystemMemory, 0x400, 32) Field (OPR1, AnyAcc, NoLock, Preserve) { FLD1, 1 } If (FLD1) { Device (\DEV1) { } } } DefinitionBlock ("", "SSDT", 2, "Intel", "SSDT1", 1) { External (\DEV1, DeviceObj) Scope (\DEV1) { } } Fixed an AML interpreter problem where control method invocations were not handled correctly when the invocation was itself a SuperName argument to another ASL operator. In these cases, the method was not invoked. ACPICA BZ 1002. Affects the following ASL operators that have a SuperName argument: Store Acquire, Wait CondRefOf, RefOf Decrement, Increment Load, Unload Notify Signal, Release, Reset SizeOf Implemented automatic String-to-ObjectReference conversion support for packages returned by predefined names (such as _DEP). A common BIOS error is to add double quotes around an ObjectReference namepath, which turns the reference into an unexpected string object. This support detects the problem and corrects it before the package is returned to the caller that invoked the method. Lv Zheng. Implemented extensions to the Concatenate operator. Concatenate now accepts any type of object, it is not restricted to simply Integer/String/Buffer. For objects other than these 3 basic data types, the argument is treated as a string containing the name of the object type. This expands the utility of Concatenate and the Printf/Fprintf macros. ACPICA BZ 1222. Cleaned up the output of the ASL Debug object. The timer() value is now optional and no longer emitted by default. Also, the basic data types of Integer/String/Buffer are simply emitted as their values, without a data type string -- since the data type is obvious from the output. ACPICA BZ 1221. Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. Current Release: Non-Debug Version: 102.6K Code, 28.4K Data, 131.0K Total Debug Version: 200.3K Code, 81.9K Data, 282.3K Total Previous Release: Non-Debug Version: 102.0K Code, 28.3K Data, 130.3K Total Debug Version: 199.6K Code, 81.8K Data, 281.4K Total 2) iASL Compiler/Disassembler and Tools: iASL: Fixed some issues with the ASL Include() operator. This operator was incorrectly defined in the iASL parser rules, causing a new scope to be opened for the code within the include file. This could lead to several issues, including allowing ASL code that is technically illegal and not supported by AML interpreters. Note, this does not affect the related #include preprocessor operator. ACPICA BZ 1212. iASL/Disassembler: Implemented support for the ASL ElseIf operator. This operator is essentially an ASL macro since there is no AML opcode associated with it. The code emitted by the iASL compiler for ElseIf is an Else opcode followed immediately by an If opcode. The disassembler will now emit an ElseIf if it finds an Else immediately followed by an If. This simplifies the decoded ASL, especially for deeply nested If..Else and large Switch constructs. Thus, the disassembled code more closely follows the original source ASL. ACPICA BZ 1211. Example: Old disassembly: Else { If (Arg0 == 0x02) { Local0 = 0x05 } } New disassembly: ElseIf (Arg0 == 0x02) { Local0 = 0x05 } AcpiExec: Added support for the new module level code behavior and the early region installation. This required a small change to the initialization, since AcpiExec must install its own operation region handlers. AcpiExec: Added support to make the debug object timer optional. Default is timer disabled. This cleans up the debug object output -- the timer data is rarely used. AcpiExec: Multiple ACPI tables are now loaded in the order that they appear on the command line. This can be important when there are interdependencies/references between the tables. iASL/Templates. Add support to generate template files with multiple SSDTs within a single output file. Also added ommand line support to specify the number of SSDTs (in addition to a single DSDT). ACPICA BZ 1223, 1225. ---------------------------------------- 24 November 2015. Summary of changes for version 20151124: 1) ACPICA kernel-resident subsystem: Fixed a possible regression for a previous update to FADT handling. The FADT no longer has a fixed table ID, causing some issues with code that was hardwired to a specific ID. Lv Zheng. Fixed a problem where the method auto-serialization could interfere with the current SyncLevel. This change makes the auto-serialization support transparent to the SyncLevel support and management. Removed support for the _SUB predefined name in AcpiGetObjectInfo. This interface is intended for early access to the namespace during the initial namespace device discovery walk. The _SUB method has been seen to access operation regions in some cases, causing errors because the operation regions are not fully initialized. AML Debugger: Fixed some issues with the terminate/quit/exit commands that can cause faults. Lv Zheng. AML Debugger: Add thread ID support so that single-step mode only applies to the AML Debugger thread. This prevents runtime errors within some kernels. Lv Zheng. Eliminated extraneous warnings from AcpiGetSleepTypeData. Since the _Sx methods that are invoked by this interface are optional, removed warnings emitted for the case where one or more of these methods do not exist. ACPICA BZ 1208, original change by Prarit Bhargava. Made a major pass through the entire ACPICA source code base to standardize formatting that has diverged a bit over time. There are no functional changes, but this will of course cause quite a few code differences from the previous ACPICA release. Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. Current Release: Non-Debug Version: 102.0K Code, 28.3K Data, 130.3K Total Debug Version: 199.6K Code, 81.8K Data, 281.4K Total Previous Release: Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total Debug Version: 199.3K Code, 81.4K Data, 280.7K Total 2) iASL Compiler/Disassembler and Tools: iASL/acpiexec/acpixtract/disassembler: Added support to allow multiple definition blocks within a single ASL file and the resulting AML file. Support for this type of file was also added to the various tools that use binary AML files: acpiexec, acpixtract, and the AML disassembler. The example code below shows two definition blocks within the same file: DefinitionBlock ("dsdt.aml", "DSDT", 2, "Intel", "Template", 0x12345678) { } DefinitionBlock ("", "SSDT", 2, "Intel", "Template", 0xABCDEF01) { } iASL: Enhanced typechecking for the Name() operator. All expressions for the value of the named object must be reduced/folded to a single constant at compile time, as per the ACPI specification (the AML definition of Name()). iASL: Fixed some code indentation issues for the -ic and -ia options (C and assembly headers). Now all emitted code correctly begins in column 1. iASL: Added an error message for an attempt to open a Scope() on an object defined in an SSDT. The DSDT is always loaded into the namespace first, so any attempt to open a Scope on an SSDT object will fail at runtime. ---------------------------------------- 30 September 2015. Summary of changes for version 20150930: 1) ACPICA kernel-resident subsystem: Debugger: Implemented several changes and bug fixes to assist support for the in-kernel version of the AML debugger. Lv Zheng. - Fix the "predefined" command for in-kernel debugger. - Do not enter debug command loop for the help and version commands. - Disallow "execute" command during execution/single-step of a method. Interpreter: Updated runtime typechecking for all operators that have target operands. The operand is resolved and validated that it is legal. For example, the target cannot be a non-data object such as a Device, Mutex, ThermalZone, etc., as per the ACPI specification. Debugger: Fixed the double-mutex user I/O handshake to work when local deadlock detection is enabled. Debugger: limited display of method locals and arguments (LocalX and ArgX) to only those that have actually been initialized. This prevents lines of extraneous output. Updated the definition of the NFIT table to correct the bit polarity of one flag: ACPI_NFIT_MEM_ARMED --> ACPI_NFIT_MEM_NOT_ARMED Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. Current Release: Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total Debug Version: 199.3K Code, 81.4K Data, 280.7K Total Previous Release: Non-Debug Version: 101.3K Code, 27.7K Data, 129.0K Total Debug Version: 198.6K Code, 80.9K Data, 279.5K Total 2) iASL Compiler/Disassembler and Tools: iASL: Improved the compile-time typechecking for operands of many of the ASL operators: -- Added an option to disable compiler operand/operator typechecking (- ot). -- For the following operators, the TermArg operands are now validated when possible to be Integer data objects: BankField, OperationRegion, DataTableRegion, Buffer, and Package. -- Store (Source, Target): Both the source and target operands are resolved and checked that the operands are both legal. For example, neither operand can be a non-data object such as a Device, Mutex, ThermalZone, etc. Note, as per the ACPI specification, the CopyObject operator can be used to store an object to any type of target object. -- Store (Source, Target): If the source is a Package object, the target must be a Package object, LocalX, ArgX, or Debug. Likewise, if the target is a Package, the source must also be a Package. -- Store (Source, Target): A warning is issued if the source and target resolve to the identical named object. -- Store (Source, <method invocation>): An error is generated for the target method invocation, as this construct is not supported by the AML interpreter. -- For all ASL math and logic operators, the target operand must be a data object (Integer, String, Buffer, LocalX, ArgX, or Debug). This includes the function return value also. -- External declarations are also included in the typechecking where possible. External objects defined using the UnknownObj keyword cannot be typechecked, however. iASL and Disassembler: Added symbolic (ASL+) support for the ASL Index operator: - Legacy code: Index(PKG1, 3) - New ASL+ code: PKG1[3] This completes the ACPI 6.0 ASL+ support as it was the only operator not supported. iASL: Fixed the file suffix for the preprocessor output file (.i). Two spaces were inadvertently appended to the filename, causing file access and deletion problems on some systems. ASL Test Suite (ASLTS): Updated the master makefile to generate all possible compiler output files when building the test suite -- thus exercising these features of the compiler. These files are automatically deleted when the test suite exits. ---------------------------------------- 18 August 2015. Summary of changes for version 20150818: 1) ACPICA kernel-resident subsystem: Fix a regression for AcpiGetTableByIndex interface causing it to fail. Lv Zheng. ACPICA BZ 1186. Completed development to ensure that the ACPICA Disassembler and Debugger are fully standalone components of ACPICA. Removed cross-component dependences. Lv Zheng. The max-number-of-AML-loops is now runtime configurable (previously was compile-time only). This is essentially a loop timeout to force-abort infinite AML loops. ACPCIA BZ 1192. Debugger: Cleanup output to dump ACPI names and namepaths without any trailing underscores. Lv Zheng. ACPICA BZ 1135. Removed unnecessary conditional compilations across the Debugger and Disassembler components where entire modules could be left uncompiled. The aapits test is deprecated and has been removed from the ACPICA git tree. The test has never been completed and has not been maintained, thus becoming rather useless. ACPICA BZ 1015, 794. A batch of small changes to close bugzilla and other reports: - Remove duplicate code for _PLD processing. ACPICA BZ 1176. - Correctly cleanup after a ACPI table load failure. ACPICA BZ 1185. - iASL: Support POSIX yacc again in makefile. Jung-uk Kim. - ACPI table support: general cleanup and simplification. Lv Zheng, Bob Moore. - ACPI table support: fix for a buffer read overrun in AcpiTbFindTable. ACPICA BZ 1184. - Enhance parameter validation for DataTableRegion and LoadTable ASL/AML operators. - Debugger: Split debugger initialization/termination interfaces. Lv Zheng. - AcpiExec: Emit OemTableId for SSDTs during the load phase for table identification. - AcpiExec: Add debug message during _REG method phase during table load/init. - AcpiNames: Fix a regression where some output was missing and no longer emitted. - Debugger: General cleanup and simplification. Lv Zheng. - Disassembler: Cleanup use of several global option variables. Lv Zheng. Example Code and Data Size: These are the sizes for the OS-independent acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The debug version of the code includes the debug output trace mechanism and has a much larger code and data size. Current Release: Non-Debug Version: 101.3K Code, 27.7K Data, 129.0K Total Debug Version: 198.6K Code, 80.9K Data, 279.5K Total Previous Release: Non-Debug Version: 100.9K Code, 24.5K Data, 125.4K Total Debug Version: 197.8K Code, 81.5K Data, 279.3K Total 2) iASL Compiler/Disassembler and Tools: AcpiExec: Fixed a problem where any more than 32 ACPI tables in the XSDT were not handled properly and caused load errors. Now, properly invoke and use the ACPICA auto-reallocate mechanism for ACPI table data structures. ACPICA BZ 1188 AcpiNames: Add command-line wildcard support for ACPI table files. ACPICA BZ 1190. AcpiExec and AcpiNames: Add -l option to load ACPI tables only. For AcpiExec, this means that no control methods (like _REG/_INI/_STA) are executed during initialization. ACPICA BZ 1187, 1189. iASL/Disassembler: Implemented a prototype "listing" mode that emits AML that corresponds to each disassembled ASL statement, to simplify debugging. ACPICA BZ 1191. Debugger: Add option to the "objects" command to display a summary of the current namespace objects (Object type and count). This is displayed if the command is entered with no arguments. AcpiNames: Add -x option to specify debug level, similar to AcpiExec. ----------------------------------------
sys/external/bsd/acpica/dist/changes.txt
sys/external/bsd/acpica/dist/common/acfileio.c
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/ahtable.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/dmtables.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/aslcstyle.y
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/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/aslresources.y
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/dttable1.c
sys/external/bsd/acpica/dist/compiler/dttable2.c
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/dbobject.c
sys/external/bsd/acpica/dist/debugger/dbstats.c
sys/external/bsd/acpica/dist/debugger/dbxface.c
sys/external/bsd/acpica/dist/disassembler/dmdeferred.c
sys/external/bsd/acpica/dist/disassembler/dmnames.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/dispatcher/dsargs.c
sys/external/bsd/acpica/dist/dispatcher/dsdebug.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/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/extrace.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/acpiexamples/Makefile
sys/external/bsd/acpica/dist/generate/unix/acpiexec/Makefile
sys/external/bsd/acpica/dist/generate/unix/acpinames/Makefile
sys/external/bsd/acpica/dist/generate/unix/acpixtract/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/acclib.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/acuuid.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/acefiex.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/acmsvcex.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/include/platform/acwinex.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/acpixtract.h
sys/external/bsd/acpica/dist/tools/acpixtract/axmain.c
sys/external/bsd/acpica/dist/tools/acpixtract/axutils.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/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/utnonansi.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	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/changes.txt	Sat Jan 09 19:54:49 2016 +0000
@@ -1,4 +1,455 @@
 ----------------------------------------
+8 January 2016. Summary of changes for version 20160108:
+
+1) ACPICA kernel-resident subsystem:
+
+Updated all ACPICA copyrights and signons to 2016: Added the 2016 
+copyright to all source code module headers and utility/tool signons. 
+This includes the standard Linux dual-license header. This affects 
+virtually every file in the ACPICA core subsystem, iASL compiler, all 
+ACPICA utilities, and the ACPICA test suite.
+
+Fixed a regression introduced in version 20151218 concerning the 
+execution of so-called module-level ASL/AML code. Namespace objects 
+created under a module-level If() construct were not properly/fully 
+entered into the namespace and could cause an interpreter fault when 
+accessed.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and 
+has a much larger code and data size.
+
+Current Release:
+    Non-Debug Version: 102.7K Code, 28.4K Data, 131.1K Total
+    Debug Version:     200.4K Code, 81.9K Data, 282.4K Total
+  Previous Release:
+    Non-Debug Version: 102.6K Code, 28.4K Data, 131.0K Total
+    Debug Version:     200.3K Code, 81.9K Data, 282.3K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Fixed a problem with the compilation of the GpioIo and GpioInt resource 
+descriptors. The _PIN field name was incorrectly defined to be an array 
+of 32-bit values, but the _PIN values are in fact 16 bits each. This 
+would cause incorrect bit width warnings when using Word (16-bit) fields 
+to access the descriptors.
+
+
+----------------------------------------
+18 December 2015. Summary of changes for version 20151218:
+
+1) ACPICA kernel-resident subsystem:
+
+Implemented per-AML-table execution of "module-level code" as individual 
+ACPI tables are loaded into the namespace during ACPICA initialization. 
+In other words, any module-level code within an AML table is executed 
+immediately after the table is loaded, instead of batched and executed 
+after all of the tables have been loaded. This provides compatibility 
+with other ACPI implementations. ACPICA BZ 1219. Bob Moore, Lv Zheng, 
+David Box.
+
+To fully support the feature above, the default operation region handlers 
+for the SystemMemory, SystemIO, and PCI_Config address spaces are now 
+installed before any ACPI tables are loaded. This enables module-level 
+code to access these address spaces during the table load and module-
+level code execution phase. ACPICA BZ 1220. Bob Moore, Lv Zheng, David 
+Box.
+
+Implemented several changes to the internal _REG support in conjunction 
+with the changes above. Also, changes to the AcpiExec/AcpiNames/Examples 
+utilities for the changes above. Although these tools were changed, host 
+operating systems that simply use the default handlers for SystemMemory, 
+SystemIO, and PCI_Config spaces should not require any update. Lv Zheng.
+
+For example, in the code below, DEV1 is conditionally added to the 
+namespace by the DSDT via module-level code that accesses an operation 
+region. The SSDT references DEV1 via the Scope operator. DEV1 must be 
+created immediately after the DSDT is loaded in order for the SSDT to 
+successfully reference DEV1. Previously, this code would cause an 
+AE_NOT_EXIST exception during the load of the SSDT. Now, this code is 
+fully supported by ACPICA.
+
+    DefinitionBlock ("", "DSDT", 2, "Intel", "DSDT1", 1)
+    {
+        OperationRegion (OPR1, SystemMemory, 0x400, 32)
+        Field (OPR1, AnyAcc, NoLock, Preserve)
+        {
+            FLD1, 1
+        }
+        If (FLD1)
+        {
+            Device (\DEV1)
+            {
+            }
+        }
+    }
+    DefinitionBlock ("", "SSDT", 2, "Intel", "SSDT1", 1)
+    {
+        External (\DEV1, DeviceObj)
+        Scope (\DEV1)
+        {
+        }
+    }
+
+Fixed an AML interpreter problem where control method invocations were 
+not handled correctly when the invocation was itself a SuperName argument 
+to another ASL operator. In these cases, the method was not invoked. 
+ACPICA BZ 1002. Affects the following ASL operators that have a SuperName 
+argument:
+    Store
+    Acquire, Wait
+    CondRefOf, RefOf
+    Decrement, Increment
+    Load, Unload
+    Notify
+    Signal, Release, Reset
+    SizeOf
+
+Implemented automatic String-to-ObjectReference conversion support for 
+packages returned by predefined names (such as _DEP). A common BIOS error 
+is to add double quotes around an ObjectReference namepath, which turns 
+the reference into an unexpected string object. This support detects the 
+problem and corrects it before the package is returned to the caller that 
+invoked the method. Lv Zheng.
+
+Implemented extensions to the Concatenate operator. Concatenate now 
+accepts any type of object, it is not restricted to simply 
+Integer/String/Buffer. For objects other than these 3 basic data types, 
+the argument is treated as a string containing the name of the object 
+type. This expands the utility of Concatenate and the Printf/Fprintf 
+macros. ACPICA BZ 1222.
+
+Cleaned up the output of the ASL Debug object. The timer() value is now 
+optional and no longer emitted by default. Also, the basic data types of 
+Integer/String/Buffer are simply emitted as their values, without a data 
+type string -- since the data type is obvious from the output. ACPICA BZ 
+1221.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and 
+has a much larger code and data size.
+
+  Current Release:
+    Non-Debug Version: 102.6K Code, 28.4K Data, 131.0K Total
+    Debug Version:     200.3K Code, 81.9K Data, 282.3K Total
+  Previous Release:
+    Non-Debug Version: 102.0K Code, 28.3K Data, 130.3K Total
+    Debug Version:     199.6K Code, 81.8K Data, 281.4K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Fixed some issues with the ASL Include() operator. This operator 
+was incorrectly defined in the iASL parser rules, causing a new scope to 
+be opened for the code within the include file. This could lead to 
+several issues, including allowing ASL code that is technically illegal 
+and not supported by AML interpreters. Note, this does not affect the 
+related #include preprocessor operator. ACPICA BZ 1212.
+
+iASL/Disassembler: Implemented support for the ASL ElseIf operator. This 
+operator is essentially an ASL macro since there is no AML opcode 
+associated with it. The code emitted by the iASL compiler for ElseIf is 
+an Else opcode followed immediately by an If opcode. The disassembler 
+will now emit an ElseIf if it finds an Else immediately followed by an 
+If. This simplifies the decoded ASL, especially for deeply nested 
+If..Else and large Switch constructs. Thus, the disassembled code more 
+closely follows the original source ASL. ACPICA BZ 1211. Example:
+
+    Old disassembly:
+        Else
+        {
+            If (Arg0 == 0x02)
+            {
+                Local0 = 0x05
+            }
+        }
+
+    New disassembly:
+        ElseIf (Arg0 == 0x02)
+        {
+            Local0 = 0x05
+        }
+
+AcpiExec: Added support for the new module level code behavior and the 
+early region installation. This required a small change to the 
+initialization, since AcpiExec must install its own operation region 
+handlers.
+
+AcpiExec: Added support to make the debug object timer optional. Default 
+is timer disabled. This cleans up the debug object output -- the timer 
+data is rarely used.
+
+AcpiExec: Multiple ACPI tables are now loaded in the order that they 
+appear on the command line. This can be important when there are 
+interdependencies/references between the tables.
+
+iASL/Templates. Add support to generate template files with multiple 
+SSDTs within a single output file. Also added ommand line support to 
+specify the number of SSDTs (in addition to a single DSDT). ACPICA BZ 
+1223, 1225.
+
+
+----------------------------------------
+24 November 2015. Summary of changes for version 20151124:
+
+1) ACPICA kernel-resident subsystem:
+
+Fixed a possible regression for a previous update to FADT handling. The 
+FADT no longer has a fixed table ID, causing some issues with code that 
+was hardwired to a specific ID. Lv Zheng.
+
+Fixed a problem where the method auto-serialization could interfere with 
+the current SyncLevel. This change makes the auto-serialization support 
+transparent to the SyncLevel support and management.
+
+Removed support for the _SUB predefined name in AcpiGetObjectInfo. This 
+interface is intended for early access to the namespace during the 
+initial namespace device discovery walk. The _SUB method has been seen to 
+access operation regions in some cases, causing errors because the 
+operation regions are not fully initialized.
+
+AML Debugger: Fixed some issues with the terminate/quit/exit commands 
+that can cause faults. Lv Zheng.
+
+AML Debugger: Add thread ID support so that single-step mode only applies 
+to the AML Debugger thread. This prevents runtime errors within some 
+kernels. Lv Zheng. 
+
+Eliminated extraneous warnings from AcpiGetSleepTypeData. Since the _Sx 
+methods that are invoked by this interface are optional, removed warnings 
+emitted for the case where one or more of these methods do not exist. 
+ACPICA BZ 1208, original change by Prarit Bhargava.
+
+Made a major pass through the entire ACPICA source code base to 
+standardize formatting that has diverged a bit over time. There are no 
+functional changes, but this will of course cause quite a few code 
+differences from the previous ACPICA release.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and 
+has a much larger code and data size.
+
+  Current Release:
+    Non-Debug Version: 102.0K Code, 28.3K Data, 130.3K Total
+    Debug Version:     199.6K Code, 81.8K Data, 281.4K Total
+  Previous Release:
+    Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total
+    Debug Version:     199.3K Code, 81.4K Data, 280.7K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL/acpiexec/acpixtract/disassembler: Added support to allow multiple 
+definition blocks within a single ASL file and the resulting AML file. 
+Support for this type of file was also added to the various tools that 
+use binary AML files: acpiexec, acpixtract, and the AML disassembler. The 
+example code below shows two definition blocks within the same file:
+
+    DefinitionBlock ("dsdt.aml", "DSDT", 2, "Intel", "Template", 
+0x12345678)
+    {
+    }
+    DefinitionBlock ("", "SSDT", 2, "Intel", "Template", 0xABCDEF01)
+    {
+    }
+
+iASL: Enhanced typechecking for the Name() operator. All expressions for 
+the value of the named object must be reduced/folded to a single constant 
+at compile time, as per the ACPI specification (the AML definition of 
+Name()).
+
+iASL: Fixed some code indentation issues for the -ic and -ia options (C 
+and assembly headers). Now all emitted code correctly begins in column 1.
+
+iASL: Added an error message for an attempt to open a Scope() on an 
+object defined in an SSDT. The DSDT is always loaded into the namespace 
+first, so any attempt to open a Scope on an SSDT object will fail at 
+runtime.
+
+
+----------------------------------------
+30 September 2015. Summary of changes for version 20150930:
+
+1) ACPICA kernel-resident subsystem:
+
+Debugger: Implemented several changes and bug fixes to assist support for 
+the in-kernel version of the AML debugger. Lv Zheng.
+- Fix the "predefined" command for in-kernel debugger.
+- Do not enter debug command loop for the help and version commands.
+- Disallow "execute" command during execution/single-step of a method.
+
+Interpreter: Updated runtime typechecking for all operators that have 
+target operands. The operand is resolved and validated that it is legal. 
+For example, the target cannot be a non-data object such as a Device, 
+Mutex, ThermalZone, etc., as per the ACPI specification.
+
+Debugger: Fixed the double-mutex user I/O handshake to work when local 
+deadlock detection is enabled.
+
+Debugger: limited display of method locals and arguments (LocalX and 
+ArgX) to only those that have actually been initialized. This prevents 
+lines of extraneous output.
+
+Updated the definition of the NFIT table to correct the bit polarity of 
+one flag: ACPI_NFIT_MEM_ARMED --> ACPI_NFIT_MEM_NOT_ARMED
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and 
+has a much larger code and data size.
+
+  Current Release:
+    Non-Debug Version: 101.7K Code, 27.9K Data, 129.6K Total
+    Debug Version:     199.3K Code, 81.4K Data, 280.7K Total
+  Previous Release:
+    Non-Debug Version: 101.3K Code, 27.7K Data, 129.0K Total
+    Debug Version:     198.6K Code, 80.9K Data, 279.5K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Improved the compile-time typechecking for operands of many of the 
+ASL operators:
+
+-- Added an option to disable compiler operand/operator typechecking (-
+ot).
+
+-- For the following operators, the TermArg operands are now validated 
+when possible to be Integer data objects: BankField, OperationRegion, 
+DataTableRegion, Buffer, and Package.
+
+-- Store (Source, Target): Both the source and target operands are 
+resolved and checked that the operands are both legal. For example, 
+neither operand can be a non-data object such as a Device, Mutex, 
+ThermalZone, etc. Note, as per the ACPI specification, the CopyObject 
+operator can be used to store an object to any type of target object.
+
+-- Store (Source, Target): If the source is a Package object, the target 
+must be a Package object, LocalX, ArgX, or Debug. Likewise, if the target 
+is a Package, the source must also be a Package.
+
+-- Store (Source, Target): A warning is issued if the source and target 
+resolve to the identical named object.
+
+-- Store (Source, <method invocation>): An error is generated for the 
+target method invocation, as this construct is not supported by the AML 
+interpreter.
+
+-- For all ASL math and logic operators, the target operand must be a 
+data object (Integer, String, Buffer, LocalX, ArgX, or Debug). This 
+includes the function return value also.
+
+-- External declarations are also included in the typechecking where 
+possible. External objects defined using the UnknownObj keyword cannot be 
+typechecked, however.
+
+iASL and Disassembler: Added symbolic (ASL+) support for the ASL Index 
+operator:
+- Legacy code: Index(PKG1, 3)
+- New ASL+ code: PKG1[3]
+This completes the ACPI 6.0 ASL+ support as it was the only operator not 
+supported.
+
+iASL: Fixed the file suffix for the preprocessor output file (.i). Two 
+spaces were inadvertently appended to the filename, causing file access 
+and deletion problems on some systems.
+
+ASL Test Suite (ASLTS): Updated the master makefile to generate all 
+possible compiler output files when building the test suite -- thus 
+exercising these features of the compiler. These files are automatically 
+deleted when the test suite exits.
+
+
+----------------------------------------
+18 August 2015. Summary of changes for version 20150818:
+
+1) ACPICA kernel-resident subsystem:
+
+Fix a regression for AcpiGetTableByIndex interface causing it to fail. Lv 
+Zheng. ACPICA BZ 1186.
+
+Completed development to ensure that the ACPICA Disassembler and Debugger 
+are fully standalone components of ACPICA. Removed cross-component 
+dependences. Lv Zheng.
+
+The max-number-of-AML-loops is now runtime configurable (previously was 
+compile-time only). This is essentially a loop timeout to force-abort 
+infinite AML loops. ACPCIA BZ 1192.
+
+Debugger: Cleanup output to dump ACPI names and namepaths without any 
+trailing underscores. Lv Zheng. ACPICA BZ 1135.
+
+Removed unnecessary conditional compilations across the Debugger and 
+Disassembler components where entire modules could be left uncompiled.
+
+The aapits test is deprecated and has been removed from the ACPICA git 
+tree. The test has never been completed and has not been maintained, thus 
+becoming rather useless. ACPICA BZ 1015, 794.
+
+A batch of small changes to close bugzilla and other reports:
+- Remove duplicate code for _PLD processing. ACPICA BZ 1176.
+- Correctly cleanup after a ACPI table load failure. ACPICA BZ 1185.
+- iASL: Support POSIX yacc again in makefile. Jung-uk Kim.
+- ACPI table support: general cleanup and simplification. Lv Zheng, Bob 
+Moore.
+- ACPI table support: fix for a buffer read overrun in AcpiTbFindTable. 
+ACPICA BZ 1184.
+- Enhance parameter validation for DataTableRegion and LoadTable ASL/AML 
+operators.
+- Debugger: Split debugger initialization/termination interfaces. Lv 
+Zheng.
+- AcpiExec: Emit OemTableId for SSDTs during the load phase for table 
+identification.
+- AcpiExec: Add debug message during _REG method phase during table 
+load/init.
+- AcpiNames: Fix a regression where some output was missing and no longer 
+emitted.
+- Debugger: General cleanup and simplification. Lv Zheng.
+- Disassembler: Cleanup use of several global option variables. Lv Zheng.
+
+Example Code and Data Size: These are the sizes for the OS-independent 
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The 
+debug version of the code includes the debug output trace mechanism and 
+has a much larger code and data size.
+
+  Current Release:
+    Non-Debug Version: 101.3K Code, 27.7K Data, 129.0K Total
+    Debug Version:     198.6K Code, 80.9K Data, 279.5K Total
+  Previous Release:
+    Non-Debug Version: 100.9K Code, 24.5K Data, 125.4K Total
+    Debug Version:     197.8K Code, 81.5K Data, 279.3K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+AcpiExec: Fixed a problem where any more than 32 ACPI tables in the XSDT 
+were not handled properly and caused load errors. Now, properly invoke 
+and use the ACPICA auto-reallocate mechanism for ACPI table data 
+structures. ACPICA BZ 1188
+
+AcpiNames: Add command-line wildcard support for ACPI table files. ACPICA 
+BZ 1190.
+
+AcpiExec and AcpiNames: Add -l option to load ACPI tables only. For 
+AcpiExec, this means that no control methods (like _REG/_INI/_STA) are 
+executed during initialization. ACPICA BZ 1187, 1189.
+
+iASL/Disassembler: Implemented a prototype "listing" mode that emits AML 
+that corresponds to each disassembled ASL statement, to simplify 
+debugging. ACPICA BZ 1191.
+
+Debugger: Add option to the "objects" command to display a summary of the 
+current namespace objects (Object type and count). This is displayed if 
+the command is entered with no arguments.
+
+AcpiNames: Add -x option to specify debug level, similar to AcpiExec.
+
+
+----------------------------------------
 17 July 2015. Summary of changes for version 20150717:
 
 1) ACPICA kernel-resident subsystem:
@@ -254,6 +705,7 @@
 AcpiHelp: Added a new option, -t, to display all known/supported ACPI 
 tables.
 
+
 ----------------------------------------
 10 April 2015. Summary of changes for version 20150410:
 
@@ -261,6 +713,7 @@
 a regression in the disassembler where incorrect operator
 symbols could be emitted.
 
+
 ----------------------------------------
 08 April 2015. Summary of changes for version 20150408:
 
@@ -333,6 +786,7 @@
 
 Tests: Updated the makefile for proper generation of the AAPITS suite.
 
+
 ----------------------------------------
 04 February 2015. Summary of changes for version 20150204:
 
@@ -373,7 +827,8 @@
     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
@@ -877,6 +1332,7 @@
 object. Added a comment that explains that the parent is guaranteed to be 
 valid in this case. ACPICA BZ 1069.
 
+
 ----------------------------------------
 24 April 2014. Summary of changes for version 20140424:
 
@@ -944,6 +1400,7 @@
 were never set. This should help guarantee that the terminal is always 
 left in the previous state on program exit.
 
+
 ----------------------------------------
 25 March 2014. Summary of changes for version 20140325:
 
@@ -1044,6 +1501,7 @@
 is made obsolete by the AcpiXtract utility.
 2) General cleanup of open files and allocated buffers.
 
+
 ----------------------------------------
 14 February 2014. Summary of changes for version 20140214:
 
@@ -1109,6 +1567,7 @@
 Windows registry. This feature has been superseded by the acpidump 
 utility. 
 
+
 ----------------------------------------
 14 January 2014. Summary of changes for version 20140114:
 
@@ -1185,6 +1644,7 @@
 test public and puts it under the new "test" command. The test executes 
 each and every predefined name within the current namespace.
 
+
 ----------------------------------------
 18 December 2013. Summary of changes for version 20131218:
 
@@ -1287,6 +1747,7 @@
 ACPI tables and execution of an example control method in the DSDT. Added 
 makefile support for Unix generation.
 
+
 ----------------------------------------
 15 November 2013. Summary of changes for version 20131115:
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/acpica/dist/common/acfileio.c	Sat Jan 09 19:54:49 2016 +0000
@@ -0,0 +1,535 @@
+/******************************************************************************
+ *
+ * Module Name: acfileio - Get ACPI tables from file
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2016, 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 "acapps.h"
+#include "actables.h"
+#include "acutils.h"
+#include <errno.h>
+
+#define _COMPONENT          ACPI_UTILITIES
+        ACPI_MODULE_NAME    ("acfileio")
+
+
+/* Local prototypes */
+
+static ACPI_STATUS
+AcGetOneTableFromFile (
+    char                    *Filename,
+    FILE                    *File,
+    UINT8                   GetOnlyAmlTables,
+    ACPI_TABLE_HEADER       **Table);
+
+static ACPI_STATUS
+AcCheckTextModeCorruption (
+    ACPI_TABLE_HEADER       *Table);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcGetAllTablesFromFile
+ *
+ * PARAMETERS:  Filename            - Table filename
+ *              GetOnlyAmlTables    - TRUE if the tables must be AML tables
+ *              ReturnListHead      - Where table list is returned
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Get all ACPI tables from within a single file.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcGetAllTablesFromFile (
+    char                    *Filename,
+    UINT8                   GetOnlyAmlTables,
+    ACPI_NEW_TABLE_DESC     **ReturnListHead)
+{
+    ACPI_NEW_TABLE_DESC     *ListHead = NULL;
+    ACPI_NEW_TABLE_DESC     *ListTail = NULL;
+    ACPI_NEW_TABLE_DESC     *TableDesc;
+    FILE                    *File;
+    ACPI_TABLE_HEADER       *Table = NULL;
+    UINT32                  FileSize;
+    ACPI_STATUS             Status = AE_OK;
+
+
+    File = fopen (Filename, "rb");
+    if (!File)
+    {
+        perror ("Could not open input file");
+        if (errno == ENOENT)
+        {
+            return (AE_NOT_EXIST);
+        }
+
+        return (AE_ERROR);
+    }
+
+    /* Get the file size */
+
+    FileSize = CmGetFileSize (File);
+    if (FileSize == ACPI_UINT32_MAX)
+    {
+        return (AE_ERROR);
+    }
+
+    fprintf (stderr,
+        "Input file %s, Length 0x%X (%u) bytes\n",
+        Filename, FileSize, FileSize);
+
+    /* We must have at least one ACPI table header */
+
+    if (FileSize < sizeof (ACPI_TABLE_HEADER))
+    {
+        return (AE_BAD_HEADER);
+    }
+
+    /* Check for an non-binary file */
+
+    if (!AcIsFileBinary (File))
+    {
+        fprintf (stderr,
+            "    %s: File does not appear to contain a valid AML table\n",
+            Filename);
+        return (AE_TYPE);
+    }
+
+    /* Read all tables within the file */
+
+    while (ACPI_SUCCESS (Status))
+    {
+        /* Get one entire ACPI table */
+
+        Status = AcGetOneTableFromFile (
+            Filename, File, GetOnlyAmlTables, &Table);
+
+        if (Status == AE_CTRL_TERMINATE)
+        {
+            Status = AE_OK;
+            break;
+        }
+        else if (Status == AE_TYPE)
+        {
+            return (AE_OK);
+        }
+        else if (ACPI_FAILURE (Status))
+        {
+            return (Status);
+        }
+
+        /* Print table header for iASL/disassembler only */
+
+#ifdef ACPI_ASL_COMPILER
+
+            AcpiTbPrintTableHeader (0, Table);
+#endif
+
+        /* Allocate and link a table descriptor */
+
+        TableDesc = AcpiOsAllocate (sizeof (ACPI_NEW_TABLE_DESC));
+        TableDesc->Table = Table;
+        TableDesc->Next = NULL;
+
+        /* Link at the end of the local table list */
+
+        if (!ListHead)
+        {
+            ListHead = TableDesc;
+            ListTail = TableDesc;
+        }
+        else
+        {
+            ListTail->Next = TableDesc;
+            ListTail = TableDesc;
+        }
+    }
+
+    /* Add the local table list to the end of the global list */
+
+    if (*ReturnListHead)
+    {
+        ListTail = *ReturnListHead;
+        while (ListTail->Next)
+        {
+            ListTail = ListTail->Next;
+        }
+
+        ListTail->Next = ListHead;
+    }
+    else
+    {
+        *ReturnListHead = ListHead;
+    }
+
+    fclose(File);
+    return (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcGetOneTableFromFile
+ *
+ * PARAMETERS:  Filename            - File where table is located
+ *              File                - Open FILE pointer to Filename
+ *              GetOnlyAmlTables    - TRUE if the tables must be AML tables.
+ *              ReturnTable         - Where a pointer to the table is returned
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Read the next ACPI table from a file. Implements support
+ *              for multiple tables within a single file. File must already
+ *              be open.
+ *
+ * Note: Loading an RSDP is not supported.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcGetOneTableFromFile (
+    char                    *Filename,
+    FILE                    *File,
+    UINT8                   GetOnlyAmlTables,
+    ACPI_TABLE_HEADER       **ReturnTable)
+{
+    ACPI_STATUS             Status = AE_OK;
+    ACPI_TABLE_HEADER       TableHeader;
+    ACPI_TABLE_HEADER       *Table;
+    INT32                   Count;
+    long                    TableOffset;
+
+
+    *ReturnTable = NULL;
+
+    /* Get the table header to examine signature and length */
+
+    TableOffset = ftell (File);
+    Count = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), File);
+    if (Count != sizeof (ACPI_TABLE_HEADER))
+    {
+        return (AE_CTRL_TERMINATE);
+    }
+
+    /* Validate the table signature/header (limited ASCII chars) */
+
+    Status = AcValidateTableHeader (File, TableOffset);
+    if (ACPI_FAILURE (Status))
+    {
+        return (Status);
+    }
+
+    if (GetOnlyAmlTables)
+    {
+        /* Table must be an AML table (DSDT/SSDT) or FADT */
+
+        if (!ACPI_COMPARE_NAME (TableHeader.Signature, ACPI_SIG_FADT) &&
+            !AcpiUtIsAmlTable (&TableHeader))
+        {
+            fprintf (stderr,
+                "    %s: Table [%4.4s] is not an AML table - ignoring\n",
+                Filename, TableHeader.Signature);
+
+            return (AE_TYPE);
+        }
+    }
+
+    /* Allocate a buffer for the entire table */
+
+    Table = AcpiOsAllocate ((size_t) TableHeader.Length);
+    if (!Table)
+    {
+        return (AE_NO_MEMORY);
+    }
+
+    /* Read the entire ACPI table, including header */
+
+    fseek (File, TableOffset, SEEK_SET);
+
+    Count = fread (Table, 1, TableHeader.Length, File);
+    if (Count != (INT32) TableHeader.Length)
+    {
+        Status = AE_ERROR;
+        goto ErrorExit;
+    }
+
+    /* Validate the checksum (just issue a warning) */
+
+    Status = AcpiTbVerifyChecksum (Table, TableHeader.Length);
+    if (ACPI_FAILURE (Status))
+    {
+        Status = AcCheckTextModeCorruption (Table);
+        if (ACPI_FAILURE (Status))
+        {
+            goto ErrorExit;
+        }
+    }
+
+    *ReturnTable = Table;
+    return (AE_OK);
+
+
+ErrorExit:
+    AcpiOsFree (Table);
+    return (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcIsFileBinary
+ *
+ * PARAMETERS:  File                - Open input file
+ *
+ * RETURN:      TRUE if file appears to be binary
+ *
+ * DESCRIPTION: Scan a file for any non-ASCII bytes.
+ *
+ * Note: Maintains current file position.
+ *
+ ******************************************************************************/
+
+BOOLEAN
+AcIsFileBinary (
+    FILE                    *File)
+{
+    UINT8                   Byte;
+    BOOLEAN                 IsBinary = FALSE;
+    long                    FileOffset;
+
+
+    /* Scan entire file for any non-ASCII bytes */
+
+    FileOffset = ftell (File);
+    while (fread (&Byte, 1, 1, File) == 1)
+    {
+        if (!isprint (Byte) && !isspace (Byte))
+        {
+            IsBinary = TRUE;
+            goto Exit;
+        }
+    }
+
+Exit:
+    fseek (File, FileOffset, SEEK_SET);
+    return (IsBinary);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcValidateTableHeader
+ *
+ * PARAMETERS:  File                - Open input file
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Determine if a file seems to contain one or more binary ACPI
+ *              tables, via the
+ *              following checks on what would be the table header:
+ *              1) File must be at least as long as an ACPI_TABLE_HEADER
+ *              2) There must be enough room in the file to hold entire table
+ *              3) Signature, OemId, OemTableId, AslCompilerId must be ASCII
+ *
+ * Note: There can be multiple definition blocks per file, so we cannot
+ * expect/compare the file size to be equal to the table length. 12/2015.
+ *
+ * Note: Maintains current file position.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcValidateTableHeader (
+    FILE                    *File,
+    long                    TableOffset)
+{
+    ACPI_TABLE_HEADER       TableHeader;
+    size_t                  Actual;
+    long                    OriginalOffset;
+    UINT32                  FileSize;
+    UINT32                  i;
+
+
+    ACPI_FUNCTION_TRACE ("AcValidateTableHeader");
+
+
+    /* Read a potential table header */
+
+    OriginalOffset = ftell (File);
+    fseek (File, TableOffset, SEEK_SET);
+
+    Actual = fread (&TableHeader, 1, sizeof (ACPI_TABLE_HEADER), File);
+    fseek (File, OriginalOffset, SEEK_SET);
+
+    if (Actual < sizeof (ACPI_TABLE_HEADER))
+    {
+        return (AE_ERROR);
+    }
+
+    /* Validate the signature (limited ASCII chars) */
+
+    if (!AcpiIsValidSignature (TableHeader.Signature))
+    {
+        fprintf (stderr, "Invalid table signature: 0x%8.8X\n",
+            *ACPI_CAST_PTR (UINT32, TableHeader.Signature));
+        return (AE_BAD_SIGNATURE);
+    }
+
+    /* Validate table length against bytes remaining in the file */
+
+    FileSize = CmGetFileSize (File);
+    if (TableHeader.Length > (UINT32) (FileSize - TableOffset))
+    {
+        fprintf (stderr, "Table [%4.4s] is too long for file - "
+            "needs: 0x%.2X, remaining in file: 0x%.2X\n",
+            TableHeader.Signature, TableHeader.Length,
+            (UINT32) (FileSize - TableOffset));
+        return (AE_BAD_HEADER);
+    }
+
+    /*
+     * These fields must be ASCII: OemId, OemTableId, AslCompilerId.
+     * We allow a NULL terminator in OemId and OemTableId.
+     */
+    for (i = 0; i < ACPI_NAME_SIZE; i++)
+    {
+        if (!ACPI_IS_ASCII ((UINT8) TableHeader.AslCompilerId[i]))
+        {
+            goto BadCharacters;
+        }
+    }
+
+    for (i = 0; (i < ACPI_OEM_ID_SIZE) && (TableHeader.OemId[i]); i++)
+    {
+        if (!ACPI_IS_ASCII ((UINT8) TableHeader.OemId[i]))
+        {
+            goto BadCharacters;
+        }
+    }
+
+    for (i = 0; (i < ACPI_OEM_TABLE_ID_SIZE) && (TableHeader.OemTableId[i]); i++)
+    {
+        if (!ACPI_IS_ASCII ((UINT8) TableHeader.OemTableId[i]))
+        {
+            goto BadCharacters;
+        }
+    }
+
+    return (AE_OK);
+
+
+BadCharacters:
+
+    ACPI_WARNING ((AE_INFO,
+        "Table header for [%4.4s] has invalid ASCII character(s)",
+        TableHeader.Signature));
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AcCheckTextModeCorruption
+ *
+ * PARAMETERS:  Table           - Table buffer starting with table header
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Check table for text mode file corruption where all linefeed
+ *              characters (LF) have been replaced by carriage return linefeed
+ *              pairs (CR/LF).
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcCheckTextModeCorruption (
+    ACPI_TABLE_HEADER       *Table)
+{
+    UINT32                  i;
+    UINT32                  Pairs = 0;
+    UINT8                   *Buffer = ACPI_CAST_PTR (UINT8, Table);
+
+
+    /* Scan entire table to determine if each LF has been prefixed with a CR */
+
+    for (i = 1; i < Table->Length; i++)
+    {
+        if (Buffer[i] == 0x0A)
+        {
+            if (Buffer[i - 1] != 0x0D)
+            {
+                /* The LF does not have a preceding CR, table not corrupted */
+
+                return (AE_OK);
+            }
+            else
+            {
+                /* Found a CR/LF pair */
+
+                Pairs++;
+            }
+
+            i++;
+        }
+    }
+
+    if (!Pairs)
+    {
+        return (AE_OK);
+    }
+
+    /*
+     * Entire table scanned, each CR is part of a CR/LF pair --
+     * meaning that the table was treated as a text file somewhere.
+     *
+     * NOTE: We can't "fix" the table, because any existing CR/LF pairs in the
+     * original table are left untouched by the text conversion process --
+     * meaning that we cannot simply replace CR/LF pairs with LFs.
+     */
+    AcpiOsPrintf ("Table has been corrupted by text mode conversion\n");
+    AcpiOsPrintf ("All LFs (%u) were changed to CR/LF pairs\n", Pairs);
+    AcpiOsPrintf ("Table cannot be repaired!\n");
+
+    return (AE_BAD_VALUE);
+}
--- a/sys/external/bsd/acpica/dist/common/acgetline.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/acgetline.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -262,6 +262,7 @@
 
             ACPI_BACKUP_CURSOR (i, EndOfLine - CursorPosition + 1);
             EndOfLine--;
+
             if (CursorPosition > 0)
             {
                 CursorPosition--;
--- a/sys/external/bsd/acpica/dist/common/adfile.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/adfile.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -99,7 +99,7 @@
     }
 
     FilenameBuf[i] = 0;
-    strcat (FilenameBuf, ACPI_TABLE_FILE_SUFFIX);
+    strcat (FilenameBuf, FILE_SUFFIX_BINARY_TABLE);
     return (FilenameBuf);
 }
 
--- a/sys/external/bsd/acpica/dist/common/adisasm.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/adisasm.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,16 +42,14 @@
  */
 
 #include "aslcompiler.h"
-#include "acparser.h"
 #include "amlcode.h"
 #include "acdisasm.h"
 #include "acdispat.h"
 #include "acnamesp.h"
-#include "actables.h"
+#include "acparser.h"
 #include "acapps.h"
 
 #include <stdio.h>
-#include <time.h>
 
 
 #define _COMPONENT          ACPI_TOOLS
@@ -59,17 +57,29 @@
 
 /* Local prototypes */
 
-static void
-AdCreateTableHeader (
+static ACPI_STATUS
+AdDoExternalFileList (
+    char                    *Filename);
+
+static ACPI_STATUS
+AdDisassembleOneTable (
+    ACPI_TABLE_HEADER       *Table,
+    FILE                    *File,
     char                    *Filename,
-    ACPI_TABLE_HEADER       *Table);
+    char                    *DisasmFilename);
 
 static ACPI_STATUS
-AdStoreTable (
+AdReparseOneTable (
     ACPI_TABLE_HEADER       *Table,
-    UINT32                  *TableIndex);
+    FILE                    *File,
+    ACPI_OWNER_ID           OwnerId);
+
 
-/* Stubs for ASL compiler */
+ACPI_TABLE_DESC             LocalTables[1];
+ACPI_PARSE_OBJECT           *AcpiGbl_ParseOpRoot;
+
+
+/* Stubs for everything except ASL compiler */
 
 #ifndef ACPI_ASL_COMPILER
 BOOLEAN
@@ -77,7 +87,7 @@
     ACPI_PARSE_OBJECT       *Op,
     ACPI_WALK_STATE         *WalkState)
 {
-    return TRUE;
+    return (TRUE);
 }
 
 ACPI_STATUS
@@ -89,52 +99,6 @@
 }
 #endif
 
-ACPI_STATUS
-AcpiNsLoadTable (
-    UINT32                  TableIndex,
-    ACPI_NAMESPACE_NODE     *Node)
-{
-    return (AE_NOT_IMPLEMENTED);
-}
-
-ACPI_STATUS
-AcpiDsRestartControlMethod (
-    ACPI_WALK_STATE         *WalkState,
-    ACPI_OPERAND_OBJECT     *ReturnDesc)
-{
-    return (AE_OK);
-}
-
-void
-AcpiDsTerminateControlMethod (
-    ACPI_OPERAND_OBJECT     *MethodDesc,
-    ACPI_WALK_STATE         *WalkState)
-{
-    return;
-}
-
-ACPI_STATUS
-AcpiDsCallControlMethod (
-    ACPI_THREAD_STATE       *Thread,
-    ACPI_WALK_STATE         *WalkState,
-    ACPI_PARSE_OBJECT       *Op)
-{
-    return (AE_OK);
-}
-
-ACPI_STATUS
-AcpiDsMethodDataInitArgs (
-    ACPI_OPERAND_OBJECT     **Params,
-    UINT32                  MaxParamCount,
-    ACPI_WALK_STATE         *WalkState)
-{
-    return (AE_OK);
-}
-
-
-static ACPI_TABLE_DESC      LocalTables[1];
-ACPI_PARSE_OBJECT    *AcpiGbl_ParseOpRoot;
-
 
 /*******************************************************************************
  *
@@ -187,7 +151,6 @@
     AcpiGbl_RootTableList.CurrentTableCount = 0;
     AcpiGbl_RootTableList.Tables = LocalTables;
 
-    AcpiGbl_PreviousOp = NULL;
     return (Status);
 }
 
@@ -203,7 +166,7 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Disassemble an entire ACPI table
+ * DESCRIPTION: Disassembler entry point. Disassemble an entire ACPI table.
  *
  *****************************************************************************/
 
@@ -215,14 +178,10 @@
     char                    **OutFilename)
 {
     ACPI_STATUS             Status;
-    ACPI_STATUS             GlobalStatus = AE_OK;
     char                    *DisasmFilename = NULL;
-    char                    *ExternalFilename;
-    ACPI_EXTERNAL_FILE      *ExternalFileList = AcpiGbl_ExternalFileList;
     FILE                    *File = NULL;
     ACPI_TABLE_HEADER       *Table = NULL;
-    ACPI_TABLE_HEADER       *ExternalTable;
-    ACPI_OWNER_ID           OwnerId;
+    ACPI_NEW_TABLE_DESC     *ListHead = NULL;
 
 
     /*
@@ -231,81 +190,24 @@
      */
     if (Filename)
     {
-        Status = AcpiDbGetTableFromFile (Filename, &Table, FALSE);
+        /* Get the list of all AML tables in the file */
+
+        Status = AcGetAllTablesFromFile (Filename,
+            ACPI_GET_ALL_TABLES, &ListHead);
+        if (ACPI_FAILURE (Status))
+        {
+            AcpiOsPrintf ("Could not get ACPI tables from %s, %s\n",
+                Filename, AcpiFormatException (Status));
+            return (Status);
+        }
+
+        /* Process any user-specified files for external objects */
+
+        Status = AdDoExternalFileList (Filename);
         if (ACPI_FAILURE (Status))
         {
             return (Status);
         }
-
-        /*
-         * External filenames separated by commas
-         * Example: iasl -e file1,file2,file3 -d xxx.aml
-         */
-        while (ExternalFileList)
-        {
-            ExternalFilename = ExternalFileList->Path;
-            if (!strcmp (ExternalFilename, Filename))
-            {
-                /* Next external file */
-
-                ExternalFileList = ExternalFileList->Next;
-                continue;
-            }
-
-            Status = AcpiDbGetTableFromFile (ExternalFilename, &ExternalTable, TRUE);
-            if (ACPI_FAILURE (Status))
-            {
-                if (Status == AE_TYPE)
-                {
-                    ExternalFileList = ExternalFileList->Next;
-                    GlobalStatus = AE_TYPE;
-                    Status = AE_OK;
-                    continue;
-                }
-                return (Status);
-            }
-
-            /* Load external table for symbol resolution */
-
-            if (ExternalTable)
-            {
-                Status = AdParseTable (ExternalTable, &OwnerId, TRUE, TRUE);
-                if (ACPI_FAILURE (Status))
-                {
-                    AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
-                        AcpiFormatException (Status));
-                    return (Status);
-                }
-
-                /*
-                 * Load namespace from names created within control methods
-                 * Set owner id of nodes in external table
-                 */
-                AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
-                    AcpiGbl_RootNode, OwnerId);
-                AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
-            }
-
-            /* Next external file */
-
-            ExternalFileList = ExternalFileList->Next;
-        }
-
-        if (ACPI_FAILURE (GlobalStatus))
-        {
-            return (GlobalStatus);
-        }
-
-        /* Clear external list generated by Scope in external tables */
-
-        if (AcpiGbl_ExternalFileList)
-        {
-            AcpiDmClearExternalList ();
-        }
-
-        /* Load any externals defined in the optional external ref file */
-
-        AcpiDmGetExternalsFromFile ();
     }
     else
     {
@@ -317,7 +219,7 @@
             return (Status);
         }
 
-        if (!AcpiGbl_DbOpt_Disasm)
+        if (!AcpiGbl_DmOpt_Disasm)
         {
             return (AE_OK);
         }
@@ -354,7 +256,8 @@
         File = fopen (DisasmFilename, "w+");
         if (!File)
         {
-            fprintf (stderr, "Could not open output file %s\n", DisasmFilename);
+            fprintf (stderr, "Could not open output file %s\n",
+                DisasmFilename);
             Status = AE_ERROR;
             goto Cleanup;
         }
@@ -364,11 +267,75 @@
 
     *OutFilename = DisasmFilename;
 
+    /* Disassemble all AML tables within the file */
+
+    while (ListHead)
+    {
+        Status = AdDisassembleOneTable (ListHead->Table,
+            File, Filename, DisasmFilename);
+        if (ACPI_FAILURE (Status))
+        {
+            break;
+        }
+
+        ListHead = ListHead->Next;
+    }
+
+Cleanup:
+
+    if (Table &&
+        !AcpiGbl_ForceAmlDisassembly &&
+        !AcpiUtIsAmlTable (Table))
+    {
+        ACPI_FREE (Table);
+    }
+
+    if (File)
+    {
+        fclose (File);
+        AcpiOsRedirectOutput (stdout);
+    }
+
+    AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
+    AcpiGbl_ParseOpRoot = NULL;
+    return (Status);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION:    AdDisassembleOneTable
+ *
+ * PARAMETERS:  Table               - Raw AML table
+ *              File                - Pointer for the input file
+ *              Filename            - AML input filename
+ *              DisasmFilename      - Output filename
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Disassemble a single ACPI table. AML or data table.
+ *
+ *****************************************************************************/
+
+static ACPI_STATUS
+AdDisassembleOneTable (
+    ACPI_TABLE_HEADER       *Table,
+    FILE                    *File,
+    char                    *Filename,
+    char                    *DisasmFilename)
+{
+    ACPI_STATUS             Status;
+    ACPI_OWNER_ID           OwnerId;
+
+
     /* ForceAmlDisassembly means to assume the table contains valid AML */
 
     if (!AcpiGbl_ForceAmlDisassembly && !AcpiUtIsAmlTable (Table))
     {
         AdDisassemblerHeader (Filename, ACPI_IS_DATA_TABLE);
+
+        /* This is a "Data Table" (non-AML table) */
+
         AcpiOsPrintf (" * ACPI Data Table [%4.4s]\n *\n",
             Table->Signature);
         AcpiOsPrintf (" * Format: [HexOffset DecimalOffset ByteLength]  "
@@ -383,467 +350,104 @@
             fprintf (stderr, "Formatted output:  %s - %u bytes\n",
                 DisasmFilename, CmGetFileSize (File));
         }
+
+        return (AE_OK);
     }
-    else
+
+    /*
+     * This is an AML table (DSDT or SSDT).
+     * Always parse the tables, only option is what to display
+     */
+    Status = AdParseTable (Table, &OwnerId, TRUE, FALSE);
+    if (ACPI_FAILURE (Status))
+    {
+        AcpiOsPrintf ("Could not parse ACPI tables, %s\n",
+            AcpiFormatException (Status));
+        return (Status);
+    }
+
+    /* Debug output, namespace and parse tree */
+
+    if (AslCompilerdebug && File)
     {
-        /* Always parse the tables, only option is what to display */
+        AcpiOsPrintf ("/**** Before second load\n");
+
+        NsSetupNamespaceListing (File);
+        NsDisplayNamespace ();
+
+        AcpiOsPrintf ("*****/\n");
+    }
+
+    /* Load namespace from names created within control methods */
+
+    AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
+        AcpiGbl_RootNode, OwnerId);
 
-        Status = AdParseTable (Table, &OwnerId, TRUE, FALSE);
+    /*
+     * Cross reference the namespace here, in order to
+     * generate External() statements
+     */
+    AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot,
+        AcpiGbl_RootNode, OwnerId);
+
+    if (AslCompilerdebug)
+    {
+        AcpiDmDumpTree (AcpiGbl_ParseOpRoot);
+    }
+
+    /* Find possible calls to external control methods */
+
+    AcpiDmFindOrphanMethods (AcpiGbl_ParseOpRoot);
+
+    /*
+     * If we found any external control methods, we must reparse
+     * the entire tree with the new information (namely, the
+     * number of arguments per method)
+     */
+    if (AcpiDmGetExternalMethodCount ())
+    {
+        Status = AdReparseOneTable (Table, File, OwnerId);
         if (ACPI_FAILURE (Status))
         {
-            AcpiOsPrintf ("Could not parse ACPI tables, %s\n",
-                AcpiFormatException (Status));
-            goto Cleanup;
-        }
-
-        if (AslCompilerdebug)
-        {
-            AcpiOsPrintf ("/**** Before second load\n");
-
-            if (File)
-            {
-                NsSetupNamespaceListing (File);
-                NsDisplayNamespace ();
-            }
-            AcpiOsPrintf ("*****/\n");
-        }
-
-        /* Load namespace from names created within control methods */
-
-        AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
-            AcpiGbl_RootNode, OwnerId);
-
-        /*
-         * Cross reference the namespace here, in order to
-         * generate External() statements
-         */
-        AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot,
-            AcpiGbl_RootNode, OwnerId);
-
-        if (AslCompilerdebug)
-        {
-            AcpiDmDumpTree (AcpiGbl_ParseOpRoot);
-        }
-
-        /* Find possible calls to external control methods */
-
-        AcpiDmFindOrphanMethods (AcpiGbl_ParseOpRoot);
-
-        /*
-         * If we found any external control methods, we must reparse
-         * the entire tree with the new information (namely, the
-         * number of arguments per method)
-         */
-        if (AcpiDmGetExternalMethodCount ())
-        {
-            fprintf (stderr,
-                "\nFound %u external control methods, "
-                "reparsing with new information\n",
-                AcpiDmGetExternalMethodCount ());
-
-            /* Reparse, rebuild namespace */
-
-            AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
-            AcpiGbl_ParseOpRoot = NULL;
-            AcpiNsDeleteNamespaceSubtree (AcpiGbl_RootNode);
-
-            AcpiGbl_RootNode                    = NULL;
-            AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME;
-            AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED;
-            AcpiGbl_RootNodeStruct.Type         = ACPI_TYPE_DEVICE;
-            AcpiGbl_RootNodeStruct.Parent       = NULL;
-            AcpiGbl_RootNodeStruct.Child        = NULL;
-            AcpiGbl_RootNodeStruct.Peer         = NULL;
-            AcpiGbl_RootNodeStruct.Object       = NULL;
-            AcpiGbl_RootNodeStruct.Flags        = 0;
-
-            Status = AcpiNsRootInitialize ();
-
-            /* New namespace, add the external definitions first */
-
-            AcpiDmAddExternalsToNamespace ();
-
-            /* Parse the table again. No need to reload it, however */
-
-            Status = AdParseTable (Table, NULL, FALSE, FALSE);
-            if (ACPI_FAILURE (Status))
-            {
-                AcpiOsPrintf ("Could not parse ACPI tables, %s\n",
-                    AcpiFormatException (Status));
-                goto Cleanup;
-            }
-
-            /* Cross reference the namespace again */
-
-            AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
-                AcpiGbl_RootNode, OwnerId);
-
-            AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot,
-                AcpiGbl_RootNode, OwnerId);
-
-            if (AslCompilerdebug)
-            {
-                AcpiOsPrintf ("/**** After second load and resource conversion\n");
-                if (File)
-                {
-                    NsSetupNamespaceListing (File);
-                    NsDisplayNamespace ();
-                }
-                AcpiOsPrintf ("*****/\n");
-
-                AcpiDmDumpTree (AcpiGbl_ParseOpRoot);
-            }
-        }
-
-        /*
-         * Now that the namespace is finalized, we can perform namespace
-         * transforms.
-         *
-         * 1) Convert fixed-offset references to resource descriptors
-         *    to symbolic references (Note: modifies namespace)
-         */
-        AcpiDmConvertResourceIndexes (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode);
-
-        /* Optional displays */
-
-        if (AcpiGbl_DbOpt_Disasm)
-        {
-            /* This is the real disassembly */
-
-            AdDisplayTables (Filename, Table);
-
-            /* Dump hex table if requested (-vt) */
-
-            AcpiDmDumpDataTable (Table);
-
-            fprintf (stderr, "Disassembly completed\n");
-            if (File)
-            {
-                fprintf (stderr, "ASL Output:    %s - %u bytes\n",
-                    DisasmFilename, CmGetFileSize (File));
-            }
-
-            if (Gbl_MapfileFlag)
-            {
-                fprintf (stderr, "%14s %s - %u bytes\n",
-                    Gbl_Files[ASL_FILE_MAP_OUTPUT].ShortDescription,
-                    Gbl_Files[ASL_FILE_MAP_OUTPUT].Filename,
-                    FlGetFileSize (ASL_FILE_MAP_OUTPUT));
-            }
-        }
-    }
-
-Cleanup:
-
-    if (Table && !AcpiGbl_ForceAmlDisassembly &&!AcpiUtIsAmlTable (Table))
-    {
-        ACPI_FREE (Table);
-    }
-
-    if (File)
-    {
-        if (AslCompilerdebug) /* Display final namespace, with transforms */
-        {
-            NsSetupNamespaceListing (File);
-            NsDisplayNamespace ();
-        }
-
-        fclose (File);
-        AcpiOsRedirectOutput (stdout);
-    }
-
-    AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
-    AcpiGbl_ParseOpRoot = NULL;
-    return (Status);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION:    AdDisassemblerHeader
- *
- * PARAMETERS:  Filename            - Input file for the table
- *              TableType           - Either AML or DataTable
- *
- * RETURN:      None
- *
- * DESCRIPTION: Create the disassembler header, including ACPICA signon with
- *              current time and date.
- *
- *****************************************************************************/
-
-void
-AdDisassemblerHeader (
-    char                    *Filename,
-    UINT8                   TableType)
-{
-    time_t                  Timer;
-
-
-    time (&Timer);
-
-    /* Header and input table info */
-
-    AcpiOsPrintf ("/*\n");
-    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");
+            return (Status);
         }
     }
 
-    AcpiOsPrintf (" * Disassembly of %s, %s", Filename, ctime (&Timer));
-    AcpiOsPrintf (" *\n");
-}
-
-
-/******************************************************************************
- *
- * FUNCTION:    AdCreateTableHeader
- *
- * PARAMETERS:  Filename            - Input file for the table
- *              Table               - Pointer to the raw table
- *
- * RETURN:      None
- *
- * DESCRIPTION: Create the ASL table header, including ACPICA signon with
- *              current time and date.
- *
- *****************************************************************************/
-
-static void
-AdCreateTableHeader (
-    char                    *Filename,
-    ACPI_TABLE_HEADER       *Table)
-{
-    char                    *NewFilename;
-    UINT8                   Checksum;
-
-
     /*
-     * Print file header and dump original table header
+     * Now that the namespace is finalized, we can perform namespace
+     * transforms.
+     *
+     * 1) Convert fixed-offset references to resource descriptors
+     *    to symbolic references (Note: modifies namespace)
      */
-    AdDisassemblerHeader (Filename, ACPI_IS_AML_TABLE);
-
-    AcpiOsPrintf (" * Original Table Header:\n");
-    AcpiOsPrintf (" *     Signature        \"%4.4s\"\n",    Table->Signature);
-    AcpiOsPrintf (" *     Length           0x%8.8X (%u)\n", Table->Length, Table->Length);
-
-    /* Print and validate the revision */
-
-    AcpiOsPrintf (" *     Revision         0x%2.2X",      Table->Revision);
-
-    switch (Table->Revision)
-    {
-    case 0:
-
-        AcpiOsPrintf (" **** Invalid Revision");
-        break;
-
-    case 1:
-
-        /* Revision of DSDT controls the ACPI integer width */
+    AcpiDmConvertResourceIndexes (AcpiGbl_ParseOpRoot, AcpiGbl_RootNode);
 
-        if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT))
-        {
-            AcpiOsPrintf (" **** 32-bit table (V1), no 64-bit math support");
-        }
-        break;
-
-    default:
-
-        break;
-    }
-    AcpiOsPrintf ("\n");
-
-    /* Print and validate the table checksum */
-
-    AcpiOsPrintf (" *     Checksum         0x%2.2X",        Table->Checksum);
-
-    Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
-    if (Checksum)
-    {
-        AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X",
-            (UINT8) (Table->Checksum - Checksum));
-    }
-    AcpiOsPrintf ("\n");
-
-    AcpiOsPrintf (" *     OEM ID           \"%.6s\"\n",     Table->OemId);
-    AcpiOsPrintf (" *     OEM Table ID     \"%.8s\"\n",     Table->OemTableId);
-    AcpiOsPrintf (" *     OEM Revision     0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision);
-    AcpiOsPrintf (" *     Compiler ID      \"%.4s\"\n",     Table->AslCompilerId);
-    AcpiOsPrintf (" *     Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision);
-    AcpiOsPrintf (" */\n");
+    /* Optional displays */
 
-    /* Create AML output filename based on input filename */
-
-    if (Filename)
-    {
-        NewFilename = FlGenerateFilename (Filename, "aml");
-    }
-    else
+    if (AcpiGbl_DmOpt_Disasm)
     {
-        NewFilename = UtStringCacheCalloc (9);
-        if (NewFilename)
-        {
-            strncat (NewFilename, Table->Signature, 4);
-            strcat (NewFilename, ".aml");
-        }
-    }
+        /* This is the real disassembly */
 
-    if (!NewFilename)
-    {
-        AcpiOsPrintf (" **** Could not generate AML output filename\n");
-        return;
-    }
-
-    /* Open the ASL definition block */
-
-    AcpiOsPrintf (
-        "DefinitionBlock (\"%s\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
-        NewFilename, Table->Signature, Table->Revision,
-        Table->OemId, Table->OemTableId, Table->OemRevision);
-}
-
+        AdDisplayTables (Filename, Table);
 
-/******************************************************************************
- *
- * FUNCTION:    AdDisplayTables
- *
- * PARAMETERS:  Filename            - Input file for the table
- *              Table               - Pointer to the raw table
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Display (disassemble) loaded tables and dump raw tables
- *
- *****************************************************************************/
-
-ACPI_STATUS
-AdDisplayTables (
-    char                    *Filename,
-    ACPI_TABLE_HEADER       *Table)
-{
-
-
-    if (!AcpiGbl_ParseOpRoot)
-    {
-        return (AE_NOT_EXIST);
-    }
-
-    if (!AcpiGbl_DbOpt_Verbose)
-    {
-        AdCreateTableHeader (Filename, Table);
-    }
+        /* Dump hex table if requested (-vt) */
 
-    AcpiDmDisassemble (NULL, AcpiGbl_ParseOpRoot, ACPI_UINT32_MAX);
-    MpEmitMappingInfo ();
-
-    if (AcpiGbl_DbOpt_Verbose)
-    {
-        AcpiOsPrintf ("\n\nTable Header:\n");
-        AcpiUtDebugDumpBuffer ((UINT8 *) Table, sizeof (ACPI_TABLE_HEADER),
-            DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
-
-        AcpiOsPrintf ("Table Body (Length 0x%X)\n", Table->Length);
-        AcpiUtDebugDumpBuffer (((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)),
-            Table->Length, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
-    }
-
-    return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * 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
- *
- ******************************************************************************/
+        AcpiDmDumpDataTable (Table);
 
-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);
-    Status = AcpiTbValidateTable (TableDesc);
-    return (Status);
-}
-
+        fprintf (stderr, "Disassembly completed\n");
+        if (File)
+        {
+            fprintf (stderr, "ASL Output:    %s - %u bytes\n",
+                DisasmFilename, CmGetFileSize (File));
+        }
 
-/******************************************************************************
- *
- * FUNCTION:    AdGetLocalTables
- *
- * PARAMETERS:  None
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Get the ACPI tables from either memory or a file
- *
- *****************************************************************************/
-
-ACPI_STATUS
-AdGetLocalTables (
-    void)
-{
-    ACPI_STATUS             Status;
-    ACPI_TABLE_HEADER       TableHeader;
-    ACPI_TABLE_HEADER       *NewTable;
-    UINT32                  TableIndex;
-
-
-    /* Get the DSDT via table override */
-
-    ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_DSDT);
-    AcpiOsTableOverride (&TableHeader, &NewTable);
-    if (!NewTable)
-    {
-        fprintf (stderr, "Could not obtain DSDT\n");
-        return (AE_NO_ACPI_TABLES);
-    }
-
-    AdWriteTable (NewTable, NewTable->Length,
-        ACPI_SIG_DSDT, NewTable->OemTableId);
-
-    /* Store DSDT in the Table Manager */
-
-    Status = AdStoreTable (NewTable, &TableIndex);
-    if (ACPI_FAILURE (Status))
-    {
-        fprintf (stderr, "Could not store DSDT\n");
-        return (AE_NO_ACPI_TABLES);
+        if (Gbl_MapfileFlag)
+        {
+            fprintf (stderr, "%14s %s - %u bytes\n",
+                Gbl_Files[ASL_FILE_MAP_OUTPUT].ShortDescription,
+                Gbl_Files[ASL_FILE_MAP_OUTPUT].Filename,
+                FlGetFileSize (ASL_FILE_MAP_OUTPUT));
+        }
     }
 
     return (AE_OK);
@@ -852,134 +456,201 @@
 
 /******************************************************************************
  *
- * FUNCTION:    AdParseTable
+ * FUNCTION:    AdReparseOneTable
  *
- * PARAMETERS:  Table               - Pointer to the raw table
- *              OwnerId             - Returned OwnerId of the table
- *              LoadTable           - If add table to the global table list
- *              External            - If this is an external table
+ * PARAMETERS:  Table               - Raw AML table
+ *              File                - Pointer for the input file
+ *              OwnerId             - ID for this table
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Parse the DSDT.
+ * DESCRIPTION: Reparse a table that has already been loaded. Used to
+ *              integrate information about external control methods.
+ *              These methods may have been previously parsed incorrectly.
  *
  *****************************************************************************/
 
-ACPI_STATUS
-AdParseTable (
+static ACPI_STATUS
+AdReparseOneTable (
     ACPI_TABLE_HEADER       *Table,
-    ACPI_OWNER_ID           *OwnerId,
-    BOOLEAN                 LoadTable,
-    BOOLEAN                 External)
+    FILE                    *File,
+    ACPI_OWNER_ID           OwnerId)
 {
-    ACPI_STATUS             Status = AE_OK;
-    ACPI_WALK_STATE         *WalkState;
-    UINT8                   *AmlStart;
-    UINT32                  AmlLength;
-    UINT32                  TableIndex;
+    ACPI_STATUS             Status;
 
 
-    if (!Table)
-    {
-        return (AE_NOT_EXIST);
-    }
-
-    /* Pass 1:  Parse everything except control method bodies */
+    fprintf (stderr,
+        "\nFound %u external control methods, "
+        "reparsing with new information\n",
+        AcpiDmGetExternalMethodCount ());
 
-    fprintf (stderr, "Pass 1 parse of [%4.4s]\n", (char *) Table->Signature);
+    /* Reparse, rebuild namespace */
 
-    AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
-    AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER));
-
-    /* Create the root object */
+    AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
+    AcpiGbl_ParseOpRoot = NULL;
+    AcpiNsDeleteNamespaceSubtree (AcpiGbl_RootNode);
 
-    AcpiGbl_ParseOpRoot = AcpiPsCreateScopeOp (AmlStart);
-    if (!AcpiGbl_ParseOpRoot)
-    {
-        return (AE_NO_MEMORY);
-    }
-
-    /* Create and initialize a new walk state */
+    AcpiGbl_RootNode                    = NULL;
+    AcpiGbl_RootNodeStruct.Name.Integer = ACPI_ROOT_NAME;
+    AcpiGbl_RootNodeStruct.DescriptorType = ACPI_DESC_TYPE_NAMED;
+    AcpiGbl_RootNodeStruct.Type         = ACPI_TYPE_DEVICE;
+    AcpiGbl_RootNodeStruct.Parent       = NULL;
+    AcpiGbl_RootNodeStruct.Child        = NULL;
+    AcpiGbl_RootNodeStruct.Peer         = NULL;
+    AcpiGbl_RootNodeStruct.Object       = NULL;
+    AcpiGbl_RootNodeStruct.Flags        = 0;
 
-    WalkState = AcpiDsCreateWalkState (0,
-                        AcpiGbl_ParseOpRoot, NULL, NULL);
-    if (!WalkState)
-    {
-        return (AE_NO_MEMORY);
-    }
-
-    Status = AcpiDsInitAmlWalk (WalkState, AcpiGbl_ParseOpRoot,
-                NULL, AmlStart, AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
+    Status = AcpiNsRootInitialize ();
     if (ACPI_FAILURE (Status))
     {
         return (Status);
     }
 
-    WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
-    WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
+    /* New namespace, add the external definitions first */
+
+    AcpiDmAddExternalsToNamespace ();
 
-    Status = AcpiPsParseAml (WalkState);
+    /* Parse the table again. No need to reload it, however */
+
+    Status = AdParseTable (Table, NULL, FALSE, FALSE);
     if (ACPI_FAILURE (Status))
     {
+        AcpiOsPrintf ("Could not parse ACPI tables, %s\n",
+            AcpiFormatException (Status));
         return (Status);
     }
 
-    /* If LoadTable is FALSE, we are parsing the last loaded table */
+    /* Cross reference the namespace again */
 
-    TableIndex = AcpiGbl_RootTableList.CurrentTableCount - 1;
+    AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
+        AcpiGbl_RootNode, OwnerId);
 
-    /* Pass 2 */
+    AcpiDmCrossReferenceNamespace (AcpiGbl_ParseOpRoot,
+        AcpiGbl_RootNode, OwnerId);
 
-    if (LoadTable)
+    /* Debug output - namespace and parse tree */
+
+    if (AslCompilerdebug)
     {
-        Status = AdStoreTable (Table, &TableIndex);
-        if (ACPI_FAILURE (Status))
+        AcpiOsPrintf ("/**** After second load and resource conversion\n");
+        if (File)
         {
-            return (Status);
+            NsSetupNamespaceListing (File);
+            NsDisplayNamespace ();
         }
-        Status = AcpiTbAllocateOwnerId (TableIndex);
-        if (ACPI_FAILURE (Status))
-        {
-            return (Status);
-        }
-        if (OwnerId)
-        {
-            Status = AcpiTbGetOwnerId (TableIndex, OwnerId);
-            if (ACPI_FAILURE (Status))
-            {
-                return (Status);
-            }
-        }
+
+        AcpiOsPrintf ("*****/\n");
+        AcpiDmDumpTree (AcpiGbl_ParseOpRoot);
     }
 
-    fprintf (stderr, "Pass 2 parse of [%4.4s]\n", (char *) Table->Signature);
+    return (AE_OK);
+}
+
 
-    Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS2, TableIndex, NULL);
-    if (ACPI_FAILURE (Status))
-    {
-        return (Status);
-    }
+/******************************************************************************
+ *
+ * FUNCTION:    AdDoExternalFileList
+ *
+ * PARAMETERS:  Filename            - Input file for the table
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Process all tables found in the -e external files list
+ *
+ *****************************************************************************/
 
-    /* No need to parse control methods of external table */
+static ACPI_STATUS
+AdDoExternalFileList (
+    char                    *Filename)
+{
+    ACPI_EXTERNAL_FILE      *ExternalFileList;
+    char                    *ExternalFilename;
+    ACPI_NEW_TABLE_DESC     *ExternalListHead = NULL;
+    ACPI_STATUS             Status;
+    ACPI_STATUS             GlobalStatus = AE_OK;
+    ACPI_OWNER_ID           OwnerId;
 
-    if (External)
-    {
-        return (AE_OK);
-    }
 
     /*
-     * Pass 3: Parse control methods and link their parse trees
-     * into the main parse tree
+     * External filenames are specified on the command line like this:
+     * Example: iasl -e file1,file2,file3 -d xxx.aml
      */
-    fprintf (stderr,
-        "Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n");
-    Status = AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
-    fprintf (stderr, "\n");
+    ExternalFileList = AcpiGbl_ExternalFileList;
+
+    /* Process each external file */
+
+    while (ExternalFileList)
+    {
+        ExternalFilename = ExternalFileList->Path;
+        if (!strcmp (ExternalFilename, Filename))
+        {
+            /* Next external file */
+
+            ExternalFileList = ExternalFileList->Next;
+            continue;
+        }
+
+        AcpiOsPrintf ("External object resolution file %16s\n",
+            ExternalFilename);
+
+        Status = AcGetAllTablesFromFile (
+            ExternalFilename, ACPI_GET_ONLY_AML_TABLES, &ExternalListHead);
+        if (ACPI_FAILURE (Status))
+        {
+            if (Status == AE_TYPE)
+            {
+                ExternalFileList = ExternalFileList->Next;
+                GlobalStatus = AE_TYPE;
+                Status = AE_OK;
+                continue;
+            }
+
+            return (Status);
+        }
+
+        /* Load external tables for symbol resolution */
 
-    /* Process Resource Templates */
+        while (ExternalListHead)
+        {
+            Status = AdParseTable (
+                ExternalListHead->Table, &OwnerId, TRUE, TRUE);
+            if (ACPI_FAILURE (Status))
+            {
+                AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
+                    AcpiFormatException (Status));
+                return (Status);
+            }
+
+            /*
+             * Load namespace from names created within control methods
+             * Set owner id of nodes in external table
+             */
+            AcpiDmFinishNamespaceLoad (AcpiGbl_ParseOpRoot,
+                AcpiGbl_RootNode, OwnerId);
+            AcpiPsDeleteParseTree (AcpiGbl_ParseOpRoot);
 
-    AcpiDmFindResources (AcpiGbl_ParseOpRoot);
+            ExternalListHead = ExternalListHead->Next;
+        }
+
+        /* Next external file */
+
+        ExternalFileList = ExternalFileList->Next;
+    }
 
-    fprintf (stderr, "Parsing completed\n");
+    if (ACPI_FAILURE (GlobalStatus))
+    {
+        return (GlobalStatus);
+    }
+
+    /* Clear external list generated by Scope in external tables */
+
+    if (AcpiGbl_ExternalFileList)
+    {
+        AcpiDmClearExternalList ();
+    }
+
+    /* Load any externals defined in the optional external ref file */
+
+    AcpiDmGetExternalsFromFile ();
     return (AE_OK);
 }
--- a/sys/external/bsd/acpica/dist/common/adwalk.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/adwalk.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -135,6 +135,7 @@
     Info.Count = 0;
     Info.Level = 0;
     Info.WalkState = NULL;
+
     AcpiDmWalkParseTree (Origin, AcpiDmDumpDescending, NULL, &Info);
     AcpiOsPrintf ("*/\n\n");
 }
@@ -168,6 +169,7 @@
     Info.Flags = 0;
     Info.Level = 0;
     Info.WalkState = NULL;
+
     AcpiDmWalkParseTree (Origin, AcpiDmFindOrphanDescending, NULL, &Info);
 }
 
@@ -211,7 +213,8 @@
         return;
     }
 
-    Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type, WalkState);
+    Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type,
+        WalkState);
     if (ACPI_FAILURE (Status))
     {
         return;
@@ -220,6 +223,7 @@
     Info.Flags = 0;
     Info.Level = 0;
     Info.WalkState = WalkState;
+
     AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmLoadDescendingOp,
         AcpiDmCommonAscendingOp, &Info);
     ACPI_FREE (WalkState);
@@ -264,7 +268,8 @@
         return;
     }
 
-    Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type, WalkState);
+    Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type,
+        WalkState);
     if (ACPI_FAILURE (Status))
     {
         return;
@@ -273,6 +278,7 @@
     Info.Flags = 0;
     Info.Level = 0;
     Info.WalkState = WalkState;
+
     AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmXrefDescendingOp,
         AcpiDmCommonAscendingOp, &Info);
     ACPI_FREE (WalkState);
@@ -317,7 +323,8 @@
         return;
     }
 
-    Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type, WalkState);
+    Status = AcpiDsScopeStackPush (NamespaceRoot, NamespaceRoot->Type,
+        WalkState);
     if (ACPI_FAILURE (Status))
     {
         return;
@@ -326,6 +333,7 @@
     Info.Flags = 0;
     Info.Level = 0;
     Info.WalkState = WalkState;
+
     AcpiDmWalkParseTree (ParseTreeRoot, AcpiDmResourceDescendingOp,
         AcpiDmCommonAscendingOp, &Info);
     ACPI_FREE (WalkState);
@@ -396,7 +404,7 @@
         if (Op->Common.Value.String)
         {
             AcpiNsExternalizeName (ACPI_UINT32_MAX, Op->Common.Value.String,
-                            NULL, &Path);
+                NULL, &Path);
             AcpiOsPrintf ("%s %p", Path, Op->Common.Node);
             ACPI_FREE (Path);
         }
@@ -655,6 +663,7 @@
         {
             NextOp = NextOp->Common.Next;
         }
+
         Path = NextOp->Common.Value.String;
     }
 
@@ -666,8 +675,8 @@
     /* Insert the name into the namespace */
 
     Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ObjectType,
-                ACPI_IMODE_LOAD_PASS2, ACPI_NS_DONT_OPEN_SCOPE,
-                WalkState, &Node);
+        ACPI_IMODE_LOAD_PASS2, ACPI_NS_DONT_OPEN_SCOPE,
+        WalkState, &Node);
 
     Op->Common.Node = Node;
 
@@ -708,7 +717,8 @@
     {
         if (Op->Common.Node)
         {
-            Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType, WalkState);
+            Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType,
+                WalkState);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
@@ -825,8 +835,8 @@
      */
     Node = NULL;
     Status = AcpiNsLookup (WalkState->ScopeInfo, Path, ACPI_TYPE_ANY,
-                ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
-                WalkState, &Node);
+        ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
+        WalkState, &Node);
     if (ACPI_SUCCESS (Status) && (Node->Flags & ANOBJ_IS_EXTERNAL))
     {
         /* Node was created by an External() statement */
@@ -908,7 +918,8 @@
     {
         if (Op->Common.Node)
         {
-            Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType, WalkState);
+            Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType,
+                WalkState);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
@@ -956,7 +967,8 @@
         if (Op->Common.Node)
         {
 
-            Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType, WalkState);
+            Status = AcpiDsScopeStackPush (Op->Common.Node, ObjectType,
+                WalkState);
             if (ACPI_FAILURE (Status))
             {
                 return (Status);
--- a/sys/external/bsd/acpica/dist/common/ahids.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/ahids.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, 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	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/ahpredef.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/common/ahtable.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/ahtable.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, 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	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/ahuuids.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -48,6 +48,7 @@
 #define _COMPONENT          ACPI_UTILITIES
         ACPI_MODULE_NAME    ("ahuuids")
 
+
 /*
  * Table of "known" (ACPI-related) UUIDs
  */
--- a/sys/external/bsd/acpica/dist/common/cmfsize.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/cmfsize.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, 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	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmextern.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -140,7 +140,6 @@
     {
         Type = ACPI_TYPE_DEVICE;
     }
-
     else if (Type > ACPI_TYPE_LOCAL_INDEX_FIELD)
     {
         return ("");
@@ -410,6 +409,7 @@
         {
             continue;
         }
+
         if (strcmp (Token, "External"))
         {
             continue;
@@ -447,6 +447,7 @@
             fprintf (stderr, "Invalid argument count (%s)\n", Token);
             continue;
         }
+
         if (ArgCount > 7)
         {
             fprintf (stderr, "Invalid argument count (%u)\n", ArgCount);
@@ -465,7 +466,8 @@
 
     if (!ImportCount)
     {
-        fprintf (stderr, "Did not find any external methods in reference file \"%s\"\n",
+        fprintf (stderr,
+            "Did not find any external methods in reference file \"%s\"\n",
             Gbl_ExternalRefFilename);
     }
     else
@@ -815,7 +817,8 @@
                 (Value > 0))
             {
                 ACPI_ERROR ((AE_INFO,
-                    "External method arg count mismatch %s: Current %u, attempted %u",
+                    "External method arg count mismatch %s: "
+                    "Current %u, attempted %u",
                     NextExternal->Path, NextExternal->Value, Value));
             }
 
@@ -917,9 +920,9 @@
         /* Add the external name (object) into the namespace */
 
         Status = AcpiNsLookup (NULL, External->InternalPath, External->Type,
-                   ACPI_IMODE_LOAD_PASS1,
-                   ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE,
-                   NULL, &Node);
+            ACPI_IMODE_LOAD_PASS1,
+            ACPI_NS_ERROR_IF_FOUND | ACPI_NS_EXTERNAL | ACPI_NS_DONT_OPEN_SCOPE,
+            NULL, &Node);
 
         if (ACPI_FAILURE (Status))
         {
--- a/sys/external/bsd/acpica/dist/common/dmrestag.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmrestag.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -498,9 +498,9 @@
     /* Lookup the buffer in the namespace */
 
     Status = AcpiNsLookup (WalkState->ScopeInfo,
-                BufferNameOp->Common.Value.String, ACPI_TYPE_BUFFER,
-                ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, WalkState,
-                &BufferNode);
+        BufferNameOp->Common.Value.String, ACPI_TYPE_BUFFER,
+        ACPI_IMODE_EXECUTE, ACPI_NS_SEARCH_PARENT, WalkState,
+        &BufferNode);
     if (ACPI_FAILURE (Status))
     {
         return;
@@ -621,8 +621,8 @@
 
     /* Get the individual resource descriptor and validate it */
 
-    Aml = ACPI_CAST_PTR (AML_RESOURCE,
-            &Op->Named.Data[ResourceNode->Value]);
+    Aml = ACPI_CAST_PTR (
+        AML_RESOURCE, &Op->Named.Data[ResourceNode->Value]);
 
     Status = AcpiUtValidateResource (NULL, Aml, &ResourceTableIndex);
     if (ACPI_FAILURE (Status))
@@ -663,7 +663,7 @@
     }
 
     (void) AcpiNsBuildNormalizedPath (BufferNode, Pathname,
-            RequiredSize, FALSE);
+        RequiredSize, FALSE);
 
     /*
      * Create the full path to the resource and tag by: remove the buffer name,
@@ -742,6 +742,7 @@
     {
         AcpiGbl_NextResourceId = 0;
         AcpiGbl_NextPrefix++;
+
         if (AcpiGbl_NextPrefix > ACPI_NUM_RES_PREFIX)
         {
             AcpiGbl_NextPrefix = 0;
@@ -1028,9 +1029,9 @@
 
     ScopeInfo.Scope.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Context);
     Status = AcpiNsLookup (&ScopeInfo, "_TMP", ACPI_TYPE_LOCAL_RESOURCE,
-                ACPI_IMODE_LOAD_PASS2,
-                ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_PREFIX_IS_SCOPE,
-                NULL, &Node);
+        ACPI_IMODE_LOAD_PASS2,
+        ACPI_NS_NO_UPSEARCH | ACPI_NS_DONT_OPEN_SCOPE | ACPI_NS_PREFIX_IS_SCOPE,
+        NULL, &Node);
     if (ACPI_FAILURE (Status))
     {
         return (AE_OK);
--- a/sys/external/bsd/acpica/dist/common/dmtable.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtable.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -702,7 +702,7 @@
  *              SubtableLength      - Length of this sub-descriptor
  *              Info                - Info table for this ACPI table
  *
- * RETURN:      None
+ * RETURN:      Status
  *
  * DESCRIPTION: Display ACPI table contents by walking the Info table.
  *
@@ -875,6 +875,7 @@
                 AcpiOsPrintf ("\n");
                 LastOutputBlankLine = TRUE;
             }
+
             ByteLength = sizeof (ACPI_GENERIC_ADDRESS);
             break;
 
@@ -885,6 +886,7 @@
                 AcpiOsPrintf ("\n");
                 LastOutputBlankLine = TRUE;
             }
+
             ByteLength = sizeof (ACPI_HEST_NOTIFY);
             break;
 
@@ -894,6 +896,7 @@
             {
                 LastOutputBlankLine = FALSE;
             }
+
             ByteLength = sizeof (ACPI_IORT_MEMORY_ACCESS);
             break;
 
@@ -1027,6 +1030,7 @@
                     }
                 }
             }
+
             AcpiOsPrintf ("\n");
             break;
 
@@ -1050,6 +1054,7 @@
 
             AcpiDmCheckAscii (Target, RepairedName, 4);
             AcpiOsPrintf ("\"%.4s\"    ", RepairedName);
+
             TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target));
             if (TableData)
             {
@@ -1095,6 +1100,7 @@
                 AcpiOsPrintf (
                     "     /* Incorrect checksum, should be %2.2X */", Temp8);
             }
+
             AcpiOsPrintf ("\n");
             break;
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/acpica/dist/common/dmtables.c	Sat Jan 09 19:54:49 2016 +0000
@@ -0,0 +1,499 @@
+/******************************************************************************
+ *
+ * Module Name: dmtables - disassembler ACPI table support
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2016, 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 "acapps.h"
+#include "acdispat.h"
+#include "acnamesp.h"
+#include "actables.h"
+#include "acparser.h"
+
+#include <stdio.h>
+#include <time.h>
+
+#define _COMPONENT          ACPI_TOOLS
+        ACPI_MODULE_NAME    ("dmtables")
+
+
+/* Local prototypes */
+
+static void
+AdCreateTableHeader (
+    char                    *Filename,
+    ACPI_TABLE_HEADER       *Table);
+
+static ACPI_STATUS
+AdStoreTable (
+    ACPI_TABLE_HEADER       *Table,
+    UINT32                  *TableIndex);
+
+
+extern ACPI_TABLE_DESC      LocalTables[1];
+extern ACPI_PARSE_OBJECT    *AcpiGbl_ParseOpRoot;
+
+
+/******************************************************************************
+ *
+ * FUNCTION:    AdDisassemblerHeader
+ *
+ * PARAMETERS:  Filename            - Input file for the table
+ *              TableType           - Either AML or DataTable
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Create the disassembler header, including ACPICA signon with
+ *              current time and date.
+ *
+ *****************************************************************************/
+
+void
+AdDisassemblerHeader (
+    char                    *Filename,
+    UINT8                   TableType)
+{
+    time_t                  Timer;
+
+
+    time (&Timer);
+
+    /* Header and input table info */
+
+    AcpiOsPrintf ("/*\n");
+    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");
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION:    AdCreateTableHeader
+ *
+ * PARAMETERS:  Filename            - Input file for the table
+ *              Table               - Pointer to the raw table
+ *
+ * RETURN:      None
+ *
+ * DESCRIPTION: Create the ASL table header, including ACPICA signon with
+ *              current time and date.
+ *
+ *****************************************************************************/
+
+static void
+AdCreateTableHeader (
+    char                    *Filename,
+    ACPI_TABLE_HEADER       *Table)
+{
+    char                    *NewFilename;
+    UINT8                   Checksum;
+
+
+    /*
+     * Print file header and dump original table header
+     */
+    AdDisassemblerHeader (Filename, ACPI_IS_AML_TABLE);
+
+    AcpiOsPrintf (" * Original Table Header:\n");
+    AcpiOsPrintf (" *     Signature        \"%4.4s\"\n",    Table->Signature);
+    AcpiOsPrintf (" *     Length           0x%8.8X (%u)\n", Table->Length, Table->Length);
+
+    /* Print and validate the revision */
+
+    AcpiOsPrintf (" *     Revision         0x%2.2X",      Table->Revision);
+
+    switch (Table->Revision)
+    {
+    case 0:
+
+        AcpiOsPrintf (" **** Invalid Revision");
+        break;
+
+    case 1:
+
+        /* Revision of DSDT controls the ACPI integer width */
+
+        if (ACPI_COMPARE_NAME (Table->Signature, ACPI_SIG_DSDT))
+        {
+            AcpiOsPrintf (" **** 32-bit table (V1), no 64-bit math support");
+        }
+        break;
+
+    default:
+
+        break;
+    }
+    AcpiOsPrintf ("\n");
+
+    /* Print and validate the table checksum */
+
+    AcpiOsPrintf (" *     Checksum         0x%2.2X",        Table->Checksum);
+
+    Checksum = AcpiTbChecksum (ACPI_CAST_PTR (UINT8, Table), Table->Length);
+    if (Checksum)
+    {
+        AcpiOsPrintf (" **** Incorrect checksum, should be 0x%2.2X",
+            (UINT8) (Table->Checksum - Checksum));
+    }
+
+    AcpiOsPrintf ("\n");
+    AcpiOsPrintf (" *     OEM ID           \"%.6s\"\n",     Table->OemId);
+    AcpiOsPrintf (" *     OEM Table ID     \"%.8s\"\n",     Table->OemTableId);
+    AcpiOsPrintf (" *     OEM Revision     0x%8.8X (%u)\n", Table->OemRevision, Table->OemRevision);
+    AcpiOsPrintf (" *     Compiler ID      \"%.4s\"\n",     Table->AslCompilerId);
+    AcpiOsPrintf (" *     Compiler Version 0x%8.8X (%u)\n", Table->AslCompilerRevision, Table->AslCompilerRevision);
+    AcpiOsPrintf (" */\n");
+
+    /* Create AML output filename based on input filename */
+
+    if (Filename)
+    {
+        NewFilename = FlGenerateFilename (Filename, "aml");
+    }
+    else
+    {
+        NewFilename = UtStringCacheCalloc (9);
+        if (NewFilename)
+        {
+            strncat (NewFilename, Table->Signature, 4);
+            strcat (NewFilename, ".aml");
+        }
+    }
+
+    if (!NewFilename)
+    {
+        AcpiOsPrintf (" **** Could not generate AML output filename\n");
+        return;
+    }
+
+    /* Open the ASL definition block */
+
+    AcpiOsPrintf (
+        "DefinitionBlock (\"%s\", \"%4.4s\", %hu, \"%.6s\", \"%.8s\", 0x%8.8X)\n",
+        NewFilename, Table->Signature, Table->Revision,
+        Table->OemId, Table->OemTableId, Table->OemRevision);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION:    AdDisplayTables
+ *
+ * PARAMETERS:  Filename            - Input file for the table
+ *              Table               - Pointer to the raw table
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Display (disassemble) loaded tables and dump raw tables
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AdDisplayTables (
+    char                    *Filename,
+    ACPI_TABLE_HEADER       *Table)
+{
+
+
+    if (!AcpiGbl_ParseOpRoot)
+    {
+        return (AE_NOT_EXIST);
+    }
+
+    if (!AcpiGbl_DmOpt_Listing)
+    {
+        AdCreateTableHeader (Filename, Table);
+    }
+
+    AcpiDmDisassemble (NULL, AcpiGbl_ParseOpRoot, ACPI_UINT32_MAX);
+    MpEmitMappingInfo ();
+
+    if (AcpiGbl_DmOpt_Listing)
+    {
+        AcpiOsPrintf ("\n\nTable Header:\n");
+        AcpiUtDebugDumpBuffer ((UINT8 *) Table, sizeof (ACPI_TABLE_HEADER),
+            DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
+
+        AcpiOsPrintf ("Table Body (Length 0x%X)\n", Table->Length);
+        AcpiUtDebugDumpBuffer (((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER)),
+            Table->Length, DB_BYTE_DISPLAY, ACPI_UINT32_MAX);
+    }
+
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * 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);
+    Status = AcpiTbValidateTable (TableDesc);
+    return (Status);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION:    AdGetLocalTables
+ *
+ * PARAMETERS:  None
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Get the ACPI tables from either memory or a file
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AdGetLocalTables (
+    void)
+{
+    ACPI_STATUS             Status;
+    ACPI_TABLE_HEADER       TableHeader;
+    ACPI_TABLE_HEADER       *NewTable;
+    UINT32                  TableIndex;
+
+
+    /* Get the DSDT via table override */
+
+    ACPI_MOVE_32_TO_32 (TableHeader.Signature, ACPI_SIG_DSDT);
+    AcpiOsTableOverride (&TableHeader, &NewTable);
+    if (!NewTable)
+    {
+        fprintf (stderr, "Could not obtain DSDT\n");
+        return (AE_NO_ACPI_TABLES);
+    }
+
+    AdWriteTable (NewTable, NewTable->Length,
+        ACPI_SIG_DSDT, NewTable->OemTableId);
+
+    /* Store DSDT in the Table Manager */
+
+    Status = AdStoreTable (NewTable, &TableIndex);
+    if (ACPI_FAILURE (Status))
+    {
+        fprintf (stderr, "Could not store DSDT\n");
+        return (AE_NO_ACPI_TABLES);
+    }
+
+    return (AE_OK);
+}
+
+
+/******************************************************************************
+ *
+ * FUNCTION:    AdParseTable
+ *
+ * PARAMETERS:  Table               - Pointer to the raw table
+ *              OwnerId             - Returned OwnerId of the table
+ *              LoadTable           - If add table to the global table list
+ *              External            - If this is an external table
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Parse an ACPI AML table
+ *
+ *****************************************************************************/
+
+ACPI_STATUS
+AdParseTable (
+    ACPI_TABLE_HEADER       *Table,
+    ACPI_OWNER_ID           *OwnerId,
+    BOOLEAN                 LoadTable,
+    BOOLEAN                 External)
+{
+    ACPI_STATUS             Status = AE_OK;
+    ACPI_WALK_STATE         *WalkState;
+    UINT8                   *AmlStart;
+    UINT32                  AmlLength;
+    UINT32                  TableIndex;
+
+
+    if (!Table)
+    {
+        return (AE_NOT_EXIST);
+    }
+
+    /* Pass 1:  Parse everything except control method bodies */
+
+    fprintf (stderr, "Pass 1 parse of [%4.4s]\n", (char *) Table->Signature);
+
+    AmlLength = Table->Length - sizeof (ACPI_TABLE_HEADER);
+    AmlStart = ((UINT8 *) Table + sizeof (ACPI_TABLE_HEADER));
+
+    /* Create the root object */
+
+    AcpiGbl_ParseOpRoot = AcpiPsCreateScopeOp (AmlStart);
+    if (!AcpiGbl_ParseOpRoot)
+    {
+        return (AE_NO_MEMORY);
+    }
+
+    /* Create and initialize a new walk state */
+
+    WalkState = AcpiDsCreateWalkState (0, AcpiGbl_ParseOpRoot, NULL, NULL);
+    if (!WalkState)
+    {
+        return (AE_NO_MEMORY);
+    }
+
+    Status = AcpiDsInitAmlWalk (WalkState, AcpiGbl_ParseOpRoot,
+        NULL, AmlStart, AmlLength, NULL, ACPI_IMODE_LOAD_PASS1);
+    if (ACPI_FAILURE (Status))
+    {
+        return (Status);
+    }
+
+    WalkState->ParseFlags &= ~ACPI_PARSE_DELETE_TREE;
+    WalkState->ParseFlags |= ACPI_PARSE_DISASSEMBLE;
+
+    Status = AcpiPsParseAml (WalkState);
+    if (ACPI_FAILURE (Status))
+    {
+        return (Status);
+    }
+
+    /* If LoadTable is FALSE, we are parsing the last loaded table */
+
+    TableIndex = AcpiGbl_RootTableList.CurrentTableCount - 1;
+
+    /* Pass 2 */
+
+    if (LoadTable)
+    {
+        Status = AdStoreTable (Table, &TableIndex);
+        if (ACPI_FAILURE (Status))
+        {
+            return (Status);
+        }
+        Status = AcpiTbAllocateOwnerId (TableIndex);
+        if (ACPI_FAILURE (Status))
+        {
+            return (Status);
+        }
+        if (OwnerId)
+        {
+            Status = AcpiTbGetOwnerId (TableIndex, OwnerId);
+            if (ACPI_FAILURE (Status))
+            {
+                return (Status);
+            }
+        }
+    }
+
+    fprintf (stderr, "Pass 2 parse of [%4.4s]\n", (char *) Table->Signature);
+
+    Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS2, TableIndex, NULL);
+    if (ACPI_FAILURE (Status))
+    {
+        return (Status);
+    }
+
+    /* No need to parse control methods of external table */
+
+    if (External)
+    {
+        return (AE_OK);
+    }
+
+    /*
+     * Pass 3: Parse control methods and link their parse trees
+     * into the main parse tree
+     */
+    fprintf (stderr,
+        "Parsing Deferred Opcodes (Methods/Buffers/Packages/Regions)\n");
+
+    Status = AcpiDmParseDeferredOps (AcpiGbl_ParseOpRoot);
+    fprintf (stderr, "\n");
+
+    /* Process Resource Templates */
+
+    AcpiDmFindResources (AcpiGbl_ParseOpRoot);
+
+    fprintf (stderr, "Parsing completed\n");
+    return (AE_OK);
+}
--- a/sys/external/bsd/acpica/dist/common/getopt.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/common/getopt.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -47,6 +47,7 @@
  * Option strings:
  *    "f"       - Option has no arguments
  *    "f:"      - Option requires an argument
+ *    "f+"      - Option has an optional argument
  *    "f^"      - Option has optional single-char sub-options
  *    "f|"      - Option has required single-char sub-options
  */
@@ -90,6 +91,7 @@
     int                     argc,
     char                    **argv)
 {
+
     AcpiGbl_Optind--;
     CurrentCharPtr++;
 
@@ -182,7 +184,8 @@
         }
         else if (++AcpiGbl_Optind >= argc)
         {
-            ACPI_OPTION_ERROR ("Option requires an argument: -", CurrentChar);
+            ACPI_OPTION_ERROR (
+                "Option requires an argument: -", CurrentChar);
 
             CurrentCharPtr = 1;
             return ('?');
@@ -243,7 +246,9 @@
         }
         else
         {
-            ACPI_OPTION_ERROR ("Option requires a single-character suboption: -", CurrentChar);
+            ACPI_OPTION_ERROR (
+                "Option requires a single-character suboption: -",
+                CurrentChar);
 
             CurrentCharPtr = 1;
             return ('?');
--- a/sys/external/bsd/acpica/dist/compiler/aslascii.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslascii.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -42,6 +42,7 @@
  */
 
 #include "aslcompiler.h"
+#include <actables.h>
 #include <acapps.h>
 
 #define _COMPONENT          ACPI_COMPILER
@@ -63,90 +64,7 @@
 
 /*******************************************************************************
  *
- * FUNCTION:    FlCheckForAcpiTable
- *
- * PARAMETERS:  Handle              - Open input file
- *
- * RETURN:      Status
- *
- * DESCRIPTION: Determine if a file seems to be a binary ACPI table, via the
- *              following checks on what would be the table header:
- *              0) File must be at least as long as an ACPI_TABLE_HEADER
- *              1) The header length field must match the file size
- *              2) Signature, OemId, OemTableId, AslCompilerId must be ASCII
- *
- ******************************************************************************/
-
-ACPI_STATUS
-FlCheckForAcpiTable (
-    FILE                    *Handle)
-{
-    ACPI_TABLE_HEADER       Table;
-    UINT32                  FileSize;
-    size_t                  Actual;
-    UINT32                  i;
-
-
-    /* Read a potential table header */
-
-    Actual = fread (&Table, 1, sizeof (ACPI_TABLE_HEADER), Handle);
-    fseek (Handle, 0, SEEK_SET);
-
-    if (Actual < sizeof (ACPI_TABLE_HEADER))
-    {
-        return (AE_ERROR);
-    }
-
-    /* Header length field must match the file size */
-
-    FileSize = CmGetFileSize (Handle);
-    if (Table.Length != FileSize)
-    {
-        return (AE_ERROR);
-    }
-
-    /*
-     * These fields must be ASCII:
-     * Signature, OemId, OemTableId, AslCompilerId.
-     * We allow a NULL terminator in OemId and OemTableId.
-     */
-    for (i = 0; i < ACPI_NAME_SIZE; i++)
-    {
-        if (!ACPI_IS_ASCII ((UINT8) Table.Signature[i]))
-        {
-            return (AE_ERROR);
-        }
-
-        if (!ACPI_IS_ASCII ((UINT8) Table.AslCompilerId[i]))
-        {
-            return (AE_ERROR);
-        }
-    }
-
-    for (i = 0; (i < ACPI_OEM_ID_SIZE) && (Table.OemId[i]); i++)
-    {
-        if (!ACPI_IS_ASCII ((UINT8) Table.OemId[i]))
-        {
-            return (AE_ERROR);
-        }
-    }
-
-    for (i = 0; (i < ACPI_OEM_TABLE_ID_SIZE) && (Table.OemTableId[i]); i++)
-    {
-        if (!ACPI_IS_ASCII ((UINT8) Table.OemTableId[i]))
-        {
-            return (AE_ERROR);
-        }
-    }
-
-    printf ("Binary file appears to be a valid ACPI table, disassembling\n");
-    return (AE_OK);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    FlCheckForAscii
+ * FUNCTION:    FlIsFileAsciiSource
  *
  * PARAMETERS:  Filename            - Full input filename
  *              DisplayErrors       - TRUE if error messages desired
@@ -163,7 +81,7 @@
  ******************************************************************************/
 
 ACPI_STATUS
-FlCheckForAscii (
+FlIsFileAsciiSource (
     char                    *Filename,
     BOOLEAN                 DisplayErrors)
 {
--- a/sys/external/bsd/acpica/dist/compiler/aslbtypes.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslbtypes.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -78,7 +78,6 @@
 
     switch (ArgType)
     {
-
     /* Simple types */
 
     case ARGI_ANYTYPE:
@@ -100,9 +99,10 @@
     case ARGI_DDBHANDLE:
         /*
          * DDBHandleObject := SuperName
-         * ACPI_BTYPE_REFERENCE: Index reference as parameter of Load/Unload
+         * ACPI_BTYPE_REFERENCE_OBJECT:
+         *      Index reference as parameter of Load/Unload
          */
-        return (ACPI_BTYPE_DDB_HANDLE | ACPI_BTYPE_REFERENCE);
+        return (ACPI_BTYPE_DDB_HANDLE | ACPI_BTYPE_REFERENCE_OBJECT);
 
     /* Interchangeable types */
     /*
@@ -133,9 +133,24 @@
 
     case ARGI_REFERENCE:
 
-        return (ACPI_BTYPE_REFERENCE);
+        return (ACPI_BTYPE_NAMED_REFERENCE); /* Name or Namestring */
 
     case ARGI_TARGETREF:
+
+        /*
+         * Target operand for most math and logic operators.
+         * Package objects not allowed as target.
+         */
+        return (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_DEBUG_OBJECT |
+            ACPI_BTYPE_REFERENCE_OBJECT);
+
+    case ARGI_STORE_TARGET:
+
+        /* Special target for Store(), includes packages */
+
+        return (ACPI_BTYPE_DATA | ACPI_BTYPE_DEBUG_OBJECT |
+            ACPI_BTYPE_REFERENCE_OBJECT);
+
     case ARGI_FIXED_TARGET:
     case ARGI_SIMPLE_TARGET:
 
@@ -149,28 +164,33 @@
          * Used only by SizeOf operator
          */
         return (ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER |
-            ACPI_BTYPE_PACKAGE | ACPI_BTYPE_REFERENCE);
+            ACPI_BTYPE_PACKAGE | ACPI_BTYPE_REFERENCE_OBJECT);
 
     case ARGI_COMPLEXOBJ:
 
         /* Buffer, String, or package */
 
-        return (ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER | ACPI_BTYPE_PACKAGE);
+        return (ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER |
+            ACPI_BTYPE_PACKAGE);
 
     case ARGI_REF_OR_STRING:
 
-        return (ACPI_BTYPE_STRING | ACPI_BTYPE_REFERENCE);
+        /* Used by DeRefOf operator only */
+
+        return (ACPI_BTYPE_STRING | ACPI_BTYPE_REFERENCE_OBJECT);
 
     case ARGI_REGION_OR_BUFFER:
 
         /* Used by Load() only. Allow buffers in addition to regions/fields */
 
-        return (ACPI_BTYPE_REGION | ACPI_BTYPE_BUFFER | ACPI_BTYPE_FIELD_UNIT);
+        return (ACPI_BTYPE_REGION | ACPI_BTYPE_BUFFER |
+            ACPI_BTYPE_FIELD_UNIT);
 
     case ARGI_DATAREFOBJ:
 
-        return (ACPI_BTYPE_INTEGER |ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER |
-            ACPI_BTYPE_PACKAGE | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE);
+        /* Used by Store() only, as the source operand */
+
+        return (ACPI_BTYPE_DATA_REFERENCE | ACPI_BTYPE_REFERENCE_OBJECT);
 
     default:
 
@@ -200,7 +220,6 @@
     UINT32                  Etype)
 {
 
-
     if (Etype == ACPI_TYPE_ANY)
     {
         return (ACPI_BTYPE_OBJECTS_AND_REFS);
@@ -274,7 +293,7 @@
     case ACPI_TYPE_LOCAL_RESOURCE:
     case ACPI_TYPE_LOCAL_RESOURCE_FIELD:
 
-        return (ACPI_BTYPE_REFERENCE);
+        return (ACPI_BTYPE_REFERENCE_OBJECT);
 
     default:
 
@@ -307,7 +326,6 @@
 
 
     *Buffer = 0;
-
     if (Btype == 0)
     {
         strcat (Buffer, "NoReturnValue");
@@ -322,6 +340,7 @@
             {
                 strcat (Buffer, "|");
             }
+
             First = FALSE;
             strcat (Buffer, AcpiUtGetTypeName (Type));
         }
@@ -334,6 +353,7 @@
         {
             strcat (Buffer, "|");
         }
+
         First = FALSE;
         strcat (Buffer, "Reference");
     }
@@ -345,6 +365,7 @@
         {
             strcat (Buffer, "|");
         }
+
         First = FALSE;
         strcat (Buffer, "Resource");
     }
@@ -388,7 +409,8 @@
         if (!Node)
         {
             DbgPrint (ASL_DEBUG_OUTPUT,
-                "No attached Nsnode: [%s] at line %u name [%s], ignoring typecheck\n",
+                "No attached Nsnode: [%s] at line %u name [%s], "
+                "ignoring typecheck\n",
                 Op->Asl.ParseOpName, Op->Asl.LineNumber,
                 Op->Asl.ExternalName);
             return (ACPI_UINT32_MAX);
@@ -401,12 +423,6 @@
                 "could not map type");
         }
 
-        /*
-         * Since it was a named reference, enable the
-         * reference bit also
-         */
-        ThisNodeBtype |= ACPI_BTYPE_REFERENCE;
-
         if (Op->Asl.ParseOpcode == PARSEOP_METHODCALL)
         {
             ReferencedNode = Node->Op;
--- a/sys/external/bsd/acpica/dist/compiler/aslcodegen.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcodegen.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -168,28 +168,28 @@
     }
 
     DbgPrint (ASL_TREE_OUTPUT,
-    "%08X %04X %04X %01X     %04X  %04X %04X   %04X    "
-    "%08X %08X %08X %08X %08X %08X %04X  %02d  %02d   %02d   %02d   %02d\n",
-            /* 1  */ (UINT32) Op->Asl.Value.Integer,
-            /* 2  */ Op->Asl.ParseOpcode,
-            /* 3  */ Op->Asl.AmlOpcode,
-            /* 4  */ Op->Asl.AmlOpcodeLength,
-            /* 5  */ Op->Asl.AmlPkgLenBytes,
-            /* 6  */ Op->Asl.AmlLength,
-            /* 7  */ Op->Asl.AmlSubtreeLength,
-            /* 8  */ Op->Asl.Parent ? Op->Asl.Parent->Asl.AmlSubtreeLength : 0,
-            /* 9  */ Op,
-            /* 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,
-            /* 18 */ Op->Asl.EndLine,
-            /* 19 */ Op->Asl.LogicalLineNumber,
-            /* 20 */ Op->Asl.EndLogicalLine);
+        "%08X %04X %04X %01X     %04X  %04X %04X   %04X    "
+        "%08X %08X %08X %08X %08X %08X %04X  %02d  %02d   %02d   %02d   %02d\n",
+        /* 1  */ (UINT32) Op->Asl.Value.Integer,
+        /* 2  */ Op->Asl.ParseOpcode,
+        /* 3  */ Op->Asl.AmlOpcode,
+        /* 4  */ Op->Asl.AmlOpcodeLength,
+        /* 5  */ Op->Asl.AmlPkgLenBytes,
+        /* 6  */ Op->Asl.AmlLength,
+        /* 7  */ Op->Asl.AmlSubtreeLength,
+        /* 8  */ Op->Asl.Parent ? Op->Asl.Parent->Asl.AmlSubtreeLength : 0,
+        /* 9  */ Op,
+        /* 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,
+        /* 18 */ Op->Asl.EndLine,
+        /* 19 */ Op->Asl.LogicalLineNumber,
+        /* 20 */ Op->Asl.EndLogicalLine);
 
     /* Generate the AML for this node */
 
@@ -274,7 +274,8 @@
         /* These opcodes should not get here */
 
         printf ("Found a node with an unassigned AML opcode\n");
-        FlPrintFile (ASL_FILE_STDERR, "Found a node with an unassigned AML opcode\n");
+        FlPrintFile (ASL_FILE_STDERR,
+            "Found a node with an unassigned AML opcode\n");
         return;
 
     case AML_INT_RESERVEDFIELD_OP:
@@ -357,8 +358,10 @@
              */
             PkgLen.Len >>= 4;
 
-            /* Now we can write the remaining bytes - either 1, 2, or 3 bytes */
-
+            /*
+             * Now we can write the remaining bytes -
+             * either 1, 2, or 3 bytes
+             */
             for (i = 0; i < (UINT32) (Op->Asl.AmlPkgLenBytes - 1); i++)
             {
                 CgLocalWriteAmlData (Op, &PkgLen.LenBytes[i], 1);
@@ -467,10 +470,68 @@
 
     /* Table length. Checksum zero for now, will rewrite later */
 
-    TableHeader.Length   = Gbl_TableLength;
+    TableHeader.Length = sizeof (ACPI_TABLE_HEADER) +
+        Op->Asl.AmlSubtreeLength;
     TableHeader.Checksum = 0;
 
+    Op->Asl.FinalAmlOffset = ftell (Gbl_Files[ASL_FILE_AML_OUTPUT].Handle);
+
+    /* Write entire header and clear the table header global */
+
     CgLocalWriteAmlData (Op, &TableHeader, sizeof (ACPI_TABLE_HEADER));
+    memset (&TableHeader, 0, sizeof (ACPI_TABLE_HEADER));
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    CgUpdateHeader
+ *
+ * PARAMETERS:  Op                  - Op for the Definition Block
+ *
+ * RETURN:      None.
+ *
+ * DESCRIPTION: Complete the ACPI table by calculating the checksum and
+ *              re-writing the header for the input definition block
+ *
+ ******************************************************************************/
+
+static void
+CgUpdateHeader (
+    ACPI_PARSE_OBJECT   *Op)
+{
+    signed char         Sum;
+    UINT32              i;
+    UINT32              Length;
+    UINT8               FileByte;
+    UINT8               Checksum;
+
+
+    /* Calculate the checksum over the entire definition block */
+
+    Sum = 0;
+    Length = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
+    FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset);
+
+    for (i = 0; i < Length; i++)
+    {
+        if (FlReadFile (ASL_FILE_AML_OUTPUT, &FileByte, 1) != AE_OK)
+        {
+            printf ("EOF while reading checksum bytes\n");
+            return;
+        }
+
+        Sum = (signed char) (Sum + FileByte);
+    }
+
+    Checksum = (UINT8) (0 - Sum);
+
+    /* Re-write the the checksum byte */
+
+    FlSeekFile (ASL_FILE_AML_OUTPUT, Op->Asl.FinalAmlOffset +
+        ACPI_OFFSET (ACPI_TABLE_HEADER, Checksum));
+
+    FlWriteFile (ASL_FILE_AML_OUTPUT, &Checksum, 1);
 }
 
 
@@ -483,7 +544,8 @@
  * RETURN:      None.
  *
  * DESCRIPTION: Complete the ACPI table by calculating the checksum and
- *              re-writing the header.
+ *              re-writing each table header. This allows support for
+ *              multiple definition blocks in a single source file.
  *
  ******************************************************************************/
 
@@ -491,26 +553,17 @@
 CgCloseTable (
     void)
 {
-    signed char         Sum;
-    UINT8               FileByte;
+    ACPI_PARSE_OBJECT   *Op;
 
 
-    FlSeekFile (ASL_FILE_AML_OUTPUT, 0);
-    Sum = 0;
+    /* Process all definition blocks */
 
-    /* Calculate the checksum over the entire file */
-
-    while (FlReadFile (ASL_FILE_AML_OUTPUT, &FileByte, 1) == AE_OK)
+    Op = RootNode->Asl.Child;
+    while (Op)
     {
-        Sum = (signed char) (Sum + FileByte);
+        CgUpdateHeader (Op);
+        Op = Op->Asl.Next;
     }
-
-    /* Re-write the table header with the checksum */
-
-    TableHeader.Checksum = (UINT8) (0 - Sum);
-
-    FlSeekFile (ASL_FILE_AML_OUTPUT, 0);
-    CgLocalWriteAmlData (NULL, &TableHeader, sizeof (ACPI_TABLE_HEADER));
 }
 
 
@@ -586,7 +639,7 @@
 
         break;
 
-    case PARSEOP_DEFINITIONBLOCK:
+    case PARSEOP_DEFINITION_BLOCK:
 
         CgWriteTableHeader (Op);
         break;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslcstyle.y	Sat Jan 09 19:54:49 2016 +0000
@@ -0,0 +1,209 @@
+NoEcho('
+/******************************************************************************
+ *
+ * Module Name: aslcstyle.y - Production rules for symbolic operators
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2016, 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.
+ */
+
+')
+
+/*******************************************************************************
+ *
+ * Production rules for the symbolic (c-style) operators
+ *
+ ******************************************************************************/
+
+/*
+ * 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;}
+
+        /* Index term -- "= BUF1[5]" on right-hand side of an equals (source) */
+
+    | SuperName PARSEOP_EXP_INDEX_LEFT TermArg PARSEOP_EXP_INDEX_RIGHT
+                                        {$$ = TrCreateLeafNode (PARSEOP_INDEX);
+                                        TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());}
+    ;
+
+        /* Index term -- "BUF1[5] = " on left-hand side of an equals (target) */
+
+IndexExpTerm
+
+    : SuperName PARSEOP_EXP_INDEX_LEFT TermArg PARSEOP_EXP_INDEX_RIGHT
+                                        {$$ = TrCreateLeafNode (PARSEOP_INDEX);
+                                        TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());}
+    ;
+
+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));}
+    ;
--- a/sys/external/bsd/acpica/dist/compiler/asldefine.h	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asldefine.h	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -104,32 +104,12 @@
 #define AML_DEFAULT_ARG_OP          (UINT16) 0xDDDD
 
 
-/* filename suffixes for output files */
-
-#define FILE_SUFFIX_PREPROC_USER    "i  "
-#define FILE_SUFFIX_PREPROCESSOR    "pre"
-#define FILE_SUFFIX_AML_CODE        "aml"
-#define FILE_SUFFIX_MAP             "map"
-#define FILE_SUFFIX_LISTING         "lst"
-#define FILE_SUFFIX_HEX_DUMP        "hex"
-#define FILE_SUFFIX_DEBUG           "txt"
-#define FILE_SUFFIX_SOURCE          "src"
-#define FILE_SUFFIX_NAMESPACE       "nsp"
-#define FILE_SUFFIX_ASM_SOURCE      "asm"
-#define FILE_SUFFIX_C_SOURCE        "c"
-#define FILE_SUFFIX_DISASSEMBLY     "dsl"
-#define FILE_SUFFIX_ASM_INCLUDE     "inc"
-#define FILE_SUFFIX_C_INCLUDE       "h"
-#define FILE_SUFFIX_ASL_CODE        "asl"
-#define FILE_SUFFIX_C_OFFSET        "offset.h"
-
-
 /* Types for input files */
 
-#define ASL_INPUT_TYPE_BINARY       0
-#define ASL_INPUT_TYPE_ACPI_TABLE   1
-#define ASL_INPUT_TYPE_ASCII_ASL    2
-#define ASL_INPUT_TYPE_ASCII_DATA   3
+#define ASL_INPUT_TYPE_BINARY               0
+#define ASL_INPUT_TYPE_BINARY_ACPI_TABLE    1
+#define ASL_INPUT_TYPE_ASCII_ASL            2
+#define ASL_INPUT_TYPE_ASCII_DATA           3
 
 
 /* Misc */
--- a/sys/external/bsd/acpica/dist/compiler/aslfold.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslfold.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -100,7 +100,7 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Reduce an Op and its subtree to a constant if possible
+ * DESCRIPTION: Reduce an Op and its subtree to a constant if possible.
  *
  ******************************************************************************/
 
@@ -206,7 +206,8 @@
  *
  * RETURN:      Status
  *
- * DESCRIPTION: Check one Op for a type 3/4/5 AML opcode
+ * DESCRIPTION: Check one Op for a reducible type 3/4/5 AML opcode.
+ *              This is performed via a downward walk of the parse subtree.
  *
  ******************************************************************************/
 
@@ -218,6 +219,8 @@
 {
     ACPI_WALK_STATE         *WalkState = Context;
     ACPI_STATUS             Status = AE_OK;
+    ACPI_PARSE_OBJECT       *NextOp;
+    const ACPI_OPCODE_INFO  *OpInfo;
 
 
     WalkState->Op = Op;
@@ -228,21 +231,6 @@
         Op->Asl.LogicalLineNumber, Op->Asl.ParseOpName);
 
     /*
-     * 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)
-    {
-        DbgPrint (ASL_PARSE_OUTPUT,
-            "\nBuffer+Buffer->Buffer constant reduction is not supported yet");
-        Status = AE_TYPE;
-        goto CleanupAndExit;
-    }
-
-    /*
      * These opcodes do not appear in the OpcodeInfo table, but
      * they represent constants, so abort the constant walk now.
      */
@@ -256,11 +244,95 @@
         goto CleanupAndExit;
     }
 
+    /*
+     * Search upwards for a possible Name() operator. This is done
+     * because a type 3/4/5 opcode within a Name() expression
+     * MUST be reduced to a simple constant.
+     */
+    NextOp = Op->Asl.Parent;
+    while (NextOp)
+    {
+        /* Finished if we find a Name() opcode */
+
+        if (NextOp->Asl.AmlOpcode == AML_NAME_OP)
+        {
+            break;
+        }
+
+        /*
+         * Any "deferred" opcodes contain one or more TermArg parameters,
+         * and thus are not required to be folded to constants at compile
+         * time. This affects things like Buffer() and Package() objects.
+         * We just ignore them here. However, any sub-expressions can and
+         * will still be typechecked. Note: These are called the
+         * "deferred" opcodes in the AML interpreter.
+         */
+        OpInfo = AcpiPsGetOpcodeInfo (NextOp->Common.AmlOpcode);
+        if (OpInfo->Flags & AML_DEFER)
+        {
+            NextOp = NULL;
+            break;
+        }
+
+        NextOp = NextOp->Asl.Parent;
+    }
+
     /* 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 */
+        /*
+         * From the ACPI specification:
+         *
+         * "The Type 3/4/5 opcodes return a value and can be used in an
+         * expression that evaluates to a constant. These opcodes may be
+         * evaluated at ASL compile-time. To ensure that these opcodes
+         * will evaluate to a constant, the following rules apply: The
+         * term cannot have a destination (target) operand, and must have
+         * either a Type3Opcode, Type4Opcode, Type5Opcode, ConstExprTerm,
+         * Integer, BufferTerm, Package, or String for all arguments."
+         */
+
+        /*
+         * The value (second) operand for the Name() operator MUST
+         * reduce to a single constant, as per the ACPI specification
+         * (the operand is a DataObject). This also implies that there
+         * can be no target operand. Name() is the only ASL operator
+         * with a "DataObject" as an operand and is thus special-
+         * cased here.
+         */
+        if (NextOp) /* Inspect a Name() operator */
+        {
+            /* Error if there is a target operand */
+
+            if (Op->Asl.CompileFlags & NODE_IS_TARGET)
+            {
+                AslError (ASL_ERROR, ASL_MSG_INVALID_TARGET, Op, NULL);
+                Status = AE_TYPE;
+            }
+
+            /* Error if expression cannot be reduced (folded) */
+
+            if (!(NextOp->Asl.CompileFlags & NODE_COULD_NOT_REDUCE))
+            {
+                /* Ensure only one error message per statement */
+
+                NextOp->Asl.CompileFlags |= NODE_COULD_NOT_REDUCE;
+                DbgPrint (ASL_PARSE_OUTPUT,
+                    "**** Could not reduce operands for NAME opcode ****\n");
+
+                AslError (ASL_ERROR, ASL_MSG_CONSTANT_REQUIRED, Op,
+                    "Constant is required for Name operator");
+                Status = AE_TYPE;
+            }
+        }
+
+        if (ACPI_FAILURE (Status))
+        {
+            goto CleanupAndExit;
+        }
+
+        /* This is not a 3/4/5 opcode, but maybe can convert to STORE */
 
         if (Op->Asl.CompileFlags & NODE_IS_TARGET)
         {
@@ -272,13 +344,36 @@
         /* Expression cannot be reduced */
 
         DbgPrint (ASL_PARSE_OUTPUT,
-            "**** Not a Type 3/4/5 opcode (%s) ****",
+            "**** Not a Type 3/4/5 opcode or cannot reduce/fold (%s) ****\n",
              Op->Asl.ParseOpName);
 
         Status = AE_TYPE;
         goto CleanupAndExit;
     }
 
+    /*
+     * 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)
+    {
+        DbgPrint (ASL_PARSE_OUTPUT,
+            "\nBuffer constant reduction is not supported yet\n");
+
+        if (NextOp) /* Found a Name() operator, error */
+        {
+            AslError (ASL_ERROR, ASL_MSG_UNSUPPORTED, Op,
+                "Buffer expression cannot be reduced");
+        }
+
+        Status = AE_TYPE;
+        goto CleanupAndExit;
+    }
+
+
     /* Debug output */
 
     DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345");
@@ -294,6 +389,7 @@
             DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " VALID TARGET");
         }
     }
+
     if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG)
     {
         DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " TERMARG");
--- a/sys/external/bsd/acpica/dist/compiler/aslglobal.h	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslglobal.h	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -177,6 +177,8 @@
 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);
+ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_DoTypechecking, TRUE);
+ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_EnableReferenceTypechecking, FALSE);
 
 
 #define HEX_OUTPUT_NONE             0
@@ -195,6 +197,7 @@
 ASL_EXTERN ASL_INCLUDE_DIR          ASL_INIT_GLOBAL (*Gbl_IncludeDirList, NULL);
 ASL_EXTERN char                     *Gbl_CurrentInputFilename;
 ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_ExternalRefFilename, NULL);
+ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_PreviousIncludeFilename, NULL);
 
 ASL_EXTERN BOOLEAN                  ASL_INIT_GLOBAL (Gbl_HasIncludeFiles, FALSE);
 
@@ -244,7 +247,6 @@
 ASL_EXTERN ACPI_PARSE_OBJECT        *Gbl_FirstLevelInsertionNode;
 ASL_EXTERN UINT8                    ASL_INIT_GLOBAL (Gbl_FileType, 0);
 ASL_EXTERN char                     ASL_INIT_GLOBAL (*Gbl_Signature, NULL);
-ASL_EXTERN char                     *Gbl_TemplateSignature;
 
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_CurrentHexColumn, 0);
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_CurrentAmlOffset, 0);
--- a/sys/external/bsd/acpica/dist/compiler/aslhex.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslhex.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -50,7 +50,6 @@
  * This module emits ASCII hex output files in either C, ASM, or ASL format
  */
 
-
 /* Local prototypes */
 
 static void
@@ -223,6 +222,7 @@
 
         FlPrintFile (ASL_FILE_HEX_OUTPUT, "  /* %8.8X", Offset);
         LsDumpAsciiInComment (ASL_FILE_HEX_OUTPUT, LineLength, FileData);
+
         FlPrintFile (ASL_FILE_HEX_OUTPUT, "%*s*/\n",
             HEX_TABLE_LINE_SIZE - LineLength + 1, " ");
 
@@ -310,6 +310,7 @@
 
         FlPrintFile (ASL_FILE_HEX_OUTPUT, "  /* %8.8X", Offset);
         LsDumpAsciiInComment (ASL_FILE_HEX_OUTPUT, LineLength, FileData);
+
         FlPrintFile (ASL_FILE_HEX_OUTPUT, "%*s*/\n",
             HEX_TABLE_LINE_SIZE - LineLength + 1, " ");
 
@@ -393,6 +394,7 @@
 
         FlPrintFile (ASL_FILE_HEX_OUTPUT, "  ; %8.8X", Offset);
         LsDumpAsciiInComment (ASL_FILE_HEX_OUTPUT, LineLength, FileData);
+
         FlPrintFile (ASL_FILE_HEX_OUTPUT, "\n");
 
         Offset += LineLength;
--- a/sys/external/bsd/acpica/dist/compiler/asllength.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asllength.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -132,10 +132,11 @@
     if ((Op->Asl.Parent) &&
         (Op->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG))
     {
-        Op->Asl.Parent->Asl.AmlSubtreeLength += (Op->Asl.AmlLength +
-                                           Op->Asl.AmlOpcodeLength +
-                                           Op->Asl.AmlPkgLenBytes +
-                                           Op->Asl.AmlSubtreeLength);
+        Op->Asl.Parent->Asl.AmlSubtreeLength += (
+            Op->Asl.AmlLength +
+            Op->Asl.AmlOpcodeLength +
+            Op->Asl.AmlPkgLenBytes +
+            Op->Asl.AmlSubtreeLength);
     }
     return (AE_OK);
 }
@@ -229,7 +230,7 @@
     if (Op->Asl.CompileFlags & NODE_AML_PACKAGE)
     {
         Op->Asl.AmlPkgLenBytes = CgGetPackageLenByteCount (
-                                    Op, Op->Asl.AmlSubtreeLength);
+            Op, Op->Asl.AmlSubtreeLength);
     }
 
     /* Data opcode lengths are easy */
@@ -332,10 +333,9 @@
 
     switch (Op->Asl.ParseOpcode)
     {
-    case PARSEOP_DEFINITIONBLOCK:
+    case PARSEOP_DEFINITION_BLOCK:
 
-        Gbl_TableLength = sizeof (ACPI_TABLE_HEADER) +
-                            Op->Asl.AmlSubtreeLength;
+        Gbl_TableLength = sizeof (ACPI_TABLE_HEADER) + Op->Asl.AmlSubtreeLength;
         break;
 
     case PARSEOP_NAMESEG:
@@ -365,7 +365,6 @@
         Op->Asl.ExternalName = Op->Asl.Value.String;
         Op->Asl.Value.String = Buffer;
         Op->Asl.CompileFlags |= NODE_NAME_INTERNALIZED;
-
         Op->Asl.AmlLength = strlen (Buffer);
 
         /*
@@ -391,7 +390,7 @@
 
         Op->Asl.AmlOpcodeLength = 0;
         Op->Asl.AmlPkgLenBytes = CgGetPackageLenByteCount (Op,
-                                    (UINT32) Op->Asl.Value.Integer);
+            (UINT32) Op->Asl.Value.Integer);
         break;
 
     case PARSEOP_RAW_DATA:
--- a/sys/external/bsd/acpica/dist/compiler/asllisting.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asllisting.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -212,6 +212,12 @@
         return (AE_OK);
     }
 
+    if ((FileId == ASL_FILE_ASM_INCLUDE_OUTPUT) ||
+        (FileId == ASL_FILE_C_INCLUDE_OUTPUT))
+    {
+        return (AE_OK);
+    }
+
     /* Write the hex bytes to the listing file(s) (if requested) */
 
     for (i = 0; i < Op->Asl.FinalAmlLength; i++)
@@ -221,6 +227,7 @@
             FlFileError (ASL_FILE_AML_OUTPUT, ASL_MSG_READ);
             AslAbort ();
         }
+
         LsWriteListingHexBytes (&FileByte, 1, FileId);
     }
 
@@ -270,6 +277,34 @@
 
     UtPrintFormattedName (Op->Asl.ParseOpcode, Level);
 
+    if (Op->Asl.ParseOpcode == PARSEOP_NAMESEG)
+    {
+        DbgPrint (ASL_TREE_OUTPUT,
+            "%10.4s      ", Op->Asl.Value.Name);
+    }
+    else if ((Op->Asl.ParseOpcode == PARSEOP_NAMESTRING) ||
+        (Op->Asl.ParseOpcode == PARSEOP_METHODCALL))
+    {
+        DbgPrint (ASL_TREE_OUTPUT,
+            "%10.32s      ", Op->Asl.Value.String);
+    }
+    else if (Op->Asl.ParseOpcode == PARSEOP_INCLUDE)
+    {
+        DbgPrint (ASL_TREE_OUTPUT,
+            "Open: %s\n", Op->Asl.Value.String);
+        return (AE_OK);
+    }
+    else if (Op->Asl.ParseOpcode == PARSEOP_INCLUDE_END)
+    {
+        DbgPrint (ASL_TREE_OUTPUT,
+            "Close: %s\n", Op->Asl.Filename);
+        return (AE_OK);
+    }
+    else
+    {
+        DbgPrint (ASL_TREE_OUTPUT, "                ");
+    }
+
     DbgPrint (ASL_TREE_OUTPUT, "    (%.4X) Flags %8.8X",
         Op->Asl.ParseOpcode, Op->Asl.CompileFlags);
     TrPrintNodeCompileFlags (Op->Asl.CompileFlags);
@@ -316,7 +351,7 @@
     {
         switch (Op->Asl.ParseOpcode)
         {
-        case PARSEOP_DEFINITIONBLOCK:
+        case PARSEOP_DEFINITION_BLOCK:
         case PARSEOP_METHODCALL:
         case PARSEOP_INCLUDE:
         case PARSEOP_INCLUDE_END:
@@ -362,36 +397,46 @@
 
     switch (Op->Asl.ParseOpcode)
     {
-    case PARSEOP_DEFINITIONBLOCK:
+    case PARSEOP_DEFINITION_BLOCK:
 
         LsWriteSourceLines (Op->Asl.EndLine, Op->Asl.EndLogicalLine, FileId);
 
         /* Use the table Signature and TableId to build a unique name */
 
-        if (FileId == ASL_FILE_ASM_SOURCE_OUTPUT)
+        switch (FileId)
         {
+        case ASL_FILE_ASM_SOURCE_OUTPUT:
+
             FlPrintFile (FileId,
                 "%s_%s_Header \\\n",
                 Gbl_TableSignature, Gbl_TableId);
-        }
-        if (FileId == ASL_FILE_C_SOURCE_OUTPUT)
-        {
+            break;
+
+        case ASL_FILE_C_SOURCE_OUTPUT:
+
             FlPrintFile (FileId,
                 "    unsigned char    %s_%s_Header [] =\n    {\n",
                 Gbl_TableSignature, Gbl_TableId);
-        }
-        if (FileId == ASL_FILE_ASM_INCLUDE_OUTPUT)
-        {
+            break;
+
+        case ASL_FILE_ASM_INCLUDE_OUTPUT:
+
             FlPrintFile (FileId,
                 "extrn %s_%s_Header : byte\n",
                 Gbl_TableSignature, Gbl_TableId);
-        }
-        if (FileId == ASL_FILE_C_INCLUDE_OUTPUT)
-        {
+            break;
+
+        case ASL_FILE_C_INCLUDE_OUTPUT:
+
             FlPrintFile (FileId,
                 "extern unsigned char    %s_%s_Header [];\n",
                 Gbl_TableSignature, Gbl_TableId);
+            break;
+
+        default:
+            break;
         }
+
         return;
 
 
@@ -411,7 +456,7 @@
 
         /* Create a new listing node and push it */
 
-        LsPushNode (Op->Asl.Child->Asl.Value.String);
+        LsPushNode (Op->Asl.Value.String);
         return;
 
 
@@ -540,31 +585,41 @@
 
                         /* Create the appropriate symbol in the output file */
 
-                        if (FileId == ASL_FILE_ASM_SOURCE_OUTPUT)
+                        switch (FileId)
                         {
+                        case ASL_FILE_ASM_SOURCE_OUTPUT:
+
                             FlPrintFile (FileId,
                                 "%s_%s_%s  \\\n",
                                 Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
-                        }
-                        if (FileId == ASL_FILE_C_SOURCE_OUTPUT)
-                        {
+                            break;
+
+                        case ASL_FILE_C_SOURCE_OUTPUT:
+
                             FlPrintFile (FileId,
                                 "    unsigned char    %s_%s_%s [] =\n    {\n",
                                 Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
-                        }
-                        if (FileId == ASL_FILE_ASM_INCLUDE_OUTPUT)
-                        {
+                            break;
+
+                        case ASL_FILE_ASM_INCLUDE_OUTPUT:
+
                             FlPrintFile (FileId,
                                 "extrn %s_%s_%s : byte\n",
                                 Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
-                        }
-                        if (FileId == ASL_FILE_C_INCLUDE_OUTPUT)
-                        {
+                            break;
+
+                        case ASL_FILE_C_INCLUDE_OUTPUT:
+
                             FlPrintFile (FileId,
                                 "extern unsigned char    %s_%s_%s [];\n",
                                 Gbl_TableSignature, Gbl_TableId, &Pathname[1]);
+                            break;
+
+                        default:
+                            break;
                         }
                     }
+
                     ACPI_FREE (Pathname);
                 }
                 break;
--- a/sys/external/bsd/acpica/dist/compiler/asllistsup.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asllistsup.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -88,6 +88,7 @@
             FlPrintFile (FileId, ".");
         }
     }
+
     FlPrintFile (FileId, "\"");
 }
 
@@ -185,7 +186,6 @@
               (LineNumber >= Gbl_NextError->LogicalLineNumber))
         {
             AePrintException (FileId, Gbl_NextError, "\n[****iasl****]\n");
-
             Gbl_NextError = Gbl_NextError->Next;
         }
 
@@ -576,6 +576,7 @@
             {
                 FlPrintFile (FileId, ",");
             }
+
             FlPrintFile (FileId, "0%2.2Xh", Gbl_AmlBuffer[i]);
         }
 
--- a/sys/external/bsd/acpica/dist/compiler/aslmain.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmain.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -127,7 +127,8 @@
     printf ("\nGeneral:\n");
     ACPI_OPTION ("-@ <file>",       "Specify command file");
     ACPI_OPTION ("-I <dir>",        "Specify additional include directory");
-    ACPI_OPTION ("-T <sig>|ALL|*",  "Create table template file for ACPI <Sig>");
+    ACPI_OPTION ("-T <sig list>|ALL",   "Create ACPI table template/example files");
+    ACPI_OPTION ("-T <count>",      "Emit DSDT and <count> SSDTs to same file");
     ACPI_OPTION ("-p <prefix>",     "Specify path/filename prefix for all output files");
     ACPI_OPTION ("-v",              "Display compiler version");
     ACPI_OPTION ("-vo",             "Enable optimization comments");
@@ -160,6 +161,7 @@
     ACPI_OPTION ("-of",             "Disable constant folding");
     ACPI_OPTION ("-oi",             "Disable integer optimization to Zero/One/Ones");
     ACPI_OPTION ("-on",             "Disable named reference string optimization");
+    ACPI_OPTION ("-ot",             "Disable typechecking");
     ACPI_OPTION ("-cr",             "Disable Resource Descriptor error checking");
     ACPI_OPTION ("-in",             "Ignore NoOp operators");
     ACPI_OPTION ("-r <revision>",   "Override table header Revision (1-255)");
@@ -192,6 +194,7 @@
     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 ("-l",              "Disassemble to mixed ASL and AML code");
     ACPI_OPTION ("-vt",             "Dump binary table data in hex format within output file");
 
     printf ("\nDebug Options:\n");
@@ -202,7 +205,7 @@
     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");
-    ACPI_OPTION ("-ot",             "Display compile times and statistics");
+    ACPI_OPTION ("-oc",             "Display compile times and statistics");
     ACPI_OPTION ("-x <level>",      "Set debug level for trace output");
     ACPI_OPTION ("-z",              "Do not insert new compiler ID for DataTables");
 }
@@ -298,6 +301,8 @@
     UINT32                  i;
 
 
+    AcpiGbl_DmOpt_Verbose = FALSE;
+
     for (i = 0; i < ASL_NUM_FILES; i++)
     {
         Gbl_Files[i].Handle = NULL;
--- a/sys/external/bsd/acpica/dist/compiler/aslmap.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmap.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -123,6 +123,7 @@
 {
 /*! [Begin] no source code translation (keep the table structure) */
 
+                                            /*  AML Opcode                  Value                           Flags               Btype */
 
 /* ACCESSAS */                  OP_TABLE_ENTRY (AML_INT_ACCESSFIELD_OP,     0,                              0,                  0),
 /* ACCESSATTRIB_BLOCK */        OP_TABLE_ENTRY (AML_BYTE_OP,                AML_FIELD_ATTRIB_BLOCK,         0,                  0),
@@ -241,7 +242,7 @@
 /* INCLUDE */                   OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
 /* INCLUDE_END */               OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
 /* INCREMENT */                 OP_TABLE_ENTRY (AML_INCREMENT_OP,           0,                              0,                  ACPI_BTYPE_INTEGER),
-/* INDEX */                     OP_TABLE_ENTRY (AML_INDEX_OP,               0,                              0,                  ACPI_BTYPE_REFERENCE),
+/* INDEX */                     OP_TABLE_ENTRY (AML_INDEX_OP,               0,                              0,                  ACPI_BTYPE_REFERENCE_OBJECT),
 /* INDEXFIELD */                OP_TABLE_ENTRY (AML_INDEX_FIELD_OP,         0,                              NODE_AML_PACKAGE,   0),
 /* INTEGER */                   OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  ACPI_BTYPE_INTEGER),
 /* INTERRUPT */                 OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP,         0,                              0,                  0),
@@ -312,7 +313,7 @@
 /* NOR */                       OP_TABLE_ENTRY (AML_BIT_NOR_OP,             0,                              0,                  ACPI_BTYPE_INTEGER),
 /* NOT */                       OP_TABLE_ENTRY (AML_BIT_NOT_OP,             0,                              0,                  ACPI_BTYPE_INTEGER),
 /* NOTIFY */                    OP_TABLE_ENTRY (AML_NOTIFY_OP,              0,                              0,                  0),
-/* OBJECTTYPE */                OP_TABLE_ENTRY (AML_TYPE_OP,                0,                              0,                  ACPI_BTYPE_INTEGER),
+/* OBJECTTYPE */                OP_TABLE_ENTRY (AML_OBJECT_TYPE_OP,         0,                              0,                  ACPI_BTYPE_INTEGER),
 /* OBJECTTYPE_BFF */            OP_TABLE_ENTRY (AML_BYTE_OP,                ACPI_TYPE_BUFFER_FIELD,         0,                  0),
 /* OBJECTTYPE_BUF */            OP_TABLE_ENTRY (AML_BYTE_OP,                ACPI_TYPE_BUFFER,               0,                  0),
 /* OBJECTTYPE_DDB */            OP_TABLE_ENTRY (AML_BYTE_OP,                ACPI_TYPE_DDB_HANDLE,           0,                  0),
@@ -357,7 +358,7 @@
 /* RAW_DATA */                  OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
 /* READWRITETYPE_BOTH */        OP_TABLE_ENTRY (AML_BYTE_OP,                1,                              0,                  0),
 /* READWRITETYPE_READONLY */    OP_TABLE_ENTRY (AML_BYTE_OP,                0,                              0,                  0),
-/* REFOF */                     OP_TABLE_ENTRY (AML_REF_OF_OP,              0,                              0,                  ACPI_BTYPE_REFERENCE),
+/* REFOF */                     OP_TABLE_ENTRY (AML_REF_OF_OP,              0,                              0,                  ACPI_BTYPE_REFERENCE_OBJECT),
 /* REGIONSPACE_CMOS */          OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_CMOS,            0,                  0),
 /* REGIONSPACE_EC */            OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_EC,              0,                  0),
 /* REGIONSPACE_FFIXEDHW */      OP_TABLE_ENTRY (AML_RAW_DATA_BYTE,          ACPI_ADR_SPACE_FIXED_HARDWARE,  0,                  0),
@@ -478,6 +479,7 @@
 /* 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),
+/* ASLCODE  */                  OP_TABLE_ENTRY (0,                          0,                              0,                  0)
 /*! [End] no source code translation !*/
 
 };
--- a/sys/external/bsd/acpica/dist/compiler/aslmapenter.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmapenter.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -239,7 +239,7 @@
     /* Sort on source DeviceName first */
 
     while (NextGpio &&
-            (strcmp (DeviceName, NextGpio->DeviceName) > 0))
+        (strcmp (DeviceName, NextGpio->DeviceName) > 0))
     {
         PrevGpio = NextGpio;
         NextGpio = NextGpio->Next;
@@ -248,8 +248,8 @@
     /* Now sort on the PinNumber */
 
     while (NextGpio &&
-            (NextGpio->PinNumber < PinNumber) &&
-            !strcmp (DeviceName, NextGpio->DeviceName))
+        (NextGpio->PinNumber < PinNumber) &&
+        !strcmp (DeviceName, NextGpio->DeviceName))
     {
         PrevGpio = NextGpio;
         NextGpio = NextGpio->Next;
--- a/sys/external/bsd/acpica/dist/compiler/aslmapoutput.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmapoutput.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -453,7 +453,7 @@
     /* Walk the namespace from the root */
 
     (void) AcpiNsWalkNamespace (ACPI_TYPE_DEVICE, ACPI_ROOT_OBJECT,
-            ACPI_UINT32_MAX, FALSE, MpEmitOneDevice, NULL, NULL, NULL);
+        ACPI_UINT32_MAX, FALSE, MpEmitOneDevice, NULL, NULL, NULL);
 }
 
 
--- a/sys/external/bsd/acpica/dist/compiler/aslmaputils.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmaputils.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, 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	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmessages.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -238,8 +238,9 @@
 /*    ASL_MSG_ILLEGAL_METHOD_REF */         "Illegal reference across two methods",
 /*    ASL_MSG_LOCAL_NOT_USED */             "Method Local is set but never used",
 /*    ASL_MSG_ARG_AS_LOCAL_NOT_USED */      "Method Argument (as a local) is set but never used",
-/*    ASL_MSG_ARG_NOT_USED */               "Method Argument is never used"
-
+/*    ASL_MSG_ARG_NOT_USED */               "Method Argument is never used",
+/*    ASL_MSG_CONSTANT_REQUIRED */          "Non-reducible expression",
+/*    ASL_MSG_CROSS_TABLE_SCOPE */          "Illegal open scope on external object from within DSDT"
 };
 
 /* Table compiler */
--- a/sys/external/bsd/acpica/dist/compiler/aslmessages.h	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmessages.h	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -241,6 +241,8 @@
     ASL_MSG_LOCAL_NOT_USED,
     ASL_MSG_ARG_AS_LOCAL_NOT_USED,
     ASL_MSG_ARG_NOT_USED,
+    ASL_MSG_CONSTANT_REQUIRED,
+    ASL_MSG_CROSS_TABLE_SCOPE,
 
     /* These messages are used by the Data Table compiler only */
 
--- a/sys/external/bsd/acpica/dist/compiler/aslmethod.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslmethod.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -101,7 +101,7 @@
 
         /* Create and init method info */
 
-        MethodInfo       = UtLocalCalloc (sizeof (ASL_METHOD_INFO));
+        MethodInfo = UtLocalCalloc (sizeof (ASL_METHOD_INFO));
         MethodInfo->Next = WalkInfo->MethodStack;
         MethodInfo->Op = Op;
 
@@ -186,7 +186,9 @@
                 NextParamType = NextType->Asl.Child;
                 while (NextParamType)
                 {
-                    MethodInfo->ValidArgTypes[ActualArgs] |= AnMapObjTypeToBtype (NextParamType);
+                    MethodInfo->ValidArgTypes[ActualArgs] |=
+                        AnMapObjTypeToBtype (NextParamType);
+
                     NextParamType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
                     NextParamType = NextParamType->Asl.Next;
                 }
@@ -195,6 +197,7 @@
             {
                 MethodInfo->ValidArgTypes[ActualArgs] =
                     AnMapObjTypeToBtype (NextType);
+
                 NextType->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
                 ActualArgs++;
             }
@@ -251,7 +254,8 @@
              * Local was used outside a control method, or there was an error
              * in the method declaration.
              */
-            AslError (ASL_REMARK, ASL_MSG_LOCAL_OUTSIDE_METHOD, Op, Op->Asl.ExternalName);
+            AslError (ASL_REMARK, ASL_MSG_LOCAL_OUTSIDE_METHOD,
+                Op, Op->Asl.ExternalName);
             return (AE_ERROR);
         }
 
@@ -294,7 +298,8 @@
              * Arg was used outside a control method, or there was an error
              * in the method declaration.
              */
-            AslError (ASL_REMARK, ASL_MSG_LOCAL_OUTSIDE_METHOD, Op, Op->Asl.ExternalName);
+            AslError (ASL_REMARK, ASL_MSG_LOCAL_OUTSIDE_METHOD,
+                Op, Op->Asl.ExternalName);
             return (AE_ERROR);
         }
 
@@ -317,7 +322,7 @@
          * The only operator that accepts an uninitialized value is ObjectType()
          */
         else if ((!MethodInfo->ArgInitialized[RegisterNumber]) &&
-                 (Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_OBJECTTYPE))
+            (Op->Asl.Parent->Asl.ParseOpcode != PARSEOP_OBJECTTYPE))
         {
             AslError (ASL_ERROR, ASL_MSG_ARG_INIT, Op, ArgName);
         }
@@ -418,7 +423,8 @@
         i = ApCheckForPredefinedName (Op, Op->Asl.NameSeg);
         if (i < ACPI_VALID_RESERVED_NAME_MAX)
         {
-            AslError (ASL_ERROR, ASL_MSG_RESERVED_USE, Op, Op->Asl.ExternalName);
+            AslError (ASL_ERROR, ASL_MSG_RESERVED_USE,
+                Op, Op->Asl.ExternalName);
         }
         break;
 
@@ -495,9 +501,10 @@
     const ACPI_OPCODE_INFO  *OpInfo;
 
 
-    /* We don't care about actual method declarations */
+    /* We don't care about actual method declarations or scopes */
 
-    if (Op->Asl.AmlOpcode == AML_METHOD_OP)
+    if ((Op->Asl.AmlOpcode == AML_METHOD_OP) ||
+        (Op->Asl.AmlOpcode == AML_SCOPE_OP))
     {
         return;
     }
@@ -677,7 +684,8 @@
          */
         if (Op->Asl.Next)
         {
-            AslError (ASL_WARNING, ASL_MSG_UNREACHABLE_CODE, Op->Asl.Next, NULL);
+            AslError (ASL_WARNING, ASL_MSG_UNREACHABLE_CODE,
+                Op->Asl.Next, NULL);
         }
         break;
 
--- a/sys/external/bsd/acpica/dist/compiler/aslnamesp.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslnamesp.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -124,16 +124,16 @@
     /* Walk entire namespace from the root */
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, NsDoOneNamespaceObject, NULL,
-                NULL, NULL);
+        ACPI_UINT32_MAX, FALSE, NsDoOneNamespaceObject, NULL,
+        NULL, NULL);
 
     /* Print the full pathname for each namespace node */
 
     FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "\nNamespace pathnames\n\n");
 
     Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, ACPI_ROOT_OBJECT,
-                ACPI_UINT32_MAX, FALSE, NsDoOnePathname, NULL,
-                NULL, NULL);
+        ACPI_UINT32_MAX, FALSE, NsDoOnePathname, NULL,
+        NULL, NULL);
 
     return (Status);
 }
@@ -168,8 +168,7 @@
 
     FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%5u  [%u]  %*s %4.4s - %s",
         Gbl_NumNamespaceObjects, Level, (Level * 3), " ",
-        &Node->Name,
-        AcpiUtGetTypeName (Node->Type));
+        &Node->Name, AcpiUtGetTypeName (Node->Type));
 
     Op = Node->Op;
     ObjDesc = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Node->Object);
@@ -218,11 +217,13 @@
             {
                 Op = Op->Asl.Child;
             }
+
             if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG)  ||
                 (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING))
             {
                 Op = Op->Asl.Next;
             }
+
             FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
                 "       [Initial Value   0x%8.8X%8.8X]",
                 ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
@@ -234,11 +235,13 @@
             {
                 Op = Op->Asl.Child;
             }
+
             if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG)  ||
                 (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING))
             {
                 Op = Op->Asl.Next;
             }
+
             FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
                 "        [Initial Value   \"%s\"]",
                 Op->Asl.Value.String);
@@ -251,6 +254,7 @@
             {
                 Op = Op->Asl.Child;
             }
+
             FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT,
                 "   [Offset 0x%04X   Length 0x%04X bits]",
                 Op->Asl.Parent->Asl.ExtraValue, (UINT32) Op->Asl.Value.Integer);
@@ -303,11 +307,13 @@
             {
                 Op = Op->Asl.Child;
             }
+
             if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG)  ||
                 (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING))
             {
                 Op = Op->Asl.Next;
             }
+
             Op = Op->Asl.Child;
 
             if ((Op->Asl.ParseOpcode == PARSEOP_BYTECONST) ||
@@ -325,11 +331,13 @@
             {
                 Op = Op->Asl.Child;
             }
+
             if ((Op->Asl.ParseOpcode == PARSEOP_NAMESEG)  ||
                 (Op->Asl.ParseOpcode == PARSEOP_NAMESTRING))
             {
                 Op = Op->Asl.Next;
             }
+
             Op = Op->Asl.Child;
 
             if (Op && (Op->Asl.ParseOpcode == PARSEOP_INTEGER))
@@ -417,6 +425,5 @@
 
     FlPrintFile (ASL_FILE_NAMESPACE_OUTPUT, "%s\n", TargetPath.Pointer);
     ACPI_FREE (TargetPath.Pointer);
-
     return (AE_OK);
 }
--- a/sys/external/bsd/acpica/dist/compiler/asloffset.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asloffset.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/compiler/asloperands.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asloperands.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -188,14 +188,16 @@
         {
             AslError (ASL_ERROR, ASL_MSG_SYNC_LEVEL, Next, NULL);
         }
+
         Concurrency = (UINT8) Next->Asl.Value.Integer;
     }
 
     /* Put the bits in their proper places */
 
-    MethodFlags = (UINT8) ((NumArgs & 0x7) |
-                          ((Serialized & 0x1) << 3) |
-                          ((Concurrency & 0xF) << 4));
+    MethodFlags = (UINT8)
+        ((NumArgs & 0x7) |
+        ((Serialized & 0x1) << 3) |
+        ((Concurrency & 0xF) << 4));
 
     /* Use the last node for the combined flags byte */
 
@@ -272,9 +274,9 @@
     /* Set the node to RAW_DATA */
 
     Next->Asl.Value.Integer = FieldFlags;
-    Next->Asl.AmlOpcode     = AML_RAW_DATA_BYTE;
-    Next->Asl.AmlLength     = 1;
-    Next->Asl.ParseOpcode   = PARSEOP_RAW_DATA;
+    Next->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
+    Next->Asl.AmlLength = 1;
+    Next->Asl.ParseOpcode = PARSEOP_RAW_DATA;
 
     /* Process the FieldUnitList */
 
@@ -345,8 +347,8 @@
 
             /* Named or reserved field entry */
 
-            PkgLengthNode     = Next->Asl.Child;
-            NewBitOffset      = (UINT32) PkgLengthNode->Asl.Value.Integer;
+            PkgLengthNode = Next->Asl.Child;
+            NewBitOffset = (UINT32) PkgLengthNode->Asl.Value.Integer;
             CurrentBitOffset += NewBitOffset;
 
             /* Save the current AccessAs value for error checking later */
@@ -601,9 +603,9 @@
         {
             /* For buffers, this is a list of raw bytes */
 
-            InitializerOp->Asl.AmlOpcode      = AML_RAW_DATA_BYTE;
-            InitializerOp->Asl.AmlLength      = 1;
-            InitializerOp->Asl.ParseOpcode    = PARSEOP_RAW_DATA;
+            InitializerOp->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
+            InitializerOp->Asl.AmlLength = 1;
+            InitializerOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
 
             BufferLength++;
             InitializerOp = ASL_GET_PEER_NODE (InitializerOp);
@@ -618,9 +620,9 @@
          */
         BufferLength = strlen (InitializerOp->Asl.Value.String) + 1;
 
-        InitializerOp->Asl.AmlOpcode      = AML_RAW_DATA_BUFFER;
-        InitializerOp->Asl.AmlLength      = BufferLength;
-        InitializerOp->Asl.ParseOpcode    = PARSEOP_RAW_DATA;
+        InitializerOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
+        InitializerOp->Asl.AmlLength = BufferLength;
+        InitializerOp->Asl.ParseOpcode = PARSEOP_RAW_DATA;
         break;
 
     case PARSEOP_RAW_DATA:
@@ -636,7 +638,7 @@
         AslError (ASL_ERROR, ASL_MSG_INVALID_OPERAND, InitializerOp,
             "Unknown buffer initializer opcode");
         printf ("Unknown buffer initializer opcode [%s]\n",
-                        UtGetOpName (InitializerOp->Asl.ParseOpcode));
+            UtGetOpName (InitializerOp->Asl.ParseOpcode));
         return;
     }
 
@@ -660,8 +662,8 @@
      * Just set the buffer size node to be the buffer length, regardless
      * of whether it was previously an integer or a default_arg placeholder
      */
-    BufferLengthOp->Asl.ParseOpcode   = PARSEOP_INTEGER;
-    BufferLengthOp->Asl.AmlOpcode     = AML_DWORD_OP;
+    BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
+    BufferLengthOp->Asl.AmlOpcode = AML_DWORD_OP;
     BufferLengthOp->Asl.Value.Integer = BufferLength;
 
     (void) OpcSetOptimalIntegerSize (BufferLengthOp);
@@ -839,9 +841,9 @@
     Next = Next->Asl.Next;
     if (Next->Asl.ParseOpcode == PARSEOP_ZERO)
     {
-        Next->Asl.ParseOpcode    = PARSEOP_STRING_LITERAL;
-        Next->Asl.Value.String   = "\\";
-        Next->Asl.AmlLength      = 2;
+        Next->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
+        Next->Asl.Value.String = "\\";
+        Next->Asl.AmlLength = 2;
         OpcGenerateAmlOpcode (Next);
     }
 
@@ -923,6 +925,7 @@
         Gbl_OutputFilenamePrefix = Filename;
         UtConvertBackslashes (Gbl_OutputFilenamePrefix);
     }
+
     Child->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
 
     /* Signature */
@@ -932,13 +935,13 @@
     if (Child->Asl.Value.String)
     {
         Gbl_TableSignature = Child->Asl.Value.String;
-        if (strlen (Gbl_TableSignature) != 4)
+        if (strlen (Gbl_TableSignature) != ACPI_NAME_SIZE)
         {
             AslError (ASL_ERROR, ASL_MSG_TABLE_SIGNATURE, Child,
-                "Length not exactly 4");
+                "Length is not exactly 4");
         }
 
-        for (i = 0; i < 4; i++)
+        for (i = 0; i < ACPI_NAME_SIZE; i++)
         {
             if (!isalnum ((int) Gbl_TableSignature[i]))
             {
@@ -1131,7 +1134,7 @@
 
     switch (Op->Asl.ParseOpcode)
     {
-    case PARSEOP_DEFINITIONBLOCK:
+    case PARSEOP_DEFINITION_BLOCK:
 
         OpnDoDefinitionBlock (Op);
         break;
--- a/sys/external/bsd/acpica/dist/compiler/aslopt.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslopt.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -53,7 +53,7 @@
         ACPI_MODULE_NAME    ("aslopt")
 
 
-static UINT32 OptTotal = 0;
+static UINT32               OptTotal = 0;
 
 /* Local prototypes */
 
@@ -132,15 +132,15 @@
      * name in the search path before the one we want, the nodes will
      * not match, and we cannot use this optimization.
      */
-    Path = &(((char *) TargetPath->Pointer)[TargetPath->Length -
-                                            ACPI_NAME_SIZE]),
+    Path = &(((char *) TargetPath->Pointer)[
+        TargetPath->Length - ACPI_NAME_SIZE]),
     ScopeInfo.Scope.Node = CurrentNode;
 
     /* Lookup the NameSeg using SEARCH_PARENT (search-to-root) */
 
     Status = AcpiNsLookup (&ScopeInfo, Path, ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
-                    ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
-                    WalkState, &(Node));
+        ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
+        WalkState, &(Node));
     if (ACPI_FAILURE (Status))
     {
         return (Status);
@@ -172,8 +172,8 @@
 
     if (strncmp (*NewPath, "_T_", 3))
     {
-        AslError (ASL_OPTIMIZATION, ASL_MSG_SINGLE_NAME_OPTIMIZATION, Op,
-                *NewPath);
+        AslError (ASL_OPTIMIZATION, ASL_MSG_SINGLE_NAME_OPTIMIZATION,
+            Op, *NewPath);
     }
 
     return (AE_OK);
@@ -292,7 +292,7 @@
     /* Determine how many prefix Carats are required */
 
     NumCarats = (CurrentPath->Length / ACPI_PATH_SEGMENT_LENGTH) -
-                NumCommonSegments;
+        NumCommonSegments;
 
     /*
      * Construct a new target string
@@ -373,8 +373,8 @@
      * path that has been created.
      */
     Status = AcpiNsLookup (&ScopeInfo,  NewPath,
-                    ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
-                    ACPI_NS_DONT_OPEN_SCOPE, WalkState, &(Node));
+        ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
+        ACPI_NS_DONT_OPEN_SCOPE, WalkState, &(Node));
     if (ACPI_SUCCESS (Status))
     {
         /* Found the namepath, but make sure the node is correct */
@@ -446,7 +446,7 @@
 
 
     if (((CurrentNode == AcpiGbl_RootNode) ||
-        (Op->Common.Parent->Asl.ParseOpcode == PARSEOP_DEFINITIONBLOCK)) &&
+        (Op->Common.Parent->Asl.ParseOpcode == PARSEOP_DEFINITION_BLOCK)) &&
             (ACPI_IS_ROOT_PREFIX (AmlNameString[0])))
     {
         /*
@@ -458,7 +458,7 @@
         /* Debug output */
 
         Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, *NewPath,
-                    NULL, &NewPathExternal);
+            NULL, &NewPathExternal);
         if (ACPI_FAILURE (Status))
         {
             AslCoreSubsystemError (Op, Status, "Externalizing NamePath",
@@ -474,8 +474,8 @@
          * We know that we are at the root, so NULL is used for the scope.
          */
         Status = AcpiNsLookup (NULL, *NewPath,
-                        ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
-                        ACPI_NS_DONT_OPEN_SCOPE, WalkState, &(Node));
+            ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
+            ACPI_NS_DONT_OPEN_SCOPE, WalkState, &(Node));
         if (ACPI_SUCCESS (Status))
         {
             /* Found the namepath, but make sure the node is correct */
@@ -633,6 +633,7 @@
         {
             NextOp = NextOp->Asl.Parent;
         }
+
         if (NextOp && NextOp->Asl.Node)
         {
             CurrentNode = NextOp->Asl.Node;
@@ -662,6 +663,7 @@
             ASL_NO_ABORT);
         return_VOID;
     }
+
     TargetPath.Length--;    /* Subtract one for null terminator */
 
     /* CurrentPath is the path to this scope (where we are in the namespace) */
@@ -674,12 +676,13 @@
             ASL_NO_ABORT);
         return_VOID;
     }
+
     CurrentPath.Length--;   /* Subtract one for null terminator */
 
     /* Debug output only */
 
     Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, AmlNameString,
-                NULL, &ExternalNameString);
+        NULL, &ExternalNameString);
     if (ACPI_FAILURE (Status))
     {
         AslCoreSubsystemError (Op, Status, "Externalizing NamePath",
@@ -705,7 +708,7 @@
          * a reference.
          */
         Status = OptOptimizeNameDeclaration (Op, WalkState, CurrentNode,
-                    TargetNode, AmlNameString, &NewPath);
+            TargetNode, AmlNameString, &NewPath);
         if (ACPI_FAILURE (Status))
         {
             /*
@@ -713,8 +716,8 @@
              *    optimize the namestring with carats (up-arrow)
              */
             Status = OptBuildShortestPath (Op, WalkState, CurrentNode,
-                            TargetNode, &CurrentPath, &TargetPath,
-                            AmlNameStringLength, 1, &NewPath);
+                TargetNode, &CurrentPath, &TargetPath,
+                AmlNameStringLength, 1, &NewPath);
         }
     }
     else
@@ -726,7 +729,7 @@
          *    NameSeg of the NamePath
          */
         Status = OptSearchToRoot (Op, WalkState, CurrentNode,
-                        TargetNode, &TargetPath, &NewPath);
+            TargetNode, &TargetPath, &NewPath);
         if (ACPI_FAILURE (Status))
         {
             /*
@@ -734,8 +737,8 @@
              *    optimize the namestring with carats (up-arrow)
              */
             Status = OptBuildShortestPath (Op, WalkState, CurrentNode,
-                            TargetNode, &CurrentPath, &TargetPath,
-                            AmlNameStringLength, 0, &NewPath);
+                TargetNode, &CurrentPath, &TargetPath,
+                AmlNameStringLength, 0, &NewPath);
         }
     }
 
--- a/sys/external/bsd/acpica/dist/compiler/asloptions.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/asloptions.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -68,7 +68,7 @@
 
 
 #define ASL_TOKEN_SEPARATORS    " \t\n"
-#define ASL_SUPPORTED_OPTIONS   "@:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^r:s|t|T+G^v^w|x:z"
+#define ASL_SUPPORTED_OPTIONS   "@:a:b|c|d^D:e:f^gh^i|I:l^m:no|p:P^r:s|t|T+G^v^w|x:z"
 
 
 /*******************************************************************************
@@ -107,7 +107,7 @@
 
     if (Gbl_DoTemplates)
     {
-        Status = DtCreateTemplates (Gbl_TemplateSignature);
+        Status = DtCreateTemplates (argv);
         if (ACPI_FAILURE (Status))
         {
             exit (-1);
@@ -184,6 +184,24 @@
         }
         break;
 
+    case 'a':   /* Debug options */
+
+        switch (AcpiGbl_Optarg[0])
+        {
+        case 'r':
+
+            Gbl_EnableReferenceTypechecking = TRUE;
+            break;
+
+        default:
+
+            printf ("Unknown option: -a%s\n", AcpiGbl_Optarg);
+            return (-1);
+        }
+
+        break;
+
+
     case 'b':   /* Debug options */
 
         switch (AcpiGbl_Optarg[0])
@@ -286,11 +304,6 @@
             AcpiGbl_CstyleDisassembly = FALSE;
             break;
 
-        case 'v':
-
-            AcpiGbl_DbOpt_Verbose = TRUE;
-            break;
-
         default:
 
             printf ("Unknown option: -d%s\n", AcpiGbl_Optarg);
@@ -318,7 +331,8 @@
             Status = AcpiDmAddToExternalFileList (argv[AcpiGbl_Optind]);
             if (ACPI_FAILURE (Status))
             {
-                printf ("Could not add %s to external list\n", argv[AcpiGbl_Optind]);
+                printf ("Could not add %s to external list\n",
+                    argv[AcpiGbl_Optind]);
                 return (-1);
             }
 
@@ -445,6 +459,7 @@
             /* Produce listing file (Mixed source/aml) */
 
             Gbl_ListingFlag = TRUE;
+            AcpiGbl_DmOpt_Listing = TRUE;
             break;
 
         case 'i':
@@ -510,6 +525,13 @@
             Gbl_ReferenceOptimizationFlag = FALSE;
             break;
 
+        case 'c':
+
+            /* Display compile time(s) */
+
+            Gbl_CompileTimesFlag = TRUE;
+            break;
+
         case 'f':
 
             /* Disable folding on "normal" expressions */
@@ -533,9 +555,9 @@
 
         case 't':
 
-            /* Display compile time(s) */
+            /* Disable heavy typechecking */
 
-            Gbl_CompileTimesFlag = TRUE;
+            Gbl_DoTypechecking = FALSE;
             break;
 
         default:
@@ -640,7 +662,6 @@
     case 'T':   /* Create a ACPI table template file */
 
         Gbl_DoTemplates = TRUE;
-        Gbl_TemplateSignature = AcpiGbl_Optarg;
         break;
 
     case 'v':   /* Version and verbosity settings */
--- a/sys/external/bsd/acpica/dist/compiler/aslparser.y	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslparser.y	Sat Jan 09 19:54:49 2016 +0000
@@ -6,7 +6,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -122,6 +122,8 @@
 /* Production rules */
 
 m4_include(aslrules.y)
+m4_include(aslcstyle.y)
+m4_include(aslresources.y)
 %%
 
 /*! [End] no source code translation !*/
--- a/sys/external/bsd/acpica/dist/compiler/aslprintf.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslprintf.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
--- a/sys/external/bsd/acpica/dist/compiler/aslprune.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslprune.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -63,6 +63,8 @@
     const char              *ObjectName);
 
 
+/* Structure used for the pruning parse tree walk */
+
 typedef struct acpi_prune_info
 {
     UINT32                  PruneLevel;
--- a/sys/external/bsd/acpica/dist/compiler/aslresource.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslresource.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -396,6 +396,7 @@
         {
             return ((UINT16) (strlen (InitializerOp->Asl.Value.String) + 1));
         }
+
         InitializerOp = ASL_GET_PEER_NODE (InitializerOp);
     }
 
@@ -431,7 +432,6 @@
 
     Rnode->Buffer = UtLocalCalloc (Size);
     Rnode->BufferLength = Size;
-
     return (Rnode);
 }
 
@@ -467,7 +467,6 @@
     Op->Asl.ExternalName = Name;
     Op->Asl.CompileFlags |= NODE_IS_RESOURCE_FIELD;
 
-
     Op->Asl.Value.Tag.BitOffset = (ByteOffset * 8) + BitOffset;
     Op->Asl.Value.Tag.BitLength = BitLength;
 }
@@ -888,7 +887,7 @@
     default:
 
         printf ("Unknown resource descriptor type [%s]\n",
-                    Info->DescriptorTypeOp->Asl.ParseOpName);
+            Info->DescriptorTypeOp->Asl.ParseOpName);
         break;
     }
 
@@ -904,7 +903,8 @@
     if (Rnode)
     {
         Info->DescriptorTypeOp->Asl.FinalAmlLength = Rnode->BufferLength;
-        Info->DescriptorTypeOp->Asl.Extra = ((AML_RESOURCE *) Rnode->Buffer)->DescriptorType;
+        Info->DescriptorTypeOp->Asl.Extra =
+            ((AML_RESOURCE *) Rnode->Buffer)->DescriptorType;
     }
 
     return (Rnode);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslresources.y	Sat Jan 09 19:54:49 2016 +0000
@@ -0,0 +1,1179 @@
+NoEcho('
+/******************************************************************************
+ *
+ * Module Name: aslresources.y - Bison/Yacc production rules for resources
+ *
+ *****************************************************************************/
+
+/*
+ * Copyright (C) 2000 - 2016, 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.
+ */
+
+')
+
+/*******************************************************************************
+ *
+ * ASL Parameter Keyword Terms
+ *
+ ******************************************************************************/
+
+AccessAttribKeyword
+    : PARSEOP_ACCESSATTRIB_BLOCK            {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BLOCK);}
+    | PARSEOP_ACCESSATTRIB_BLOCK_CALL       {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BLOCK_CALL);}
+    | PARSEOP_ACCESSATTRIB_BYTE             {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BYTE);}
+    | PARSEOP_ACCESSATTRIB_QUICK            {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_QUICK );}
+    | PARSEOP_ACCESSATTRIB_SND_RCV          {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_SND_RCV);}
+    | PARSEOP_ACCESSATTRIB_WORD             {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD);}
+    | PARSEOP_ACCESSATTRIB_WORD_CALL        {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD_CALL);}
+    | PARSEOP_ACCESSATTRIB_MULTIBYTE '('    {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_MULTIBYTE);}
+        ByteConst
+        ')'                                 {$$ = TrLinkChildren ($<n>3,1,$4);}
+    | PARSEOP_ACCESSATTRIB_RAW_BYTES '('    {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_BYTES);}
+        ByteConst
+        ')'                                 {$$ = TrLinkChildren ($<n>3,1,$4);}
+    | PARSEOP_ACCESSATTRIB_RAW_PROCESS '('  {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);}
+        ByteConst
+        ')'                                 {$$ = TrLinkChildren ($<n>3,1,$4);}
+    ;
+
+AccessTypeKeyword
+    : PARSEOP_ACCESSTYPE_ANY                {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_ANY);}
+    | PARSEOP_ACCESSTYPE_BYTE               {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_BYTE);}
+    | PARSEOP_ACCESSTYPE_WORD               {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_WORD);}
+    | PARSEOP_ACCESSTYPE_DWORD              {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_DWORD);}
+    | PARSEOP_ACCESSTYPE_QWORD              {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_QWORD);}
+    | PARSEOP_ACCESSTYPE_BUF                {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_BUF);}
+    ;
+
+AddressingModeKeyword
+    : PARSEOP_ADDRESSINGMODE_7BIT           {$$ = TrCreateLeafNode (PARSEOP_ADDRESSINGMODE_7BIT);}
+    | PARSEOP_ADDRESSINGMODE_10BIT          {$$ = TrCreateLeafNode (PARSEOP_ADDRESSINGMODE_10BIT);}
+    ;
+
+AddressKeyword
+    : PARSEOP_ADDRESSTYPE_MEMORY            {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_MEMORY);}
+    | PARSEOP_ADDRESSTYPE_RESERVED          {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_RESERVED);}
+    | PARSEOP_ADDRESSTYPE_NVS               {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_NVS);}
+    | PARSEOP_ADDRESSTYPE_ACPI              {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_ACPI);}
+    ;
+
+AddressSpaceKeyword
+    : ByteConst                             {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
+    | RegionSpaceKeyword                    {}
+    ;
+
+BitsPerByteKeyword
+    : PARSEOP_BITSPERBYTE_FIVE              {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_FIVE);}
+    | PARSEOP_BITSPERBYTE_SIX               {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_SIX);}
+    | PARSEOP_BITSPERBYTE_SEVEN             {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_SEVEN);}
+    | PARSEOP_BITSPERBYTE_EIGHT             {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_EIGHT);}
+    | PARSEOP_BITSPERBYTE_NINE              {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_NINE);}
+    ;
+
+ClockPhaseKeyword
+    : PARSEOP_CLOCKPHASE_FIRST              {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_FIRST);}
+    | PARSEOP_CLOCKPHASE_SECOND             {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_SECOND);}
+    ;
+
+ClockPolarityKeyword
+    : PARSEOP_CLOCKPOLARITY_LOW             {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_LOW);}
+    | PARSEOP_CLOCKPOLARITY_HIGH            {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_HIGH);}
+    ;
+
+DecodeKeyword
+    : PARSEOP_DECODETYPE_POS                {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_POS);}
+    | PARSEOP_DECODETYPE_SUB                {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_SUB);}
+    ;
+
+DevicePolarityKeyword
+    : PARSEOP_DEVICEPOLARITY_LOW            {$$ = TrCreateLeafNode (PARSEOP_DEVICEPOLARITY_LOW);}
+    | PARSEOP_DEVICEPOLARITY_HIGH           {$$ = TrCreateLeafNode (PARSEOP_DEVICEPOLARITY_HIGH);}
+    ;
+
+DMATypeKeyword
+    : PARSEOP_DMATYPE_A                     {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_A);}
+    | PARSEOP_DMATYPE_COMPATIBILITY         {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_COMPATIBILITY);}
+    | PARSEOP_DMATYPE_B                     {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_B);}
+    | PARSEOP_DMATYPE_F                     {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_F);}
+    ;
+
+EndianKeyword
+    : PARSEOP_ENDIAN_LITTLE                 {$$ = TrCreateLeafNode (PARSEOP_ENDIAN_LITTLE);}
+    | PARSEOP_ENDIAN_BIG                    {$$ = TrCreateLeafNode (PARSEOP_ENDIAN_BIG);}
+    ;
+
+FlowControlKeyword
+    : PARSEOP_FLOWCONTROL_HW                {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_HW);}
+    | PARSEOP_FLOWCONTROL_NONE              {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_NONE);}
+    | PARSEOP_FLOWCONTROL_SW                {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_SW);}
+    ;
+
+InterruptLevel
+    : PARSEOP_INTLEVEL_ACTIVEBOTH           {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEBOTH);}
+    | PARSEOP_INTLEVEL_ACTIVEHIGH           {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEHIGH);}
+    | PARSEOP_INTLEVEL_ACTIVELOW            {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVELOW);}
+    ;
+
+InterruptTypeKeyword
+    : PARSEOP_INTTYPE_EDGE                  {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_EDGE);}
+    | PARSEOP_INTTYPE_LEVEL                 {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_LEVEL);}
+    ;
+
+IODecodeKeyword
+    : PARSEOP_IODECODETYPE_16               {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_16);}
+    | PARSEOP_IODECODETYPE_10               {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_10);}
+    ;
+
+IoRestrictionKeyword
+    : PARSEOP_IORESTRICT_IN                 {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_IN);}
+    | PARSEOP_IORESTRICT_OUT                {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_OUT);}
+    | PARSEOP_IORESTRICT_NONE               {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_NONE);}
+    | PARSEOP_IORESTRICT_PRESERVE           {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_PRESERVE);}
+    ;
+
+LockRuleKeyword
+    : PARSEOP_LOCKRULE_LOCK                 {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_LOCK);}
+    | PARSEOP_LOCKRULE_NOLOCK               {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_NOLOCK);}
+    ;
+
+MatchOpKeyword
+    : PARSEOP_MATCHTYPE_MTR                 {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MTR);}
+    | PARSEOP_MATCHTYPE_MEQ                 {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MEQ);}
+    | PARSEOP_MATCHTYPE_MLE                 {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MLE);}
+    | PARSEOP_MATCHTYPE_MLT                 {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MLT);}
+    | PARSEOP_MATCHTYPE_MGE                 {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MGE);}
+    | PARSEOP_MATCHTYPE_MGT                 {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MGT);}
+    ;
+
+MaxKeyword
+    : PARSEOP_MAXTYPE_FIXED                 {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_FIXED);}
+    | PARSEOP_MAXTYPE_NOTFIXED              {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_NOTFIXED);}
+    ;
+
+MemTypeKeyword
+    : PARSEOP_MEMTYPE_CACHEABLE             {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_CACHEABLE);}
+    | PARSEOP_MEMTYPE_WRITECOMBINING        {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_WRITECOMBINING);}
+    | PARSEOP_MEMTYPE_PREFETCHABLE          {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_PREFETCHABLE);}
+    | PARSEOP_MEMTYPE_NONCACHEABLE          {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_NONCACHEABLE);}
+    ;
+
+MinKeyword
+    : PARSEOP_MINTYPE_FIXED                 {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_FIXED);}
+    | PARSEOP_MINTYPE_NOTFIXED              {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_NOTFIXED);}
+    ;
+
+ObjectTypeKeyword
+    : PARSEOP_OBJECTTYPE_UNK                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);}
+    | PARSEOP_OBJECTTYPE_INT                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_INT);}
+    | PARSEOP_OBJECTTYPE_STR                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_STR);}
+    | PARSEOP_OBJECTTYPE_BUF                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_BUF);}
+    | PARSEOP_OBJECTTYPE_PKG                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_PKG);}
+    | PARSEOP_OBJECTTYPE_FLD                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_FLD);}
+    | PARSEOP_OBJECTTYPE_DEV                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_DEV);}
+    | PARSEOP_OBJECTTYPE_EVT                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_EVT);}
+    | PARSEOP_OBJECTTYPE_MTH                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_MTH);}
+    | PARSEOP_OBJECTTYPE_MTX                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_MTX);}
+    | PARSEOP_OBJECTTYPE_OPR                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_OPR);}
+    | PARSEOP_OBJECTTYPE_POW                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_POW);}
+    | PARSEOP_OBJECTTYPE_PRO                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_PRO);}
+    | PARSEOP_OBJECTTYPE_THZ                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_THZ);}
+    | PARSEOP_OBJECTTYPE_BFF                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_BFF);}
+    | PARSEOP_OBJECTTYPE_DDB                {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_DDB);}
+    ;
+
+ParityTypeKeyword
+    : PARSEOP_PARITYTYPE_SPACE              {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_SPACE);}
+    | PARSEOP_PARITYTYPE_MARK               {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_MARK);}
+    | PARSEOP_PARITYTYPE_ODD                {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_ODD);}
+    | PARSEOP_PARITYTYPE_EVEN               {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_EVEN);}
+    | PARSEOP_PARITYTYPE_NONE               {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_NONE);}
+    ;
+
+PinConfigByte
+    : PinConfigKeyword                      {$$ = $1;}
+    | ByteConstExpr                         {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
+    ;
+
+PinConfigKeyword
+    : PARSEOP_PIN_NOPULL                    {$$ = TrCreateLeafNode (PARSEOP_PIN_NOPULL);}
+    | PARSEOP_PIN_PULLDOWN                  {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLDOWN);}
+    | PARSEOP_PIN_PULLUP                    {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLUP);}
+    | PARSEOP_PIN_PULLDEFAULT               {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLDEFAULT);}
+    ;
+
+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);}
+    ;
+
+RangeTypeKeyword
+    : PARSEOP_RANGETYPE_ISAONLY             {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ISAONLY);}
+    | PARSEOP_RANGETYPE_NONISAONLY          {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_NONISAONLY);}
+    | PARSEOP_RANGETYPE_ENTIRE              {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ENTIRE);}
+    ;
+
+RegionSpaceKeyword
+    : PARSEOP_REGIONSPACE_IO                {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IO);}
+    | PARSEOP_REGIONSPACE_MEM               {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_MEM);}
+    | PARSEOP_REGIONSPACE_PCI               {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCI);}
+    | PARSEOP_REGIONSPACE_EC                {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_EC);}
+    | PARSEOP_REGIONSPACE_SMBUS             {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_SMBUS);}
+    | PARSEOP_REGIONSPACE_CMOS              {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_CMOS);}
+    | PARSEOP_REGIONSPACE_PCIBAR            {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCIBAR);}
+    | PARSEOP_REGIONSPACE_IPMI              {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IPMI);}
+    | PARSEOP_REGIONSPACE_GPIO              {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GPIO);}
+    | PARSEOP_REGIONSPACE_GSBUS             {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GSBUS);}
+    | PARSEOP_REGIONSPACE_PCC               {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCC);}
+    | PARSEOP_REGIONSPACE_FFIXEDHW          {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_FFIXEDHW);}
+    ;
+
+ResourceTypeKeyword
+    : PARSEOP_RESOURCETYPE_CONSUMER         {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
+    | PARSEOP_RESOURCETYPE_PRODUCER         {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_PRODUCER);}
+    ;
+
+SerializeRuleKeyword
+    : PARSEOP_SERIALIZERULE_SERIAL          {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_SERIAL);}
+    | PARSEOP_SERIALIZERULE_NOTSERIAL       {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_NOTSERIAL);}
+    ;
+
+ShareTypeKeyword
+    : PARSEOP_SHARETYPE_SHARED              {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_SHARED);}
+    | PARSEOP_SHARETYPE_EXCLUSIVE           {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_EXCLUSIVE);}
+    | PARSEOP_SHARETYPE_SHAREDWAKE          {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_SHAREDWAKE);}
+    | PARSEOP_SHARETYPE_EXCLUSIVEWAKE       {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_EXCLUSIVEWAKE);}
+   ;
+
+SlaveModeKeyword
+    : PARSEOP_SLAVEMODE_CONTROLLERINIT      {$$ = TrCreateLeafNode (PARSEOP_SLAVEMODE_CONTROLLERINIT);}
+    | PARSEOP_SLAVEMODE_DEVICEINIT          {$$ = TrCreateLeafNode (PARSEOP_SLAVEMODE_DEVICEINIT);}
+    ;
+
+StopBitsKeyword
+    : PARSEOP_STOPBITS_TWO                  {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_TWO);}
+    | PARSEOP_STOPBITS_ONEPLUSHALF          {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ONEPLUSHALF);}
+    | PARSEOP_STOPBITS_ONE                  {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ONE);}
+    | PARSEOP_STOPBITS_ZERO                 {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ZERO);}
+    ;
+
+TranslationKeyword
+    : PARSEOP_TRANSLATIONTYPE_SPARSE        {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_SPARSE);}
+    | PARSEOP_TRANSLATIONTYPE_DENSE         {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_DENSE);}
+    ;
+
+TypeKeyword
+    : PARSEOP_TYPE_TRANSLATION              {$$ = TrCreateLeafNode (PARSEOP_TYPE_TRANSLATION);}
+    | PARSEOP_TYPE_STATIC                   {$$ = TrCreateLeafNode (PARSEOP_TYPE_STATIC);}
+    ;
+
+UpdateRuleKeyword
+    : PARSEOP_UPDATERULE_PRESERVE           {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_PRESERVE);}
+    | PARSEOP_UPDATERULE_ONES               {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_ONES);}
+    | PARSEOP_UPDATERULE_ZEROS              {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_ZEROS);}
+    ;
+
+WireModeKeyword
+    : PARSEOP_WIREMODE_FOUR                 {$$ = TrCreateLeafNode (PARSEOP_WIREMODE_FOUR);}
+    | PARSEOP_WIREMODE_THREE                {$$ = TrCreateLeafNode (PARSEOP_WIREMODE_THREE);}
+    ;
+
+XferSizeKeyword
+    : PARSEOP_XFERSIZE_8                    {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_8,   0);}
+    | PARSEOP_XFERSIZE_16                   {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_16,  1);}
+    | PARSEOP_XFERSIZE_32                   {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32,  2);}
+    | PARSEOP_XFERSIZE_64                   {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_64,  3);}
+    | PARSEOP_XFERSIZE_128                  {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_128, 4);}
+    | PARSEOP_XFERSIZE_256                  {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_256, 5);}
+    ;
+
+XferTypeKeyword
+    : PARSEOP_XFERTYPE_8                    {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8);}
+    | PARSEOP_XFERTYPE_8_16                 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8_16);}
+    | PARSEOP_XFERTYPE_16                   {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_16);}
+    ;
+
+
+/*******************************************************************************
+ *
+ * ASL Resource Template Terms
+ *
+ ******************************************************************************/
+
+/*
+ * Note: Create two default nodes to allow conversion to a Buffer AML opcode
+ * Also, insert the EndTag at the end of the template.
+ */
+ResourceTemplateTerm
+    : PARSEOP_RESOURCETEMPLATE '(' ')'
+        '{'
+        ResourceMacroList '}'       {$$ = TrCreateNode (PARSEOP_RESOURCETEMPLATE,4,
+                                          TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
+                                          TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
+                                          $5,
+                                          TrCreateLeafNode (PARSEOP_ENDTAG));}
+    ;
+
+ResourceMacroList
+    :                               {$$ = NULL;}
+    | ResourceMacroList
+        ResourceMacroTerm           {$$ = TrLinkPeerNode ($1,$2);}
+    ;
+
+ResourceMacroTerm
+    : DMATerm                       {}
+    | DWordIOTerm                   {}
+    | DWordMemoryTerm               {}
+    | DWordSpaceTerm                {}
+    | EndDependentFnTerm            {}
+    | ExtendedIOTerm                {}
+    | ExtendedMemoryTerm            {}
+    | ExtendedSpaceTerm             {}
+    | FixedDmaTerm                  {}
+    | FixedIOTerm                   {}
+    | GpioIntTerm                   {}
+    | GpioIoTerm                    {}
+    | I2cSerialBusTerm              {}
+    | InterruptTerm                 {}
+    | IOTerm                        {}
+    | IRQNoFlagsTerm                {}
+    | IRQTerm                       {}
+    | Memory24Term                  {}
+    | Memory32FixedTerm             {}
+    | Memory32Term                  {}
+    | QWordIOTerm                   {}
+    | QWordMemoryTerm               {}
+    | QWordSpaceTerm                {}
+    | RegisterTerm                  {}
+    | SpiSerialBusTerm              {}
+    | StartDependentFnNoPriTerm     {}
+    | StartDependentFnTerm          {}
+    | UartSerialBusTerm             {}
+    | VendorLongTerm                {}
+    | VendorShortTerm               {}
+    | WordBusNumberTerm             {}
+    | WordIOTerm                    {}
+    | WordSpaceTerm                 {}
+    ;
+
+DMATerm
+    : PARSEOP_DMA '('               {$<n>$ = TrCreateLeafNode (PARSEOP_DMA);}
+        DMATypeKeyword
+        OptionalBusMasterKeyword
+        ',' XferTypeKeyword
+        OptionalNameString_Last
+        ')' '{'
+            ByteList '}'            {$$ = TrLinkChildren ($<n>3,5,$4,$5,$7,$8,$11);}
+    | PARSEOP_DMA '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+DWordIOTerm
+    : PARSEOP_DWORDIO '('           {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDIO);}
+        OptionalResourceType_First
+        OptionalMinType
+        OptionalMaxType
+        OptionalDecodeType
+        OptionalRangeType
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        OptionalByteConstExpr
+        OptionalStringData
+        OptionalNameString
+        OptionalType
+        OptionalTranslationType_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
+    | PARSEOP_DWORDIO '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+DWordMemoryTerm
+    : PARSEOP_DWORDMEMORY '('       {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDMEMORY);}
+        OptionalResourceType_First
+        OptionalDecodeType
+        OptionalMinType
+        OptionalMaxType
+        OptionalMemType
+        ',' OptionalReadWriteKeyword
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        OptionalByteConstExpr
+        OptionalStringData
+        OptionalNameString
+        OptionalAddressRange
+        OptionalType_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
+    | PARSEOP_DWORDMEMORY '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+DWordSpaceTerm
+    : PARSEOP_DWORDSPACE '('        {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDSPACE);}
+        ByteConstExpr               {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
+        OptionalResourceType
+        OptionalDecodeType
+        OptionalMinType
+        OptionalMaxType
+        ',' ByteConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        OptionalByteConstExpr
+        OptionalStringData
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
+    | PARSEOP_DWORDSPACE '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+EndDependentFnTerm
+    : PARSEOP_ENDDEPENDENTFN '('
+        ')'                         {$$ = TrCreateLeafNode (PARSEOP_ENDDEPENDENTFN);}
+    | PARSEOP_ENDDEPENDENTFN '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+ExtendedIOTerm
+    : PARSEOP_EXTENDEDIO '('        {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDIO);}
+        OptionalResourceType_First
+        OptionalMinType
+        OptionalMaxType
+        OptionalDecodeType
+        OptionalRangeType
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        OptionalQWordConstExpr
+        OptionalNameString
+        OptionalType
+        OptionalTranslationType_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
+    | PARSEOP_EXTENDEDIO '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+ExtendedMemoryTerm
+    : PARSEOP_EXTENDEDMEMORY '('    {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDMEMORY);}
+        OptionalResourceType_First
+        OptionalDecodeType
+        OptionalMinType
+        OptionalMaxType
+        OptionalMemType
+        ',' OptionalReadWriteKeyword
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        OptionalQWordConstExpr
+        OptionalNameString
+        OptionalAddressRange
+        OptionalType_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
+    | PARSEOP_EXTENDEDMEMORY '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+ExtendedSpaceTerm
+    : PARSEOP_EXTENDEDSPACE '('     {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDSPACE);}
+        ByteConstExpr               {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
+        OptionalResourceType
+        OptionalDecodeType
+        OptionalMinType
+        OptionalMaxType
+        ',' ByteConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        OptionalQWordConstExpr
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,13,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
+    | PARSEOP_EXTENDEDSPACE '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+FixedDmaTerm
+    : PARSEOP_FIXEDDMA '('          {$<n>$ = TrCreateLeafNode (PARSEOP_FIXEDDMA);}
+        WordConstExpr               /* 04: DMA RequestLines */
+        ',' WordConstExpr           /* 06: DMA Channels */
+        OptionalXferSize            /* 07: DMA TransferSize */
+        OptionalNameString          /* 08: DescriptorName */
+        ')'                         {$$ = TrLinkChildren ($<n>3,4,$4,$6,$7,$8);}
+    | PARSEOP_FIXEDDMA '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+FixedIOTerm
+    : PARSEOP_FIXEDIO '('           {$<n>$ = TrCreateLeafNode (PARSEOP_FIXEDIO);}
+        WordConstExpr
+        ',' ByteConstExpr
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
+    | PARSEOP_FIXEDIO '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+GpioIntTerm
+    : PARSEOP_GPIO_INT '('          {$<n>$ = TrCreateLeafNode (PARSEOP_GPIO_INT);}
+        InterruptTypeKeyword        /* 04: InterruptType */
+        ',' InterruptLevel          /* 06: InterruptLevel */
+        OptionalShareType           /* 07: SharedType */
+        ',' PinConfigByte           /* 09: PinConfig */
+        OptionalWordConstExpr       /* 10: DebounceTimeout */
+        ',' StringData              /* 12: ResourceSource */
+        OptionalByteConstExpr       /* 13: ResourceSourceIndex */
+        OptionalResourceType        /* 14: ResourceType */
+        OptionalNameString          /* 15: DescriptorName */
+        OptionalBuffer_Last         /* 16: VendorData */
+        ')' '{'
+            DWordConstExpr '}'      {$$ = TrLinkChildren ($<n>3,11,$4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
+    | PARSEOP_GPIO_INT '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+GpioIoTerm
+    : PARSEOP_GPIO_IO '('           {$<n>$ = TrCreateLeafNode (PARSEOP_GPIO_IO);}
+        OptionalShareType_First     /* 04: SharedType */
+        ',' PinConfigByte           /* 06: PinConfig */
+        OptionalWordConstExpr       /* 07: DebounceTimeout */
+        OptionalWordConstExpr       /* 08: DriveStrength */
+        OptionalIoRestriction       /* 09: IoRestriction */
+        ',' StringData              /* 11: ResourceSource */
+        OptionalByteConstExpr       /* 12: ResourceSourceIndex */
+        OptionalResourceType        /* 13: ResourceType */
+        OptionalNameString          /* 14: DescriptorName */
+        OptionalBuffer_Last         /* 15: VendorData */
+        ')' '{'
+            DWordList '}'           {$$ = TrLinkChildren ($<n>3,11,$4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
+    | PARSEOP_GPIO_IO '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+I2cSerialBusTerm
+    : PARSEOP_I2C_SERIALBUS '('     {$<n>$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS);}
+        WordConstExpr               /* 04: SlaveAddress */
+        OptionalSlaveMode           /* 05: SlaveMode */
+        ',' DWordConstExpr          /* 07: ConnectionSpeed */
+        OptionalAddressingMode      /* 08: AddressingMode */
+        ',' StringData              /* 10: ResourceSource */
+        OptionalByteConstExpr       /* 11: ResourceSourceIndex */
+        OptionalResourceType        /* 12: ResourceType */
+        OptionalNameString          /* 13: DescriptorName */
+        OptionalBuffer_Last         /* 14: VendorData */
+        ')'                         {$$ = TrLinkChildren ($<n>3,9,$4,$5,$7,$8,$10,$11,$12,$13,$14);}
+    | PARSEOP_I2C_SERIALBUS '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+InterruptTerm
+    : PARSEOP_INTERRUPT '('         {$<n>$ = TrCreateLeafNode (PARSEOP_INTERRUPT);}
+        OptionalResourceType_First
+        ',' InterruptTypeKeyword
+        ',' InterruptLevel
+        OptionalShareType
+        OptionalByteConstExpr
+        OptionalStringData
+        OptionalNameString_Last
+        ')' '{'
+            DWordList '}'           {$$ = TrLinkChildren ($<n>3,8,$4,$6,$8,$9,$10,$11,$12,$15);}
+    | PARSEOP_INTERRUPT '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+IOTerm
+    : PARSEOP_IO '('                {$<n>$ = TrCreateLeafNode (PARSEOP_IO);}
+        IODecodeKeyword
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' ByteConstExpr
+        ',' ByteConstExpr
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
+    | PARSEOP_IO '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+IRQNoFlagsTerm
+    : PARSEOP_IRQNOFLAGS '('        {$<n>$ = TrCreateLeafNode (PARSEOP_IRQNOFLAGS);}
+        OptionalNameString_First
+        ')' '{'
+            ByteList '}'            {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+    | PARSEOP_IRQNOFLAGS '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+IRQTerm
+    : PARSEOP_IRQ '('               {$<n>$ = TrCreateLeafNode (PARSEOP_IRQ);}
+        InterruptTypeKeyword
+        ',' InterruptLevel
+        OptionalShareType
+        OptionalNameString_Last
+        ')' '{'
+            ByteList '}'            {$$ = TrLinkChildren ($<n>3,5,$4,$6,$7,$8,$11);}
+    | PARSEOP_IRQ '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+Memory24Term
+    : PARSEOP_MEMORY24 '('          {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY24);}
+        OptionalReadWriteKeyword
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
+    | PARSEOP_MEMORY24 '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+Memory32FixedTerm
+    : PARSEOP_MEMORY32FIXED '('     {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY32FIXED);}
+        OptionalReadWriteKeyword
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,4,$4,$6,$8,$9);}
+    | PARSEOP_MEMORY32FIXED '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+Memory32Term
+    : PARSEOP_MEMORY32 '('          {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY32);}
+        OptionalReadWriteKeyword
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        ',' DWordConstExpr
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
+    | PARSEOP_MEMORY32 '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+QWordIOTerm
+    : PARSEOP_QWORDIO '('           {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDIO);}
+        OptionalResourceType_First
+        OptionalMinType
+        OptionalMaxType
+        OptionalDecodeType
+        OptionalRangeType
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        OptionalByteConstExpr
+        OptionalStringData
+        OptionalNameString
+        OptionalType
+        OptionalTranslationType_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
+    | PARSEOP_QWORDIO '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+QWordMemoryTerm
+    : PARSEOP_QWORDMEMORY '('       {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDMEMORY);}
+        OptionalResourceType_First
+        OptionalDecodeType
+        OptionalMinType
+        OptionalMaxType
+        OptionalMemType
+        ',' OptionalReadWriteKeyword
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        OptionalByteConstExpr
+        OptionalStringData
+        OptionalNameString
+        OptionalAddressRange
+        OptionalType_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
+    | PARSEOP_QWORDMEMORY '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+QWordSpaceTerm
+    : PARSEOP_QWORDSPACE '('        {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDSPACE);}
+        ByteConstExpr               {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
+        OptionalResourceType
+        OptionalDecodeType
+        OptionalMinType
+        OptionalMaxType
+        ',' ByteConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        ',' QWordConstExpr
+        OptionalByteConstExpr
+        OptionalStringData
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
+    | PARSEOP_QWORDSPACE '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+RegisterTerm
+    : PARSEOP_REGISTER '('          {$<n>$ = TrCreateLeafNode (PARSEOP_REGISTER);}
+        AddressSpaceKeyword
+        ',' ByteConstExpr
+        ',' ByteConstExpr
+        ',' QWordConstExpr
+        OptionalAccessSize
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);}
+    | PARSEOP_REGISTER '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+SpiSerialBusTerm
+    : PARSEOP_SPI_SERIALBUS '('     {$<n>$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS);}
+        WordConstExpr               /* 04: DeviceSelection */
+        OptionalDevicePolarity      /* 05: DevicePolarity */
+        OptionalWireMode            /* 06: WireMode */
+        ',' ByteConstExpr           /* 08: DataBitLength */
+        OptionalSlaveMode           /* 09: SlaveMode */
+        ',' DWordConstExpr          /* 11: ConnectionSpeed */
+        ',' ClockPolarityKeyword    /* 13: ClockPolarity */
+        ',' ClockPhaseKeyword       /* 15: ClockPhase */
+        ',' StringData              /* 17: ResourceSource */
+        OptionalByteConstExpr       /* 18: ResourceSourceIndex */
+        OptionalResourceType        /* 19: ResourceType */
+        OptionalNameString          /* 20: DescriptorName */
+        OptionalBuffer_Last         /* 21: VendorData */
+        ')'                         {$$ = TrLinkChildren ($<n>3,13,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21);}
+    | PARSEOP_SPI_SERIALBUS '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+StartDependentFnNoPriTerm
+    : PARSEOP_STARTDEPENDENTFN_NOPRI '('    {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN_NOPRI);}
+        ')' '{'
+        ResourceMacroList '}'       {$$ = TrLinkChildren ($<n>3,1,$6);}
+    | PARSEOP_STARTDEPENDENTFN_NOPRI '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+StartDependentFnTerm
+    : PARSEOP_STARTDEPENDENTFN '('  {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN);}
+        ByteConstExpr
+        ',' ByteConstExpr
+        ')' '{'
+        ResourceMacroList '}'       {$$ = TrLinkChildren ($<n>3,3,$4,$6,$9);}
+    | PARSEOP_STARTDEPENDENTFN '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+UartSerialBusTerm
+    : PARSEOP_UART_SERIALBUS '('    {$<n>$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS);}
+        DWordConstExpr              /* 04: ConnectionSpeed */
+        OptionalBitsPerByte         /* 05: BitsPerByte */
+        OptionalStopBits            /* 06: StopBits */
+        ',' ByteConstExpr           /* 08: LinesInUse */
+        OptionalEndian              /* 09: Endianess */
+        OptionalParityType          /* 10: Parity */
+        OptionalFlowControl         /* 11: FlowControl */
+        ',' WordConstExpr           /* 13: Rx BufferSize */
+        ',' WordConstExpr           /* 15: Tx BufferSize */
+        ',' StringData              /* 17: ResourceSource */
+        OptionalByteConstExpr       /* 18: ResourceSourceIndex */
+        OptionalResourceType        /* 19: ResourceType */
+        OptionalNameString          /* 20: DescriptorName */
+        OptionalBuffer_Last         /* 21: VendorData */
+        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21);}
+    | PARSEOP_UART_SERIALBUS '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+VendorLongTerm
+    : PARSEOP_VENDORLONG '('        {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORLONG);}
+        OptionalNameString_First
+        ')' '{'
+            ByteList '}'            {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+    | PARSEOP_VENDORLONG '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+VendorShortTerm
+    : PARSEOP_VENDORSHORT '('       {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORSHORT);}
+        OptionalNameString_First
+        ')' '{'
+            ByteList '}'            {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+    | PARSEOP_VENDORSHORT '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+WordBusNumberTerm
+    : PARSEOP_WORDBUSNUMBER '('     {$<n>$ = TrCreateLeafNode (PARSEOP_WORDBUSNUMBER);}
+        OptionalResourceType_First
+        OptionalMinType
+        OptionalMaxType
+        OptionalDecodeType
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        OptionalByteConstExpr
+        OptionalStringData
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,12,$4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
+    | PARSEOP_WORDBUSNUMBER '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+WordIOTerm
+    : PARSEOP_WORDIO '('            {$<n>$ = TrCreateLeafNode (PARSEOP_WORDIO);}
+        OptionalResourceType_First
+        OptionalMinType
+        OptionalMaxType
+        OptionalDecodeType
+        OptionalRangeType
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        OptionalByteConstExpr
+        OptionalStringData
+        OptionalNameString
+        OptionalType
+        OptionalTranslationType_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
+    | PARSEOP_WORDIO '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+WordSpaceTerm
+    : PARSEOP_WORDSPACE '('         {$<n>$ = TrCreateLeafNode (PARSEOP_WORDSPACE);}
+        ByteConstExpr               {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
+        OptionalResourceType
+        OptionalDecodeType
+        OptionalMinType
+        OptionalMaxType
+        ',' ByteConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        ',' WordConstExpr
+        OptionalByteConstExpr
+        OptionalStringData
+        OptionalNameString_Last
+        ')'                         {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
+    | PARSEOP_WORDSPACE '('
+        error ')'                   {$$ = AslDoError(); yyclearin;}
+    ;
+
+
+/******* Object References ***********************************************/
+
+/* Allow IO, DMA, IRQ Resource macro names to also be used as identifiers */
+
+NameString
+    : NameSeg                       {}
+    | PARSEOP_NAMESTRING            {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) AslCompilerlval.s);}
+    | PARSEOP_IO                    {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IO");}
+    | PARSEOP_DMA                   {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "DMA");}
+    | PARSEOP_IRQ                   {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IRQ");}
+    ;
+
+NameSeg
+    : PARSEOP_NAMESEG               {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT) AslCompilerlval.s);}
+    ;
+
+
+/*******************************************************************************
+ *
+ * ASL Helper Terms
+ *
+ ******************************************************************************/
+
+OptionalBusMasterKeyword
+    : ','                                       {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_MASTER);}
+    | ',' PARSEOP_BUSMASTERTYPE_MASTER          {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_MASTER);}
+    | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER       {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_NOTMASTER);}
+    ;
+
+OptionalAccessAttribTerm
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' ByteConstExpr             {$$ = $2;}
+    | ',' AccessAttribKeyword       {$$ = $2;}
+    ;
+
+OptionalAccessSize
+    :                               {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);}
+    | ','                           {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);}
+    | ',' ByteConstExpr             {$$ = $2;}
+    ;
+
+OptionalAddressingMode
+    : ','                           {$$ = NULL;}
+    | ',' AddressingModeKeyword     {$$ = $2;}
+    ;
+
+OptionalAddressRange
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' AddressKeyword            {$$ = $2;}
+    ;
+
+OptionalBitsPerByte
+    : ','                           {$$ = NULL;}
+    | ',' BitsPerByteKeyword        {$$ = $2;}
+    ;
+
+OptionalBuffer_Last
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' RawDataBufferTerm         {$$ = $2;}
+    ;
+
+OptionalByteConstExpr
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' ByteConstExpr             {$$ = $2;}
+    ;
+
+OptionalDecodeType
+    : ','                           {$$ = NULL;}
+    | ',' DecodeKeyword             {$$ = $2;}
+    ;
+
+OptionalDevicePolarity
+    : ','                           {$$ = NULL;}
+    | ',' DevicePolarityKeyword     {$$ = $2;}
+    ;
+
+OptionalDWordConstExpr
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' DWordConstExpr            {$$ = $2;}
+    ;
+
+OptionalEndian
+    : ','                           {$$ = NULL;}
+    | ',' EndianKeyword             {$$ = $2;}
+    ;
+
+OptionalFlowControl
+    : ','                           {$$ = NULL;}
+    | ',' FlowControlKeyword        {$$ = $2;}
+    ;
+
+OptionalIoRestriction
+    : ','                           {$$ = NULL;}
+    | ',' IoRestrictionKeyword      {$$ = $2;}
+    ;
+
+OptionalListString
+    :                               {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));}   /* Placeholder is a NULL string */
+    | ','                           {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));}   /* Placeholder is a NULL string */
+    | ',' TermArg                   {$$ = $2;}
+    ;
+
+OptionalMaxType
+    : ','                           {$$ = NULL;}
+    | ',' MaxKeyword                {$$ = $2;}
+    ;
+
+OptionalMemType
+    : ','                           {$$ = NULL;}
+    | ',' MemTypeKeyword            {$$ = $2;}
+    ;
+
+OptionalMinType
+    : ','                           {$$ = NULL;}
+    | ',' MinKeyword                {$$ = $2;}
+    ;
+
+OptionalNameString
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' NameString                {$$ = $2;}
+    ;
+
+OptionalNameString_Last
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' NameString                {$$ = $2;}
+    ;
+
+OptionalNameString_First
+    :                               {$$ = TrCreateLeafNode (PARSEOP_ZERO);}
+    | NameString                    {$$ = $1;}
+    ;
+
+OptionalObjectTypeKeyword
+    :                               {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);}
+    | ',' ObjectTypeKeyword         {$$ = $2;}
+    ;
+
+OptionalParityType
+    : ','                           {$$ = NULL;}
+    | ',' ParityTypeKeyword         {$$ = $2;}
+    ;
+
+OptionalQWordConstExpr
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' QWordConstExpr            {$$ = $2;}
+    ;
+
+OptionalRangeType
+    : ','                           {$$ = NULL;}
+    | ',' RangeTypeKeyword          {$$ = $2;}
+    ;
+
+OptionalReadWriteKeyword
+    :                                   {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);}
+    | PARSEOP_READWRITETYPE_BOTH        {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);}
+    | PARSEOP_READWRITETYPE_READONLY    {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_READONLY);}
+    ;
+
+OptionalResourceType_First
+    :                               {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
+    | ResourceTypeKeyword           {$$ = $1;}
+    ;
+
+OptionalResourceType
+    :                               {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
+    | ','                           {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
+    | ',' ResourceTypeKeyword       {$$ = $2;}
+    ;
+
+OptionalSlaveMode
+    : ','                           {$$ = NULL;}
+    | ',' SlaveModeKeyword          {$$ = $2;}
+    ;
+
+OptionalShareType
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' ShareTypeKeyword          {$$ = $2;}
+    ;
+
+OptionalShareType_First
+    :                               {$$ = NULL;}
+    | ShareTypeKeyword              {$$ = $1;}
+    ;
+
+OptionalStopBits
+    : ','                           {$$ = NULL;}
+    | ',' StopBitsKeyword           {$$ = $2;}
+    ;
+
+OptionalStringData
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' StringData                {$$ = $2;}
+    ;
+
+OptionalTranslationType_Last
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' TranslationKeyword        {$$ = $2;}
+    ;
+
+OptionalType
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' TypeKeyword               {$$ = $2;}
+    ;
+
+OptionalType_Last
+    :                               {$$ = NULL;}
+    | ','                           {$$ = NULL;}
+    | ',' TypeKeyword               {$$ = $2;}
+    ;
+
+OptionalWireMode
+    : ','                           {$$ = NULL;}
+    | ',' WireModeKeyword           {$$ = $2;}
+    ;
+
+OptionalWordConstExpr
+    : ','                           {$$ = NULL;}
+    | ',' WordConstExpr             {$$ = $2;}
+    ;
+
+OptionalXferSize
+    :                               {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);}
+    | ','                           {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);}
+    | ',' XferSizeKeyword           {$$ = $2;}
+    ;
--- a/sys/external/bsd/acpica/dist/compiler/aslrestype1.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype1.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -86,7 +86,6 @@
     Descriptor->EndTag.DescriptorType = ACPI_RESOURCE_NAME_END_TAG |
                                         ASL_RDESC_END_TAG_SIZE;
     Descriptor->EndTag.Checksum = 0;
-
     return (Rnode);
 }
 
@@ -114,8 +113,8 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_END_DEPENDENT));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->EndDpf.DescriptorType  = ACPI_RESOURCE_NAME_END_DEPENDENT |
-                                      ASL_RDESC_END_DEPEND_SIZE;
+    Descriptor->EndDpf.DescriptorType =
+        ACPI_RESOURCE_NAME_END_DEPENDENT | ASL_RDESC_END_DEPEND_SIZE;
     return (Rnode);
 }
 
@@ -151,7 +150,7 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_MEMORY24));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Memory24.DescriptorType  = ACPI_RESOURCE_NAME_MEMORY24;
+    Descriptor->Memory24.DescriptorType = ACPI_RESOURCE_NAME_MEMORY24;
     Descriptor->Memory24.ResourceLength = 9;
 
     /* Process all child initialization nodes */
@@ -257,7 +256,7 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_MEMORY32));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Memory32.DescriptorType  = ACPI_RESOURCE_NAME_MEMORY32;
+    Descriptor->Memory32.DescriptorType = ACPI_RESOURCE_NAME_MEMORY32;
     Descriptor->Memory32.ResourceLength = 17;
 
     /* Process all child initialization nodes */
@@ -360,7 +359,7 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_FIXED_MEMORY32));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->FixedMemory32.DescriptorType  = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
+    Descriptor->FixedMemory32.DescriptorType = ACPI_RESOURCE_NAME_FIXED_MEMORY32;
     Descriptor->FixedMemory32.ResourceLength = 9;
 
     /* Process all child initialization nodes */
@@ -448,8 +447,8 @@
 
     /* Descriptor has priority byte */
 
-    Descriptor->StartDpf.DescriptorType  = ACPI_RESOURCE_NAME_START_DEPENDENT |
-                                      (ASL_RDESC_ST_DEPEND_SIZE + 0x01);
+    Descriptor->StartDpf.DescriptorType =
+        ACPI_RESOURCE_NAME_START_DEPENDENT | (ASL_RDESC_ST_DEPEND_SIZE + 0x01);
 
     /* Process all child initialization nodes */
 
@@ -493,8 +492,8 @@
              * must keep track of the offset of not only each descriptor, but each
              * element (field) within each descriptor as well.
              */
-            CurrentByteOffset += RsLinkDescriptorChain (&PreviousRnode,
-                                    NextRnode);
+            CurrentByteOffset += RsLinkDescriptorChain (
+                &PreviousRnode, NextRnode);
             break;
         }
 
@@ -536,8 +535,8 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_START_DEPENDENT_NOPRIO));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->StartDpf.DescriptorType  = ACPI_RESOURCE_NAME_START_DEPENDENT |
-                                      ASL_RDESC_ST_DEPEND_SIZE;
+    Descriptor->StartDpf.DescriptorType =
+        ACPI_RESOURCE_NAME_START_DEPENDENT | ASL_RDESC_ST_DEPEND_SIZE;
     PreviousRnode = Rnode;
 
     /* Increment offset past StartDependentNoPri descriptor */
@@ -599,7 +598,7 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_VENDOR_SMALL) + 7);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->VendorSmall.DescriptorType  = ACPI_RESOURCE_NAME_VENDOR_SMALL;
+    Descriptor->VendorSmall.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_SMALL;
     VendorData = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_SMALL_HEADER);
 
     /* Process all child initialization nodes */
--- a/sys/external/bsd/acpica/dist/compiler/aslrestype1i.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype1i.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -88,8 +88,8 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_DMA));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Dma.DescriptorType  = ACPI_RESOURCE_NAME_DMA |
-                                        ASL_RDESC_DMA_SIZE;
+    Descriptor->Dma.DescriptorType =
+        ACPI_RESOURCE_NAME_DMA | ASL_RDESC_DMA_SIZE;
 
     /* Process all child initialization nodes */
 
@@ -282,8 +282,8 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_FIXED_IO));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Io.DescriptorType  = ACPI_RESOURCE_NAME_FIXED_IO |
-                                      ASL_RDESC_FIXED_IO_SIZE;
+    Descriptor->Io.DescriptorType =
+        ACPI_RESOURCE_NAME_FIXED_IO | ASL_RDESC_FIXED_IO_SIZE;
 
     /* Process all child initialization nodes */
 
@@ -365,8 +365,8 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_IO));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Io.DescriptorType  = ACPI_RESOURCE_NAME_IO |
-                                      ASL_RDESC_IO_SIZE;
+    Descriptor->Io.DescriptorType =
+        ACPI_RESOURCE_NAME_IO | ASL_RDESC_IO_SIZE;
 
     /* Process all child initialization nodes */
 
@@ -476,8 +476,8 @@
     /* Length = 3 (with flag byte) */
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Irq.DescriptorType  = ACPI_RESOURCE_NAME_IRQ |
-                                      (ASL_RDESC_IRQ_SIZE + 0x01);
+    Descriptor->Irq.DescriptorType =
+        ACPI_RESOURCE_NAME_IRQ | (ASL_RDESC_IRQ_SIZE + 0x01);
 
     /* Process all child initialization nodes */
 
@@ -596,8 +596,8 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_IRQ_NOFLAGS));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Irq.DescriptorType  = ACPI_RESOURCE_NAME_IRQ |
-                                      ASL_RDESC_IRQ_SIZE;
+    Descriptor->Irq.DescriptorType =
+        ACPI_RESOURCE_NAME_IRQ | ASL_RDESC_IRQ_SIZE;
 
     /* Process all child initialization nodes */
 
--- a/sys/external/bsd/acpica/dist/compiler/aslrestype2.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -147,6 +147,7 @@
 
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
     }
+
     return (Rnode);
 }
 
@@ -213,7 +214,7 @@
         1 + OptionIndex + StringLength);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->ExtendedIrq.DescriptorType  = ACPI_RESOURCE_NAME_EXTENDED_IRQ;
+    Descriptor->ExtendedIrq.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_IRQ;
 
     /*
      * Initial descriptor length -- may be enlarged if there are
@@ -223,7 +224,7 @@
     Descriptor->ExtendedIrq.InterruptCount  = 0;
 
     Rover = ACPI_CAST_PTR (AML_RESOURCE,
-                (&(Descriptor->ExtendedIrq.Interrupts[0])));
+        (&(Descriptor->ExtendedIrq.Interrupts[0])));
 
     /* Process all child initialization nodes */
 
@@ -382,9 +383,10 @@
             (Descriptor->ExtendedIrq.ResourceLength + StringLength);
     }
 
-    Rnode->BufferLength = (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
-                           ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
-                           + OptionIndex + StringLength;
+    Rnode->BufferLength =
+        (ASL_RESDESC_OFFSET (ExtendedIrq.Interrupts[0]) -
+        ASL_RESDESC_OFFSET (ExtendedIrq.DescriptorType))
+        + OptionIndex + StringLength;
     return (Rnode);
 }
 
@@ -431,7 +433,7 @@
     Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_VENDOR_LARGE) + i);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->VendorLarge.DescriptorType  = ACPI_RESOURCE_NAME_VENDOR_LARGE;
+    Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE;
     Descriptor->VendorLarge.ResourceLength = (UINT16) i;
 
     /* Point to end-of-descriptor for vendor data */
--- a/sys/external/bsd/acpica/dist/compiler/aslrestype2d.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2d.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -91,11 +91,11 @@
     CurrentByteOffset = Info->CurrentByteOffset;
 
     Rnode = RsAllocateResourceNode (
-                sizeof (AML_RESOURCE_ADDRESS32) + 1 + StringLength);
+        sizeof (AML_RESOURCE_ADDRESS32) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
     Descriptor->Address32.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS32;
-    Descriptor->Address32.ResourceType   = ACPI_ADDRESS_TYPE_IO_RANGE;
+    Descriptor->Address32.ResourceType  = ACPI_ADDRESS_TYPE_IO_RANGE;
 
     /*
      * Initial descriptor length -- may be enlarged if there are
@@ -325,7 +325,7 @@
 
     Descriptor = Rnode->Buffer;
     Descriptor->Address32.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS32;
-    Descriptor->Address32.ResourceType   = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
+    Descriptor->Address32.ResourceType  = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
 
     /*
      * Initial descriptor length -- may be enlarged if there are
@@ -556,7 +556,7 @@
     CurrentByteOffset = Info->CurrentByteOffset;
 
     Rnode = RsAllocateResourceNode (
-                sizeof (AML_RESOURCE_ADDRESS32) + 1 + StringLength);
+        sizeof (AML_RESOURCE_ADDRESS32) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
     Descriptor->Address32.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS32;
--- a/sys/external/bsd/acpica/dist/compiler/aslrestype2e.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2e.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -87,14 +87,14 @@
     CurrentByteOffset = Info->CurrentByteOffset;
 
     Rnode = RsAllocateResourceNode (
-                sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength);
+        sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->ExtAddress64.DescriptorType  = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
-    Descriptor->ExtAddress64.ResourceType    = ACPI_ADDRESS_TYPE_IO_RANGE;
-    Descriptor->ExtAddress64.RevisionID      = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
+    Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
+    Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
+    Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
 
-    Descriptor->ExtAddress64.ResourceLength  = (UINT16)
+    Descriptor->ExtAddress64.ResourceLength = (UINT16)
         (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
@@ -263,11 +263,11 @@
                 sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->ExtAddress64.DescriptorType  = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
-    Descriptor->ExtAddress64.ResourceType    = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
-    Descriptor->ExtAddress64.RevisionID      = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
+    Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
+    Descriptor->ExtAddress64.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
+    Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
 
-    Descriptor->ExtAddress64.ResourceLength  = (UINT16)
+    Descriptor->ExtAddress64.ResourceLength = (UINT16)
         (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
@@ -441,13 +441,13 @@
     CurrentByteOffset = Info->CurrentByteOffset;
 
     Rnode = RsAllocateResourceNode (
-                sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength);
+        sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->ExtAddress64.DescriptorType  = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
-    Descriptor->ExtAddress64.RevisionID      = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
+    Descriptor->ExtAddress64.DescriptorType = ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64;
+    Descriptor->ExtAddress64.RevisionID = AML_RESOURCE_EXTENDED_ADDRESS_REVISION;
 
-    Descriptor->ExtAddress64.ResourceLength  = (UINT16)
+    Descriptor->ExtAddress64.ResourceLength = (UINT16)
         (sizeof (AML_RESOURCE_EXTENDED_ADDRESS64) -
          sizeof (AML_RESOURCE_LARGE_HEADER));
 
--- a/sys/external/bsd/acpica/dist/compiler/aslrestype2q.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2q.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -91,11 +91,11 @@
     CurrentByteOffset = Info->CurrentByteOffset;
 
     Rnode = RsAllocateResourceNode (
-                sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
+        sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Address64.DescriptorType  = ACPI_RESOURCE_NAME_ADDRESS64;
-    Descriptor->Address64.ResourceType    = ACPI_ADDRESS_TYPE_IO_RANGE;
+    Descriptor->Address64.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS64;
+    Descriptor->Address64.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
 
     /*
      * Initial descriptor length -- may be enlarged if there are
@@ -312,11 +312,11 @@
     CurrentByteOffset = Info->CurrentByteOffset;
 
     Rnode = RsAllocateResourceNode (
-                sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
+        sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Address64.DescriptorType  = ACPI_RESOURCE_NAME_ADDRESS64;
-    Descriptor->Address64.ResourceType    = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
+    Descriptor->Address64.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS64;
+    Descriptor->Address64.ResourceType = ACPI_ADDRESS_TYPE_MEMORY_RANGE;
 
     /*
      * Initial descriptor length -- may be enlarged if there are
@@ -541,7 +541,7 @@
     CurrentByteOffset = Info->CurrentByteOffset;
 
     Rnode = RsAllocateResourceNode (
-                sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
+        sizeof (AML_RESOURCE_ADDRESS64) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
     Descriptor->Address64.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS64;
--- a/sys/external/bsd/acpica/dist/compiler/aslrestype2s.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2s.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -313,17 +313,19 @@
 
     /* Allocate the local resource node and initialize */
 
-    Rnode = RsAllocateResourceNode (DescriptorSize + sizeof (AML_RESOURCE_LARGE_HEADER));
+    Rnode = RsAllocateResourceNode (DescriptorSize +
+        sizeof (AML_RESOURCE_LARGE_HEADER));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Gpio.ResourceLength  = DescriptorSize;
-    Descriptor->Gpio.DescriptorType  = ACPI_RESOURCE_NAME_GPIO;
-    Descriptor->Gpio.RevisionId      = AML_RESOURCE_GPIO_REVISION;
-    Descriptor->Gpio.ConnectionType  = AML_RESOURCE_GPIO_TYPE_INT;
+    Descriptor->Gpio.ResourceLength = DescriptorSize;
+    Descriptor->Gpio.DescriptorType = ACPI_RESOURCE_NAME_GPIO;
+    Descriptor->Gpio.RevisionId = AML_RESOURCE_GPIO_REVISION;
+    Descriptor->Gpio.ConnectionType = AML_RESOURCE_GPIO_TYPE_INT;
 
     /* Build pointers to optional areas */
 
-    InterruptList = ACPI_ADD_PTR (UINT16, Descriptor, sizeof (AML_RESOURCE_GPIO));
+    InterruptList = ACPI_ADD_PTR (UINT16, Descriptor,
+        sizeof (AML_RESOURCE_GPIO));
     PinList = InterruptList;
     ResourceSource = ACPI_ADD_PTR (char, InterruptList, InterruptLength);
     VendorData = ACPI_ADD_PTR (UINT8, ResourceSource, ResSourceLength);
@@ -337,8 +339,10 @@
         ACPI_PTR_DIFF (ResourceSource, Descriptor);
 
     DbgPrint (ASL_DEBUG_OUTPUT,
-        "%16s - Actual: %.2X, Base: %.2X, ResLen: %.2X, VendLen: %.2X, IntLen: %.2X\n",
-        "GpioInt", Descriptor->Gpio.ResourceLength, (UINT16) sizeof (AML_RESOURCE_GPIO),
+        "%16s - Actual: %.2X, Base: %.2X, ResLen: "
+        "%.2X, VendLen: %.2X, IntLen: %.2X\n",
+        "GpioInt", Descriptor->Gpio.ResourceLength,
+        (UINT16) sizeof (AML_RESOURCE_GPIO),
         ResSourceLength, VendorLength, InterruptLength);
 
     /* Process all child initialization nodes */
@@ -397,7 +401,8 @@
 
             if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
             {
-                Descriptor->Gpio.ResSourceIndex = (UINT8) InitializerOp->Asl.Value.Integer;
+                Descriptor->Gpio.ResSourceIndex =
+                    (UINT8) InitializerOp->Asl.Value.Integer;
             }
             break;
 
@@ -422,7 +427,7 @@
                 ACPI_PTR_DIFF (VendorData, Descriptor);
 
             if (RsGetVendorData (InitializerOp, VendorData,
-                    (CurrentByteOffset +  Descriptor->Gpio.VendorOffset)))
+                (CurrentByteOffset +  Descriptor->Gpio.VendorOffset)))
             {
                 Descriptor->Gpio.VendorLength = VendorLength;
             }
@@ -430,7 +435,7 @@
 
         default:
             /*
-             * PINs come through here, repeatedly. Each PIN must be a DWORD.
+             * PINs come through here, repeatedly. Each PIN must be a WORD.
              * NOTE: there is no "length" field for this, so from ACPI spec:
              *  The number of pins in the table can be calculated from:
              *  PinCount = (Resource Source Name Offset - Pin Table Offset) / 2
@@ -459,7 +464,7 @@
 
                 /* Create a named field at the start of the list */
 
-                RsCreateDwordField (InitializerOp, ACPI_RESTAG_PIN,
+                RsCreateWordField (InitializerOp, ACPI_RESTAG_PIN,
                     CurrentByteOffset + Descriptor->Gpio.PinTableOffset);
             }
             break;
@@ -468,7 +473,8 @@
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
     }
 
-    MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource);
+    MpSaveGpioInfo (Info->MappingOp, Descriptor,
+        PinCount, PinList, ResourceSource);
     return (Rnode);
 }
 
@@ -524,13 +530,14 @@
 
     /* Allocate the local resource node and initialize */
 
-    Rnode = RsAllocateResourceNode (DescriptorSize + sizeof (AML_RESOURCE_LARGE_HEADER));
+    Rnode = RsAllocateResourceNode (DescriptorSize +
+        sizeof (AML_RESOURCE_LARGE_HEADER));
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Gpio.ResourceLength  = DescriptorSize;
-    Descriptor->Gpio.DescriptorType  = ACPI_RESOURCE_NAME_GPIO;
-    Descriptor->Gpio.RevisionId      = AML_RESOURCE_GPIO_REVISION;
-    Descriptor->Gpio.ConnectionType  = AML_RESOURCE_GPIO_TYPE_IO;
+    Descriptor->Gpio.ResourceLength = DescriptorSize;
+    Descriptor->Gpio.DescriptorType = ACPI_RESOURCE_NAME_GPIO;
+    Descriptor->Gpio.RevisionId = AML_RESOURCE_GPIO_REVISION;
+    Descriptor->Gpio.ConnectionType = AML_RESOURCE_GPIO_TYPE_IO;
 
     /* Build pointers to optional areas */
 
@@ -548,8 +555,10 @@
         ACPI_PTR_DIFF (ResourceSource, Descriptor);
 
     DbgPrint (ASL_DEBUG_OUTPUT,
-        "%16s - Actual: %.2X, Base: %.2X, ResLen: %.2X, VendLen: %.2X, IntLen: %.2X\n",
-        "GpioIo", Descriptor->Gpio.ResourceLength, (UINT16) sizeof (AML_RESOURCE_GPIO),
+        "%16s - Actual: %.2X, Base: %.2X, ResLen: "
+        "%.2X, VendLen: %.2X, IntLen: %.2X\n",
+        "GpioIo", Descriptor->Gpio.ResourceLength,
+        (UINT16) sizeof (AML_RESOURCE_GPIO),
         ResSourceLength, VendorLength, InterruptLength);
 
     /* Process all child initialization nodes */
@@ -632,7 +641,7 @@
                 ACPI_PTR_DIFF (VendorData, Descriptor);
 
             if (RsGetVendorData (InitializerOp, VendorData,
-                    (CurrentByteOffset + Descriptor->Gpio.VendorOffset)))
+                (CurrentByteOffset + Descriptor->Gpio.VendorOffset)))
             {
                 Descriptor->Gpio.VendorLength = VendorLength;
             }
@@ -640,7 +649,7 @@
 
         default:
             /*
-             * PINs come through here, repeatedly. Each PIN must be a DWORD.
+             * PINs come through here, repeatedly. Each PIN must be a WORD.
              * NOTE: there is no "length" field for this, so from ACPI spec:
              *  The number of pins in the table can be calculated from:
              *  PinCount = (Resource Source Name Offset - Pin Table Offset) / 2
@@ -669,7 +678,7 @@
 
                 /* Create a named field at the start of the list */
 
-                RsCreateDwordField (InitializerOp, ACPI_RESTAG_PIN,
+                RsCreateWordField (InitializerOp, ACPI_RESTAG_PIN,
                     CurrentByteOffset + Descriptor->Gpio.PinTableOffset);
             }
             break;
@@ -678,7 +687,8 @@
         InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
     }
 
-    MpSaveGpioInfo (Info->MappingOp, Descriptor, PinCount, PinList, ResourceSource);
+    MpSaveGpioInfo (Info->MappingOp, Descriptor,
+        PinCount, PinList, ResourceSource);
     return (Rnode);
 }
 
@@ -727,14 +737,15 @@
 
     /* Allocate the local resource node and initialize */
 
-    Rnode = RsAllocateResourceNode (DescriptorSize + sizeof (AML_RESOURCE_LARGE_HEADER));
+    Rnode = RsAllocateResourceNode (DescriptorSize +
+        sizeof (AML_RESOURCE_LARGE_HEADER));
 
     Descriptor = Rnode->Buffer;
     Descriptor->I2cSerialBus.ResourceLength = DescriptorSize;
     Descriptor->I2cSerialBus.DescriptorType = ACPI_RESOURCE_NAME_SERIAL_BUS;
-    Descriptor->I2cSerialBus.RevisionId     = AML_RESOURCE_I2C_REVISION;
+    Descriptor->I2cSerialBus.RevisionId = AML_RESOURCE_I2C_REVISION;
     Descriptor->I2cSerialBus.TypeRevisionId = AML_RESOURCE_I2C_TYPE_REVISION;
-    Descriptor->I2cSerialBus.Type           = AML_RESOURCE_I2C_SERIALBUSTYPE;
+    Descriptor->I2cSerialBus.Type = AML_RESOURCE_I2C_SERIALBUSTYPE;
     Descriptor->I2cSerialBus.TypeDataLength = AML_RESOURCE_I2C_MIN_DATA_LEN + VendorLength;
 
     /* Build pointers to optional areas */
@@ -743,7 +754,8 @@
     ResourceSource = ACPI_ADD_PTR (char, VendorData, VendorLength);
 
     DbgPrint (ASL_DEBUG_OUTPUT,
-        "%16s - Actual: %.2X, Base: %.2X, ResLen: %.2X, VendLen: %.2X, TypLen: %.2X\n",
+        "%16s - Actual: %.2X, Base: %.2X, ResLen: "
+        "%.2X, VendLen: %.2X, TypLen: %.2X\n",
         "I2cSerialBus", Descriptor->I2cSerialBus.ResourceLength,
         (UINT16) sizeof (AML_RESOURCE_I2C_SERIALBUS), ResSourceLength,
         VendorLength, Descriptor->I2cSerialBus.TypeDataLength);
@@ -797,7 +809,8 @@
 
             if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
             {
-                Descriptor->I2cSerialBus.ResSourceIndex = (UINT8) InitializerOp->Asl.Value.Integer;
+                Descriptor->I2cSerialBus.ResSourceIndex =
+                    (UINT8) InitializerOp->Asl.Value.Integer;
             }
             break;
 
@@ -874,23 +887,26 @@
 
     /* Allocate the local resource node and initialize */
 
-    Rnode = RsAllocateResourceNode (DescriptorSize + sizeof (AML_RESOURCE_LARGE_HEADER));
+    Rnode = RsAllocateResourceNode (DescriptorSize +
+        sizeof (AML_RESOURCE_LARGE_HEADER));
 
     Descriptor = Rnode->Buffer;
     Descriptor->SpiSerialBus.ResourceLength = DescriptorSize;
     Descriptor->SpiSerialBus.DescriptorType = ACPI_RESOURCE_NAME_SERIAL_BUS;
-    Descriptor->SpiSerialBus.RevisionId     = AML_RESOURCE_SPI_REVISION;
+    Descriptor->SpiSerialBus.RevisionId = AML_RESOURCE_SPI_REVISION;
     Descriptor->SpiSerialBus.TypeRevisionId = AML_RESOURCE_SPI_TYPE_REVISION;
-    Descriptor->SpiSerialBus.Type           = AML_RESOURCE_SPI_SERIALBUSTYPE;
+    Descriptor->SpiSerialBus.Type = AML_RESOURCE_SPI_SERIALBUSTYPE;
     Descriptor->SpiSerialBus.TypeDataLength = AML_RESOURCE_SPI_MIN_DATA_LEN + VendorLength;
 
     /* Build pointers to optional areas */
 
-    VendorData = ACPI_ADD_PTR (UINT8, Descriptor, sizeof (AML_RESOURCE_SPI_SERIALBUS));
+    VendorData = ACPI_ADD_PTR (UINT8, Descriptor,
+        sizeof (AML_RESOURCE_SPI_SERIALBUS));
     ResourceSource = ACPI_ADD_PTR (char, VendorData, VendorLength);
 
     DbgPrint (ASL_DEBUG_OUTPUT,
-        "%16s - Actual: %.2X, Base: %.2X, ResLen: %.2X, VendLen: %.2X, TypLen: %.2X\n",
+        "%16s - Actual: %.2X, Base: %.2X, ResLen: "
+        "%.2X, VendLen: %.2X, TypLen: %.2X\n",
         "SpiSerialBus", Descriptor->SpiSerialBus.ResourceLength,
         (UINT16) sizeof (AML_RESOURCE_SPI_SERIALBUS), ResSourceLength,
         VendorLength, Descriptor->SpiSerialBus.TypeDataLength);
@@ -972,7 +988,8 @@
 
             if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
             {
-                Descriptor->SpiSerialBus.ResSourceIndex = (UINT8) InitializerOp->Asl.Value.Integer;
+                Descriptor->SpiSerialBus.ResSourceIndex =
+                    (UINT8) InitializerOp->Asl.Value.Integer;
             }
             break;
 
@@ -1049,14 +1066,15 @@
 
     /* Allocate the local resource node and initialize */
 
-    Rnode = RsAllocateResourceNode (DescriptorSize + sizeof (AML_RESOURCE_LARGE_HEADER));
+    Rnode = RsAllocateResourceNode (DescriptorSize +
+        sizeof (AML_RESOURCE_LARGE_HEADER));
 
     Descriptor = Rnode->Buffer;
     Descriptor->UartSerialBus.ResourceLength = DescriptorSize;
     Descriptor->UartSerialBus.DescriptorType = ACPI_RESOURCE_NAME_SERIAL_BUS;
-    Descriptor->UartSerialBus.RevisionId     = AML_RESOURCE_UART_REVISION;
+    Descriptor->UartSerialBus.RevisionId = AML_RESOURCE_UART_REVISION;
     Descriptor->UartSerialBus.TypeRevisionId = AML_RESOURCE_UART_TYPE_REVISION;
-    Descriptor->UartSerialBus.Type           = AML_RESOURCE_UART_SERIALBUSTYPE;
+    Descriptor->UartSerialBus.Type = AML_RESOURCE_UART_SERIALBUSTYPE;
     Descriptor->UartSerialBus.TypeDataLength = AML_RESOURCE_UART_MIN_DATA_LEN + VendorLength;
 
     /* Build pointers to optional areas */
@@ -1065,7 +1083,8 @@
     ResourceSource = ACPI_ADD_PTR (char, VendorData, VendorLength);
 
     DbgPrint (ASL_DEBUG_OUTPUT,
-        "%16s - Actual: %.2X, Base: %.2X, ResLen: %.2X, VendLen: %.2X, TypLen: %.2X\n",
+        "%16s - Actual: %.2X, Base: %.2X, ResLen: "
+        "%.2X, VendLen: %.2X, TypLen: %.2X\n",
         "UartSerialBus", Descriptor->UartSerialBus.ResourceLength,
         (UINT16) sizeof (AML_RESOURCE_UART_SERIALBUS), ResSourceLength,
         VendorLength, Descriptor->UartSerialBus.TypeDataLength);
@@ -1154,7 +1173,8 @@
 
             if (InitializerOp->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG)
             {
-                Descriptor->UartSerialBus.ResSourceIndex = (UINT8) InitializerOp->Asl.Value.Integer;
+                Descriptor->UartSerialBus.ResSourceIndex =
+                    (UINT8) InitializerOp->Asl.Value.Integer;
             }
             break;
 
--- a/sys/external/bsd/acpica/dist/compiler/aslrestype2w.c	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrestype2w.c	Sat Jan 09 19:54:49 2016 +0000
@@ -5,7 +5,7 @@
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -91,11 +91,11 @@
     CurrentByteOffset = Info->CurrentByteOffset;
 
     Rnode = RsAllocateResourceNode (
-                sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
+        sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Address16.DescriptorType  = ACPI_RESOURCE_NAME_ADDRESS16;
-    Descriptor->Address16.ResourceType    = ACPI_ADDRESS_TYPE_IO_RANGE;
+    Descriptor->Address16.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS16;
+    Descriptor->Address16.ResourceType = ACPI_ADDRESS_TYPE_IO_RANGE;
 
     /*
      * Initial descriptor length -- may be enlarged if there are
@@ -312,11 +312,11 @@
     CurrentByteOffset = Info->CurrentByteOffset;
 
     Rnode = RsAllocateResourceNode (
-                sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
+        sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Address16.DescriptorType  = ACPI_RESOURCE_NAME_ADDRESS16;
-    Descriptor->Address16.ResourceType    = ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE;
+    Descriptor->Address16.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS16;
+    Descriptor->Address16.ResourceType = ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE;
 
     /*
      * Initial descriptor length -- may be enlarged if there are
@@ -517,10 +517,10 @@
     CurrentByteOffset = Info->CurrentByteOffset;
 
     Rnode = RsAllocateResourceNode (
-                sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
+        sizeof (AML_RESOURCE_ADDRESS16) + 1 + StringLength);
 
     Descriptor = Rnode->Buffer;
-    Descriptor->Address16.DescriptorType  = ACPI_RESOURCE_NAME_ADDRESS16;
+    Descriptor->Address16.DescriptorType = ACPI_RESOURCE_NAME_ADDRESS16;
 
     /*
      * Initial descriptor length -- may be enlarged if there are
--- a/sys/external/bsd/acpica/dist/compiler/aslrules.y	Sat Jan 09 19:05:13 2016 +0000
+++ b/sys/external/bsd/acpica/dist/compiler/aslrules.y	Sat Jan 09 19:54:49 2016 +0000
@@ -1,12 +1,12 @@
 NoEcho('
 /******************************************************************************
  *
- * Module Name: aslrules.y - Bison/Yacc production rules
+ * Module Name: aslrules.y - Main Bison/Yacc production rules
  *
  *****************************************************************************/
 
 /*
- * Copyright (C) 2000 - 2015, Intel Corp.
+ * Copyright (C) 2000 - 2016, Intel Corp.
  * All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
@@ -46,24 +46,19 @@
 
 /*******************************************************************************
  *
- * Production rules start here
+ * ASL Root and Secondary Terms
  *
  ******************************************************************************/
 
 /*
- * ASL Names
- *
- * Root rule. Allow multiple #line directives before the definition block
+ * Root term. Allow multiple #line directives before the definition block
  * to handle output from preprocessors
  */
-ASLCode
-    : DefinitionBlockTerm
+AslCode
+    : DefinitionBlockList           {$<n>$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_ASL_CODE),1, $1);}
     | error                         {YYABORT; $$ = NULL;}
     ;
 
-/*
- * Blocks, Data, and Opcodes
- */
 
 /*
  * Note concerning support for "module-level code".
@@ -81,7 +76,7 @@
  * of Type1 and Type2 opcodes at module level.
  */
 DefinitionBlockTerm
-    : PARSEOP_DEFINITIONBLOCK '('   {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITIONBLOCK);}
+    : PARSEOP_DEFINITION_BLOCK '('  {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITION_BLOCK);}
         String ','
         String ','
         ByteConst ','
@@ -92,150 +87,173 @@
             '{' 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);}
+DefinitionBlockList
+    : DefinitionBlockTerm
+    | DefinitionBlockTerm
+        DefinitionBlockList         {$$ = TrLinkPeerNodes (2, $1,$2);}
+    ;
 
-    /* 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 ());}
+SuperName
+    : NameString                    {}
+    | ArgTerm                       {}
+    | LocalTerm                     {}
+    | DebugTerm                     {}
+    | Type6Opcode                   {}
 
-    | 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;}
+Target
+    :                               {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
+    | ','                           {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
+    | ',' SuperName                 {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);}
     ;
 
-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
+    : Type2Opcode                   {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+    | DataObject                    {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+    | NameString                    {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+    | ArgTerm                       {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+    | LocalTerm                     {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+    ;
 
-    | TermArg PARSEOP_EXP_DIV_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
-        TermArg                         {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
-                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+/*
+ NOTE: Removed from TermArg due to reduce/reduce conflicts:
+    | Type2IntegerOpcode            {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+    | Type2StringOpcode             {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+    | Type2BufferOpcode             {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+    | Type2BufferOrStringOpcode     {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
 
-    | 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));}
+MethodInvocationTerm
+    : NameString '('                {TrUpdateNode (PARSEOP_METHODCALL, $1);}
+        ArgList ')'                 {$$ = TrLinkChildNode ($1,$4);}
+    ;
 
-    | 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));}
+/* OptionalCount must appear before ByteList or an incorrect reduction will result */
 
-    | TermArg PARSEOP_EXP_AND_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
-        TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
-                                            TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+OptionalCount
+    :                               {$$ = TrCreateLeafNode (PARSEOP_ONES);}       /* Placeholder is a OnesOp object */
+    | ','                           {$$ = TrCreateLeafNode (PARSEOP_ONES);}       /* Placeholder is a OnesOp object */
+    | ',' TermArg                   {$$ = $2;}
+    ;
 
-    | 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));}
+VarPackageLengthTerm
+    :                               {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
+    | TermArg                       {$$ = $1;}
     ;
 
 
-/* ACPI 3.0 -- allow semicolons between terms */
+/******* List Terms **************************************************/
+
+ArgList
+    :                               {$$ = NULL;}
+    | TermArg
+    | ArgList ','                   /* Allows a trailing comma at list end */
+    | ArgList ','
+        TermArg                     {$$ = TrLinkPeerNode ($1,$3);}
+    ;
+
+ByteList
+    :                               {$$ = NULL;}
+    | ByteConstExpr
+    | ByteList ','                  /* Allows a trailing comma at list end */
+    | ByteList ','
+        ByteConstExpr               {$$ = TrLinkPeerNode ($1,$3);}
+    ;
+
+DWordList
+    :                               {$$ = NULL;}
+    | DWordConstExpr
+    | DWordList ','                 /* Allows a trailing comma at list end */
+    | DWordList ','
+        DWordConstExpr              {$$ = TrLinkPeerNode ($1,$3);}
+    ;
+
+FieldUnitList
+    :                               {$$ = NULL;}
+    | FieldUnit
+    | FieldUnitList ','             /* Allows a trailing comma at list end */
+    | FieldUnitList ','
+        FieldUnit                   {$$ = TrLinkPeerNode ($1,$3);}
+    ;
+
+FieldUnit
+    : FieldUnitEntry                {}
+    | OffsetTerm                    {}
+    | AccessAsTerm                  {}
+    | ConnectionTerm                {}
+    ;
+
+FieldUnitEntry
+    : ',' AmlPackageLengthTerm      {$$ = TrCreateNode (PARSEOP_RESERVED_BYTES,1,$2);}
+    | NameSeg ','
+        AmlPackageLengthTerm        {$$ = TrLinkChildNode ($1,$3);}
+    ;
+
+ObjectList
+    :                               {$$ = NULL;}
+    | ObjectList Object             {$$ = TrLinkPeerNode ($1,$2);}
+    | error                         {$$ = AslDoError(); yyclearin;}
+    ;
+
+Object
+    : CompilerDirective             {}
+    | NamedObject                   {}
+    | NameSpaceModifier             {}
+    ;
+
+PackageList
+    :                               {$$ = NULL;}
+    | PackageElement
+    | PackageList ','               /* Allows a trailing comma at list end */
+    | PackageList ','
+        PackageElement              {$$ = TrLinkPeerNode ($1,$3);}
+    ;
+
+PackageElement
+    : DataObject                    {}
+    | NameString                    {}
+    ;
+
+    /* Rules for specifying the type of one method argument or return value */
+
+ParameterTypePackage
+    :                               {$$ = NULL;}
+    | ObjectTypeKeyword             {$$ = $1;}
+    | ParameterTypePackage ','
+        ObjectTypeKeyword           {$$ = TrLinkPeerNodes (2,$1,$3);}
+    ;
+
+ParameterTypePackageList
+    :                               {$$ = NULL;}
+    | ObjectTypeKeyword             {$$ = $1;}
+    | '{' ParameterTypePackage '}'  {$$ = $2;}
+    ;
+
+OptionalParameterTypePackage
+    :                               {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
+    | ',' ParameterTypePackageList  {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
+    ;
+
+    /* Rules for specifying the types for method arguments */
+
+ParameterTypesPackage
+    : ParameterTypePackageList      {$$ = $1;}
+    | ParameterTypesPackage ','
+        ParameterTypePackageList    {$$ = TrLinkPeerNodes (2,$1,$3);}
+    ;
+
+ParameterTypesPackageList
+    :                               {$$ = NULL;}
+    | ObjectTypeKeyword             {$$ = $1;}
+    | '{' ParameterTypesPackage '}' {$$ = $2;}
+    ;
+
+OptionalParameterTypesPackage
+    :                               {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
+    | ',' ParameterTypesPackageList {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
+    ;
+
+    /* ACPI 3.0 -- allow semicolons between terms */
 
 TermList
     :                               {$$ = NULL;}
@@ -256,22 +274,44 @@
     | error                         {$$ = AslDoError(); yyclearin;}
     ;
 
-CompilerDirective
-    : IncludeTerm                   {}
-    | ExternalTerm                  {}
+/*
+ * Case-Default list; allow only one Default term and unlimited Case terms
+ */
+CaseDefaultTermList
+    :                               {$$ = NULL;}
+    | CaseTerm  {}
+    | DefaultTerm   {}
+    | CaseDefaultTermList
+        CaseTerm                    {$$ = TrLinkPeerNode ($1,$2);}
+    | CaseDefaultTermList
+        DefaultTerm                 {$$ = TrLinkPeerNode ($1,$2);}
+
+/* Original - attempts to force zero or one default term within the switch */
+
+/*
+CaseDefaultTermList
+    :                               {$$ = NULL;}
+    | CaseTermList
+        DefaultTerm
+        CaseTermList                {$$ = TrLinkPeerNode ($1,TrLinkPeerNode ($2, $3));}
+    | CaseTermList
+        CaseTerm                    {$$ = TrLinkPeerNode ($1,$2);}
     ;
 
-ObjectList
+CaseTermList
     :                               {$$ = NULL;}
-    | ObjectList Object             {$$ = TrLinkPeerNode ($1,$2);}
-    | error                         {$$ = AslDoError(); yyclearin;}
+    | CaseTerm                      {}
+    | CaseTermList
+        CaseTerm                    {$$ = TrLinkPeerNode ($1,$2);}
     ;
+*/
 
-Object
-    : CompilerDirective             {}
-    | NamedObject                   {}
-    | NameSpaceModifier             {}
-    ;
+
+/*******************************************************************************
+ *
+ * ASL Data and Constant Terms
+ *
+ ******************************************************************************/
 
 DataObject
     : BufferData                    {}
@@ -303,6 +343,94 @@
     | String                        {}
     ;
 
+ByteConst
+    : Integer                       {$$ = TrUpdateNode (PARSEOP_BYTECONST, $1);}
+    ;
+
+WordConst
+    : Integer                       {$$ = TrUpdateNode (PARSEOP_WORDCONST, $1);}
+    ;
+
+DWordConst
+    : Integer                       {$$ = TrUpdateNode (PARSEOP_DWORDCONST, $1);}
+    ;
+
+QWordConst
+    : Integer                       {$$ = TrUpdateNode (PARSEOP_QWORDCONST, $1);}
+    ;
+
+/*
+ * The NODE_COMPILE_TIME_CONST flag in the following constant expressions
+ * enables compile-time constant folding to reduce the Type3Opcodes/Type2IntegerOpcodes
+ * to simple integers. It is an error if these types of expressions cannot be
+ * reduced, since the AML grammar for ****ConstExpr requires a simple constant.
+ * Note: The required byte length of the constant is passed through to the
+ * constant folding code in the node AmlLength field.
+ */
+ByteConstExpr
+    : Type3Opcode                   {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 1);}
+    | Type2IntegerOpcode            {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 1);}
+    | ConstExprTerm                 {$$ = TrUpdateNode (PARSEOP_BYTECONST, $1);}
+    | ByteConst                     {}
+    ;
+
+WordConstExpr
+    : Type3Opcode                   {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 2);}
+    | Type2IntegerOpcode            {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 2);}
+    | ConstExprTerm                 {$$ = TrUpdateNode (PARSEOP_WORDCONST, $1);}
+    | WordConst                     {}
+    ;
+
+DWordConstExpr
+    : Type3Opcode                   {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 4);}
+    | Type2IntegerOpcode            {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 4);}
+    | ConstExprTerm                 {$$ = TrUpdateNode (PARSEOP_DWORDCONST, $1);}
+    | DWordConst                    {}
+    ;
+
+QWordConstExpr
+    : Type3Opcode                   {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 8);}
+    | Type2IntegerOpcode            {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 8);}
+    | ConstExprTerm                 {$$ = TrUpdateNode (PARSEOP_QWORDCONST, $1);}
+    | QWordConst                    {}
+    ;
+
+ConstTerm
+    : ConstExprTerm                 {}
+    | PARSEOP_REVISION              {$$ = TrCreateLeafNode (PARSEOP_REVISION);}
+    ;
+
+ConstExprTerm
+    : PARSEOP_ZERO                  {$$ = TrCreateValuedLeafNode (PARSEOP_ZERO, 0);}
+    | PARSEOP_ONE                   {$$ = TrCreateValuedLeafNode (PARSEOP_ONE, 1);}
+    | PARSEOP_ONES                  {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_UINT64_MAX);}
+    | PARSEOP___DATE__              {$$ = TrCreateConstantLeafNode (PARSEOP___DATE__);}
+    | PARSEOP___FILE__              {$$ = TrCreateConstantLeafNode (PARSEOP___FILE__);}
+    | PARSEOP___LINE__              {$$ = TrCreateConstantLeafNode (PARSEOP___LINE__);}
+    | PARSEOP___PATH__              {$$ = TrCreateConstantLeafNode (PARSEOP___PATH__);}
+    ;
+
+Integer
+    : PARSEOP_INTEGER               {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, AslCompilerlval.i);}
+    ;
+
+String
+    : PARSEOP_STRING_LITERAL        {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, (ACPI_NATIVE_INT) AslCompilerlval.s);}
+    ;
+
+
+/*******************************************************************************
+ *
+ * ASL Opcode Terms
+ *
+ ******************************************************************************/
+
+CompilerDirective
+    : IncludeTerm                   {}
+    | IncludeEndTerm                {}
+    | ExternalTerm                  {}
+    ;
+
 NamedObject
     : BankFieldTerm                 {}
     | CreateBitFieldTerm            {}
@@ -331,40 +459,18 @@
     | ScopeTerm                     {}
     ;
 
-MethodInvocationTerm
-    : NameString '('                {TrUpdateNode (PARSEOP_METHODCALL, $1);}
-        ArgList ')'                 {$$ = TrLinkChildNode ($1,$4);}
-    ;
-
-ArgList
-    :                               {$$ = NULL;}
-    | TermArg
-    | ArgList ','                   /* Allows a trailing comma at list end */
-    | ArgList ','
-        TermArg                     {$$ = TrLinkPeerNode ($1,$3);}
-    ;
+/* For ObjectType: SuperName except for MethodInvocationTerm */