svn commit: r306686 - in head: sys/arm64/acpica sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/...

Jung-uk Kim jkim at FreeBSD.org
Tue Oct 4 20:27:18 UTC 2016


Author: jkim
Date: Tue Oct  4 20:27:15 2016
New Revision: 306686
URL: https://svnweb.freebsd.org/changeset/base/306686

Log:
  Merge ACPICA 20160930.

Added:
  head/sys/contrib/dev/acpica/compiler/aslhelp.c
     - copied, changed from r305162, vendor-sys/acpica/dist/source/compiler/aslhelp.c
  head/sys/contrib/dev/acpica/compiler/aslhelpers.y
     - copied unchanged from r303639, vendor-sys/acpica/dist/source/compiler/aslhelpers.y
  head/sys/contrib/dev/acpica/compiler/aslkeywords.y
     - copied unchanged from r303639, vendor-sys/acpica/dist/source/compiler/aslkeywords.y
  head/sys/contrib/dev/acpica/compiler/aslprimaries.y
     - copied unchanged from r303639, vendor-sys/acpica/dist/source/compiler/aslprimaries.y
  head/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c
     - copied, changed from r305162, vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c
  head/sys/contrib/dev/acpica/include/platform/acgccex.h
     - copied unchanged from r303639, vendor-sys/acpica/dist/source/include/platform/acgccex.h
Deleted:
  head/sys/contrib/dev/acpica/components/utilities/utprint.c
  head/sys/contrib/dev/acpica/os_specific/service_layers/oslibcfs.c
Modified:
  head/sys/arm64/acpica/OsdEnvironment.c
  head/sys/conf/files
  head/sys/contrib/dev/acpica/acpica_prep.sh
  head/sys/contrib/dev/acpica/changes.txt
  head/sys/contrib/dev/acpica/common/acfileio.c
  head/sys/contrib/dev/acpica/common/acgetline.c
  head/sys/contrib/dev/acpica/common/adisasm.c
  head/sys/contrib/dev/acpica/common/ahtable.c
  head/sys/contrib/dev/acpica/common/cmfsize.c
  head/sys/contrib/dev/acpica/common/dmtable.c
  head/sys/contrib/dev/acpica/common/dmtables.c
  head/sys/contrib/dev/acpica/common/dmtbdump.c
  head/sys/contrib/dev/acpica/common/dmtbinfo.c
  head/sys/contrib/dev/acpica/common/getopt.c
  head/sys/contrib/dev/acpica/compiler/aslcompiler.h
  head/sys/contrib/dev/acpica/compiler/aslcstyle.y
  head/sys/contrib/dev/acpica/compiler/aslmain.c
  head/sys/contrib/dev/acpica/compiler/aslmaputils.c
  head/sys/contrib/dev/acpica/compiler/asloperands.c
  head/sys/contrib/dev/acpica/compiler/aslopt.c
  head/sys/contrib/dev/acpica/compiler/asloptions.c
  head/sys/contrib/dev/acpica/compiler/aslparser.y
  head/sys/contrib/dev/acpica/compiler/aslresources.y
  head/sys/contrib/dev/acpica/compiler/aslrules.y
  head/sys/contrib/dev/acpica/compiler/aslstubs.c
  head/sys/contrib/dev/acpica/compiler/asltokens.y
  head/sys/contrib/dev/acpica/compiler/asltypes.y
  head/sys/contrib/dev/acpica/compiler/aslutils.c
  head/sys/contrib/dev/acpica/compiler/aslxref.c
  head/sys/contrib/dev/acpica/compiler/dtcompiler.h
  head/sys/contrib/dev/acpica/compiler/dtfield.c
  head/sys/contrib/dev/acpica/compiler/dtparser.y
  head/sys/contrib/dev/acpica/compiler/dttable.c
  head/sys/contrib/dev/acpica/compiler/dttemplate.h
  head/sys/contrib/dev/acpica/compiler/dtutils.c
  head/sys/contrib/dev/acpica/compiler/prparser.y
  head/sys/contrib/dev/acpica/components/debugger/dbconvert.c
  head/sys/contrib/dev/acpica/components/debugger/dbexec.c
  head/sys/contrib/dev/acpica/components/debugger/dbfileio.c
  head/sys/contrib/dev/acpica/components/debugger/dbinput.c
  head/sys/contrib/dev/acpica/components/debugger/dbmethod.c
  head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c
  head/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c
  head/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
  head/sys/contrib/dev/acpica/components/disassembler/dmresrcl.c
  head/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
  head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c
  head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c
  head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c
  head/sys/contrib/dev/acpica/components/events/evgpe.c
  head/sys/contrib/dev/acpica/components/events/evgpeinit.c
  head/sys/contrib/dev/acpica/components/events/evrgnini.c
  head/sys/contrib/dev/acpica/components/events/evxfgpe.c
  head/sys/contrib/dev/acpica/components/executer/exconcat.c
  head/sys/contrib/dev/acpica/components/executer/exconfig.c
  head/sys/contrib/dev/acpica/components/executer/exconvrt.c
  head/sys/contrib/dev/acpica/components/executer/exmisc.c
  head/sys/contrib/dev/acpica/components/executer/exoparg1.c
  head/sys/contrib/dev/acpica/components/executer/exresop.c
  head/sys/contrib/dev/acpica/components/executer/extrace.c
  head/sys/contrib/dev/acpica/components/executer/exutils.c
  head/sys/contrib/dev/acpica/components/hardware/hwgpe.c
  head/sys/contrib/dev/acpica/components/namespace/nsconvert.c
  head/sys/contrib/dev/acpica/components/namespace/nsload.c
  head/sys/contrib/dev/acpica/components/namespace/nsparse.c
  head/sys/contrib/dev/acpica/components/namespace/nsutils.c
  head/sys/contrib/dev/acpica/components/parser/psparse.c
  head/sys/contrib/dev/acpica/components/parser/psxface.c
  head/sys/contrib/dev/acpica/components/tables/tbdata.c
  head/sys/contrib/dev/acpica/components/tables/tbfadt.c
  head/sys/contrib/dev/acpica/components/tables/tbfind.c
  head/sys/contrib/dev/acpica/components/tables/tbinstal.c
  head/sys/contrib/dev/acpica/components/tables/tbutils.c
  head/sys/contrib/dev/acpica/components/tables/tbxface.c
  head/sys/contrib/dev/acpica/components/tables/tbxfload.c
  head/sys/contrib/dev/acpica/components/tables/tbxfroot.c
  head/sys/contrib/dev/acpica/components/utilities/utaddress.c
  head/sys/contrib/dev/acpica/components/utilities/utbuffer.c
  head/sys/contrib/dev/acpica/components/utilities/utdebug.c
  head/sys/contrib/dev/acpica/components/utilities/uthex.c
  head/sys/contrib/dev/acpica/components/utilities/utinit.c
  head/sys/contrib/dev/acpica/components/utilities/utnonansi.c
  head/sys/contrib/dev/acpica/components/utilities/utosi.c
  head/sys/contrib/dev/acpica/components/utilities/utpredef.c
  head/sys/contrib/dev/acpica/components/utilities/uttrack.c
  head/sys/contrib/dev/acpica/components/utilities/utxface.c
  head/sys/contrib/dev/acpica/components/utilities/utxfinit.c
  head/sys/contrib/dev/acpica/include/acapps.h
  head/sys/contrib/dev/acpica/include/acclib.h
  head/sys/contrib/dev/acpica/include/acconfig.h
  head/sys/contrib/dev/acpica/include/acdebug.h
  head/sys/contrib/dev/acpica/include/acdisasm.h
  head/sys/contrib/dev/acpica/include/acevents.h
  head/sys/contrib/dev/acpica/include/acglobal.h
  head/sys/contrib/dev/acpica/include/aclocal.h
  head/sys/contrib/dev/acpica/include/acnamesp.h
  head/sys/contrib/dev/acpica/include/acparser.h
  head/sys/contrib/dev/acpica/include/acpiosxf.h
  head/sys/contrib/dev/acpica/include/acpixf.h
  head/sys/contrib/dev/acpica/include/actables.h
  head/sys/contrib/dev/acpica/include/actbl.h
  head/sys/contrib/dev/acpica/include/actypes.h
  head/sys/contrib/dev/acpica/include/acutils.h
  head/sys/contrib/dev/acpica/include/platform/acenv.h
  head/sys/contrib/dev/acpica/include/platform/acenvex.h
  head/sys/contrib/dev/acpica/include/platform/acfreebsd.h
  head/sys/contrib/dev/acpica/include/platform/acgcc.h
  head/sys/contrib/dev/acpica/os_specific/service_layers/osunixxf.c
  head/sys/dev/acpica/Osd/OsdTable.c
  head/sys/x86/acpica/OsdEnvironment.c
  head/sys/x86/acpica/madt.c
  head/sys/x86/acpica/srat.c
  head/sys/x86/xen/pvcpu_enum.c
  head/usr.sbin/acpi/acpidb/Makefile
  head/usr.sbin/acpi/iasl/Makefile
