Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Jul 2017 17:44:37 +0000 (UTC)
From:      Jung-uk Kim <jkim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org
Subject:   svn commit: r321655 - in vendor-sys/acpica/dist: . generate/unix generate/unix/acpiexamples generate/unix/acpiexec generate/unix/acpinames generate/unix/iasl source/common source/compiler source/co...
Message-ID:  <201707281744.v6SHibdM088924@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jkim
Date: Fri Jul 28 17:44:36 2017
New Revision: 321655
URL: https://svnweb.freebsd.org/changeset/base/321655

Log:
  Import ACPICA 20170728.

Added:
  vendor-sys/acpica/dist/source/components/dispatcher/dspkginit.c   (contents, props changed)
Modified:
  vendor-sys/acpica/dist/changes.txt
  vendor-sys/acpica/dist/generate/unix/Makefile.config
  vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile
  vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile
  vendor-sys/acpica/dist/generate/unix/acpinames/Makefile
  vendor-sys/acpica/dist/generate/unix/iasl/Makefile
  vendor-sys/acpica/dist/source/common/ahtable.c
  vendor-sys/acpica/dist/source/common/dmtable.c
  vendor-sys/acpica/dist/source/common/dmtbinfo.c
  vendor-sys/acpica/dist/source/compiler/aslcompile.c
  vendor-sys/acpica/dist/source/compiler/aslcompiler.h
  vendor-sys/acpica/dist/source/compiler/aslcompiler.l
  vendor-sys/acpica/dist/source/compiler/aslerror.c
  vendor-sys/acpica/dist/source/compiler/aslglobal.h
  vendor-sys/acpica/dist/source/compiler/aslhelp.c
  vendor-sys/acpica/dist/source/compiler/aslmessages.c
  vendor-sys/acpica/dist/source/compiler/aslmessages.h
  vendor-sys/acpica/dist/source/compiler/asloptions.c
  vendor-sys/acpica/dist/source/compiler/aslparseop.c
  vendor-sys/acpica/dist/source/compiler/aslrules.y
  vendor-sys/acpica/dist/source/compiler/asltokens.y
  vendor-sys/acpica/dist/source/compiler/asltransform.c
  vendor-sys/acpica/dist/source/compiler/asltypes.h
  vendor-sys/acpica/dist/source/compiler/aslutils.c
  vendor-sys/acpica/dist/source/compiler/dtcompile.c
  vendor-sys/acpica/dist/source/compiler/dtcompiler.h
  vendor-sys/acpica/dist/source/compiler/dttemplate.h
  vendor-sys/acpica/dist/source/compiler/dtutils.c
  vendor-sys/acpica/dist/source/compiler/prmacros.c
  vendor-sys/acpica/dist/source/components/debugger/dbdisply.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c
  vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c
  vendor-sys/acpica/dist/source/components/executer/excreate.c
  vendor-sys/acpica/dist/source/components/executer/exdump.c
  vendor-sys/acpica/dist/source/components/executer/exmisc.c
  vendor-sys/acpica/dist/source/components/executer/exoparg2.c
  vendor-sys/acpica/dist/source/components/hardware/hwregs.c
  vendor-sys/acpica/dist/source/components/namespace/nsaccess.c
  vendor-sys/acpica/dist/source/components/namespace/nsarguments.c
  vendor-sys/acpica/dist/source/components/namespace/nsinit.c
  vendor-sys/acpica/dist/source/components/namespace/nsnames.c
  vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c
  vendor-sys/acpica/dist/source/components/parser/psloop.c
  vendor-sys/acpica/dist/source/components/resources/rsxface.c
  vendor-sys/acpica/dist/source/components/tables/tbdata.c
  vendor-sys/acpica/dist/source/components/tables/tbxface.c
  vendor-sys/acpica/dist/source/components/utilities/utclib.c
  vendor-sys/acpica/dist/source/components/utilities/uthex.c
  vendor-sys/acpica/dist/source/components/utilities/utmath.c
  vendor-sys/acpica/dist/source/components/utilities/utmisc.c
  vendor-sys/acpica/dist/source/components/utilities/utobject.c
  vendor-sys/acpica/dist/source/components/utilities/utprint.c
  vendor-sys/acpica/dist/source/components/utilities/utresrc.c
  vendor-sys/acpica/dist/source/components/utilities/utstate.c
  vendor-sys/acpica/dist/source/components/utilities/utstrtoul64.c
  vendor-sys/acpica/dist/source/components/utilities/uttrack.c
  vendor-sys/acpica/dist/source/include/acdisasm.h
  vendor-sys/acpica/dist/source/include/acdispat.h
  vendor-sys/acpica/dist/source/include/aclocal.h
  vendor-sys/acpica/dist/source/include/acnames.h
  vendor-sys/acpica/dist/source/include/acobject.h
  vendor-sys/acpica/dist/source/include/acpi.h
  vendor-sys/acpica/dist/source/include/acpixf.h
  vendor-sys/acpica/dist/source/include/actbl2.h
  vendor-sys/acpica/dist/source/include/actypes.h
  vendor-sys/acpica/dist/source/include/acutils.h
  vendor-sys/acpica/dist/source/include/platform/accygwin.h
  vendor-sys/acpica/dist/source/include/platform/acdragonfly.h
  vendor-sys/acpica/dist/source/include/platform/acefi.h
  vendor-sys/acpica/dist/source/include/platform/acefiex.h
  vendor-sys/acpica/dist/source/include/platform/acfreebsd.h
  vendor-sys/acpica/dist/source/include/platform/acgcc.h
  vendor-sys/acpica/dist/source/include/platform/achaiku.h
  vendor-sys/acpica/dist/source/include/platform/aclinux.h
  vendor-sys/acpica/dist/source/include/platform/acmsvc.h
  vendor-sys/acpica/dist/source/include/platform/acnetbsd.h
  vendor-sys/acpica/dist/source/include/platform/acos2.h
  vendor-sys/acpica/dist/source/include/platform/acqnx.h
  vendor-sys/acpica/dist/source/include/platform/acwin.h
  vendor-sys/acpica/dist/source/include/platform/acwin64.h
  vendor-sys/acpica/dist/source/os_specific/service_layers/oslinuxtbl.c
  vendor-sys/acpica/dist/source/tools/acpidump/apfiles.c
  vendor-sys/acpica/dist/source/tools/acpidump/apmain.c
  vendor-sys/acpica/dist/source/tools/acpihelp/ahaslkey.c
  vendor-sys/acpica/dist/source/tools/efihello/efihello.c
  vendor-sys/acpica/dist/tests/misc/grammar.asl

