svn commit: r298595 - in vendor-sys/acpica/dist: . generate/unix/acpibin generate/unix/acpidump generate/unix/acpiexamples generate/unix/acpiexec generate/unix/acpinames generate/unix/acpisrc gener...
Jung-uk Kim
jkim at FreeBSD.org
Mon Apr 25 22:24:57 UTC 2016
Author: jkim
Date: Mon Apr 25 22:24:53 2016
New Revision: 298595
URL: https://svnweb.freebsd.org/changeset/base/298595
Log:
Import ACPICA 20160422.
Added:
vendor-sys/acpica/dist/source/components/utilities/utascii.c (contents, props changed)
Modified:
vendor-sys/acpica/dist/changes.txt
vendor-sys/acpica/dist/generate/unix/acpibin/Makefile
vendor-sys/acpica/dist/generate/unix/acpidump/Makefile
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/acpisrc/Makefile
vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile
vendor-sys/acpica/dist/generate/unix/iasl/Makefile
vendor-sys/acpica/dist/source/common/acfileio.c
vendor-sys/acpica/dist/source/common/dmextern.c
vendor-sys/acpica/dist/source/common/dmrestag.c
vendor-sys/acpica/dist/source/common/dmtable.c
vendor-sys/acpica/dist/source/common/dmtbdump.c
vendor-sys/acpica/dist/source/common/dmtbinfo.c
vendor-sys/acpica/dist/source/compiler/aslanalyze.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/aslfold.c
vendor-sys/acpica/dist/source/compiler/asllookup.c
vendor-sys/acpica/dist/source/compiler/aslmap.c
vendor-sys/acpica/dist/source/compiler/aslmethod.c
vendor-sys/acpica/dist/source/compiler/aslparser.y
vendor-sys/acpica/dist/source/compiler/aslpredef.c
vendor-sys/acpica/dist/source/compiler/aslprepkg.c
vendor-sys/acpica/dist/source/compiler/aslresource.c
vendor-sys/acpica/dist/source/compiler/aslresources.y
vendor-sys/acpica/dist/source/compiler/aslrestype2s.c
vendor-sys/acpica/dist/source/compiler/aslrules.y
vendor-sys/acpica/dist/source/compiler/asltokens.y
vendor-sys/acpica/dist/source/compiler/asltree.c
vendor-sys/acpica/dist/source/compiler/asltypes.y
vendor-sys/acpica/dist/source/compiler/dttable2.c
vendor-sys/acpica/dist/source/compiler/dttemplate.h
vendor-sys/acpica/dist/source/components/debugger/dbnames.c
vendor-sys/acpica/dist/source/components/disassembler/dmcstyle.c
vendor-sys/acpica/dist/source/components/disassembler/dmopcode.c
vendor-sys/acpica/dist/source/components/disassembler/dmresrcl2.c
vendor-sys/acpica/dist/source/components/disassembler/dmutils.c
vendor-sys/acpica/dist/source/components/disassembler/dmwalk.c
vendor-sys/acpica/dist/source/components/dispatcher/dsmethod.c
vendor-sys/acpica/dist/source/components/executer/exfldio.c
vendor-sys/acpica/dist/source/components/executer/exnames.c
vendor-sys/acpica/dist/source/components/hardware/hwregs.c
vendor-sys/acpica/dist/source/components/namespace/nsinit.c
vendor-sys/acpica/dist/source/components/namespace/nsprepkg.c
vendor-sys/acpica/dist/source/components/namespace/nsxfeval.c
vendor-sys/acpica/dist/source/components/parser/psutils.c
vendor-sys/acpica/dist/source/components/resources/rsdumpinfo.c
vendor-sys/acpica/dist/source/components/resources/rsserial.c
vendor-sys/acpica/dist/source/components/tables/tbdata.c
vendor-sys/acpica/dist/source/components/tables/tbfind.c
vendor-sys/acpica/dist/source/components/tables/tbinstal.c
vendor-sys/acpica/dist/source/components/tables/tbutils.c
vendor-sys/acpica/dist/source/components/utilities/utstring.c
vendor-sys/acpica/dist/source/include/acdisasm.h
vendor-sys/acpica/dist/source/include/aclocal.h
vendor-sys/acpica/dist/source/include/acmacros.h
vendor-sys/acpica/dist/source/include/acpixf.h
vendor-sys/acpica/dist/source/include/acpredef.h
vendor-sys/acpica/dist/source/include/acrestyp.h
vendor-sys/acpica/dist/source/include/actables.h
vendor-sys/acpica/dist/source/include/actbl3.h
vendor-sys/acpica/dist/source/include/acutils.h
vendor-sys/acpica/dist/source/tools/acpibin/abcompare.c
vendor-sys/acpica/dist/source/tools/acpidump/apdump.c
vendor-sys/acpica/dist/source/tools/acpihelp/ahamlops.c
vendor-sys/acpica/dist/source/tools/acpihelp/ahaslops.c
vendor-sys/acpica/dist/source/tools/acpisrc/astable.c
vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.c
vendor-sys/acpica/dist/source/tools/acpixtract/acpixtract.h
vendor-sys/acpica/dist/source/tools/acpixtract/axutils.c
Modified: vendor-sys/acpica/dist/changes.txt
==============================================================================
--- vendor-sys/acpica/dist/changes.txt Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/changes.txt Mon Apr 25 22:24:53 2016 (r298595)
@@ -1,4 +1,99 @@
----------------------------------------
+22 April 2016. Summary of changes for version 20160422:
+
+1) ACPICA kernel-resident subsystem:
+
+Fixed a regression in the GAS (generic address structure) arbitrary bit
+support in AcpiHwRead/AcpiHwWrite. Problem could cause incorrect behavior
+and incorrect return values. Lv Zheng. ACPICA BZ 1270.
+
+ACPI 6.0: Added support for new/renamed resource macros. One new argument
+was added to each of these macros, and the original name has been
+deprecated. The AML disassembler will always disassemble to the new
+names. Support for the new macros was added to iASL, disassembler,
+resource manager, and the acpihelp utility. ACPICA BZ 1274.
+
+ I2cSerialBus -> I2cSerialBusV2
+ SpiSerialBus -> SpiSerialBusV2
+ UartSerialBus -> UartSerialBusV2
+
+ACPI 6.0: Added support for a new integer field that was appended to the
+package object returned by the _BIX method. This adds iASL compile-time
+and AML runtime error checking. ACPICA BZ 1273.
+
+ACPI 6.1: Added support for a new PCCT subtable, "HW-Reduced Comm
+Subspace Type2" (Headers, Disassembler, and data table compiler).
+
+Example Code and Data Size: These are the sizes for the OS-independent
+acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The
+debug version of the code includes the debug output trace mechanism and
+has a much larger code and data size.
+
+ Current Release:
+ Non-Debug Version: 137.4K Code, 52.6K Data, 190.0K Total
+ Debug Version: 201.5K Code, 82.2K Data, 283.7K Total
+ Previous Release:
+ Non-Debug Version: 137.1K Code, 51.5K Data, 188.6K Total
+ Debug Version: 201.0K Code, 82.0K Data, 283.0K Total
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Implemented an ASL grammar extension to allow/enable executable
+"module-level code" to be created and executed under the various
+operators that create new scopes. This type of AML code is already
+supported in all known AML interpreters, and the grammar change will
+appear in the next version of the ACPI specification. Simplifies the
+conditional runtime creation of named objects under these object types:
+
+ Device
+ PowerResource
+ Processor
+ Scope
+ ThermalZone
+
+iASL: Implemented a new ASL extension, a "For" loop macro to add greater
+ease-of-use to the ASL language. The syntax is similar to the
+corresponding C operator, and is implemented with the existing AML While
+opcode -- thus requiring no changes to existing AML interpreters.
+
+ For (Initialize, Predicate, Update) {TermList}
+
+Grammar:
+ ForTerm :=
+ For (
+ Initializer // Nothing | TermArg => ComputationalData
+ Predicate // Nothing | TermArg => ComputationalData
+ Update // Nothing | TermArg => ComputationalData
+ ) {TermList}
+
+
+iASL: The _HID/_ADR detection and validation has been enhanced to search
+under conditionals in order to allow these objects to be conditionally
+created at runtime.
+
+iASL: Fixed several issues with the constant folding feature. The
+improvement allows better detection and resolution of statements that can
+be folded at compile time. ACPICA BZ 1266.
+
+iASL/Disassembler: Fixed a couple issues with the Else{If{}...}
+conversion to the ASL ElseIf operator where incorrect ASL code could be
+generated.
+
+iASL/Disassembler: Fixed a problem with the ASL+ code disassembly where
+sometimes an extra (and extraneous) set of parentheses were emitted for
+some combinations of operators. Although this did not cause any problems
+with recompilation of the disassembled code, it made the code more
+difficult to read. David Box. ACPICA BZ 1231.
+
+iASL: Changed to ignore the unreferenced detection for predefined names
+of resource descriptor elements, when the resource descriptor is
+created/defined within a control method.
+
+iASL: Disassembler: Fix a possible fault with externally declared Buffer
+objects.
+
+----------------------------------------
18 March 2016. Summary of changes for version 20160318:
1) ACPICA kernel-resident subsystem:
Modified: vendor-sys/acpica/dist/generate/unix/acpibin/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/acpibin/Makefile Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/generate/unix/acpibin/Makefile Mon Apr 25 22:24:53 2016 (r298595)
@@ -32,6 +32,7 @@ OBJECTS = \
$(OBJDIR)/cmfsize.o\
$(OBJDIR)/getopt.o\
$(OBJDIR)/utalloc.o\
+ $(OBJDIR)/utascii.o\
$(OBJDIR)/utbuffer.o\
$(OBJDIR)/utcache.o\
$(OBJDIR)/utdebug.o\
Modified: vendor-sys/acpica/dist/generate/unix/acpidump/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/generate/unix/acpidump/Makefile Mon Apr 25 22:24:53 2016 (r298595)
@@ -39,6 +39,7 @@ OBJECTS = \
$(OBJDIR)/osunixxf.o\
$(OBJDIR)/tbprint.o\
$(OBJDIR)/tbxfroot.o\
+ $(OBJDIR)/utascii.o\
$(OBJDIR)/utbuffer.o\
$(OBJDIR)/utdebug.o\
$(OBJDIR)/utexcep.o\
Modified: vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/generate/unix/acpiexamples/Makefile Mon Apr 25 22:24:53 2016 (r298595)
@@ -131,6 +131,7 @@ OBJECTS = \
$(OBJDIR)/tbxfroot.o\
$(OBJDIR)/utaddress.o\
$(OBJDIR)/utalloc.o\
+ $(OBJDIR)/utascii.o\
$(OBJDIR)/utbuffer.o\
$(OBJDIR)/utcache.o\
$(OBJDIR)/utcopy.o\
Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Mon Apr 25 22:24:53 2016 (r298595)
@@ -201,6 +201,7 @@ OBJECTS = \
$(OBJDIR)/tbxfroot.o\
$(OBJDIR)/utaddress.o\
$(OBJDIR)/utalloc.o\
+ $(OBJDIR)/utascii.o\
$(OBJDIR)/utbuffer.o\
$(OBJDIR)/utcache.o\
$(OBJDIR)/utcopy.o\
Modified: vendor-sys/acpica/dist/generate/unix/acpinames/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/acpinames/Makefile Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/generate/unix/acpinames/Makefile Mon Apr 25 22:24:53 2016 (r298595)
@@ -96,6 +96,7 @@ OBJECTS = \
$(OBJDIR)/tbxfroot.o\
$(OBJDIR)/utaddress.o\
$(OBJDIR)/utalloc.o\
+ $(OBJDIR)/utascii.o\
$(OBJDIR)/utbuffer.o\
$(OBJDIR)/utcache.o\
$(OBJDIR)/utdebug.o\
Modified: vendor-sys/acpica/dist/generate/unix/acpisrc/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/acpisrc/Makefile Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/generate/unix/acpisrc/Makefile Mon Apr 25 22:24:53 2016 (r298595)
@@ -39,6 +39,7 @@ OBJECTS = \
$(OBJDIR)/oslibcfs.o\
$(OBJDIR)/osunixdir.o\
$(OBJDIR)/osunixxf.o\
+ $(OBJDIR)/utascii.o\
$(OBJDIR)/utdebug.o\
$(OBJDIR)/utexcep.o\
$(OBJDIR)/utglobal.o\
Modified: vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/generate/unix/acpixtract/Makefile Mon Apr 25 22:24:53 2016 (r298595)
@@ -33,6 +33,7 @@ OBJECTS = \
$(OBJDIR)/getopt.o\
$(OBJDIR)/oslibcfs.o\
$(OBJDIR)/osunixxf.o\
+ $(OBJDIR)/utascii.o\
$(OBJDIR)/utdebug.o\
$(OBJDIR)/utexcep.o\
$(OBJDIR)/utglobal.o\
Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile
==============================================================================
--- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Mon Apr 25 22:24:53 2016 (r298595)
@@ -201,6 +201,7 @@ OBJECTS = \
$(OBJDIR)/tbxfload.o\
$(OBJDIR)/utaddress.o\
$(OBJDIR)/utalloc.o\
+ $(OBJDIR)/utascii.o\
$(OBJDIR)/utbuffer.o\
$(OBJDIR)/utcache.o\
$(OBJDIR)/utcopy.o\
@@ -274,12 +275,14 @@ include ../Makefile.rules
# Function to safely execute yacc
#
safe_yacc = \
- _f=`echo $(1) | tr '[:upper:]' '[:lower:]'` &&\
- _d=`mktemp -d $(OBJDIR)/$$_f.XXXXXX` &&\
- _t=`basename $(3)` &&\
- $(YACC) $(YFLAGS) -p$(1) -o$$_d/$$_f.c -d $(2) &&\
- mv $$_d/$$_f.$${_t\#\#*.} $(3);\
- test -d $$_d && rm -fr $$_d
+ _d=`mktemp -d $(OBJDIR)/$(1).XXXXXX` &&\
+ cd $$_d &&\
+ $(YACC) $(YFLAGS) -d -p$(1) $(abspath $(2)) &&\
+ cd - &&\
+ mv $$_d/y.tab$(suffix $(3)) $(3);\
+ _r=$$?;\
+ rm -fr $$_d;\
+ exit $$_r
#
# Macro processing for iASL .y files
Modified: vendor-sys/acpica/dist/source/common/acfileio.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/acfileio.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/common/acfileio.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -112,7 +112,8 @@ AcGetAllTablesFromFile (
FileSize = CmGetFileSize (File);
if (FileSize == ACPI_UINT32_MAX)
{
- return (AE_ERROR);
+ Status = AE_ERROR;
+ goto ErrorExit;
}
fprintf (stderr,
@@ -123,7 +124,8 @@ AcGetAllTablesFromFile (
if (FileSize < sizeof (ACPI_TABLE_HEADER))
{
- return (AE_BAD_HEADER);
+ Status = AE_BAD_HEADER;
+ goto ErrorExit;
}
/* Check for an non-binary file */
@@ -156,7 +158,7 @@ AcGetAllTablesFromFile (
}
else if (ACPI_FAILURE (Status))
{
- return (Status);
+ goto ErrorExit;
}
/* Print table header for iASL/disassembler only */
@@ -203,6 +205,7 @@ AcGetAllTablesFromFile (
*ReturnListHead = ListHead;
}
+ErrorExit:
fclose(File);
return (Status);
}
@@ -409,7 +412,7 @@ AcValidateTableHeader (
/* Validate the signature (limited ASCII chars) */
- if (!AcpiIsValidSignature (TableHeader.Signature))
+ if (!AcpiUtValidNameseg (TableHeader.Signature))
{
fprintf (stderr, "Invalid table signature: 0x%8.8X\n",
*ACPI_CAST_PTR (UINT32, TableHeader.Signature));
Modified: vendor-sys/acpica/dist/source/common/dmextern.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmextern.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/common/dmextern.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -1101,7 +1101,6 @@ AcpiDmEmitExternals (
*/
while (AcpiGbl_ExternalList)
{
- AcpiGbl_ExternalList = AcpiGbl_ExternalList;
if (!(AcpiGbl_ExternalList->Flags & ACPI_EXT_EXTERNAL_EMITTED))
{
AcpiOsPrintf (" External (%s%s)",
Modified: vendor-sys/acpica/dist/source/common/dmrestag.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmrestag.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/common/dmrestag.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -279,6 +279,7 @@ static const ACPI_RESOURCE_TAG Acpi
static const ACPI_RESOURCE_TAG AcpiDmI2cSerialBusTags[] =
{
{( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE},
+ {( 6 * 8) + 2, ACPI_RESTAG_INTERRUPTSHARE}, /* V2 - ACPI 6.0 */
{( 7 * 8) + 0, ACPI_RESTAG_MODE},
{(12 * 8), ACPI_RESTAG_SPEED},
{(16 * 8), ACPI_RESTAG_ADDRESS},
@@ -288,6 +289,7 @@ static const ACPI_RESOURCE_TAG Acpi
static const ACPI_RESOURCE_TAG AcpiDmSpiSerialBusTags[] =
{
{( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE},
+ {( 6 * 8) + 2, ACPI_RESTAG_INTERRUPTSHARE}, /* V2 - ACPI 6.0 */
{( 7 * 8) + 0, ACPI_RESTAG_MODE},
{( 7 * 8) + 1, ACPI_RESTAG_DEVICEPOLARITY},
{(12 * 8), ACPI_RESTAG_SPEED},
@@ -300,7 +302,8 @@ static const ACPI_RESOURCE_TAG Acpi
static const ACPI_RESOURCE_TAG AcpiDmUartSerialBusTags[] =
{
- {( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE}, /* Note: not part of original macro */
+ {( 6 * 8) + 0, ACPI_RESTAG_SLAVEMODE}, /* Note: not part of original macro */
+ {( 6 * 8) + 2, ACPI_RESTAG_INTERRUPTSHARE}, /* V2 - ACPI 6.0 */
{( 7 * 8) + 0, ACPI_RESTAG_FLOWCONTROL},
{( 7 * 8) + 2, ACPI_RESTAG_STOPBITS},
{( 7 * 8) + 4, ACPI_RESTAG_LENGTH},
Modified: vendor-sys/acpica/dist/source/common/dmtable.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtable.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/common/dmtable.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -58,15 +58,6 @@ AcpiAhGetTableInfo (
char *Signature);
-/* Local Prototypes */
-
-static void
-AcpiDmCheckAscii (
- UINT8 *Target,
- char *RepairedName,
- UINT32 Count);
-
-
/* Common format strings for commented values */
#define UINT8_FORMAT "%2.2X [%s]\n"
@@ -255,6 +246,7 @@ static const char *AcpiDmPcctS
{
"Generic Communications Subspace", /* ACPI_PCCT_TYPE_GENERIC_SUBSPACE */
"HW-Reduced Comm Subspace", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE */
+ "HW-Reduced Comm Subspace Type2", /* ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2 */
"Unknown Subtable Type" /* Reserved */
};
@@ -1059,7 +1051,7 @@ AcpiDmDumpTable (
case ACPI_DMT_SIG:
- AcpiDmCheckAscii (Target, RepairedName, 4);
+ AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
AcpiOsPrintf ("\"%.4s\" ", RepairedName);
TableData = AcpiAhGetTableInfo (ACPI_CAST_PTR (char, Target));
@@ -1075,19 +1067,19 @@ AcpiDmDumpTable (
case ACPI_DMT_NAME4:
- AcpiDmCheckAscii (Target, RepairedName, 4);
+ AcpiUtCheckAndRepairAscii (Target, RepairedName, 4);
AcpiOsPrintf ("\"%.4s\"\n", RepairedName);
break;
case ACPI_DMT_NAME6:
- AcpiDmCheckAscii (Target, RepairedName, 6);
+ AcpiUtCheckAndRepairAscii (Target, RepairedName, 6);
AcpiOsPrintf ("\"%.6s\"\n", RepairedName);
break;
case ACPI_DMT_NAME8:
- AcpiDmCheckAscii (Target, RepairedName, 8);
+ AcpiUtCheckAndRepairAscii (Target, RepairedName, 8);
AcpiOsPrintf ("\"%.8s\"\n", RepairedName);
break;
@@ -1490,42 +1482,3 @@ AcpiDmDumpTable (
return (AE_OK);
}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDmCheckAscii
- *
- * PARAMETERS: Name - Ascii string
- * Count - Number of characters to check
- *
- * RETURN: None
- *
- * DESCRIPTION: Ensure that the requested number of characters are printable
- * Ascii characters. Sets non-printable and null chars to <space>.
- *
- ******************************************************************************/
-
-static void
-AcpiDmCheckAscii (
- UINT8 *Name,
- char *RepairedName,
- UINT32 Count)
-{
- UINT32 i;
-
-
- for (i = 0; i < Count; i++)
- {
- RepairedName[i] = (char) Name[i];
-
- if (!Name[i])
- {
- return;
- }
- if (!isprint (Name[i]))
- {
- RepairedName[i] = ' ';
- }
- }
-}
Modified: vendor-sys/acpica/dist/source/common/dmtbdump.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtbdump.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/common/dmtbdump.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -2897,6 +2897,11 @@ AcpiDmDumpPcct (
InfoTable = AcpiDmTableInfoPcct1;
break;
+ case ACPI_PCCT_TYPE_HW_REDUCED_SUBSPACE_TYPE2:
+
+ InfoTable = AcpiDmTableInfoPcct2;
+ break;
+
default:
AcpiOsPrintf (
Modified: vendor-sys/acpica/dist/source/common/dmtbinfo.c
==============================================================================
--- vendor-sys/acpica/dist/source/common/dmtbinfo.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/common/dmtbinfo.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -218,6 +218,7 @@
#define ACPI_NFIT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NFIT_FLUSH_ADDRESS,f)
#define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
#define ACPI_PCCT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f)
+#define ACPI_PCCT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f)
#define ACPI_PMTT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_SOCKET,f)
#define ACPI_PMTT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_CONTROLLER,f)
#define ACPI_PMTT1A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PMTT_DOMAIN,f)
@@ -279,6 +280,7 @@
#define ACPI_NFIT4_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_NFIT_CONTROL_REGION,f,o)
#define ACPI_PCCT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_PCCT,f,o)
#define ACPI_PCCT1_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED,f,o)
+#define ACPI_PCCT2_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f,o)
#define ACPI_PMTTH_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_PMTT_HEADER,f,o)
#define ACPI_WDDT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_WDDT,f,o)
#define ACPI_EINJ0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_WHEA_HEADER,f,o)
@@ -2339,6 +2341,29 @@ ACPI_DMTABLE_INFO AcpiDmTableI
ACPI_DMT_TERMINATOR
};
+/* 2: HW-reduced Communications Subspace Type 2 (ACPI 6.1) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[] =
+{
+ {ACPI_DMT_UINT32, ACPI_PCCT2_OFFSET (DoorbellInterrupt), "Doorbell Interrupt", 0},
+ {ACPI_DMT_UINT8, ACPI_PCCT2_OFFSET (Flags), "Flags (Decoded Below)", DT_FLAG},
+ {ACPI_DMT_FLAG0, ACPI_PCCT2_FLAG_OFFSET (Flags,0), "Polarity", 0},
+ {ACPI_DMT_FLAG1, ACPI_PCCT2_FLAG_OFFSET (Flags,0), "Mode", 0},
+ {ACPI_DMT_UINT8, ACPI_PCCT2_OFFSET (Reserved), "Reserved", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (BaseAddress), "Base Address", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (Length), "Address Length", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT2_OFFSET (DoorbellRegister), "Doorbell Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (PreserveMask), "Preserve Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (WriteMask), "Write Mask", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT2_OFFSET (Latency), "Command Latency", 0},
+ {ACPI_DMT_UINT32, ACPI_PCCT2_OFFSET (MaxAccessRate), "Maximum Access Rate", 0},
+ {ACPI_DMT_UINT16, ACPI_PCCT2_OFFSET (MinTurnaroundTime), "Minimum Turnaround Time", 0},
+ {ACPI_DMT_GAS, ACPI_PCCT2_OFFSET (DoorbellAckRegister), "Doorbell ACK Register", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (AckPreserveMask), "ACK Preserve Mask", 0},
+ {ACPI_DMT_UINT64, ACPI_PCCT2_OFFSET (AckWriteMask), "ACK Write Mask", 0},
+ ACPI_DMT_TERMINATOR
+};
+
/*******************************************************************************
*
Modified: vendor-sys/acpica/dist/source/compiler/aslanalyze.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslanalyze.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslanalyze.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -50,6 +50,15 @@
ACPI_MODULE_NAME ("aslanalyze")
+/* Local Prototypes */
+
+static ACPI_STATUS
+ApDeviceSubtreeWalk (
+ ACPI_PARSE_OBJECT *Op,
+ UINT32 Level,
+ void *Context);
+
+
/*******************************************************************************
*
* FUNCTION: AnIsInternalMethod
@@ -579,6 +588,108 @@ ApCheckRegMethod (
/*******************************************************************************
*
+ * FUNCTION: ApFindNameInDeviceTree
+ *
+ * PARAMETERS: Name - Name to search for
+ * Op - Current parse op
+ *
+ * RETURN: TRUE if name found in the same scope as Op.
+ *
+ * DESCRIPTION: Determine if a name appears in the same scope as Op, as either
+ * a Method() or a Name(). "Same scope" can mean under an If or
+ * Else statement.
+ *
+ * NOTE: Detects _HID/_ADR in this type of construct (legal in ACPI 6.1+)
+ *
+ * Scope (\_SB.PCI0)
+ * {
+ * Device (I2C0)
+ * {
+ * If (SMD0 != 4) {
+ * Name (_HID, "INT3442")
+ * } Else {
+ * Name (_ADR, 0x400)
+ * }
+ * }
+ * }
+ ******************************************************************************/
+
+BOOLEAN
+ApFindNameInDeviceTree (
+ char *Name,
+ ACPI_PARSE_OBJECT *Op)
+{
+ ACPI_STATUS Status;
+
+
+ Status = TrWalkParseTree (Op, ASL_WALK_VISIT_DOWNWARD,
+ ApDeviceSubtreeWalk, NULL, Name);
+
+ if (Status == AE_CTRL_TRUE)
+ {
+ return (TRUE); /* Found a match */
+ }
+
+ return (FALSE);
+}
+
+
+/* Callback function for interface above */
+
+static ACPI_STATUS
+ApDeviceSubtreeWalk (
+ ACPI_PARSE_OBJECT *Op,
+ UINT32 Level,
+ void *Context)
+{
+ char *Name = ACPI_CAST_PTR (char, Context);
+
+
+ switch (Op->Asl.ParseOpcode)
+ {
+ case PARSEOP_DEVICE:
+
+ /* Level 0 is the starting device, ignore it */
+
+ if (Level > 0)
+ {
+ /* Ignore sub-devices */
+
+ return (AE_CTRL_DEPTH);
+ }
+ break;
+
+ case PARSEOP_NAME:
+ case PARSEOP_METHOD:
+
+ /* These are what we are looking for */
+
+ if (ACPI_COMPARE_NAME (Name, Op->Asl.NameSeg))
+ {
+ return (AE_CTRL_TRUE);
+ }
+ return (AE_CTRL_DEPTH);
+
+ case PARSEOP_SCOPE:
+ case PARSEOP_FIELD:
+ case PARSEOP_OPERATIONREGION:
+
+ /*
+ * We want to ignore these, because either they can be large
+ * subtrees or open a scope to somewhere else.
+ */
+ return (AE_CTRL_DEPTH);
+
+ default:
+ break;
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: ApFindNameInScope
*
* PARAMETERS: Name - Name to search for
Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompile.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -207,8 +207,8 @@ CmDoCompile (
if (Gbl_FoldConstants)
{
- TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_DOWNWARD,
- OpcAmlConstantWalk, NULL, NULL);
+ TrWalkParseTree (Gbl_ParseTreeRoot, ASL_WALK_VISIT_UPWARD,
+ NULL, OpcAmlConstantWalk, NULL);
}
else
{
Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Mon Apr 25 22:24:53 2016 (r298595)
@@ -287,6 +287,10 @@ ApFindNameInScope (
char *Name,
ACPI_PARSE_OBJECT *Op);
+BOOLEAN
+ApFindNameInDeviceTree (
+ char *Name,
+ ACPI_PARSE_OBJECT *Op);
/*
* aslerror - error handling/reporting
@@ -709,6 +713,11 @@ ExDoExternal (
#define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD)
+void
+TrSetParent (
+ ACPI_PARSE_OBJECT *Op,
+ ACPI_PARSE_OBJECT *ParentOp);
+
ACPI_PARSE_OBJECT *
TrAllocateNode (
UINT32 ParseOpcode);
Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.l
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslcompiler.l Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslcompiler.l Mon Apr 25 22:24:53 2016 (r298595)
@@ -332,6 +332,7 @@ NamePathTail [.]{NameSeg}
"GpioInt" { count (1); return (PARSEOP_GPIO_INT); }
"GpioIo" { count (1); return (PARSEOP_GPIO_IO); }
"I2cSerialBus" { count (1); return (PARSEOP_I2C_SERIALBUS); }
+"I2cSerialBusV2" { count (1); return (PARSEOP_I2C_SERIALBUS_V2); }
"Interrupt" { count (1); return (PARSEOP_INTERRUPT); }
"IO" { count (1); return (PARSEOP_IO); }
"IRQ" { count (1); return (PARSEOP_IRQ); }
@@ -344,9 +345,11 @@ NamePathTail [.]{NameSeg}
"QWordSpace" { count (1); return (PARSEOP_QWORDSPACE); }
"Register" { count (1); return (PARSEOP_REGISTER); }
"SpiSerialBus" { count (1); return (PARSEOP_SPI_SERIALBUS); }
+"SpiSerialBusV2" { count (1); return (PARSEOP_SPI_SERIALBUS_V2); }
"StartDependentFn" { count (1); return (PARSEOP_STARTDEPENDENTFN); }
"StartDependentFnNoPri" { count (1); return (PARSEOP_STARTDEPENDENTFN_NOPRI); }
"UartSerialBus" { count (1); return (PARSEOP_UART_SERIALBUS); }
+"UartSerialBusV2" { count (1); return (PARSEOP_UART_SERIALBUS_V2); }
"VendorLong" { count (1); return (PARSEOP_VENDORLONG); }
"VendorShort" { count (1); return (PARSEOP_VENDORSHORT); }
"WordBusNumber" { count (1); return (PARSEOP_WORDBUSNUMBER); }
@@ -672,9 +675,14 @@ NamePathTail [.]{NameSeg}
/* printf debug macros */
+
"printf" { count (0); return (PARSEOP_PRINTF); }
"fprintf" { count (0); return (PARSEOP_FPRINTF); }
+ /* Other macros */
+
+"For" { count (0); return (PARSEOP_FOR); }
+
/* Predefined compiler names */
"__DATE__" { count (0); return (PARSEOP___DATE__); }
Modified: vendor-sys/acpica/dist/source/compiler/aslfold.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslfold.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslfold.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -101,6 +101,7 @@ TrInstallReducedConstant (
* RETURN: Status
*
* DESCRIPTION: Reduce an Op and its subtree to a constant if possible.
+ * Called during ascent of the parse tree.
*
******************************************************************************/
@@ -192,9 +193,7 @@ OpcAmlConstantWalk (
OpcUpdateIntegerNode (Op, 0);
}
- /* Abort the walk of this subtree, we are done with it */
-
- return (AE_CTRL_DEPTH);
+ return (AE_OK);
}
@@ -207,7 +206,7 @@ OpcAmlConstantWalk (
* RETURN: Status
*
* DESCRIPTION: Check one Op for a reducible type 3/4/5 AML opcode.
- * This is performed via a downward walk of the parse subtree.
+ * This is performed via an upward walk of the parse subtree.
*
******************************************************************************/
@@ -373,7 +372,6 @@ OpcAmlCheckForConstant (
goto CleanupAndExit;
}
-
/* Debug output */
DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345");
@@ -519,9 +517,6 @@ TrTransformToStoreOp (
ACPI_STATUS Status;
- DbgPrint (ASL_PARSE_OUTPUT,
- "Reduction/Transform to StoreOp: Store(Constant, Target)\n");
-
/* Extract the operands */
Child1 = Op->Asl.Child;
@@ -543,6 +538,10 @@ TrTransformToStoreOp (
}
}
+ DbgPrint (ASL_PARSE_OUTPUT,
+ "Reduction/Transform to StoreOp: Store(%s, %s)\n",
+ Child1->Asl.ParseOpName, Child2->Asl.ParseOpName);
+
/*
* Create a NULL (zero) target so that we can use the
* interpreter to evaluate the expression.
Modified: vendor-sys/acpica/dist/source/compiler/asllookup.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/asllookup.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/asllookup.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -207,6 +207,7 @@ LkIsObjectUsed (
case ACPI_TYPE_POWER:
case ACPI_TYPE_THERMAL:
case ACPI_TYPE_LOCAL_RESOURCE:
+ case ACPI_TYPE_LOCAL_RESOURCE_FIELD: /* Names assigned to descriptor elements */
return (AE_OK);
@@ -227,8 +228,8 @@ LkIsObjectUsed (
* Issue a remark even if it is a reserved name (starts
* with an underscore).
*/
- sprintf (MsgBuffer, "Name is within method [%4.4s]",
- Next->Name.Ascii);
+ sprintf (MsgBuffer, "Name [%4.4s] is within a method [%4.4s]",
+ Node->Name.Ascii, Next->Name.Ascii);
AslError (ASL_REMARK, ASL_MSG_NOT_REFERENCED,
LkGetNameOp (Node->Op), MsgBuffer);
return (AE_OK);
Modified: vendor-sys/acpica/dist/source/compiler/aslmap.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslmap.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslmap.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -238,6 +238,7 @@ const ASL_MAPPING_ENTRY AslKeywordMa
/* GPIOINT */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* GPIOIO */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* I2CSERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
+/* I2CSERIALBUSV2 */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* IF */ OP_TABLE_ENTRY (AML_IF_OP, 0, NODE_AML_PACKAGE, 0),
/* INCLUDE */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* INCLUDE_END */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
@@ -395,6 +396,7 @@ const ASL_MAPPING_ENTRY AslKeywordMa
/* SLAVEMODE_DEVICEINIT */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* SLEEP */ OP_TABLE_ENTRY (AML_SLEEP_OP, 0, 0, 0),
/* SPISERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
+/* SPISERIALBUSV2 */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* STALL */ OP_TABLE_ENTRY (AML_STALL_OP, 0, 0, 0),
/* STARTDEPENDENTFN */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* STARTDEPENDENTFN_NOPRI */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
@@ -420,6 +422,7 @@ const ASL_MAPPING_ENTRY AslKeywordMa
/* TYPE_STATIC */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* TYPE_TRANSLATION */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* UART_SERIALBUS */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
+/* UART_SERIALBUSV2 */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* UNICODE */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, NODE_AML_PACKAGE, 0),
/* UNLOAD */ OP_TABLE_ENTRY (AML_UNLOAD_OP, 0, 0, 0),
/* UPDATERULE_ONES */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_WRITE_AS_ONES, 0, 0),
Modified: vendor-sys/acpica/dist/source/compiler/aslmethod.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslmethod.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslmethod.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -406,10 +406,8 @@ MtMethodAnalysisWalkBegin (
case PARSEOP_DEVICE:
- Next = Op->Asl.Child;
-
- if (!ApFindNameInScope (METHOD_NAME__HID, Next) &&
- !ApFindNameInScope (METHOD_NAME__ADR, Next))
+ if (!ApFindNameInDeviceTree (METHOD_NAME__HID, Op) &&
+ !ApFindNameInDeviceTree (METHOD_NAME__ADR, Op))
{
AslError (ASL_WARNING, ASL_MSG_MISSING_DEPENDENCY, Op,
"Device object requires a _HID or _ADR in same scope");
Modified: vendor-sys/acpica/dist/source/compiler/aslparser.y
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslparser.y Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslparser.y Mon Apr 25 22:24:53 2016 (r298595)
@@ -58,7 +58,7 @@
* each list element and possibly overflow on very large lists (>4000 items).
* This dramatically reduces use of the parse stack overall.
*
- * ArgList, TermList, Objectlist, ByteList, DWordList, PackageList,
+ * ArgList, TermList, ByteList, DWordList, PackageList,
* ResourceMacroList, and FieldUnitList
*/
@@ -99,7 +99,7 @@ AslLocalAllocate (
* These shift/reduce conflicts are expected. There should be zero
* reduce/reduce conflicts.
*/
-%expect 89
+%expect 101
/*! [Begin] no source code translation */
Modified: vendor-sys/acpica/dist/source/compiler/aslpredef.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslpredef.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslpredef.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -454,8 +454,8 @@ ApCheckForPredefinedName (
if (Name[0] == 0)
{
- AcpiOsPrintf ("Found a null name, external = %s\n",
- Op->Asl.ExternalName);
+ AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, Op,
+ "zero length name found");
}
/* All reserved names are prefixed with a single underscore */
Modified: vendor-sys/acpica/dist/source/compiler/aslprepkg.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslprepkg.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslprepkg.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -52,7 +52,7 @@
/* Local prototypes */
-static void
+static ACPI_PARSE_OBJECT *
ApCheckPackageElements (
const char *PredefinedName,
ACPI_PARSE_OBJECT *Op,
@@ -88,6 +88,11 @@ ApPackageTooLarge (
UINT32 Count,
UINT32 ExpectedCount);
+static void
+ApCustomPackage (
+ ACPI_PARSE_OBJECT *ParentOp,
+ const ACPI_PREDEFINED_INFO *Predefined);
+
/*******************************************************************************
*
@@ -168,6 +173,11 @@ ApCheckPackage (
switch (Package->RetInfo.Type)
{
+ case ACPI_PTYPE_CUSTOM:
+
+ ApCustomPackage (ParentOp, Predefined);
+ break;
+
case ACPI_PTYPE1_FIXED:
/*
* The package count is fixed and there are no subpackages
@@ -382,6 +392,86 @@ PackageTooSmall:
/*******************************************************************************
*
+ * FUNCTION: ApCustomPackage
+ *
+ * PARAMETERS: ParentOp - Parse op for the package
+ * Predefined - Pointer to package-specific info for
+ * the method
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Validate packages that don't fit into the standard model and
+ * require custom code.
+ *
+ * NOTE: Currently used for the _BIX method only. When needed for two or more
+ * methods, probably a detect/dispatch mechanism will be required.
+ *
+ ******************************************************************************/
+
+static void
+ApCustomPackage (
+ ACPI_PARSE_OBJECT *ParentOp,
+ const ACPI_PREDEFINED_INFO *Predefined)
+{
+ ACPI_PARSE_OBJECT *Op;
+ UINT32 Count;
+ UINT32 ExpectedCount;
+ UINT32 Version;
+
+
+ /* First child is the package length */
+
+ Op = ParentOp->Asl.Child;
+ Count = (UINT32) Op->Asl.Value.Integer;
+
+ /* Get the version number, must be Integer */
+
+ Op = Op->Asl.Next;
+ Version = (UINT32) Op->Asl.Value.Integer;
+ if (Op->Asl.ParseOpcode != PARSEOP_INTEGER)
+ {
+ AslError (ASL_ERROR, ASL_MSG_RESERVED_OPERAND_TYPE, Op, MsgBuffer);
+ return;
+ }
+
+ /* Validate count (# of elements) */
+
+ ExpectedCount = 21; /* Version 1 */
+ if (Version == 0)
+ {
+ ExpectedCount = 20; /* Version 0 */
+ }
+
+ if (Count < ExpectedCount)
+ {
+ ApPackageTooSmall (Predefined->Info.Name, ParentOp,
+ Count, ExpectedCount);
+ return;
+ }
+ else if (Count > ExpectedCount)
+ {
+ ApPackageTooLarge (Predefined->Info.Name, ParentOp,
+ Count, ExpectedCount);
+ }
+
+ /* Validate all elements of the package */
+
+ Op = ApCheckPackageElements (Predefined->Info.Name, Op,
+ ACPI_RTYPE_INTEGER, 16,
+ ACPI_RTYPE_STRING, 4);
+
+ /* Version 1 has a single trailing integer */
+
+ if (Version > 0)
+ {
+ ApCheckPackageElements (Predefined->Info.Name, Op,
+ ACPI_RTYPE_INTEGER, 1, 0, 0);
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: ApCheckPackageElements
*
* PARAMETERS: PredefinedName - Name of the predefined object
@@ -391,7 +481,9 @@ PackageTooSmall:
* Type2 - Object type for second group
* Count2 - Count for second group
*
- * RETURN: None
+ * RETURN: Next Op peer in the parse tree, after all specified elements
+ * have been validated. Used for multiple validations (calls
+ * to this function).
*
* DESCRIPTION: Validate all elements of a package. Works with packages that
* are defined to contain up to two groups of different object
@@ -399,7 +491,7 @@ PackageTooSmall:
*
******************************************************************************/
-static void
+static ACPI_PARSE_OBJECT *
ApCheckPackageElements (
const char *PredefinedName,
ACPI_PARSE_OBJECT *Op,
@@ -431,6 +523,8 @@ ApCheckPackageElements (
ApCheckObjectType (PredefinedName, Op, Type2, (i + Count1));
Op = Op->Asl.Next;
}
+
+ return (Op);
}
Modified: vendor-sys/acpica/dist/source/compiler/aslresource.c
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslresource.c Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslresource.c Mon Apr 25 22:24:53 2016 (r298595)
@@ -865,16 +865,19 @@ RsDoOneResourceDescriptor (
break;
case PARSEOP_I2C_SERIALBUS:
+ case PARSEOP_I2C_SERIALBUS_V2:
Rnode = RsDoI2cSerialBusDescriptor (Info);
break;
case PARSEOP_SPI_SERIALBUS:
+ case PARSEOP_SPI_SERIALBUS_V2:
Rnode = RsDoSpiSerialBusDescriptor (Info);
break;
case PARSEOP_UART_SERIALBUS:
+ case PARSEOP_UART_SERIALBUS_V2:
Rnode = RsDoUartSerialBusDescriptor (Info);
break;
Modified: vendor-sys/acpica/dist/source/compiler/aslresources.y
==============================================================================
--- vendor-sys/acpica/dist/source/compiler/aslresources.y Mon Apr 25 22:00:05 2016 (r298594)
+++ vendor-sys/acpica/dist/source/compiler/aslresources.y Mon Apr 25 22:24:53 2016 (r298595)
@@ -392,6 +392,7 @@ ResourceMacroTerm
| GpioIntTerm {}
| GpioIoTerm {}
| I2cSerialBusTerm {}
+ | I2cSerialBusTermV2 {}
| InterruptTerm {}
| IOTerm {}
| IRQNoFlagsTerm {}
@@ -404,9 +405,11 @@ ResourceMacroTerm
| QWordSpaceTerm {}
| RegisterTerm {}
| SpiSerialBusTerm {}
+ | SpiSerialBusTermV2 {}
| StartDependentFnNoPriTerm {}
| StartDependentFnTerm {}
| UartSerialBusTerm {}
+ | UartSerialBusTermV2 {}
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-vendor
mailing list