Directory Properties:
  head/sys/contrib/dev/acpica/   (props changed)

Modified: head/sys/arm64/acpica/OsdEnvironment.c
==============================================================================
--- head/sys/arm64/acpica/OsdEnvironment.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/arm64/acpica/OsdEnvironment.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$");
 #include <sys/sysctl.h>
 
 #include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/aclocal.h>
 #include <contrib/dev/acpica/include/actables.h>
 
 static u_long acpi_root_phys;

Modified: head/sys/conf/files
==============================================================================
--- head/sys/conf/files	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/conf/files	Tue Oct  4 20:27:15 2016	(r306686)
@@ -480,6 +480,7 @@ contrib/dev/acpica/components/utilities/
 contrib/dev/acpica/components/utilities/utresrc.c	optional acpi
 contrib/dev/acpica/components/utilities/utstate.c	optional acpi
 contrib/dev/acpica/components/utilities/utstring.c	optional acpi
+contrib/dev/acpica/components/utilities/utstrtoul64.c	optional acpi
 contrib/dev/acpica/components/utilities/utuuid.c	optional acpi acpi_debug
 contrib/dev/acpica/components/utilities/utxface.c	optional acpi
 contrib/dev/acpica/components/utilities/utxferror.c	optional acpi

Modified: head/sys/contrib/dev/acpica/acpica_prep.sh
==============================================================================
--- head/sys/contrib/dev/acpica/acpica_prep.sh	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/acpica_prep.sh	Tue Oct  4 20:27:15 2016	(r306686)
@@ -23,7 +23,7 @@ stripfiles="Makefile README accygwin.h a
 	acmacosx.h acmsvc.h acmsvcex.h acnetbsd.h acos2.h acqnx.h	\
 	acwin.h acwin64.h acwinex.h new_table.txt osbsdtbl.c osefitbl.c	\
 	osefixf.c osfreebsdtbl.c oslinuxtbl.c osunixdir.c osunixmap.c	\
-	oswindir.c oswintbl.c oswinxf.c readme.txt utclib.c"
+	oswindir.c oswintbl.c oswinxf.c readme.txt utclib.c utprint.c"
 
 # include files to canonify
 src_headers="acapps.h acbuffer.h acclib.h accommon.h acconfig.h		\
@@ -87,6 +87,6 @@ rm -rf ${wrk}
 # assist the developer in generating a diff
 echo "Directories you may want to 'svn diff':"
 echo "    sys/contrib/dev/acpica sys/dev/acpica \\"
