svn commit: r327557 - in stable/11: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/c...

Jung-uk Kim jkim at FreeBSD.org
Thu Jan 4 19:43:45 UTC 2018


Author: jkim
Date: Thu Jan  4 19:43:42 2018
New Revision: 327557
URL: https://svnweb.freebsd.org/changeset/base/327557

Log:
  MFC:	r323076, r324502, r325670, r326866
  
  Merge ACPICA 20171214.

Added:
  stable/11/sys/contrib/dev/acpica/compiler/aslallocate.c
     - copied unchanged from r324502, head/sys/contrib/dev/acpica/compiler/aslallocate.c
  stable/11/sys/contrib/dev/acpica/compiler/aslcache.c
     - copied unchanged from r324502, head/sys/contrib/dev/acpica/compiler/aslcache.c
  stable/11/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c
     - copied, changed from r323076, head/sys/contrib/dev/acpica/components/utilities/utstrsuppt.c
Modified:
  stable/11/sys/conf/files
  stable/11/sys/contrib/dev/acpica/changes.txt
  stable/11/sys/contrib/dev/acpica/common/adfile.c
  stable/11/sys/contrib/dev/acpica/common/adisasm.c
  stable/11/sys/contrib/dev/acpica/common/ahtable.c
  stable/11/sys/contrib/dev/acpica/common/dmswitch.c
  stable/11/sys/contrib/dev/acpica/common/dmtable.c
  stable/11/sys/contrib/dev/acpica/common/dmtables.c
  stable/11/sys/contrib/dev/acpica/common/dmtbdump.c
  stable/11/sys/contrib/dev/acpica/common/dmtbinfo.c
  stable/11/sys/contrib/dev/acpica/compiler/aslcodegen.c
  stable/11/sys/contrib/dev/acpica/compiler/aslcompile.c
  stable/11/sys/contrib/dev/acpica/compiler/aslcompiler.h
  stable/11/sys/contrib/dev/acpica/compiler/aslcompiler.l
  stable/11/sys/contrib/dev/acpica/compiler/asldebug.c
  stable/11/sys/contrib/dev/acpica/compiler/asldefine.h
  stable/11/sys/contrib/dev/acpica/compiler/aslerror.c
  stable/11/sys/contrib/dev/acpica/compiler/aslfiles.c
  stable/11/sys/contrib/dev/acpica/compiler/aslhelp.c
  stable/11/sys/contrib/dev/acpica/compiler/aslload.c
  stable/11/sys/contrib/dev/acpica/compiler/aslmain.c
  stable/11/sys/contrib/dev/acpica/compiler/aslmapenter.c
  stable/11/sys/contrib/dev/acpica/compiler/aslmaputils.c
  stable/11/sys/contrib/dev/acpica/compiler/aslmessages.c
  stable/11/sys/contrib/dev/acpica/compiler/aslmessages.h
  stable/11/sys/contrib/dev/acpica/compiler/aslmethod.c
  stable/11/sys/contrib/dev/acpica/compiler/asloperands.c
  stable/11/sys/contrib/dev/acpica/compiler/aslopt.c
  stable/11/sys/contrib/dev/acpica/compiler/asloptions.c
  stable/11/sys/contrib/dev/acpica/compiler/aslparseop.c
  stable/11/sys/contrib/dev/acpica/compiler/aslprintf.c
  stable/11/sys/contrib/dev/acpica/compiler/aslresource.c
  stable/11/sys/contrib/dev/acpica/compiler/aslrules.y
  stable/11/sys/contrib/dev/acpica/compiler/aslstartup.c
  stable/11/sys/contrib/dev/acpica/compiler/aslsupport.l
  stable/11/sys/contrib/dev/acpica/compiler/asltree.c
  stable/11/sys/contrib/dev/acpica/compiler/asltypes.h
  stable/11/sys/contrib/dev/acpica/compiler/aslutils.c
  stable/11/sys/contrib/dev/acpica/compiler/cvcompiler.c
  stable/11/sys/contrib/dev/acpica/compiler/cvdisasm.c
  stable/11/sys/contrib/dev/acpica/compiler/cvparser.c
  stable/11/sys/contrib/dev/acpica/compiler/dtcompile.c
  stable/11/sys/contrib/dev/acpica/compiler/dtcompiler.h
  stable/11/sys/contrib/dev/acpica/compiler/dtexpress.c
  stable/11/sys/contrib/dev/acpica/compiler/dtfield.c
  stable/11/sys/contrib/dev/acpica/compiler/dtio.c
  stable/11/sys/contrib/dev/acpica/compiler/dtparser.y
  stable/11/sys/contrib/dev/acpica/compiler/dtsubtable.c
  stable/11/sys/contrib/dev/acpica/compiler/dttable.c
  stable/11/sys/contrib/dev/acpica/compiler/dttable1.c
  stable/11/sys/contrib/dev/acpica/compiler/dttable2.c
  stable/11/sys/contrib/dev/acpica/compiler/dttemplate.c
  stable/11/sys/contrib/dev/acpica/compiler/dttemplate.h
  stable/11/sys/contrib/dev/acpica/compiler/dtutils.c
  stable/11/sys/contrib/dev/acpica/compiler/prexpress.c
  stable/11/sys/contrib/dev/acpica/compiler/prmacros.c
  stable/11/sys/contrib/dev/acpica/compiler/prparser.y
  stable/11/sys/contrib/dev/acpica/compiler/prscan.c
  stable/11/sys/contrib/dev/acpica/compiler/prutils.c
  stable/11/sys/contrib/dev/acpica/components/debugger/dbconvert.c
  stable/11/sys/contrib/dev/acpica/components/debugger/dbexec.c
  stable/11/sys/contrib/dev/acpica/components/debugger/dbfileio.c
  stable/11/sys/contrib/dev/acpica/components/debugger/dbinput.c
  stable/11/sys/contrib/dev/acpica/components/disassembler/dmresrc.c
  stable/11/sys/contrib/dev/acpica/components/disassembler/dmwalk.c
  stable/11/sys/contrib/dev/acpica/components/dispatcher/dscontrol.c
  stable/11/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
  stable/11/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
  stable/11/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c
  stable/11/sys/contrib/dev/acpica/components/dispatcher/dsutils.c
  stable/11/sys/contrib/dev/acpica/components/dispatcher/dswexec.c
  stable/11/sys/contrib/dev/acpica/components/dispatcher/dswload.c
  stable/11/sys/contrib/dev/acpica/components/dispatcher/dswload2.c
  stable/11/sys/contrib/dev/acpica/components/events/evgpe.c
  stable/11/sys/contrib/dev/acpica/components/events/evregion.c
  stable/11/sys/contrib/dev/acpica/components/executer/exconcat.c
  stable/11/sys/contrib/dev/acpica/components/executer/exconvrt.c
  stable/11/sys/contrib/dev/acpica/components/executer/exdump.c
  stable/11/sys/contrib/dev/acpica/components/executer/exmisc.c
  stable/11/sys/contrib/dev/acpica/components/executer/exresop.c
  stable/11/sys/contrib/dev/acpica/components/hardware/hwgpe.c
  stable/11/sys/contrib/dev/acpica/components/hardware/hwregs.c
  stable/11/sys/contrib/dev/acpica/components/hardware/hwtimer.c
  stable/11/sys/contrib/dev/acpica/components/hardware/hwvalid.c
  stable/11/sys/contrib/dev/acpica/components/hardware/hwxface.c
  stable/11/sys/contrib/dev/acpica/components/namespace/nsaccess.c
  stable/11/sys/contrib/dev/acpica/components/namespace/nsconvert.c
  stable/11/sys/contrib/dev/acpica/components/namespace/nsnames.c
  stable/11/sys/contrib/dev/acpica/components/namespace/nssearch.c
  stable/11/sys/contrib/dev/acpica/components/namespace/nsxfeval.c
  stable/11/sys/contrib/dev/acpica/components/parser/psargs.c
  stable/11/sys/contrib/dev/acpica/components/parser/psobject.c
  stable/11/sys/contrib/dev/acpica/components/parser/psutils.c
  stable/11/sys/contrib/dev/acpica/components/tables/tbxface.c
  stable/11/sys/contrib/dev/acpica/components/utilities/utdebug.c
  stable/11/sys/contrib/dev/acpica/components/utilities/utdecode.c
  stable/11/sys/contrib/dev/acpica/components/utilities/uterror.c
  stable/11/sys/contrib/dev/acpica/components/utilities/utinit.c
  stable/11/sys/contrib/dev/acpica/components/utilities/utmath.c
  stable/11/sys/contrib/dev/acpica/components/utilities/utmutex.c
  stable/11/sys/contrib/dev/acpica/components/utilities/utnonansi.c
  stable/11/sys/contrib/dev/acpica/components/utilities/utosi.c
  stable/11/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c
  stable/11/sys/contrib/dev/acpica/components/utilities/uttrack.c
  stable/11/sys/contrib/dev/acpica/components/utilities/utxferror.c
  stable/11/sys/contrib/dev/acpica/include/acapps.h
  stable/11/sys/contrib/dev/acpica/include/acconfig.h
  stable/11/sys/contrib/dev/acpica/include/acdebug.h
  stable/11/sys/contrib/dev/acpica/include/acdisasm.h
  stable/11/sys/contrib/dev/acpica/include/acexcep.h
  stable/11/sys/contrib/dev/acpica/include/acglobal.h
  stable/11/sys/contrib/dev/acpica/include/achware.h
  stable/11/sys/contrib/dev/acpica/include/acinterp.h
  stable/11/sys/contrib/dev/acpica/include/aclocal.h
  stable/11/sys/contrib/dev/acpica/include/acmacros.h
  stable/11/sys/contrib/dev/acpica/include/acnamesp.h
  stable/11/sys/contrib/dev/acpica/include/acpixf.h
  stable/11/sys/contrib/dev/acpica/include/actbl1.h
  stable/11/sys/contrib/dev/acpica/include/actbl2.h
  stable/11/sys/contrib/dev/acpica/include/actypes.h
  stable/11/sys/contrib/dev/acpica/include/acutils.h
  stable/11/sys/contrib/dev/acpica/os_specific/service_layers/osgendbg.c
  stable/11/sys/dev/acpica/acpi_cpu.c
  stable/11/usr.sbin/acpi/acpidb/Makefile
  stable/11/usr.sbin/acpi/iasl/Makefile
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/conf/files
==============================================================================
--- stable/11/sys/conf/files	Thu Jan  4 19:35:55 2018	(r327556)
+++ stable/11/sys/conf/files	Thu Jan  4 19:43:42 2018	(r327557)
@@ -515,6 +515,7 @@ contrib/dev/acpica/components/utilities/utresdecode.c	
 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/utstrsuppt.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