Modified: vendor-sys/acpica/dist/changes.txt
==============================================================================
--- vendor-sys/acpica/dist/changes.txt	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/changes.txt	Fri Jul 28 17:44:36 2017	(r321655)
@@ -1,4 +1,86 @@
 ----------------------------------------
+28 July 2017. Summary of changes for version 20170728:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Fixed a regression seen with small resource descriptors that could cause 
+an inadvertent AE_AML_NO_RESOURCE_END_TAG exception.
+
+AML interpreter: Implemented a new feature that allows forward references 
+from individual named references within package objects that are 
+contained within blocks of "module-level code". This provides 
+compatibility with other ACPI implementations and supports existing 
+firmware that depends on this feature. Example:
+
+    Name (ABCD, 1)
+    If (ABCD)                       /* An If() at module-level */
+    {
+        Name (PKG1, Package()
+        {
+            INT1                    /* Forward reference to object INT1 
+*/
+        })
+        Name (INT1, 0x1234)
+    }
+
+AML Interpreter: Fixed a problem with the Alias() operator where aliases 
+to some ASL objects were not handled properly. Objects affected are: 
+Mutex, Event, and OperationRegion.
+
+AML Debugger: Enhanced to properly handle AML Alias objects. These 
+objects have one level of indirection which was not fully supported by 
+the debugger.
+
+Table Manager: Added support to detect and ignore duplicate SSDTs within 
+the XSDT/RSDT. This error in the XSDT has been seen in the field.
+
+EFI and EDK2 support:
+    Enabled /WX flag for MSVC builds
+    Added support for AcpiOsStall, AcpiOsSleep, and AcpiOsGetTimer
+    Added local support for 64-bit multiply and shift operations
+    Added support to compile acpidump.efi on Windows
+    Added OSL function stubs for interfaces not used under EFI
+
+Added additional support for the _DMA predefined name. _DMA returns a 
+buffer containing a resource template. This change add support within the 
+resource manager (AcpiWalkResourceBuffer) to walk and parse this list of 
+resource descriptors. Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Fixed a problem where the internal input line buffer(s) could 
+overflow if there are very long lines in the input ASL source code file. 
+Implemented buffer management that automatically increases the size of 
+the buffers as necessary.
+
+iASL: Added an option (-vx) to "expect" particular remarks, warnings and 
+errors. If the specified exception is not raised during compilation, the 
+compiler emits an error. This is intended to support the ASL test suite, 
+but may be useful in other contexts.
+
+iASL: Implemented a new predefined macro, __METHOD__, which returns a 
+string containing the name of the current control method that is being 
+compiled.
+
+iASL: Implemented debugger and table compiler support for the SDEI ACPI 
+table (Software Delegated Exception Interface). James Morse 
+<james.morse@arm.com>
+
+Unix/Linux makefiles: Added an option to disable compile optimizations. 
+The disable occurs when the NOOPT flag is set to TRUE. 
+theracermaster@gmail.com
+
+Acpidump: Added support for multiple DSDT and FACS tables. This can occur 
+when there are different tables for 32-bit versus 64-bit.
+
+Enhanced error reporting for the ASL test suite (ASLTS) by removing 
+unnecessary/verbose text, and emit the actual line number where an error 
+has occurred. These changes are intended to improve the usefulness of the 
+test suite.
+
+----------------------------------------
 29 June 2017. Summary of changes for version 20170629:
 
 

Modified: vendor-sys/acpica/dist/generate/unix/Makefile.config
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/Makefile.config	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/generate/unix/Makefile.config	Fri Jul 28 17:44:36 2017	(r321655)
@@ -43,7 +43,7 @@ CC =    gcc
 OBJDIR =     obj
 BINDIR =     bin
 COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $<
-LINKPROG =   $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS)
+LINKPROG =   $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS) $(OPT_LDFLAGS)
 PREFIX ?=    /usr
 INSTALLDIR = $(PREFIX)/bin
 UNAME_S := $(shell uname -s)
@@ -162,6 +162,8 @@ endif
 #
 ifneq ($(NOOPT),TRUE)
 OPT_CFLAGS += -O2
+else
+OPT_CFLAGS += -O0
 endif
 
 #
@@ -176,14 +178,14 @@ CFLAGS += \
     -D$(HOST)\
     -D_GNU_SOURCE\
     -I$(ACPICA_INCLUDE)
-    
+
 #
 # QNX requires __EXT to enable most functions in its C library, analogous
 # to _GNU_SOURCE.
 #
 ifeq ($(HOST), _QNX)
     CFLAGS+=-D__EXT
-endif  
+endif
 
 #
 # Common compiler warning flags. The warning flags in addition

Modified: vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile	Fri Jul 28 17:44:36 2017	(r321655)
@@ -47,6 +47,7 @@ OBJECTS = \
 	$(OBJDIR)/dsmthdat.o\
 	$(OBJDIR)/dsobject.o\
 	$(OBJDIR)/dsopcode.o\