-echo "    sys/amd64/acpica sys/i386/acpica sys/x86/acpica \\"
-echo "    sys/amd64/include sys/i386/include include \\"
+echo "    sys/amd64/acpica sys/arm64/acpica sys/i386/acpica sys/x86/acpica \\"
+echo "    sys/amd64/include sys/arm64/include sys/i386/include include \\"
 echo "    sys/boot sys/conf sys/modules/acpi usr.sbin/acpi"

Modified: head/sys/contrib/dev/acpica/changes.txt
==============================================================================
--- head/sys/contrib/dev/acpica/changes.txt	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/changes.txt	Tue Oct  4 20:27:15 2016	(r306686)
@@ -1,7 +1,249 @@
 ----------------------------------------
-27 May 2016. Summary of changes for version 20160527:
+30 September 2016. Summary of changes for version 20160930:
 
-This release is available at https://acpica.org/downloads
+
+1) ACPICA kernel-resident subsystem:
+
+Fixed a regression in the internal AcpiTbFindTable function where a non 
+AE_OK exception could inadvertently be returned even if the function did 
+not fail. This problem affects the following operators:
+    DataTableRegion
+    LoadTable
+
+Fixed a regression in the LoadTable operator where a load to any 
+namespace location other than the root no longer worked properly.
+
+Increased the maximum loop count value that will result in the 
+AE_AML_INFINITE_LOOP exception. This is a mechanism that is intended to 
+prevent infinite loops within the AML interpreter and thus the host OS 
+kernel. The value is increased from 0xFFFF to 0xFFFFF loops (65,535 to 
+1,048,575).
+
+Moved the AcpiGbl_MaxLoopIterations configuration variable to the public 
+acpixf.h file. This allows hosts to easily configure the maximum loop 
+count at runtime.
+
+Removed an illegal character in the strtoul64.c file. This character 
+caused errors with some C compilers.
+
+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: 140.4K Code, 58.1K Data, 198.5K Total
+    Debug Version:     200.7K Code, 82.1K Data, 282.8K Total
+  Previous Release:
+    Non-Debug Version: 140.0K Code, 58.1K Data, 198.1K Total
+    Debug Version:     200.3K Code, 82.1K Data, 282.4K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Disassembler: Fixed a problem with the conversion of Else{If{ blocks into 
+the simpler ASL ElseIf keyword. During the conversion, a trailing If 
+block could be lost and missing from the disassembled output.
+
+iASL: Fixed a missing parser rule for the ObjectType operator. For ASL+, 
+the missing rule caused a parse error when using the Index operator as an 
+operand to ObjectType. This construct now compiles properly. Example:
+    ObjectType(PKG1[4]).
+
+iASL: Correctly handle unresolved symbols in the hardware map file (-lm 
+option). Previously, unresolved symbols could cause a protection fault. 
+Such symbols are now marked as unresolved in the map file.
+
+iASL: Implemented support to allow control method invocations as an 
+operand to the ASL DeRefOf operator. Example:
+    DeRefOf(MTH1(Local0))
+
+Disassembler: Improved support for the ToPLD ASL macro. Detection of a 
+possible _PLD buffer now includes examination of both the normal buffer 
+length (16 or 20) as well as the surrounding AML package length.
+
+Disassembler: Fixed a problem with the decoding of complex expressions 
+within the Divide operator for ASL+. For the case where both the quotient 
+and remainder targets are specified, the entire statement cannot be 
+disassembled. Previously, the output incorrectly contained a mix of ASL- 
+and ASL+ operators. This mixed statement causes a syntax error when 
+compiled. Example:
+    Divide (Add (INT1, 6), 128, RSLT, QUOT)  // was incorrectly 
+disassembled to:
+    Divide (INT1 + 6, 128, RSLT, QUOT)
+
+iASL/Tools: Added support to process AML and non-AML ACPI tables 
+consistently. For the disassembler and AcpiExec, allow all types of ACPI 
+tables (AML and data tables). For the iASL -e option, allow only AML 
+tables (DSDT/SSDT).
+
+----------------------------------------
+31 August 2016. Summary of changes for version 20160831:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Improve support for the so-called "module-level code", which is defined 
+to be math, logical and control AML opcodes that appear outside of any 
+control method. This change improves the support by adding more opcodes 
+that can be executed in the manner. Some other issues have been solved, 
+and the ASL grammar changes to support such code under all scope 
+operators (Device, etc.) are complete. Lv Zheng.
+
+UEFI support: these OSL functions have been implemented. This is an 
+additional step toward supporting the AcpiExec utility natively (with 
+full hardware access) under UEFI. Marcelo Ferreira.
+    AcpiOsReadPciConfiguration
+    AcpiOsWritePciConfiguration
+
+Fixed a possible mutex error during control method auto-serialization. Lv 
+Zheng. 
+
+Updated support for the Generic Address Structure by fully implementing 
+all GAS fields when a 32-bit address is expanded to a 64-bit GAS. Lv 
+Zheng.
+
+Updated the return value for the internal _OSI method. Instead of 
+0xFFFFFFFF, the "Ones" value is now returned, which is 0xFFFFFFFFFFFFFFFF 
+for 64-bit ACPI tables. This fixes an incompatibility with other ACPI 
+implementations, and will be reflected and clarified in the next version 
+of the ACPI specification.
+
+Implemented two new table events that can be passed to an ACPICA table 
+handler. These events are used to indicate a table installation or 
+uninstallation. These events are used in addition to existed table load 
+and unload events. Lv Zheng.
+
+Implemented a cleanup for all internal string-to-integer conversions. 
+Consolidate multiple versions of this functionality and limit possible 
+bases to either 10 or 16 to simplify the code. Adds a new file, 
+utstrtoul64.
+
+Cleanup the inclusion order of the various compiler-specific headers. 
+This simplifies build configuration management. The compiler-specific 
+headers are now split out from the host-specific headers. 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: 140.1K Code, 58.1K Data, 198.1K Total
+    Debug Version:     200.3K Code, 82.1K Data, 282.4K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL/AcpiExec: Added a command line option to display the build date/time 
+of the tool (-vd). This can be useful to verify that the correct version 
+of the tools are being used.
+
+AML Debugger: Implemented a new subcommand ("execute predef") to execute 
+all predefined control methods and names within the current namespace. 
+This can be useful for debugging problems with ACPI tables and the ACPI 
+namespace.
+
+----------------------------------------
+29 July 2016. Summary of changes for version 20160729:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Implemented basic UEFI support for the various ACPICA tools. This 
+includes:
+1) An OSL to implement the various AcpiOs* interfaces on UEFI.
+2) Support to obtain the ACPI tables on UEFI.
+3) Local implementation of required C library functions not available on 
+UEFI.
+4) A front-end (main) function for the tools for UEFI-related 
+initialization.
+
+The initial deployment of this support is the AcpiDump utility executing 
+as an UEFI application via EDK2 (EDKII, "UEFI Firmware Development Kit"). 
+Current environments supported are Linux/Unix. MSVC generation is not 
+supported at this time. See the generate/efi/README file for build 
+instructions. Lv Zheng.
+
+Future plans include porting the AcpiExec utility to execute natively on 
+the platform with I/O and memory access. This will allow viewing/dump of 
+the platform namespace and native execution of ACPI control methods that 
+access the actual hardware. To fully implement this support, the OSL 
+functions below must be implemented with UEFI interfaces. Any community 
+help in the implementation of these functions would be appreciated:
+    AcpiOsReadPort
+    AcpiOsWritePort
+    AcpiOsReadMemory
+    AcpiOsWriteMemory
+    AcpiOsReadPciConfiguration
+    AcpiOsWritePciConfiguration
+
+Restructured and standardized the C library configuration for ACPICA, 
+resulting in the various configuration options below. This includes a 
+global restructuring of the compiler-dependent and platform-dependent 
+include files. These changes may affect the existing platform-dependent 
+configuration files on some hosts. Lv Zheng. 
+
+The current C library configuration options appear below. For any issues, 
+it may be helpful to examine the existing compiler-dependent and 
+platform-dependent files as examples. Lv Zheng. 
+
+1) Linux kernel:
+    ACPI_USE_STANDARD_HEADERS=n in order not to use system-provided C 
+library.
+    ACPI_USE_SYSTEM_CLIBRARY=y in order not to use ACPICA mini C library.
+2) Unix/Windows/BSD applications:
+    ACPI_USE_STANDARD_HEADERS=y in order to use system-provided C 
+library.
+    ACPI_USE_SYSTEM_CLIBRARY=y in order not to use ACPICA mini C library.
+3) UEFI applications:
+    ACPI_USE_STANDARD_HEADERS=n in order not to use system-provided C 
+library.
+    ACPI_USE_SYSTEM_CLIBRARY=n in order to use ACPICA mini C library.
+4) UEFI applications (EDK2/StdLib):
+    ACPI_USE_STANDARD_HEADERS=y in order to use EDK2 StdLib C library.
+    ACPI_USE_SYSTEM_CLIBRARY=y in order to use EDK2 StdLib C library.
+
+
+AML interpreter: "module-level code" support. Allows for execution of so-
+called "executable" AML code (math/logical operations, etc.) outside of 
+control methods not just at the module level (top level) but also within 
+any scope declared outside of a control method - Scope{}, Device{}, 
+Processor{}, PowerResource{}, and ThermalZone{}. Lv Zheng. 
+
+Simplified the configuration of the "maximum AML loops" global option by 
+adding a global public variable, "AcpiGbl_MaxLoopIterations" which can be 
+modified at runtime.
+
+
+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: 139.1K Code, 22.9K Data, 162.0K Total
+    Debug Version:     199.0K Code, 81.8K Data, 280.8K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Add full support for the RASF ACPI table (RAS Features Table). 
+Includes disassembler, data table compiler, and header support.
+
+iASL Expand "module-level code" support. Allows for 
+compilation/disassembly of so-called "executable" AML code (math/logical 
+operations, etc.) outside of control methods not just at the module level 
+(top level) but also within any scope declared outside of a control 
+method - Scope{}, Device{}, Processor{}, PowerResource{}, and 
+ThermalZone{}.
+
+AcpiDump: Added support for dumping all SSDTs on newer versions of 
+Windows. These tables are now easily available -- SSDTs are not available 
+through the registry on older versions.
+
+----------------------------------------
+27 May 2016. Summary of changes for version 20160527:
 
 
 1) ACPICA kernel-resident subsystem:

Modified: head/sys/contrib/dev/acpica/common/acfileio.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/acfileio.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/common/acfileio.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -43,10 +43,9 @@
 
 #include <contrib/dev/acpica/include/acpi.h>
 #include <contrib/dev/acpica/include/accommon.h>
-#include <contrib/dev/acpica/include/acapps.h>
 #include <contrib/dev/acpica/include/actables.h>
 #include <contrib/dev/acpica/include/acutils.h>
-#include <errno.h>
+#include <contrib/dev/acpica/include/acapps.h>
 
 #define _COMPONENT          ACPI_UTILITIES
         ACPI_MODULE_NAME    ("acfileio")
@@ -98,7 +97,7 @@ AcGetAllTablesFromFile (
     File = fopen (Filename, "rb");
     if (!File)
     {
-        perror ("Could not open input file");
+        fprintf (stderr, "Could not open input file: %s\n", Filename);
         if (errno == ENOENT)
         {
             return (AE_NOT_EXIST);
@@ -263,12 +262,14 @@ AcGetOneTableFromFile (
         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))
+        /*
+         * Table must be an AML table (DSDT/SSDT).
+         * Used for iASL -e option only.
+         */
+        if (!AcpiUtIsAmlTable (&TableHeader))
         {
             fprintf (stderr,
                 "    %s: Table [%4.4s] is not an AML table - ignoring\n",
@@ -280,7 +281,7 @@ AcGetOneTableFromFile (
 
     /* Allocate a buffer for the entire table */
 
-    Table = AcpiOsAllocate ((size_t) TableHeader.Length);
+    Table = AcpiOsAllocate ((ACPI_SIZE) TableHeader.Length);
     if (!Table)
     {
         return (AE_NO_MEMORY);
@@ -388,7 +389,7 @@ AcValidateTableHeader (
     long                    TableOffset)
 {
     ACPI_TABLE_HEADER       TableHeader;
-    size_t                  Actual;
+    ACPI_SIZE               Actual;
     long                    OriginalOffset;
     UINT32                  FileSize;
     UINT32                  i;

Modified: head/sys/contrib/dev/acpica/common/acgetline.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/acgetline.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/common/acgetline.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -47,8 +47,6 @@
 #include <contrib/dev/acpica/include/acparser.h>
 #include <contrib/dev/acpica/include/acdebug.h>
 
-#include <stdio.h>
-
 /*
  * This is an os-independent implementation of line-editing services needed
  * by the AcpiExec utility. It uses getchar() and putchar() and the existing

Modified: head/sys/contrib/dev/acpica/common/adisasm.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/adisasm.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/common/adisasm.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -49,8 +49,6 @@
 #include <contrib/dev/acpica/include/acparser.h>
 #include <contrib/dev/acpica/include/acapps.h>
 
-#include <stdio.h>
-
 
 #define _COMPONENT          ACPI_TOOLS
         ACPI_MODULE_NAME    ("adisasm")

Modified: head/sys/contrib/dev/acpica/common/ahtable.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/ahtable.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/common/ahtable.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -124,6 +124,7 @@ const AH_TABLE      AcpiSupportedTables[
     {ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"},
     {ACPI_SIG_PCCT, "Platform Communications Channel Table"},
     {ACPI_SIG_PMTT, "Platform Memory Topology Table"},
+    {ACPI_SIG_RASF, "RAS Features Table"},
     {ACPI_RSDP_NAME,"Root System Description Pointer"},
     {ACPI_SIG_RSDT, "Root System Description Table"},
     {ACPI_SIG_S3PT, "S3 Performance Table"},

Modified: head/sys/contrib/dev/acpica/common/cmfsize.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/cmfsize.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/common/cmfsize.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -44,7 +44,6 @@
 #include <contrib/dev/acpica/include/acpi.h>
 #include <contrib/dev/acpica/include/accommon.h>
 #include <contrib/dev/acpica/include/acapps.h>
-#include <stdio.h>
 
 #define _COMPONENT          ACPI_TOOLS
         ACPI_MODULE_NAME    ("cmfsize")
@@ -74,19 +73,19 @@ CmGetFileSize (
 
     /* Save the current file pointer, seek to EOF to obtain file size */
 
-    CurrentOffset = AcpiOsGetFileOffset (File);
+    CurrentOffset = ftell (File);
     if (CurrentOffset < 0)
     {
         goto OffsetError;
     }
 
-    Status = AcpiOsSetFileOffset (File, 0, ACPI_FILE_END);
+    Status = fseek (File, 0, SEEK_END);
     if (ACPI_FAILURE (Status))
     {
         goto SeekError;
     }
 
-    FileSize = AcpiOsGetFileOffset (File);
+    FileSize = ftell (File);
     if (FileSize < 0)
     {
         goto OffsetError;
@@ -94,7 +93,7 @@ CmGetFileSize (
 
     /* Restore original file pointer */
 
-    Status = AcpiOsSetFileOffset (File, CurrentOffset, ACPI_FILE_BEGIN);
+    Status = fseek (File, CurrentOffset, SEEK_SET);
     if (ACPI_FAILURE (Status))
     {
         goto SeekError;
@@ -104,10 +103,10 @@ CmGetFileSize (
 
 
 OffsetError:
-    AcpiLogError ("Could not get file offset");
+    fprintf (stderr, "Could not get file offset\n");
     return (ACPI_UINT32_MAX);
 
 SeekError:
-    AcpiLogError ("Could not set file offset");
+    fprintf (stderr, "Could not set file offset\n");
     return (ACPI_UINT32_MAX);
 }

Modified: head/sys/contrib/dev/acpica/common/dmtable.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmtable.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/common/dmtable.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -358,6 +358,7 @@ const ACPI_DMTABLE_DATA     AcpiDmTableD
     {ACPI_SIG_NFIT, AcpiDmTableInfoNfit,    AcpiDmDumpNfit, DtCompileNfit,  TemplateNfit},
     {ACPI_SIG_PCCT, AcpiDmTableInfoPcct,    AcpiDmDumpPcct, DtCompilePcct,  TemplatePcct},
     {ACPI_SIG_PMTT, NULL,                   AcpiDmDumpPmtt, DtCompilePmtt,  TemplatePmtt},
+    {ACPI_SIG_RASF, AcpiDmTableInfoRasf,    NULL,           NULL,           TemplateRasf},
     {ACPI_SIG_RSDT, NULL,                   AcpiDmDumpRsdt, DtCompileRsdt,  TemplateRsdt},
     {ACPI_SIG_S3PT, NULL,                   NULL,           NULL,           TemplateS3pt},
     {ACPI_SIG_SBST, AcpiDmTableInfoSbst,    NULL,           NULL,           TemplateSbst},
@@ -844,6 +845,11 @@ AcpiDmDumpTable (
             ByteLength = 10;
             break;
 
+        case ACPI_DMT_BUF12:
+
+            ByteLength = 12;
+            break;
+
         case ACPI_DMT_BUF16:
         case ACPI_DMT_UUID:
 
@@ -1006,6 +1012,7 @@ AcpiDmDumpTable (
 
         case ACPI_DMT_BUF7:
         case ACPI_DMT_BUF10:
+        case ACPI_DMT_BUF12:
         case ACPI_DMT_BUF16:
         case ACPI_DMT_BUF128:
             /*

Modified: head/sys/contrib/dev/acpica/common/dmtables.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmtables.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/common/dmtables.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -42,14 +42,12 @@
  */
 
 #include <contrib/dev/acpica/compiler/aslcompiler.h>
-#include <contrib/dev/acpica/include/acapps.h>
 #include <contrib/dev/acpica/include/acdispat.h>
 #include <contrib/dev/acpica/include/acnamesp.h>
 #include <contrib/dev/acpica/include/actables.h>
 #include <contrib/dev/acpica/include/acparser.h>
+#include <contrib/dev/acpica/include/acapps.h>
 
-#include <stdio.h>
-#include <time.h>
 
 #define _COMPONENT          ACPI_TOOLS
         ACPI_MODULE_NAME    ("dmtables")

Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmtbdump.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/common/dmtbdump.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -52,12 +52,31 @@
         ACPI_MODULE_NAME    ("dmtbdump")
 
 
-/* Local prototypes */
+/* Table of revision-dependent FADT sizes */
 
-static void
-AcpiDmValidateFadtLength (
-    UINT32                  Revision,
-    UINT32                  Length);
+static const UINT32         FadtRevisionLength [ACPI_FADT_MAX_VERSION + 1] =
+{
+    0,                      /* 0 - illegal */
+    ACPI_FADT_V1_SIZE,      /* 1 - ACPI 1.0 */
+    0,                      /* 2 - illegal */
+    ACPI_FADT_V3_SIZE,      /* 3 - ACPI 2.0 */
+    ACPI_FADT_V4_SIZE,      /* 4 - ACPI 3.0 and ACPI 4.0 */
+    ACPI_FADT_V5_SIZE,      /* 5 - ACPI 5.0 */
+    ACPI_FADT_V6_SIZE       /* 6 - ACPI 6.0 */
+};
+
+/* Table of revision-dependent FADT info tables */
+
+ACPI_DMTABLE_INFO           *FadtRevisionInfo [ACPI_FADT_MAX_VERSION + 1] =
+{
+    NULL,                   /* 0 - illegal */
+    AcpiDmTableInfoFadt1,   /* 1 - ACPI 1.0 */
+    NULL,                   /* 2 - illegal */
+    AcpiDmTableInfoFadt3,   /* 3 - ACPI 2.0 */
+    AcpiDmTableInfoFadt4,   /* 4 - ACPI 3.0 and ACPI 4.0 */
+    AcpiDmTableInfoFadt5,   /* 5 - ACPI 5.0 */
+    AcpiDmTableInfoFadt6    /* 6 - ACPI 6.0 */
+};
 
 
 /*******************************************************************************
@@ -347,6 +366,11 @@ AcpiDmDumpXsdt (
  *
  * DESCRIPTION: Format the contents of a FADT
  *
+ *              Check the FADT revision against the expected table length for
+ *              that revision. Issue a warning if the length is not what was
+ *              expected. This seems to be such a common BIOS bug that the
+ *              FADT revision has been rendered virtually meaningless.
+ *
  * NOTE:        We cannot depend on the FADT version to indicate the actual
  *              contents of the FADT because of BIOS bugs. The table length
  *              is the only reliable indicator.
@@ -358,142 +382,72 @@ AcpiDmDumpFadt (
     ACPI_TABLE_HEADER       *Table)
 {
     ACPI_STATUS             Status;
+    UINT8                   FadtRevision;
+    UINT32                  ExpectedLength;
+    UINT32                  i;
 
 
-    /* Always dump the minimum FADT revision 1 fields (ACPI 1.0) */
+    FadtRevision = Table->Revision;
 
-    Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
-        AcpiDmTableInfoFadt1);
-    if (ACPI_FAILURE (Status))
+    /* FADT revision/length validation */
+
+    if ((FadtRevision == 0) ||
+        (FadtRevision == 2))
     {
+        AcpiOsPrintf (
+            "// ACPI Warning: Invalid or unsupported FADT revision: %u\n",
+            FadtRevision);
         return;
     }
 
-    /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */
-
-    if ((Table->Length > ACPI_FADT_V1_SIZE) &&
-        (Table->Length <= ACPI_FADT_V2_SIZE))
+    if (FadtRevision > ACPI_FADT_MAX_VERSION)
     {
-        Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
-            AcpiDmTableInfoFadt2);
-        if (ACPI_FAILURE (Status))
+        AcpiOsPrintf ("// ACPI Warning: Revision %u is not fully supported, "
+            "disassembling known fields (up to revision %u)\n\n",
+            FadtRevision, ACPI_FADT_MAX_VERSION);
+    }
+    else
+    {
+        ExpectedLength = FadtRevisionLength[FadtRevision];
+        if (Table->Length != ExpectedLength)
         {
-            return;
+            AcpiOsPrintf (
+                "// ACPI Warning: Input FADT revision %X does not match "
+                "expected length: found 0x%X expected 0x%X\n",
+                FadtRevision, Table->Length, ExpectedLength);
         }
     }
 
-    /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */
-
-    else if (Table->Length > ACPI_FADT_V2_SIZE)
+    /*
+     * Dump the input table on a per-version basis, but is actually
+     * based upon the length of the table. Table length must
+     * be larger than the required length of the previous version.
+     */
+    for (i = 1; i <= ACPI_FADT_MAX_VERSION; i++)
     {
-        Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
-            AcpiDmTableInfoFadt3);
-        if (ACPI_FAILURE (Status))
+        if (!FadtRevisionLength[i]) /* Skip any empty slots */
         {
-            return;
+            continue;
         }
 
-        /* Check for FADT revision 5 fields and up (ACPI 5.0+) */
+        /* Dump the fields specific to FADT revision[i] */
 
-        if (Table->Length > ACPI_FADT_V3_SIZE)
+        Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
+            FadtRevisionInfo[i]);
+        if (ACPI_FAILURE (Status))
         {
-            Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
-                AcpiDmTableInfoFadt5);
-            if (ACPI_FAILURE (Status))
-            {
-                return;
-            }
+            return;
         }
 
-        /* Check for FADT revision 6 fields and up (ACPI 6.0+) */
-
-        if (Table->Length > ACPI_FADT_V3_SIZE)
+        if (Table->Length <= FadtRevisionLength[i])
         {
-            Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
-                AcpiDmTableInfoFadt6);
-            if (ACPI_FAILURE (Status))
-            {
-                return;
-            }
+            break;  /* End of table */
         }
     }
 
-    /* Validate various fields in the FADT, including length */
+    /* Build a local FADT to test some FADT values */
 
     AcpiTbCreateLocalFadt (Table, Table->Length);
-
-    /* Validate FADT length against the revision */
-
-    AcpiDmValidateFadtLength (Table->Revision, Table->Length);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION:    AcpiDmValidateFadtLength
- *
- * PARAMETERS:  Revision            - FADT revision (Header->Revision)
- *              Length              - FADT length (Header->Length
- *
- * RETURN:      None
- *
- * DESCRIPTION: Check the FADT revision against the expected table length for
- *              that revision. Issue a warning if the length is not what was
- *              expected. This seems to be such a common BIOS bug that the
- *              FADT revision has been rendered virtually meaningless.
- *
- ******************************************************************************/
-
-static void
-AcpiDmValidateFadtLength (
-    UINT32                  Revision,
-    UINT32                  Length)
-{
-    UINT32                  ExpectedLength;
-
-
-    switch (Revision)
-    {
-    case 0:
-
-        AcpiOsPrintf ("// ACPI Warning: Invalid FADT revision: 0\n");
-        return;
-
-    case 1:
-
-        ExpectedLength = ACPI_FADT_V1_SIZE;
-        break;
-
-    case 2:
-
-        ExpectedLength = ACPI_FADT_V2_SIZE;
-        break;
-
-    case 3:
-    case 4:
-
-        ExpectedLength = ACPI_FADT_V3_SIZE;
-        break;
-
-    case 5:
-
-        ExpectedLength = ACPI_FADT_V5_SIZE;
-        break;
-
-    default:
-
-        return;
-    }
-
-    if (Length == ExpectedLength)
-    {
-        return;
-    }
-
-    AcpiOsPrintf (
-        "\n// ACPI Warning: FADT revision %X does not match length: "
-        "found %X expected %X\n",
-        Revision, Length, ExpectedLength);
 }
 
 

Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/dmtbinfo.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/common/dmtbinfo.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -106,6 +106,7 @@
 #define ACPI_NFIT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_NFIT,f)
 #define ACPI_PCCT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f)
 #define ACPI_PMTT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f)
+#define ACPI_RASF_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_RASF,f)
 #define ACPI_S3PT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_S3PT,f)
 #define ACPI_SBST_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SBST,f)
 #define ACPI_SLIT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIT,f)
@@ -399,7 +400,7 @@ ACPI_DMTABLE_INFO           AcpiDmTableI
  *
  ******************************************************************************/
 
-/* ACPI 1.0 FADT (Version 1) */
+/* FADT version 1 (ACPI 1.0) */
 
 ACPI_DMTABLE_INFO           AcpiDmTableInfoFadt1[] =
 {
@@ -485,18 +486,7 @@ ACPI_DMTABLE_INFO           AcpiDmTableI
     ACPI_DMT_TERMINATOR
 };
 
-/* ACPI 1.0 MS Extensions (FADT version 2) */
-
-ACPI_DMTABLE_INFO           AcpiDmTableInfoFadt2[] =
-{
-    {ACPI_DMT_GAS,      ACPI_FADT_OFFSET (ResetRegister),           "Reset Register", 0},
-    {ACPI_DMT_UINT8,    ACPI_FADT_OFFSET (ResetValue),              "Value to cause reset", 0},
-    {ACPI_DMT_UINT16,   ACPI_FADT_OFFSET (ArmBootFlags),            "Reserved", 0},
-    {ACPI_DMT_UINT8,    ACPI_FADT_OFFSET (MinorRevision),           "Reserved", 0},
-    ACPI_DMT_TERMINATOR
-};
-
-/* ACPI 2.0+ Extensions (FADT version 3, 4, and 5) */
+/* FADT version 3 (ACPI 2.0) */
 
 ACPI_DMTABLE_INFO           AcpiDmTableInfoFadt3[] =
 {
@@ -520,16 +510,23 @@ ACPI_DMTABLE_INFO           AcpiDmTableI
     ACPI_DMT_TERMINATOR
 };
 
-/* ACPI 5.0 Extensions (FADT version 5) */
+/* FADT version 4 (ACPI 3.0 and ACPI 4.0) */
 
-ACPI_DMTABLE_INFO           AcpiDmTableInfoFadt5[] =
+ACPI_DMTABLE_INFO           AcpiDmTableInfoFadt4[] =
 {
     {ACPI_DMT_GAS,      ACPI_FADT_OFFSET (SleepControl),            "Sleep Control Register", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/* FADT version 5 (ACPI 5.0) */
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoFadt5[] =
+{
     {ACPI_DMT_GAS,      ACPI_FADT_OFFSET (SleepStatus),             "Sleep Status Register", 0},
     ACPI_DMT_TERMINATOR
 };
 
-/* ACPI 6.0 Extensions (FADT version 6) */
+/* FADT version 6 (ACPI 6.0) */
 
 ACPI_DMTABLE_INFO           AcpiDmTableInfoFadt6[] =
 {
@@ -2440,6 +2437,18 @@ ACPI_DMTABLE_INFO           AcpiDmTableI
 
 /*******************************************************************************
  *
+ * RASF -  RAS Feature table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoRasf[] =
+{
+    {ACPI_DMT_BUF12,    ACPI_RASF_OFFSET (ChannelId[0]),            "Channel ID", 0},
+    ACPI_DMT_TERMINATOR
+};
+
+/*******************************************************************************
+ *
  * S3PT - S3 Performance Table
  *
  ******************************************************************************/

Modified: head/sys/contrib/dev/acpica/common/getopt.c
==============================================================================
--- head/sys/contrib/dev/acpica/common/getopt.c	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/common/getopt.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -57,7 +57,7 @@
 #include <contrib/dev/acpica/include/acapps.h>
 
 #define ACPI_OPTION_ERROR(msg, badchar) \
-    if (AcpiGbl_Opterr) {AcpiLogError ("%s%c\n", msg, badchar);}
+    if (AcpiGbl_Opterr) {fprintf (stderr, "%s%c\n", msg, badchar);}
 
 
 int                 AcpiGbl_Opterr = 1;
@@ -101,7 +101,7 @@ AcpiGetoptArgument (
     }
     else if (++AcpiGbl_Optind >= argc)
     {
-        ACPI_OPTION_ERROR ("Option requires an argument: -", 'v');
+        ACPI_OPTION_ERROR ("\nOption requires an argument", 0);
 
         CurrentCharPtr = 1;
         return (-1);

Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslcompiler.h	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h	Tue Oct  4 20:27:15 2016	(r306686)
@@ -62,7 +62,6 @@
 
 #include <stdio.h>
 #include <stdlib.h>
-#include <stdarg.h>
 #include <string.h>
 #include <errno.h>
 #include <ctype.h>
@@ -912,7 +911,7 @@ LkFindUnreferencedObjects (
     void);
 
 /*
- * aslmain - startup
+ * aslhelp - help screens
  */
 void
 Usage (
@@ -922,6 +921,10 @@ void
 AslFilenameHelp (
     void);
 
+void
+AslDisassemblyHelp (
+    void);
+
 
 /*
  * aslnamesp - namespace output file generation

Modified: head/sys/contrib/dev/acpica/compiler/aslcstyle.y
==============================================================================
--- head/sys/contrib/dev/acpica/compiler/aslcstyle.y	Tue Oct  4 20:26:18 2016	(r306685)
+++ head/sys/contrib/dev/acpica/compiler/aslcstyle.y	Tue Oct  4 20:27:15 2016	(r306686)
@@ -82,6 +82,13 @@ NoEcho('
  *  13)     = += -= *= /= %= <<= >>= &= ^= |=
  */
 
+
+/*******************************************************************************
+ *
+ * Basic operations for math and logical expressions.
+ *
+ ******************************************************************************/
+
 Expression
 
     /* Unary operators */
@@ -140,33 +147,43 @@ Expression
     | TermArg PARSEOP_EXP_LOGICAL_OR    {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
         TermArg                         {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
 
-        /* Parentheses */
+    /* Parentheses */
 
     | '(' TermArg ')'                   { $$ = $2;}
 
-        /* Index term -- "= BUF1[5]" on right-hand side of an equals (source) */
+    /* 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);
+    | 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) */
+    /* 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);
+    : SuperName PARSEOP_EXP_INDEX_LEFT
+        TermArg PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX);
                                         TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());}
     ;
 
+
+/*******************************************************************************
+ *
+ * All assignment-type operations -- math and logical. Includes simple
+ * assignment and compound assignments.
+ *
+ ******************************************************************************/
+
 EqualsTerm
 
-    /* All assignment-type operations */
+    /* Simple Store() operation */
 
     : SuperName PARSEOP_EXP_EQUALS
         TermArg                         {$$ = TrCreateAssignmentNode ($1, $3);}
 
+    /* Compound assignments -- Add (operand, operand, target) */
+
     | TermArg PARSEOP_EXP_ADD_EQ        {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
         TermArg                         {$$ = TrLinkChildren ($<n>3,3,$1,$4,
                                             TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}

Copied and modified: head/sys/contrib/dev/acpica/compiler/aslhelp.c (from r305162, vendor-sys/acpica/dist/source/compiler/aslhelp.c)
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslhelp.c	Wed Aug 31 21:40:51 2016	(r305162, copy source)
+++ head/sys/contrib/dev/acpica/compiler/aslhelp.c	Tue Oct  4 20:27:15 2016	(r306686)
@@ -41,8 +41,8 @@
  * POSSIBILITY OF SUCH DAMAGES.
  */
 
-#include "aslcompiler.h"
-#include "acapps.h"
+#include <contrib/dev/acpica/compiler/aslcompiler.h>
+#include <contrib/dev/acpica/include/acapps.h>
 
 #define _COMPONENT          ACPI_COMPILER
         ACPI_MODULE_NAME    ("aslhelp")

Copied: head/sys/contrib/dev/acpica/compiler/aslhelpers.y (from r303639, vendor-sys/acpica/dist/source/compiler/aslhelpers.y)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/sys/contrib/dev/acpica/compiler/aslhelpers.y	Tue Oct  4 20:27:15 2016	(r306686, copy of r303639, vendor-sys/acpica/dist/source/compiler/aslhelpers.y)
@@ -0,0 +1,286 @@
+NoEcho('
+/******************************************************************************
+ *
+ * Module Name: aslhelpers.y - helper and option terms
+ *
+ *****************************************************************************/
+
+/*
+ * 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 Helper Terms
+ *
+ ******************************************************************************/
+
+OptionalBusMasterKeyword
+    : ','                                   {$$ = TrCreateLeafNode (
+                                                PARSEOP_BUSMASTERTYPE_MASTER);}
+    | ',' PARSEOP_BUSMASTERTYPE_MASTER      {$$ = TrCreateLeafNode (
+                                                PARSEOP_BUSMASTERTYPE_MASTER);}

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


More information about the svn-src-all mailing list