Modified: stable/11/sys/contrib/dev/acpica/changes.txt
==============================================================================
--- stable/11/sys/contrib/dev/acpica/changes.txt	Thu Jan  4 19:35:55 2018	(r327556)
+++ stable/11/sys/contrib/dev/acpica/changes.txt	Thu Jan  4 19:43:42 2018	(r327557)
@@ -1,4 +1,246 @@
 ----------------------------------------
+14 December 2017. Summary of changes for version 20171214:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Fixed a regression in the external (public) AcpiEvaluateObjectTyped 
+interface where the optional "pathname" argument had inadvertently become 
+a required argument returning an error if omitted (NULL pointer 
+argument).
+
+Fixed two possible memory leaks related to the recently developed "late 
+resolution" of reference objects within ASL Package Object definitions.
+
+Added two recently defined _OSI strings: "Windows 2016" and "Windows 
+2017". Mario Limonciello.
+
+Implemented and deployed a safer version of the C library function 
+strncpy:  AcpiUtSafeStrncpy. The intent is to at least prevent the 
+creation of unterminated strings as a possible result of a standard 
+strncpy.
+
+Cleaned up and restructured the global variable file (acglobal.h). There 
+are many changes, but no functional changes.
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL Table Compiler: Fixed a problem with the DBG2 ACPI table where the 
+optional OemData field at the end of the table was incorrectly required 
+for proper compilation. It is now correctly an optional field.
+
+ASLTS: The entire suite was converted from standard ASL to the ASL+ 
+language, using the ASL-to-ASL+ converter which is integrated into the 
+iASL compiler. A binary compare of all output files has verified the 
+correctness of the conversion.
+
+iASL: Fixed the source code build for platforms where "char" is unsigned. 
+This affected the iASL lexer only. Jung-uk Kim.
+
+----------------------------------------
+10 November 2017. Summary of changes for version 20171110:
+
+
+1) ACPICA kernel-resident subsystem:
+
+This release implements full support for ACPI 6.2A:
+    NFIT - Added a new subtable, "Platform Capabilities Structure"
+No other changes to ACPICA were required, since ACPI 6.2A is primarily an 
+errata release of the specification.
+
+Other ACPI table changes:
+    IORT: Added the SMMUv3 Device ID mapping index. Hanjun Guo
+    PPTT: Added cache attribute flag definitions to actbl1.h. Jeremy 
+Linton
+
+Utilities: Modified the string/integer conversion functions to use 
+internal 64-bit divide support instead of a native divide. On 32-bit 
+platforms, a 64-bit divide typically requires a library function which 
+may not be present in the build (kernel or otherwise).
+
+Implemented a targeted error message for timeouts returned from the 
+Embedded Controller device driver. This is seen frequently enough to 
+special-case an AE_TIME returned from an EC operation region access:
+    "Timeout from EC hardware or EC device driver"
+
+Changed the "ACPI Exception" message prefix to "ACPI Error" so that all 
+runtime error messages have the identical prefix.
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+AcpiXtract: Fixed a problem with table header detection within the 
+acpidump file. Processing a table could be ended early if a 0x40 (@) 
+appears in the original binary table, resulting in the @ symbol appearing 
+in the decoded ASCII field at the end of the acpidump text line. The 
+symbol caused acpixtract to incorrectly think it had reached the end of 
+the current table and the beginning of a new table.
+
+AcpiXtract: Added an option (-f) to ignore some errors during table 
+extraction. This initial implementation ignores non-ASCII and non-
+printable characters found in the acpidump text file.
+
+TestSuite(ASLTS)/AcpiExec: Fixed and restored the memory usage statistics 
+for ASLTS. This feature is used to track memory allocations from 
+different memory caches within the ACPICA code. At the end of an ASLTS 
+run, these memory statistics are recorded and stored in a log file.
+
+Debugger (user-space version): Implemented a simple "Background" command. 
+Creates a new thread to execute a control method in the background, while 
+control returns to the debugger prompt to allow additional commands.
+    Syntax: Background <Namepath> [Arguments]
+
+----------------------------------------
+29 September 2017. Summary of changes for version 20170929:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Redesigned and implemented an improved ASL While() loop timeout 
+mechanism. This mechanism is used to prevent infinite loops in the kernel 
+AML interpreter caused by either non-responsive hardware or incorrect AML 
+code. The new implementation uses AcpiOsGetTimer instead of a simple 
+maximum loop count, and is thus more accurate and constant across 
+different machines. The default timeout is currently 30 seconds, but this 
+may be adjusted later.
+
+Renamed the ACPI_AML_INFINITE_LOOP exception to AE_AML_LOOP_TIMEOUT to 
+better reflect the new implementation of the loop timeout mechanism.
+
+Updated the AcpiGetTimerDuration interface to cleanup the 64-bit support 
+and to fix an off-by-one error. Jung-uk Kim.
+
+Fixed an EFI build problem by updating the makefiles to for a new file 
+that was added, utstrsuppt.c
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+Implemented full support for the PDTT, SDEV, and TPM2 ACPI tables. This 
+includes support in the table disassembler, compiler, and template 
+generator.
+
+iASL: Added an exception for an illegal type of recursive method 
+invocation. If a method creates named objects, the first recursive call 
+will fail at runtime. This change adds an error detection at compile time 
+to catch the problem up front. Note: Marking such a method as 
+"serialized" will not help with this problem, because the same thread can 
+acquire the method mutex more than once. Example compiler and runtime 
+output:
+
+    Method (MTH1)
+    {
+        Name (INT1, 1)
+        MTH1 ()
+    }
+
+    dsdt.asl     22: MTH1 ()
+    Error    6152 -  ^ Illegal recursive call to method
+                       that creates named objects (MTH1)
+
+Previous runtime exception:
+    ACPI Error: [INT1] Namespace lookup failure,
+    AE_ALREADY_EXISTS (20170831/dswload2-465)
+
+iASL: Updated support for External() opcodes to improve namespace 
+management and error detection. These changes are related to issues seen 
+with multiple-segment namespace pathnames within External declarations, 
+such as below:
+
+    External(\_SB.PCI0.GFX0, DeviceObj)
+    External(\_SB.PCI0.GFX0.ALSI)
+
+iASL: Implemented support for multi-line error/warning messages. This 
+enables more detailed and helpful error messages as below, from the 
+initial deployment for the duplicate names error:
+
+    DSDT.iiii   1692:       Device(PEG2) {
+    Error    6074 -                  ^ Name already exists in scope 
+(PEG2)
+
+        Original name creation/declaration below:
+        DSDT.iiii     93:   External(\_SB.PCI0.PEG2, DeviceObj)
+
+AcpiXtract: Added additional flexibility to support differing input hex 
+dump formats. Specifically, hex dumps that contain partial disassembly 
+and/or comments within the ACPI table data definition. There exist some 
+dump utilities seen in the field that create this type of hex dump (such 
+as Simics). For example:
+
+    DSDT @ 0xdfffd0c0 (10999 bytes)
+        Signature DSDT
+        Length 10999
+        Revision 1
+        Checksum 0xf3 (Ok)
+        OEM_ID BXPC
+        OEM_table_id BXDSDT
+        OEM_revision 1
+        Creator_id 1280593481
+        Creator_revision 537399345
+      0000: 44 53 44 54 f7 2a 00 00 01 f3 42 58 50 43 00 00
+      ...
+      2af0: 5f 4c 30 46 00 a4 01
+
+Test suite: Miscellaneous changes/fixes:
+    More cleanup and simplification of makefiles
+    Continue compilation of test cases after a compile failure
+    Do not perform binary compare unless both files actually exist
+
+iASL: Performed some code/module restructuring. Moved all memory 
+allocation functions to new modules. Two new files, aslallocate.c and 
+aslcache.c
+
+----------------------------------------
+31 August 2017. Summary of changes for version 20170831:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Implemented internal support for full 64-bit addresses that appear in all 
+Generic Address Structure (GAS) structures. Previously, only the lower 32 
+bits were used. Affects the use of GAS structures in the FADT and other 
+tables, as well as the GAS structures passed to the AcpiRead and 
+AcpiWrite public external interfaces that are used by drivers. Lv Zheng.
+
+Added header support for the PDTT ACPI table (Processor Debug Trigger 
+Table). Full support in the iASL Data Table Compiler and disassembler is 
+forthcoming.
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL/Disassembler: Fixed a problem with the PPTT ACPI table (Processor 
+Properties Topology Table) where a flag bit was specified in the wrong 
+bit position ("Line Size Valid", bit 6).
+
+iASL: Implemented support for Octal integer constants as defined by the 
+ASL language grammar, per the ACPI specification. Any integer constant 
+that starts with a zero is an octal constant. For example,
+    Store (037777, Local0) /* Octal constant */
+    Store (0x3FFF, Local0) /* Hex equivalent */
+    Store (16383,  Local0) /* Decimal equivalent */
+
+iASL: Improved overflow detection for 64-bit string conversions during 
+compilation of integer constants. "Overflow" in this case means a string 
+that represents an integer that is too large to fit into a 64-bit value. 
+Any 64-bit constants within a 32-bit DSDT or SSDT are still truncated to 
+the low-order 32 bits with a warning, as previously implemented. Several 
+new exceptions are defined that indicate a 64-bit overflow, as well as 
+the base (radix) that was used during the attempted conversion. Examples:
+    Local0 = 0xAAAABBBBCCCCDDDDEEEEFFFF        // AE_HEX_OVERFLOW
+    Local0 = 01111222233334444555566667777     // AE_OCTAL_OVERFLOW
+    Local0 = 11112222333344445555666677778888  // AE_DECIMAL_OVERFLOW
+
+iASL: Added a warning for the case where a ResourceTemplate is declared 
+with no ResourceDescriptor entries (coded as "ResourceTemplate(){}"). In 
+this case, the resulting template is created with a single END_TAG 
+descriptor, which is essentially useless.
+
+iASL: Expanded the -vw option (ignore specific warnings/remarks) to 
+include compilation error codes as well.
+
+----------------------------------------
 28 July 2017. Summary of changes for version 20170728:
 
 

Modified: stable/11/sys/contrib/dev/acpica/common/adfile.c
==============================================================================
--- stable/11/sys/contrib/dev/acpica/common/adfile.c	Thu Jan  4 19:35:55 2018	(r327556)
+++ stable/11/sys/contrib/dev/acpica/common/adfile.c	Thu Jan  4 19:43:42 2018	(r327557)
@@ -314,7 +314,7 @@ FlGenerateFilename (
      * Copy the original filename to a new buffer. Leave room for the worst
      * case where we append the suffix, an added dot and the null terminator.
      */
-    NewFilename = UtStringCacheCalloc ((ACPI_SIZE)
+    NewFilename = UtLocalCacheCalloc ((ACPI_SIZE)
         strlen (InputFilename) + strlen (Suffix) + 2);
     strcpy (NewFilename, InputFilename);
 
@@ -358,7 +358,7 @@ FlStrdup (
     char                *NewString;
 
 
-    NewString = UtStringCacheCalloc ((ACPI_SIZE) strlen (String) + 1);
+    NewString = UtLocalCacheCalloc ((ACPI_SIZE) strlen (String) + 1);
     strcpy (NewString, String);
     return (NewString);
 }

Modified: stable/11/sys/contrib/dev/acpica/common/adisasm.c
==============================================================================
--- stable/11/sys/contrib/dev/acpica/common/adisasm.c	Thu Jan  4 19:35:55 2018	(r327556)
+++ stable/11/sys/contrib/dev/acpica/common/adisasm.c	Thu Jan  4 19:43:42 2018	(r327557)
@@ -457,9 +457,9 @@ AdDisassembleOneTable (
      * (.xxx) file produced from the converter in case if
      * it fails to get deleted.
      */
-    if (Gbl_CaptureComments)
+    if (AcpiGbl_CaptureComments)
     {
-        strncpy (Table->Signature, AcpiGbl_TableSig, 4);
+        strncpy (Table->Signature, AcpiGbl_TableSig, ACPI_NAME_SIZE);
     }
 #endif
 

Modified: stable/11/sys/contrib/dev/acpica/common/ahtable.c
==============================================================================
--- stable/11/sys/contrib/dev/acpica/common/ahtable.c	Thu Jan  4 19:35:55 2018	(r327556)
+++ stable/11/sys/contrib/dev/acpica/common/ahtable.c	Thu Jan  4 19:43:42 2018	(r327557)
@@ -232,6 +232,7 @@ const AH_TABLE      Gbl_AcpiSupportedTables[] =
     {ACPI_SIG_MTMR, "MID Timer Table"},
     {ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"},
     {ACPI_SIG_PCCT, "Platform Communications Channel Table"},
+    {ACPI_SIG_PDTT, "Platform Debug Trigger Table"},
     {ACPI_SIG_PMTT, "Platform Memory Topology Table"},
     {ACPI_SIG_PPTT, "Processor Properties Topology Table"},
     {ACPI_SIG_RASF, "RAS Features Table"},
@@ -240,6 +241,7 @@ const AH_TABLE      Gbl_AcpiSupportedTables[] =
     {ACPI_SIG_S3PT, "S3 Performance Table"},
     {ACPI_SIG_SBST, "Smart Battery Specification Table"},
     {ACPI_SIG_SDEI, "Software Delegated Exception Interface Table"},
+    {ACPI_SIG_SDEV, "Secure Devices table"},
     {ACPI_SIG_SLIC, "Software Licensing Description Table"},
     {ACPI_SIG_SLIT, "System Locality Information Table"},
     {ACPI_SIG_SPCR, "Serial Port Console Redirection table"},

Modified: stable/11/sys/contrib/dev/acpica/common/dmswitch.c
==============================================================================
--- stable/11/sys/contrib/dev/acpica/common/dmswitch.c	Thu Jan  4 19:35:55 2018	(r327556)
+++ stable/11/sys/contrib/dev/acpica/common/dmswitch.c	Thu Jan  4 19:43:42 2018	(r327557)
@@ -543,6 +543,10 @@ AcpiDmIsSwitchBlock (
      * statement, so check for it.
      */
     CurrentOp = StoreOp->Common.Next->Common.Next;
+    if (!CurrentOp)
+    {
+        return (FALSE);
+    }
     if (CurrentOp->Common.AmlOpcode == AML_ELSE_OP)
     {
         CurrentOp = CurrentOp->Common.Next;

Modified: stable/11/sys/contrib/dev/acpica/common/dmtable.c
==============================================================================
--- stable/11/sys/contrib/dev/acpica/common/dmtable.c	Thu Jan  4 19:35:55 2018	(r327556)
+++ stable/11/sys/contrib/dev/acpica/common/dmtable.c	Thu Jan  4 19:43:42 2018	(r327557)
@@ -154,7 +154,6 @@
 #include <contrib/dev/acpica/include/acdisasm.h>
 #include <contrib/dev/acpica/include/actables.h>
 #include <contrib/dev/acpica/compiler/aslcompiler.h>
-#include <contrib/dev/acpica/compiler/dtcompiler.h>
 
 /* This module used for application-level code only */
 
@@ -290,9 +289,9 @@ static const char           *AcpiDmHestSubnames[] =
     "IA-32 Machine Check Exception",
     "IA-32 Corrected Machine Check",
     "IA-32 Non-Maskable Interrupt",
-    "Unknown SubTable Type",        /* 3 - Reserved */
-    "Unknown SubTable Type",        /* 4 - Reserved */
-    "Unknown SubTable Type",        /* 5 - Reserved */
+    "Unknown Subtable Type",        /* 3 - Reserved */
+    "Unknown Subtable Type",        /* 4 - Reserved */
+    "Unknown Subtable Type",        /* 5 - Reserved */
     "PCI Express Root Port AER",
     "PCI Express AER (AER Endpoint)",
     "PCI Express/PCI-X Bridge AER",
@@ -357,6 +356,7 @@ static const char           *AcpiDmNfitSubnames[] =
     "NVDIMM Control Region",            /* ACPI_NFIT_TYPE_CONTROL_REGION */
     "NVDIMM Block Data Window Region",  /* ACPI_NFIT_TYPE_DATA_REGION */
     "Flush Hint Address",               /* ACPI_NFIT_TYPE_FLUSH_ADDRESS */
+    "Platform Capabilities",            /* ACPI_NFIT_TYPE_CAPABILITIES */
     "Unknown Subtable Type"             /* Reserved */
 };
 
@@ -374,7 +374,7 @@ static const char           *AcpiDmPmttSubnames[] =
 {
     "Socket",                       /* ACPI_PMTT_TYPE_SOCKET */
     "Memory Controller",            /* ACPI_PMTT_TYPE_CONTROLLER */
-    "Physical Component (DIMM)",    /* ACPI_PMTT_TYPE_DIMM  */
+    "Physical Component (DIMM)",    /* ACPI_PMTT_TYPE_DIMM */
     "Unknown Subtable Type"         /* Reserved */
 };
 
@@ -382,10 +382,17 @@ static const char           *AcpiDmPpttSubnames[] =
 {
     "Processor Hierarchy Node",     /* ACPI_PPTT_TYPE_PROCESSOR */
     "Cache Type",                   /* ACPI_PPTT_TYPE_CACHE */
-    "ID",                           /* ACPI_PMTT_TYPE_ID  */
+    "ID",                           /* ACPI_PPTT_TYPE_ID */
     "Unknown Subtable Type"         /* Reserved */
 };
 
+static const char           *AcpiDmSdevSubnames[] =
+{
+    "Namespace Device",             /* ACPI_SDEV_TYPE_NAMESPACE_DEVICE */
+    "PCIe Endpoint Device",         /* ACPI_SDEV_TYPE_PCIE_ENDPOINT_DEVICE */
+    "Unknown Subtable Type"         /* Reserved */
+};
+
 static const char           *AcpiDmSratSubnames[] =
 {
     "Processor Local APIC/SAPIC Affinity",
@@ -396,6 +403,23 @@ static const char           *AcpiDmSratSubnames[] =
     "Unknown Subtable Type"         /* Reserved */
 };
 
+static const char           *AcpiDmTpm2Subnames[] =
+{
+    "Illegal Start Method value",
+    "Reserved",
+    "ACPI Start Method",
+    "Reserved",
+    "Reserved",
+    "Reserved",
+    "Memory Mapped I/O",
+    "Command Response Buffer",
+    "Command Response Buffer with ACPI Start Method",
+    "Reserved",
+    "Reserved",
+    "Command Response Buffer with ARM SMC",
+    "Unknown Subtable Type"         /* Reserved */
+};
+
 static const char           *AcpiDmIvrsSubnames[] =
 {
     "Hardware Definition Block",
@@ -487,6 +511,7 @@ const ACPI_DMTABLE_DATA     AcpiDmTableData[] =
     {ACPI_SIG_MTMR, NULL,                   AcpiDmDumpMtmr, DtCompileMtmr,  TemplateMtmr},
     {ACPI_SIG_NFIT, AcpiDmTableInfoNfit,    AcpiDmDumpNfit, DtCompileNfit,  TemplateNfit},
     {ACPI_SIG_PCCT, AcpiDmTableInfoPcct,    AcpiDmDumpPcct, DtCompilePcct,  TemplatePcct},
+    {ACPI_SIG_PDTT, AcpiDmTableInfoPdtt,    AcpiDmDumpPdtt, DtCompilePdtt,  TemplatePdtt},
     {ACPI_SIG_PMTT, NULL,                   AcpiDmDumpPmtt, DtCompilePmtt,  TemplatePmtt},
     {ACPI_SIG_PPTT, NULL,                   AcpiDmDumpPptt, DtCompilePptt,  TemplatePptt},
     {ACPI_SIG_RASF, AcpiDmTableInfoRasf,    NULL,           NULL,           TemplateRasf},
@@ -494,6 +519,7 @@ const ACPI_DMTABLE_DATA     AcpiDmTableData[] =
     {ACPI_SIG_S3PT, NULL,                   NULL,           NULL,           TemplateS3pt},
     {ACPI_SIG_SBST, AcpiDmTableInfoSbst,    NULL,           NULL,           TemplateSbst},
     {ACPI_SIG_SDEI, AcpiDmTableInfoSdei,    NULL,           NULL,           TemplateSdei},
+    {ACPI_SIG_SDEV, AcpiDmTableInfoSdev,    AcpiDmDumpSdev, DtCompileSdev,  TemplateSdev},
     {ACPI_SIG_SLIC, NULL,                   AcpiDmDumpSlic, DtCompileSlic,  TemplateSlic},
     {ACPI_SIG_SLIT, NULL,                   AcpiDmDumpSlit, DtCompileSlit,  TemplateSlit},
     {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr,    NULL,           NULL,           TemplateSpcr},
@@ -501,7 +527,7 @@ const ACPI_DMTABLE_DATA     AcpiDmTableData[] =
     {ACPI_SIG_SRAT, NULL,                   AcpiDmDumpSrat, DtCompileSrat,  TemplateSrat},
     {ACPI_SIG_STAO, NULL,                   AcpiDmDumpStao, DtCompileStao,  TemplateStao},
     {ACPI_SIG_TCPA, NULL,                   AcpiDmDumpTcpa, DtCompileTcpa,  TemplateTcpa},
-    {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2,    NULL,           NULL,           TemplateTpm2},
+    {ACPI_SIG_TPM2, AcpiDmTableInfoTpm2,    AcpiDmDumpTpm2, DtCompileTpm2,  TemplateTpm2},
     {ACPI_SIG_UEFI, AcpiDmTableInfoUefi,    NULL,           DtCompileUefi,  TemplateUefi},
     {ACPI_SIG_VRTC, AcpiDmTableInfoVrtc,    AcpiDmDumpVrtc, DtCompileVrtc,  TemplateVrtc},
     {ACPI_SIG_WAET, AcpiDmTableInfoWaet,    NULL,           NULL,           TemplateWaet},
@@ -917,6 +943,7 @@ AcpiDmDumpTable (
         case ACPI_DMT_PCCT:
         case ACPI_DMT_PMTT:
         case ACPI_DMT_PPTT:
+        case ACPI_DMT_SDEV:
         case ACPI_DMT_SRAT:
         case ACPI_DMT_ASF:
         case ACPI_DMT_HESTNTYP:
@@ -948,6 +975,7 @@ AcpiDmDumpTable (
         case ACPI_DMT_NAME4:
         case ACPI_DMT_SIG:
         case ACPI_DMT_LPIT:
+        case ACPI_DMT_TPM2:
 
             ByteLength = 4;
             break;
@@ -1583,6 +1611,20 @@ AcpiDmDumpTable (
                 CurrentOffset, NULL);
             break;
 
+        case ACPI_DMT_SDEV:
+
+            /* SDEV subtable types */
+
+            Temp8 = *Target;
+            if (Temp8 > ACPI_SDEV_TYPE_RESERVED)
+            {
+                Temp8 = ACPI_SDEV_TYPE_RESERVED;
+            }
+
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmSdevSubnames[Temp8]);
+            break;
+
         case ACPI_DMT_SRAT:
 
             /* SRAT subtable types */
@@ -1596,6 +1638,21 @@ AcpiDmDumpTable (
             AcpiOsPrintf (UINT8_FORMAT, *Target,
                 AcpiDmSratSubnames[Temp8]);
             break;
+
+        case ACPI_DMT_TPM2:
+
+            /* TPM2 Start Method types */
+
+            Temp8 = *Target;
+            if (Temp8 > ACPI_TPM2_RESERVED)
+            {
+                Temp8 = ACPI_TPM2_RESERVED;
+            }
+
+            AcpiOsPrintf (UINT8_FORMAT, *Target,
+                AcpiDmTpm2Subnames[Temp8]);
+            break;
+
 
         case ACPI_DMT_FADTPM:
 

Modified: stable/11/sys/contrib/dev/acpica/common/dmtables.c
==============================================================================
--- stable/11/sys/contrib/dev/acpica/common/dmtables.c	Thu Jan  4 19:35:55 2018	(r327556)
+++ stable/11/sys/contrib/dev/acpica/common/dmtables.c	Thu Jan  4 19:43:42 2018	(r327557)
@@ -314,7 +314,7 @@ AdCreateTableHeader (
     /*
      * Print comments that come before this definition block.
      */
-    if (Gbl_CaptureComments)
+    if (AcpiGbl_CaptureComments)
     {
         ASL_CV_PRINT_ONE_COMMENT(AcpiGbl_ParseOpRoot,AML_COMMENT_STANDARD, NULL, 0);
     }
@@ -517,7 +517,7 @@ AdParseTable (
     }
 
 #ifdef ACPI_ASL_COMPILER
-    if (Gbl_CaptureComments)
+    if (AcpiGbl_CaptureComments)
     {
         AcpiGbl_ParseOpRoot->Common.CvFilename = AcpiGbl_FileTreeRoot->Filename;
     }

Modified: stable/11/sys/contrib/dev/acpica/common/dmtbdump.c
==============================================================================
--- stable/11/sys/contrib/dev/acpica/common/dmtbdump.c	Thu Jan  4 19:35:55 2018	(r327556)
+++ stable/11/sys/contrib/dev/acpica/common/dmtbdump.c	Thu Jan  4 19:43:42 2018	(r327557)
@@ -623,7 +623,7 @@ AcpiDmDumpAsf (
 {
     ACPI_STATUS             Status;
     UINT32                  Offset = sizeof (ACPI_TABLE_HEADER);
-    ACPI_ASF_INFO           *SubTable;
+    ACPI_ASF_INFO           *Subtable;
     ACPI_DMTABLE_INFO       *InfoTable;
     ACPI_DMTABLE_INFO       *DataInfoTable = NULL;
     UINT8                   *DataTable = NULL;
@@ -636,13 +636,13 @@ AcpiDmDumpAsf (
 
     /* No main table, only subtables */
 
-    SubTable = ACPI_ADD_PTR (ACPI_ASF_INFO, Table, Offset);
+    Subtable = ACPI_ADD_PTR (ACPI_ASF_INFO, Table, Offset);
     while (Offset < Table->Length)
     {
         /* Common subtable header */
 
-        Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
-            SubTable->Header.Length, AcpiDmTableInfoAsfHdr);
+        Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+            Subtable->Header.Length, AcpiDmTableInfoAsfHdr);
         if (ACPI_FAILURE (Status))
         {
             return;
@@ -650,7 +650,7 @@ AcpiDmDumpAsf (
 
         /* The actual type is the lower 7 bits of Type */
 
-        Type = (UINT8) (SubTable->Header.Type & 0x7F);
+        Type = (UINT8) (Subtable->Header.Type & 0x7F);
 
         switch (Type)
         {
@@ -663,9 +663,9 @@ AcpiDmDumpAsf (
 
             InfoTable = AcpiDmTableInfoAsf1;
             DataInfoTable = AcpiDmTableInfoAsf1a;
-            DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_ALERT));
-            DataCount = ACPI_CAST_PTR (ACPI_ASF_ALERT, SubTable)->Alerts;
-            DataLength = ACPI_CAST_PTR (ACPI_ASF_ALERT, SubTable)->DataLength;
+            DataTable = ACPI_ADD_PTR (UINT8, Subtable, sizeof (ACPI_ASF_ALERT));
+            DataCount = ACPI_CAST_PTR (ACPI_ASF_ALERT, Subtable)->Alerts;
+            DataLength = ACPI_CAST_PTR (ACPI_ASF_ALERT, Subtable)->DataLength;
             DataOffset = Offset + sizeof (ACPI_ASF_ALERT);
             break;
 
@@ -673,9 +673,9 @@ AcpiDmDumpAsf (
 
             InfoTable = AcpiDmTableInfoAsf2;
             DataInfoTable = AcpiDmTableInfoAsf2a;
-            DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_REMOTE));
-            DataCount = ACPI_CAST_PTR (ACPI_ASF_REMOTE, SubTable)->Controls;
-            DataLength = ACPI_CAST_PTR (ACPI_ASF_REMOTE, SubTable)->DataLength;
+            DataTable = ACPI_ADD_PTR (UINT8, Subtable, sizeof (ACPI_ASF_REMOTE));
+            DataCount = ACPI_CAST_PTR (ACPI_ASF_REMOTE, Subtable)->Controls;
+            DataLength = ACPI_CAST_PTR (ACPI_ASF_REMOTE, Subtable)->DataLength;
             DataOffset = Offset + sizeof (ACPI_ASF_REMOTE);
             break;
 
@@ -687,20 +687,20 @@ AcpiDmDumpAsf (
         case ACPI_ASF_TYPE_ADDRESS:
 
             InfoTable = AcpiDmTableInfoAsf4;
-            DataTable = ACPI_ADD_PTR (UINT8, SubTable, sizeof (ACPI_ASF_ADDRESS));
-            DataLength = ACPI_CAST_PTR (ACPI_ASF_ADDRESS, SubTable)->Devices;
+            DataTable = ACPI_ADD_PTR (UINT8, Subtable, sizeof (ACPI_ASF_ADDRESS));
+            DataLength = ACPI_CAST_PTR (ACPI_ASF_ADDRESS, Subtable)->Devices;
             DataOffset = Offset + sizeof (ACPI_ASF_ADDRESS);
             break;
 
         default:
 
             AcpiOsPrintf ("\n**** Unknown ASF subtable type 0x%X\n",
-                SubTable->Header.Type);
+                Subtable->Header.Type);
             return;
         }
 
-        Status = AcpiDmDumpTable (Table->Length, Offset, SubTable,
-            SubTable->Header.Length, InfoTable);
+        Status = AcpiDmDumpTable (Table->Length, Offset, Subtable,
+            Subtable->Header.Length, InfoTable);
         if (ACPI_FAILURE (Status))
         {
             return;
@@ -762,15 +762,15 @@ AcpiDmDumpAsf (
 
         /* Point to next subtable */
 
-        if (!SubTable->Header.Length)
+        if (!Subtable->Header.Length)
         {
             AcpiOsPrintf ("Invalid zero subtable header length\n");
             return;
         }
 
-        Offset += SubTable->Header.Length;
-        SubTable = ACPI_ADD_PTR (ACPI_ASF_INFO, SubTable,
-            SubTable->Header.Length);
+        Offset += Subtable->Header.Length;
+        Subtable = ACPI_ADD_PTR (ACPI_ASF_INFO, Subtable,
+            Subtable->Header.Length);
     }
 }
 
@@ -793,7 +793,7 @@ AcpiDmDumpCpep (
     ACPI_TABLE_HEADER       *Table)
 {
     ACPI_STATUS             Status;
-    ACPI_CPEP_POLLING       *SubTable;
+    ACPI_CPEP_POLLING       *Subtable;
     UINT32                  Length = Table->Length;
     UINT32                  Offset = sizeof (ACPI_TABLE_CPEP);
 
@@ -808,12 +808,12 @@ AcpiDmDumpCpep (
 
     /* Subtables */
 
-    SubTable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Table, Offset);
+    Subtable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Table, Offset);
     while (Offset < Table->Length)
     {
         AcpiOsPrintf ("\n");
-        Status = AcpiDmDumpTable (Length, Offset, SubTable,
-            SubTable->Header.Length, AcpiDmTableInfoCpep0);
+        Status = AcpiDmDumpTable (Length, Offset, Subtable,
+            Subtable->Header.Length, AcpiDmTableInfoCpep0);
         if (ACPI_FAILURE (Status))
         {
             return;
@@ -821,9 +821,9 @@ AcpiDmDumpCpep (
 
         /* Point to next subtable */
 
-        Offset += SubTable->Header.Length;
-        SubTable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, SubTable,
-            SubTable->Header.Length);
+        Offset += Subtable->Header.Length;
+        Subtable = ACPI_ADD_PTR (ACPI_CPEP_POLLING, Subtable,
+            Subtable->Header.Length);
     }
 }
 
@@ -846,9 +846,9 @@ AcpiDmDumpCsrt (
     ACPI_TABLE_HEADER       *Table)
 {
     ACPI_STATUS             Status;
-    ACPI_CSRT_GROUP         *SubTable;
+    ACPI_CSRT_GROUP         *Subtable;
     ACPI_CSRT_SHARED_INFO   *SharedInfoTable;
-    ACPI_CSRT_DESCRIPTOR    *SubSubTable;
+    ACPI_CSRT_DESCRIPTOR    *SubSubtable;
     UINT32                  Length = Table->Length;
     UINT32                  Offset = sizeof (ACPI_TABLE_CSRT);
     UINT32                  SubOffset;
@@ -860,14 +860,14 @@ AcpiDmDumpCsrt (
 
     /* Subtables (Resource Groups) */
 
-    SubTable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset);
+    Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Table, Offset);
     while (Offset < Table->Length)
     {
         /* Resource group subtable */
 
         AcpiOsPrintf ("\n");
-        Status = AcpiDmDumpTable (Length, Offset, SubTable,
-            SubTable->Length, AcpiDmTableInfoCsrt0);
+        Status = AcpiDmDumpTable (Length, Offset, Subtable,
+            Subtable->Length, AcpiDmTableInfoCsrt0);
         if (ACPI_FAILURE (Status))
         {
             return;
@@ -887,19 +887,19 @@ AcpiDmDumpCsrt (
             return;
         }
 
-        SubOffset += SubTable->SharedInfoLength;
+        SubOffset += Subtable->SharedInfoLength;
 
         /* Sub-Subtables (Resource Descriptors) */
 
-        SubSubTable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, Table,
+        SubSubtable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, Table,
             Offset + SubOffset);
 
-        while ((SubOffset < SubTable->Length) &&
+        while ((SubOffset < Subtable->Length) &&
               ((Offset + SubOffset) < Table->Length))
         {
             AcpiOsPrintf ("\n");
-            Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubTable,
-                SubSubTable->Length, AcpiDmTableInfoCsrt2);
+            Status = AcpiDmDumpTable (Length, Offset + SubOffset, SubSubtable,
+                SubSubtable->Length, AcpiDmTableInfoCsrt2);
             if (ACPI_FAILURE (Status))
             {
                 return;
@@ -909,7 +909,7 @@ AcpiDmDumpCsrt (
 
             /* Resource-specific info buffer */
 
-            InfoLength = SubSubTable->Length - SubSubOffset;
+            InfoLength = SubSubtable->Length - SubSubOffset;
             if (InfoLength)
             {
                 Status = AcpiDmDumpTable (Length,
@@ -924,16 +924,16 @@ AcpiDmDumpCsrt (
 
             /* Point to next sub-subtable */
 
-            SubOffset += SubSubTable->Length;
-            SubSubTable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, SubSubTable,
-                SubSubTable->Length);
+            SubOffset += SubSubtable->Length;
+            SubSubtable = ACPI_ADD_PTR (ACPI_CSRT_DESCRIPTOR, SubSubtable,
+                SubSubtable->Length);
         }
 
         /* Point to next subtable */
 
-        Offset += SubTable->Length;
-        SubTable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, SubTable,
-            SubTable->Length);
+        Offset += Subtable->Length;
+        Subtable = ACPI_ADD_PTR (ACPI_CSRT_GROUP, Subtable,
+            Subtable->Length);
     }
 }
 
@@ -956,7 +956,7 @@ AcpiDmDumpDbg2 (
     ACPI_TABLE_HEADER       *Table)
 {
     ACPI_STATUS             Status;
-    ACPI_DBG2_DEVICE        *SubTable;
+    ACPI_DBG2_DEVICE        *Subtable;
     UINT32                  Length = Table->Length;
     UINT32                  Offset = sizeof (ACPI_TABLE_DBG2);
     UINT32                  i;
@@ -975,12 +975,12 @@ AcpiDmDumpDbg2 (
 
     /* Subtables */
 
-    SubTable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Table, Offset);
+    Subtable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Table, Offset);
     while (Offset < Table->Length)
     {
         AcpiOsPrintf ("\n");
-        Status = AcpiDmDumpTable (Length, Offset, SubTable,
-            SubTable->Length, AcpiDmTableInfoDbg2Device);
+        Status = AcpiDmDumpTable (Length, Offset, Subtable,
+            Subtable->Length, AcpiDmTableInfoDbg2Device);
         if (ACPI_FAILURE (Status))
         {
             return;
@@ -988,15 +988,15 @@ AcpiDmDumpDbg2 (
 
         /* Dump the BaseAddress array */
 
-        for (i = 0; i < SubTable->RegisterCount; i++)
+        for (i = 0; i < Subtable->RegisterCount; i++)
         {
-            ArrayOffset = SubTable->BaseAddressOffset +
+            ArrayOffset = Subtable->BaseAddressOffset +
                 (sizeof (ACPI_GENERIC_ADDRESS) * i);
             AbsoluteOffset = Offset + ArrayOffset;
-            Array = (UINT8 *) SubTable + ArrayOffset;
+            Array = (UINT8 *) Subtable + ArrayOffset;
 
             Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array,
-                SubTable->Length, AcpiDmTableInfoDbg2Addr);
+                Subtable->Length, AcpiDmTableInfoDbg2Addr);
             if (ACPI_FAILURE (Status))
             {
                 return;
@@ -1005,15 +1005,15 @@ AcpiDmDumpDbg2 (
 
         /* Dump the AddressSize array */
 
-        for (i = 0; i < SubTable->RegisterCount; i++)
+        for (i = 0; i < Subtable->RegisterCount; i++)
         {
-            ArrayOffset = SubTable->AddressSizeOffset +
+            ArrayOffset = Subtable->AddressSizeOffset +
                 (sizeof (UINT32) * i);
             AbsoluteOffset = Offset + ArrayOffset;
-            Array = (UINT8 *) SubTable + ArrayOffset;
+            Array = (UINT8 *) Subtable + ArrayOffset;
 
             Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array,
-                SubTable->Length, AcpiDmTableInfoDbg2Size);
+                Subtable->Length, AcpiDmTableInfoDbg2Size);
             if (ACPI_FAILURE (Status))
             {
                 return;
@@ -1023,12 +1023,12 @@ AcpiDmDumpDbg2 (
         /* Dump the Namestring (required) */
 
         AcpiOsPrintf ("\n");
-        ArrayOffset = SubTable->NamepathOffset;
+        ArrayOffset = Subtable->NamepathOffset;
         AbsoluteOffset = Offset + ArrayOffset;
-        Array = (UINT8 *) SubTable + ArrayOffset;
+        Array = (UINT8 *) Subtable + ArrayOffset;
 
         Status = AcpiDmDumpTable (Length, AbsoluteOffset, Array,
-            SubTable->Length, AcpiDmTableInfoDbg2Name);
+            Subtable->Length, AcpiDmTableInfoDbg2Name);
         if (ACPI_FAILURE (Status))
         {
             return;
@@ -1036,10 +1036,10 @@ AcpiDmDumpDbg2 (
 
         /* Dump the OemData (optional) */
 
-        if (SubTable->OemDataOffset)
+        if (Subtable->OemDataOffset)
         {
-            Status = AcpiDmDumpTable (Length, Offset + SubTable->OemDataOffset,
-                Table, SubTable->OemDataLength,
+            Status = AcpiDmDumpTable (Length, Offset + Subtable->OemDataOffset,
+                Table, Subtable->OemDataLength,
                 AcpiDmTableInfoDbg2OemData);
             if (ACPI_FAILURE (Status))
             {
@@ -1049,9 +1049,9 @@ AcpiDmDumpDbg2 (
 
         /* Point to next subtable */
 
-        Offset += SubTable->Length;
-        SubTable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, SubTable,
-            SubTable->Length);
+        Offset += Subtable->Length;
+        Subtable = ACPI_ADD_PTR (ACPI_DBG2_DEVICE, Subtable,
+            Subtable->Length);
     }
 }
 
@@ -1074,7 +1074,7 @@ AcpiDmDumpDmar (
     ACPI_TABLE_HEADER       *Table)
 {
     ACPI_STATUS             Status;
-    ACPI_DMAR_HEADER        *SubTable;
+    ACPI_DMAR_HEADER        *Subtable;
     UINT32                  Length = Table->Length;
     UINT32                  Offset = sizeof (ACPI_TABLE_DMAR);
     ACPI_DMTABLE_INFO       *InfoTable;
@@ -1094,14 +1094,14 @@ AcpiDmDumpDmar (
 
     /* Subtables */
 
-    SubTable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Table, Offset);
+    Subtable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Table, Offset);
     while (Offset < Table->Length)
     {
         /* Common subtable header */
 
         AcpiOsPrintf ("\n");
-        Status = AcpiDmDumpTable (Length, Offset, SubTable,
-            SubTable->Length, AcpiDmTableInfoDmarHdr);
+        Status = AcpiDmDumpTable (Length, Offset, Subtable,
+            Subtable->Length, AcpiDmTableInfoDmarHdr);
         if (ACPI_FAILURE (Status))
         {
             return;
@@ -1109,7 +1109,7 @@ AcpiDmDumpDmar (
 
         AcpiOsPrintf ("\n");
 
-        switch (SubTable->Type)
+        switch (Subtable->Type)
         {
         case ACPI_DMAR_TYPE_HARDWARE_UNIT:
 
@@ -1144,12 +1144,12 @@ AcpiDmDumpDmar (
         default:
 
             AcpiOsPrintf ("\n**** Unknown DMAR subtable type 0x%X\n\n",
-                SubTable->Type);
+                Subtable->Type);
             return;
         }
 
-        Status = AcpiDmDumpTable (Length, Offset, SubTable,
-            SubTable->Length, InfoTable);
+        Status = AcpiDmDumpTable (Length, Offset, Subtable,
+            Subtable->Length, InfoTable);
         if (ACPI_FAILURE (Status))
         {
             return;
@@ -1158,16 +1158,16 @@ AcpiDmDumpDmar (
         /*
          * Dump the optional device scope entries
          */
-        if ((SubTable->Type == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) ||
-            (SubTable->Type == ACPI_DMAR_TYPE_NAMESPACE))
+        if ((Subtable->Type == ACPI_DMAR_TYPE_HARDWARE_AFFINITY) ||
+            (Subtable->Type == ACPI_DMAR_TYPE_NAMESPACE))
         {
             /* These types do not support device scopes */
 
             goto NextSubtable;
         }
 
-        ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, SubTable, ScopeOffset);
-        while (ScopeOffset < SubTable->Length)
+        ScopeTable = ACPI_ADD_PTR (ACPI_DMAR_DEVICE_SCOPE, Subtable, ScopeOffset);
+        while (ScopeOffset < Subtable->Length)
         {
             AcpiOsPrintf ("\n");
             Status = AcpiDmDumpTable (Length, Offset + ScopeOffset, ScopeTable,
@@ -1208,9 +1208,9 @@ AcpiDmDumpDmar (
 NextSubtable:
         /* Point to next subtable */
 
-        Offset += SubTable->Length;
-        SubTable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, SubTable,
-            SubTable->Length);
+        Offset += Subtable->Length;
+        Subtable = ACPI_ADD_PTR (ACPI_DMAR_HEADER, Subtable,
+            Subtable->Length);
     }
 }
 
@@ -1343,7 +1343,7 @@ AcpiDmDumpEinj (
     ACPI_TABLE_HEADER       *Table)
 {
     ACPI_STATUS             Status;
-    ACPI_WHEA_HEADER        *SubTable;
+    ACPI_WHEA_HEADER        *Subtable;
     UINT32                  Length = Table->Length;
     UINT32                  Offset = sizeof (ACPI_TABLE_EINJ);
 
@@ -1358,11 +1358,11 @@ AcpiDmDumpEinj (
 
     /* Subtables */
 
-    SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset);
+    Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset);
     while (Offset < Table->Length)
     {
         AcpiOsPrintf ("\n");
-        Status = AcpiDmDumpTable (Length, Offset, SubTable,
+        Status = AcpiDmDumpTable (Length, Offset, Subtable,
             sizeof (ACPI_WHEA_HEADER), AcpiDmTableInfoEinj0);
         if (ACPI_FAILURE (Status))
         {
@@ -1372,7 +1372,7 @@ AcpiDmDumpEinj (
         /* Point to next subtable (each subtable is of fixed length) */
 
         Offset += sizeof (ACPI_WHEA_HEADER);
-        SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, SubTable,
+        Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Subtable,
             sizeof (ACPI_WHEA_HEADER));
     }
 }
@@ -1396,7 +1396,7 @@ AcpiDmDumpErst (
     ACPI_TABLE_HEADER       *Table)
 {
     ACPI_STATUS             Status;
-    ACPI_WHEA_HEADER        *SubTable;
+    ACPI_WHEA_HEADER        *Subtable;
     UINT32                  Length = Table->Length;
     UINT32                  Offset = sizeof (ACPI_TABLE_ERST);
 
@@ -1411,11 +1411,11 @@ AcpiDmDumpErst (
 
     /* Subtables */
 
-    SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset);
+    Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Table, Offset);
     while (Offset < Table->Length)
     {
         AcpiOsPrintf ("\n");
-        Status = AcpiDmDumpTable (Length, Offset, SubTable,
+        Status = AcpiDmDumpTable (Length, Offset, Subtable,
             sizeof (ACPI_WHEA_HEADER), AcpiDmTableInfoErst0);
         if (ACPI_FAILURE (Status))
         {
@@ -1425,7 +1425,7 @@ AcpiDmDumpErst (
         /* Point to next subtable (each subtable is of fixed length) */
 
         Offset += sizeof (ACPI_WHEA_HEADER);
-        SubTable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, SubTable,
+        Subtable = ACPI_ADD_PTR (ACPI_WHEA_HEADER, Subtable,

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


More information about the svn-src-stable-11 mailing list