+	$(OBJDIR)/dspkginit.o\
 	$(OBJDIR)/dsutils.o\
 	$(OBJDIR)/dswexec.o\
 	$(OBJDIR)/dswload.o\

Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile	Fri Jul 28 17:44:36 2017	(r321655)
@@ -85,6 +85,7 @@ OBJECTS = \
 	$(OBJDIR)/dsmthdat.o\
 	$(OBJDIR)/dsobject.o\
 	$(OBJDIR)/dsopcode.o\
+	$(OBJDIR)/dspkginit.o\
 	$(OBJDIR)/dsutils.o\
 	$(OBJDIR)/dswexec.o\
 	$(OBJDIR)/dswload.o\

Modified: vendor-sys/acpica/dist/generate/unix/acpinames/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/acpinames/Makefile	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/generate/unix/acpinames/Makefile	Fri Jul 28 17:44:36 2017	(r321655)
@@ -43,6 +43,7 @@ OBJECTS = \
 	$(OBJDIR)/dsinit.o\
 	$(OBJDIR)/dsmthdat.o\
 	$(OBJDIR)/dsobject.o\
+	$(OBJDIR)/dspkginit.o\
 	$(OBJDIR)/dsutils.o\
 	$(OBJDIR)/dswload.o\
 	$(OBJDIR)/dswload2.o\

Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/iasl/Makefile	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile	Fri Jul 28 17:44:36 2017	(r321655)
@@ -134,6 +134,7 @@ OBJECTS = \
 	$(OBJDIR)/dsfield.o\
 	$(OBJDIR)/dsobject.o\
 	$(OBJDIR)/dsopcode.o\
+	$(OBJDIR)/dspkginit.o\
 	$(OBJDIR)/dsutils.o\
 	$(OBJDIR)/dswexec.o\
 	$(OBJDIR)/dswload.o\

Modified: vendor-sys/acpica/dist/source/common/ahtable.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/ahtable.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/common/ahtable.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -239,6 +239,7 @@ const AH_TABLE      Gbl_AcpiSupportedTables[] =
     {ACPI_SIG_RSDT, "Root System Description Table"},
     {ACPI_SIG_S3PT, "S3 Performance Table"},
     {ACPI_SIG_SBST, "Smart Battery Specification Table"},
+    {ACPI_SIG_SDEI, "Software Delegated Exception Interface Table"},
     {ACPI_SIG_SLIC, "Software Licensing Description Table"},
     {ACPI_SIG_SLIT, "System Locality Information Table"},
     {ACPI_SIG_SPCR, "Serial Port Console Redirection table"},

Modified: vendor-sys/acpica/dist/source/common/dmtable.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtable.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/common/dmtable.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -493,6 +493,7 @@ const ACPI_DMTABLE_DATA     AcpiDmTableData[] =
     {ACPI_SIG_RSDT, NULL,                   AcpiDmDumpRsdt, DtCompileRsdt,  TemplateRsdt},
     {ACPI_SIG_S3PT, NULL,                   NULL,           NULL,           TemplateS3pt},
     {ACPI_SIG_SBST, AcpiDmTableInfoSbst,    NULL,           NULL,           TemplateSbst},
+    {ACPI_SIG_SDEI, AcpiDmTableInfoSdei,    NULL,           NULL,           TemplateSdei},
     {ACPI_SIG_SLIC, NULL,                   AcpiDmDumpSlic, DtCompileSlic,  TemplateSlic},
     {ACPI_SIG_SLIT, NULL,                   AcpiDmDumpSlit, DtCompileSlit,  TemplateSlit},
     {ACPI_SIG_SPCR, AcpiDmTableInfoSpcr,    NULL,           NULL,           TemplateSpcr},

Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtbinfo.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/common/dmtbinfo.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -218,6 +218,7 @@
 #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_SDEI_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SDEI,f)
 #define ACPI_SLIT_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIT,f)
 #define ACPI_SPCR_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SPCR,f)
 #define ACPI_SPMI_OFFSET(f)             (UINT16) ACPI_OFFSET (ACPI_TABLE_SPMI,f)
@@ -2767,6 +2768,16 @@ ACPI_DMTABLE_INFO           AcpiDmTableInfoPmtt2[] =
     ACPI_DMT_TERMINATOR
 };
 
+/*******************************************************************************
+ *
+ * SDEI - Software Delegated Execption Interface Descriptor Table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO           AcpiDmTableInfoSdei[] =
+{
+    ACPI_DMT_TERMINATOR
+};
 
 /*******************************************************************************
  *

Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompile.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslcompile.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -815,6 +815,7 @@ CmCleanupAndExit (
     BOOLEAN                 DeleteAmlFile = FALSE;
 
 
+    AslCheckExpectedExceptions ();
     AePrintErrorLog (ASL_FILE_STDERR);
     if (Gbl_DebugFlag)
     {

Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompiler.h	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h	Fri Jul 28 17:44:36 2017	(r321655)
@@ -413,12 +413,20 @@ AslError (
     ACPI_PARSE_OBJECT       *Op,
     char                    *ExtraMessage);
 
+void
+AslCheckExpectedExceptions (
+    void);
+
 ACPI_STATUS
+AslExpectException (
+    char                    *MessageIdString);
+
+ACPI_STATUS
 AslDisableException (
     char                    *MessageIdString);
 
 BOOLEAN
-AslIsExceptionDisabled (
+AslIsExceptionIgnored (
     UINT8                   Level,
     UINT16                  MessageId);
 

Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.l
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompiler.l	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l	Fri Jul 28 17:44:36 2017	(r321655)
@@ -809,7 +809,7 @@ NamePathTail                [.]{NameSeg}
 "__FILE__"                  { count (0); return (PARSEOP___FILE__); }
 "__LINE__"                  { count (0); return (PARSEOP___LINE__); }
 "__PATH__"                  { count (0); return (PARSEOP___PATH__); }
-
+"__METHOD__"                { count (0); return (PARSEOP___METHOD__); }
 
 {NameSeg}                   { char *s;
                                 count (0);

Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslerror.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslerror.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -160,7 +160,17 @@ static void
 AeAddToErrorLog (
     ASL_ERROR_MSG           *Enode);
 
+static BOOLEAN
+AslIsExceptionExpected (
+    UINT8                   Level,
+    UINT16                  MessageId);
 
+static BOOLEAN
+AslIsExceptionDisabled (
+    UINT8                   Level,
+    UINT16                  MessageId);
+
+
 /*******************************************************************************
  *
  * FUNCTION:    AslAbort
@@ -806,9 +816,118 @@ AslCommonError (
     return;
 }
 
+/*******************************************************************************
+ *
+ * FUNCTION:    AslIsExceptionIgnored
+ *
+ * PARAMETERS:  Level               - Seriousness (Warning/error, etc.)
+ *              MessageId           - Index into global message buffer
+ *
+ * RETURN:      BOOLEAN
+ *
+ * DESCRIPTION: Check if a particular exception is ignored. In this case it
+ *              means that the exception is (expected or disabled.
+ *
+ ******************************************************************************/
 
+BOOLEAN
+AslIsExceptionIgnored (
+    UINT8                   Level,
+    UINT16                  MessageId)
+{
+    BOOLEAN ExceptionIgnored;
+
+
+    /* Note: this allows exception to be disabled and expected */
+
+    ExceptionIgnored = AslIsExceptionDisabled (Level, MessageId);
+    ExceptionIgnored |= AslIsExceptionExpected (Level, MessageId);
+
+    return (Gbl_AllExceptionsDisabled || ExceptionIgnored);
+}
+
+
 /*******************************************************************************
  *
+ * FUNCTION:    AslCheckExpectException
+ *
+ * PARAMETERS:  none
+ *
+ * RETURN:      none
+ *
+ * DESCRIPTION: Check the global expected messages table and raise an error
+ *              for each message that has not been received.
+ *
+ ******************************************************************************/
+
+void
+AslCheckExpectedExceptions (
+    void)
+{
+    UINT8 i;
+
+    for (i = 0; i < Gbl_ExpectedMessagesIndex; ++i)
+    {
+        if (!Gbl_ExpectedMessages[i].MessageReceived)
+        {
+            AslError (ASL_ERROR, ASL_MSG_EXCEPTION_NOT_RECEIVED, NULL,
+                Gbl_ExpectedMessages[i].MessageIdStr);
+        }
+    }
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AslExpectException
+ *
+ * PARAMETERS:  MessageIdString     - ID of excepted exception during compile
+ *
+ * RETURN:      Status
+ *
+ * DESCRIPTION: Enter a message ID into the global expected messages table
+ *              If these messages are not raised during the compilation, throw
+ *              an error.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AslExpectException (
+    char                    *MessageIdString)
+{
+    UINT32                  MessageId;
+
+
+    /* Convert argument to an integer and validate it */
+
+    MessageId = (UINT32) strtoul (MessageIdString, NULL, 0);
+
+    if (MessageId > 6999)
+    {
+        printf ("\"%s\" is not a valid warning/remark/erro ID\n",
+            MessageIdString);
+        return (AE_BAD_PARAMETER);
+    }
+
+    /* Insert value into the global expected message array */
+
+    if (Gbl_ExpectedMessagesIndex >= ASL_MAX_EXPECTED_MESSAGES)
+    {
+        printf ("Too many messages have been registered as expected (max %u)\n",
+            ASL_MAX_DISABLED_MESSAGES);
+        return (AE_LIMIT);
+    }
+
+    Gbl_ExpectedMessages[Gbl_ExpectedMessagesIndex].MessageId = MessageId;
+    Gbl_ExpectedMessages[Gbl_ExpectedMessagesIndex].MessageIdStr = MessageIdString;
+    Gbl_ExpectedMessages[Gbl_ExpectedMessagesIndex].MessageReceived = FALSE;
+    Gbl_ExpectedMessagesIndex++;
+    return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
  * FUNCTION:    AslDisableException
  *
  * PARAMETERS:  MessageIdString     - ID to be disabled
@@ -866,7 +985,48 @@ AslDisableException (
  *
  ******************************************************************************/
 
-BOOLEAN
+static BOOLEAN
+AslIsExceptionExpected (
+    UINT8                   Level,
+    UINT16                  MessageId)
+{
+    UINT32                  EncodedMessageId;
+    UINT32                  i;
+
+
+    /*
+     * Mark this exception as received
+     */
+    EncodedMessageId = AeBuildFullExceptionCode (Level, MessageId);
+    for (i = 0; i < Gbl_ExpectedMessagesIndex; i++)
+    {
+        /* Simple implementation via fixed array */
+
+        if (EncodedMessageId == Gbl_ExpectedMessages[i].MessageId)
+        {
+            return (Gbl_ExpectedMessages[i].MessageReceived = TRUE);
+        }
+    }
+
+    return (FALSE);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION:    AslIsExceptionDisabled
+ *
+ * PARAMETERS:  Level               - Seriousness (Warning/error, etc.)
+ *              MessageId           - Index into global message buffer
+ *
+ * RETURN:      TRUE if exception/message should be ignored
+ *
+ * DESCRIPTION: Check if the user has specified options such that this
+ *              exception should be ignored
+ *
+ ******************************************************************************/
+
+static BOOLEAN
 AslIsExceptionDisabled (
     UINT8                   Level,
     UINT16                  MessageId)
@@ -940,8 +1100,7 @@ AslError (
 
     /* Check if user wants to ignore this exception */
 
-    if (Gbl_AllExceptionsDisabled ||
-        AslIsExceptionDisabled (Level, MessageId))
+    if (AslIsExceptionIgnored (Level, MessageId))
     {
         return;
     }

Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslglobal.h	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslglobal.h	Fri Jul 28 17:44:36 2017	(r321655)
@@ -252,6 +252,7 @@ extern int                  AslCompilerdebug;
 #define ASL_DEFAULT_LINE_BUFFER_SIZE    (1024 * 32) /* 32K */
 #define ASL_MSG_BUFFER_SIZE             (1024 * 32) /* 32k */
 #define ASL_MAX_DISABLED_MESSAGES       32
+#define ASL_MAX_EXPECTED_MESSAGES       32
 #define HEX_TABLE_LINE_SIZE             8
 #define HEX_LISTING_LINE_SIZE           8
 
@@ -396,6 +397,7 @@ ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (G
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_CurrentAmlOffset, 0);
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_CurrentLine, 0);
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_DisabledMessagesIndex, 0);
+ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_ExpectedMessagesIndex, 0);
 ASL_EXTERN UINT8                    ASL_INIT_GLOBAL (Gbl_HexBytesWereWritten, FALSE);
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_NumNamespaceObjects, 0);
 ASL_EXTERN UINT32                   ASL_INIT_GLOBAL (Gbl_ReservedMethods, 0);
@@ -438,6 +440,7 @@ ASL_EXTERN char                     MsgBuffer[ASL_MSG_
 ASL_EXTERN char                     StringBuffer[ASL_MSG_BUFFER_SIZE];
 ASL_EXTERN char                     StringBuffer2[ASL_MSG_BUFFER_SIZE];
 ASL_EXTERN UINT32                   Gbl_DisabledMessages[ASL_MAX_DISABLED_MESSAGES];
+ASL_EXTERN ASL_EXPECTED_MESSAGE     Gbl_ExpectedMessages[ASL_MAX_EXPECTED_MESSAGES];
 
 
 #endif /* __ASLGLOBAL_H */

Modified: vendor-sys/acpica/dist/source/compiler/aslhelp.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslhelp.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslhelp.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -205,6 +205,7 @@ Usage (
     ACPI_OPTION ("-vi",             "Less verbose errors and warnings for use with IDEs");
     ACPI_OPTION ("-vr",             "Disable remarks");
     ACPI_OPTION ("-vw <messageid>", "Disable specific warning or remark");
+    ACPI_OPTION ("-vx <messageid>", "Expect a specific warning, remark, or error");
     ACPI_OPTION ("-w <1|2|3>",      "Set warning reporting level");
     ACPI_OPTION ("-we",             "Report warnings as errors");
 

Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslmessages.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslmessages.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -348,7 +348,8 @@ const char                      *AslCompilerMsgs [] =
 /*    ASL_MSG_ARG_AS_LOCAL_NOT_USED */      "Method Argument (as a local) is set but never used",
 /*    ASL_MSG_ARG_NOT_USED */               "Method Argument is never used",
 /*    ASL_MSG_CONSTANT_REQUIRED */          "Non-reducible expression",
-/*    ASL_MSG_CROSS_TABLE_SCOPE */          "Illegal open scope on external object from within DSDT"
+/*    ASL_MSG_CROSS_TABLE_SCOPE */          "Illegal open scope on external object from within DSDT",
+/*    ASL_MSG_EXCEPTION_NOT_RECEIVED */     "Expected remark, warning, or error did not occur. Message ID:"
 };
 
 /* Table compiler */

Modified: vendor-sys/acpica/dist/source/compiler/aslmessages.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslmessages.h	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslmessages.h	Fri Jul 28 17:44:36 2017	(r321655)
@@ -351,6 +351,7 @@ typedef enum
     ASL_MSG_ARG_NOT_USED,
     ASL_MSG_CONSTANT_REQUIRED,
     ASL_MSG_CROSS_TABLE_SCOPE,
+    ASL_MSG_EXCEPTION_NOT_RECEIVED,
 
     /* These messages are used by the Data Table compiler only */
 

Modified: vendor-sys/acpica/dist/source/compiler/asloptions.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/asloptions.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/asloptions.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -954,6 +954,22 @@ AslDoOptions (
             }
             break;
 
+        case 'x':
+
+            /* Get the required argument */
+
+            if (AcpiGetoptArgument (argc, argv))
+            {
+                return (-1);
+            }
+
+            Status = AslExpectException (AcpiGbl_Optarg);
+            if (ACPI_FAILURE (Status))
+            {
+                return (-1);
+            }
+            break;
+
         default:
 
             printf ("Unknown option: -v%s\n", AcpiGbl_Optarg);

Modified: vendor-sys/acpica/dist/source/compiler/aslparseop.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslparseop.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslparseop.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -685,10 +685,10 @@ TrCreateNullTargetOp (
  * DESCRIPTION: Create a leaf op (no children or peers) for one of the
  *              special constants - __LINE__, __FILE__, and __DATE__.
  *
- * Note: An implemenation of __FUNC__ cannot happen here because we don't
- * have a full parse tree at this time and cannot find the parent control
- * method. If it is ever needed, __FUNC__ must be implemented later, after
- * the parse tree has been fully constructed.
+ * Note: The fullimplemenation of __METHOD__ cannot happen here because we
+ * don't have a full parse tree at this time and cannot find the parent
+ * control method. __METHOD__ must be implemented later, after the parse
+ * tree has been fully constructed.
  *
  ******************************************************************************/
 
@@ -709,6 +709,14 @@ TrCreateConstantLeafOp (
 
         Op = TrAllocateOp (PARSEOP_INTEGER);
         Op->Asl.Value.Integer = Op->Asl.LineNumber;
+        break;
+
+    case PARSEOP___METHOD__:
+
+        /* Will become a string literal later */
+
+        Op = TrAllocateOp (PARSEOP___METHOD__);
+        Op->Asl.Value.String = NULL;
         break;
 
     case PARSEOP___PATH__:

Modified: vendor-sys/acpica/dist/source/compiler/aslrules.y
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslrules.y	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslrules.y	Fri Jul 28 17:44:36 2017	(r321655)
@@ -592,6 +592,7 @@ ConstExprTerm
     | PARSEOP___FILE__              {$$ = TrCreateConstantLeafOp (PARSEOP___FILE__);}
     | PARSEOP___LINE__              {$$ = TrCreateConstantLeafOp (PARSEOP___LINE__);}
     | PARSEOP___PATH__              {$$ = TrCreateConstantLeafOp (PARSEOP___PATH__);}
+    | PARSEOP___METHOD__            {$$ = TrCreateConstantLeafOp (PARSEOP___METHOD__);}
     ;
 
 Integer

Modified: vendor-sys/acpica/dist/source/compiler/asltokens.y
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/asltokens.y	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/asltokens.y	Fri Jul 28 17:44:36 2017	(r321655)
@@ -637,3 +637,4 @@ NoEcho('
 %token <i> PARSEOP___FILE__
 %token <i> PARSEOP___LINE__
 %token <i> PARSEOP___PATH__
+%token <i> PARSEOP___METHOD__

Modified: vendor-sys/acpica/dist/source/compiler/asltransform.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/asltransform.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/asltransform.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -430,7 +430,9 @@ static void
 TrTransformSubtree (
     ACPI_PARSE_OBJECT           *Op)
 {
+    ACPI_PARSE_OBJECT           *MethodOp;
 
+
     if (Op->Asl.AmlOpcode == AML_RAW_DATA_BYTE)
     {
         return;
@@ -463,6 +465,35 @@ TrTransformSubtree (
             ExDoExternal (Op);
         }
 
+        break;
+
+    case PARSEOP___METHOD__:
+
+        /* Transform to a string op containing the parent method name */
+
+        Op->Asl.ParseOpcode = PARSEOP_STRING_LITERAL;
+        UtSetParseOpName (Op);
+
+        /* Find the parent control method op */
+
+        MethodOp = Op;
+        while (MethodOp)
+        {
+            if (MethodOp->Asl.ParseOpcode == PARSEOP_METHOD)
+            {
+                /* First child contains the method name */
+
+                MethodOp = MethodOp->Asl.Child;
+                Op->Asl.Value.String = MethodOp->Asl.Value.String;
+                return;
+            }
+
+            MethodOp = MethodOp->Asl.Parent;
+        }
+
+        /* At the root, invocation not within a control method */
+
+        Op->Asl.Value.String = "\\";
         break;
 
     default:

Modified: vendor-sys/acpica/dist/source/compiler/asltypes.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/asltypes.h	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/asltypes.h	Fri Jul 28 17:44:36 2017	(r321655)
@@ -355,6 +355,15 @@ typedef struct asl_error_msg
 
 } ASL_ERROR_MSG;
 
+/* An entry in the expected messages array */
+typedef struct asl_expected_message
+{
+    UINT32                       MessageId;
+    char                         *MessageIdStr;
+    BOOLEAN                      MessageReceived;
+
+} ASL_EXPECTED_MESSAGE;
+
 
 /* An entry in the listing file stack (for include files) */
 

Modified: vendor-sys/acpica/dist/source/compiler/aslutils.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslutils.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/aslutils.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -174,7 +174,13 @@ UtAttachNameseg (
     ACPI_PARSE_OBJECT       *Op,
     char                    *Name);
 
+static void
+UtReallocLineBuffers (
+    char                    **Buffer,
+    UINT32                  OldSize,
+    UINT32                  NewSize);
 
+
 /*******************************************************************************
  *
  * FUNCTION:    UtIsBigEndianMachine
@@ -733,43 +739,48 @@ UtExpandLineBuffers (
             Gbl_LineBufferSize, NewSize);
     }
 
-    Gbl_CurrentLineBuffer = realloc (Gbl_CurrentLineBuffer, NewSize);
+    UtReallocLineBuffers (&Gbl_CurrentLineBuffer, Gbl_LineBufferSize, NewSize);
+    UtReallocLineBuffers (&Gbl_MainTokenBuffer, Gbl_LineBufferSize, NewSize);
+    UtReallocLineBuffers (&Gbl_MacroTokenBuffer, Gbl_LineBufferSize, NewSize);
+    UtReallocLineBuffers (&Gbl_ExpressionTokenBuffer, Gbl_LineBufferSize, NewSize);
+
     Gbl_LineBufPtr = Gbl_CurrentLineBuffer;
-    if (!Gbl_CurrentLineBuffer)
-    {
-        goto ErrorExit;
-    }
+    Gbl_LineBufferSize = NewSize;
+}
 
-    Gbl_MainTokenBuffer = realloc (Gbl_MainTokenBuffer, NewSize);
-    if (!Gbl_MainTokenBuffer)
-    {
-        goto ErrorExit;
-    }
 
-    Gbl_MacroTokenBuffer = realloc (Gbl_MacroTokenBuffer, NewSize);
-    if (!Gbl_MacroTokenBuffer)
-    {
-        goto ErrorExit;
-    }
+/******************************************************************************
+ *
+ * FUNCTION:    UtReallocLineBuffers
+ *
+ * PARAMETERS:  Buffer              - Buffer to realloc
+ *              OldSize             - Old size of Buffer
+ *              NewSize             - New size of Buffer
+ *
+ * RETURN:      none
+ *
+ * DESCRIPTION: Reallocate and initialize Buffer
+ *
+ *****************************************************************************/
 
-    Gbl_ExpressionTokenBuffer = realloc (Gbl_ExpressionTokenBuffer, NewSize);
-    if (!Gbl_ExpressionTokenBuffer)
+static void
+UtReallocLineBuffers (
+    char                    **Buffer,
+    UINT32                  OldSize,
+    UINT32                  NewSize)
+{
+
+    *Buffer = realloc (*Buffer, NewSize);
+    if (*Buffer)
     {
-        goto ErrorExit;
+        memset (*Buffer + OldSize, 0, NewSize - OldSize);
+        return;
     }
 
-    Gbl_LineBufferSize = NewSize;
-    return;
-
-
-    /* On error above, simply issue error messages and abort, cannot continue */
-
-ErrorExit:
     printf ("Could not increase line buffer size from %u to %u\n",
-        Gbl_LineBufferSize, Gbl_LineBufferSize * 2);
+        OldSize, NewSize);
 
-    AslError (ASL_ERROR, ASL_MSG_BUFFER_ALLOCATION,
-        NULL, NULL);
+    AslError (ASL_ERROR, ASL_MSG_BUFFER_ALLOCATION, NULL, NULL);
     AslAbort ();
 }
 

Modified: vendor-sys/acpica/dist/source/compiler/dtcompile.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dtcompile.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/dtcompile.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -486,18 +486,21 @@ DtCompileDataTable (
     }
     else if (TableData->TableInfo)
     {
-        /* Simple table, just walk the info table */
+        /* Simple table, just walk the info table, unless its empty */
 
-        Subtable = NULL;
-        Status = DtCompileTable (FieldList, TableData->TableInfo,
-            &Subtable, TRUE);
-        if (ACPI_FAILURE (Status))
+        if (FieldList && *FieldList)
         {
-            return (Status);
-        }
+            Subtable = NULL;
+            Status = DtCompileTable (FieldList, TableData->TableInfo,
+                &Subtable, TRUE);
+            if (ACPI_FAILURE (Status))
+            {
+                return (Status);
+            }
 
-        DtInsertSubtable (Gbl_RootTable, Subtable);
-        DtPopSubtable ();
+            DtInsertSubtable (Gbl_RootTable, Subtable);
+            DtPopSubtable ();
+        }
     }
     else
     {

Modified: vendor-sys/acpica/dist/source/compiler/dtcompiler.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dtcompiler.h	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/dtcompiler.h	Fri Jul 28 17:44:36 2017	(r321655)
@@ -726,6 +726,7 @@ extern const unsigned char  TemplateRasf[];
 extern const unsigned char  TemplateRsdt[];
 extern const unsigned char  TemplateS3pt[];
 extern const unsigned char  TemplateSbst[];
+extern const unsigned char  TemplateSdei[];
 extern const unsigned char  TemplateSlic[];
 extern const unsigned char  TemplateSlit[];
 extern const unsigned char  TemplateSpcr[];

Modified: vendor-sys/acpica/dist/source/compiler/dttemplate.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dttemplate.h	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/dttemplate.h	Fri Jul 28 17:44:36 2017	(r321655)
@@ -1178,6 +1178,15 @@ const unsigned char TemplateSbst[] =
     0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00   /* 00000028    "........" */
 };
 
+const unsigned char TemplateSdei[] =
+{
+    0x53,0x44,0x45,0x49,0x3e,0x00,0x00,0x00,  /* 00000000    "SDEI>..." */
+    0x01,0x59,0x41,0x52,0x4d,0x20,0x20,0x20,  /* 00000008    ".mARM  " */
+    0x54,0x45,0x4D,0x50,0x4C,0x41,0x54,0x45,  /* 00000010    "TEMPLATE" */
+    0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C,  /* 00000018    "....INTL" */
+    0x30,0x09,0x16,0x20                       /* 00000028    "0.. " */
+};
+
 const unsigned char TemplateSlic[] =
 {
     0x53,0x4C,0x49,0x43,0x76,0x01,0x00,0x00,  /* 00000000    "SLICv..." */

Modified: vendor-sys/acpica/dist/source/compiler/dtutils.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/dtutils.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/dtutils.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -190,7 +190,7 @@ DtError (
 
     /* Check if user wants to ignore this exception */
 
-    if (AslIsExceptionDisabled (Level, MessageId))
+    if (AslIsExceptionIgnored (Level, MessageId))
     {
         return;
     }

Modified: vendor-sys/acpica/dist/source/compiler/prmacros.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/prmacros.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/compiler/prmacros.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -483,7 +483,7 @@ PrAddMacro (
     {
         /* Search the macro arg list for matching arg */
 
-        for (i = 0; Args[i].Name && (i < PR_MAX_MACRO_ARGS); i++)
+        for (i = 0; ((i < PR_MAX_MACRO_ARGS) && Args[i].Name); i++)
         {
             /*
              * Save argument offset within macro body. This is the mechanism

Modified: vendor-sys/acpica/dist/source/components/debugger/dbdisply.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/debugger/dbdisply.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/components/debugger/dbdisply.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -451,7 +451,7 @@ DumpNode:
 
     else
     {
-        AcpiOsPrintf ("Object (%p) Pathname:  %s\n",
+        AcpiOsPrintf ("Object %p: Namespace Node - Pathname: %s\n",
             Node, (char *) RetBuf.Pointer);
     }
 
@@ -468,7 +468,7 @@ DumpNode:
     ObjDesc = AcpiNsGetAttachedObject (Node);
     if (ObjDesc)
     {
-        AcpiOsPrintf ("\nAttached Object (%p):\n", ObjDesc);
+        AcpiOsPrintf ("\nAttached Object %p:", ObjDesc);
         if (!AcpiOsReadable (ObjDesc, sizeof (ACPI_OPERAND_OBJECT)))
         {
             AcpiOsPrintf ("Invalid internal ACPI Object at address %p\n",
@@ -476,8 +476,33 @@ DumpNode:
             return;
         }
 
-        AcpiUtDebugDumpBuffer ((void *) ObjDesc,
-            sizeof (ACPI_OPERAND_OBJECT), Display, ACPI_UINT32_MAX);
+        if (ACPI_GET_DESCRIPTOR_TYPE (
+            ((ACPI_NAMESPACE_NODE *) ObjDesc)) == ACPI_DESC_TYPE_NAMED)
+        {
+            AcpiOsPrintf (" Namespace Node - ");
+            Status = AcpiGetName ((ACPI_NAMESPACE_NODE *) ObjDesc,
+                ACPI_FULL_PATHNAME_NO_TRAILING, &RetBuf);
+            if (ACPI_FAILURE (Status))
+            {
+                AcpiOsPrintf ("Could not convert name to pathname\n");
+            }
+            else
+            {
+                AcpiOsPrintf ("Pathname: %s",
+                    (char *) RetBuf.Pointer);
+            }
+
+            AcpiOsPrintf ("\n");
+            AcpiUtDebugDumpBuffer ((void *) ObjDesc,
+                sizeof (ACPI_NAMESPACE_NODE), Display, ACPI_UINT32_MAX);
+        }
+        else
+        {
+            AcpiOsPrintf ("\n");
+            AcpiUtDebugDumpBuffer ((void *) ObjDesc,
+                sizeof (ACPI_OPERAND_OBJECT), Display, ACPI_UINT32_MAX);
+        }
+
         AcpiExDumpObjectDescriptor (ObjDesc, 1);
     }
 }

Modified: vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/components/dispatcher/dsfield.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -313,6 +313,8 @@ AcpiDsCreateBufferField (
 
         if (!(WalkState->ParseFlags & ACPI_PARSE_EXECUTE))
         {
+            ACPI_ERROR ((AE_INFO,
+                "Parse execute mode is not set"));
             return_ACPI_STATUS (AE_AML_INTERNAL);
         }
 
@@ -701,6 +703,8 @@ AcpiDsInitFieldObjects (
             return_ACPI_STATUS (AE_OK);
         }
 
+        ACPI_ERROR ((AE_INFO,
+            "Parse deferred mode is not set"));
         return_ACPI_STATUS (AE_AML_INTERNAL);
     }
 

Modified: vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c
==============================================================================
--- vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c	Fri Jul 28 17:10:19 2017	(r321654)
+++ vendor-sys/acpica/dist/source/components/dispatcher/dsobject.c	Fri Jul 28 17:44:36 2017	(r321655)
@@ -160,15 +160,7 @@
 #define _COMPONENT          ACPI_DISPATCHER
         ACPI_MODULE_NAME    ("dsobject")
 
-/* Local prototypes */
 
-static ACPI_STATUS
-AcpiDsBuildInternalObject (
-    ACPI_WALK_STATE         *WalkState,
-    ACPI_PARSE_OBJECT       *Op,
-    ACPI_OPERAND_OBJECT     **ObjDescPtr);
-
-
 #ifndef ACPI_NO_METHOD_EXECUTION
 /*******************************************************************************
  *
@@ -185,7 +177,7 @@ AcpiDsBuildInternalObject (
  *
  ******************************************************************************/
 
-static ACPI_STATUS
+ACPI_STATUS
 AcpiDsBuildInternalObject (
     ACPI_WALK_STATE         *WalkState,
     ACPI_PARSE_OBJECT       *Op,
@@ -193,7 +185,6 @@ AcpiDsBuildInternalObject (
 {
     ACPI_OPERAND_OBJECT     *ObjDesc;
     ACPI_STATUS             Status;
-    ACPI_OBJECT_TYPE        Type;
 
 
     ACPI_FUNCTION_TRACE (DsBuildInternalObject);
@@ -204,129 +195,43 @@ AcpiDsBuildInternalObject (
     {
         /*
          * This is a named object reference. If this name was
-         * previously looked up in the namespace, it was stored in this op.
-         * Otherwise, go ahead and look it up now
+         * previously looked up in the namespace, it was stored in
+         * this op. Otherwise, go ahead and look it up now
          */
         if (!Op->Common.Node)
         {
-            Status = AcpiNsLookup (WalkState->ScopeInfo,
-                Op->Common.Value.String,
-                ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
-                ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL,
-                ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &(Op->Common.Node)));
-            if (ACPI_FAILURE (Status))
-            {
-                /* Check if we are resolving a named reference within a package */
+            /* Check if we are resolving a named reference within a package */
 
-                if ((Status == AE_NOT_FOUND) && (AcpiGbl_EnableInterpreterSlack) &&
-
-                    ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
-                     (Op->Common.Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP)))
+            if ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
+                (Op->Common.Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP))
+            {
+                /*
+                 * We won't resolve package elements here, we will do this
+                 * after all ACPI tables are loaded into the namespace. This
+                 * behavior supports both forward references to named objects
+                 * and external references to objects in other tables.
+                 */
+                goto CreateNewObject;
+            }
+            else
+            {
+                Status = AcpiNsLookup (WalkState->ScopeInfo,
+                    Op->Common.Value.String,
+                    ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
+                    ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE, NULL,
+                    ACPI_CAST_INDIRECT_PTR (
+                        ACPI_NAMESPACE_NODE, &(Op->Common.Node)));
+                if (ACPI_FAILURE (Status))
                 {
-                    /*
-                     * We didn't find the target and we are populating elements
-                     * of a package - ignore if slack enabled. Some ASL code
-                     * contains dangling invalid references in packages and
-                     * expects that no exception will be issued. Leave the
-                     * element as a null element. It cannot be used, but it
-                     * can be overwritten by subsequent ASL code - this is
-                     * typically the case.
-                     */
-                    ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
-                        "Ignoring unresolved reference in package [%4.4s]\n",
-                        WalkState->ScopeInfo->Scope.Node->Name.Ascii));

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707281744.v6SHibdM088924>