[Midnightbsd-cvs] src [12112] trunk: ACPICA 20170728
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Sun Oct 21 13:19:59 EDT 2018
Revision: 12112
http://svnweb.midnightbsd.org/src/?rev=12112
Author: laffer1
Date: 2018-10-21 13:19:58 -0400 (Sun, 21 Oct 2018)
Log Message:
-----------
ACPICA 20170728
Modified Paths:
--------------
trunk/sys/conf/files
trunk/sys/contrib/dev/acpica/acpica_prep.sh
trunk/sys/contrib/dev/acpica/changes.txt
trunk/sys/contrib/dev/acpica/common/acfileio.c
trunk/sys/contrib/dev/acpica/common/adisasm.c
trunk/sys/contrib/dev/acpica/common/adwalk.c
trunk/sys/contrib/dev/acpica/common/ahpredef.c
trunk/sys/contrib/dev/acpica/common/ahtable.c
trunk/sys/contrib/dev/acpica/common/dmtable.c
trunk/sys/contrib/dev/acpica/common/dmtbinfo.c
trunk/sys/contrib/dev/acpica/compiler/aslanalyze.c
trunk/sys/contrib/dev/acpica/compiler/aslbtypes.c
trunk/sys/contrib/dev/acpica/compiler/aslcodegen.c
trunk/sys/contrib/dev/acpica/compiler/aslcompile.c
trunk/sys/contrib/dev/acpica/compiler/aslcompiler.h
trunk/sys/contrib/dev/acpica/compiler/aslcompiler.l
trunk/sys/contrib/dev/acpica/compiler/aslcstyle.y
trunk/sys/contrib/dev/acpica/compiler/asldefine.h
trunk/sys/contrib/dev/acpica/compiler/aslerror.c
trunk/sys/contrib/dev/acpica/compiler/aslexternal.c
trunk/sys/contrib/dev/acpica/compiler/aslfold.c
trunk/sys/contrib/dev/acpica/compiler/aslglobal.h
trunk/sys/contrib/dev/acpica/compiler/aslhelp.c
trunk/sys/contrib/dev/acpica/compiler/aslhelpers.y
trunk/sys/contrib/dev/acpica/compiler/aslkeywords.y
trunk/sys/contrib/dev/acpica/compiler/asllength.c
trunk/sys/contrib/dev/acpica/compiler/asllisting.c
trunk/sys/contrib/dev/acpica/compiler/aslload.c
trunk/sys/contrib/dev/acpica/compiler/asllookup.c
trunk/sys/contrib/dev/acpica/compiler/aslmap.c
trunk/sys/contrib/dev/acpica/compiler/aslmapoutput.c
trunk/sys/contrib/dev/acpica/compiler/aslmessages.c
trunk/sys/contrib/dev/acpica/compiler/aslmessages.h
trunk/sys/contrib/dev/acpica/compiler/aslmethod.c
trunk/sys/contrib/dev/acpica/compiler/asloffset.c
trunk/sys/contrib/dev/acpica/compiler/aslopcodes.c
trunk/sys/contrib/dev/acpica/compiler/aslopt.c
trunk/sys/contrib/dev/acpica/compiler/asloptions.c
trunk/sys/contrib/dev/acpica/compiler/aslpld.c
trunk/sys/contrib/dev/acpica/compiler/aslpredef.c
trunk/sys/contrib/dev/acpica/compiler/aslprimaries.y
trunk/sys/contrib/dev/acpica/compiler/aslprintf.c
trunk/sys/contrib/dev/acpica/compiler/aslresource.c
trunk/sys/contrib/dev/acpica/compiler/aslresources.y
trunk/sys/contrib/dev/acpica/compiler/aslrules.y
trunk/sys/contrib/dev/acpica/compiler/aslstartup.c
trunk/sys/contrib/dev/acpica/compiler/aslsupport.y
trunk/sys/contrib/dev/acpica/compiler/asltokens.y
trunk/sys/contrib/dev/acpica/compiler/asltransform.c
trunk/sys/contrib/dev/acpica/compiler/asltree.c
trunk/sys/contrib/dev/acpica/compiler/asltypes.h
trunk/sys/contrib/dev/acpica/compiler/aslutils.c
trunk/sys/contrib/dev/acpica/compiler/aslwalks.c
trunk/sys/contrib/dev/acpica/compiler/aslxref.c
trunk/sys/contrib/dev/acpica/compiler/cvcompiler.c
trunk/sys/contrib/dev/acpica/compiler/cvdisasm.c
trunk/sys/contrib/dev/acpica/compiler/cvparser.c
trunk/sys/contrib/dev/acpica/compiler/dtcompile.c
trunk/sys/contrib/dev/acpica/compiler/dtcompiler.h
trunk/sys/contrib/dev/acpica/compiler/dttemplate.h
trunk/sys/contrib/dev/acpica/compiler/dtutils.c
trunk/sys/contrib/dev/acpica/compiler/prmacros.c
trunk/sys/contrib/dev/acpica/components/debugger/dbdisply.c
trunk/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
trunk/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
trunk/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
trunk/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c
trunk/sys/contrib/dev/acpica/components/executer/excreate.c
trunk/sys/contrib/dev/acpica/components/executer/exdump.c
trunk/sys/contrib/dev/acpica/components/executer/exmisc.c
trunk/sys/contrib/dev/acpica/components/executer/exoparg2.c
trunk/sys/contrib/dev/acpica/components/hardware/hwregs.c
trunk/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
trunk/sys/contrib/dev/acpica/components/namespace/nsaccess.c
trunk/sys/contrib/dev/acpica/components/namespace/nsarguments.c
trunk/sys/contrib/dev/acpica/components/namespace/nsinit.c
trunk/sys/contrib/dev/acpica/components/namespace/nsnames.c
trunk/sys/contrib/dev/acpica/components/namespace/nsprepkg.c
trunk/sys/contrib/dev/acpica/components/parser/psloop.c
trunk/sys/contrib/dev/acpica/components/parser/psobject.c
trunk/sys/contrib/dev/acpica/components/resources/rsxface.c
trunk/sys/contrib/dev/acpica/components/tables/tbdata.c
trunk/sys/contrib/dev/acpica/components/tables/tbinstal.c
trunk/sys/contrib/dev/acpica/components/tables/tbutils.c
trunk/sys/contrib/dev/acpica/components/tables/tbxface.c
trunk/sys/contrib/dev/acpica/components/tables/tbxfload.c
trunk/sys/contrib/dev/acpica/components/utilities/uthex.c
trunk/sys/contrib/dev/acpica/components/utilities/utmath.c
trunk/sys/contrib/dev/acpica/components/utilities/utmisc.c
trunk/sys/contrib/dev/acpica/components/utilities/utobject.c
trunk/sys/contrib/dev/acpica/components/utilities/utresrc.c
trunk/sys/contrib/dev/acpica/components/utilities/utstate.c
trunk/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c
trunk/sys/contrib/dev/acpica/components/utilities/uttrack.c
trunk/sys/contrib/dev/acpica/include/acapps.h
trunk/sys/contrib/dev/acpica/include/acdisasm.h
trunk/sys/contrib/dev/acpica/include/acdispat.h
trunk/sys/contrib/dev/acpica/include/aclocal.h
trunk/sys/contrib/dev/acpica/include/acnames.h
trunk/sys/contrib/dev/acpica/include/acobject.h
trunk/sys/contrib/dev/acpica/include/acpi.h
trunk/sys/contrib/dev/acpica/include/acpixf.h
trunk/sys/contrib/dev/acpica/include/actables.h
trunk/sys/contrib/dev/acpica/include/actbl.h
trunk/sys/contrib/dev/acpica/include/actbl2.h
trunk/sys/contrib/dev/acpica/include/actypes.h
trunk/sys/contrib/dev/acpica/include/acutils.h
trunk/sys/contrib/dev/acpica/include/platform/acenv.h
trunk/sys/contrib/dev/acpica/include/platform/acfreebsd.h
trunk/sys/contrib/dev/acpica/include/platform/acgcc.h
trunk/sys/dev/acpica/acpi.c
trunk/usr.sbin/acpi/acpidb/Makefile
trunk/usr.sbin/acpi/iasl/Makefile
Added Paths:
-----------
trunk/sys/contrib/dev/acpica/compiler/aslparseop.c
trunk/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c
Modified: trunk/sys/conf/files
===================================================================
--- trunk/sys/conf/files 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/conf/files 2018-10-21 17:19:58 UTC (rev 12112)
@@ -299,6 +299,7 @@
contrib/dev/acpica/components/dispatcher/dsmthdat.c optional acpi
contrib/dev/acpica/components/dispatcher/dsobject.c optional acpi
contrib/dev/acpica/components/dispatcher/dsopcode.c optional acpi
+contrib/dev/acpica/components/dispatcher/dspkginit.c optional acpi
contrib/dev/acpica/components/dispatcher/dsutils.c optional acpi
contrib/dev/acpica/components/dispatcher/dswexec.c optional acpi
contrib/dev/acpica/components/dispatcher/dswload.c optional acpi
Modified: trunk/sys/contrib/dev/acpica/acpica_prep.sh
===================================================================
--- trunk/sys/contrib/dev/acpica/acpica_prep.sh 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/acpica_prep.sh 2018-10-21 17:19:58 UTC (rev 12112)
@@ -21,10 +21,9 @@
stripfiles="Makefile README accygwin.h acdragonfly.h acdragonflyex.h \
acefi.h acefiex.h achaiku.h acintel.h aclinux.h aclinuxex.h \
acmacosx.h acmsvc.h acmsvcex.h acnetbsd.h acos2.h acqnx.h \
- acwin.h acwin64.h acwinex.h dspkginit.c new_table.txt \
- osbsdtbl.c osefitbl.c osefixf.c osfreebsdtbl.c oslinuxtbl.c \
- osunixdir.c osunixmap.c oswindir.c oswintbl.c oswinxf.c \
- readme.txt utclib.c utprint.c"
+ acwin.h acwin64.h acwinex.h new_table.txt osbsdtbl.c osefitbl.c \
+ osefixf.c osfreebsdtbl.c oslinuxtbl.c osunixdir.c osunixmap.c \
+ oswindir.c oswintbl.c oswinxf.c readme.txt utclib.c utprint.c"
# include files to canonify
src_headers="acapps.h acbuffer.h acclib.h accommon.h acconfig.h \
Modified: trunk/sys/contrib/dev/acpica/changes.txt
===================================================================
--- trunk/sys/contrib/dev/acpica/changes.txt 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/changes.txt 2018-10-21 17:19:58 UTC (rev 12112)
@@ -1,4 +1,156 @@
----------------------------------------
+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 at 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 at arm.com>
+
+Unix/Linux makefiles: Added an option to disable compile optimizations.
+The disable occurs when the NOOPT flag is set to TRUE.
+theracermaster at 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:
+
+
+1) ACPICA kernel-resident subsystem:
+
+Tables: Implemented a deferred ACPI table verification. This is useful
+for operating systems where the tables cannot be verified in the early
+initialization stage due to early memory mapping limitations on some
+architectures. Lv Zheng.
+
+Tables: Removed the signature validation for dynamically loaded tables.
+Provides compatibility with other ACPI implementations. Previously, only
+SSDT tables were allowed, as per the ACPI specification. Now, any table
+signature can be used via the Load() operator. Lv Zheng.
+
+Tables: Fixed several mutex issues that could cause errors during table
+acquisition. Lv Zheng.
+
+Tables: Fixed a problem where an ACPI warning could be generated if a
+null pointer was passed to the AcpiPutTable interface. Lv Zheng.
+
+Tables: Added a mechanism to handle imbalances for the AcpiGetTable and
+AcpiPutTable interfaces. This applies to the "late stage" table loading
+when the use of AcpiPutTable is no longer required (since the system
+memory manager is fully running and available). Lv Zheng.
+
+Fixed/Reverted a regression during processing of resource descriptors
+that contain only a single EndTag. Fixes an AE_AML_NO_RESOURCE_END_TAG
+exception in this case.
+
+Headers: IORT/SMMU support: Updated the SMMU models for Revision C of the
+I/O Remapping specification. Robin Murphy <robin.murphy at arm.com>
+
+Interpreter: Fixed a possible fault if an Alias operator with an invalid
+or duplicate target is encountered during Alias creation in
+AcpiExCreateAlias. Alex James <theracermaster at gmail.com>
+
+Added an option to use designated initializers for function pointers.
+Kees Cook <keescook at google.com>
+
+
+2) iASL Compiler/Disassembler and Tools:
+
+iASL: Allow compilation of External declarations with target pathnames
+that refer to existing named objects within the table. Erik Schmauss.
+
+iASL: Fixed a regression when compiling FieldUnits. Fixes an error if a
+FieldUnit name also is declared via External in the same table. Erik
+Schmauss.
+
+iASL: Allow existing scope names within pathnames used in External
+statements. For example:
+ External (ABCD.EFGH) // ABCD exists, but EFGH is truly external
+ Device (ABCD)
+
+iASL: IORT ACPI table: Implemented changes required to decode the new
+Proximity Domain for the SMMUv3 IORT. Disassembler and Data Table
+compiler. Ganapatrao Kulkarni <ganapatrao.kulkarni at cavium.com>
+
+Disassembler: Don't abort disassembly on errors from External()
+statements. Erik Schmauss.
+
+Disassembler: fixed a possible fault when one of the Create*Field
+operators references a Resource Template. ACPICA Bugzilla 1396.
+
+iASL: In the source code, resolved some naming inconsistences across the
+parsing support. Fixes confusion between "Parse Op" and "Parse Node".
+Adds a new file, aslparseop.c
+
+----------------------------------------
31 May 2017. Summary of changes for version 20170531:
Modified: trunk/sys/contrib/dev/acpica/common/acfileio.c
===================================================================
--- trunk/sys/contrib/dev/acpica/common/acfileio.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/common/acfileio.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -176,6 +176,36 @@
/*******************************************************************************
*
+ * FUNCTION: AcDeleteTableList
+ *
+ * PARAMETERS: ListHead - List to delete
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Delete a list of tables. This is useful for removing memory
+ * allocated by AcGetAllTablesFromFile
+ *
+ ******************************************************************************/
+
+void
+AcDeleteTableList (
+ ACPI_NEW_TABLE_DESC *ListHead)
+{
+ ACPI_NEW_TABLE_DESC *Current = ListHead;
+ ACPI_NEW_TABLE_DESC *Previous = Current;
+
+
+ while (Current)
+ {
+ Current = Current->Next;
+ AcpiOsFree (Previous);
+ Previous = Current;
+ }
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcGetAllTablesFromFile
*
* PARAMETERS: Filename - Table filename
Modified: trunk/sys/contrib/dev/acpica/common/adisasm.c
===================================================================
--- trunk/sys/contrib/dev/acpica/common/adisasm.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/common/adisasm.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -409,6 +409,8 @@
ACPI_FREE (Table);
}
+ AcDeleteTableList (ListHead);
+
if (File)
{
fclose (File);
@@ -749,6 +751,7 @@
continue;
}
+ AcDeleteTableList (ExternalListHead);
return (Status);
}
@@ -762,6 +765,7 @@
{
AcpiOsPrintf ("Could not parse external ACPI tables, %s\n",
AcpiFormatException (Status));
+ AcDeleteTableList (ExternalListHead);
return (Status);
}
@@ -781,6 +785,8 @@
ExternalFileList = ExternalFileList->Next;
}
+ AcDeleteTableList (ExternalListHead);
+
if (ACPI_FAILURE (GlobalStatus))
{
return (GlobalStatus);
Modified: trunk/sys/contrib/dev/acpica/common/adwalk.c
===================================================================
--- trunk/sys/contrib/dev/acpica/common/adwalk.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/common/adwalk.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -537,11 +537,20 @@
case AML_NAME_OP:
case AML_METHOD_OP:
case AML_DEVICE_OP:
+
+ AcpiOsPrintf ("%4.4s",
+ ACPI_CAST_PTR (char, &Op->Named.Name));
+ break;
+
case AML_INT_NAMEDFIELD_OP:
- AcpiOsPrintf ("%4.4s", ACPI_CAST_PTR (char, &Op->Named.Name));
+ AcpiOsPrintf ("%4.4s Length: (bits) %8.8X%8.8X (bytes) %8.8X%8.8X",
+ ACPI_CAST_PTR (char, &Op->Named.Name),
+ ACPI_FORMAT_UINT64 (Op->Common.Value.Integer),
+ ACPI_FORMAT_UINT64 (Op->Common.Value.Integer / 8));
break;
+
default:
break;
@@ -1071,10 +1080,10 @@
{
ACPI_STATUS Status;
+
/* Resource descriptor conversion */
Status = AcpiDmProcessResourceDescriptors (Op, Level, Context);
-
if (ACPI_FAILURE (Status))
{
return (Status);
@@ -1083,7 +1092,6 @@
/* Switch/Case conversion */
Status = AcpiDmProcessSwitch (Op);
-
return (AE_OK);
}
@@ -1114,6 +1122,7 @@
ACPI_OBJECT_TYPE ObjectType;
ACPI_STATUS Status;
+
WalkState = Info->WalkState;
OpInfo = AcpiPsGetOpcodeInfo (Op->Common.AmlOpcode);
@@ -1139,7 +1148,6 @@
* If so, convert the reference into a symbolic reference.
*/
AcpiDmCheckResourceReference (Op, WalkState);
-
return (AE_OK);
}
Modified: trunk/sys/contrib/dev/acpica/common/ahpredef.c
===================================================================
--- trunk/sys/contrib/dev/acpica/common/ahpredef.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/common/ahpredef.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -475,6 +475,15 @@
const AH_PREDEFINED_NAME *Info;
+ /* Nameseg must start with an underscore */
+
+ if (*Nameseg != '_')
+ {
+ return (NULL);
+ }
+
+ /* Search for a match in the predefined name table */
+
for (Info = AslPredefinedInfo; Info->Name; Info++)
{
if (ACPI_COMPARE_NAME (Nameseg, Info->Name))
Modified: trunk/sys/contrib/dev/acpica/common/ahtable.c
===================================================================
--- trunk/sys/contrib/dev/acpica/common/ahtable.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/common/ahtable.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -240,6 +240,7 @@
{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: trunk/sys/contrib/dev/acpica/common/dmtable.c
===================================================================
--- trunk/sys/contrib/dev/acpica/common/dmtable.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/common/dmtable.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -494,6 +494,7 @@
{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: trunk/sys/contrib/dev/acpica/common/dmtbinfo.c
===================================================================
--- trunk/sys/contrib/dev/acpica/common/dmtbinfo.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/common/dmtbinfo.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -219,6 +219,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)
@@ -1839,6 +1840,7 @@
{ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Flags), "Flags (decoded below)", 0},
{ACPI_DMT_FLAG0, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "COHACC Override", 0},
{ACPI_DMT_FLAG1, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "HTTU Override", 0},
+ {ACPI_DMT_FLAG3, ACPI_IORT4_FLAG_OFFSET (Flags, 0), "Proximity Domain Valid", 0},
{ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Reserved), "Reserved", 0},
{ACPI_DMT_UINT64, ACPI_IORT4_OFFSET (VatosAddress), "VATOS Address", 0},
{ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (Model), "Model", 0},
@@ -1846,6 +1848,9 @@
{ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (PriGsiv), "PRI GSIV", 0},
{ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (GerrGsiv), "GERR GSIV", 0},
{ACPI_DMT_UINT32, ACPI_IORT4_OFFSET (SyncGsiv), "Sync GSIV", 0},
+ {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Pxm), "Proximity Domain", 0},
+ {ACPI_DMT_UINT8, ACPI_IORT4_OFFSET (Reserved1), "Reserved", 0},
+ {ACPI_DMT_UINT16, ACPI_IORT4_OFFSET (Reserved2), "Reserved", 0},
ACPI_DMT_TERMINATOR
};
@@ -2764,7 +2769,17 @@
ACPI_DMT_TERMINATOR
};
+/*******************************************************************************
+ *
+ * SDEI - Software Delegated Execption Interface Descriptor Table
+ *
+ ******************************************************************************/
+ACPI_DMTABLE_INFO AcpiDmTableInfoSdei[] =
+{
+ ACPI_DMT_TERMINATOR
+};
+
/*******************************************************************************
*
* PPTT - Processor Properties Topology Table (ACPI 6.2)
Modified: trunk/sys/contrib/dev/acpica/compiler/aslanalyze.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslanalyze.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslanalyze.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -436,13 +436,13 @@
/* Examine the parent op of this method */
OwningOp = Node->Op;
- if (OwningOp->Asl.CompileFlags & NODE_METHOD_NO_RETVAL)
+ if (OwningOp->Asl.CompileFlags & OP_METHOD_NO_RETVAL)
{
/* Method NEVER returns a value */
AslError (ASL_ERROR, ASL_MSG_NO_RETVAL, Op, Op->Asl.ExternalName);
}
- else if (OwningOp->Asl.CompileFlags & NODE_METHOD_SOME_NO_RETVAL)
+ else if (OwningOp->Asl.CompileFlags & OP_METHOD_SOME_NO_RETVAL)
{
/* Method SOMETIMES returns a value, SOMETIMES not */
Modified: trunk/sys/contrib/dev/acpica/compiler/aslbtypes.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslbtypes.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslbtypes.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -561,7 +561,7 @@
return (ACPI_UINT32_MAX);
}
- if (ReferencedNode->Asl.CompileFlags & NODE_METHOD_TYPED)
+ if (ReferencedNode->Asl.CompileFlags & OP_METHOD_TYPED)
{
ThisNodeBtype = ReferencedNode->Asl.AcpiBtype;
}
Modified: trunk/sys/contrib/dev/acpica/compiler/aslcodegen.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslcodegen.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslcodegen.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -292,6 +292,8 @@
/* 19 */ Op->Asl.LogicalLineNumber,
/* 20 */ Op->Asl.EndLogicalLine);
+ TrPrintOpFlags (Op->Asl.CompileFlags, ASL_TREE_OUTPUT);
+ DbgPrint (ASL_TREE_OUTPUT, "\n");
return (AE_OK);
}
@@ -439,7 +441,7 @@
/* Does this opcode have an associated "PackageLength" field? */
- if (Op->Asl.CompileFlags & NODE_AML_PACKAGE)
+ if (Op->Asl.CompileFlags & OP_AML_PACKAGE)
{
if (Op->Asl.AmlPkgLenBytes == 1)
{
Modified: trunk/sys/contrib/dev/acpica/compiler/aslcompile.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslcompile.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslcompile.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -816,6 +816,7 @@
BOOLEAN DeleteAmlFile = FALSE;
+ AslCheckExpectedExceptions ();
AePrintErrorLog (ASL_FILE_STDERR);
if (Gbl_DebugFlag)
{
Modified: trunk/sys/contrib/dev/acpica/compiler/aslcompiler.h
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslcompiler.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslcompiler.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -414,12 +414,20 @@
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);
@@ -791,17 +799,6 @@
/*
- * asltree - parse tree support
- */
-ACPI_STATUS
-TrWalkParseTree (
- ACPI_PARSE_OBJECT *Op,
- UINT32 Visitation,
- ASL_WALK_CALLBACK DescendingCallback,
- ASL_WALK_CALLBACK AscendingCallback,
- void *Context);
-
-/*
* aslexternal - External opcode support
*/
ACPI_STATUS
@@ -827,105 +824,113 @@
#define ASL_WALK_VISIT_TWICE (ASL_WALK_VISIT_DOWNWARD | ASL_WALK_VISIT_UPWARD)
-void
-TrSetParent (
- ACPI_PARSE_OBJECT *Op,
- ACPI_PARSE_OBJECT *ParentOp);
-
+/*
+ * aslparseop.c - Parse op create/allocate/cache
+ */
ACPI_PARSE_OBJECT *
-TrAllocateNode (
- UINT32 ParseOpcode);
-
-void
-TrPrintNodeCompileFlags (
- UINT32 Flags);
-
-void
-TrReleaseNode (
- ACPI_PARSE_OBJECT *Op);
-
-ACPI_PARSE_OBJECT *
-TrUpdateNode (
+TrCreateOp (
UINT32 ParseOpcode,
- ACPI_PARSE_OBJECT *Op);
-
-ACPI_PARSE_OBJECT *
-TrCreateNode (
- UINT32 ParseOpcode,
UINT32 NumChildren,
...);
ACPI_PARSE_OBJECT *
-TrCreateLeafNode (
+TrCreateLeafOp (
UINT32 ParseOpcode);
ACPI_PARSE_OBJECT *
-TrCreateNullTarget (
+TrCreateNullTargetOp (
void);
ACPI_PARSE_OBJECT *
-TrCreateAssignmentNode (
+TrCreateAssignmentOp (
ACPI_PARSE_OBJECT *Target,
ACPI_PARSE_OBJECT *Source);
ACPI_PARSE_OBJECT *
-TrCreateTargetOperand (
+TrCreateTargetOp (
ACPI_PARSE_OBJECT *OriginalOp,
ACPI_PARSE_OBJECT *ParentOp);
ACPI_PARSE_OBJECT *
-TrCreateValuedLeafNode (
+TrCreateValuedLeafOp (
UINT32 ParseOpcode,
UINT64 Value);
ACPI_PARSE_OBJECT *
-TrCreateConstantLeafNode (
+TrCreateConstantLeafOp (
UINT32 ParseOpcode);
ACPI_PARSE_OBJECT *
-TrLinkChildren (
+TrAllocateOp (
+ UINT32 ParseOpcode);
+
+void
+TrPrintOpFlags (
+ UINT32 Flags,
+ UINT32 OutputLevel);
+
+
+/*
+ * asltree.c - Parse tree management
+ */
+void
+TrSetOpParent (
ACPI_PARSE_OBJECT *Op,
- UINT32 NumChildren,
- ...);
+ ACPI_PARSE_OBJECT *ParentOp);
-void
-TrSetEndLineNumber (
+ACPI_PARSE_OBJECT *
+TrSetOpIntegerValue (
+ UINT32 ParseOpcode,
ACPI_PARSE_OBJECT *Op);
void
-TrSetCurrentFilename (
+TrSetOpEndLineNumber (
ACPI_PARSE_OBJECT *Op);
void
-TrWalkTree (
- void);
+TrSetOpCurrentFilename (
+ ACPI_PARSE_OBJECT *Op);
ACPI_PARSE_OBJECT *
-TrLinkPeerNode (
+TrLinkOpChildren (
+ ACPI_PARSE_OBJECT *Op,
+ UINT32 NumChildren,
+ ...);
+
+ACPI_PARSE_OBJECT *
+TrLinkPeerOp (
ACPI_PARSE_OBJECT *Op1,
ACPI_PARSE_OBJECT *Op2);
ACPI_PARSE_OBJECT *
-TrLinkChildNode (
+TrLinkChildOp (
ACPI_PARSE_OBJECT *Op1,
ACPI_PARSE_OBJECT *Op2);
ACPI_PARSE_OBJECT *
-TrSetNodeFlags (
+TrSetOpFlags (
ACPI_PARSE_OBJECT *Op,
UINT32 Flags);
ACPI_PARSE_OBJECT *
-TrSetNodeAmlLength (
+TrSetOpAmlLength (
ACPI_PARSE_OBJECT *Op,
UINT32 Length);
ACPI_PARSE_OBJECT *
-TrLinkPeerNodes (
+TrLinkPeerOps (
UINT32 NumPeers,
...);
+ACPI_STATUS
+TrWalkParseTree (
+ ACPI_PARSE_OBJECT *Op,
+ UINT32 Visitation,
+ ASL_WALK_CALLBACK DescendingCallback,
+ ASL_WALK_CALLBACK AscendingCallback,
+ void *Context);
+
/*
* aslfiles - File I/O support
*/
Modified: trunk/sys/contrib/dev/acpica/compiler/aslcompiler.l
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslcompiler.l 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslcompiler.l 2018-10-21 17:19:58 UTC (rev 12112)
@@ -810,8 +810,8 @@
"__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);
s=UtStringCacheCalloc (ACPI_NAME_SIZE + 1);
Modified: trunk/sys/contrib/dev/acpica/compiler/aslcstyle.y
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslcstyle.y 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslcstyle.y 2018-10-21 17:19:58 UTC (rev 12112)
@@ -202,59 +202,59 @@
/* Unary operators */
- : PARSEOP_EXP_LOGICAL_NOT {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
- TermArg {$$ = TrLinkChildren ($<n>2,1,$3);}
- | PARSEOP_EXP_NOT {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
- TermArg {$$ = TrLinkChildren ($<n>2,2,$3,TrCreateNullTarget ());}
+ : PARSEOP_EXP_LOGICAL_NOT {$<n>$ = TrCreateLeafOp (PARSEOP_LNOT);}
+ TermArg {$$ = TrLinkOpChildren ($<n>2,1,$3);}
+ | PARSEOP_EXP_NOT {$<n>$ = TrCreateLeafOp (PARSEOP_NOT);}
+ TermArg {$$ = TrLinkOpChildren ($<n>2,2,$3,TrCreateNullTargetOp ());}
- | SuperName PARSEOP_EXP_INCREMENT {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
- {$$ = TrLinkChildren ($<n>3,1,$1);}
- | SuperName PARSEOP_EXP_DECREMENT {$<n>$ = TrCreateLeafNode (PARSEOP_DECREMENT);}
- {$$ = TrLinkChildren ($<n>3,1,$1);}
+ | SuperName PARSEOP_EXP_INCREMENT {$<n>$ = TrCreateLeafOp (PARSEOP_INCREMENT);}
+ {$$ = TrLinkOpChildren ($<n>3,1,$1);}
+ | SuperName PARSEOP_EXP_DECREMENT {$<n>$ = TrCreateLeafOp (PARSEOP_DECREMENT);}
+ {$$ = TrLinkOpChildren ($<n>3,1,$1);}
/* Binary operators: math and logical */
- | TermArg PARSEOP_EXP_ADD {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
- | TermArg PARSEOP_EXP_DIVIDE {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
- TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
- TrCreateNullTarget ());}
- | TermArg PARSEOP_EXP_MODULO {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
- | TermArg PARSEOP_EXP_MULTIPLY {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
- | TermArg PARSEOP_EXP_SHIFT_LEFT {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
- | TermArg PARSEOP_EXP_SHIFT_RIGHT {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
- | TermArg PARSEOP_EXP_SUBTRACT {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+ | TermArg PARSEOP_EXP_ADD {$<n>$ = TrCreateLeafOp (PARSEOP_ADD);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
+ | TermArg PARSEOP_EXP_DIVIDE {$<n>$ = TrCreateLeafOp (PARSEOP_DIVIDE);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,4,$1,$4,TrCreateNullTargetOp (),
+ TrCreateNullTargetOp ());}
+ | TermArg PARSEOP_EXP_MODULO {$<n>$ = TrCreateLeafOp (PARSEOP_MOD);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
+ | TermArg PARSEOP_EXP_MULTIPLY {$<n>$ = TrCreateLeafOp (PARSEOP_MULTIPLY);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
+ | TermArg PARSEOP_EXP_SHIFT_LEFT {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
+ | TermArg PARSEOP_EXP_SHIFT_RIGHT {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
+ | TermArg PARSEOP_EXP_SUBTRACT {$<n>$ = TrCreateLeafOp (PARSEOP_SUBTRACT);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
- | TermArg PARSEOP_EXP_AND {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
- | TermArg PARSEOP_EXP_OR {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
- | TermArg PARSEOP_EXP_XOR {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,TrCreateNullTarget ());}
+ | TermArg PARSEOP_EXP_AND {$<n>$ = TrCreateLeafOp (PARSEOP_AND);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
+ | TermArg PARSEOP_EXP_OR {$<n>$ = TrCreateLeafOp (PARSEOP_OR);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
+ | TermArg PARSEOP_EXP_XOR {$<n>$ = TrCreateLeafOp (PARSEOP_XOR);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,TrCreateNullTargetOp ());}
- | TermArg PARSEOP_EXP_GREATER {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
- TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_GREATER_EQUAL {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATEREQUAL);}
- TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_LESS {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
- TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_LESS_EQUAL {$<n>$ = TrCreateLeafNode (PARSEOP_LLESSEQUAL);}
- TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+ | TermArg PARSEOP_EXP_GREATER {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
+ | TermArg PARSEOP_EXP_GREATER_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATEREQUAL);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
+ | TermArg PARSEOP_EXP_LESS {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
+ | TermArg PARSEOP_EXP_LESS_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LLESSEQUAL);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_EQUAL {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
- TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_NOT_EQUAL {$<n>$ = TrCreateLeafNode (PARSEOP_LNOTEQUAL);}
- TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+ | TermArg PARSEOP_EXP_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
+ | TermArg PARSEOP_EXP_NOT_EQUAL {$<n>$ = TrCreateLeafOp (PARSEOP_LNOTEQUAL);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_LOGICAL_AND {$<n>$ = TrCreateLeafNode (PARSEOP_LAND);}
- TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
- | TermArg PARSEOP_EXP_LOGICAL_OR {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
- TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
+ | TermArg PARSEOP_EXP_LOGICAL_AND {$<n>$ = TrCreateLeafOp (PARSEOP_LAND);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
+ | TermArg PARSEOP_EXP_LOGICAL_OR {$<n>$ = TrCreateLeafOp (PARSEOP_LOR);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,2,$1,$4);}
/* Parentheses */
@@ -281,8 +281,8 @@
: SuperName
PARSEOP_EXP_INDEX_LEFT
TermArg
- PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX);
- TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());}
+ PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafOp (PARSEOP_INDEX);
+ TrLinkOpChildren ($$,3,$1,$3,TrCreateNullTargetOp ());}
;
@@ -305,7 +305,7 @@
| SuperName
PARSEOP_EXP_EQUALS
- TermArg {$$ = TrCreateAssignmentNode ($1, $3);}
+ TermArg {$$ = TrCreateAssignmentOp ($1, $3);}
/* Chained equals: (a=RefOf)=b, a=b=c=d etc. */
@@ -313,47 +313,47 @@
EqualsTerm
PARSEOP_CLOSE_PAREN
PARSEOP_EXP_EQUALS
- TermArg {$$ = TrCreateAssignmentNode ($2, $5);}
+ TermArg {$$ = TrCreateAssignmentOp ($2, $5);}
/* Compound assignments -- Add (operand, operand, target) */
- | TermArg PARSEOP_EXP_ADD_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
- TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+ | TermArg PARSEOP_EXP_ADD_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_ADD);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
+ TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
- | TermArg PARSEOP_EXP_DIV_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
- TermArg {$$ = TrLinkChildren ($<n>3,4,$1,$4,TrCreateNullTarget (),
- TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+ | TermArg PARSEOP_EXP_DIV_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_DIVIDE);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,4,$1,$4,TrCreateNullTargetOp (),
+ TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
- | TermArg PARSEOP_EXP_MOD_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
- TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+ | TermArg PARSEOP_EXP_MOD_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_MOD);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
+ TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
- | TermArg PARSEOP_EXP_MUL_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
- TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+ | TermArg PARSEOP_EXP_MUL_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_MULTIPLY);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
+ TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
- | TermArg PARSEOP_EXP_SHL_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
- TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+ | TermArg PARSEOP_EXP_SHL_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
+ TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
- | TermArg PARSEOP_EXP_SHR_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
- TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+ | TermArg PARSEOP_EXP_SHR_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
+ TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
- | TermArg PARSEOP_EXP_SUB_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
- TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+ | TermArg PARSEOP_EXP_SUB_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_SUBTRACT);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
+ TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
- | TermArg PARSEOP_EXP_AND_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
- TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+ | TermArg PARSEOP_EXP_AND_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_AND);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
+ TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
- | TermArg PARSEOP_EXP_OR_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
- TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+ | TermArg PARSEOP_EXP_OR_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_OR);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
+ TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
- | TermArg PARSEOP_EXP_XOR_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
- TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
- TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
+ | TermArg PARSEOP_EXP_XOR_EQ {$<n>$ = TrCreateLeafOp (PARSEOP_XOR);}
+ TermArg {$$ = TrLinkOpChildren ($<n>3,3,$1,$4,
+ TrSetOpFlags (TrCreateTargetOp ($1, NULL), OP_IS_TARGET));}
;
Modified: trunk/sys/contrib/dev/acpica/compiler/asldefine.h
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/asldefine.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/asldefine.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -291,7 +291,7 @@
#define ASL_PARSE_TREE_DEBUG2 \
" %08X %04X %04X %01X %04X %04X %05X %05X "\
- "%08X %08X %08X %08X %08X %08X %04X %02d %5d %5d %5d %5d\n"
+ "%08X %08X %08X %08X %08X %08X %04X %02d %5d %5d %5d %5d"
/*
* Macros for ASL/ASL+ converter
Modified: trunk/sys/contrib/dev/acpica/compiler/aslerror.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslerror.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslerror.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -161,7 +161,17 @@
AeAddToErrorLog (
ASL_ERROR_MSG *Enode);
+static BOOLEAN
+AslIsExceptionExpected (
+ UINT8 Level,
+ UINT16 MessageId);
+static BOOLEAN
+AslIsExceptionDisabled (
+ UINT8 Level,
+ UINT16 MessageId);
+
+
/*******************************************************************************
*
* FUNCTION: AslAbort
@@ -807,9 +817,118 @@
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
@@ -867,7 +986,48 @@
*
******************************************************************************/
-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)
@@ -941,8 +1101,7 @@
/* Check if user wants to ignore this exception */
- if (Gbl_AllExceptionsDisabled ||
- AslIsExceptionDisabled (Level, MessageId))
+ if (AslIsExceptionIgnored (Level, MessageId))
{
return;
}
Modified: trunk/sys/contrib/dev/acpica/compiler/aslexternal.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslexternal.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslexternal.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -203,7 +203,7 @@
/* Create new list node of arbitrary type */
- ListOp = TrAllocateNode (PARSEOP_DEFAULT_ARG);
+ ListOp = TrAllocateOp (PARSEOP_DEFAULT_ARG);
/* Store External node as child */
@@ -267,7 +267,7 @@
/* Skip if External node already handled */
- if (Next->Asl.Child->Asl.CompileFlags & NODE_VISITED)
+ if (Next->Asl.Child->Asl.CompileFlags & OP_VISITED)
{
Next = Next->Asl.Next;
continue;
@@ -283,7 +283,7 @@
continue;
}
- Next->Asl.Child->Asl.CompileFlags |= NODE_VISITED;
+ Next->Asl.Child->Asl.CompileFlags |= OP_VISITED;
/*
* Since we will reposition Externals to the Root, set Namepath
@@ -545,7 +545,7 @@
Next->Asl.Child->Asl.Next->Asl.Value.Integer;
if (ObjType == ACPI_TYPE_METHOD &&
- !(Next->Asl.CompileFlags & NODE_VISITED))
+ !(Next->Asl.CompileFlags & OP_VISITED))
{
if (Next == Prev)
{
@@ -579,12 +579,12 @@
Gbl_ExternalsListHead->Asl.ParseOpcode = PARSEOP_IF;
Gbl_ExternalsListHead->Asl.AmlOpcode = AML_IF_OP;
- Gbl_ExternalsListHead->Asl.CompileFlags = NODE_AML_PACKAGE;
+ Gbl_ExternalsListHead->Asl.CompileFlags = OP_AML_PACKAGE;
UtSetParseOpName (Gbl_ExternalsListHead);
/* Create a Zero op for the If predicate */
- PredicateOp = TrAllocateNode (PARSEOP_ZERO);
+ PredicateOp = TrAllocateOp (PARSEOP_ZERO);
PredicateOp->Asl.AmlOpcode = AML_ZERO_OP;
PredicateOp->Asl.Parent = Gbl_ExternalsListHead;
Modified: trunk/sys/contrib/dev/acpica/compiler/aslfold.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslfold.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslfold.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -233,8 +233,8 @@
* Only interested in subtrees that could possibly contain
* expressions that can be evaluated at this time
*/
- if ((!(Op->Asl.CompileFlags & NODE_COMPILE_TIME_CONST)) ||
- (Op->Asl.CompileFlags & NODE_IS_TARGET))
+ if ((!(Op->Asl.CompileFlags & OP_COMPILE_TIME_CONST)) ||
+ (Op->Asl.CompileFlags & OP_IS_TARGET))
{
return (AE_OK);
}
@@ -413,7 +413,7 @@
{
/* Error if there is a target operand */
- if (Op->Asl.CompileFlags & NODE_IS_TARGET)
+ if (Op->Asl.CompileFlags & OP_IS_TARGET)
{
AslError (ASL_ERROR, ASL_MSG_INVALID_TARGET, Op, NULL);
Status = AE_TYPE;
@@ -421,11 +421,11 @@
/* Error if expression cannot be reduced (folded) */
- if (!(NextOp->Asl.CompileFlags & NODE_COULD_NOT_REDUCE))
+ if (!(NextOp->Asl.CompileFlags & OP_COULD_NOT_REDUCE))
{
/* Ensure only one error message per statement */
- NextOp->Asl.CompileFlags |= NODE_COULD_NOT_REDUCE;
+ NextOp->Asl.CompileFlags |= OP_COULD_NOT_REDUCE;
DbgPrint (ASL_PARSE_OUTPUT,
"**** Could not reduce operands for NAME opcode ****\n");
@@ -442,7 +442,7 @@
/* This is not a 3/4/5 opcode, but maybe can convert to STORE */
- if (Op->Asl.CompileFlags & NODE_IS_TARGET)
+ if (Op->Asl.CompileFlags & OP_IS_TARGET)
{
DbgPrint (ASL_PARSE_OUTPUT,
"**** Valid Target, transform to Store ****\n");
@@ -485,7 +485,7 @@
DbgPrint (ASL_PARSE_OUTPUT, "TYPE_345");
- if (Op->Asl.CompileFlags & NODE_IS_TARGET)
+ if (Op->Asl.CompileFlags & OP_IS_TARGET)
{
if (Op->Asl.ParseOpcode == PARSEOP_ZERO)
{
@@ -497,7 +497,7 @@
}
}
- if (Op->Asl.CompileFlags & NODE_IS_TERM_ARG)
+ if (Op->Asl.CompileFlags & OP_IS_TERM_ARG)
{
DbgPrint (ASL_PARSE_OUTPUT, "%-16s", " TERMARG");
}
@@ -506,7 +506,7 @@
/* Dump the node compile flags also */
- TrPrintNodeCompileFlags (Op->Asl.CompileFlags);
+ TrPrintOpFlags (Op->Asl.CompileFlags, ASL_PARSE_OUTPUT);
DbgPrint (ASL_PARSE_OUTPUT, "\n");
return (Status);
}
@@ -544,7 +544,7 @@
/* Allocate a new temporary root for this subtree */
- RootOp = TrAllocateNode (PARSEOP_INTEGER);
+ RootOp = TrAllocateOp (PARSEOP_INTEGER);
if (!RootOp)
{
return (AE_NO_MEMORY);
@@ -655,7 +655,7 @@
* Create a NULL (zero) target so that we can use the
* interpreter to evaluate the expression.
*/
- NewTarget = TrCreateNullTarget ();
+ NewTarget = TrCreateNullTargetOp ();
NewTarget->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
/* Handle one-operand cases (NOT, TOBCD, etc.) */
@@ -671,7 +671,7 @@
Child2->Asl.Next = NewTarget;
NewTarget->Asl.Parent = OriginalTarget->Asl.Parent;
- NewParent = TrAllocateNode (PARSEOP_INTEGER);
+ NewParent = TrAllocateOp (PARSEOP_INTEGER);
NewParent->Common.AmlOpcode = AML_INT_EVAL_SUBTREE_OP;
OriginalParent = Op->Common.Parent;
@@ -800,12 +800,12 @@
*/
Op->Asl.ParseOpcode = PARSEOP_BUFFER;
Op->Common.AmlOpcode = AML_BUFFER_OP;
- Op->Asl.CompileFlags = NODE_AML_PACKAGE;
+ Op->Asl.CompileFlags = OP_AML_PACKAGE;
UtSetParseOpName (Op);
/* Child node is the buffer length */
- LengthOp = TrAllocateNode (PARSEOP_INTEGER);
+ LengthOp = TrAllocateOp (PARSEOP_INTEGER);
LengthOp->Asl.AmlOpcode = AML_DWORD_OP;
LengthOp->Asl.Value.Integer = ObjDesc->Buffer.Length;
@@ -816,7 +816,7 @@
/* Next child is the raw buffer data */
- DataOp = TrAllocateNode (PARSEOP_RAW_DATA);
+ DataOp = TrAllocateOp (PARSEOP_RAW_DATA);
DataOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
DataOp->Asl.AmlLength = ObjDesc->Buffer.Length;
DataOp->Asl.Value.String = (char *) ObjDesc->Buffer.Pointer;
@@ -864,25 +864,25 @@
{
case 1:
- TrUpdateNode (PARSEOP_BYTECONST, Op);
+ TrSetOpIntegerValue (PARSEOP_BYTECONST, Op);
Op->Asl.AmlOpcode = AML_RAW_DATA_BYTE;
break;
case 2:
- TrUpdateNode (PARSEOP_WORDCONST, Op);
+ TrSetOpIntegerValue (PARSEOP_WORDCONST, Op);
Op->Asl.AmlOpcode = AML_RAW_DATA_WORD;
break;
case 4:
- TrUpdateNode (PARSEOP_DWORDCONST, Op);
+ TrSetOpIntegerValue (PARSEOP_DWORDCONST, Op);
Op->Asl.AmlOpcode = AML_RAW_DATA_DWORD;
break;
case 8:
- TrUpdateNode (PARSEOP_QWORDCONST, Op);
+ TrSetOpIntegerValue (PARSEOP_QWORDCONST, Op);
Op->Asl.AmlOpcode = AML_RAW_DATA_QWORD;
break;
@@ -890,7 +890,7 @@
default:
OpcSetOptimalIntegerSize (Op);
- TrUpdateNode (PARSEOP_INTEGER, Op);
+ TrSetOpIntegerValue (PARSEOP_INTEGER, Op);
break;
}
Modified: trunk/sys/contrib/dev/acpica/compiler/aslglobal.h
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslglobal.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslglobal.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -197,9 +197,37 @@
{NULL, NULL, "Converter db :", "Converter debug Output"}
};
+/* Table below must match the defines with the same names in actypes.h */
+
+const char *Gbl_OpFlagNames[ACPI_NUM_OP_FLAGS] =
+{
+ "OP_VISITED",
+ "OP_AML_PACKAGE",
+ "OP_IS_TARGET",
+ "OP_IS_RESOURCE_DESC",
+ "OP_IS_RESOURCE_FIELD",
+ "OP_HAS_NO_EXIT",
+ "OP_IF_HAS_NO_EXIT",
+ "OP_NAME_INTERNALIZED",
+ "OP_METHOD_NO_RETVAL",
+ "OP_METHOD_SOME_NO_RETVAL",
+ "OP_RESULT_NOT_USED",
+ "OP_METHOD_TYPED",
+ "OP_COULD_NOT_REDUCE",
+ "OP_COMPILE_TIME_CONST",
+ "OP_IS_TERM_ARG",
+ "OP_WAS_ONES_OP",
+ "OP_IS_NAME_DECLARATION",
+ "OP_COMPILER_EMITTED",
+ "OP_IS_DUPLICATE",
+ "OP_IS_RESOURCE_DATA",
+ "OP_IS_NULL_RETURN"
+};
+
#else
extern UINT32 Gbl_ExceptionCount[ASL_NUM_REPORT_LEVELS];
extern ASL_FILE_INFO Gbl_Files [ASL_NUM_FILES];
+extern const char *Gbl_OpFlagNames[ACPI_NUM_OP_FLAGS];
#endif
@@ -225,6 +253,7 @@
#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
@@ -369,6 +398,7 @@
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);
@@ -388,9 +418,9 @@
* Determines if an inline comment should be saved in the InlineComment or NodeEndComment
* field of ACPI_PARSE_OBJECT.
*/
-ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_Comment_List_Head, NULL);
-ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_Comment_List_Tail, NULL);
-ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_Inline_Comment_Buffer, NULL);
+ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_CommentListHead, NULL);
+ASL_EXTERN ACPI_COMMENT_NODE ASL_INIT_GLOBAL (*Gbl_CommentListTail, NULL);
+ASL_EXTERN char ASL_INIT_GLOBAL (*Gbl_InlineCommentBuffer, NULL);
/* Static structures */
@@ -411,6 +441,7 @@
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: trunk/sys/contrib/dev/acpica/compiler/aslhelp.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslhelp.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslhelp.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -205,6 +205,7 @@
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: trunk/sys/contrib/dev/acpica/compiler/aslhelpers.y
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslhelpers.y 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslhelpers.y 2018-10-21 17:19:58 UTC (rev 12112)
@@ -160,11 +160,11 @@
******************************************************************************/
OptionalBusMasterKeyword
- : ',' {$$ = TrCreateLeafNode (
+ : ',' {$$ = TrCreateLeafOp (
PARSEOP_BUSMASTERTYPE_MASTER);}
- | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafNode (
+ | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafOp (
PARSEOP_BUSMASTERTYPE_MASTER);}
- | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafNode (
+ | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafOp (
PARSEOP_BUSMASTERTYPE_NOTMASTER);}
;
@@ -176,9 +176,9 @@
;
OptionalAccessSize
- : {$$ = TrCreateValuedLeafNode (
+ : {$$ = TrCreateValuedLeafOp (
PARSEOP_BYTECONST, 0);}
- | ',' {$$ = TrCreateValuedLeafNode (
+ | ',' {$$ = TrCreateValuedLeafOp (
PARSEOP_BYTECONST, 0);}
| ',' ByteConstExpr {$$ = $2;}
;
@@ -243,10 +243,10 @@
;
OptionalListString
- : {$$ = TrCreateValuedLeafNode (
+ : {$$ = TrCreateValuedLeafOp (
PARSEOP_STRING_LITERAL,
ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
- | ',' {$$ = TrCreateValuedLeafNode (
+ | ',' {$$ = TrCreateValuedLeafOp (
PARSEOP_STRING_LITERAL,
ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
| ',' TermArg {$$ = $2;}
@@ -280,13 +280,13 @@
;
OptionalNameString_First
- : {$$ = TrCreateLeafNode (
+ : {$$ = TrCreateLeafOp (
PARSEOP_ZERO);}
| NameString {$$ = $1;}
;
OptionalObjectTypeKeyword
- : {$$ = TrCreateLeafNode (
+ : {$$ = TrCreateLeafOp (
PARSEOP_OBJECTTYPE_UNK);}
| ',' ObjectTypeKeyword {$$ = $2;}
;
@@ -308,24 +308,24 @@
;
OptionalReadWriteKeyword
- : {$$ = TrCreateLeafNode (
+ : {$$ = TrCreateLeafOp (
PARSEOP_READWRITETYPE_BOTH);}
- | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafNode (
+ | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafOp (
PARSEOP_READWRITETYPE_BOTH);}
- | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafNode (
+ | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafOp (
PARSEOP_READWRITETYPE_READONLY);}
;
OptionalResourceType_First
- : {$$ = TrCreateLeafNode (
+ : {$$ = TrCreateLeafOp (
PARSEOP_RESOURCETYPE_CONSUMER);}
| ResourceTypeKeyword {$$ = $1;}
;
OptionalResourceType
- : {$$ = TrCreateLeafNode (
+ : {$$ = TrCreateLeafOp (
PARSEOP_RESOURCETYPE_CONSUMER);}
- | ',' {$$ = TrCreateLeafNode (
+ | ',' {$$ = TrCreateLeafOp (
PARSEOP_RESOURCETYPE_CONSUMER);}
| ',' ResourceTypeKeyword {$$ = $2;}
;
@@ -332,9 +332,9 @@
/* Same as above except default is producer */
OptionalProducerResourceType
- : {$$ = TrCreateLeafNode (
+ : {$$ = TrCreateLeafOp (
PARSEOP_RESOURCETYPE_PRODUCER);}
- | ',' {$$ = TrCreateLeafNode (
+ | ',' {$$ = TrCreateLeafOp (
PARSEOP_RESOURCETYPE_PRODUCER);}
| ',' ResourceTypeKeyword {$$ = $2;}
;
@@ -395,9 +395,9 @@
;
OptionalXferSize
- : {$$ = TrCreateValuedLeafNode (
+ : {$$ = TrCreateValuedLeafOp (
PARSEOP_XFERSIZE_32, 2);}
- | ',' {$$ = TrCreateValuedLeafNode (
+ | ',' {$$ = TrCreateValuedLeafOp (
PARSEOP_XFERSIZE_32, 2);}
| ',' XferSizeKeyword {$$ = $2;}
;
Modified: trunk/sys/contrib/dev/acpica/compiler/aslkeywords.y
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslkeywords.y 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslkeywords.y 2018-10-21 17:19:58 UTC (rev 12112)
@@ -159,46 +159,46 @@
******************************************************************************/
AccessAttribKeyword
- : PARSEOP_ACCESSATTRIB_BLOCK {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BLOCK);}
- | PARSEOP_ACCESSATTRIB_BLOCK_CALL {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BLOCK_CALL);}
- | PARSEOP_ACCESSATTRIB_BYTE {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_BYTE);}
- | PARSEOP_ACCESSATTRIB_QUICK {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_QUICK );}
- | PARSEOP_ACCESSATTRIB_SND_RCV {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_SND_RCV);}
- | PARSEOP_ACCESSATTRIB_WORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD);}
- | PARSEOP_ACCESSATTRIB_WORD_CALL {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD_CALL);}
+ : PARSEOP_ACCESSATTRIB_BLOCK {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BLOCK);}
+ | PARSEOP_ACCESSATTRIB_BLOCK_CALL {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BLOCK_CALL);}
+ | PARSEOP_ACCESSATTRIB_BYTE {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_BYTE);}
+ | PARSEOP_ACCESSATTRIB_QUICK {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_QUICK );}
+ | PARSEOP_ACCESSATTRIB_SND_RCV {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_SND_RCV);}
+ | PARSEOP_ACCESSATTRIB_WORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_WORD);}
+ | PARSEOP_ACCESSATTRIB_WORD_CALL {$$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_WORD_CALL);}
| PARSEOP_ACCESSATTRIB_MULTIBYTE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_MULTIBYTE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_MULTIBYTE);}
ByteConst
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_ACCESSATTRIB_RAW_BYTES
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_BYTES);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_RAW_BYTES);}
ByteConst
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_ACCESSATTRIB_RAW_PROCESS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ACCESSATTRIB_RAW_PROCESS);}
ByteConst
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
;
AccessTypeKeyword
- : PARSEOP_ACCESSTYPE_ANY {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_ANY);}
- | PARSEOP_ACCESSTYPE_BYTE {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_BYTE);}
- | PARSEOP_ACCESSTYPE_WORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_WORD);}
- | PARSEOP_ACCESSTYPE_DWORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_DWORD);}
- | PARSEOP_ACCESSTYPE_QWORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_QWORD);}
- | PARSEOP_ACCESSTYPE_BUF {$$ = TrCreateLeafNode (PARSEOP_ACCESSTYPE_BUF);}
+ : PARSEOP_ACCESSTYPE_ANY {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_ANY);}
+ | PARSEOP_ACCESSTYPE_BYTE {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_BYTE);}
+ | PARSEOP_ACCESSTYPE_WORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_WORD);}
+ | PARSEOP_ACCESSTYPE_DWORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_DWORD);}
+ | PARSEOP_ACCESSTYPE_QWORD {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_QWORD);}
+ | PARSEOP_ACCESSTYPE_BUF {$$ = TrCreateLeafOp (PARSEOP_ACCESSTYPE_BUF);}
;
AddressingModeKeyword
- : PARSEOP_ADDRESSINGMODE_7BIT {$$ = TrCreateLeafNode (PARSEOP_ADDRESSINGMODE_7BIT);}
- | PARSEOP_ADDRESSINGMODE_10BIT {$$ = TrCreateLeafNode (PARSEOP_ADDRESSINGMODE_10BIT);}
+ : PARSEOP_ADDRESSINGMODE_7BIT {$$ = TrCreateLeafOp (PARSEOP_ADDRESSINGMODE_7BIT);}
+ | PARSEOP_ADDRESSINGMODE_10BIT {$$ = TrCreateLeafOp (PARSEOP_ADDRESSINGMODE_10BIT);}
;
AddressKeyword
- : PARSEOP_ADDRESSTYPE_MEMORY {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_MEMORY);}
- | PARSEOP_ADDRESSTYPE_RESERVED {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_RESERVED);}
- | PARSEOP_ADDRESSTYPE_NVS {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_NVS);}
- | PARSEOP_ADDRESSTYPE_ACPI {$$ = TrCreateLeafNode (PARSEOP_ADDRESSTYPE_ACPI);}
+ : PARSEOP_ADDRESSTYPE_MEMORY {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_MEMORY);}
+ | PARSEOP_ADDRESSTYPE_RESERVED {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_RESERVED);}
+ | PARSEOP_ADDRESSTYPE_NVS {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_NVS);}
+ | PARSEOP_ADDRESSTYPE_ACPI {$$ = TrCreateLeafOp (PARSEOP_ADDRESSTYPE_ACPI);}
;
AddressSpaceKeyword
@@ -207,130 +207,130 @@
;
BitsPerByteKeyword
- : PARSEOP_BITSPERBYTE_FIVE {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_FIVE);}
- | PARSEOP_BITSPERBYTE_SIX {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_SIX);}
- | PARSEOP_BITSPERBYTE_SEVEN {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_SEVEN);}
- | PARSEOP_BITSPERBYTE_EIGHT {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_EIGHT);}
- | PARSEOP_BITSPERBYTE_NINE {$$ = TrCreateLeafNode (PARSEOP_BITSPERBYTE_NINE);}
+ : PARSEOP_BITSPERBYTE_FIVE {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_FIVE);}
+ | PARSEOP_BITSPERBYTE_SIX {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_SIX);}
+ | PARSEOP_BITSPERBYTE_SEVEN {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_SEVEN);}
+ | PARSEOP_BITSPERBYTE_EIGHT {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_EIGHT);}
+ | PARSEOP_BITSPERBYTE_NINE {$$ = TrCreateLeafOp (PARSEOP_BITSPERBYTE_NINE);}
;
ClockPhaseKeyword
- : PARSEOP_CLOCKPHASE_FIRST {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_FIRST);}
- | PARSEOP_CLOCKPHASE_SECOND {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_SECOND);}
+ : PARSEOP_CLOCKPHASE_FIRST {$$ = TrCreateLeafOp (PARSEOP_CLOCKPHASE_FIRST);}
+ | PARSEOP_CLOCKPHASE_SECOND {$$ = TrCreateLeafOp (PARSEOP_CLOCKPHASE_SECOND);}
;
ClockPolarityKeyword
- : PARSEOP_CLOCKPOLARITY_LOW {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_LOW);}
- | PARSEOP_CLOCKPOLARITY_HIGH {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_HIGH);}
+ : PARSEOP_CLOCKPOLARITY_LOW {$$ = TrCreateLeafOp (PARSEOP_CLOCKPOLARITY_LOW);}
+ | PARSEOP_CLOCKPOLARITY_HIGH {$$ = TrCreateLeafOp (PARSEOP_CLOCKPOLARITY_HIGH);}
;
DecodeKeyword
- : PARSEOP_DECODETYPE_POS {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_POS);}
- | PARSEOP_DECODETYPE_SUB {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_SUB);}
+ : PARSEOP_DECODETYPE_POS {$$ = TrCreateLeafOp (PARSEOP_DECODETYPE_POS);}
+ | PARSEOP_DECODETYPE_SUB {$$ = TrCreateLeafOp (PARSEOP_DECODETYPE_SUB);}
;
DevicePolarityKeyword
- : PARSEOP_DEVICEPOLARITY_LOW {$$ = TrCreateLeafNode (PARSEOP_DEVICEPOLARITY_LOW);}
- | PARSEOP_DEVICEPOLARITY_HIGH {$$ = TrCreateLeafNode (PARSEOP_DEVICEPOLARITY_HIGH);}
+ : PARSEOP_DEVICEPOLARITY_LOW {$$ = TrCreateLeafOp (PARSEOP_DEVICEPOLARITY_LOW);}
+ | PARSEOP_DEVICEPOLARITY_HIGH {$$ = TrCreateLeafOp (PARSEOP_DEVICEPOLARITY_HIGH);}
;
DMATypeKeyword
- : PARSEOP_DMATYPE_A {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_A);}
- | PARSEOP_DMATYPE_COMPATIBILITY {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_COMPATIBILITY);}
- | PARSEOP_DMATYPE_B {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_B);}
- | PARSEOP_DMATYPE_F {$$ = TrCreateLeafNode (PARSEOP_DMATYPE_F);}
+ : PARSEOP_DMATYPE_A {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_A);}
+ | PARSEOP_DMATYPE_COMPATIBILITY {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_COMPATIBILITY);}
+ | PARSEOP_DMATYPE_B {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_B);}
+ | PARSEOP_DMATYPE_F {$$ = TrCreateLeafOp (PARSEOP_DMATYPE_F);}
;
EndianKeyword
- : PARSEOP_ENDIAN_LITTLE {$$ = TrCreateLeafNode (PARSEOP_ENDIAN_LITTLE);}
- | PARSEOP_ENDIAN_BIG {$$ = TrCreateLeafNode (PARSEOP_ENDIAN_BIG);}
+ : PARSEOP_ENDIAN_LITTLE {$$ = TrCreateLeafOp (PARSEOP_ENDIAN_LITTLE);}
+ | PARSEOP_ENDIAN_BIG {$$ = TrCreateLeafOp (PARSEOP_ENDIAN_BIG);}
;
FlowControlKeyword
- : PARSEOP_FLOWCONTROL_HW {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_HW);}
- | PARSEOP_FLOWCONTROL_NONE {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_NONE);}
- | PARSEOP_FLOWCONTROL_SW {$$ = TrCreateLeafNode (PARSEOP_FLOWCONTROL_SW);}
+ : PARSEOP_FLOWCONTROL_HW {$$ = TrCreateLeafOp (PARSEOP_FLOWCONTROL_HW);}
+ | PARSEOP_FLOWCONTROL_NONE {$$ = TrCreateLeafOp (PARSEOP_FLOWCONTROL_NONE);}
+ | PARSEOP_FLOWCONTROL_SW {$$ = TrCreateLeafOp (PARSEOP_FLOWCONTROL_SW);}
;
InterruptLevel
- : PARSEOP_INTLEVEL_ACTIVEBOTH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEBOTH);}
- | PARSEOP_INTLEVEL_ACTIVEHIGH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEHIGH);}
- | PARSEOP_INTLEVEL_ACTIVELOW {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVELOW);}
+ : PARSEOP_INTLEVEL_ACTIVEBOTH {$$ = TrCreateLeafOp (PARSEOP_INTLEVEL_ACTIVEBOTH);}
+ | PARSEOP_INTLEVEL_ACTIVEHIGH {$$ = TrCreateLeafOp (PARSEOP_INTLEVEL_ACTIVEHIGH);}
+ | PARSEOP_INTLEVEL_ACTIVELOW {$$ = TrCreateLeafOp (PARSEOP_INTLEVEL_ACTIVELOW);}
;
InterruptTypeKeyword
- : PARSEOP_INTTYPE_EDGE {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_EDGE);}
- | PARSEOP_INTTYPE_LEVEL {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_LEVEL);}
+ : PARSEOP_INTTYPE_EDGE {$$ = TrCreateLeafOp (PARSEOP_INTTYPE_EDGE);}
+ | PARSEOP_INTTYPE_LEVEL {$$ = TrCreateLeafOp (PARSEOP_INTTYPE_LEVEL);}
;
IODecodeKeyword
- : PARSEOP_IODECODETYPE_16 {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_16);}
- | PARSEOP_IODECODETYPE_10 {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_10);}
+ : PARSEOP_IODECODETYPE_16 {$$ = TrCreateLeafOp (PARSEOP_IODECODETYPE_16);}
+ | PARSEOP_IODECODETYPE_10 {$$ = TrCreateLeafOp (PARSEOP_IODECODETYPE_10);}
;
IoRestrictionKeyword
- : PARSEOP_IORESTRICT_IN {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_IN);}
- | PARSEOP_IORESTRICT_OUT {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_OUT);}
- | PARSEOP_IORESTRICT_NONE {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_NONE);}
- | PARSEOP_IORESTRICT_PRESERVE {$$ = TrCreateLeafNode (PARSEOP_IORESTRICT_PRESERVE);}
+ : PARSEOP_IORESTRICT_IN {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_IN);}
+ | PARSEOP_IORESTRICT_OUT {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_OUT);}
+ | PARSEOP_IORESTRICT_NONE {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_NONE);}
+ | PARSEOP_IORESTRICT_PRESERVE {$$ = TrCreateLeafOp (PARSEOP_IORESTRICT_PRESERVE);}
;
LockRuleKeyword
- : PARSEOP_LOCKRULE_LOCK {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_LOCK);}
- | PARSEOP_LOCKRULE_NOLOCK {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_NOLOCK);}
+ : PARSEOP_LOCKRULE_LOCK {$$ = TrCreateLeafOp (PARSEOP_LOCKRULE_LOCK);}
+ | PARSEOP_LOCKRULE_NOLOCK {$$ = TrCreateLeafOp (PARSEOP_LOCKRULE_NOLOCK);}
;
MatchOpKeyword
- : PARSEOP_MATCHTYPE_MTR {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MTR);}
- | PARSEOP_MATCHTYPE_MEQ {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MEQ);}
- | PARSEOP_MATCHTYPE_MLE {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MLE);}
- | PARSEOP_MATCHTYPE_MLT {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MLT);}
- | PARSEOP_MATCHTYPE_MGE {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MGE);}
- | PARSEOP_MATCHTYPE_MGT {$$ = TrCreateLeafNode (PARSEOP_MATCHTYPE_MGT);}
+ : PARSEOP_MATCHTYPE_MTR {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MTR);}
+ | PARSEOP_MATCHTYPE_MEQ {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MEQ);}
+ | PARSEOP_MATCHTYPE_MLE {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MLE);}
+ | PARSEOP_MATCHTYPE_MLT {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MLT);}
+ | PARSEOP_MATCHTYPE_MGE {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MGE);}
+ | PARSEOP_MATCHTYPE_MGT {$$ = TrCreateLeafOp (PARSEOP_MATCHTYPE_MGT);}
;
MaxKeyword
- : PARSEOP_MAXTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_FIXED);}
- | PARSEOP_MAXTYPE_NOTFIXED {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_NOTFIXED);}
+ : PARSEOP_MAXTYPE_FIXED {$$ = TrCreateLeafOp (PARSEOP_MAXTYPE_FIXED);}
+ | PARSEOP_MAXTYPE_NOTFIXED {$$ = TrCreateLeafOp (PARSEOP_MAXTYPE_NOTFIXED);}
;
MemTypeKeyword
- : PARSEOP_MEMTYPE_CACHEABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_CACHEABLE);}
- | PARSEOP_MEMTYPE_WRITECOMBINING {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_WRITECOMBINING);}
- | PARSEOP_MEMTYPE_PREFETCHABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_PREFETCHABLE);}
- | PARSEOP_MEMTYPE_NONCACHEABLE {$$ = TrCreateLeafNode (PARSEOP_MEMTYPE_NONCACHEABLE);}
+ : PARSEOP_MEMTYPE_CACHEABLE {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_CACHEABLE);}
+ | PARSEOP_MEMTYPE_WRITECOMBINING {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_WRITECOMBINING);}
+ | PARSEOP_MEMTYPE_PREFETCHABLE {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_PREFETCHABLE);}
+ | PARSEOP_MEMTYPE_NONCACHEABLE {$$ = TrCreateLeafOp (PARSEOP_MEMTYPE_NONCACHEABLE);}
;
MinKeyword
- : PARSEOP_MINTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_FIXED);}
- | PARSEOP_MINTYPE_NOTFIXED {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_NOTFIXED);}
+ : PARSEOP_MINTYPE_FIXED {$$ = TrCreateLeafOp (PARSEOP_MINTYPE_FIXED);}
+ | PARSEOP_MINTYPE_NOTFIXED {$$ = TrCreateLeafOp (PARSEOP_MINTYPE_NOTFIXED);}
;
ObjectTypeKeyword
- : PARSEOP_OBJECTTYPE_UNK {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);}
- | PARSEOP_OBJECTTYPE_INT {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_INT);}
- | PARSEOP_OBJECTTYPE_STR {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_STR);}
- | PARSEOP_OBJECTTYPE_BUF {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_BUF);}
- | PARSEOP_OBJECTTYPE_PKG {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_PKG);}
- | PARSEOP_OBJECTTYPE_FLD {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_FLD);}
- | PARSEOP_OBJECTTYPE_DEV {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_DEV);}
- | PARSEOP_OBJECTTYPE_EVT {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_EVT);}
- | PARSEOP_OBJECTTYPE_MTH {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_MTH);}
- | PARSEOP_OBJECTTYPE_MTX {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_MTX);}
- | PARSEOP_OBJECTTYPE_OPR {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_OPR);}
- | PARSEOP_OBJECTTYPE_POW {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_POW);}
- | PARSEOP_OBJECTTYPE_PRO {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_PRO);}
- | PARSEOP_OBJECTTYPE_THZ {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_THZ);}
- | PARSEOP_OBJECTTYPE_BFF {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_BFF);}
- | PARSEOP_OBJECTTYPE_DDB {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_DDB);}
+ : PARSEOP_OBJECTTYPE_UNK {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_UNK);}
+ | PARSEOP_OBJECTTYPE_INT {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_INT);}
+ | PARSEOP_OBJECTTYPE_STR {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_STR);}
+ | PARSEOP_OBJECTTYPE_BUF {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_BUF);}
+ | PARSEOP_OBJECTTYPE_PKG {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_PKG);}
+ | PARSEOP_OBJECTTYPE_FLD {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_FLD);}
+ | PARSEOP_OBJECTTYPE_DEV {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_DEV);}
+ | PARSEOP_OBJECTTYPE_EVT {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_EVT);}
+ | PARSEOP_OBJECTTYPE_MTH {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_MTH);}
+ | PARSEOP_OBJECTTYPE_MTX {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_MTX);}
+ | PARSEOP_OBJECTTYPE_OPR {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_OPR);}
+ | PARSEOP_OBJECTTYPE_POW {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_POW);}
+ | PARSEOP_OBJECTTYPE_PRO {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_PRO);}
+ | PARSEOP_OBJECTTYPE_THZ {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_THZ);}
+ | PARSEOP_OBJECTTYPE_BFF {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_BFF);}
+ | PARSEOP_OBJECTTYPE_DDB {$$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE_DDB);}
;
ParityTypeKeyword
- : PARSEOP_PARITYTYPE_SPACE {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_SPACE);}
- | PARSEOP_PARITYTYPE_MARK {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_MARK);}
- | PARSEOP_PARITYTYPE_ODD {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_ODD);}
- | PARSEOP_PARITYTYPE_EVEN {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_EVEN);}
- | PARSEOP_PARITYTYPE_NONE {$$ = TrCreateLeafNode (PARSEOP_PARITYTYPE_NONE);}
+ : PARSEOP_PARITYTYPE_SPACE {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_SPACE);}
+ | PARSEOP_PARITYTYPE_MARK {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_MARK);}
+ | PARSEOP_PARITYTYPE_ODD {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_ODD);}
+ | PARSEOP_PARITYTYPE_EVEN {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_EVEN);}
+ | PARSEOP_PARITYTYPE_NONE {$$ = TrCreateLeafOp (PARSEOP_PARITYTYPE_NONE);}
;
PinConfigByte
@@ -339,125 +339,125 @@
;
PinConfigKeyword
- : PARSEOP_PIN_NOPULL {$$ = TrCreateLeafNode (PARSEOP_PIN_NOPULL);}
- | PARSEOP_PIN_PULLDOWN {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLDOWN);}
- | PARSEOP_PIN_PULLUP {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLUP);}
- | PARSEOP_PIN_PULLDEFAULT {$$ = TrCreateLeafNode (PARSEOP_PIN_PULLDEFAULT);}
+ : PARSEOP_PIN_NOPULL {$$ = TrCreateLeafOp (PARSEOP_PIN_NOPULL);}
+ | PARSEOP_PIN_PULLDOWN {$$ = TrCreateLeafOp (PARSEOP_PIN_PULLDOWN);}
+ | PARSEOP_PIN_PULLUP {$$ = TrCreateLeafOp (PARSEOP_PIN_PULLUP);}
+ | PARSEOP_PIN_PULLDEFAULT {$$ = TrCreateLeafOp (PARSEOP_PIN_PULLDEFAULT);}
;
PldKeyword
- : PARSEOP_PLD_REVISION {$$ = TrCreateLeafNode (PARSEOP_PLD_REVISION);}
- | PARSEOP_PLD_IGNORECOLOR {$$ = TrCreateLeafNode (PARSEOP_PLD_IGNORECOLOR);}
- | PARSEOP_PLD_RED {$$ = TrCreateLeafNode (PARSEOP_PLD_RED);}
- | PARSEOP_PLD_GREEN {$$ = TrCreateLeafNode (PARSEOP_PLD_GREEN);}
- | PARSEOP_PLD_BLUE {$$ = TrCreateLeafNode (PARSEOP_PLD_BLUE);}
- | PARSEOP_PLD_WIDTH {$$ = TrCreateLeafNode (PARSEOP_PLD_WIDTH);}
- | PARSEOP_PLD_HEIGHT {$$ = TrCreateLeafNode (PARSEOP_PLD_HEIGHT);}
- | PARSEOP_PLD_USERVISIBLE {$$ = TrCreateLeafNode (PARSEOP_PLD_USERVISIBLE);}
- | PARSEOP_PLD_DOCK {$$ = TrCreateLeafNode (PARSEOP_PLD_DOCK);}
- | PARSEOP_PLD_LID {$$ = TrCreateLeafNode (PARSEOP_PLD_LID);}
- | PARSEOP_PLD_PANEL {$$ = TrCreateLeafNode (PARSEOP_PLD_PANEL);}
- | PARSEOP_PLD_VERTICALPOSITION {$$ = TrCreateLeafNode (PARSEOP_PLD_VERTICALPOSITION);}
- | PARSEOP_PLD_HORIZONTALPOSITION {$$ = TrCreateLeafNode (PARSEOP_PLD_HORIZONTALPOSITION);}
- | PARSEOP_PLD_SHAPE {$$ = TrCreateLeafNode (PARSEOP_PLD_SHAPE);}
- | PARSEOP_PLD_GROUPORIENTATION {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPORIENTATION);}
- | PARSEOP_PLD_GROUPTOKEN {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPTOKEN);}
- | PARSEOP_PLD_GROUPPOSITION {$$ = TrCreateLeafNode (PARSEOP_PLD_GROUPPOSITION);}
- | PARSEOP_PLD_BAY {$$ = TrCreateLeafNode (PARSEOP_PLD_BAY);}
- | PARSEOP_PLD_EJECTABLE {$$ = TrCreateLeafNode (PARSEOP_PLD_EJECTABLE);}
- | PARSEOP_PLD_EJECTREQUIRED {$$ = TrCreateLeafNode (PARSEOP_PLD_EJECTREQUIRED);}
- | PARSEOP_PLD_CABINETNUMBER {$$ = TrCreateLeafNode (PARSEOP_PLD_CABINETNUMBER);}
- | PARSEOP_PLD_CARDCAGENUMBER {$$ = TrCreateLeafNode (PARSEOP_PLD_CARDCAGENUMBER);}
- | PARSEOP_PLD_REFERENCE {$$ = TrCreateLeafNode (PARSEOP_PLD_REFERENCE);}
- | PARSEOP_PLD_ROTATION {$$ = TrCreateLeafNode (PARSEOP_PLD_ROTATION);}
- | PARSEOP_PLD_ORDER {$$ = TrCreateLeafNode (PARSEOP_PLD_ORDER);}
- | PARSEOP_PLD_RESERVED {$$ = TrCreateLeafNode (PARSEOP_PLD_RESERVED);}
- | PARSEOP_PLD_VERTICALOFFSET {$$ = TrCreateLeafNode (PARSEOP_PLD_VERTICALOFFSET);}
- | PARSEOP_PLD_HORIZONTALOFFSET {$$ = TrCreateLeafNode (PARSEOP_PLD_HORIZONTALOFFSET);}
+ : PARSEOP_PLD_REVISION {$$ = TrCreateLeafOp (PARSEOP_PLD_REVISION);}
+ | PARSEOP_PLD_IGNORECOLOR {$$ = TrCreateLeafOp (PARSEOP_PLD_IGNORECOLOR);}
+ | PARSEOP_PLD_RED {$$ = TrCreateLeafOp (PARSEOP_PLD_RED);}
+ | PARSEOP_PLD_GREEN {$$ = TrCreateLeafOp (PARSEOP_PLD_GREEN);}
+ | PARSEOP_PLD_BLUE {$$ = TrCreateLeafOp (PARSEOP_PLD_BLUE);}
+ | PARSEOP_PLD_WIDTH {$$ = TrCreateLeafOp (PARSEOP_PLD_WIDTH);}
+ | PARSEOP_PLD_HEIGHT {$$ = TrCreateLeafOp (PARSEOP_PLD_HEIGHT);}
+ | PARSEOP_PLD_USERVISIBLE {$$ = TrCreateLeafOp (PARSEOP_PLD_USERVISIBLE);}
+ | PARSEOP_PLD_DOCK {$$ = TrCreateLeafOp (PARSEOP_PLD_DOCK);}
+ | PARSEOP_PLD_LID {$$ = TrCreateLeafOp (PARSEOP_PLD_LID);}
+ | PARSEOP_PLD_PANEL {$$ = TrCreateLeafOp (PARSEOP_PLD_PANEL);}
+ | PARSEOP_PLD_VERTICALPOSITION {$$ = TrCreateLeafOp (PARSEOP_PLD_VERTICALPOSITION);}
+ | PARSEOP_PLD_HORIZONTALPOSITION {$$ = TrCreateLeafOp (PARSEOP_PLD_HORIZONTALPOSITION);}
+ | PARSEOP_PLD_SHAPE {$$ = TrCreateLeafOp (PARSEOP_PLD_SHAPE);}
+ | PARSEOP_PLD_GROUPORIENTATION {$$ = TrCreateLeafOp (PARSEOP_PLD_GROUPORIENTATION);}
+ | PARSEOP_PLD_GROUPTOKEN {$$ = TrCreateLeafOp (PARSEOP_PLD_GROUPTOKEN);}
+ | PARSEOP_PLD_GROUPPOSITION {$$ = TrCreateLeafOp (PARSEOP_PLD_GROUPPOSITION);}
+ | PARSEOP_PLD_BAY {$$ = TrCreateLeafOp (PARSEOP_PLD_BAY);}
+ | PARSEOP_PLD_EJECTABLE {$$ = TrCreateLeafOp (PARSEOP_PLD_EJECTABLE);}
+ | PARSEOP_PLD_EJECTREQUIRED {$$ = TrCreateLeafOp (PARSEOP_PLD_EJECTREQUIRED);}
+ | PARSEOP_PLD_CABINETNUMBER {$$ = TrCreateLeafOp (PARSEOP_PLD_CABINETNUMBER);}
+ | PARSEOP_PLD_CARDCAGENUMBER {$$ = TrCreateLeafOp (PARSEOP_PLD_CARDCAGENUMBER);}
+ | PARSEOP_PLD_REFERENCE {$$ = TrCreateLeafOp (PARSEOP_PLD_REFERENCE);}
+ | PARSEOP_PLD_ROTATION {$$ = TrCreateLeafOp (PARSEOP_PLD_ROTATION);}
+ | PARSEOP_PLD_ORDER {$$ = TrCreateLeafOp (PARSEOP_PLD_ORDER);}
+ | PARSEOP_PLD_RESERVED {$$ = TrCreateLeafOp (PARSEOP_PLD_RESERVED);}
+ | PARSEOP_PLD_VERTICALOFFSET {$$ = TrCreateLeafOp (PARSEOP_PLD_VERTICALOFFSET);}
+ | PARSEOP_PLD_HORIZONTALOFFSET {$$ = TrCreateLeafOp (PARSEOP_PLD_HORIZONTALOFFSET);}
;
RangeTypeKeyword
- : PARSEOP_RANGETYPE_ISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ISAONLY);}
- | PARSEOP_RANGETYPE_NONISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_NONISAONLY);}
- | PARSEOP_RANGETYPE_ENTIRE {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ENTIRE);}
+ : PARSEOP_RANGETYPE_ISAONLY {$$ = TrCreateLeafOp (PARSEOP_RANGETYPE_ISAONLY);}
+ | PARSEOP_RANGETYPE_NONISAONLY {$$ = TrCreateLeafOp (PARSEOP_RANGETYPE_NONISAONLY);}
+ | PARSEOP_RANGETYPE_ENTIRE {$$ = TrCreateLeafOp (PARSEOP_RANGETYPE_ENTIRE);}
;
RegionSpaceKeyword
- : PARSEOP_REGIONSPACE_IO {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IO);}
- | PARSEOP_REGIONSPACE_MEM {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_MEM);}
- | PARSEOP_REGIONSPACE_PCI {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCI);}
- | PARSEOP_REGIONSPACE_EC {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_EC);}
- | PARSEOP_REGIONSPACE_SMBUS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_SMBUS);}
- | PARSEOP_REGIONSPACE_CMOS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_CMOS);}
- | PARSEOP_REGIONSPACE_PCIBAR {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCIBAR);}
- | PARSEOP_REGIONSPACE_IPMI {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_IPMI);}
- | PARSEOP_REGIONSPACE_GPIO {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GPIO);}
- | PARSEOP_REGIONSPACE_GSBUS {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_GSBUS);}
- | PARSEOP_REGIONSPACE_PCC {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_PCC);}
- | PARSEOP_REGIONSPACE_FFIXEDHW {$$ = TrCreateLeafNode (PARSEOP_REGIONSPACE_FFIXEDHW);}
+ : PARSEOP_REGIONSPACE_IO {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_IO);}
+ | PARSEOP_REGIONSPACE_MEM {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_MEM);}
+ | PARSEOP_REGIONSPACE_PCI {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCI);}
+ | PARSEOP_REGIONSPACE_EC {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_EC);}
+ | PARSEOP_REGIONSPACE_SMBUS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_SMBUS);}
+ | PARSEOP_REGIONSPACE_CMOS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_CMOS);}
+ | PARSEOP_REGIONSPACE_PCIBAR {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCIBAR);}
+ | PARSEOP_REGIONSPACE_IPMI {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_IPMI);}
+ | PARSEOP_REGIONSPACE_GPIO {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GPIO);}
+ | PARSEOP_REGIONSPACE_GSBUS {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_GSBUS);}
+ | PARSEOP_REGIONSPACE_PCC {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_PCC);}
+ | PARSEOP_REGIONSPACE_FFIXEDHW {$$ = TrCreateLeafOp (PARSEOP_REGIONSPACE_FFIXEDHW);}
;
ResourceTypeKeyword
- : PARSEOP_RESOURCETYPE_CONSUMER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
- | PARSEOP_RESOURCETYPE_PRODUCER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_PRODUCER);}
+ : PARSEOP_RESOURCETYPE_CONSUMER {$$ = TrCreateLeafOp (PARSEOP_RESOURCETYPE_CONSUMER);}
+ | PARSEOP_RESOURCETYPE_PRODUCER {$$ = TrCreateLeafOp (PARSEOP_RESOURCETYPE_PRODUCER);}
;
SerializeRuleKeyword
- : PARSEOP_SERIALIZERULE_SERIAL {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_SERIAL);}
- | PARSEOP_SERIALIZERULE_NOTSERIAL {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_NOTSERIAL);}
+ : PARSEOP_SERIALIZERULE_SERIAL {$$ = TrCreateLeafOp (PARSEOP_SERIALIZERULE_SERIAL);}
+ | PARSEOP_SERIALIZERULE_NOTSERIAL {$$ = TrCreateLeafOp (PARSEOP_SERIALIZERULE_NOTSERIAL);}
;
ShareTypeKeyword
- : PARSEOP_SHARETYPE_SHARED {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_SHARED);}
- | PARSEOP_SHARETYPE_EXCLUSIVE {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_EXCLUSIVE);}
- | PARSEOP_SHARETYPE_SHAREDWAKE {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_SHAREDWAKE);}
- | PARSEOP_SHARETYPE_EXCLUSIVEWAKE {$$ = TrCreateLeafNode (PARSEOP_SHARETYPE_EXCLUSIVEWAKE);}
+ : PARSEOP_SHARETYPE_SHARED {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_SHARED);}
+ | PARSEOP_SHARETYPE_EXCLUSIVE {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_EXCLUSIVE);}
+ | PARSEOP_SHARETYPE_SHAREDWAKE {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_SHAREDWAKE);}
+ | PARSEOP_SHARETYPE_EXCLUSIVEWAKE {$$ = TrCreateLeafOp (PARSEOP_SHARETYPE_EXCLUSIVEWAKE);}
;
SlaveModeKeyword
- : PARSEOP_SLAVEMODE_CONTROLLERINIT {$$ = TrCreateLeafNode (PARSEOP_SLAVEMODE_CONTROLLERINIT);}
- | PARSEOP_SLAVEMODE_DEVICEINIT {$$ = TrCreateLeafNode (PARSEOP_SLAVEMODE_DEVICEINIT);}
+ : PARSEOP_SLAVEMODE_CONTROLLERINIT {$$ = TrCreateLeafOp (PARSEOP_SLAVEMODE_CONTROLLERINIT);}
+ | PARSEOP_SLAVEMODE_DEVICEINIT {$$ = TrCreateLeafOp (PARSEOP_SLAVEMODE_DEVICEINIT);}
;
StopBitsKeyword
- : PARSEOP_STOPBITS_TWO {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_TWO);}
- | PARSEOP_STOPBITS_ONEPLUSHALF {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ONEPLUSHALF);}
- | PARSEOP_STOPBITS_ONE {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ONE);}
- | PARSEOP_STOPBITS_ZERO {$$ = TrCreateLeafNode (PARSEOP_STOPBITS_ZERO);}
+ : PARSEOP_STOPBITS_TWO {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_TWO);}
+ | PARSEOP_STOPBITS_ONEPLUSHALF {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_ONEPLUSHALF);}
+ | PARSEOP_STOPBITS_ONE {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_ONE);}
+ | PARSEOP_STOPBITS_ZERO {$$ = TrCreateLeafOp (PARSEOP_STOPBITS_ZERO);}
;
TranslationKeyword
- : PARSEOP_TRANSLATIONTYPE_SPARSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_SPARSE);}
- | PARSEOP_TRANSLATIONTYPE_DENSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_DENSE);}
+ : PARSEOP_TRANSLATIONTYPE_SPARSE {$$ = TrCreateLeafOp (PARSEOP_TRANSLATIONTYPE_SPARSE);}
+ | PARSEOP_TRANSLATIONTYPE_DENSE {$$ = TrCreateLeafOp (PARSEOP_TRANSLATIONTYPE_DENSE);}
;
TypeKeyword
- : PARSEOP_TYPE_TRANSLATION {$$ = TrCreateLeafNode (PARSEOP_TYPE_TRANSLATION);}
- | PARSEOP_TYPE_STATIC {$$ = TrCreateLeafNode (PARSEOP_TYPE_STATIC);}
+ : PARSEOP_TYPE_TRANSLATION {$$ = TrCreateLeafOp (PARSEOP_TYPE_TRANSLATION);}
+ | PARSEOP_TYPE_STATIC {$$ = TrCreateLeafOp (PARSEOP_TYPE_STATIC);}
;
UpdateRuleKeyword
- : PARSEOP_UPDATERULE_PRESERVE {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_PRESERVE);}
- | PARSEOP_UPDATERULE_ONES {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_ONES);}
- | PARSEOP_UPDATERULE_ZEROS {$$ = TrCreateLeafNode (PARSEOP_UPDATERULE_ZEROS);}
+ : PARSEOP_UPDATERULE_PRESERVE {$$ = TrCreateLeafOp (PARSEOP_UPDATERULE_PRESERVE);}
+ | PARSEOP_UPDATERULE_ONES {$$ = TrCreateLeafOp (PARSEOP_UPDATERULE_ONES);}
+ | PARSEOP_UPDATERULE_ZEROS {$$ = TrCreateLeafOp (PARSEOP_UPDATERULE_ZEROS);}
;
WireModeKeyword
- : PARSEOP_WIREMODE_FOUR {$$ = TrCreateLeafNode (PARSEOP_WIREMODE_FOUR);}
- | PARSEOP_WIREMODE_THREE {$$ = TrCreateLeafNode (PARSEOP_WIREMODE_THREE);}
+ : PARSEOP_WIREMODE_FOUR {$$ = TrCreateLeafOp (PARSEOP_WIREMODE_FOUR);}
+ | PARSEOP_WIREMODE_THREE {$$ = TrCreateLeafOp (PARSEOP_WIREMODE_THREE);}
;
XferSizeKeyword
- : PARSEOP_XFERSIZE_8 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_8, 0);}
- | PARSEOP_XFERSIZE_16 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_16, 1);}
- | PARSEOP_XFERSIZE_32 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);}
- | PARSEOP_XFERSIZE_64 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_64, 3);}
- | PARSEOP_XFERSIZE_128 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_128, 4);}
- | PARSEOP_XFERSIZE_256 {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_256, 5);}
+ : PARSEOP_XFERSIZE_8 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_8, 0);}
+ | PARSEOP_XFERSIZE_16 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_16, 1);}
+ | PARSEOP_XFERSIZE_32 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_32, 2);}
+ | PARSEOP_XFERSIZE_64 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_64, 3);}
+ | PARSEOP_XFERSIZE_128 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_128, 4);}
+ | PARSEOP_XFERSIZE_256 {$$ = TrCreateValuedLeafOp (PARSEOP_XFERSIZE_256, 5);}
;
XferTypeKeyword
- : PARSEOP_XFERTYPE_8 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8);}
- | PARSEOP_XFERTYPE_8_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8_16);}
- | PARSEOP_XFERTYPE_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_16);}
+ : PARSEOP_XFERTYPE_8 {$$ = TrCreateLeafOp (PARSEOP_XFERTYPE_8);}
+ | PARSEOP_XFERTYPE_8_16 {$$ = TrCreateLeafOp (PARSEOP_XFERTYPE_8_16);}
+ | PARSEOP_XFERTYPE_16 {$$ = TrCreateLeafOp (PARSEOP_XFERTYPE_16);}
;
Modified: trunk/sys/contrib/dev/acpica/compiler/asllength.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/asllength.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/asllength.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -339,7 +339,7 @@
/* Does this opcode have an associated "PackageLength" field? */
Op->Asl.AmlPkgLenBytes = 0;
- if (Op->Asl.CompileFlags & NODE_AML_PACKAGE)
+ if (Op->Asl.CompileFlags & OP_AML_PACKAGE)
{
Op->Asl.AmlPkgLenBytes = CgGetPackageLenByteCount (
Op, Op->Asl.AmlSubtreeLength);
@@ -460,7 +460,7 @@
case PARSEOP_NAMESTRING:
case PARSEOP_METHODCALL:
- if (Op->Asl.CompileFlags & NODE_NAME_INTERNALIZED)
+ if (Op->Asl.CompileFlags & OP_NAME_INTERNALIZED)
{
break;
}
@@ -476,7 +476,7 @@
Op->Asl.ExternalName = Op->Asl.Value.String;
Op->Asl.Value.String = Buffer;
- Op->Asl.CompileFlags |= NODE_NAME_INTERNALIZED;
+ Op->Asl.CompileFlags |= OP_NAME_INTERNALIZED;
Op->Asl.AmlLength = strlen (Buffer);
/*
Modified: trunk/sys/contrib/dev/acpica/compiler/asllisting.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/asllisting.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/asllisting.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -314,7 +314,7 @@
LsWriteNodeToListing (Op, FileId);
- if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DATA)
+ if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DATA)
{
/* Buffer is a resource template, don't dump the data all at once */
@@ -446,7 +446,7 @@
Op->Asl.LineNumber, Op->Asl.EndLine,
Op->Asl.LogicalLineNumber, Op->Asl.EndLogicalLine);
- TrPrintNodeCompileFlags (Op->Asl.CompileFlags);
+ TrPrintOpFlags (Op->Asl.CompileFlags, ASL_TREE_OUTPUT);
DbgPrint (ASL_TREE_OUTPUT, "\n");
return (AE_OK);
}
@@ -617,7 +617,7 @@
case PARSEOP_DEFAULT_ARG:
- if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
+ if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
{
LsWriteSourceLines (Op->Asl.LineNumber, Op->Asl.EndLogicalLine,
FileId);
@@ -661,7 +661,7 @@
case AML_NAME_OP:
- if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
+ if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
{
LsWriteSourceLines (Op->Asl.LineNumber, Op->Asl.LogicalLineNumber,
FileId);
@@ -780,7 +780,7 @@
default:
if ((Op->Asl.ParseOpcode == PARSEOP_BUFFER) &&
- (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC))
+ (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC))
{
return;
}
Modified: trunk/sys/contrib/dev/acpica/compiler/aslload.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslload.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslload.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -317,7 +317,8 @@
return (Status);
}
else if (Status == AE_ALREADY_EXISTS &&
- (Node->Flags & ANOBJ_IS_EXTERNAL))
+ (Node->Flags & ANOBJ_IS_EXTERNAL) &&
+ Node->OwnerId != WalkState->OwnerId)
{
Node->Type = (UINT8) ACPI_TYPE_LOCAL_REGION_FIELD;
}
@@ -565,7 +566,7 @@
* a new scope so that the resource subfield names can be entered into
* the namespace underneath this name
*/
- if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
+ if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
{
ForceNewScope = TRUE;
}
@@ -615,7 +616,7 @@
case PARSEOP_DEFAULT_ARG:
- if (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC)
+ if (Op->Asl.CompileFlags == OP_IS_RESOURCE_DESC)
{
Status = LdLoadResourceElements (Op, WalkState);
return_ACPI_STATUS (Status);
@@ -824,11 +825,16 @@
Status = AE_OK;
- if (Node->OwnerId == WalkState->OwnerId)
+ if (Node->OwnerId == WalkState->OwnerId &&
+ !(Node->Flags & IMPLICIT_EXTERNAL))
{
AslError (ASL_ERROR, ASL_MSG_NAME_EXISTS, Op,
Op->Asl.ExternalName);
}
+ if (Node->Flags & IMPLICIT_EXTERNAL)
+ {
+ Node->Flags &= ~IMPLICIT_EXTERNAL;
+ }
}
else if (!(Node->Flags & ANOBJ_IS_EXTERNAL) &&
(Op->Asl.ParseOpcode == PARSEOP_EXTERNAL))
@@ -1001,7 +1007,7 @@
/* Get the type to determine if we should push the scope */
if ((Op->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG) &&
- (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC))
+ (Op->Asl.CompileFlags == OP_IS_RESOURCE_DESC))
{
ObjectType = ACPI_TYPE_LOCAL_RESOURCE;
}
@@ -1014,7 +1020,7 @@
if (Op->Asl.ParseOpcode == PARSEOP_NAME)
{
- if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
+ if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
{
ForceNewScope = TRUE;
}
@@ -1125,7 +1131,7 @@
/* Get the type to determine if we should pop the scope */
if ((Op->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG) &&
- (Op->Asl.CompileFlags == NODE_IS_RESOURCE_DESC))
+ (Op->Asl.CompileFlags == OP_IS_RESOURCE_DESC))
{
/* TBD: Merge into AcpiDsMapNamedOpcodeToDataType */
@@ -1140,7 +1146,7 @@
if (Op->Asl.ParseOpcode == PARSEOP_NAME)
{
- if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC)
+ if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC)
{
ForceNewScope = TRUE;
}
Modified: trunk/sys/contrib/dev/acpica/compiler/asllookup.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/asllookup.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/asllookup.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -414,7 +414,7 @@
/* Name must appear as the last parameter */
NameOp = Op->Asl.Child;
- while (!(NameOp->Asl.CompileFlags & NODE_IS_NAME_DECLARATION))
+ while (!(NameOp->Asl.CompileFlags & OP_IS_NAME_DECLARATION))
{
NameOp = NameOp->Asl.Next;
}
Modified: trunk/sys/contrib/dev/acpica/compiler/aslmap.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslmap.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslmap.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -268,7 +268,7 @@
/* ARG4 */ OP_TABLE_ENTRY (AML_ARG4, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
/* ARG5 */ OP_TABLE_ENTRY (AML_ARG5, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
/* ARG6 */ OP_TABLE_ENTRY (AML_ARG6, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
-/* BANKFIELD */ OP_TABLE_ENTRY (AML_BANK_FIELD_OP, 0, NODE_AML_PACKAGE, 0),
+/* BANKFIELD */ OP_TABLE_ENTRY (AML_BANK_FIELD_OP, 0, OP_AML_PACKAGE, 0),
/* BITSPERBYTE_EIGHT */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
/* BITSPERBYTE_FIVE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* BITSPERBYTE_NINE */ OP_TABLE_ENTRY (AML_BYTE_OP, 4, 0, 0),
@@ -276,7 +276,7 @@
/* BITSPERBYTE_SIX */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* BREAK */ OP_TABLE_ENTRY (AML_BREAK_OP, 0, 0, 0),
/* BREAKPOINT */ OP_TABLE_ENTRY (AML_BREAKPOINT_OP, 0, 0, 0),
-/* BUFFER */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_BUFFER),
+/* BUFFER */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_BUFFER),
/* BUSMASTERTYPE_MASTER */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* BUSMASTERTYPE_NOTMASTER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* BYTECONST */ OP_TABLE_ENTRY (AML_RAW_DATA_BYTE, 0, 0, ACPI_BTYPE_INTEGER),
@@ -307,7 +307,7 @@
/* DEFAULT_ARG */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* DEFINITIONBLOCK */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* DEREFOF */ OP_TABLE_ENTRY (AML_DEREF_OF_OP, 0, 0, ACPI_BTYPE_DATA_REFERENCE | ACPI_BTYPE_STRING),
-/* DEVICE */ OP_TABLE_ENTRY (AML_DEVICE_OP, 0, NODE_AML_PACKAGE, 0),
+/* DEVICE */ OP_TABLE_ENTRY (AML_DEVICE_OP, 0, OP_AML_PACKAGE, 0),
/* DEVICEPOLARITY_HIGH */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* DEVICEPOLARITY_LOW */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* DIVIDE */ OP_TABLE_ENTRY (AML_DIVIDE_OP, 0, 0, ACPI_BTYPE_INTEGER),
@@ -321,8 +321,8 @@
/* DWORDMEMORY */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* DWORDSPACE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* EISAID */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, 0, ACPI_BTYPE_INTEGER),
-/* ELSE */ OP_TABLE_ENTRY (AML_ELSE_OP, 0, NODE_AML_PACKAGE, 0),
-/* ELSEIF */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, NODE_AML_PACKAGE, 0),
+/* ELSE */ OP_TABLE_ENTRY (AML_ELSE_OP, 0, OP_AML_PACKAGE, 0),
+/* ELSEIF */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, OP_AML_PACKAGE, 0),
/* ENDDEPENDENTFN */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* ENDIAN_BIG */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* ENDIAN_LITTLE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
@@ -334,7 +334,7 @@
/* EXTENDEDSPACE */ OP_TABLE_ENTRY (AML_RAW_DATA_QWORD, 0, 0, ACPI_BTYPE_INTEGER),
/* EXTERNAL */ OP_TABLE_ENTRY (AML_EXTERNAL_OP, 0, 0, 0),
/* FATAL */ OP_TABLE_ENTRY (AML_FATAL_OP, 0, 0, 0),
-/* FIELD */ OP_TABLE_ENTRY (AML_FIELD_OP, 0, NODE_AML_PACKAGE, 0),
+/* FIELD */ OP_TABLE_ENTRY (AML_FIELD_OP, 0, OP_AML_PACKAGE, 0),
/* FINDSETLEFTBIT */ OP_TABLE_ENTRY (AML_FIND_SET_LEFT_BIT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* FINDSETRIGHTBIT */ OP_TABLE_ENTRY (AML_FIND_SET_RIGHT_BIT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* FIXEDDMA */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
@@ -343,17 +343,17 @@
/* FLOWCONTROL_NONE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* FLOWCONTROL_SW */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* FROMBCD */ OP_TABLE_ENTRY (AML_FROM_BCD_OP, 0, 0, ACPI_BTYPE_INTEGER),
-/* FUNCTION */ OP_TABLE_ENTRY (AML_METHOD_OP, 0, NODE_AML_PACKAGE, 0),
+/* FUNCTION */ OP_TABLE_ENTRY (AML_METHOD_OP, 0, OP_AML_PACKAGE, 0),
/* 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),
+/* IF */ OP_TABLE_ENTRY (AML_IF_OP, 0, OP_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),
/* INCREMENT */ OP_TABLE_ENTRY (AML_INCREMENT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* INDEX */ OP_TABLE_ENTRY (AML_INDEX_OP, 0, 0, ACPI_BTYPE_REFERENCE_OBJECT),
-/* INDEXFIELD */ OP_TABLE_ENTRY (AML_INDEX_FIELD_OP, 0, NODE_AML_PACKAGE, 0),
+/* INDEXFIELD */ OP_TABLE_ENTRY (AML_INDEX_FIELD_OP, 0, OP_AML_PACKAGE, 0),
/* INTEGER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* INTERRUPT */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
/* INTLEVEL_ACTIVEBOTH */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
@@ -407,7 +407,7 @@
/* MEMTYPE_NONCACHEABLE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* MEMTYPE_PREFETCHABLE */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
/* MEMTYPE_WRITECOMBINING */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
-/* METHOD */ OP_TABLE_ENTRY (AML_METHOD_OP, 0, NODE_AML_PACKAGE, 0),
+/* METHOD */ OP_TABLE_ENTRY (AML_METHOD_OP, 0, OP_AML_PACKAGE, 0),
/* METHODCALL */ OP_TABLE_ENTRY (AML_INT_METHODCALL_OP, 0, 0, ACPI_BTYPE_OBJECTS_AND_REFS),
/* MID */ OP_TABLE_ENTRY (AML_MID_OP, 0, 0, ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER),
/* MINTYPE_FIXED */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
@@ -445,8 +445,8 @@
/* ONES */ OP_TABLE_ENTRY (AML_ONES_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* OPERATIONREGION */ OP_TABLE_ENTRY (AML_REGION_OP, 0, 0, 0),
/* OR */ OP_TABLE_ENTRY (AML_BIT_OR_OP, 0, 0, ACPI_BTYPE_INTEGER),
-/* PACKAGE */ OP_TABLE_ENTRY (AML_PACKAGE_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_PACKAGE),
-/* PACKAGEP_LENGTH */ OP_TABLE_ENTRY (AML_PACKAGE_LENGTH, 0, NODE_AML_PACKAGE, 0),
+/* PACKAGE */ OP_TABLE_ENTRY (AML_PACKAGE_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_PACKAGE),
+/* PACKAGEP_LENGTH */ OP_TABLE_ENTRY (AML_PACKAGE_LENGTH, 0, OP_AML_PACKAGE, 0),
/* PARITYTYPE_EVEN */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* PARITYTYPE_MARK */ OP_TABLE_ENTRY (AML_BYTE_OP, 3, 0, 0),
/* PARITYTYPE_NONE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
@@ -461,8 +461,8 @@
/* PIN_PULLDEFAULT */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* PIN_PULLDOWN */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* PIN_PULLUP */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
-/* POWERRESOURCE */ OP_TABLE_ENTRY (AML_POWER_RESOURCE_OP, 0, NODE_AML_PACKAGE, 0),
-/* PROCESSOR */ OP_TABLE_ENTRY (AML_PROCESSOR_OP, 0, NODE_AML_PACKAGE, 0),
+/* POWERRESOURCE */ OP_TABLE_ENTRY (AML_POWER_RESOURCE_OP, 0, OP_AML_PACKAGE, 0),
+/* PROCESSOR */ OP_TABLE_ENTRY (AML_PROCESSOR_OP, 0, OP_AML_PACKAGE, 0),
/* QWORDCONST */ OP_TABLE_ENTRY (AML_RAW_DATA_QWORD, 0, 0, ACPI_BTYPE_INTEGER),
/* QWORDIO */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* QWORDMEMORY */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
@@ -495,7 +495,7 @@
/* RESOURCETYPE_PRODUCER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* RETURN */ OP_TABLE_ENTRY (AML_RETURN_OP, 0, 0, 0),
/* REVISION */ OP_TABLE_ENTRY (AML_REVISION_OP, 0, 0, ACPI_BTYPE_INTEGER),
-/* SCOPE */ OP_TABLE_ENTRY (AML_SCOPE_OP, 0, NODE_AML_PACKAGE, 0),
+/* SCOPE */ OP_TABLE_ENTRY (AML_SCOPE_OP, 0, OP_AML_PACKAGE, 0),
/* SERIALIZERULE_NOTSERIAL */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* SERIALIZERULE_SERIAL */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* SHARETYPE_EXCLUSIVE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
@@ -522,7 +522,7 @@
/* STRING_LITERAL */ OP_TABLE_ENTRY (AML_STRING_OP, 0, 0, ACPI_BTYPE_STRING),
/* SUBTRACT */ OP_TABLE_ENTRY (AML_SUBTRACT_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* SWITCH */ OP_TABLE_ENTRY (AML_DEFAULT_ARG_OP, 0, 0, 0),
-/* THERMALZONE */ OP_TABLE_ENTRY (AML_THERMAL_ZONE_OP, 0, NODE_AML_PACKAGE, 0),
+/* THERMALZONE */ OP_TABLE_ENTRY (AML_THERMAL_ZONE_OP, 0, OP_AML_PACKAGE, 0),
/* TIMER */ OP_TABLE_ENTRY (AML_TIMER_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* TOBCD */ OP_TABLE_ENTRY (AML_TO_BCD_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* TOBUFFER */ OP_TABLE_ENTRY (AML_TO_BUFFER_OP, 0, 0, ACPI_BTYPE_BUFFER),
@@ -530,7 +530,7 @@
/* TOHEXSTRING */ OP_TABLE_ENTRY (AML_TO_HEX_STRING_OP, 0, 0, ACPI_BTYPE_STRING),
/* TOINTEGER */ OP_TABLE_ENTRY (AML_TO_INTEGER_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* TOSTRING */ OP_TABLE_ENTRY (AML_TO_STRING_OP, 0, 0, ACPI_BTYPE_STRING),
-/* TOUUID */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_INTEGER),
+/* TOUUID */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_INTEGER),
/* TRANSLATIONTYPE_DENSE */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* TRANSLATIONTYPE_SPARSE */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* TYPE_STATIC */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
@@ -537,16 +537,16 @@
/* 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),
+/* UNICODE */ OP_TABLE_ENTRY (AML_BUFFER_OP, 0, OP_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),
/* UPDATERULE_PRESERVE */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_PRESERVE, 0, 0),
/* UPDATERULE_ZEROS */ OP_TABLE_ENTRY (AML_BYTE_OP, AML_FIELD_UPDATE_WRITE_AS_ZEROS,0, 0),
-/* VARIABLE_PACKAGE */ OP_TABLE_ENTRY (AML_VARIABLE_PACKAGE_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_PACKAGE),
+/* VARIABLE_PACKAGE */ OP_TABLE_ENTRY (AML_VARIABLE_PACKAGE_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_PACKAGE),
/* VENDORLONG */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* VENDORSHORT */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* WAIT */ OP_TABLE_ENTRY (AML_WAIT_OP, 0, 0, ACPI_BTYPE_INTEGER),
-/* WHILE */ OP_TABLE_ENTRY (AML_WHILE_OP, 0, NODE_AML_PACKAGE, 0),
+/* WHILE */ OP_TABLE_ENTRY (AML_WHILE_OP, 0, OP_AML_PACKAGE, 0),
/* WIREMODE_FOUR */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* WIREMODE_THREE */ OP_TABLE_ENTRY (AML_BYTE_OP, 1, 0, 0),
/* WORDBUSNUMBER */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
@@ -564,7 +564,7 @@
/* XFERTYPE_16 */ OP_TABLE_ENTRY (AML_BYTE_OP, 2, 0, 0),
/* XOR */ OP_TABLE_ENTRY (AML_BIT_XOR_OP, 0, 0, ACPI_BTYPE_INTEGER),
/* ZERO */ OP_TABLE_ENTRY (AML_ZERO_OP, 0, 0, ACPI_BTYPE_INTEGER),
-/* TOPLD */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, NODE_AML_PACKAGE, ACPI_BTYPE_INTEGER),
+/* TOPLD */ OP_TABLE_ENTRY (AML_DWORD_OP, 0, OP_AML_PACKAGE, ACPI_BTYPE_INTEGER),
/* XFERSIZE_128 */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* REVISION */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
/* IGNORECOLOR */ OP_TABLE_ENTRY (AML_BYTE_OP, 0, 0, 0),
Modified: trunk/sys/contrib/dev/acpica/compiler/aslmapoutput.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslmapoutput.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslmapoutput.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -686,7 +686,7 @@
* are references to other objects within the namespace and the
* parent objects of name declarations
*/
- if (Op->Asl.CompileFlags & NODE_IS_NAME_DECLARATION)
+ if (Op->Asl.CompileFlags & OP_IS_NAME_DECLARATION)
{
return (AE_OK);
}
Modified: trunk/sys/contrib/dev/acpica/compiler/aslmessages.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslmessages.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslmessages.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -349,7 +349,8 @@
/* 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: trunk/sys/contrib/dev/acpica/compiler/aslmessages.h
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslmessages.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslmessages.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -352,6 +352,7 @@
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: trunk/sys/contrib/dev/acpica/compiler/aslmethod.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslmethod.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslmethod.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -381,7 +381,7 @@
* If the local is being used as a target, mark the local
* initialized
*/
- if (Op->Asl.CompileFlags & NODE_IS_TARGET)
+ if (Op->Asl.CompileFlags & OP_IS_TARGET)
{
MethodInfo->LocalInitialized[RegisterNumber] = TRUE;
}
@@ -426,7 +426,7 @@
* If the Arg is being used as a target, mark the local
* initialized
*/
- if (Op->Asl.CompileFlags & NODE_IS_TARGET)
+ if (Op->Asl.CompileFlags & OP_IS_TARGET)
{
MethodInfo->ArgInitialized[RegisterNumber] = TRUE;
}
@@ -465,7 +465,7 @@
/*
* A child indicates a possible return value. A simple Return or
- * Return() is marked with NODE_IS_NULL_RETURN by the parser so
+ * Return() is marked with OP_IS_NULL_RETURN by the parser so
* that it is not counted as a "real" return-with-value, although
* the AML code that is actually emitted is Return(0). The AML
* definition of Return has a required parameter, so we are
@@ -473,7 +473,7 @@
*/
if ((Op->Asl.Child) &&
(Op->Asl.Child->Asl.ParseOpcode != PARSEOP_DEFAULT_ARG) &&
- (!(Op->Asl.Child->Asl.CompileFlags & NODE_IS_NULL_RETURN)))
+ (!(Op->Asl.Child->Asl.CompileFlags & OP_IS_NULL_RETURN)))
{
MethodInfo->NumReturnWithValue++;
}
@@ -705,7 +705,7 @@
* of the method can possibly terminate without a return statement.
*/
if ((!AnLastStatementIsReturn (Op)) &&
- (!(Op->Asl.CompileFlags & NODE_HAS_NO_EXIT)))
+ (!(Op->Asl.CompileFlags & OP_HAS_NO_EXIT)))
{
/*
* No return statement, and execution can possibly exit
@@ -737,11 +737,11 @@
{
if (MethodInfo->NumReturnWithValue)
{
- Op->Asl.CompileFlags |= NODE_METHOD_SOME_NO_RETVAL;
+ Op->Asl.CompileFlags |= OP_METHOD_SOME_NO_RETVAL;
}
else
{
- Op->Asl.CompileFlags |= NODE_METHOD_NO_RETVAL;
+ Op->Asl.CompileFlags |= OP_METHOD_NO_RETVAL;
}
}
@@ -785,7 +785,7 @@
* The parent block does not "exit" and continue execution -- the
* method is terminated here with the Return() statement.
*/
- Op->Asl.Parent->Asl.CompileFlags |= NODE_HAS_NO_EXIT;
+ Op->Asl.Parent->Asl.CompileFlags |= OP_HAS_NO_EXIT;
/* Used in the "typing" pass later */
@@ -805,7 +805,7 @@
case PARSEOP_IF:
- if ((Op->Asl.CompileFlags & NODE_HAS_NO_EXIT) &&
+ if ((Op->Asl.CompileFlags & OP_HAS_NO_EXIT) &&
(Op->Asl.Next) &&
(Op->Asl.Next->Asl.ParseOpcode == PARSEOP_ELSE))
{
@@ -814,20 +814,20 @@
* (it contains an unconditional Return)
* mark the ELSE block to remember this fact.
*/
- Op->Asl.Next->Asl.CompileFlags |= NODE_IF_HAS_NO_EXIT;
+ Op->Asl.Next->Asl.CompileFlags |= OP_IF_HAS_NO_EXIT;
}
break;
case PARSEOP_ELSE:
- if ((Op->Asl.CompileFlags & NODE_HAS_NO_EXIT) &&
- (Op->Asl.CompileFlags & NODE_IF_HAS_NO_EXIT))
+ if ((Op->Asl.CompileFlags & OP_HAS_NO_EXIT) &&
+ (Op->Asl.CompileFlags & OP_IF_HAS_NO_EXIT))
{
/*
* This ELSE block has no exit and the corresponding IF block
* has no exit either. Therefore, the parent node has no exit.
*/
- Op->Asl.Parent->Asl.CompileFlags |= NODE_HAS_NO_EXIT;
+ Op->Asl.Parent->Asl.CompileFlags |= OP_HAS_NO_EXIT;
}
break;
@@ -834,12 +834,12 @@
default:
- if ((Op->Asl.CompileFlags & NODE_HAS_NO_EXIT) &&
+ if ((Op->Asl.CompileFlags & OP_HAS_NO_EXIT) &&
(Op->Asl.Parent))
{
/* If this node has no exit, then the parent has no exit either */
- Op->Asl.Parent->Asl.CompileFlags |= NODE_HAS_NO_EXIT;
+ Op->Asl.Parent->Asl.CompileFlags |= OP_HAS_NO_EXIT;
}
break;
}
Modified: trunk/sys/contrib/dev/acpica/compiler/asloffset.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/asloffset.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/asloffset.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -212,7 +212,7 @@
/* Ignore actual data blocks for resource descriptors */
- if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DATA)
+ if (Op->Asl.CompileFlags & OP_IS_RESOURCE_DATA)
{
return (AE_OK); /* Do NOT update the global AML offset */
}
@@ -229,7 +229,7 @@
/* Named resource descriptor (has a descriptor tag) */
if ((Node->Type == ACPI_TYPE_LOCAL_RESOURCE) &&
- (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DESC))
+ (Op->Asl.CompileFlags & OP_IS_RESOURCE_DESC))
{
LsEmitOffsetTableEntry (FileId, Node, 0, Gbl_CurrentAmlOffset,
Op->Asl.ParseOpName, 0, Op->Asl.Extra, AML_BUFFER_OP);
Modified: trunk/sys/contrib/dev/acpica/compiler/aslopcodes.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslopcodes.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslopcodes.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -551,7 +551,7 @@
*/
BufferOp->Asl.ParseOpcode = PARSEOP_BUFFER;
BufferOp->Asl.AmlOpcode = AML_BUFFER_OP;
- BufferOp->Asl.CompileFlags = NODE_AML_PACKAGE | NODE_IS_RESOURCE_DESC;
+ BufferOp->Asl.CompileFlags = OP_AML_PACKAGE | OP_IS_RESOURCE_DESC;
UtSetParseOpName (BufferOp);
BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
@@ -599,7 +599,7 @@
/* Change op into a buffer object */
- Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
+ Op->Asl.CompileFlags &= ~OP_COMPILE_TIME_CONST;
Op->Asl.ParseOpcode = PARSEOP_BUFFER;
UtSetParseOpName (Op);
@@ -757,7 +757,7 @@
*/
Op->Asl.Value.Integer = EisaId;
- Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
+ Op->Asl.CompileFlags &= ~OP_COMPILE_TIME_CONST;
Op->Asl.ParseOpcode = PARSEOP_INTEGER;
(void) OpcSetOptimalIntegerSize (Op);
@@ -809,12 +809,12 @@
/* Disable further optimization */
- Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
+ Op->Asl.CompileFlags &= ~OP_COMPILE_TIME_CONST;
UtSetParseOpName (Op);
/* Child node is the buffer length */
- NewOp = TrAllocateNode (PARSEOP_INTEGER);
+ NewOp = TrAllocateOp (PARSEOP_INTEGER);
NewOp->Asl.AmlOpcode = AML_BYTE_OP;
NewOp->Asl.Value.Integer = 16;
@@ -825,7 +825,7 @@
/* Peer to the child is the raw buffer data */
- NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
+ NewOp = TrAllocateOp (PARSEOP_RAW_DATA);
NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
NewOp->Asl.AmlLength = 16;
NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
Modified: trunk/sys/contrib/dev/acpica/compiler/aslopt.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslopt.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslopt.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -700,7 +700,7 @@
if (!(Flags & (AML_NAMED | AML_CREATE)))
{
- if (Op->Asl.CompileFlags & NODE_IS_NAME_DECLARATION)
+ if (Op->Asl.CompileFlags & OP_IS_NAME_DECLARATION)
{
/* We don't want to fuss with actual name declaration nodes here */
@@ -894,7 +894,7 @@
/* Name must appear as the last parameter */
NextOp = Op->Asl.Child;
- while (!(NextOp->Asl.CompileFlags & NODE_IS_NAME_DECLARATION))
+ while (!(NextOp->Asl.CompileFlags & OP_IS_NAME_DECLARATION))
{
NextOp = NextOp->Asl.Next;
}
Modified: trunk/sys/contrib/dev/acpica/compiler/asloptions.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/asloptions.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/asloptions.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -955,6 +955,22 @@
}
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);
Added: trunk/sys/contrib/dev/acpica/compiler/aslparseop.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslparseop.c (rev 0)
+++ trunk/sys/contrib/dev/acpica/compiler/aslparseop.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -0,0 +1,953 @@
+/******************************************************************************
+ *
+ * Module Name: aslparseop - Parse op create/allocate/cache interfaces
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************
+ *
+ * Alternatively, you may choose to be licensed under the terms of the
+ * following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Alternatively, you may choose to be licensed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ *****************************************************************************/
+
+#include <contrib/dev/acpica/compiler/aslcompiler.h>
+#include "aslcompiler.y.h"
+#include <contrib/dev/acpica/include/acapps.h>
+#include <contrib/dev/acpica/include/acconvert.h>
+
+#define _COMPONENT ACPI_COMPILER
+ ACPI_MODULE_NAME ("aslparseop")
+
+
+/* Local prototypes */
+
+static ACPI_PARSE_OBJECT *
+TrGetOpFromCache (
+ void);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrCreateOp
+ *
+ * PARAMETERS: ParseOpcode - Opcode to be assigned to the op
+ * NumChildren - Number of children to follow
+ * ... - A list of child ops to link to the new
+ * op. NumChildren long.
+ *
+ * RETURN: Pointer to the new op. Aborts on allocation failure
+ *
+ * DESCRIPTION: Create a new parse op and link together a list of child
+ * ops underneath the new op.
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrCreateOp (
+ UINT32 ParseOpcode,
+ UINT32 NumChildren,
+ ...)
+{
+ ACPI_PARSE_OBJECT *Op;
+ ACPI_PARSE_OBJECT *Child;
+ ACPI_PARSE_OBJECT *PrevChild;
+ va_list ap;
+ UINT32 i;
+ BOOLEAN FirstChild;
+
+
+ va_start (ap, NumChildren);
+
+ /* Allocate one new op */
+
+ Op = TrAllocateOp (ParseOpcode);
+
+ DbgPrint (ASL_PARSE_OUTPUT,
+ "\nCreateOp Ln/Col %u/%u NewParent %p Child %u Op %s ",
+ Op->Asl.LineNumber, Op->Asl.Column, Op,
+ NumChildren, UtGetOpName(ParseOpcode));
+
+ /* Some extra debug output based on the parse opcode */
+
+ switch (ParseOpcode)
+ {
+ case PARSEOP_ASL_CODE:
+
+ Gbl_ParseTreeRoot = Op;
+ Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
+ DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
+ break;
+
+ case PARSEOP_DEFINITION_BLOCK:
+
+ DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
+ break;
+
+ case PARSEOP_OPERATIONREGION:
+
+ DbgPrint (ASL_PARSE_OUTPUT, "OPREGION->");
+ break;
+
+ case PARSEOP_OR:
+
+ DbgPrint (ASL_PARSE_OUTPUT, "OR->");
+ break;
+
+ default:
+
+ /* Nothing to do for other opcodes */
+
+ break;
+ }
+
+ /* Link the new op to its children */
+
+ PrevChild = NULL;
+ FirstChild = TRUE;
+ for (i = 0; i < NumChildren; i++)
+ {
+ /* Get the next child */
+
+ Child = va_arg (ap, ACPI_PARSE_OBJECT *);
+ DbgPrint (ASL_PARSE_OUTPUT, "%p, ", Child);
+
+ /*
+ * If child is NULL, this means that an optional argument
+ * was omitted. We must create a placeholder with a special
+ * opcode (DEFAULT_ARG) so that the code generator will know
+ * that it must emit the correct default for this argument
+ */
+ if (!Child)
+ {
+ Child = TrAllocateOp (PARSEOP_DEFAULT_ARG);
+ }
+
+ /* Link first child to parent */
+
+ if (FirstChild)
+ {
+ FirstChild = FALSE;
+ Op->Asl.Child = Child;
+
+ /*
+ * For the ASL-/ASL+ converter: if the ParseOp is a Connection,
+ * External, Offset or AccessAs, it means that the comments in the
+ * FirstChild belongs to their parent due to the parsing order in
+ * the .y files. To correct this, take the comments in the
+ * FirstChild place it in the parent. This also means that
+ * legitimate comments for the child gets put to the parent.
+ */
+ if (Gbl_CaptureComments &&
+ ((ParseOpcode == PARSEOP_CONNECTION) ||
+ (ParseOpcode == PARSEOP_EXTERNAL) ||
+ (ParseOpcode == PARSEOP_OFFSET) ||
+ (ParseOpcode == PARSEOP_ACCESSAS)))
+ {
+ Op->Asl.CommentList = Child->Asl.CommentList;
+ Op->Asl.EndBlkComment = Child->Asl.EndBlkComment;
+ Op->Asl.InlineComment = Child->Asl.InlineComment;
+ Op->Asl.FileChanged = Child->Asl.FileChanged;
+
+ Child->Asl.CommentList = NULL;
+ Child->Asl.EndBlkComment = NULL;
+ Child->Asl.InlineComment = NULL;
+ Child->Asl.FileChanged = FALSE;
+
+ /*
+ * These do not need to be "passed off". They can be copied
+ * because the code for these opcodes should be printed in the
+ * same file.
+ */
+ Op->Asl.Filename = Child->Asl.Filename;
+ Op->Asl.ParentFilename = Child->Asl.ParentFilename;
+ }
+ }
+
+ /* Point all children to parent */
+
+ Child->Asl.Parent = Op;
+
+ /* Link children in a peer list */
+
+ if (PrevChild)
+ {
+ PrevChild->Asl.Next = Child;
+ };
+
+ /* Get the comment from last child in the resource template call */
+
+ if (Gbl_CaptureComments &&
+ (Op->Asl.ParseOpcode == PARSEOP_RESOURCETEMPLATE))
+ {
+ CvDbgPrint ("Transferred current comment list to this op.\n");
+ Op->Asl.CommentList = Child->Asl.CommentList;
+ Child->Asl.CommentList = NULL;
+
+ Op->Asl.InlineComment = Child->Asl.InlineComment;
+ Child->Asl.InlineComment = NULL;
+ }
+
+ /*
+ * This child might be a list, point all ops in the list
+ * to the same parent
+ */
+ while (Child->Asl.Next)
+ {
+ Child = Child->Asl.Next;
+ Child->Asl.Parent = Op;
+ }
+
+ PrevChild = Child;
+ }
+
+ va_end(ap);
+ DbgPrint (ASL_PARSE_OUTPUT, "\n");
+ return (Op);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrCreateLeafOp
+ *
+ * PARAMETERS: ParseOpcode - New opcode to be assigned to the op
+ *
+ * RETURN: Pointer to the new op. Aborts on allocation failure
+ *
+ * DESCRIPTION: Create a simple leaf op (no children or peers, and no value
+ * assigned to the op)
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrCreateLeafOp (
+ UINT32 ParseOpcode)
+{
+ ACPI_PARSE_OBJECT *Op;
+
+
+ Op = TrAllocateOp (ParseOpcode);
+
+ DbgPrint (ASL_PARSE_OUTPUT,
+ "\nCreateLeafOp Ln/Col %u/%u NewOp %p Op %s\n\n",
+ Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode));
+
+ return (Op);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrCreateValuedLeafOp
+ *
+ * PARAMETERS: ParseOpcode - New opcode to be assigned to the op
+ * Value - Value to be assigned to the op
+ *
+ * RETURN: Pointer to the new op. Aborts on allocation failure
+ *
+ * DESCRIPTION: Create a leaf op (no children or peers) with a value
+ * assigned to it
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrCreateValuedLeafOp (
+ UINT32 ParseOpcode,
+ UINT64 Value)
+{
+ ACPI_PARSE_OBJECT *Op;
+
+
+ Op = TrAllocateOp (ParseOpcode);
+ Op->Asl.Value.Integer = Value;
+
+ DbgPrint (ASL_PARSE_OUTPUT,
+ "\nCreateValuedLeafOp Ln/Col %u/%u NewOp %p "
+ "Op %s Value %8.8X%8.8X ",
+ Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode),
+ ACPI_FORMAT_UINT64 (Value));
+
+ switch (ParseOpcode)
+ {
+ case PARSEOP_STRING_LITERAL:
+
+ DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value);
+ break;
+
+ case PARSEOP_NAMESEG:
+
+ DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value);
+ break;
+
+ case PARSEOP_NAMESTRING:
+
+ DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value);
+ break;
+
+ case PARSEOP_EISAID:
+
+ DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value);
+ break;
+
+ case PARSEOP_METHOD:
+
+ DbgPrint (ASL_PARSE_OUTPUT, "METHOD");
+ break;
+
+ case PARSEOP_INTEGER:
+
+ DbgPrint (ASL_PARSE_OUTPUT, "INTEGER->%8.8X%8.8X",
+ ACPI_FORMAT_UINT64 (Value));
+ break;
+
+ default:
+ break;
+ }
+
+ DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
+ return (Op);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrCreateTargetOp
+ *
+ * PARAMETERS: OriginalOp - Op to be copied
+ *
+ * RETURN: Pointer to the new op. Aborts on allocation failure
+ *
+ * DESCRIPTION: Copy an existing op (and subtree). Used in ASL+ (C-style)
+ * expressions where the target is the same as one of the
+ * operands. A new op and subtree must be created from the
+ * original so that the parse tree can be linked properly.
+ *
+ * NOTE: This code is specific to target operands that are the last
+ * operand in an ASL/AML operator. Meaning that the top-level
+ * parse Op in a possible subtree has a NULL Next pointer.
+ * This simplifies the recursion.
+ *
+ * Subtree example:
+ * DeRefOf (Local1) += 32
+ *
+ * This gets converted to:
+ * Add (DeRefOf (Local1), 32, DeRefOf (Local1))
+ *
+ * Each DeRefOf has a single child, Local1. Even more complex
+ * subtrees can be created via the Index and DeRefOf operators.
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrCreateTargetOp (
+ ACPI_PARSE_OBJECT *OriginalOp,
+ ACPI_PARSE_OBJECT *ParentOp)
+{
+ ACPI_PARSE_OBJECT *Op;
+
+
+ if (!OriginalOp)
+ {
+ return (NULL);
+ }
+
+ Op = TrGetOpFromCache ();
+
+ /* Copy the pertinent values (omit link pointer fields) */
+
+ Op->Asl.Value = OriginalOp->Asl.Value;
+ Op->Asl.Filename = OriginalOp->Asl.Filename;
+ Op->Asl.LineNumber = OriginalOp->Asl.LineNumber;
+ Op->Asl.LogicalLineNumber = OriginalOp->Asl.LogicalLineNumber;
+ Op->Asl.LogicalByteOffset = OriginalOp->Asl.LogicalByteOffset;
+ Op->Asl.Column = OriginalOp->Asl.Column;
+ Op->Asl.Flags = OriginalOp->Asl.Flags;
+ Op->Asl.CompileFlags = OriginalOp->Asl.CompileFlags;
+ Op->Asl.AmlOpcode = OriginalOp->Asl.AmlOpcode;
+ Op->Asl.ParseOpcode = OriginalOp->Asl.ParseOpcode;
+ Op->Asl.Parent = ParentOp;
+
+ UtSetParseOpName (Op);
+
+ /* Copy a possible subtree below this op */
+
+ if (OriginalOp->Asl.Child)
+ {
+ Op->Asl.Child = TrCreateTargetOp (OriginalOp->Asl.Child, Op);
+ }
+
+ if (OriginalOp->Asl.Next) /* Null for top-level op */
+ {
+ Op->Asl.Next = TrCreateTargetOp (OriginalOp->Asl.Next, ParentOp);
+ }
+
+ return (Op);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrCreateAssignmentOp
+ *
+ * PARAMETERS: Target - Assignment target
+ * Source - Assignment source
+ *
+ * RETURN: Pointer to the new op. Aborts on allocation failure
+ *
+ * DESCRIPTION: Implements the C-style '=' operator. It changes the parse
+ * tree if possible to utilize the last argument of the math
+ * operators which is a target operand -- thus saving invocation
+ * of and additional Store() operator. An optimization.
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrCreateAssignmentOp (
+ ACPI_PARSE_OBJECT *Target,
+ ACPI_PARSE_OBJECT *Source)
+{
+ ACPI_PARSE_OBJECT *TargetOp;
+ ACPI_PARSE_OBJECT *SourceOp1;
+ ACPI_PARSE_OBJECT *SourceOp2;
+ ACPI_PARSE_OBJECT *Operator;
+
+
+ DbgPrint (ASL_PARSE_OUTPUT,
+ "\nTrCreateAssignmentOp Line [%u to %u] Source %s Target %s\n",
+ Source->Asl.LineNumber, Source->Asl.EndLine,
+ UtGetOpName (Source->Asl.ParseOpcode),
+ UtGetOpName (Target->Asl.ParseOpcode));
+
+ TrSetOpFlags (Target, OP_IS_TARGET);
+
+ switch (Source->Asl.ParseOpcode)
+ {
+ /*
+ * Only these operators can be optimized because they have
+ * a target operand
+ */
+ case PARSEOP_ADD:
+ case PARSEOP_AND:
+ case PARSEOP_DIVIDE:
+ case PARSEOP_INDEX:
+ case PARSEOP_MOD:
+ case PARSEOP_MULTIPLY:
+ case PARSEOP_NOT:
+ case PARSEOP_OR:
+ case PARSEOP_SHIFTLEFT:
+ case PARSEOP_SHIFTRIGHT:
+ case PARSEOP_SUBTRACT:
+ case PARSEOP_XOR:
+
+ break;
+
+ /* Otherwise, just create a normal Store operator */
+
+ default:
+ goto CannotOptimize;
+ }
+
+ /*
+ * Transform the parse tree such that the target is moved to the
+ * last operand of the operator
+ */
+ SourceOp1 = Source->Asl.Child;
+ SourceOp2 = SourceOp1->Asl.Next;
+
+ /* NOT only has one operand, but has a target */
+
+ if (Source->Asl.ParseOpcode == PARSEOP_NOT)
+ {
+ SourceOp2 = SourceOp1;
+ }
+
+ /* DIVIDE has an extra target operand (remainder) */
+
+ if (Source->Asl.ParseOpcode == PARSEOP_DIVIDE)
+ {
+ SourceOp2 = SourceOp2->Asl.Next;
+ }
+
+ TargetOp = SourceOp2->Asl.Next;
+
+ /*
+ * Can't perform this optimization if there already is a target
+ * for the operator (ZERO is a "no target" placeholder).
+ */
+ if (TargetOp->Asl.ParseOpcode != PARSEOP_ZERO)
+ {
+ goto CannotOptimize;
+ }
+
+ /* Link in the target as the final operand */
+
+ SourceOp2->Asl.Next = Target;
+ Target->Asl.Parent = Source;
+ return (Source);
+
+
+CannotOptimize:
+
+ Operator = TrAllocateOp (PARSEOP_STORE);
+ TrLinkOpChildren (Operator, 2, Source, Target);
+
+ /* Set the appropriate line numbers for the new op */
+
+ Operator->Asl.LineNumber = Target->Asl.LineNumber;
+ Operator->Asl.LogicalLineNumber = Target->Asl.LogicalLineNumber;
+ Operator->Asl.LogicalByteOffset = Target->Asl.LogicalByteOffset;
+ Operator->Asl.Column = Target->Asl.Column;
+
+ return (Operator);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrCreateNullTargetOp
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: Pointer to the new op. Aborts on allocation failure
+ *
+ * DESCRIPTION: Create a "null" target op. This is defined by the ACPI
+ * specification to be a zero AML opcode, and indicates that
+ * no target has been specified for the parent operation
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrCreateNullTargetOp (
+ void)
+{
+ ACPI_PARSE_OBJECT *Op;
+
+
+ Op = TrAllocateOp (PARSEOP_ZERO);
+ Op->Asl.CompileFlags |= (OP_IS_TARGET | OP_COMPILE_TIME_CONST);
+
+ DbgPrint (ASL_PARSE_OUTPUT,
+ "\nCreateNullTargetOp Ln/Col %u/%u NewOp %p Op %s\n",
+ Op->Asl.LineNumber, Op->Asl.Column, Op,
+ UtGetOpName (Op->Asl.ParseOpcode));
+
+ return (Op);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrCreateConstantLeafOp
+ *
+ * PARAMETERS: ParseOpcode - The constant opcode
+ *
+ * RETURN: Pointer to the new op. Aborts on allocation failure
+ *
+ * DESCRIPTION: Create a leaf op (no children or peers) for one of the
+ * special constants - __LINE__, __FILE__, and __DATE__.
+ *
+ * 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.
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrCreateConstantLeafOp (
+ UINT32 ParseOpcode)
+{
+ ACPI_PARSE_OBJECT *Op = NULL;
+ time_t CurrentTime;
+ char *StaticTimeString;
+ char *TimeString;
+ char *Filename;
+
+
+ switch (ParseOpcode)
+ {
+ case PARSEOP___LINE__:
+
+ 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__:
+
+ Op = TrAllocateOp (PARSEOP_STRING_LITERAL);
+
+ /* Op.Asl.Filename contains the full pathname to the file */
+
+ Op->Asl.Value.String = Op->Asl.Filename;
+ break;
+
+ case PARSEOP___FILE__:
+
+ Op = TrAllocateOp (PARSEOP_STRING_LITERAL);
+
+ /* Get the simple filename from the full path */
+
+ FlSplitInputPathname (Op->Asl.Filename, NULL, &Filename);
+ Op->Asl.Value.String = Filename;
+ break;
+
+ case PARSEOP___DATE__:
+
+ Op = TrAllocateOp (PARSEOP_STRING_LITERAL);
+
+ /* Get a copy of the current time */
+
+ CurrentTime = time (NULL);
+ StaticTimeString = ctime (&CurrentTime);
+ TimeString = UtLocalCalloc (strlen (StaticTimeString) + 1);
+ strcpy (TimeString, StaticTimeString);
+
+ TimeString[strlen(TimeString) -1] = 0; /* Remove trailing newline */
+ Op->Asl.Value.String = TimeString;
+ break;
+
+ default: /* This would be an internal error */
+
+ return (NULL);
+ }
+
+ DbgPrint (ASL_PARSE_OUTPUT,
+ "\nCreateConstantLeafOp Ln/Col %u/%u NewOp %p "
+ "Op %s Value %8.8X%8.8X \n",
+ Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode),
+ ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
+
+ return (Op);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrAllocateOp
+ *
+ * PARAMETERS: ParseOpcode - Opcode to be assigned to the op
+ *
+ * RETURN: New parse op. Aborts on allocation failure
+ *
+ * DESCRIPTION: Allocate and initialize a new parse op for the parse tree
+ *
+ ******************************************************************************/
+
+ACPI_PARSE_OBJECT *
+TrAllocateOp (
+ UINT32 ParseOpcode)
+{
+ ACPI_PARSE_OBJECT *Op;
+ ACPI_PARSE_OBJECT *LatestOp;
+
+
+ Op = TrGetOpFromCache ();
+
+ Op->Asl.ParseOpcode = (UINT16) ParseOpcode;
+ Op->Asl.Filename = Gbl_Files[ASL_FILE_INPUT].Filename;
+ Op->Asl.LineNumber = Gbl_CurrentLineNumber;
+ Op->Asl.LogicalLineNumber = Gbl_LogicalLineNumber;
+ Op->Asl.LogicalByteOffset = Gbl_CurrentLineOffset;
+ Op->Asl.Column = Gbl_CurrentColumn;
+
+ UtSetParseOpName (Op);
+
+ /* The following is for capturing comments */
+
+ if(Gbl_CaptureComments)
+ {
+ LatestOp = Gbl_CommentState.LatestParseOp;
+ Op->Asl.InlineComment = NULL;
+ Op->Asl.EndNodeComment = NULL;
+ Op->Asl.CommentList = NULL;
+ Op->Asl.FileChanged = FALSE;
+
+ /*
+ * Check to see if the file name has changed before resetting the
+ * latest parse op.
+ */
+ if (LatestOp &&
+ (ParseOpcode != PARSEOP_INCLUDE) &&
+ (ParseOpcode != PARSEOP_INCLUDE_END) &&
+ strcmp (LatestOp->Asl.Filename, Op->Asl.Filename))
+ {
+ CvDbgPrint ("latest op: %s\n", LatestOp->Asl.ParseOpName);
+ Op->Asl.FileChanged = TRUE;
+ if (Gbl_IncludeFileStack)
+ {
+ Op->Asl.ParentFilename = Gbl_IncludeFileStack->Filename;
+ }
+ else
+ {
+ Op->Asl.ParentFilename = NULL;
+ }
+ }
+
+ Gbl_CommentState.LatestParseOp = Op;
+ CvDbgPrint ("TrAllocateOp=Set latest parse op to this op.\n");
+ CvDbgPrint (" Op->Asl.ParseOpName = %s\n",
+ Gbl_CommentState.LatestParseOp->Asl.ParseOpName);
+ CvDbgPrint (" Op->Asl.ParseOpcode = 0x%x\n", ParseOpcode);
+
+ if (Op->Asl.FileChanged)
+ {
+ CvDbgPrint(" file has been changed!\n");
+ }
+
+ /*
+ * if this parse op's syntax uses () and {} (i.e. Package(1){0x00}) then
+ * set a flag in the comment state. This facilitates paring comments for
+ * these types of opcodes.
+ */
+ if ((CvParseOpBlockType(Op) == (BLOCK_PAREN | BLOCK_BRACE)) &&
+ (ParseOpcode != PARSEOP_DEFINITION_BLOCK))
+ {
+ CvDbgPrint ("Parsing paren/Brace op now!\n");
+ Gbl_CommentState.ParsingParenBraceNode = Op;
+ }
+
+ if (Gbl_CommentListHead)
+ {
+ CvDbgPrint ("Transferring...\n");
+ Op->Asl.CommentList = Gbl_CommentListHead;
+ Gbl_CommentListHead = NULL;
+ Gbl_CommentListTail = NULL;
+ CvDbgPrint (" Transferred current comment list to this op.\n");
+ CvDbgPrint (" %s\n", Op->Asl.CommentList->Comment);
+ }
+
+ if (Gbl_InlineCommentBuffer)
+ {
+ Op->Asl.InlineComment = Gbl_InlineCommentBuffer;
+ Gbl_InlineCommentBuffer = NULL;
+ CvDbgPrint ("Transferred current inline comment list to this op.\n");
+ }
+ }
+
+ return (Op);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrGetOpFromCache
+ *
+ * PARAMETERS: None
+ *
+ * RETURN: New parse op. Aborts on allocation failure
+ *
+ * DESCRIPTION: Allocate a new parse op for the parse tree. Bypass the local
+ * dynamic memory manager for performance reasons (This has a
+ * major impact on the speed of the compiler.)
+ *
+ ******************************************************************************/
+
+static ACPI_PARSE_OBJECT *
+TrGetOpFromCache (
+ void)
+{
+ ASL_CACHE_INFO *Cache;
+
+
+ if (Gbl_ParseOpCacheNext >= Gbl_ParseOpCacheLast)
+ {
+ /* Allocate a new buffer */
+
+ Cache = UtLocalCalloc (sizeof (Cache->Next) +
+ (sizeof (ACPI_PARSE_OBJECT) * ASL_PARSEOP_CACHE_SIZE));
+
+ /* Link new cache buffer to head of list */
+
+ Cache->Next = Gbl_ParseOpCacheList;
+ Gbl_ParseOpCacheList = Cache;
+
+ /* Setup cache management pointers */
+
+ Gbl_ParseOpCacheNext = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Cache->Buffer);
+ Gbl_ParseOpCacheLast = Gbl_ParseOpCacheNext + ASL_PARSEOP_CACHE_SIZE;
+ }
+
+ Gbl_ParseOpCount++;
+ return (Gbl_ParseOpCacheNext++);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: TrPrintOpFlags
+ *
+ * PARAMETERS: Flags - Flags word to be decoded
+ * OutputLevel - Debug output level: ASL_TREE_OUTPUT etc.
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Decode a flags word to text. Displays all flags that are set.
+ *
+ ******************************************************************************/
+
+void
+TrPrintOpFlags (
+ UINT32 Flags,
+ UINT32 OutputLevel)
+{
+ UINT32 FlagBit = 1;
+ UINT32 i;
+
+
+ for (i = 0; i < ACPI_NUM_OP_FLAGS; i++)
+ {
+ if (Flags & FlagBit)
+ {
+ DbgPrint (OutputLevel, " %s", Gbl_OpFlagNames[i]);
+ }
+
+ FlagBit <<= 1;
+ }
+}
Property changes on: trunk/sys/contrib/dev/acpica/compiler/aslparseop.c
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/sys/contrib/dev/acpica/compiler/aslpld.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslpld.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslpld.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -683,12 +683,12 @@
/* Disable further optimization */
- Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
+ Op->Asl.CompileFlags &= ~OP_COMPILE_TIME_CONST;
UtSetParseOpName (Op);
/* Child node is the buffer length */
- NewOp = TrAllocateNode (PARSEOP_INTEGER);
+ NewOp = TrAllocateOp (PARSEOP_INTEGER);
NewOp->Asl.AmlOpcode = AML_BYTE_OP;
NewOp->Asl.Value.Integer = 20;
@@ -699,7 +699,7 @@
/* Peer to the child is the raw buffer data */
- NewOp = TrAllocateNode (PARSEOP_RAW_DATA);
+ NewOp = TrAllocateOp (PARSEOP_RAW_DATA);
NewOp->Asl.AmlOpcode = AML_RAW_DATA_BUFFER;
NewOp->Asl.AmlLength = 20;
NewOp->Asl.Value.String = ACPI_CAST_PTR (char, Buffer);
Modified: trunk/sys/contrib/dev/acpica/compiler/aslpredef.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslpredef.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslpredef.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -667,7 +667,7 @@
{
/* Ignore if actually emitted by the compiler */
- if (Op->Asl.CompileFlags & NODE_COMPILER_EMITTED)
+ if (Op->Asl.CompileFlags & OP_COMPILER_EMITTED)
{
return (ACPI_NOT_RESERVED_NAME);
}
Modified: trunk/sys/contrib/dev/acpica/compiler/aslprimaries.y
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslprimaries.y 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslprimaries.y 2018-10-21 17:19:58 UTC (rev 12112)
@@ -166,7 +166,7 @@
PARSEOP_OPEN_PAREN
AccessTypeKeyword
OptionalAccessAttribTerm
- PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_ACCESSAS,2,$3,$4);}
| PARSEOP_ACCESSAS
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -174,10 +174,10 @@
AcquireTerm
: PARSEOP_ACQUIRE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ACQUIRE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp(PARSEOP_ACQUIRE);}
SuperName
',' WordConstExpr
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$6);}
| PARSEOP_ACQUIRE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -185,11 +185,11 @@
AddTerm
: PARSEOP_ADD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ADD);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_ADD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -197,11 +197,11 @@
AliasTerm
: PARSEOP_ALIAS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ALIAS);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ALIAS);}
NameString
NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,
- TrSetNodeFlags ($5, NODE_IS_NAME_DECLARATION));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,
+ TrSetOpFlags ($5, OP_IS_NAME_DECLARATION));}
| PARSEOP_ALIAS
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -209,11 +209,11 @@
AndTerm
: PARSEOP_AND
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_AND);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_AND
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -220,18 +220,18 @@
;
ArgTerm
- : PARSEOP_ARG0 {$$ = TrCreateLeafNode (PARSEOP_ARG0);}
- | PARSEOP_ARG1 {$$ = TrCreateLeafNode (PARSEOP_ARG1);}
- | PARSEOP_ARG2 {$$ = TrCreateLeafNode (PARSEOP_ARG2);}
- | PARSEOP_ARG3 {$$ = TrCreateLeafNode (PARSEOP_ARG3);}
- | PARSEOP_ARG4 {$$ = TrCreateLeafNode (PARSEOP_ARG4);}
- | PARSEOP_ARG5 {$$ = TrCreateLeafNode (PARSEOP_ARG5);}
- | PARSEOP_ARG6 {$$ = TrCreateLeafNode (PARSEOP_ARG6);}
+ : PARSEOP_ARG0 {$$ = TrCreateLeafOp (PARSEOP_ARG0);}
+ | PARSEOP_ARG1 {$$ = TrCreateLeafOp (PARSEOP_ARG1);}
+ | PARSEOP_ARG2 {$$ = TrCreateLeafOp (PARSEOP_ARG2);}
+ | PARSEOP_ARG3 {$$ = TrCreateLeafOp (PARSEOP_ARG3);}
+ | PARSEOP_ARG4 {$$ = TrCreateLeafOp (PARSEOP_ARG4);}
+ | PARSEOP_ARG5 {$$ = TrCreateLeafOp (PARSEOP_ARG5);}
+ | PARSEOP_ARG6 {$$ = TrCreateLeafOp (PARSEOP_ARG6);}
;
BankFieldTerm
: PARSEOP_BANKFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_BANKFIELD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_BANKFIELD);}
NameString
NameStringItem
TermArgItem
@@ -239,7 +239,7 @@
',' LockRuleKeyword
',' UpdateRuleKeyword
PARSEOP_CLOSE_PAREN '{'
- FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,7,
+ FieldUnitList '}' {$$ = TrLinkOpChildren ($<n>3,7,
$4,$5,$6,$8,$10,$12,$15);}
| PARSEOP_BANKFIELD
PARSEOP_OPEN_PAREN
@@ -248,17 +248,17 @@
;
BreakTerm
- : PARSEOP_BREAK {$$ = TrCreateNode (PARSEOP_BREAK, 0);}
+ : PARSEOP_BREAK {$$ = TrCreateOp (PARSEOP_BREAK, 0);}
;
BreakPointTerm
- : PARSEOP_BREAKPOINT {$$ = TrCreateNode (PARSEOP_BREAKPOINT, 0);}
+ : PARSEOP_BREAKPOINT {$$ = TrCreateOp (PARSEOP_BREAKPOINT, 0);}
;
BufferTerm
- : PARSEOP_BUFFER {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER); COMMENT_CAPTURE_OFF; }
+ : PARSEOP_BUFFER {$<n>$ = TrCreateLeafOp (PARSEOP_BUFFER); COMMENT_CAPTURE_OFF; }
OptionalDataCount
- '{' BufferTermData '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5); COMMENT_CAPTURE_ON;}
+ '{' BufferTermData '}' {$$ = TrLinkOpChildren ($<n>2,2,$3,$5); COMMENT_CAPTURE_ON;}
;
BufferTermData
@@ -268,10 +268,10 @@
CaseTerm
: PARSEOP_CASE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CASE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CASE);}
DataObject
PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
| PARSEOP_CASE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -279,11 +279,11 @@
ConcatTerm
: PARSEOP_CONCATENATE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CONCATENATE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CONCATENATE);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_CONCATENATE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -291,12 +291,12 @@
ConcatResTerm
: PARSEOP_CONCATENATERESTEMPLATE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (
PARSEOP_CONCATENATERESTEMPLATE);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_CONCATENATERESTEMPLATE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -304,10 +304,10 @@
CondRefOfTerm
: PARSEOP_CONDREFOF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CONDREFOF);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CONDREFOF);}
CondRefOfSource
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_CONDREFOF
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -317,15 +317,15 @@
: PARSEOP_CONNECTION
PARSEOP_OPEN_PAREN
NameString
- PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_CONNECTION,1,$3);}
+ PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_CONNECTION,1,$3);}
| PARSEOP_CONNECTION
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CONNECTION);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CONNECTION);}
ResourceMacroTerm
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3, 1,
- TrLinkChildren (
- TrCreateLeafNode (PARSEOP_RESOURCETEMPLATE), 3,
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3, 1,
+ TrLinkOpChildren (
+ TrCreateLeafOp (PARSEOP_RESOURCETEMPLATE), 3,
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
$4));}
| PARSEOP_CONNECTION
PARSEOP_OPEN_PAREN
@@ -333,16 +333,16 @@
;
ContinueTerm
- : PARSEOP_CONTINUE {$$ = TrCreateNode (PARSEOP_CONTINUE, 0);}
+ : PARSEOP_CONTINUE {$$ = TrCreateOp (PARSEOP_CONTINUE, 0);}
;
CopyObjectTerm
: PARSEOP_COPYOBJECT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_COPYOBJECT);}
TermArg
',' SimpleName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,
- TrSetNodeFlags ($6, NODE_IS_TARGET));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,
+ TrSetOpFlags ($6, OP_IS_TARGET));}
| PARSEOP_COPYOBJECT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -350,12 +350,12 @@
CreateBitFieldTerm
: PARSEOP_CREATEBITFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEBITFIELD);}
TermArg
TermArgItem
NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,
- TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
+ TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
| PARSEOP_CREATEBITFIELD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -363,12 +363,12 @@
CreateByteFieldTerm
: PARSEOP_CREATEBYTEFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEBYTEFIELD);}
TermArg
TermArgItem
NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,
- TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
+ TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
| PARSEOP_CREATEBYTEFIELD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -376,12 +376,12 @@
CreateDWordFieldTerm
: PARSEOP_CREATEDWORDFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEDWORDFIELD);}
TermArg
TermArgItem
NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,
- TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
+ TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
| PARSEOP_CREATEDWORDFIELD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -389,13 +389,13 @@
CreateFieldTerm
: PARSEOP_CREATEFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEFIELD);}
TermArg
TermArgItem
TermArgItem
NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,
- TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,
+ TrSetOpFlags ($7, OP_IS_NAME_DECLARATION));}
| PARSEOP_CREATEFIELD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -403,12 +403,12 @@
CreateQWordFieldTerm
: PARSEOP_CREATEQWORDFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEQWORDFIELD);}
TermArg
TermArgItem
NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,
- TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
+ TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
| PARSEOP_CREATEQWORDFIELD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -416,12 +416,12 @@
CreateWordFieldTerm
: PARSEOP_CREATEWORDFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEWORDFIELD);}
TermArg
TermArgItem
NameStringItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,
- TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
+ TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
| PARSEOP_CREATEWORDFIELD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -429,13 +429,13 @@
DataRegionTerm
: PARSEOP_DATATABLEREGION
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DATATABLEREGION);}
NameString
TermArgItem
TermArgItem
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$6,$7);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$5,$6,$7);}
| PARSEOP_DATATABLEREGION
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -442,14 +442,14 @@
;
DebugTerm
- : PARSEOP_DEBUG {$$ = TrCreateLeafNode (PARSEOP_DEBUG);}
+ : PARSEOP_DEBUG {$$ = TrCreateLeafOp (PARSEOP_DEBUG);}
;
DecTerm
: PARSEOP_DECREMENT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DECREMENT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DECREMENT);}
SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_DECREMENT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -456,8 +456,8 @@
;
DefaultTerm
- : PARSEOP_DEFAULT '{' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFAULT);}
- TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ : PARSEOP_DEFAULT '{' {$<n>$ = TrCreateLeafOp (PARSEOP_DEFAULT);}
+ TermList '}' {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_DEFAULT '{'
error '}' {$$ = AslDoError(); yyclearin;}
;
@@ -464,9 +464,9 @@
DerefOfTerm
: PARSEOP_DEREFOF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DEREFOF);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DEREFOF);}
DerefOfSource
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_DEREFOF
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -474,11 +474,11 @@
DeviceTerm
: PARSEOP_DEVICE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DEVICE);}
NameString
PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
+ TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
| PARSEOP_DEVICE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -486,12 +486,12 @@
DivideTerm
: PARSEOP_DIVIDE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DIVIDE);}
TermArg
TermArgItem
Target
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,$7);}
| PARSEOP_DIVIDE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -501,7 +501,7 @@
: PARSEOP_EISAID
PARSEOP_OPEN_PAREN
StringData
- PARSEOP_CLOSE_PAREN {$$ = TrUpdateNode (PARSEOP_EISAID, $3);}
+ PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_EISAID, $3);}
| PARSEOP_EISAID
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -508,14 +508,14 @@
;
ElseIfTerm
- : IfTerm ElseTerm {$$ = TrLinkPeerNode ($1,$2);}
+ : IfTerm ElseTerm {$$ = TrLinkPeerOp ($1,$2);}
;
ElseTerm
: {$$ = NULL;}
| PARSEOP_ELSE '{'
- TermList {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
- '}' {$$ = TrLinkChildren ($<n>4,1,$3);}
+ TermList {$<n>$ = TrCreateLeafOp (PARSEOP_ELSE);}
+ '}' {$$ = TrLinkOpChildren ($<n>4,1,$3);}
| PARSEOP_ELSE '{'
error '}' {$$ = AslDoError(); yyclearin;}
@@ -524,12 +524,12 @@
error {$$ = AslDoError(); yyclearin;}
| PARSEOP_ELSEIF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
- TermArg {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_ELSE);}
+ TermArg {$<n>$ = TrCreateLeafOp (PARSEOP_IF);}
PARSEOP_CLOSE_PAREN '{'
- TermList '}' {TrLinkChildren ($<n>5,2,$4,$8);}
- ElseTerm {TrLinkPeerNode ($<n>5,$11);}
- {$$ = TrLinkChildren ($<n>3,1,$<n>5);}
+ TermList '}' {TrLinkOpChildren ($<n>5,2,$4,$8);}
+ ElseTerm {TrLinkPeerOp ($<n>5,$11);}
+ {$$ = TrLinkOpChildren ($<n>3,1,$<n>5);}
| PARSEOP_ELSEIF
PARSEOP_OPEN_PAREN
@@ -541,10 +541,10 @@
EventTerm
: PARSEOP_EVENT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_EVENT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EVENT);}
NameString
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION));}
| PARSEOP_EVENT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -557,7 +557,7 @@
OptionalObjectTypeKeyword
OptionalParameterTypePackage
OptionalParameterTypesPackage
- PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);}
| PARSEOP_EXTERNAL
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -565,11 +565,11 @@
FatalTerm
: PARSEOP_FATAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FATAL);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FATAL);}
ByteConstExpr
',' DWordConstExpr
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
| PARSEOP_FATAL
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -577,13 +577,13 @@
FieldTerm
: PARSEOP_FIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FIELD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIELD);}
NameString
',' AccessTypeKeyword
',' LockRuleKeyword
',' UpdateRuleKeyword
PARSEOP_CLOSE_PAREN '{'
- FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$8,$10,$13);}
+ FieldUnitList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$6,$8,$10,$13);}
| PARSEOP_FIELD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN
@@ -592,10 +592,10 @@
FindSetLeftBitTerm
: PARSEOP_FINDSETLEFTBIT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETLEFTBIT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FINDSETLEFTBIT);}
TermArg
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_FINDSETLEFTBIT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -603,10 +603,10 @@
FindSetRightBitTerm
: PARSEOP_FINDSETRIGHTBIT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETRIGHTBIT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FINDSETRIGHTBIT);}
TermArg
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_FINDSETRIGHTBIT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -615,29 +615,29 @@
/* Convert a For() loop to a While() loop */
ForTerm
: PARSEOP_FOR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WHILE);}
OptionalTermArg ',' {}
OptionalPredicate ','
- OptionalTermArg {$<n>$ = TrLinkPeerNode ($4,$<n>3);
- TrSetParent ($9,$<n>3);} /* New parent is WHILE */
+ OptionalTermArg {$<n>$ = TrLinkPeerOp ($4,$<n>3);
+ TrSetOpParent ($9,$<n>3);} /* New parent is WHILE */
PARSEOP_CLOSE_PAREN
- '{' TermList '}' {$<n>$ = TrLinkChildren ($<n>3,2,$7,$13);}
- {$<n>$ = TrLinkPeerNode ($13,$9);
+ '{' TermList '}' {$<n>$ = TrLinkOpChildren ($<n>3,2,$7,$13);}
+ {$<n>$ = TrLinkPeerOp ($13,$9);
$$ = $<n>10;}
;
OptionalPredicate
- : {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, 1);}
+ : {$$ = TrCreateValuedLeafOp (PARSEOP_INTEGER, 1);}
| TermArg {$$ = $1;}
;
FprintfTerm
: PARSEOP_FPRINTF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FPRINTF);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FPRINTF);}
TermArg ','
StringData
PrintfArgList
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
| PARSEOP_FPRINTF
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -645,10 +645,10 @@
FromBCDTerm
: PARSEOP_FROMBCD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FROMBCD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FROMBCD);}
TermArg
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_FROMBCD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -656,16 +656,16 @@
FunctionTerm
: PARSEOP_FUNCTION
- PARSEOP_OPEN_PAREN {COMMENT_CAPTURE_OFF; $<n>$ = TrCreateLeafNode (PARSEOP_METHOD); }
+ PARSEOP_OPEN_PAREN {COMMENT_CAPTURE_OFF; $<n>$ = TrCreateLeafOp (PARSEOP_METHOD); }
NameString
OptionalParameterTypePackage
OptionalParameterTypesPackage
PARSEOP_CLOSE_PAREN '{' {COMMENT_CAPTURE_ON; }
- TermList '}' {$$ = TrLinkChildren ($<n>3,7,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
- TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0),
- TrCreateLeafNode (PARSEOP_SERIALIZERULE_NOTSERIAL),
- TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0),$5,$6,$10);}
+ TermList '}' {$$ = TrLinkOpChildren ($<n>3,7,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
+ TrCreateValuedLeafOp (PARSEOP_BYTECONST, 0),
+ TrCreateLeafOp (PARSEOP_SERIALIZERULE_NOTSERIAL),
+ TrCreateValuedLeafOp (PARSEOP_BYTECONST, 0),$5,$6,$10);}
| PARSEOP_FUNCTION
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -673,10 +673,10 @@
IfTerm
: PARSEOP_IF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IF);}
TermArg
PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
| PARSEOP_IF
PARSEOP_OPEN_PAREN
@@ -687,20 +687,20 @@
: PARSEOP_INCLUDE
PARSEOP_OPEN_PAREN
String
- PARSEOP_CLOSE_PAREN {$$ = TrUpdateNode (PARSEOP_INCLUDE, $3);
+ PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_INCLUDE, $3);
FlOpenIncludeFile ($3);}
;
IncludeEndTerm
- : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafNode (PARSEOP_INCLUDE_END);
- TrSetCurrentFilename ($$);}
+ : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafOp (PARSEOP_INCLUDE_END);
+ TrSetOpCurrentFilename ($$);}
;
IncTerm
: PARSEOP_INCREMENT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INCREMENT);}
SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_INCREMENT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -708,7 +708,7 @@
IndexFieldTerm
: PARSEOP_INDEXFIELD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_INDEXFIELD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INDEXFIELD);}
NameString
NameStringItem
',' AccessTypeKeyword
@@ -715,7 +715,7 @@
',' LockRuleKeyword
',' UpdateRuleKeyword
PARSEOP_CLOSE_PAREN '{'
- FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$7,$9,$11,$14);}
+ FieldUnitList '}' {$$ = TrLinkOpChildren ($<n>3,6,$4,$5,$7,$9,$11,$14);}
| PARSEOP_INDEXFIELD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN
@@ -724,11 +724,11 @@
IndexTerm
: PARSEOP_INDEX
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_INDEX);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INDEX);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_INDEX
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -736,10 +736,10 @@
LAndTerm
: PARSEOP_LAND
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LAND);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LAND);}
TermArg
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_LAND
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -747,10 +747,10 @@
LEqualTerm
: PARSEOP_LEQUAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
TermArg
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_LEQUAL
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -758,11 +758,11 @@
LGreaterEqualTerm
: PARSEOP_LGREATEREQUAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
TermArg
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_LNOT, 1,
- TrLinkChildren ($<n>3,2,$4,$5));}
+ PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_LNOT, 1,
+ TrLinkOpChildren ($<n>3,2,$4,$5));}
| PARSEOP_LGREATEREQUAL
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -770,10 +770,10 @@
LGreaterTerm
: PARSEOP_LGREATER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
TermArg
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_LGREATER
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -781,11 +781,11 @@
LLessEqualTerm
: PARSEOP_LLESSEQUAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
TermArg
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_LNOT, 1,
- TrLinkChildren ($<n>3,2,$4,$5));}
+ PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_LNOT, 1,
+ TrLinkOpChildren ($<n>3,2,$4,$5));}
| PARSEOP_LLESSEQUAL
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -793,10 +793,10 @@
LLessTerm
: PARSEOP_LLESS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
TermArg
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_LLESS
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -804,11 +804,11 @@
LNotEqualTerm
: PARSEOP_LNOTEQUAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
TermArg
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_LNOT, 1,
- TrLinkChildren ($<n>3,2,$4,$5));}
+ PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_LNOT, 1,
+ TrLinkOpChildren ($<n>3,2,$4,$5));}
| PARSEOP_LNOTEQUAL
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -816,9 +816,9 @@
LNotTerm
: PARSEOP_LNOT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LNOT);}
TermArg
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_LNOT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -826,7 +826,7 @@
LoadTableTerm
: PARSEOP_LOADTABLE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LOADTABLE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LOADTABLE);}
TermArg
TermArgItem
TermArgItem
@@ -833,7 +833,7 @@
OptionalListString
OptionalListString
OptionalReference
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);}
| PARSEOP_LOADTABLE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -841,10 +841,10 @@
LoadTerm
: PARSEOP_LOAD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LOAD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LOAD);}
NameString
RequiredTarget
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_LOAD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -851,22 +851,22 @@
;
LocalTerm
- : PARSEOP_LOCAL0 {$$ = TrCreateLeafNode (PARSEOP_LOCAL0);}
- | PARSEOP_LOCAL1 {$$ = TrCreateLeafNode (PARSEOP_LOCAL1);}
- | PARSEOP_LOCAL2 {$$ = TrCreateLeafNode (PARSEOP_LOCAL2);}
- | PARSEOP_LOCAL3 {$$ = TrCreateLeafNode (PARSEOP_LOCAL3);}
- | PARSEOP_LOCAL4 {$$ = TrCreateLeafNode (PARSEOP_LOCAL4);}
- | PARSEOP_LOCAL5 {$$ = TrCreateLeafNode (PARSEOP_LOCAL5);}
- | PARSEOP_LOCAL6 {$$ = TrCreateLeafNode (PARSEOP_LOCAL6);}
- | PARSEOP_LOCAL7 {$$ = TrCreateLeafNode (PARSEOP_LOCAL7);}
+ : PARSEOP_LOCAL0 {$$ = TrCreateLeafOp (PARSEOP_LOCAL0);}
+ | PARSEOP_LOCAL1 {$$ = TrCreateLeafOp (PARSEOP_LOCAL1);}
+ | PARSEOP_LOCAL2 {$$ = TrCreateLeafOp (PARSEOP_LOCAL2);}
+ | PARSEOP_LOCAL3 {$$ = TrCreateLeafOp (PARSEOP_LOCAL3);}
+ | PARSEOP_LOCAL4 {$$ = TrCreateLeafOp (PARSEOP_LOCAL4);}
+ | PARSEOP_LOCAL5 {$$ = TrCreateLeafOp (PARSEOP_LOCAL5);}
+ | PARSEOP_LOCAL6 {$$ = TrCreateLeafOp (PARSEOP_LOCAL6);}
+ | PARSEOP_LOCAL7 {$$ = TrCreateLeafOp (PARSEOP_LOCAL7);}
;
LOrTerm
: PARSEOP_LOR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_LOR);}
TermArg
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_LOR
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -874,7 +874,7 @@
MatchTerm
: PARSEOP_MATCH
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MATCH);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MATCH);}
TermArg
',' MatchOpKeyword
TermArgItem
@@ -881,7 +881,7 @@
',' MatchOpKeyword
TermArgItem
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);}
| PARSEOP_MATCH
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -889,7 +889,7 @@
MethodTerm
: PARSEOP_METHOD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD); COMMENT_CAPTURE_OFF;}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_METHOD); COMMENT_CAPTURE_OFF;}
NameString
OptionalByteConstExpr {UtCheckIntegerRange ($5, 0, 7);}
OptionalSerializeRuleKeyword
@@ -897,8 +897,8 @@
OptionalParameterTypePackage
OptionalParameterTypesPackage
PARSEOP_CLOSE_PAREN '{' {COMMENT_CAPTURE_ON;}
- TermList '}' {$$ = TrLinkChildren ($<n>3,7,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ TermList '}' {$$ = TrLinkOpChildren ($<n>3,7,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
$5,$7,$8,$9,$10,$14);}
| PARSEOP_METHOD
PARSEOP_OPEN_PAREN
@@ -907,12 +907,12 @@
MidTerm
: PARSEOP_MID
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MID);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MID);}
TermArg
TermArgItem
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,$7);}
| PARSEOP_MID
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -920,11 +920,11 @@
ModTerm
: PARSEOP_MOD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MOD);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_MOD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -932,11 +932,11 @@
MultiplyTerm
: PARSEOP_MULTIPLY
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MULTIPLY);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_MULTIPLY
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -944,11 +944,11 @@
MutexTerm
: PARSEOP_MUTEX
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MUTEX);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MUTEX);}
NameString
',' ByteConstExpr
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$6);}
| PARSEOP_MUTEX
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -956,11 +956,11 @@
NameTerm
: PARSEOP_NAME
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_NAME);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NAME);}
NameString
',' DataObject
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$6);}
| PARSEOP_NAME
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -968,11 +968,11 @@
NAndTerm
: PARSEOP_NAND
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_NAND);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NAND);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_NAND
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -979,16 +979,16 @@
;
NoOpTerm
- : PARSEOP_NOOP {$$ = TrCreateNode (PARSEOP_NOOP, 0);}
+ : PARSEOP_NOOP {$$ = TrCreateOp (PARSEOP_NOOP, 0);}
;
NOrTerm
: PARSEOP_NOR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_NOR);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NOR);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_NOR
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -996,10 +996,10 @@
NotifyTerm
: PARSEOP_NOTIFY
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_NOTIFY);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NOTIFY);}
SuperName
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_NOTIFY
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1007,10 +1007,10 @@
NotTerm
: PARSEOP_NOT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_NOT);}
TermArg
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_NOT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1018,9 +1018,9 @@
ObjectTypeTerm
: PARSEOP_OBJECTTYPE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE);}
ObjectTypeSource
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_OBJECTTYPE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1030,7 +1030,7 @@
: PARSEOP_OFFSET
PARSEOP_OPEN_PAREN
AmlPackageLengthTerm
- PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_OFFSET,1,$3);}
+ PARSEOP_CLOSE_PAREN {$$ = TrCreateOp (PARSEOP_OFFSET,1,$3);}
| PARSEOP_OFFSET
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1038,13 +1038,13 @@
OpRegionTerm
: PARSEOP_OPERATIONREGION
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_OPERATIONREGION);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_OPERATIONREGION);}
NameString
',' OpRegionSpaceIdTerm
TermArgItem
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
$6,$7,$8);}
| PARSEOP_OPERATIONREGION
PARSEOP_OPEN_PAREN
@@ -1058,11 +1058,11 @@
OrTerm
: PARSEOP_OR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_OR);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_OR
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1069,19 +1069,19 @@
;
PackageTerm
- : PARSEOP_PACKAGE {$<n>$ = TrCreateLeafNode (PARSEOP_VAR_PACKAGE);}
+ : PARSEOP_PACKAGE {$<n>$ = TrCreateLeafOp (PARSEOP_VAR_PACKAGE);}
OptionalDataCount
- '{' PackageList '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5);}
+ '{' PackageList '}' {$$ = TrLinkOpChildren ($<n>2,2,$3,$5);}
PowerResTerm
: PARSEOP_POWERRESOURCE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_POWERRESOURCE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_POWERRESOURCE);}
NameString
',' ByteConstExpr
',' WordConstExpr
PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,4,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ TermList '}' {$$ = TrLinkOpChildren ($<n>3,4,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
$6,$8,$11);}
| PARSEOP_POWERRESOURCE
PARSEOP_OPEN_PAREN
@@ -1090,10 +1090,10 @@
PrintfTerm
: PARSEOP_PRINTF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PRINTF);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PRINTF);}
StringData
PrintfArgList
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_PRINTF
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1103,19 +1103,19 @@
: {$$ = NULL;}
| TermArg {$$ = $1;}
| PrintfArgList ','
- TermArg {$$ = TrLinkPeerNode ($1, $3);}
+ TermArg {$$ = TrLinkPeerOp ($1, $3);}
;
ProcessorTerm
: PARSEOP_PROCESSOR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PROCESSOR);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PROCESSOR);}
NameString
',' ByteConstExpr
OptionalDWordConstExpr
OptionalByteConstExpr
PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,5,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ TermList '}' {$$ = TrLinkOpChildren ($<n>3,5,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
$6,$7,$8,$11);}
| PARSEOP_PROCESSOR
PARSEOP_OPEN_PAREN
@@ -1124,10 +1124,10 @@
RawDataBufferTerm
: PARSEOP_DATABUFFER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DATABUFFER);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DATABUFFER);}
OptionalWordConst
PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
| PARSEOP_DATABUFFER
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1139,10 +1139,10 @@
*/
RefOfTerm
: PARSEOP_REFOF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_REFOF);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_REFOF);}
RefOfSource
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,
- TrSetNodeFlags ($4, NODE_IS_TARGET));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,
+ TrSetOpFlags ($4, OP_IS_TARGET));}
| PARSEOP_REFOF
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1150,9 +1150,9 @@
ReleaseTerm
: PARSEOP_RELEASE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_RELEASE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_RELEASE);}
SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_RELEASE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1160,9 +1160,9 @@
ResetTerm
: PARSEOP_RESET
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_RESET);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_RESET);}
SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_RESET
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1170,13 +1170,13 @@
ReturnTerm
: PARSEOP_RETURN
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_RETURN);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_RETURN);}
OptionalReturnArg
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_RETURN {$$ = TrLinkChildren (
- TrCreateLeafNode (PARSEOP_RETURN),1,
- TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO),
- NODE_IS_NULL_RETURN));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
+ | PARSEOP_RETURN {$$ = TrLinkOpChildren (
+ TrCreateLeafOp (PARSEOP_RETURN),1,
+ TrSetOpFlags (TrCreateLeafOp (PARSEOP_ZERO),
+ OP_IS_NULL_RETURN));}
| PARSEOP_RETURN
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1184,11 +1184,11 @@
ScopeTerm
: PARSEOP_SCOPE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SCOPE);}
NameString
PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
+ TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
| PARSEOP_SCOPE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1196,11 +1196,11 @@
ShiftLeftTerm
: PARSEOP_SHIFTLEFT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_SHIFTLEFT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1208,11 +1208,11 @@
ShiftRightTerm
: PARSEOP_SHIFTRIGHT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_SHIFTRIGHT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1220,9 +1220,9 @@
SignalTerm
: PARSEOP_SIGNAL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SIGNAL);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SIGNAL);}
SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_SIGNAL
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1230,9 +1230,9 @@
SizeOfTerm
: PARSEOP_SIZEOF
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SIZEOF);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SIZEOF);}
SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_SIZEOF
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1240,9 +1240,9 @@
SleepTerm
: PARSEOP_SLEEP
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SLEEP);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SLEEP);}
TermArg
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_SLEEP
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1250,9 +1250,9 @@
StallTerm
: PARSEOP_STALL
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_STALL);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STALL);}
TermArg
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_STALL
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1260,11 +1260,11 @@
StoreTerm
: PARSEOP_STORE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_STORE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STORE);}
TermArg
',' SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,
- TrSetNodeFlags ($6, NODE_IS_TARGET));}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,
+ TrSetOpFlags ($6, OP_IS_TARGET));}
| PARSEOP_STORE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1272,11 +1272,11 @@
SubtractTerm
: PARSEOP_SUBTRACT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SUBTRACT);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_SUBTRACT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1284,10 +1284,10 @@
SwitchTerm
: PARSEOP_SWITCH
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SWITCH);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SWITCH);}
TermArg
PARSEOP_CLOSE_PAREN '{'
- CaseDefaultTermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ CaseDefaultTermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
| PARSEOP_SWITCH
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1295,11 +1295,11 @@
ThermalZoneTerm
: PARSEOP_THERMALZONE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_THERMALZONE);}
NameString
PARSEOP_CLOSE_PAREN '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,
- TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
+ TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,
+ TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
| PARSEOP_THERMALZONE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1307,10 +1307,10 @@
TimerTerm
: PARSEOP_TIMER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TIMER);}
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,0);}
- | PARSEOP_TIMER {$$ = TrLinkChildren (
- TrCreateLeafNode (PARSEOP_TIMER),0);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TIMER);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,0);}
+ | PARSEOP_TIMER {$$ = TrLinkOpChildren (
+ TrCreateLeafOp (PARSEOP_TIMER),0);}
| PARSEOP_TIMER
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1318,10 +1318,10 @@
ToBCDTerm
: PARSEOP_TOBCD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOBCD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOBCD);}
TermArg
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_TOBCD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1329,10 +1329,10 @@
ToBufferTerm
: PARSEOP_TOBUFFER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOBUFFER);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOBUFFER);}
TermArg
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_TOBUFFER
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1340,10 +1340,10 @@
ToDecimalStringTerm
: PARSEOP_TODECIMALSTRING
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TODECIMALSTRING);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TODECIMALSTRING);}
TermArg
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_TODECIMALSTRING
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1351,10 +1351,10 @@
ToHexStringTerm
: PARSEOP_TOHEXSTRING
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOHEXSTRING);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOHEXSTRING);}
TermArg
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_TOHEXSTRING
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1362,10 +1362,10 @@
ToIntegerTerm
: PARSEOP_TOINTEGER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOINTEGER);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOINTEGER);}
TermArg
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_TOINTEGER
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1373,9 +1373,9 @@
ToPLDTerm
: PARSEOP_TOPLD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOPLD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOPLD);}
PldKeywordList
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_TOPLD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1384,26 +1384,26 @@
PldKeywordList
: {$$ = NULL;}
| PldKeyword
- PARSEOP_EXP_EQUALS Integer {$$ = TrLinkChildren ($1,1,$3);}
+ PARSEOP_EXP_EQUALS Integer {$$ = TrLinkOpChildren ($1,1,$3);}
| PldKeyword
- PARSEOP_EXP_EQUALS String {$$ = TrLinkChildren ($1,1,$3);}
+ PARSEOP_EXP_EQUALS String {$$ = TrLinkOpChildren ($1,1,$3);}
| PldKeywordList ',' /* Allows a trailing comma at list end */
| PldKeywordList ','
PldKeyword
- PARSEOP_EXP_EQUALS Integer {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
+ PARSEOP_EXP_EQUALS Integer {$$ = TrLinkPeerOp ($1,TrLinkOpChildren ($3,1,$5));}
| PldKeywordList ','
PldKeyword
- PARSEOP_EXP_EQUALS String {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
+ PARSEOP_EXP_EQUALS String {$$ = TrLinkPeerOp ($1,TrLinkOpChildren ($3,1,$5));}
;
ToStringTerm
: PARSEOP_TOSTRING
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_TOSTRING);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_TOSTRING);}
TermArg
OptionalCount
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_TOSTRING
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1413,7 +1413,7 @@
: PARSEOP_TOUUID
PARSEOP_OPEN_PAREN
StringData
- PARSEOP_CLOSE_PAREN {$$ = TrUpdateNode (PARSEOP_TOUUID, $3);}
+ PARSEOP_CLOSE_PAREN {$$ = TrSetOpIntegerValue (PARSEOP_TOUUID, $3);}
| PARSEOP_TOUUID
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1421,9 +1421,9 @@
UnicodeTerm
: PARSEOP_UNICODE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_UNICODE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UNICODE);}
StringData
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,0,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,0,$4);}
| PARSEOP_UNICODE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1431,9 +1431,9 @@
UnloadTerm
: PARSEOP_UNLOAD
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_UNLOAD);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UNLOAD);}
SuperName
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,1,$4);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,1,$4);}
| PARSEOP_UNLOAD
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1441,10 +1441,10 @@
WaitTerm
: PARSEOP_WAIT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WAIT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WAIT);}
SuperName
TermArgItem
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
| PARSEOP_WAIT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1452,11 +1452,11 @@
XOrTerm
: PARSEOP_XOR
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_XOR);}
TermArg
TermArgItem
Target
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
| PARSEOP_XOR
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -1464,10 +1464,10 @@
WhileTerm
: PARSEOP_WHILE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WHILE);}
TermArg
PARSEOP_CLOSE_PAREN
- '{' TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ '{' TermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
| PARSEOP_WHILE
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
Modified: trunk/sys/contrib/dev/acpica/compiler/aslprintf.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslprintf.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslprintf.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -192,7 +192,7 @@
/* Store destination is the Debug op */
- DestOp = TrAllocateNode (PARSEOP_DEBUG);
+ DestOp = TrAllocateOp (PARSEOP_DEBUG);
DestOp->Asl.AmlOpcode = AML_DEBUG_OP;
DestOp->Asl.Parent = Op;
DestOp->Asl.LogicalLineNumber = Op->Asl.LogicalLineNumber;
@@ -297,7 +297,7 @@
NewString = UtStringCacheCalloc (StringLength + 1);
strncpy (NewString, StartPosition, StringLength);
- NewOp = TrAllocateNode (PARSEOP_STRING_LITERAL);
+ NewOp = TrAllocateOp (PARSEOP_STRING_LITERAL);
NewOp->Asl.Value.String = NewString;
NewOp->Asl.AmlOpcode = AML_STRING_OP;
NewOp->Asl.AcpiBtype = ACPI_BTYPE_STRING;
@@ -358,7 +358,7 @@
*/
if (!Op->Asl.Child)
{
- NewOp = TrAllocateNode (PARSEOP_STRING_LITERAL);
+ NewOp = TrAllocateOp (PARSEOP_STRING_LITERAL);
NewOp->Asl.Value.String = "";
NewOp->Asl.AmlOpcode = AML_STRING_OP;
NewOp->Asl.AcpiBtype = ACPI_BTYPE_STRING;
@@ -386,7 +386,7 @@
NewString = UtStringCacheCalloc (StringLength + 1);
strncpy (NewString, StartPosition, StringLength);
- NewOp = TrAllocateNode (PARSEOP_STRING_LITERAL);
+ NewOp = TrAllocateOp (PARSEOP_STRING_LITERAL);
NewOp->Asl.Value.String = NewString;
NewOp->Asl.AcpiBtype = ACPI_BTYPE_STRING;
NewOp->Asl.AmlOpcode = AML_STRING_OP;
@@ -424,7 +424,7 @@
/* Disable further optimization */
- Op->Asl.CompileFlags &= ~NODE_COMPILE_TIME_CONST;
+ Op->Asl.CompileFlags &= ~OP_COMPILE_TIME_CONST;
UtSetParseOpName (Op);
/* Set Store destination */
@@ -462,7 +462,7 @@
return;
}
- NewConcatOp = TrAllocateNode (PARSEOP_CONCATENATE);
+ NewConcatOp = TrAllocateOp (PARSEOP_CONCATENATE);
NewConcatOp->Asl.AmlOpcode = AML_CONCATENATE_OP;
NewConcatOp->Asl.AcpiBtype = 0x7;
NewConcatOp->Asl.LogicalLineNumber = Op->Asl.LogicalLineNumber;
@@ -480,7 +480,7 @@
/* Third arg is Zero (not used) */
NewConcatOp->Asl.Child->Asl.Next->Asl.Next =
- TrAllocateNode (PARSEOP_ZERO);
+ TrAllocateOp (PARSEOP_ZERO);
NewConcatOp->Asl.Child->Asl.Next->Asl.Next->Asl.Parent =
NewConcatOp;
Modified: trunk/sys/contrib/dev/acpica/compiler/aslresource.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslresource.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslresource.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -574,7 +574,7 @@
{
Op->Asl.ExternalName = Name;
- Op->Asl.CompileFlags |= NODE_IS_RESOURCE_FIELD;
+ Op->Asl.CompileFlags |= OP_IS_RESOURCE_FIELD;
Op->Asl.Value.Tag.BitOffset = (ByteOffset * 8) + BitOffset;
Op->Asl.Value.Tag.BitLength = BitLength;
@@ -720,9 +720,9 @@
{
/* Emit error only once per duplicate node */
- if (!(NextOp->Asl.CompileFlags & NODE_IS_DUPLICATE))
+ if (!(NextOp->Asl.CompileFlags & OP_IS_DUPLICATE))
{
- NextOp->Asl.CompileFlags |= NODE_IS_DUPLICATE;
+ NextOp->Asl.CompileFlags |= OP_IS_DUPLICATE;
AslError (ASL_ERROR, ASL_MSG_DUPLICATE_ITEM,
NextOp, NULL);
}
@@ -1034,7 +1034,7 @@
* references to the descriptor can be resolved.
*/
Info->DescriptorTypeOp->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
- Info->DescriptorTypeOp->Asl.CompileFlags = NODE_IS_RESOURCE_DESC;
+ Info->DescriptorTypeOp->Asl.CompileFlags = OP_IS_RESOURCE_DESC;
Info->DescriptorTypeOp->Asl.Value.Integer = Info->CurrentByteOffset;
if (Rnode)
@@ -1133,7 +1133,7 @@
if (Op->Asl.Parent)
{
- Op->Asl.Parent->Asl.CompileFlags |= NODE_IS_RESOURCE_DESC;
+ Op->Asl.Parent->Asl.CompileFlags |= OP_IS_RESOURCE_DESC;
}
/* ResourceTemplate Opcode is first (Op) */
@@ -1172,7 +1172,7 @@
Info.DescriptorTypeOp = DescriptorTypeOp;
Info.CurrentByteOffset = CurrentByteOffset;
- DescriptorTypeOp->Asl.CompileFlags |= NODE_IS_RESOURCE_DESC;
+ DescriptorTypeOp->Asl.CompileFlags |= OP_IS_RESOURCE_DESC;
Rnode = RsDoOneResourceDescriptor (&Info, &State);
/*
@@ -1207,7 +1207,7 @@
*/
Op->Asl.ParseOpcode = PARSEOP_BUFFER;
Op->Asl.AmlOpcode = AML_BUFFER_OP;
- Op->Asl.CompileFlags = NODE_AML_PACKAGE | NODE_IS_RESOURCE_DESC;
+ Op->Asl.CompileFlags = OP_AML_PACKAGE | OP_IS_RESOURCE_DESC;
UtSetParseOpName (Op);
BufferLengthOp->Asl.ParseOpcode = PARSEOP_INTEGER;
@@ -1220,7 +1220,7 @@
BufferOp->Asl.AmlOpcodeLength = 0;
BufferOp->Asl.AmlLength = CurrentByteOffset;
BufferOp->Asl.Value.Buffer = (UINT8 *) HeadRnode.Next;
- BufferOp->Asl.CompileFlags |= NODE_IS_RESOURCE_DATA;
+ BufferOp->Asl.CompileFlags |= OP_IS_RESOURCE_DATA;
UtSetParseOpName (BufferOp);
return;
Modified: trunk/sys/contrib/dev/acpica/compiler/aslresources.y
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslresources.y 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslresources.y 2018-10-21 17:19:58 UTC (rev 12112)
@@ -170,11 +170,11 @@
: PARSEOP_RESOURCETEMPLATE {COMMENT_CAPTURE_OFF;}
OptionalParentheses
'{'
- ResourceMacroList '}' {$$ = TrCreateNode (PARSEOP_RESOURCETEMPLATE,4,
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
+ ResourceMacroList '}' {$$ = TrCreateOp (PARSEOP_RESOURCETEMPLATE,4,
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
$5,
- TrCreateLeafNode (PARSEOP_ENDTAG));
+ TrCreateLeafOp (PARSEOP_ENDTAG));
COMMENT_CAPTURE_ON;}
;
@@ -187,7 +187,7 @@
ResourceMacroList
: {$$ = NULL;}
| ResourceMacroList
- ResourceMacroTerm {$$ = TrLinkPeerNode ($1,$2);}
+ ResourceMacroTerm {$$ = TrLinkPeerOp ($1,$2);}
;
ResourceMacroTerm
@@ -236,13 +236,13 @@
DMATerm
: PARSEOP_DMA
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DMA);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DMA);}
DMATypeKeyword
OptionalBusMasterKeyword
',' XferTypeKeyword
OptionalNameString_Last
PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$5,$7,$8,$11);}
+ ByteList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$7,$8,$11);}
| PARSEOP_DMA
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -250,7 +250,7 @@
DWordIOTerm
: PARSEOP_DWORDIO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDIO);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDIO);}
OptionalResourceType_First
OptionalMinType
OptionalMaxType
@@ -266,7 +266,7 @@
OptionalNameString
OptionalType
OptionalTranslationType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
| PARSEOP_DWORDIO
PARSEOP_OPEN_PAREN
@@ -275,7 +275,7 @@
DWordMemoryTerm
: PARSEOP_DWORDMEMORY
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDMEMORY);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDMEMORY);}
OptionalResourceType_First
OptionalDecodeType
OptionalMinType
@@ -292,7 +292,7 @@
OptionalNameString
OptionalAddressRange
OptionalType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,16,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,16,
$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
| PARSEOP_DWORDMEMORY
PARSEOP_OPEN_PAREN
@@ -301,7 +301,7 @@
DWordSpaceTerm
: PARSEOP_DWORDSPACE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DWORDSPACE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDSPACE);}
ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
OptionalResourceType
OptionalDecodeType
@@ -316,7 +316,7 @@
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
| PARSEOP_DWORDSPACE
PARSEOP_OPEN_PAREN
@@ -326,7 +326,7 @@
EndDependentFnTerm
: PARSEOP_ENDDEPENDENTFN
PARSEOP_OPEN_PAREN
- PARSEOP_CLOSE_PAREN {$$ = TrCreateLeafNode (PARSEOP_ENDDEPENDENTFN);}
+ PARSEOP_CLOSE_PAREN {$$ = TrCreateLeafOp (PARSEOP_ENDDEPENDENTFN);}
| PARSEOP_ENDDEPENDENTFN
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -334,7 +334,7 @@
ExtendedIOTerm
: PARSEOP_EXTENDEDIO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDIO);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDIO);}
OptionalResourceType_First
OptionalMinType
OptionalMaxType
@@ -349,7 +349,7 @@
OptionalNameString
OptionalType
OptionalTranslationType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
| PARSEOP_EXTENDEDIO
PARSEOP_OPEN_PAREN
@@ -358,7 +358,7 @@
ExtendedMemoryTerm
: PARSEOP_EXTENDEDMEMORY
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDMEMORY);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDMEMORY);}
OptionalResourceType_First
OptionalDecodeType
OptionalMinType
@@ -374,7 +374,7 @@
OptionalNameString
OptionalAddressRange
OptionalType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
| PARSEOP_EXTENDEDMEMORY
PARSEOP_OPEN_PAREN
@@ -382,7 +382,7 @@
;
ExtendedSpaceTerm
- : PARSEOP_EXTENDEDSPACE PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_EXTENDEDSPACE);}
+ : PARSEOP_EXTENDEDSPACE PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDSPACE);}
ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
OptionalResourceType
OptionalDecodeType
@@ -396,7 +396,7 @@
',' QWordConstExpr
OptionalQWordConstExpr
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,13,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,13,
$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
| PARSEOP_EXTENDEDSPACE
PARSEOP_OPEN_PAREN
@@ -405,12 +405,12 @@
FixedDmaTerm
: PARSEOP_FIXEDDMA
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FIXEDDMA);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIXEDDMA);}
WordConstExpr /* 04: DMA RequestLines */
',' WordConstExpr /* 06: DMA Channels */
OptionalXferSize /* 07: DMA TransferSize */
OptionalNameString /* 08: DescriptorName */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,$4,$6,$7,$8);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$6,$7,$8);}
| PARSEOP_FIXEDDMA
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -418,11 +418,11 @@
FixedIOTerm
: PARSEOP_FIXEDIO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_FIXEDIO);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_FIXEDIO);}
WordConstExpr
',' ByteConstExpr
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
| PARSEOP_FIXEDIO
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -430,7 +430,7 @@
GpioIntTerm
: PARSEOP_GPIO_INT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_GPIO_INT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_GPIO_INT);}
InterruptTypeKeyword /* 04: InterruptType */
',' InterruptLevel /* 06: InterruptLevel */
OptionalShareType /* 07: SharedType */
@@ -442,7 +442,7 @@
OptionalNameString /* 15: DescriptorName */
OptionalBuffer_Last /* 16: VendorData */
PARSEOP_CLOSE_PAREN '{'
- DWordConstExpr '}' {$$ = TrLinkChildren ($<n>3,11,
+ DWordConstExpr '}' {$$ = TrLinkOpChildren ($<n>3,11,
$4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
| PARSEOP_GPIO_INT
PARSEOP_OPEN_PAREN
@@ -451,7 +451,7 @@
GpioIoTerm
: PARSEOP_GPIO_IO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_GPIO_IO);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_GPIO_IO);}
OptionalShareType_First /* 04: SharedType */
',' PinConfigByte /* 06: PinConfig */
OptionalWordConstExpr /* 07: DebounceTimeout */
@@ -463,7 +463,7 @@
OptionalNameString /* 14: DescriptorName */
OptionalBuffer_Last /* 15: VendorData */
PARSEOP_CLOSE_PAREN '{'
- DWordList '}' {$$ = TrLinkChildren ($<n>3,11,
+ DWordList '}' {$$ = TrLinkOpChildren ($<n>3,11,
$4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
| PARSEOP_GPIO_IO
PARSEOP_OPEN_PAREN
@@ -472,7 +472,7 @@
I2cSerialBusTerm
: PARSEOP_I2C_SERIALBUS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_I2C_SERIALBUS);}
WordConstExpr /* 04: SlaveAddress */
OptionalSlaveMode /* 05: SlaveMode */
',' DWordConstExpr /* 07: ConnectionSpeed */
@@ -482,9 +482,9 @@
OptionalResourceType /* 12: ResourceType */
OptionalNameString /* 13: DescriptorName */
OptionalBuffer_Last /* 14: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,10,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,10,
$4,$5,$7,$8,$10,$11,$12,$13,
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$14);}
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$14);}
| PARSEOP_I2C_SERIALBUS
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -492,7 +492,7 @@
I2cSerialBusTermV2
: PARSEOP_I2C_SERIALBUS_V2
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS_V2);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_I2C_SERIALBUS_V2);}
WordConstExpr /* 04: SlaveAddress */
OptionalSlaveMode /* 05: SlaveMode */
',' DWordConstExpr /* 07: ConnectionSpeed */
@@ -503,7 +503,7 @@
OptionalNameString /* 13: DescriptorName */
OptionalShareType /* 14: Share */
OptionalBuffer_Last /* 15: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,10,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,10,
$4,$5,$7,$8,$10,$11,$12,$13,$14,$15);}
| PARSEOP_I2C_SERIALBUS_V2
PARSEOP_OPEN_PAREN
@@ -512,7 +512,7 @@
InterruptTerm
: PARSEOP_INTERRUPT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_INTERRUPT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_INTERRUPT);}
OptionalResourceType_First
',' InterruptTypeKeyword
',' InterruptLevel
@@ -521,7 +521,7 @@
OptionalStringData
OptionalNameString_Last
PARSEOP_CLOSE_PAREN '{'
- DWordList '}' {$$ = TrLinkChildren ($<n>3,8,
+ DWordList '}' {$$ = TrLinkOpChildren ($<n>3,8,
$4,$6,$8,$9,$10,$11,$12,$15);}
| PARSEOP_INTERRUPT
PARSEOP_OPEN_PAREN
@@ -530,7 +530,7 @@
IOTerm
: PARSEOP_IO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_IO);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IO);}
IODecodeKeyword
',' WordConstExpr
',' WordConstExpr
@@ -537,7 +537,7 @@
',' ByteConstExpr
',' ByteConstExpr
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
| PARSEOP_IO
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -545,10 +545,10 @@
IRQNoFlagsTerm
: PARSEOP_IRQNOFLAGS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_IRQNOFLAGS);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IRQNOFLAGS);}
OptionalNameString_First
PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
| PARSEOP_IRQNOFLAGS
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -556,13 +556,13 @@
IRQTerm
: PARSEOP_IRQ
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_IRQ);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_IRQ);}
InterruptTypeKeyword
',' InterruptLevel
OptionalShareType
OptionalNameString_Last
PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$7,$8,$11);}
+ ByteList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$6,$7,$8,$11);}
| PARSEOP_IRQ
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -570,7 +570,7 @@
Memory24Term
: PARSEOP_MEMORY24
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY24);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY24);}
OptionalReadWriteKeyword
',' WordConstExpr
',' WordConstExpr
@@ -577,7 +577,7 @@
',' WordConstExpr
',' WordConstExpr
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
| PARSEOP_MEMORY24
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -585,12 +585,12 @@
Memory32FixedTerm
: PARSEOP_MEMORY32FIXED
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY32FIXED);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY32FIXED);}
OptionalReadWriteKeyword
',' DWordConstExpr
',' DWordConstExpr
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,4,$4,$6,$8,$9);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,4,$4,$6,$8,$9);}
| PARSEOP_MEMORY32FIXED
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -598,7 +598,7 @@
Memory32Term
: PARSEOP_MEMORY32
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_MEMORY32);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY32);}
OptionalReadWriteKeyword
',' DWordConstExpr
',' DWordConstExpr
@@ -605,7 +605,7 @@
',' DWordConstExpr
',' DWordConstExpr
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
| PARSEOP_MEMORY32
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -613,7 +613,7 @@
PinConfigTerm
: PARSEOP_PINCONFIG
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PINCONFIG);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINCONFIG);}
OptionalShareType_First /* 04: SharedType */
',' ByteConstExpr /* 06: PinConfigType */
',' DWordConstExpr /* 08: PinConfigValue */
@@ -623,7 +623,7 @@
OptionalNameString /* 13: DescriptorName */
OptionalBuffer_Last /* 14: VendorData */
PARSEOP_CLOSE_PAREN '{'
- DWordList '}' {$$ = TrLinkChildren ($<n>3,9,
+ DWordList '}' {$$ = TrLinkOpChildren ($<n>3,9,
$4,$6,$8,$10,$11,$12,$13,$14,$17);}
| PARSEOP_PINCONFIG
PARSEOP_OPEN_PAREN
@@ -632,7 +632,7 @@
PinFunctionTerm
: PARSEOP_PINFUNCTION
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PINFUNCTION);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINFUNCTION);}
OptionalShareType_First /* 04: SharedType */
',' PinConfigByte /* 06: PinConfig */
',' WordConstExpr /* 08: FunctionNumber */
@@ -642,7 +642,7 @@
OptionalNameString /* 13: DescriptorName */
OptionalBuffer_Last /* 14: VendorData */
PARSEOP_CLOSE_PAREN '{'
- DWordList '}' {$$ = TrLinkChildren ($<n>3,9,
+ DWordList '}' {$$ = TrLinkOpChildren ($<n>3,9,
$4,$6,$8,$10,$11,$12,$13,$14,$17);}
| PARSEOP_PINFUNCTION
PARSEOP_OPEN_PAREN
@@ -651,13 +651,13 @@
PinGroupTerm
: PARSEOP_PINGROUP
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PINGROUP);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUP);}
StringData /* 04: ResourceLabel */
OptionalProducerResourceType /* 05: ResourceType */
OptionalNameString /* 06: DescriptorName */
OptionalBuffer_Last /* 07: VendorData */
PARSEOP_CLOSE_PAREN '{'
- DWordList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$5,$6,$7,$10);}
+ DWordList '}' {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$6,$7,$10);}
| PARSEOP_PINGROUP
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -665,7 +665,7 @@
PinGroupConfigTerm
: PARSEOP_PINGROUPCONFIG
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PINGROUPCONFIG);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUPCONFIG);}
OptionalShareType_First /* 04: SharedType */
',' ByteConstExpr /* 06: PinConfigType */
',' DWordConstExpr /* 08: PinConfigValue */
@@ -675,7 +675,7 @@
OptionalResourceType /* 14: ResourceType */
OptionalNameString /* 15: DescriptorName */
OptionalBuffer_Last /* 16: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,9,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,9,
$4,$6,$8,$10,$11,$13,$14,$15,$16);}
| PARSEOP_PINGROUPCONFIG
PARSEOP_OPEN_PAREN
@@ -684,7 +684,7 @@
PinGroupFunctionTerm
: PARSEOP_PINGROUPFUNCTION
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_PINGROUPFUNCTION);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUPFUNCTION);}
OptionalShareType_First /* 04: SharedType */
',' WordConstExpr /* 06: FunctionNumber */
',' StringData /* 08: ResourceSource */
@@ -693,7 +693,7 @@
OptionalResourceType /* 12: ResourceType */
OptionalNameString /* 13: DescriptorName */
OptionalBuffer_Last /* 14: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,8,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,8,
$4,$6,$8,$9,$11,$12,$13,$14);}
| PARSEOP_PINGROUPFUNCTION
PARSEOP_OPEN_PAREN
@@ -702,7 +702,7 @@
QWordIOTerm
: PARSEOP_QWORDIO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDIO);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDIO);}
OptionalResourceType_First
OptionalMinType
OptionalMaxType
@@ -718,7 +718,7 @@
OptionalNameString
OptionalType
OptionalTranslationType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
| PARSEOP_QWORDIO
PARSEOP_OPEN_PAREN
@@ -727,7 +727,7 @@
QWordMemoryTerm
: PARSEOP_QWORDMEMORY
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDMEMORY);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDMEMORY);}
OptionalResourceType_First
OptionalDecodeType
OptionalMinType
@@ -744,7 +744,7 @@
OptionalNameString
OptionalAddressRange
OptionalType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,16,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,16,
$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
| PARSEOP_QWORDMEMORY
PARSEOP_OPEN_PAREN
@@ -753,7 +753,7 @@
QWordSpaceTerm
: PARSEOP_QWORDSPACE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_QWORDSPACE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDSPACE);}
ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
OptionalResourceType
OptionalDecodeType
@@ -768,7 +768,7 @@
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
| PARSEOP_QWORDSPACE
PARSEOP_OPEN_PAREN
@@ -777,7 +777,7 @@
RegisterTerm
: PARSEOP_REGISTER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_REGISTER);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_REGISTER);}
AddressSpaceKeyword
',' ByteConstExpr
',' ByteConstExpr
@@ -784,7 +784,7 @@
',' QWordConstExpr
OptionalAccessSize
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);}
| PARSEOP_REGISTER
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -792,7 +792,7 @@
SpiSerialBusTerm
: PARSEOP_SPI_SERIALBUS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SPI_SERIALBUS);}
WordConstExpr /* 04: DeviceSelection */
OptionalDevicePolarity /* 05: DevicePolarity */
OptionalWireMode /* 06: WireMode */
@@ -806,9 +806,9 @@
OptionalResourceType /* 19: ResourceType */
OptionalNameString /* 20: DescriptorName */
OptionalBuffer_Last /* 21: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$21);}
| PARSEOP_SPI_SERIALBUS
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -816,7 +816,7 @@
SpiSerialBusTermV2
: PARSEOP_SPI_SERIALBUS_V2
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS_V2);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_SPI_SERIALBUS_V2);}
WordConstExpr /* 04: DeviceSelection */
OptionalDevicePolarity /* 05: DevicePolarity */
OptionalWireMode /* 06: WireMode */
@@ -831,7 +831,7 @@
OptionalNameString /* 20: DescriptorName */
OptionalShareType /* 21: Share */
OptionalBuffer_Last /* 22: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
| PARSEOP_SPI_SERIALBUS_V2
PARSEOP_OPEN_PAREN
@@ -840,9 +840,9 @@
StartDependentFnNoPriTerm
: PARSEOP_STARTDEPENDENTFN_NOPRI
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN_NOPRI);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STARTDEPENDENTFN_NOPRI);}
PARSEOP_CLOSE_PAREN '{'
- ResourceMacroList '}' {$$ = TrLinkChildren ($<n>3,1,$6);}
+ ResourceMacroList '}' {$$ = TrLinkOpChildren ($<n>3,1,$6);}
| PARSEOP_STARTDEPENDENTFN_NOPRI
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -850,11 +850,11 @@
StartDependentFnTerm
: PARSEOP_STARTDEPENDENTFN
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_STARTDEPENDENTFN);}
ByteConstExpr
',' ByteConstExpr
PARSEOP_CLOSE_PAREN '{'
- ResourceMacroList '}' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$9);}
+ ResourceMacroList '}' {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$9);}
| PARSEOP_STARTDEPENDENTFN
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -862,7 +862,7 @@
UartSerialBusTerm
: PARSEOP_UART_SERIALBUS
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UART_SERIALBUS);}
DWordConstExpr /* 04: ConnectionSpeed */
OptionalBitsPerByte /* 05: BitsPerByte */
OptionalStopBits /* 06: StopBits */
@@ -877,9 +877,9 @@
OptionalResourceType /* 19: ResourceType */
OptionalNameString /* 20: DescriptorName */
OptionalBuffer_Last /* 21: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$21);}
| PARSEOP_UART_SERIALBUS
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -887,7 +887,7 @@
UartSerialBusTermV2
: PARSEOP_UART_SERIALBUS_V2
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS_V2);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_UART_SERIALBUS_V2);}
DWordConstExpr /* 04: ConnectionSpeed */
OptionalBitsPerByte /* 05: BitsPerByte */
OptionalStopBits /* 06: StopBits */
@@ -903,7 +903,7 @@
OptionalNameString /* 20: DescriptorName */
OptionalShareType /* 21: Share */
OptionalBuffer_Last /* 22: VendorData */
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
| PARSEOP_UART_SERIALBUS_V2
PARSEOP_OPEN_PAREN
@@ -912,10 +912,10 @@
VendorLongTerm
: PARSEOP_VENDORLONG
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORLONG);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_VENDORLONG);}
OptionalNameString_First
PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
| PARSEOP_VENDORLONG
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -923,10 +923,10 @@
VendorShortTerm
: PARSEOP_VENDORSHORT
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_VENDORSHORT);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_VENDORSHORT);}
OptionalNameString_First
PARSEOP_CLOSE_PAREN '{'
- ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ ByteList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
| PARSEOP_VENDORSHORT
PARSEOP_OPEN_PAREN
error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;}
@@ -934,7 +934,7 @@
WordBusNumberTerm
: PARSEOP_WORDBUSNUMBER
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WORDBUSNUMBER);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDBUSNUMBER);}
OptionalResourceType_First
OptionalMinType
OptionalMaxType
@@ -947,7 +947,7 @@
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,12,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,12,
$4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
| PARSEOP_WORDBUSNUMBER
PARSEOP_OPEN_PAREN
@@ -956,7 +956,7 @@
WordIOTerm
: PARSEOP_WORDIO
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WORDIO);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDIO);}
OptionalResourceType_First
OptionalMinType
OptionalMaxType
@@ -972,7 +972,7 @@
OptionalNameString
OptionalType
OptionalTranslationType_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,15,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,15,
$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
| PARSEOP_WORDIO
PARSEOP_OPEN_PAREN
@@ -981,7 +981,7 @@
WordSpaceTerm
: PARSEOP_WORDSPACE
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_WORDSPACE);}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_WORDSPACE);}
ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
OptionalResourceType
OptionalDecodeType
@@ -996,7 +996,7 @@
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($<n>3,14,
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkOpChildren ($<n>3,14,
$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
| PARSEOP_WORDSPACE
PARSEOP_OPEN_PAREN
Modified: trunk/sys/contrib/dev/acpica/compiler/aslrules.y
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslrules.y 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslrules.y 2018-10-21 17:19:58 UTC (rev 12112)
@@ -166,8 +166,8 @@
* to handle output from preprocessors
*/
AslCode
- : DefinitionBlockList {$<n>$ = TrLinkChildren (
- TrCreateLeafNode (PARSEOP_ASL_CODE),1, $1);}
+ : DefinitionBlockList {$<n>$ = TrLinkOpChildren (
+ TrCreateLeafOp (PARSEOP_ASL_CODE),1, $1);}
| error {YYABORT; $$ = NULL;}
;
@@ -193,7 +193,7 @@
*/
DefinitionBlockTerm
: PARSEOP_DEFINITION_BLOCK
- PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafNode (PARSEOP_DEFINITION_BLOCK); COMMENT_CAPTURE_OFF;}
+ PARSEOP_OPEN_PAREN {$<n>$ = TrCreateLeafOp (PARSEOP_DEFINITION_BLOCK); COMMENT_CAPTURE_OFF;}
String ','
String ','
ByteConst ','
@@ -200,8 +200,8 @@
String ','
String ','
DWordConst
- PARSEOP_CLOSE_PAREN {TrSetEndLineNumber ($<n>3); COMMENT_CAPTURE_ON;}
- '{' TermList '}' {$$ = TrLinkChildren ($<n>3,7,
+ PARSEOP_CLOSE_PAREN {TrSetOpEndLineNumber ($<n>3); COMMENT_CAPTURE_ON;}
+ '{' TermList '}' {$$ = TrLinkOpChildren ($<n>3,7,
$4,$6,$8,$10,$12,$14,$18);}
;
@@ -208,7 +208,7 @@
DefinitionBlockList
: DefinitionBlockTerm
| DefinitionBlockTerm
- DefinitionBlockList {$$ = TrLinkPeerNodes (2, $1,$2);}
+ DefinitionBlockList {$$ = TrLinkPeerOps (2, $1,$2);}
;
@@ -218,21 +218,21 @@
NameString
: NameSeg {}
- | PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) $1);}
- | PARSEOP_IO {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IO");}
- | PARSEOP_DMA {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "DMA");}
- | PARSEOP_IRQ {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IRQ");}
- | PARSEOP_FOR {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "FOR");}
+ | PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) $1);}
+ | PARSEOP_IO {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IO");}
+ | PARSEOP_DMA {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "DMA");}
+ | PARSEOP_IRQ {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "IRQ");}
+ | PARSEOP_FOR {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) "FOR");}
;
/*
NameSeg
- : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT)
+ : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESEG, (ACPI_NATIVE_INT)
TrNormalizeNameSeg ($1));}
;
*/
NameSeg
- : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
+ : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafOp (PARSEOP_NAMESEG,
(ACPI_NATIVE_INT) AslCompilerlval.s);}
;
@@ -243,8 +243,8 @@
: Object {}
| Type1Opcode {}
| Type2Opcode {}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
- | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
+ | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
+ | Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
| Type2BufferOpcode {}
| Type2BufferOrStringOpcode {}
| error {$$ = AslDoError(); yyclearin;}
@@ -257,45 +257,45 @@
;
Target
- : {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
- | ',' {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
- | ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);}
+ : {$$ = TrCreateNullTargetOp ();} /* Placeholder is a ZeroOp object */
+ | ',' {$$ = TrCreateNullTargetOp ();} /* Placeholder is a ZeroOp object */
+ | ',' SuperName {$$ = TrSetOpFlags ($2, OP_IS_TARGET);}
;
RequiredTarget
- : ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);}
+ : ',' SuperName {$$ = TrSetOpFlags ($2, OP_IS_TARGET);}
;
TermArg
- : SimpleName {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
- | Type2Opcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
- | DataObject {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+ : SimpleName {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
+ | Type2Opcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
+ | DataObject {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
| PARSEOP_OPEN_PAREN
TermArg
- PARSEOP_CLOSE_PAREN {$$ = TrSetNodeFlags ($2, NODE_IS_TERM_ARG);}
+ PARSEOP_CLOSE_PAREN {$$ = TrSetOpFlags ($2, OP_IS_TERM_ARG);}
;
/*
NOTE: Removed from TermArg due to reduce/reduce conflicts:
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
- | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
- | Type2BufferOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
- | Type2BufferOrStringOpcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+ | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
+ | Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
+ | Type2BufferOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
+ | Type2BufferOrStringOpcode {$$ = TrSetOpFlags ($1, OP_IS_TERM_ARG);}
*/
MethodInvocationTerm
: NameString
- PARSEOP_OPEN_PAREN {TrUpdateNode (PARSEOP_METHODCALL, $1); COMMENT_CAPTURE_OFF;}
+ PARSEOP_OPEN_PAREN {TrSetOpIntegerValue (PARSEOP_METHODCALL, $1); COMMENT_CAPTURE_OFF;}
ArgList
- PARSEOP_CLOSE_PAREN {$$ = TrLinkChildNode ($1,$4); COMMENT_CAPTURE_ON;}
+ PARSEOP_CLOSE_PAREN {$$ = TrLinkChildOp ($1,$4); COMMENT_CAPTURE_ON;}
;
/* OptionalCount must appear before ByteList or an incorrect reduction will result */
OptionalCount
- : {$$ = TrCreateLeafNode (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
- | ',' {$$ = TrCreateLeafNode (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
+ : {$$ = TrCreateLeafOp (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
+ | ',' {$$ = TrCreateLeafOp (PARSEOP_ONES);} /* Placeholder is a OnesOp object */
| ',' TermArg {$$ = $2;}
;
@@ -335,14 +335,14 @@
TermList
: {$$ = NULL;}
- | TermList Term {$$ = TrLinkPeerNode (
- TrSetNodeFlags ($1, NODE_RESULT_NOT_USED),$2);}
- | TermList Term ';' {$$ = TrLinkPeerNode (
- TrSetNodeFlags ($1, NODE_RESULT_NOT_USED),$2);}
- | TermList ';' Term {$$ = TrLinkPeerNode (
- TrSetNodeFlags ($1, NODE_RESULT_NOT_USED),$3);}
- | TermList ';' Term ';' {$$ = TrLinkPeerNode (
- TrSetNodeFlags ($1, NODE_RESULT_NOT_USED),$3);}
+ | TermList Term {$$ = TrLinkPeerOp (
+ TrSetOpFlags ($1, OP_RESULT_NOT_USED),$2);}
+ | TermList Term ';' {$$ = TrLinkPeerOp (
+ TrSetOpFlags ($1, OP_RESULT_NOT_USED),$2);}
+ | TermList ';' Term {$$ = TrLinkPeerOp (
+ TrSetOpFlags ($1, OP_RESULT_NOT_USED),$3);}
+ | TermList ';' Term ';' {$$ = TrLinkPeerOp (
+ TrSetOpFlags ($1, OP_RESULT_NOT_USED),$3);}
;
ArgList
@@ -350,7 +350,7 @@
| TermArg
| ArgList ',' /* Allows a trailing comma at list end */
| ArgList ','
- TermArg {$$ = TrLinkPeerNode ($1,$3);}
+ TermArg {$$ = TrLinkPeerOp ($1,$3);}
;
ByteList
@@ -358,7 +358,7 @@
| ByteConstExpr
| ByteList ',' /* Allows a trailing comma at list end */
| ByteList ','
- ByteConstExpr {$$ = TrLinkPeerNode ($1,$3);}
+ ByteConstExpr {$$ = TrLinkPeerOp ($1,$3);}
;
DWordList
@@ -366,7 +366,7 @@
| DWordConstExpr
| DWordList ',' /* Allows a trailing comma at list end */
| DWordList ','
- DWordConstExpr {$$ = TrLinkPeerNode ($1,$3);}
+ DWordConstExpr {$$ = TrLinkPeerOp ($1,$3);}
;
FieldUnitList
@@ -374,7 +374,7 @@
| FieldUnit
| FieldUnitList ',' /* Allows a trailing comma at list end */
| FieldUnitList ','
- FieldUnit {$$ = TrLinkPeerNode ($1,$3);}
+ FieldUnit {$$ = TrLinkPeerOp ($1,$3);}
;
FieldUnit
@@ -385,9 +385,9 @@
;
FieldUnitEntry
- : ',' AmlPackageLengthTerm {$$ = TrCreateNode (PARSEOP_RESERVED_BYTES,1,$2);}
+ : ',' AmlPackageLengthTerm {$$ = TrCreateOp (PARSEOP_RESERVED_BYTES,1,$2);}
| NameSeg ','
- AmlPackageLengthTerm {$$ = TrLinkChildNode ($1,$3);}
+ AmlPackageLengthTerm {$$ = TrLinkChildOp ($1,$3);}
;
Object
@@ -402,7 +402,7 @@
| PackageElement
| PackageList ',' /* Allows a trailing comma at list end */
| PackageList ','
- PackageElement {$$ = TrLinkPeerNode ($1,$3);}
+ PackageElement {$$ = TrLinkPeerOp ($1,$3);}
;
PackageElement
@@ -416,7 +416,7 @@
: {$$ = NULL;}
| ObjectTypeKeyword {$$ = $1;}
| ParameterTypePackage ','
- ObjectTypeKeyword {$$ = TrLinkPeerNodes (2,$1,$3);}
+ ObjectTypeKeyword {$$ = TrLinkPeerOps (2,$1,$3);}
;
ParameterTypePackageList
@@ -426,9 +426,9 @@
;
OptionalParameterTypePackage
- : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
- | ',' ParameterTypePackageList {$$ = TrLinkChildren (
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
+ : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
+ | ',' ParameterTypePackageList {$$ = TrLinkOpChildren (
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);}
;
/* Rules for specifying the types for method arguments */
@@ -436,7 +436,7 @@
ParameterTypesPackage
: ParameterTypePackageList {$$ = $1;}
| ParameterTypesPackage ','
- ParameterTypePackageList {$$ = TrLinkPeerNodes (2,$1,$3);}
+ ParameterTypePackageList {$$ = TrLinkPeerOps (2,$1,$3);}
;
ParameterTypesPackageList
@@ -446,9 +446,9 @@
;
OptionalParameterTypesPackage
- : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
- | ',' ParameterTypesPackageList {$$ = TrLinkChildren (
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
+ : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
+ | ',' ParameterTypesPackageList {$$ = TrLinkOpChildren (
+ TrCreateLeafOp (PARSEOP_DEFAULT_ARG),1,$2);}
;
/*
@@ -459,9 +459,9 @@
| CaseTerm {}
| DefaultTerm {}
| CaseDefaultTermList
- CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
+ CaseTerm {$$ = TrLinkPeerOp ($1,$2);}
| CaseDefaultTermList
- DefaultTerm {$$ = TrLinkPeerNode ($1,$2);}
+ DefaultTerm {$$ = TrLinkPeerOp ($1,$2);}
/* Original - attempts to force zero or one default term within the switch */
@@ -470,9 +470,9 @@
: {$$ = NULL;}
| CaseTermList
DefaultTerm
- CaseTermList {$$ = TrLinkPeerNode ($1,TrLinkPeerNode ($2, $3));}
+ CaseTermList {$$ = TrLinkPeerOp ($1,TrLinkPeerOp ($2, $3));}
| CaseTermList
- CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
+ CaseTerm {$$ = TrLinkPeerOp ($1,$2);}
;
CaseTermList
@@ -479,7 +479,7 @@
: {$$ = NULL;}
| CaseTerm {}
| CaseTermList
- CaseTerm {$$ = TrLinkPeerNode ($1,$2);}
+ CaseTerm {$$ = TrLinkPeerOp ($1,$2);}
;
*/
@@ -498,9 +498,9 @@
;
BufferData
- : Type5Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
- | Type2BufferOrStringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
- | Type2BufferOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
+ : Type5Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
+ | Type2BufferOrStringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
+ | Type2BufferOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
| BufferTerm {}
;
@@ -509,35 +509,35 @@
;
IntegerData
- : Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
- | Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
+ : Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
+ | Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
| Integer {}
| ConstTerm {}
;
StringData
- : Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
+ : Type2StringOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
| String {}
;
ByteConst
- : Integer {$$ = TrUpdateNode (PARSEOP_BYTECONST, $1);}
+ : Integer {$$ = TrSetOpIntegerValue (PARSEOP_BYTECONST, $1);}
;
WordConst
- : Integer {$$ = TrUpdateNode (PARSEOP_WORDCONST, $1);}
+ : Integer {$$ = TrSetOpIntegerValue (PARSEOP_WORDCONST, $1);}
;
DWordConst
- : Integer {$$ = TrUpdateNode (PARSEOP_DWORDCONST, $1);}
+ : Integer {$$ = TrSetOpIntegerValue (PARSEOP_DWORDCONST, $1);}
;
QWordConst
- : Integer {$$ = TrUpdateNode (PARSEOP_QWORDCONST, $1);}
+ : Integer {$$ = TrSetOpIntegerValue (PARSEOP_QWORDCONST, $1);}
;
/*
- * The NODE_COMPILE_TIME_CONST flag in the following constant expressions
+ * The OP_COMPILE_TIME_CONST flag in the following constant expressions
* enables compile-time constant folding to reduce the Type3Opcodes/Type2IntegerOpcodes
* to simple integers. It is an error if these types of expressions cannot be
* reduced, since the AML grammar for ****ConstExpr requires a simple constant.
@@ -545,63 +545,64 @@
* constant folding code in the node AmlLength field.
*/
ByteConstExpr
- : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
- TrSetNodeAmlLength ($1, 1);}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
- TrSetNodeAmlLength ($1, 1);}
- | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_BYTECONST, $1);}
+ : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
+ TrSetOpAmlLength ($1, 1);}
+ | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
+ TrSetOpAmlLength ($1, 1);}
+ | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_BYTECONST, $1);}
| ByteConst {}
;
WordConstExpr
- : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
- TrSetNodeAmlLength ($1, 2);}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
- TrSetNodeAmlLength ($1, 2);}
- | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_WORDCONST, $1);}
+ : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
+ TrSetOpAmlLength ($1, 2);}
+ | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
+ TrSetOpAmlLength ($1, 2);}
+ | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_WORDCONST, $1);}
| WordConst {}
;
DWordConstExpr
- : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
- TrSetNodeAmlLength ($1, 4);}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
- TrSetNodeAmlLength ($1, 4);}
- | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_DWORDCONST, $1);}
+ : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
+ TrSetOpAmlLength ($1, 4);}
+ | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
+ TrSetOpAmlLength ($1, 4);}
+ | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_DWORDCONST, $1);}
| DWordConst {}
;
QWordConstExpr
- : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
- TrSetNodeAmlLength ($1, 8);}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);
- TrSetNodeAmlLength ($1, 8);}
- | ConstExprTerm {$$ = TrUpdateNode (PARSEOP_QWORDCONST, $1);}
+ : Type3Opcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
+ TrSetOpAmlLength ($1, 8);}
+ | Type2IntegerOpcode {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);
+ TrSetOpAmlLength ($1, 8);}
+ | ConstExprTerm {$$ = TrSetOpIntegerValue (PARSEOP_QWORDCONST, $1);}
| QWordConst {}
;
ConstTerm
: ConstExprTerm {}
- | PARSEOP_REVISION {$$ = TrCreateLeafNode (PARSEOP_REVISION);}
+ | PARSEOP_REVISION {$$ = TrCreateLeafOp (PARSEOP_REVISION);}
;
ConstExprTerm
- : PARSEOP_ZERO {$$ = TrCreateValuedLeafNode (PARSEOP_ZERO, 0);}
- | PARSEOP_ONE {$$ = TrCreateValuedLeafNode (PARSEOP_ONE, 1);}
- | PARSEOP_ONES {$$ = TrCreateValuedLeafNode (PARSEOP_ONES, ACPI_UINT64_MAX);}
- | PARSEOP___DATE__ {$$ = TrCreateConstantLeafNode (PARSEOP___DATE__);}
- | PARSEOP___FILE__ {$$ = TrCreateConstantLeafNode (PARSEOP___FILE__);}
- | PARSEOP___LINE__ {$$ = TrCreateConstantLeafNode (PARSEOP___LINE__);}
- | PARSEOP___PATH__ {$$ = TrCreateConstantLeafNode (PARSEOP___PATH__);}
+ : PARSEOP_ZERO {$$ = TrCreateValuedLeafOp (PARSEOP_ZERO, 0);}
+ | PARSEOP_ONE {$$ = TrCreateValuedLeafOp (PARSEOP_ONE, 1);}
+ | PARSEOP_ONES {$$ = TrCreateValuedLeafOp (PARSEOP_ONES, ACPI_UINT64_MAX);}
+ | PARSEOP___DATE__ {$$ = TrCreateConstantLeafOp (PARSEOP___DATE__);}
+ | PARSEOP___FILE__ {$$ = TrCreateConstantLeafOp (PARSEOP___FILE__);}
+ | PARSEOP___LINE__ {$$ = TrCreateConstantLeafOp (PARSEOP___LINE__);}
+ | PARSEOP___PATH__ {$$ = TrCreateConstantLeafOp (PARSEOP___PATH__);}
+ | PARSEOP___METHOD__ {$$ = TrCreateConstantLeafOp (PARSEOP___METHOD__);}
;
Integer
- : PARSEOP_INTEGER {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER,
+ : PARSEOP_INTEGER {$$ = TrCreateValuedLeafOp (PARSEOP_INTEGER,
AslCompilerlval.i);}
;
String
- : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
+ : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafOp (PARSEOP_STRING_LITERAL,
(ACPI_NATIVE_INT) AslCompilerlval.s);}
;
@@ -740,7 +741,7 @@
* Type 3/4/5 opcodes
*/
Type2IntegerOpcode /* "Type3" opcodes */
- : Expression {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
+ : Expression {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
| AddTerm {}
| AndTerm {}
| DecTerm {}
@@ -789,7 +790,7 @@
;
Type2BufferOrStringOpcode
- : ConcatTerm {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);}
+ : ConcatTerm {$$ = TrSetOpFlags ($1, OP_COMPILE_TIME_CONST);}
| PrintfTerm {}
| FprintfTerm {}
| MidTerm {}
@@ -839,7 +840,7 @@
******************************************************************************/
AmlPackageLengthTerm
- : Integer {$$ = TrUpdateNode (PARSEOP_PACKAGE_LENGTH,
+ : Integer {$$ = TrSetOpIntegerValue (PARSEOP_PACKAGE_LENGTH,
(ACPI_PARSE_OBJECT *) $1);}
;
@@ -854,14 +855,14 @@
;
OptionalReference
- : {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
- | ',' {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
+ : {$$ = TrCreateLeafOp (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
+ | ',' {$$ = TrCreateLeafOp (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
| ',' TermArg {$$ = $2;}
;
OptionalReturnArg
- : {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO),
- NODE_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */
+ : {$$ = TrSetOpFlags (TrCreateLeafOp (PARSEOP_ZERO),
+ OP_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */
| TermArg {$$ = $1;}
;
@@ -872,7 +873,7 @@
;
OptionalTermArg
- : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
+ : {$$ = TrCreateLeafOp (PARSEOP_DEFAULT_ARG);}
| TermArg {$$ = $1;}
;
Modified: trunk/sys/contrib/dev/acpica/compiler/aslstartup.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslstartup.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslstartup.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -238,7 +238,7 @@
{
Gbl_CommentState.SpacesBefore = 0;
Gbl_CommentState.CommentType = 1;
- Gbl_CommentState.Latest_Parse_Node = NULL;
+ Gbl_CommentState.LatestParseOp = NULL;
Gbl_CommentState.ParsingParenBraceNode = NULL;
Gbl_CommentState.CaptureComments = TRUE;
}
Modified: trunk/sys/contrib/dev/acpica/compiler/aslsupport.y
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslsupport.y 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslsupport.y 2018-10-21 17:19:58 UTC (rev 12112)
@@ -196,7 +196,7 @@
void)
{
- return (TrCreateLeafNode (PARSEOP_ERRORNODE));
+ return (TrCreateLeafOp (PARSEOP_ERRORNODE));
}
Modified: trunk/sys/contrib/dev/acpica/compiler/asltokens.y
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/asltokens.y 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/asltokens.y 2018-10-21 17:19:58 UTC (rev 12112)
@@ -638,3 +638,4 @@
%token <i> PARSEOP___FILE__
%token <i> PARSEOP___LINE__
%token <i> PARSEOP___PATH__
+%token <i> PARSEOP___METHOD__
Modified: trunk/sys/contrib/dev/acpica/compiler/asltransform.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/asltransform.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/asltransform.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -431,7 +431,9 @@
TrTransformSubtree (
ACPI_PARSE_OBJECT *Op)
{
+ ACPI_PARSE_OBJECT *MethodOp;
+
if (Op->Asl.AmlOpcode == AML_RAW_DATA_BYTE)
{
return;
@@ -466,6 +468,35 @@
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:
/* Nothing to do here for other opcodes */
@@ -603,7 +634,7 @@
{
/* Add an ELSE to complete the previous CASE */
- NewOp = TrCreateLeafNode (PARSEOP_ELSE);
+ NewOp = TrCreateLeafOp (PARSEOP_ELSE);
NewOp->Asl.Parent = Conditional->Asl.Parent;
TrAmlInitLineNumbers (NewOp, NewOp->Asl.Parent);
@@ -628,42 +659,42 @@
* If (LNotEqual (Match (Package(<size>){<data>},
* MEQ, _T_x, MTR, Zero, Zero), Ones))
*/
- NewOp2 = TrCreateLeafNode (PARSEOP_MATCHTYPE_MEQ);
+ NewOp2 = TrCreateLeafOp (PARSEOP_MATCHTYPE_MEQ);
Predicate->Asl.Next = NewOp2;
TrAmlInitLineNumbers (NewOp2, Conditional);
NewOp = NewOp2;
- NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESTRING,
+ NewOp2 = TrCreateValuedLeafOp (PARSEOP_NAMESTRING,
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
NewOp->Asl.Next = NewOp2;
TrAmlInitLineNumbers (NewOp2, Predicate);
NewOp = NewOp2;
- NewOp2 = TrCreateLeafNode (PARSEOP_MATCHTYPE_MTR);
+ NewOp2 = TrCreateLeafOp (PARSEOP_MATCHTYPE_MTR);
NewOp->Asl.Next = NewOp2;
TrAmlInitLineNumbers (NewOp2, Predicate);
NewOp = NewOp2;
- NewOp2 = TrCreateLeafNode (PARSEOP_ZERO);
+ NewOp2 = TrCreateLeafOp (PARSEOP_ZERO);
NewOp->Asl.Next = NewOp2;
TrAmlInitLineNumbers (NewOp2, Predicate);
NewOp = NewOp2;
- NewOp2 = TrCreateLeafNode (PARSEOP_ZERO);
+ NewOp2 = TrCreateLeafOp (PARSEOP_ZERO);
NewOp->Asl.Next = NewOp2;
TrAmlInitLineNumbers (NewOp2, Predicate);
- NewOp2 = TrCreateLeafNode (PARSEOP_MATCH);
+ NewOp2 = TrCreateLeafOp (PARSEOP_MATCH);
NewOp2->Asl.Child = Predicate; /* PARSEOP_PACKAGE */
TrAmlInitLineNumbers (NewOp2, Conditional);
TrAmlSetSubtreeParent (Predicate, NewOp2);
NewOp = NewOp2;
- NewOp2 = TrCreateLeafNode (PARSEOP_ONES);
+ NewOp2 = TrCreateLeafOp (PARSEOP_ONES);
NewOp->Asl.Next = NewOp2;
TrAmlInitLineNumbers (NewOp2, Conditional);
- NewOp2 = TrCreateLeafNode (PARSEOP_LEQUAL);
+ NewOp2 = TrCreateLeafOp (PARSEOP_LEQUAL);
NewOp2->Asl.Child = NewOp;
NewOp->Asl.Parent = NewOp2;
TrAmlInitLineNumbers (NewOp2, Conditional);
@@ -670,7 +701,7 @@
TrAmlSetSubtreeParent (NewOp, NewOp2);
NewOp = NewOp2;
- NewOp2 = TrCreateLeafNode (PARSEOP_LNOT);
+ NewOp2 = TrCreateLeafOp (PARSEOP_LNOT);
NewOp2->Asl.Child = NewOp;
NewOp2->Asl.Parent = Conditional;
NewOp->Asl.Parent = NewOp2;
@@ -691,12 +722,12 @@
* CaseOp->Child is the case value
* CaseOp->Child->Peer is the beginning of the case block
*/
- NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESTRING,
+ NewOp = TrCreateValuedLeafOp (PARSEOP_NAMESTRING,
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
NewOp->Asl.Next = Predicate;
TrAmlInitLineNumbers (NewOp, Predicate);
- NewOp2 = TrCreateLeafNode (PARSEOP_LEQUAL);
+ NewOp2 = TrCreateLeafOp (PARSEOP_LEQUAL);
NewOp2->Asl.Parent = Conditional;
NewOp2->Asl.Child = NewOp;
TrAmlInitLineNumbers (NewOp2, Conditional);
@@ -793,7 +824,7 @@
/* Create the Name node */
Predicate = StartNode->Asl.Child;
- NewOp = TrCreateLeafNode (PARSEOP_NAME);
+ NewOp = TrCreateLeafOp (PARSEOP_NAME);
TrAmlInitLineNumbers (NewOp, StartNode);
/* Find the parent method */
@@ -806,7 +837,7 @@
}
MethodOp = Next;
- NewOp->Asl.CompileFlags |= NODE_COMPILER_EMITTED;
+ NewOp->Asl.CompileFlags |= OP_COMPILER_EMITTED;
NewOp->Asl.Parent = Next;
/* Insert name after the method name and arguments */
@@ -837,10 +868,10 @@
/* Create the NameSeg child for the Name node */
- NewOp2 = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
+ NewOp2 = TrCreateValuedLeafOp (PARSEOP_NAMESEG,
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
TrAmlInitLineNumbers (NewOp2, NewOp);
- NewOp2->Asl.CompileFlags |= NODE_IS_NAME_DECLARATION;
+ NewOp2->Asl.CompileFlags |= OP_IS_NAME_DECLARATION;
NewOp->Asl.Child = NewOp2;
/* Create the initial value for the Name. Btype was already validated above */
@@ -849,7 +880,7 @@
{
case ACPI_BTYPE_INTEGER:
- NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_ZERO,
+ NewOp2->Asl.Next = TrCreateValuedLeafOp (PARSEOP_ZERO,
(UINT64) 0);
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
break;
@@ -856,7 +887,7 @@
case ACPI_BTYPE_STRING:
- NewOp2->Asl.Next = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
+ NewOp2->Asl.Next = TrCreateValuedLeafOp (PARSEOP_STRING_LITERAL,
(UINT64) ACPI_TO_INTEGER (""));
TrAmlInitLineNumbers (NewOp2->Asl.Next, NewOp);
break;
@@ -863,17 +894,18 @@
case ACPI_BTYPE_BUFFER:
- (void) TrLinkPeerNode (NewOp2, TrCreateValuedLeafNode (PARSEOP_BUFFER,
+ (void) TrLinkPeerOp (NewOp2, TrCreateValuedLeafOp (PARSEOP_BUFFER,
(UINT64) 0));
Next = NewOp2->Asl.Next;
TrAmlInitLineNumbers (Next, NewOp2);
- (void) TrLinkChildren (Next, 1, TrCreateValuedLeafNode (PARSEOP_ZERO,
+
+ (void) TrLinkOpChildren (Next, 1, TrCreateValuedLeafOp (PARSEOP_ZERO,
(UINT64) 1));
TrAmlInitLineNumbers (Next->Asl.Child, Next);
- BufferOp = TrCreateValuedLeafNode (PARSEOP_DEFAULT_ARG, (UINT64) 0);
+ BufferOp = TrCreateValuedLeafOp (PARSEOP_DEFAULT_ARG, (UINT64) 0);
TrAmlInitLineNumbers (BufferOp, Next->Asl.Child);
- (void) TrLinkPeerNode (Next->Asl.Child, BufferOp);
+ (void) TrLinkPeerOp (Next->Asl.Child, BufferOp);
TrAmlSetSubtreeParent (Next->Asl.Child, Next);
break;
@@ -892,7 +924,7 @@
* where _T_x is the temp variable.
*/
TrAmlInitNode (StartNode, PARSEOP_WHILE);
- NewOp = TrCreateLeafNode (PARSEOP_ONE);
+ NewOp = TrCreateLeafOp (PARSEOP_ONE);
TrAmlInitLineNumbers (NewOp, StartNode);
NewOp->Asl.Next = Predicate->Asl.Next;
NewOp->Asl.Parent = StartNode;
@@ -900,7 +932,7 @@
/* Create a Store() node */
- StoreOp = TrCreateLeafNode (PARSEOP_STORE);
+ StoreOp = TrCreateLeafOp (PARSEOP_STORE);
TrAmlInitLineNumbers (StoreOp, NewOp);
StoreOp->Asl.Parent = StartNode;
TrAmlInsertPeer (NewOp, StoreOp);
@@ -910,7 +942,7 @@
StoreOp->Asl.Child = Predicate;
Predicate->Asl.Parent = StoreOp;
- NewOp = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
+ NewOp = TrCreateValuedLeafOp (PARSEOP_NAMESEG,
(UINT64) ACPI_TO_INTEGER (PredicateValueName));
TrAmlInitLineNumbers (NewOp, StoreOp);
NewOp->Asl.Parent = StoreOp;
@@ -924,7 +956,7 @@
Conditional = Conditional->Asl.Next;
}
- BreakOp = TrCreateLeafNode (PARSEOP_BREAK);
+ BreakOp = TrCreateLeafOp (PARSEOP_BREAK);
TrAmlInitLineNumbers (BreakOp, NewOp);
BreakOp->Asl.Parent = StartNode;
TrAmlInsertPeer (Conditional, BreakOp);
Modified: trunk/sys/contrib/dev/acpica/compiler/asltree.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/asltree.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/asltree.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -1,7 +1,7 @@
/* $MidnightBSD$ */
/******************************************************************************
*
- * Module Name: asltree - parse tree management
+ * Module Name: asltree - Parse tree management
*
*****************************************************************************/
@@ -153,253 +153,27 @@
#include <contrib/dev/acpica/compiler/aslcompiler.h>
#include "aslcompiler.y.h"
#include <contrib/dev/acpica/include/acapps.h>
-#include <contrib/dev/acpica/include/acconvert.h>
-#include <time.h>
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("asltree")
-/* Local prototypes */
-static ACPI_PARSE_OBJECT *
-TrGetNextNode (
- void);
-
-
/*******************************************************************************
*
- * FUNCTION: TrSetParent
+ * FUNCTION: TrSetOpIntegerValue
*
- * PARAMETERS: Op - To be set to new parent
- * ParentOp - The parent
+ * PARAMETERS: ParseOpcode - New opcode to be assigned to the op
+ * Op - An existing parse op
*
- * RETURN: None, sets Op parent directly
+ * RETURN: The updated op
*
- * DESCRIPTION: Change the parent of a parse op.
+ * DESCRIPTION: Used to set the integer value of a op,
+ * usually to a specific size (8, 16, 32, or 64 bits)
*
******************************************************************************/
-void
-TrSetParent (
- ACPI_PARSE_OBJECT *Op,
- ACPI_PARSE_OBJECT *ParentOp)
-{
-
- Op->Asl.Parent = ParentOp;
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrGetNextNode
- *
- * PARAMETERS: None
- *
- * RETURN: New parse node. Aborts on allocation failure
- *
- * DESCRIPTION: Allocate a new parse node for the parse tree. Bypass the local
- * dynamic memory manager for performance reasons (This has a
- * major impact on the speed of the compiler.)
- *
- ******************************************************************************/
-
-static ACPI_PARSE_OBJECT *
-TrGetNextNode (
- void)
-{
- ASL_CACHE_INFO *Cache;
-
-
- if (Gbl_ParseOpCacheNext >= Gbl_ParseOpCacheLast)
- {
- /* Allocate a new buffer */
-
- Cache = UtLocalCalloc (sizeof (Cache->Next) +
- (sizeof (ACPI_PARSE_OBJECT) * ASL_PARSEOP_CACHE_SIZE));
-
- /* Link new cache buffer to head of list */
-
- Cache->Next = Gbl_ParseOpCacheList;
- Gbl_ParseOpCacheList = Cache;
-
- /* Setup cache management pointers */
-
- Gbl_ParseOpCacheNext = ACPI_CAST_PTR (ACPI_PARSE_OBJECT, Cache->Buffer);
- Gbl_ParseOpCacheLast = Gbl_ParseOpCacheNext + ASL_PARSEOP_CACHE_SIZE;
- }
-
- Gbl_ParseOpCount++;
- return (Gbl_ParseOpCacheNext++);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrAllocateNode
- *
- * PARAMETERS: ParseOpcode - Opcode to be assigned to the node
- *
- * RETURN: New parse node. Aborts on allocation failure
- *
- * DESCRIPTION: Allocate and initialize a new parse node for the parse tree
- *
- ******************************************************************************/
-
ACPI_PARSE_OBJECT *
-TrAllocateNode (
- UINT32 ParseOpcode)
-{
- ACPI_PARSE_OBJECT *Op;
- ACPI_PARSE_OBJECT *LatestNode;
-
-
- Op = TrGetNextNode ();
-
- Op->Asl.ParseOpcode = (UINT16) ParseOpcode;
- Op->Asl.Filename = Gbl_Files[ASL_FILE_INPUT].Filename;
- Op->Asl.LineNumber = Gbl_CurrentLineNumber;
- Op->Asl.LogicalLineNumber = Gbl_LogicalLineNumber;
- Op->Asl.LogicalByteOffset = Gbl_CurrentLineOffset;
- Op->Asl.Column = Gbl_CurrentColumn;
-
- UtSetParseOpName (Op);
-
- /* The following is for capturing comments */
-
- if(Gbl_CaptureComments)
- {
- LatestNode = Gbl_CommentState.Latest_Parse_Node;
- Op->Asl.InlineComment = NULL;
- Op->Asl.EndNodeComment = NULL;
- Op->Asl.CommentList = NULL;
- Op->Asl.FileChanged = FALSE;
-
- /*
- * Check to see if the file name has changed before resetting the
- * latest parse node.
- */
- if (LatestNode &&
- (ParseOpcode != PARSEOP_INCLUDE) &&
- (ParseOpcode != PARSEOP_INCLUDE_END) &&
- strcmp (LatestNode->Asl.Filename, Op->Asl.Filename))
- {
- CvDbgPrint ("latest node: %s\n", LatestNode->Asl.ParseOpName);
- Op->Asl.FileChanged = TRUE;
- if (Gbl_IncludeFileStack)
- {
- Op->Asl.ParentFilename = Gbl_IncludeFileStack->Filename;
- }
- else
- {
- Op->Asl.ParentFilename = NULL;
- }
- }
-
- Gbl_CommentState.Latest_Parse_Node = Op;
- CvDbgPrint ("trallocatenode=Set latest parse node to this node.\n");
- CvDbgPrint (" Op->Asl.ParseOpName = %s\n",
- Gbl_CommentState.Latest_Parse_Node->Asl.ParseOpName);
- CvDbgPrint (" Op->Asl.ParseOpcode = 0x%x\n", ParseOpcode);
-
- if (Op->Asl.FileChanged)
- {
- CvDbgPrint(" file has been changed!\n");
- }
-
- /*
- * if this parse op's syntax uses () and {} (i.e. Package(1){0x00}) then
- * set a flag in the comment state. This facilitates paring comments for
- * these types of opcodes.
- */
- if ((CvParseOpBlockType(Op) == (BLOCK_PAREN | BLOCK_BRACE)) &&
- (ParseOpcode != PARSEOP_DEFINITION_BLOCK))
- {
- CvDbgPrint ("Parsing paren/Brace node now!\n");
- Gbl_CommentState.ParsingParenBraceNode = Op;
- }
-
- if (Gbl_Comment_List_Head)
- {
- CvDbgPrint ("Transferring...\n");
- Op->Asl.CommentList = Gbl_Comment_List_Head;
- Gbl_Comment_List_Head = NULL;
- Gbl_Comment_List_Tail = NULL;
- CvDbgPrint (" Transferred current comment list to this node.\n");
- CvDbgPrint (" %s\n", Op->Asl.CommentList->Comment);
- }
- if (Gbl_Inline_Comment_Buffer)
- {
- Op->Asl.InlineComment = Gbl_Inline_Comment_Buffer;
- Gbl_Inline_Comment_Buffer = NULL;
- CvDbgPrint ("Transferred current inline comment list to this node.\n");
- }
-
- }
-
- return (Op);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrReleaseNode
- *
- * PARAMETERS: Op - Op to be released
- *
- * RETURN: None
- *
- * DESCRIPTION: "release" a node. In truth, nothing is done since the node
- * is part of a larger buffer
- *
- ******************************************************************************/
-
-void
-TrReleaseNode (
- ACPI_PARSE_OBJECT *Op)
-{
-
- return;
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrSetCurrentFilename
- *
- * PARAMETERS: Op - An existing parse node
- *
- * RETURN: None
- *
- * DESCRIPTION: Save the include file filename. Used for debug output only.
- *
- ******************************************************************************/
-
-void
-TrSetCurrentFilename (
- ACPI_PARSE_OBJECT *Op)
-{
- Op->Asl.Filename = Gbl_PreviousIncludeFilename;
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrUpdateNode
- *
- * PARAMETERS: ParseOpcode - New opcode to be assigned to the node
- * Op - An existing parse node
- *
- * RETURN: The updated node
- *
- * DESCRIPTION: Change the parse opcode assigned to a node. Usually used to
- * change an opcode to DEFAULT_ARG so that the node is ignored
- * during the code generation. Also used to set generic integers
- * to a specific size (8, 16, 32, or 64 bits)
- *
- ******************************************************************************/
-
-ACPI_PARSE_OBJECT *
-TrUpdateNode (
+TrSetOpIntegerValue (
UINT32 ParseOpcode,
ACPI_PARSE_OBJECT *Op)
{
@@ -410,7 +184,7 @@
}
DbgPrint (ASL_PARSE_OUTPUT,
- "\nUpdateNode: Old - %s, New - %s\n",
+ "\nUpdateOp: Old - %s, New - %s\n",
UtGetOpName (Op->Asl.ParseOpcode),
UtGetOpName (ParseOpcode));
@@ -478,7 +252,8 @@
break;
}
- /* Converter: if this is a method invocation, turn off capture comments. */
+ /* Converter: if this is a method invocation, turn off capture comments */
+
if (Gbl_CaptureComments &&
(ParseOpcode == PARSEOP_METHODCALL))
{
@@ -491,164 +266,19 @@
/*******************************************************************************
*
- * FUNCTION: TrPrintNodeCompileFlags
+ * FUNCTION: TrSetOpFlags
*
- * PARAMETERS: Flags - Flags word to be decoded
- *
- * RETURN: None
- *
- * DESCRIPTION: Decode a flags word to text. Displays all flags that are set.
- *
- ******************************************************************************/
-
-void
-TrPrintNodeCompileFlags (
- UINT32 Flags)
-{
- UINT32 i;
- UINT32 FlagBit = 1;
- char *FlagName = NULL;
-
-
- for (i = 0; i < 32; i++)
- {
- switch (Flags & FlagBit)
- {
- case NODE_VISITED:
-
- FlagName = "NODE_VISITED";
- break;
-
- case NODE_AML_PACKAGE:
-
- FlagName = "NODE_AML_PACKAGE";
- break;
-
- case NODE_IS_TARGET:
-
- FlagName = "NODE_IS_TARGET";
- break;
-
- case NODE_IS_RESOURCE_DESC:
-
- FlagName = "NODE_IS_RESOURCE_DESC";
- break;
-
- case NODE_IS_RESOURCE_FIELD:
-
- FlagName = "NODE_IS_RESOURCE_FIELD";
- break;
-
- case NODE_HAS_NO_EXIT:
-
- FlagName = "NODE_HAS_NO_EXIT";
- break;
-
- case NODE_IF_HAS_NO_EXIT:
-
- FlagName = "NODE_IF_HAS_NO_EXIT";
- break;
-
- case NODE_NAME_INTERNALIZED:
-
- FlagName = "NODE_NAME_INTERNALIZED";
- break;
-
- case NODE_METHOD_NO_RETVAL:
-
- FlagName = "NODE_METHOD_NO_RETVAL";
- break;
-
- case NODE_METHOD_SOME_NO_RETVAL:
-
- FlagName = "NODE_METHOD_SOME_NO_RETVAL";
- break;
-
- case NODE_RESULT_NOT_USED:
-
- FlagName = "NODE_RESULT_NOT_USED";
- break;
-
- case NODE_METHOD_TYPED:
-
- FlagName = "NODE_METHOD_TYPED";
- break;
-
- case NODE_COULD_NOT_REDUCE:
-
- FlagName = "NODE_COULD_NOT_REDUCE";
- break;
-
- case NODE_COMPILE_TIME_CONST:
-
- FlagName = "NODE_COMPILE_TIME_CONST";
- break;
-
- case NODE_IS_TERM_ARG:
-
- FlagName = "NODE_IS_TERM_ARG";
- break;
-
- case NODE_WAS_ONES_OP:
-
- FlagName = "NODE_WAS_ONES_OP";
- break;
-
- case NODE_IS_NAME_DECLARATION:
-
- FlagName = "NODE_IS_NAME_DECLARATION";
- break;
-
- case NODE_COMPILER_EMITTED:
-
- FlagName = "NODE_COMPILER_EMITTED";
- break;
-
- case NODE_IS_DUPLICATE:
-
- FlagName = "NODE_IS_DUPLICATE";
- break;
-
- case NODE_IS_RESOURCE_DATA:
-
- FlagName = "NODE_IS_RESOURCE_DATA";
- break;
-
- case NODE_IS_NULL_RETURN:
-
- FlagName = "NODE_IS_NULL_RETURN";
- break;
-
- default:
- break;
- }
-
- if (FlagName)
- {
- DbgPrint (ASL_PARSE_OUTPUT, " %s", FlagName);
- FlagName = NULL;
- }
-
- FlagBit <<= 1;
- }
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrSetNodeFlags
- *
- * PARAMETERS: Op - An existing parse node
+ * PARAMETERS: Op - An existing parse op
* Flags - New flags word
*
* RETURN: The updated parser op
*
- * DESCRIPTION: Set bits in the node flags word. Will not clear bits, only set
+ * DESCRIPTION: Set bits in the op flags word. Will not clear bits, only set
*
******************************************************************************/
ACPI_PARSE_OBJECT *
-TrSetNodeFlags (
+TrSetOpFlags (
ACPI_PARSE_OBJECT *Op,
UINT32 Flags)
{
@@ -659,9 +289,9 @@
}
DbgPrint (ASL_PARSE_OUTPUT,
- "\nSetNodeFlags: %s Op %p, %8.8X", Op->Asl.ParseOpName, Op, Flags);
+ "\nSetOpFlags: %s Op %p, %8.8X", Op->Asl.ParseOpName, Op, Flags);
- TrPrintNodeCompileFlags (Flags);
+ TrPrintOpFlags (Flags, ASL_PARSE_OUTPUT);
DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
Op->Asl.CompileFlags |= Flags;
@@ -671,27 +301,27 @@
/*******************************************************************************
*
- * FUNCTION: TrSetNodeAmlLength
+ * FUNCTION: TrSetOpAmlLength
*
- * PARAMETERS: Op - An existing parse node
+ * PARAMETERS: Op - An existing parse op
* Length - AML Length
*
* RETURN: The updated parser op
*
- * DESCRIPTION: Set the AML Length in a node. Used by the parser to indicate
- * the presence of a node that must be reduced to a fixed length
+ * DESCRIPTION: Set the AML Length in a op. Used by the parser to indicate
+ * the presence of a op that must be reduced to a fixed length
* constant.
*
******************************************************************************/
ACPI_PARSE_OBJECT *
-TrSetNodeAmlLength (
+TrSetOpAmlLength (
ACPI_PARSE_OBJECT *Op,
UINT32 Length)
{
DbgPrint (ASL_PARSE_OUTPUT,
- "\nSetNodeAmlLength: Op %p, %8.8X\n", Op, Length);
+ "\nSetOpAmlLength: Op %p, %8.8X\n", Op, Length);
if (!Op)
{
@@ -705,646 +335,95 @@
/*******************************************************************************
*
- * FUNCTION: TrSetEndLineNumber
+ * FUNCTION: TrSetOpParent
*
- * PARAMETERS: Op - An existing parse node
+ * PARAMETERS: Op - To be set to new parent
+ * ParentOp - The parent
*
- * RETURN: None.
+ * RETURN: None, sets Op parent directly
*
- * DESCRIPTION: Set the ending line numbers (file line and logical line) of a
- * parse node to the current line numbers.
+ * DESCRIPTION: Change the parent of a parse op.
*
******************************************************************************/
void
-TrSetEndLineNumber (
- ACPI_PARSE_OBJECT *Op)
-{
-
- /* If the end line # is already set, just return */
-
- if (Op->Asl.EndLine)
- {
- return;
- }
-
- Op->Asl.EndLine = Gbl_CurrentLineNumber;
- Op->Asl.EndLogicalLine = Gbl_LogicalLineNumber;
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrCreateAssignmentNode
- *
- * PARAMETERS: Target - Assignment target
- * Source - Assignment source
- *
- * RETURN: Pointer to the new node. Aborts on allocation failure
- *
- * DESCRIPTION: Implements the C-style '=' operator. It changes the parse
- * tree if possible to utilize the last argument of the math
- * operators which is a target operand -- thus saving invocation
- * of and additional Store() operator. An optimization.
- *
- ******************************************************************************/
-
-ACPI_PARSE_OBJECT *
-TrCreateAssignmentNode (
- ACPI_PARSE_OBJECT *Target,
- ACPI_PARSE_OBJECT *Source)
-{
- ACPI_PARSE_OBJECT *TargetOp;
- ACPI_PARSE_OBJECT *SourceOp1;
- ACPI_PARSE_OBJECT *SourceOp2;
- ACPI_PARSE_OBJECT *Operator;
-
-
- DbgPrint (ASL_PARSE_OUTPUT,
- "\nTrCreateAssignmentNode Line [%u to %u] Source %s Target %s\n",
- Source->Asl.LineNumber, Source->Asl.EndLine,
- UtGetOpName (Source->Asl.ParseOpcode),
- UtGetOpName (Target->Asl.ParseOpcode));
-
- TrSetNodeFlags (Target, NODE_IS_TARGET);
-
- switch (Source->Asl.ParseOpcode)
- {
- /*
- * Only these operators can be optimized because they have
- * a target operand
- */
- case PARSEOP_ADD:
- case PARSEOP_AND:
- case PARSEOP_DIVIDE:
- case PARSEOP_INDEX:
- case PARSEOP_MOD:
- case PARSEOP_MULTIPLY:
- case PARSEOP_NOT:
- case PARSEOP_OR:
- case PARSEOP_SHIFTLEFT:
- case PARSEOP_SHIFTRIGHT:
- case PARSEOP_SUBTRACT:
- case PARSEOP_XOR:
-
- break;
-
- /* Otherwise, just create a normal Store operator */
-
- default:
-
- goto CannotOptimize;
- }
-
- /*
- * Transform the parse tree such that the target is moved to the
- * last operand of the operator
- */
- SourceOp1 = Source->Asl.Child;
- SourceOp2 = SourceOp1->Asl.Next;
-
- /* NOT only has one operand, but has a target */
-
- if (Source->Asl.ParseOpcode == PARSEOP_NOT)
- {
- SourceOp2 = SourceOp1;
- }
-
- /* DIVIDE has an extra target operand (remainder) */
-
- if (Source->Asl.ParseOpcode == PARSEOP_DIVIDE)
- {
- SourceOp2 = SourceOp2->Asl.Next;
- }
-
- TargetOp = SourceOp2->Asl.Next;
-
- /*
- * Can't perform this optimization if there already is a target
- * for the operator (ZERO is a "no target" placeholder).
- */
- if (TargetOp->Asl.ParseOpcode != PARSEOP_ZERO)
- {
- goto CannotOptimize;
- }
-
- /* Link in the target as the final operand */
-
- SourceOp2->Asl.Next = Target;
- Target->Asl.Parent = Source;
-
- return (Source);
-
-
-CannotOptimize:
-
- Operator = TrAllocateNode (PARSEOP_STORE);
- TrLinkChildren (Operator, 2, Source, Target);
-
- /* Set the appropriate line numbers for the new node */
-
- Operator->Asl.LineNumber = Target->Asl.LineNumber;
- Operator->Asl.LogicalLineNumber = Target->Asl.LogicalLineNumber;
- Operator->Asl.LogicalByteOffset = Target->Asl.LogicalByteOffset;
- Operator->Asl.Column = Target->Asl.Column;
-
- return (Operator);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrCreateLeafNode
- *
- * PARAMETERS: ParseOpcode - New opcode to be assigned to the node
- *
- * RETURN: Pointer to the new node. Aborts on allocation failure
- *
- * DESCRIPTION: Create a simple leaf node (no children or peers, and no value
- * assigned to the node)
- *
- ******************************************************************************/
-
-ACPI_PARSE_OBJECT *
-TrCreateLeafNode (
- UINT32 ParseOpcode)
-{
- ACPI_PARSE_OBJECT *Op;
-
-
- Op = TrAllocateNode (ParseOpcode);
-
- DbgPrint (ASL_PARSE_OUTPUT,
- "\nCreateLeafNode Ln/Col %u/%u NewNode %p Op %s\n\n",
- Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode));
-
- return (Op);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrCreateNullTarget
- *
- * PARAMETERS: None
- *
- * RETURN: Pointer to the new node. Aborts on allocation failure
- *
- * DESCRIPTION: Create a "null" target node. This is defined by the ACPI
- * specification to be a zero AML opcode, and indicates that
- * no target has been specified for the parent operation
- *
- ******************************************************************************/
-
-ACPI_PARSE_OBJECT *
-TrCreateNullTarget (
- void)
-{
- ACPI_PARSE_OBJECT *Op;
-
-
- Op = TrAllocateNode (PARSEOP_ZERO);
- Op->Asl.CompileFlags |= (NODE_IS_TARGET | NODE_COMPILE_TIME_CONST);
-
- DbgPrint (ASL_PARSE_OUTPUT,
- "\nCreateNullTarget Ln/Col %u/%u NewNode %p Op %s\n",
- Op->Asl.LineNumber, Op->Asl.Column, Op,
- UtGetOpName (Op->Asl.ParseOpcode));
-
- return (Op);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrCreateConstantLeafNode
- *
- * PARAMETERS: ParseOpcode - The constant opcode
- *
- * RETURN: Pointer to the new node. Aborts on allocation failure
- *
- * DESCRIPTION: Create a leaf node (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.
- *
- ******************************************************************************/
-
-ACPI_PARSE_OBJECT *
-TrCreateConstantLeafNode (
- UINT32 ParseOpcode)
-{
- ACPI_PARSE_OBJECT *Op = NULL;
- time_t CurrentTime;
- char *StaticTimeString;
- char *TimeString;
- char *Filename;
-
-
- switch (ParseOpcode)
- {
- case PARSEOP___LINE__:
-
- Op = TrAllocateNode (PARSEOP_INTEGER);
- Op->Asl.Value.Integer = Op->Asl.LineNumber;
- break;
-
- case PARSEOP___PATH__:
-
- Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
-
- /* Op.Asl.Filename contains the full pathname to the file */
-
- Op->Asl.Value.String = Op->Asl.Filename;
- break;
-
- case PARSEOP___FILE__:
-
- Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
-
- /* Get the simple filename from the full path */
-
- FlSplitInputPathname (Op->Asl.Filename, NULL, &Filename);
- Op->Asl.Value.String = Filename;
- break;
-
- case PARSEOP___DATE__:
-
- Op = TrAllocateNode (PARSEOP_STRING_LITERAL);
-
- /* Get a copy of the current time */
-
- CurrentTime = time (NULL);
- StaticTimeString = ctime (&CurrentTime);
- TimeString = UtLocalCalloc (strlen (StaticTimeString) + 1);
- strcpy (TimeString, StaticTimeString);
-
- TimeString[strlen(TimeString) -1] = 0; /* Remove trailing newline */
- Op->Asl.Value.String = TimeString;
- break;
-
- default: /* This would be an internal error */
-
- return (NULL);
- }
-
- DbgPrint (ASL_PARSE_OUTPUT,
- "\nCreateConstantLeafNode Ln/Col %u/%u NewNode %p "
- "Op %s Value %8.8X%8.8X \n",
- Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName (ParseOpcode),
- ACPI_FORMAT_UINT64 (Op->Asl.Value.Integer));
- return (Op);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: TrCreateTargetOperand
- *
- * PARAMETERS: OriginalOp - Op to be copied
- *
- * RETURN: Pointer to the new node. Aborts on allocation failure
- *
- * DESCRIPTION: Copy an existing node (and subtree). Used in ASL+ (C-style)
- * expressions where the target is the same as one of the
- * operands. A new node and subtree must be created from the
- * original so that the parse tree can be linked properly.
- *
- * NOTE: This code is specific to target operands that are the last
- * operand in an ASL/AML operator. Meaning that the top-level
- * parse Op in a possible subtree has a NULL Next pointer.
- * This simplifies the recursion.
- *
- * Subtree example:
- * DeRefOf (Local1) += 32
- *
- * This gets converted to:
- * Add (DeRefOf (Local1), 32, DeRefOf (Local1))
- *
- * Each DeRefOf has a single child, Local1. Even more complex
- * subtrees can be created via the Index and DeRefOf operators.
- *
- ******************************************************************************/
-
-ACPI_PARSE_OBJECT *
-TrCreateTargetOperand (
- ACPI_PARSE_OBJECT *OriginalOp,
+TrSetOpParent (
+ ACPI_PARSE_OBJECT *Op,
ACPI_PARSE_OBJECT *ParentOp)
{
- ACPI_PARSE_OBJECT *Op;
-
- if (!OriginalOp)
- {
- return (NULL);
- }
-
- Op = TrGetNextNode ();
-
- /* Copy the pertinent values (omit link pointer fields) */
-
- Op->Asl.Value = OriginalOp->Asl.Value;
- Op->Asl.Filename = OriginalOp->Asl.Filename;
- Op->Asl.LineNumber = OriginalOp->Asl.LineNumber;
- Op->Asl.LogicalLineNumber = OriginalOp->Asl.LogicalLineNumber;
- Op->Asl.LogicalByteOffset = OriginalOp->Asl.LogicalByteOffset;
- Op->Asl.Column = OriginalOp->Asl.Column;
- Op->Asl.Flags = OriginalOp->Asl.Flags;
- Op->Asl.CompileFlags = OriginalOp->Asl.CompileFlags;
- Op->Asl.AmlOpcode = OriginalOp->Asl.AmlOpcode;
- Op->Asl.ParseOpcode = OriginalOp->Asl.ParseOpcode;
- Op->Asl.Parent = ParentOp;
- UtSetParseOpName (Op);
-
- /* Copy a possible subtree below this node */
-
- if (OriginalOp->Asl.Child)
- {
- Op->Asl.Child = TrCreateTargetOperand (OriginalOp->Asl.Child, Op);
- }
-
- if (OriginalOp->Asl.Next) /* Null for top-level node */
- {
- Op->Asl.Next = TrCreateTargetOperand (OriginalOp->Asl.Next, ParentOp);
- }
-
- return (Op);
+ Op->Asl.Parent = ParentOp;
}
/*******************************************************************************
*
- * FUNCTION: TrCreateValuedLeafNode
+ * FUNCTION: TrSetOpCurrentFilename
*
- * PARAMETERS: ParseOpcode - New opcode to be assigned to the node
- * Value - Value to be assigned to the node
+ * PARAMETERS: Op - An existing parse op
*
- * RETURN: Pointer to the new node. Aborts on allocation failure
+ * RETURN: None
*
- * DESCRIPTION: Create a leaf node (no children or peers) with a value
- * assigned to it
+ * DESCRIPTION: Save the include file filename. Used for debug output only.
*
******************************************************************************/
-ACPI_PARSE_OBJECT *
-TrCreateValuedLeafNode (
- UINT32 ParseOpcode,
- UINT64 Value)
+void
+TrSetOpCurrentFilename (
+ ACPI_PARSE_OBJECT *Op)
{
- ACPI_PARSE_OBJECT *Op;
-
- Op = TrAllocateNode (ParseOpcode);
-
- DbgPrint (ASL_PARSE_OUTPUT,
- "\nCreateValuedLeafNode Ln/Col %u/%u NewNode %p "
- "Op %s Value %8.8X%8.8X ",
- Op->Asl.LineNumber, Op->Asl.Column, Op, UtGetOpName(ParseOpcode),
- ACPI_FORMAT_UINT64 (Value));
- Op->Asl.Value.Integer = Value;
-
- switch (ParseOpcode)
- {
- case PARSEOP_STRING_LITERAL:
-
- DbgPrint (ASL_PARSE_OUTPUT, "STRING->%s", Value);
- break;
-
- case PARSEOP_NAMESEG:
-
- DbgPrint (ASL_PARSE_OUTPUT, "NAMESEG->%s", Value);
- break;
-
- case PARSEOP_NAMESTRING:
-
- DbgPrint (ASL_PARSE_OUTPUT, "NAMESTRING->%s", Value);
- break;
-
- case PARSEOP_EISAID:
-
- DbgPrint (ASL_PARSE_OUTPUT, "EISAID->%s", Value);
- break;
-
- case PARSEOP_METHOD:
-
- DbgPrint (ASL_PARSE_OUTPUT, "METHOD");
- break;
-
- case PARSEOP_INTEGER:
-
- DbgPrint (ASL_PARSE_OUTPUT, "INTEGER->%8.8X%8.8X",
- ACPI_FORMAT_UINT64 (Value));
- break;
-
- default:
-
- break;
- }
-
- DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
- return (Op);
+ Op->Asl.Filename = Gbl_PreviousIncludeFilename;
}
/*******************************************************************************
*
- * FUNCTION: TrCreateNode
+ * FUNCTION: TrSetOpEndLineNumber
*
- * PARAMETERS: ParseOpcode - Opcode to be assigned to the node
- * NumChildren - Number of children to follow
- * ... - A list of child nodes to link to the new
- * node. NumChildren long.
+ * PARAMETERS: Op - An existing parse op
*
- * RETURN: Pointer to the new node. Aborts on allocation failure
+ * RETURN: None.
*
- * DESCRIPTION: Create a new parse node and link together a list of child
- * nodes underneath the new node.
+ * DESCRIPTION: Set the ending line numbers (file line and logical line) of a
+ * parse op to the current line numbers.
*
******************************************************************************/
-ACPI_PARSE_OBJECT *
-TrCreateNode (
- UINT32 ParseOpcode,
- UINT32 NumChildren,
- ...)
+void
+TrSetOpEndLineNumber (
+ ACPI_PARSE_OBJECT *Op)
{
- ACPI_PARSE_OBJECT *Op;
- ACPI_PARSE_OBJECT *Child;
- ACPI_PARSE_OBJECT *PrevChild;
- va_list ap;
- UINT32 i;
- BOOLEAN FirstChild;
+ /* If the end line # is already set, just return */
- va_start (ap, NumChildren);
-
- /* Allocate one new node */
-
- Op = TrAllocateNode (ParseOpcode);
-
- DbgPrint (ASL_PARSE_OUTPUT,
- "\nCreateNode Ln/Col %u/%u NewParent %p Child %u Op %s ",
- Op->Asl.LineNumber, Op->Asl.Column, Op,
- NumChildren, UtGetOpName(ParseOpcode));
-
- /* Some extra debug output based on the parse opcode */
-
- switch (ParseOpcode)
+ if (Op->Asl.EndLine)
{
- case PARSEOP_ASL_CODE:
-
- Gbl_ParseTreeRoot = Op;
- Op->Asl.ParseOpcode = PARSEOP_DEFAULT_ARG;
- DbgPrint (ASL_PARSE_OUTPUT, "ASLCODE (Tree Completed)->");
- break;
-
- case PARSEOP_DEFINITION_BLOCK:
-
- DbgPrint (ASL_PARSE_OUTPUT, "DEFINITION_BLOCK (Tree Completed)->");
- break;
-
- case PARSEOP_OPERATIONREGION:
-
- DbgPrint (ASL_PARSE_OUTPUT, "OPREGION->");
- break;
-
- case PARSEOP_OR:
-
- DbgPrint (ASL_PARSE_OUTPUT, "OR->");
- break;
-
- default:
-
- /* Nothing to do for other opcodes */
-
- break;
+ return;
}
- /* Link the new node to its children */
-
- PrevChild = NULL;
- FirstChild = TRUE;
- for (i = 0; i < NumChildren; i++)
- {
- /* Get the next child */
-
- Child = va_arg (ap, ACPI_PARSE_OBJECT *);
- DbgPrint (ASL_PARSE_OUTPUT, "%p, ", Child);
-
- /*
- * If child is NULL, this means that an optional argument
- * was omitted. We must create a placeholder with a special
- * opcode (DEFAULT_ARG) so that the code generator will know
- * that it must emit the correct default for this argument
- */
- if (!Child)
- {
- Child = TrAllocateNode (PARSEOP_DEFAULT_ARG);
- }
-
- /* Link first child to parent */
-
- if (FirstChild)
- {
- FirstChild = FALSE;
- Op->Asl.Child = Child;
-
- /*
- * For the ASL-/ASL+ converter: if the ParseOp is a connection,
- * external, offset or accessAs, it means that the comments in the
- * FirstChild belongs to their parent due to the parsing order in
- * the .y files. To correct this, take the comments in the
- * FirstChild place it in the parent. This also means that
- * legitimate comments for the child gets put to the parent.
- */
- if (Gbl_CaptureComments &&
- ((ParseOpcode == PARSEOP_CONNECTION) ||
- (ParseOpcode == PARSEOP_EXTERNAL) ||
- (ParseOpcode == PARSEOP_OFFSET) ||
- (ParseOpcode == PARSEOP_ACCESSAS)))
- {
- Op->Asl.CommentList = Child->Asl.CommentList;
- Op->Asl.EndBlkComment = Child->Asl.EndBlkComment;
- Op->Asl.InlineComment = Child->Asl.InlineComment;
- Op->Asl.FileChanged = Child->Asl.FileChanged;
-
- Child->Asl.CommentList = NULL;
- Child->Asl.EndBlkComment = NULL;
- Child->Asl.InlineComment = NULL;
- Child->Asl.FileChanged = FALSE;
-
- /*
- * These do not need to be "passed off". They can be copied
- * because the code for these opcodes should be printed in the
- * same file.
- */
- Op->Asl.Filename = Child->Asl.Filename;
- Op->Asl.ParentFilename = Child->Asl.ParentFilename;
- }
- }
-
- /* Point all children to parent */
-
- Child->Asl.Parent = Op;
-
- /* Link children in a peer list */
-
- if (PrevChild)
- {
- PrevChild->Asl.Next = Child;
- };
-
- /* Get the comment from last child in the resource template call */
-
- if (Gbl_CaptureComments &&
- (Op->Asl.ParseOpcode == PARSEOP_RESOURCETEMPLATE))
- {
- CvDbgPrint ("Transferred current comment list to this node.\n");
- Op->Asl.CommentList = Child->Asl.CommentList;
- Child->Asl.CommentList = NULL;
- Op->Asl.InlineComment = Child->Asl.InlineComment;
- Child->Asl.InlineComment = NULL;
- }
-
- /*
- * This child might be a list, point all nodes in the list
- * to the same parent
- */
- while (Child->Asl.Next)
- {
- Child = Child->Asl.Next;
- Child->Asl.Parent = Op;
- }
-
- PrevChild = Child;
- }
- va_end(ap);
-
- DbgPrint (ASL_PARSE_OUTPUT, "\n");
- return (Op);
+ Op->Asl.EndLine = Gbl_CurrentLineNumber;
+ Op->Asl.EndLogicalLine = Gbl_LogicalLineNumber;
}
/*******************************************************************************
*
- * FUNCTION: TrLinkChildren
+ * FUNCTION: TrLinkOpChildren
*
- * PARAMETERS: Op - An existing parse node
+ * PARAMETERS: Op - An existing parse op
* NumChildren - Number of children to follow
- * ... - A list of child nodes to link to the new
- * node. NumChildren long.
+ * ... - A list of child ops to link to the new
+ * op. NumChildren long.
*
- * RETURN: The updated (linked) node
+ * RETURN: The updated (linked) op
*
- * DESCRIPTION: Link a group of nodes to an existing parse node
+ * DESCRIPTION: Link a group of ops to an existing parse op
*
******************************************************************************/
ACPI_PARSE_OBJECT *
-TrLinkChildren (
+TrLinkOpChildren (
ACPI_PARSE_OBJECT *Op,
UINT32 NumChildren,
...)
@@ -1358,9 +437,8 @@
va_start (ap, NumChildren);
+ TrSetOpEndLineNumber (Op);
- TrSetEndLineNumber (Op);
-
DbgPrint (ASL_PARSE_OUTPUT,
"\nLinkChildren Line [%u to %u] NewParent %p Child %u Op %s ",
Op->Asl.LineNumber, Op->Asl.EndLine,
@@ -1404,19 +482,19 @@
/*
* If there are "regular comments" detected at this point,
* then is an endBlk comment. Categorize it as so and distribute
- * all regular comments to this parse node.
+ * all regular comments to this parse op.
*/
- if (Gbl_Comment_List_Head)
+ if (Gbl_CommentListHead)
{
- Op->Asl.EndBlkComment = Gbl_Comment_List_Head;
+ Op->Asl.EndBlkComment = Gbl_CommentListHead;
CvDbgPrint ("EndBlk Comment for %s: %s",
- Op->Asl.ParseOpName, Gbl_Comment_List_Head->Comment);
- Gbl_Comment_List_Head = NULL;
- Gbl_Comment_List_Tail = NULL;
+ Op->Asl.ParseOpName, Gbl_CommentListHead->Comment);
+ Gbl_CommentListHead = NULL;
+ Gbl_CommentListTail = NULL;
}
}
- /* Link the new node to it's children */
+ /* Link the new op to it's children */
PrevChild = NULL;
FirstChild = TRUE;
@@ -1427,7 +505,7 @@
if ((Child == PrevChild) && (Child != NULL))
{
AslError (ASL_WARNING, ASL_MSG_COMPILER_INTERNAL, Child,
- "Child node list invalid");
+ "Child op list invalid");
va_end(ap);
return (Op);
}
@@ -1442,7 +520,7 @@
*/
if (!Child)
{
- Child = TrAllocateNode (PARSEOP_DEFAULT_ARG);
+ Child = TrAllocateOp (PARSEOP_DEFAULT_ARG);
}
/* Link first child to parent */
@@ -1462,10 +540,10 @@
if (PrevChild)
{
PrevChild->Asl.Next = Child;
- };
+ }
/*
- * This child might be a list, point all nodes in the list
+ * This child might be a list, point all ops in the list
* to the same parent
*/
while (Child->Asl.Next)
@@ -1480,12 +558,12 @@
va_end(ap);
DbgPrint (ASL_PARSE_OUTPUT, "\n\n");
-
if(Gbl_CaptureComments)
{
- Gbl_CommentState.Latest_Parse_Node = Op;
- CvDbgPrint ("trlinkchildren=====Set latest parse node to this node.\n");
+ Gbl_CommentState.LatestParseOp = Op;
+ CvDbgPrint ("TrLinkOpChildren=====Set latest parse op to this op.\n");
}
+
return (Op);
}
@@ -1492,19 +570,19 @@
/*******************************************************************************
*
- * FUNCTION: TrLinkPeerNode
+ * FUNCTION: TrLinkPeerOp
*
* PARAMETERS: Op1 - First peer
* Op2 - Second peer
*
- * RETURN: Op1 or the non-null node.
+ * RETURN: Op1 or the non-null op.
*
- * DESCRIPTION: Link two nodes as peers. Handles cases where one peer is null.
+ * DESCRIPTION: Link two ops as peers. Handles cases where one peer is null.
*
******************************************************************************/
ACPI_PARSE_OBJECT *
-TrLinkPeerNode (
+TrLinkPeerOp (
ACPI_PARSE_OBJECT *Op1,
ACPI_PARSE_OBJECT *Op2)
{
@@ -1512,7 +590,7 @@
DbgPrint (ASL_PARSE_OUTPUT,
- "\nLinkPeerNode: 1=%p (%s), 2=%p (%s)\n",
+ "\nLinkPeerOp: 1=%p (%s), 2=%p (%s)\n",
Op1, Op1 ? UtGetOpName(Op1->Asl.ParseOpcode) : NULL,
Op2, Op2 ? UtGetOpName(Op2->Asl.ParseOpcode) : NULL);
@@ -1519,11 +597,11 @@
if ((!Op1) && (!Op2))
{
- DbgPrint (ASL_PARSE_OUTPUT, "\nTwo Null nodes!\n");
+ DbgPrint (ASL_PARSE_OUTPUT, "\nTwo Null ops!\n");
return (Op1);
}
- /* If one of the nodes is null, just return the non-null node */
+ /* If one of the ops is null, just return the non-null op */
if (!Op2)
{
@@ -1538,10 +616,10 @@
if (Op1 == Op2)
{
DbgPrint (ASL_DEBUG_OUTPUT,
- "\n************* Internal error, linking node to itself %p\n",
+ "\n************* Internal error, linking op to itself %p\n",
Op1);
AslError (ASL_WARNING, ASL_MSG_COMPILER_INTERNAL, Op1,
- "Linking node to itself");
+ "Linking op to itself");
return (Op1);
}
@@ -1565,19 +643,19 @@
/*******************************************************************************
*
- * FUNCTION: TrLinkPeerNodes
+ * FUNCTION: TrLinkPeerOps
*
- * PARAMETERS: NumPeers - The number of nodes in the list to follow
- * ... - A list of nodes to link together as peers
+ * PARAMETERS: NumPeers - The number of ops in the list to follow
+ * ... - A list of ops to link together as peers
*
- * RETURN: The first node in the list (head of the peer list)
+ * RETURN: The first op in the list (head of the peer list)
*
- * DESCRIPTION: Link together an arbitrary number of peer nodes.
+ * DESCRIPTION: Link together an arbitrary number of peer ops.
*
******************************************************************************/
ACPI_PARSE_OBJECT *
-TrLinkPeerNodes (
+TrLinkPeerOps (
UINT32 NumPeers,
...)
{
@@ -1589,7 +667,7 @@
DbgPrint (ASL_PARSE_OUTPUT,
- "\nLinkPeerNodes: (%u) ", NumPeers);
+ "\nLinkPeerOps: (%u) ", NumPeers);
va_start (ap, NumPeers);
This = va_arg (ap, ACPI_PARSE_OBJECT *);
@@ -1607,21 +685,21 @@
This = This->Asl.Next;
}
- /* Get another peer node */
+ /* Get another peer op */
Next = va_arg (ap, ACPI_PARSE_OBJECT *);
if (!Next)
{
- Next = TrAllocateNode (PARSEOP_DEFAULT_ARG);
+ Next = TrAllocateOp (PARSEOP_DEFAULT_ARG);
}
- /* link new node to the current node */
+ /* link new op to the current op */
This->Asl.Next = Next;
This = Next;
}
+
va_end (ap);
-
DbgPrint (ASL_PARSE_OUTPUT,"\n");
return (Start);
}
@@ -1629,19 +707,19 @@
/*******************************************************************************
*
- * FUNCTION: TrLinkChildNode
+ * FUNCTION: TrLinkChildOp
*
- * PARAMETERS: Op1 - Parent node
+ * PARAMETERS: Op1 - Parent op
* Op2 - Op to become a child
*
- * RETURN: The parent node
+ * RETURN: The parent op
*
- * DESCRIPTION: Link two nodes together as a parent and child
+ * DESCRIPTION: Link two ops together as a parent and child
*
******************************************************************************/
ACPI_PARSE_OBJECT *
-TrLinkChildNode (
+TrLinkChildOp (
ACPI_PARSE_OBJECT *Op1,
ACPI_PARSE_OBJECT *Op2)
{
@@ -1649,12 +727,12 @@
DbgPrint (ASL_PARSE_OUTPUT,
- "\nLinkChildNode: Parent=%p (%s), Child=%p (%s)\n",
+ "\nLinkChildOp: Parent=%p (%s), Child=%p (%s)\n",
Op1, Op1 ? UtGetOpName(Op1->Asl.ParseOpcode): NULL,
Op2, Op2 ? UtGetOpName(Op2->Asl.ParseOpcode): NULL);
/*
- * Converter: if TrLinkChildNode is called to link a method call,
+ * Converter: if TrLinkChildOp is called to link a method call,
* turn on capture comments as it signifies that we are done parsing
* a method call.
*/
@@ -1664,8 +742,9 @@
{
Gbl_CommentState.CaptureComments = TRUE;
}
- Gbl_CommentState.Latest_Parse_Node = Op1;
+ Gbl_CommentState.LatestParseOp = Op1;
}
+
if (!Op1 || !Op2)
{
return (Op1);
@@ -1690,7 +769,8 @@
*
* FUNCTION: TrWalkParseTree
*
- * PARAMETERS: Visitation - Type of walk
+ * PARAMETERS: Op - Walk starting point
+ * Visitation - Type of walk
* DescendingCallback - Called during tree descent
* AscendingCallback - Called during tree ascent
* Context - To be passed to the callbacks
@@ -1710,7 +790,7 @@
void *Context)
{
UINT32 Level;
- BOOLEAN NodePreviouslyVisited;
+ BOOLEAN OpPreviouslyVisited;
ACPI_PARSE_OBJECT *StartOp = Op;
ACPI_STATUS Status;
@@ -1721,7 +801,7 @@
}
Level = 0;
- NodePreviouslyVisited = FALSE;
+ OpPreviouslyVisited = FALSE;
switch (Visitation)
{
@@ -1729,9 +809,9 @@
while (Op)
{
- if (!NodePreviouslyVisited)
+ if (!OpPreviouslyVisited)
{
- /* Let the callback process the node. */
+ /* Let the callback process the op. */
Status = DescendingCallback (Op, Level, Context);
if (ACPI_SUCCESS (Status))
@@ -1765,7 +845,7 @@
if (Op->Asl.Next)
{
Op = Op->Asl.Next;
- NodePreviouslyVisited = FALSE;
+ OpPreviouslyVisited = FALSE;
}
else
{
@@ -1776,7 +856,7 @@
Level--;
}
Op = Op->Asl.Parent;
- NodePreviouslyVisited = TRUE;
+ OpPreviouslyVisited = TRUE;
}
}
break;
@@ -1785,12 +865,12 @@
while (Op)
{
- /* Visit leaf node (no children) or parent node on return trip */
+ /* Visit leaf op (no children) or parent op on return trip */
if ((!Op->Asl.Child) ||
- (NodePreviouslyVisited))
+ (OpPreviouslyVisited))
{
- /* Let the callback process the node. */
+ /* Let the callback process the op. */
Status = AscendingCallback (Op, Level, Context);
if (ACPI_FAILURE (Status))
@@ -1819,7 +899,7 @@
if (Op->Asl.Next)
{
Op = Op->Asl.Next;
- NodePreviouslyVisited = FALSE;
+ OpPreviouslyVisited = FALSE;
}
else
{
@@ -1830,7 +910,7 @@
Level--;
}
Op = Op->Asl.Parent;
- NodePreviouslyVisited = TRUE;
+ OpPreviouslyVisited = TRUE;
}
}
break;
@@ -1839,7 +919,7 @@
while (Op)
{
- if (NodePreviouslyVisited)
+ if (OpPreviouslyVisited)
{
Status = AscendingCallback (Op, Level, Context);
if (ACPI_FAILURE (Status))
@@ -1849,7 +929,7 @@
}
else
{
- /* Let the callback process the node. */
+ /* Let the callback process the op. */
Status = DescendingCallback (Op, Level, Context);
if (ACPI_SUCCESS (Status))
@@ -1883,7 +963,7 @@
if (Op->Asl.Next)
{
Op = Op->Asl.Next;
- NodePreviouslyVisited = FALSE;
+ OpPreviouslyVisited = FALSE;
}
else
{
@@ -1894,7 +974,7 @@
Level--;
}
Op = Op->Asl.Parent;
- NodePreviouslyVisited = TRUE;
+ OpPreviouslyVisited = TRUE;
}
}
break;
Modified: trunk/sys/contrib/dev/acpica/compiler/asltypes.h
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/asltypes.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/asltypes.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -163,28 +163,30 @@
/* Op flags for the ACPI_PARSE_OBJECT */
-#define NODE_VISITED 0x00000001
-#define NODE_AML_PACKAGE 0x00000002
-#define NODE_IS_TARGET 0x00000004
-#define NODE_IS_RESOURCE_DESC 0x00000008
-#define NODE_IS_RESOURCE_FIELD 0x00000010
-#define NODE_HAS_NO_EXIT 0x00000020
-#define NODE_IF_HAS_NO_EXIT 0x00000040
-#define NODE_NAME_INTERNALIZED 0x00000080
-#define NODE_METHOD_NO_RETVAL 0x00000100
-#define NODE_METHOD_SOME_NO_RETVAL 0x00000200
-#define NODE_RESULT_NOT_USED 0x00000400
-#define NODE_METHOD_TYPED 0x00000800
-#define NODE_COULD_NOT_REDUCE 0x00001000
-#define NODE_COMPILE_TIME_CONST 0x00002000
-#define NODE_IS_TERM_ARG 0x00004000
-#define NODE_WAS_ONES_OP 0x00008000
-#define NODE_IS_NAME_DECLARATION 0x00010000
-#define NODE_COMPILER_EMITTED 0x00020000
-#define NODE_IS_DUPLICATE 0x00040000
-#define NODE_IS_RESOURCE_DATA 0x00080000
-#define NODE_IS_NULL_RETURN 0x00100000
+#define OP_VISITED 0x00000001
+#define OP_AML_PACKAGE 0x00000002
+#define OP_IS_TARGET 0x00000004
+#define OP_IS_RESOURCE_DESC 0x00000008
+#define OP_IS_RESOURCE_FIELD 0x00000010
+#define OP_HAS_NO_EXIT 0x00000020
+#define OP_IF_HAS_NO_EXIT 0x00000040
+#define OP_NAME_INTERNALIZED 0x00000080
+#define OP_METHOD_NO_RETVAL 0x00000100
+#define OP_METHOD_SOME_NO_RETVAL 0x00000200
+#define OP_RESULT_NOT_USED 0x00000400
+#define OP_METHOD_TYPED 0x00000800
+#define OP_COULD_NOT_REDUCE 0x00001000
+#define OP_COMPILE_TIME_CONST 0x00002000
+#define OP_IS_TERM_ARG 0x00004000
+#define OP_WAS_ONES_OP 0x00008000
+#define OP_IS_NAME_DECLARATION 0x00010000
+#define OP_COMPILER_EMITTED 0x00020000
+#define OP_IS_DUPLICATE 0x00040000
+#define OP_IS_RESOURCE_DATA 0x00080000
+#define OP_IS_NULL_RETURN 0x00100000
+#define ACPI_NUM_OP_FLAGS 0x21
+
/* Keeps information about individual control methods */
typedef struct asl_method_info
@@ -354,7 +356,16 @@
} 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) */
typedef struct asl_listing_node
Modified: trunk/sys/contrib/dev/acpica/compiler/aslutils.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslutils.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslutils.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -175,7 +175,13 @@
ACPI_PARSE_OBJECT *Op,
char *Name);
+static void
+UtReallocLineBuffers (
+ char **Buffer,
+ UINT32 OldSize,
+ UINT32 NewSize);
+
/*******************************************************************************
*
* FUNCTION: UtIsBigEndianMachine
@@ -734,43 +740,48 @@
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: trunk/sys/contrib/dev/acpica/compiler/aslwalks.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslwalks.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslwalks.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -196,7 +196,7 @@
{
case PARSEOP_METHOD:
- Op->Asl.CompileFlags |= NODE_METHOD_TYPED;
+ Op->Asl.CompileFlags |= OP_METHOD_TYPED;
break;
case PARSEOP_RETURN:
Modified: trunk/sys/contrib/dev/acpica/compiler/aslxref.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/aslxref.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/aslxref.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -534,7 +534,7 @@
* references to other objects within the namespace and the parent objects
* of name declarations
*/
- if (Op->Asl.CompileFlags & NODE_IS_NAME_DECLARATION)
+ if (Op->Asl.CompileFlags & OP_IS_NAME_DECLARATION)
{
return_ACPI_STATUS (AE_OK);
}
@@ -560,7 +560,7 @@
RegisterNumber = Op->Asl.AmlOpcode & 0x0007; /* 0x60 through 0x67 */
MethodLocals = Node->MethodLocals;
- if (Op->Asl.CompileFlags & NODE_IS_TARGET)
+ if (Op->Asl.CompileFlags & OP_IS_TARGET)
{
/* Local is being initialized */
@@ -604,7 +604,7 @@
MethodArgs[RegisterNumber].Flags |= ASL_ARG_REFERENCED;
MethodArgs[RegisterNumber].Op = Op;
- if (Op->Asl.CompileFlags & NODE_IS_TARGET)
+ if (Op->Asl.CompileFlags & OP_IS_TARGET)
{
/* Arg is being initialized */
@@ -677,7 +677,7 @@
/* Name must appear as the last parameter */
NextOp = Op->Asl.Child;
- while (!(NextOp->Asl.CompileFlags & NODE_IS_NAME_DECLARATION))
+ while (!(NextOp->Asl.CompileFlags & OP_IS_NAME_DECLARATION))
{
NextOp = NextOp->Asl.Next;
}
@@ -917,7 +917,7 @@
Op->Asl.AmlLength = 0;
Op->Asl.ParseOpcode = PARSEOP_INTEGER;
Op->Asl.Value.Integer = (UINT64) Offset;
- Op->Asl.CompileFlags |= NODE_IS_RESOURCE_FIELD;
+ Op->Asl.CompileFlags |= OP_IS_RESOURCE_FIELD;
OpcGenerateAmlOpcode (Op);
}
Modified: trunk/sys/contrib/dev/acpica/compiler/cvcompiler.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/cvcompiler.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/cvcompiler.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -164,7 +164,7 @@
* StringBuffer Buffer containing the comment being processed
* c1 Current input
*
- * RETURN: none
+ * RETURN: None
*
* DESCRIPTION: Process a single line comment of a c Style comment. This
* function captures a line of a c style comment in a char* and
@@ -217,6 +217,7 @@
{
FinalLineToken[strlen(FinalLineToken)-1] = 0;
}
+
CvAddToCommentList (FinalLineToken);
LineToken = strtok (NULL, "\n");
while (LineToken != NULL)
@@ -223,8 +224,8 @@
{
/*
* It is assumed that each line has some sort of indentation.
- * This means that we need to find the first character that is not
- * a white space within each line.
+ * This means that we need to find the first character that
+ * is not a white space within each line.
*/
CharStart = FALSE;
for (i = 0; (i < (strlen (LineToken) + 1)) && !CharStart; i++)
@@ -236,6 +237,7 @@
LineToken [0] = ' '; /* Pad for Formatting */
}
}
+
FinalLineToken = UtStringCacheCalloc (strlen (LineToken) + 1);
strcat (FinalLineToken, LineToken);
@@ -245,6 +247,7 @@
{
FinalLineToken[strlen(FinalLineToken) - 1] = 0;
}
+
CvAddToCommentList (FinalLineToken);
LineToken = strtok (NULL,"\n");
}
@@ -251,26 +254,29 @@
}
/*
- * If this only spans a single line, check to see whether if this comment
- * appears on the same line as a line of code. If does, retain it's
- * position for stylistic reasons. If it doesn't, add it to the comment
- * List so that it can be associated with the next node that's created.
+ * If this only spans a single line, check to see whether if this
+ * comment appears on the same line as a line of code. If does,
+ * retain it's position for stylistic reasons. If it doesn't,
+ * add it to the comment list so that it can be associated with
+ * the next node that's created.
*/
else
{
/*
- * if this is not a regular comment, pad with extra spaces that appeared
- * in the original source input to retain the original spacing.
+ * If this is not a regular comment, pad with extra spaces that
+ * appeared in the original source input to retain the original
+ * spacing.
*/
FinalCommentString =
UtStringCacheCalloc (strlen (CommentString) +
CurrentState.SpacesBefore + 1);
- for (i=0; (CurrentState.CommentType != ASL_COMMENT_STANDARD) &&
- (i < CurrentState.SpacesBefore); ++i)
+ for (i = 0; (CurrentState.CommentType != ASL_COMMENT_STANDARD) &&
+ (i < CurrentState.SpacesBefore); i++)
{
FinalCommentString[i] = ' ';
}
+
strcat (FinalCommentString, CommentString);
CvPlaceComment (CurrentState.CommentType, FinalCommentString);
}
@@ -310,10 +316,10 @@
CommentString = UtStringCacheCalloc (strlen (MsgBuffer) + 1);
strcpy (CommentString, MsgBuffer);
- /* If this comment lies on the same line as the latest parse node,
- * assign it to that node's CommentAfter field. Saving in this field
- * will allow us to support comments that come after code on the same
- * line as the code itself. For example,
+ /* If this comment lies on the same line as the latest parse op,
+ * assign it to that op's CommentAfter field. Saving in this field
+ * will allow us to support comments that come after code on the
+ * same line as the code itself. For example,
* Name(A,"") //comment
*
* will be retained rather than transformed into
@@ -330,7 +336,8 @@
* Create a new string with the approperiate spaces. Since we need
* to account for the proper spacing, the actual comment,
* extra 2 spaces so that this comment can be converted to the "/ *"
- * style and the null terminator, the string would look something like
+ * style and the null terminator, the string would look something
+ * like:
*
* [ (spaces) (comment) ( * /) ('\0') ]
*
@@ -338,23 +345,27 @@
FinalCommentString = UtStringCacheCalloc (CurrentState.SpacesBefore +
strlen (CommentString) + 3 + 1);
- for (i=0; (CurrentState.CommentType!=1) && (i<CurrentState.SpacesBefore); ++i)
+ for (i = 0; (CurrentState.CommentType != 1) &&
+ (i < CurrentState.SpacesBefore); i++)
{
FinalCommentString[i] = ' ';
}
+
strcat (FinalCommentString, CommentString);
/* convert to a "/ *" style comment */
strcat (FinalCommentString, " */");
- FinalCommentString [CurrentState.SpacesBefore + strlen (CommentString) + 3] = 0;
+ FinalCommentString [CurrentState.SpacesBefore +
+ strlen (CommentString) + 3] = 0;
/* get rid of the carriage return */
if (FinalCommentString[strlen (FinalCommentString) - 1] == 0x0D)
{
- FinalCommentString[strlen(FinalCommentString)-1] = 0;
+ FinalCommentString[strlen(FinalCommentString) - 1] = 0;
}
+
CvPlaceComment (CurrentState.CommentType, FinalCommentString);
}
}
@@ -366,9 +377,9 @@
*
* PARAMETERS: Op - Calculate all comments of this Op
*
- * RETURN: TotalCommentLength - Length of all comments within this node.
+ * RETURN: TotalCommentLength - Length of all comments within this op.
*
- * DESCRIPTION: calculate the length that the each comment takes up within Op.
+ * DESCRIPTION: Calculate the length that the each comment takes up within Op.
* Comments look like the follwoing: [0xA9 OptionBtye comment 0x00]
* therefore, we add 1 + 1 + strlen (comment) + 1 to get the actual
* length of this comment.
@@ -389,7 +400,9 @@
return (0);
}
- CvDbgPrint ("==Calculating comment lengths for %s\n", Op->Asl.ParseOpName);
+ CvDbgPrint ("==Calculating comment lengths for %s\n",
+ Op->Asl.ParseOpName);
+
if (Op->Asl.FileChanged)
{
TotalCommentLength += strlen (Op->Asl.Filename) + 3;
@@ -400,6 +413,7 @@
TotalCommentLength += strlen (Op->Asl.ParentFilename) + 3;
}
}
+
if (Op->Asl.CommentList)
{
Current = Op->Asl.CommentList;
@@ -412,6 +426,7 @@
Current = Current->Next;
}
}
+
if (Op->Asl.EndBlkComment)
{
Current = Op->Asl.EndBlkComment;
@@ -424,6 +439,7 @@
Current = Current->Next;
}
}
+
if (Op->Asl.InlineComment)
{
CommentLength = strlen (Op->Asl.InlineComment)+3;
@@ -431,6 +447,7 @@
CvDbgPrint (" Comment string: %s\n\n", Op->Asl.InlineComment);
TotalCommentLength += CommentLength;
}
+
if (Op->Asl.EndNodeComment)
{
CommentLength = strlen(Op->Asl.EndNodeComment)+3;
@@ -448,9 +465,7 @@
}
CvDbgPrint("\n\n");
-
- return TotalCommentLength;
-
+ return (TotalCommentLength);
}
@@ -490,7 +505,7 @@
CvDbgPrint ("Printing comments for a definition block..\n");
- /* first, print the file name comment after changing .asl to .dsl */
+ /* First, print the file name comment after changing .asl to .dsl */
NewFilename = UtStringCacheCalloc (strlen (Op->Asl.Filename));
strcpy (NewFilename, Op->Asl.Filename);
@@ -518,6 +533,7 @@
Current = Op->Asl.CommentList;
CommentOption = STD_DEFBLK_COMMENT;
+
while (Current)
{
CgWriteOneAmlComment(Op, Current->Comment, CommentOption);
@@ -524,9 +540,10 @@
CvDbgPrint ("Printing comment: %s\n", Current->Comment);
Current = Current->Next;
}
+
Op->Asl.CommentList = NULL;
- /* print any Inline comments associated with this node */
+ /* Print any Inline comments associated with this node */
if (Op->Asl.CloseBraceComment)
{
@@ -557,8 +574,8 @@
char* CommentToPrint,
UINT8 InputOption)
{
- UINT8 CommentOption = InputOption;
- UINT8 CommentOpcode = (UINT8)AML_COMMENT_OP;
+ UINT8 CommentOption = InputOption;
+ UINT8 CommentOpcode = (UINT8) AML_COMMENT_OP;
if (!CommentToPrint)
@@ -583,8 +600,7 @@
*
* RETURN: None
*
- * DESCRIPTION: write all comments pertaining to the
- * current parse op
+ * DESCRIPTION: Write all comments pertaining to the current parse op
*
******************************************************************************/
@@ -609,7 +625,7 @@
if (Op->Asl.FileChanged)
{
- /* first, print the file name comment after changing .asl to .dsl */
+ /* First, print the file name comment after changing .asl to .dsl */
NewFilename =
FlGenerateFilename (Op->Asl.Filename, FILE_SUFFIX_DISASSEMBLY);
@@ -629,7 +645,7 @@
CgWriteOneAmlComment(Op, ParentFilename, PARENTFILENAME_COMMENT);
}
- /* prevent multiple writes of the same comment */
+ /* Prevent multiple writes of the same comment */
Op->Asl.FileChanged = FALSE;
}
@@ -654,6 +670,7 @@
CgWriteOneAmlComment(Op, Current->Comment, CommentOption);
Current = Current->Next;
}
+
Op->Asl.CommentList = NULL;
Current = Op->Asl.EndBlkComment;
@@ -663,9 +680,10 @@
CgWriteOneAmlComment(Op, Current->Comment, CommentOption);
Current = Current->Next;
}
+
Op->Asl.EndBlkComment = NULL;
- /* print any Inline comments associated with this node */
+ /* Print any Inline comments associated with this node */
if (Op->Asl.InlineComment)
{
@@ -694,7 +712,7 @@
*
* FUNCTION: CvCommentNodeCalloc
*
- * PARAMETERS: none
+ * PARAMETERS: None
*
* RETURN: Pointer to the comment node. Aborts on allocation failure
*
@@ -733,6 +751,7 @@
CvParseOpBlockType (
ACPI_PARSE_OBJECT *Op)
{
+
if (!Op)
{
return (BLOCK_NONE);
@@ -740,9 +759,8 @@
switch (Op->Asl.ParseOpcode)
{
+ /* From aslprimaries.y */
- /* from aslprimaries.y */
-
case PARSEOP_VAR_PACKAGE:
case PARSEOP_BANKFIELD:
case PARSEOP_BUFFER:
@@ -763,7 +781,7 @@
case PARSEOP_THERMALZONE:
case PARSEOP_WHILE:
- /* from aslresources.y */
+ /* From aslresources.y */
case PARSEOP_RESOURCETEMPLATE: /* optional parens */
case PARSEOP_VENDORLONG:
@@ -775,13 +793,12 @@
case PARSEOP_GPIO_IO:
case PARSEOP_DMA:
- /*from aslrules.y */
+ /* From aslrules.y */
case PARSEOP_DEFINITION_BLOCK:
return (BLOCK_PAREN | BLOCK_BRACE);
default:
-
return (BLOCK_NONE);
}
}
@@ -791,7 +808,7 @@
*
* FUNCTION: CvProcessCommentState
*
- * PARAMETERS: char
+ * PARAMETERS: Input - Input character
*
* RETURN: None
*
@@ -803,15 +820,15 @@
void
CvProcessCommentState (
- char input)
+ char Input)
{
- if (input != ' ')
+ if (Input != ' ')
{
Gbl_CommentState.SpacesBefore = 0;
}
- switch (input)
+ switch (Input)
{
case '\n':
@@ -856,7 +873,6 @@
Gbl_CommentState.CommentType = ASLCOMMENT_INLINE;
break;
-
}
}
@@ -865,7 +881,7 @@
*
* FUNCTION: CvAddToCommentList
*
- * PARAMETERS: toAdd - Contains the comment to be inserted
+ * PARAMETERS: ToAdd - Contains the comment to be inserted
*
* RETURN: None
*
@@ -876,24 +892,24 @@
void
CvAddToCommentList (
- char* ToAdd)
+ char *ToAdd)
{
- if (Gbl_Comment_List_Head)
+
+ if (Gbl_CommentListHead)
{
- Gbl_Comment_List_Tail->Next = CvCommentNodeCalloc ();
- Gbl_Comment_List_Tail = Gbl_Comment_List_Tail->Next;
+ Gbl_CommentListTail->Next = CvCommentNodeCalloc ();
+ Gbl_CommentListTail = Gbl_CommentListTail->Next;
}
else
{
- Gbl_Comment_List_Head = CvCommentNodeCalloc ();
- Gbl_Comment_List_Tail = Gbl_Comment_List_Head;
+ Gbl_CommentListHead = CvCommentNodeCalloc ();
+ Gbl_CommentListTail = Gbl_CommentListHead;
}
- Gbl_Comment_List_Tail->Comment = ToAdd;
-
- return;
+ Gbl_CommentListTail->Comment = ToAdd;
}
+
/*******************************************************************************
*
* FUNCTION: CvAppendInlineComment
@@ -907,7 +923,7 @@
*
******************************************************************************/
-char*
+char *
CvAppendInlineComment (
char *InlineComment,
char *ToAdd)
@@ -918,21 +934,22 @@
if (!InlineComment)
{
- return ToAdd;
+ return (ToAdd);
}
+
if (!ToAdd)
{
- return InlineComment;
+ return (InlineComment);
}
Size = strlen (ToAdd);
Size += strlen (InlineComment);
- Str = UtStringCacheCalloc (Size+1);
+ Str = UtStringCacheCalloc (Size + 1);
+
strcpy (Str, InlineComment);
strcat (Str, ToAdd);
- Str[Size+1] = 0;
-
- return Str;
+ Str[Size +1] = 0;
+ return (Str);
}
@@ -940,8 +957,8 @@
*
* FUNCTION: CvPlaceComment
*
- * PARAMETERS: Int - Type
- * char* - CommentString
+ * PARAMETERS: UINT8 - Type
+ * char * - CommentString
*
* RETURN: None
*
@@ -959,7 +976,7 @@
ACPI_PARSE_OBJECT *ParenBraceNode;
- LatestParseNode = Gbl_CommentState.Latest_Parse_Node;
+ LatestParseNode = Gbl_CommentState.LatestParseOp;
ParenBraceNode = Gbl_CommentState.ParsingParenBraceNode;
CvDbgPrint ("Placing comment %s for type %d\n", CommentString, Type);
@@ -979,8 +996,8 @@
case ASL_COMMENT_OPEN_PAREN:
- Gbl_Inline_Comment_Buffer =
- CvAppendInlineComment(Gbl_Inline_Comment_Buffer,
+ Gbl_InlineCommentBuffer =
+ CvAppendInlineComment(Gbl_InlineCommentBuffer,
CommentString);
break;
@@ -1008,6 +1025,5 @@
default:
break;
-
}
}
Modified: trunk/sys/contrib/dev/acpica/compiler/cvdisasm.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/cvdisasm.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/cvdisasm.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -156,6 +156,8 @@
#include <contrib/dev/acpica/include/acconvert.h>
+/* Local prototypes */
+
static void
CvPrintInclude(
ACPI_FILE_NODE *FNode,
@@ -198,6 +200,7 @@
AcpiOsPrintf("%s\n", Current->Comment);
Current->Comment = NULL;
}
+
Current = Current->Next;
AcpiOsReleaseObject(AcpiGbl_RegCommentCache, Previous);
}
@@ -208,7 +211,7 @@
*
* FUNCTION: CvListIsSingleton
*
- * PARAMETERS: CommentList -- check to see if this is a single item list.
+ * PARAMETERS: CommentList - check to see if this is a single item list.
*
* RETURN: BOOLEAN
*
@@ -221,16 +224,17 @@
ACPI_COMMENT_NODE *CommentList)
{
+
if (!CommentList)
{
- return FALSE;
+ return (FALSE);
}
else if (CommentList->Next)
{
- return FALSE;
+ return (FALSE);
}
- return TRUE;
+ return (TRUE);
}
@@ -275,6 +279,7 @@
{
CvPrintOneCommentList (Op->Common.CommentList, Level);
}
+
Op->Common.CommentList = NULL;
return;
@@ -333,7 +338,7 @@
* PARAMETERS: Op
* Level
*
- * RETURN: none
+ * RETURN: None
*
* DESCRIPTION: Print a close brace } and any open brace comments associated
* with this parse object.
@@ -346,6 +351,7 @@
ACPI_PARSE_OBJECT *Op,
UINT32 Level)
{
+
if (!Gbl_CaptureComments)
{
AcpiOsPrintf ("}");
@@ -365,7 +371,7 @@
* PARAMETERS: Op
* Level
*
- * RETURN: none
+ * RETURN: None
*
* DESCRIPTION: Print a closing paren ) and any end node comments associated
* with this parse object.
@@ -378,6 +384,7 @@
ACPI_PARSE_OBJECT *Op,
UINT32 Level)
{
+
if (!Gbl_CaptureComments)
{
AcpiOsPrintf (")");
@@ -427,13 +434,15 @@
CvFileHasSwitched(
ACPI_PARSE_OBJECT *Op)
{
+
if (Op->Common.CvFilename &&
AcpiGbl_CurrentFilename &&
AcpiUtStricmp(Op->Common.CvFilename, AcpiGbl_CurrentFilename))
{
- return TRUE;
+ return (TRUE);
}
- return FALSE;
+
+ return (FALSE);
}
@@ -459,17 +468,21 @@
ACPI_FILE_NODE *FNode,
UINT32 Level)
{
+
if (!FNode || FNode->IncludeWritten)
{
return;
}
- CvDbgPrint ("Writing include for %s within %s\n", FNode->Filename, FNode->Parent->Filename);
+ CvDbgPrint ("Writing include for %s within %s\n",
+ FNode->Filename, FNode->Parent->Filename);
AcpiOsRedirectOutput (FNode->Parent->File);
CvPrintOneCommentList (FNode->IncludeComment, Level);
+
AcpiDmIndent (Level);
AcpiOsPrintf ("Include (\"%s\")\n", FNode->Filename);
- CvDbgPrint ("emitted the following: Include (\"%s\")\n", FNode->Filename);
+ CvDbgPrint ("emitted the following: Include (\"%s\")\n",
+ FNode->Filename);
FNode->IncludeWritten = TRUE;
}
@@ -478,7 +491,7 @@
*
* FUNCTION: CvSwitchFiles
*
- * PARAMETERS: Level - indentation level
+ * PARAMETERS: Level - indentation level
* Op
*
* RETURN: None
@@ -498,7 +511,9 @@
ACPI_FILE_NODE *FNode;
ACPI_FILE_NODE *Current;
- CvDbgPrint ("Switching from %s to %s\n", AcpiGbl_CurrentFilename, Filename);
+
+ CvDbgPrint ("Switching from %s to %s\n", AcpiGbl_CurrentFilename,
+ Filename);
FNode = CvFilenameExists (Filename, AcpiGbl_FileTreeRoot);
if (!FNode)
{
@@ -507,10 +522,13 @@
* if it does not exist, then abort.
*/
FlDeleteFile (ASL_FILE_AML_OUTPUT);
- sprintf (MsgBuffer, "\"Cannot find %s\" - %s", Filename, strerror (errno));
- AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0, NULL, MsgBuffer);
+ sprintf (MsgBuffer, "\"Cannot find %s\" - %s",
+ Filename, strerror (errno));
+ AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0,
+ NULL, MsgBuffer);
AslAbort ();
}
+
Current = FNode;
/*
Modified: trunk/sys/contrib/dev/acpica/compiler/cvparser.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/cvparser.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/cvparser.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -204,13 +204,13 @@
char *Filename)
{
UINT64 Length = strlen(Filename);
+ char *FileExt = Filename + Length - 4;
UINT64 i;
- char *FileExt = Filename + Length - 4;
if ((Length > 4) && AcpiUtStricmp (FileExt, ".dsl"))
{
- return FALSE;
+ return (FALSE);
}
for(i = 0; i<Length; ++i)
@@ -217,10 +217,11 @@
{
if (!isprint ((int) Filename[i]))
{
- return FALSE;
+ return (FALSE);
}
}
- return TRUE;
+
+ return (TRUE);
}
@@ -232,7 +233,7 @@
* AmlStart - Address of the starting point of the AML.
* AmlLength - Length of the AML file.
*
- * RETURN: none
+ * RETURN: None
*
* DESCRIPTION: Initialize the file dependency tree by scanning the AML.
* This is referred as ASL_CV_INIT_FILETREE.
@@ -263,6 +264,7 @@
CvDbgPrint ("AmlEnd?: %p\n", AmlStart+AmlLength);
AcpiGbl_FileTreeRoot = AcpiOsAcquireObject (AcpiGbl_FileCache);
+
AcpiGbl_FileTreeRoot->FileStart = (char *)(AmlStart);
AcpiGbl_FileTreeRoot->FileEnd = (char *)(AmlStart + Table->Length);
AcpiGbl_FileTreeRoot->Next = NULL;
@@ -293,25 +295,27 @@
* raw data that doesn't outline a filename.
*/
if ((*TreeAml == AML_COMMENT_OP) &&
- (*(TreeAml+1) == FILENAME_COMMENT) &&
- (CvIsFilename ((char *)(TreeAml+2))))
+ (*(TreeAml +1) == FILENAME_COMMENT) &&
+ (CvIsFilename ((char *)(TreeAml +2))))
{
CvDbgPrint ("A9 and a 08 file\n");
PreviousFilename = Filename;
- Filename = (char *) (TreeAml+2);
+ Filename = (char *) (TreeAml +2);
+
CvAddToFileTree (Filename, PreviousFilename);
ChildFilename = Filename;
CvDbgPrint ("%s\n", Filename);
}
else if ((*TreeAml == AML_COMMENT_OP) &&
- (*(TreeAml+1) == PARENTFILENAME_COMMENT) &&
- (CvIsFilename ((char *)(TreeAml+2))))
+ (*(TreeAml +1) == PARENTFILENAME_COMMENT) &&
+ (CvIsFilename ((char *)(TreeAml +2))))
{
CvDbgPrint ("A9 and a 09 file\n");
- ParentFilename = (char *)(TreeAml+2);
+ ParentFilename = (char *)(TreeAml +2);
CvSetFileParent (ChildFilename, ParentFilename);
CvDbgPrint ("%s\n", ParentFilename);
}
+
++TreeAml;
}
}
@@ -323,7 +327,7 @@
*
* PARAMETERS: Op -- clear all comments within this Op
*
- * RETURN: none
+ * RETURN: None
*
* DESCRIPTION: Clear all converter-related fields of the given Op.
* This is referred as ASL_CV_CLEAR_OP_COMMENTS.
@@ -334,6 +338,7 @@
CvClearOpComments (
ACPI_PARSE_OBJECT *Op)
{
+
Op->Common.InlineComment = NULL;
Op->Common.EndNodeComment = NULL;
Op->Common.NameComment = NULL;
@@ -349,12 +354,12 @@
*
* FUNCTION: CvCommentExists
*
- * PARAMETERS: address - check if this address appears in the list
+ * PARAMETERS: Address - check if this address appears in the list
*
* RETURN: BOOLEAN - TRUE if the address exists.
*
- * DESCRIPTION: look at the pointer address and check if this appears in the
- * list of all addresses. If it exitsts in the list, return TRUE
+ * DESCRIPTION: Look at the pointer address and check if this appears in the
+ * list of all addresses. If it exists in the list, return TRUE
* if it exists. Otherwise add to the list and return FALSE.
*
******************************************************************************/
@@ -371,13 +376,15 @@
{
return (FALSE);
}
+
Option = *(Address + 1);
/*
- * FILENAME_COMMENT and PARENTFILENAME_COMMENT are not treated as comments.
- * They serve as markers for where the file starts and ends.
+ * FILENAME_COMMENT and PARENTFILENAME_COMMENT are not treated as
+ * comments. They serve as markers for where the file starts and ends.
*/
- if ((Option == FILENAME_COMMENT) || (Option == PARENTFILENAME_COMMENT))
+ if ((Option == FILENAME_COMMENT) ||
+ (Option == PARENTFILENAME_COMMENT))
{
return (FALSE);
}
@@ -405,13 +412,14 @@
}
/*
- * If the execution gets to this point, it means that this address
- * does not exists in the list. Add this address to the
+ * If the execution gets to this point, it means that this
+ * address does not exists in the list. Add this address to the
* beginning of the list.
*/
Current = AcpiGbl_CommentAddrListHead;
AcpiGbl_CommentAddrListHead =
AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
+
AcpiGbl_CommentAddrListHead->Addr = Address;
AcpiGbl_CommentAddrListHead->Next = Current;
return (FALSE);
@@ -451,6 +459,7 @@
{
return (Current);
}
+
Current = Current->Next;
}
return (NULL);
@@ -464,7 +473,7 @@
* PARAMETERS: Address - address to look up
* Head - file dependency tree
*
- * RETURN: ACPI_FLE_NODE - pointer to a file node containing the address
+ * RETURN: ACPI_FILE_NODE - pointer to a file node containing the address
*
* DESCRIPTION: Look for the given address in the file dependency tree.
* Returns the first file node where the given address is within
@@ -472,7 +481,7 @@
*
******************************************************************************/
-static ACPI_FILE_NODE*
+static ACPI_FILE_NODE *
CvFileAddressLookup(
char *Address,
ACPI_FILE_NODE *Head)
@@ -488,6 +497,7 @@
{
return (Current);
}
+
Current = Current->Next;
}
@@ -522,7 +532,8 @@
return;
}
- Node = CvFileAddressLookup ((char *)Op->Common.Aml, AcpiGbl_FileTreeRoot);
+ Node = CvFileAddressLookup ((char *)
+ Op->Common.Aml, AcpiGbl_FileTreeRoot);
if (!Node)
{
return;
@@ -549,7 +560,7 @@
* PreviousFilename - Address containing the name of the previous
* filename
*
- * RETURN: void
+ * RETURN: None
*
* DESCRIPTION: Add this filename to the AcpiGbl_FileTree if it does not exist.
*
@@ -586,9 +597,9 @@
if (Node && PreviousFilename)
{
/*
- * Update the end of the previous file and all of their parents' ending
- * Addresses. This is done to ensure that parent file ranges extend to
- * the end of their childrens' files.
+ * Update the end of the previous file and all of their parents'
+ * ending addresses. This is done to ensure that parent file
+ * ranges extend to the end of their childrens' files.
*/
Node = CvFilenameExists (PreviousFilename, AcpiGbl_FileTreeRoot);
if (Node && (Node->FileEnd < Filename))
@@ -601,6 +612,7 @@
{
Node->FileEnd = Filename;
}
+
Node = Node->Parent;
}
}
@@ -609,6 +621,7 @@
{
Node = AcpiGbl_FileTreeRoot;
AcpiGbl_FileTreeRoot = AcpiOsAcquireObject (AcpiGbl_FileCache);
+
AcpiGbl_FileTreeRoot->Next = Node;
AcpiGbl_FileTreeRoot->Parent = NULL;
AcpiGbl_FileTreeRoot->Filename = Filename;
@@ -626,7 +639,8 @@
FlDeleteFile (ASL_FILE_AML_OUTPUT);
sprintf (MsgBuffer, "\"%s\" - %s", Filename, strerror (errno));
- AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0, NULL, MsgBuffer);
+ AslCommonError (ASL_ERROR, ASL_MSG_OPEN, 0, 0, 0, 0,
+ NULL, MsgBuffer);
AslAbort ();
}
}
@@ -640,9 +654,9 @@
* PARAMETERS: ChildFile - contains the filename of the child file
* ParentFile - contains the filename of the parent file.
*
- * RETURN: none
+ * RETURN: None
*
- * DESCRIPTION: point the parent pointer of the Child to the node that
+ * DESCRIPTION: Point the parent pointer of the Child to the node that
* corresponds with the parent file node.
*
******************************************************************************/
@@ -658,6 +672,7 @@
Child = CvFilenameExists (ChildFile, AcpiGbl_FileTreeRoot);
Parent = CvFilenameExists (ParentFile, AcpiGbl_FileTreeRoot);
+
if (Child && Parent)
{
Child->Parent = Parent;
@@ -668,6 +683,7 @@
{
Child->Parent->FileEnd = Child->FileStart;
}
+
Child = Child->Parent;
}
}
@@ -680,9 +696,9 @@
*
* PARAMETERS: ParserState - A parser state object
*
- * RETURN: none
+ * RETURN: None
*
- * DESCRIPTION: look at the aml that the parser state is pointing to,
+ * DESCRIPTION: Look at the aml that the parser state is pointing to,
* capture any AML_COMMENT_OP and it's arguments and increment the
* aml pointer past the comment. Comments are transferred to parse
* nodes through CvTransferComments() as well as
@@ -720,13 +736,15 @@
}
else
{
- CommentOption = *(Aml+1);
+ CommentOption = *(Aml +1);
- /* Increment past the comment option and point the approperiate char pointers.*/
-
+ /*
+ * Increment past the comment option and point the
+ * appropriate char pointers
+ */
Aml += 2;
- /* found a comment. Now, set pointers to these comments. */
+ /* Found a comment. Now, set pointers to these comments. */
switch (CommentOption)
{
@@ -734,9 +752,12 @@
StdDefBlockFlag = TRUE;
- /* add to a linked list of nodes. This list will be taken by the parse node created next. */
-
- CommentNode = AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
+ /*
+ * Add to a linked list of nodes. This list will be
+ * taken by the parse node created next.
+ */
+ CommentNode = AcpiOsAcquireObject (
+ AcpiGbl_RegCommentCache);
CommentNode->Comment = ACPI_CAST_PTR (char, Aml);
CommentNode->Next = NULL;
@@ -748,7 +769,8 @@
else
{
AcpiGbl_DefBlkCommentListTail->Next = CommentNode;
- AcpiGbl_DefBlkCommentListTail = AcpiGbl_DefBlkCommentListTail->Next;
+ AcpiGbl_DefBlkCommentListTail =
+ AcpiGbl_DefBlkCommentListTail->Next;
}
break;
@@ -756,9 +778,12 @@
CvDbgPrint ("found regular comment.\n");
- /* add to a linked list of nodes. This list will be taken by the parse node created next. */
-
- CommentNode = AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
+ /*
+ * Add to a linked list of nodes. This list will be
+ * taken by the parse node created next.
+ */
+ CommentNode = AcpiOsAcquireObject (
+ AcpiGbl_RegCommentCache);
CommentNode->Comment = ACPI_CAST_PTR (char, Aml);
CommentNode->Next = NULL;
@@ -770,7 +795,8 @@
else
{
AcpiGbl_RegCommentListTail->Next = CommentNode;
- AcpiGbl_RegCommentListTail = AcpiGbl_RegCommentListTail->Next;
+ AcpiGbl_RegCommentListTail =
+ AcpiGbl_RegCommentListTail->Next;
}
break;
@@ -778,9 +804,11 @@
CvDbgPrint ("found endblk comment.\n");
- /* add to a linked list of nodes. This will be taken by the next created parse node. */
-
- CommentNode = AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
+ /* Add to a linked list of nodes. This will be
+ * taken by the next created parse node.
+ */
+ CommentNode = AcpiOsAcquireObject (
+ AcpiGbl_RegCommentCache);
CommentNode->Comment = ACPI_CAST_PTR (char, Aml);
CommentNode->Next = NULL;
@@ -792,7 +820,8 @@
else
{
AcpiGbl_EndBlkCommentListTail->Next = CommentNode;
- AcpiGbl_EndBlkCommentListTail = AcpiGbl_EndBlkCommentListTail->Next;
+ AcpiGbl_EndBlkCommentListTail =
+ AcpiGbl_EndBlkCommentListTail->Next;
}
break;
@@ -799,31 +828,38 @@
case INLINE_COMMENT:
CvDbgPrint ("found inline comment.\n");
- AcpiGbl_CurrentInlineComment = ACPI_CAST_PTR (char, Aml);
+ AcpiGbl_CurrentInlineComment =
+ ACPI_CAST_PTR (char, Aml);
break;
case ENDNODE_COMMENT:
CvDbgPrint ("found EndNode comment.\n");
- AcpiGbl_CurrentEndNodeComment = ACPI_CAST_PTR (char, Aml);
+ AcpiGbl_CurrentEndNodeComment =
+ ACPI_CAST_PTR (char, Aml);
break;
case CLOSE_BRACE_COMMENT:
CvDbgPrint ("found close brace comment.\n");
- AcpiGbl_CurrentCloseBraceComment = ACPI_CAST_PTR (char, Aml);
+ AcpiGbl_CurrentCloseBraceComment =
+ ACPI_CAST_PTR (char, Aml);
break;
case END_DEFBLK_COMMENT:
- CvDbgPrint ("Found comment that belongs after the } for a definition block.\n");
- AcpiGbl_CurrentScope->Common.CloseBraceComment = ACPI_CAST_PTR (char, Aml);
+ CvDbgPrint ("Found comment that belongs after"
+ " the } for a definition block.\n");
+ AcpiGbl_CurrentScope->Common.CloseBraceComment =
+ ACPI_CAST_PTR (char, Aml);
break;
case FILENAME_COMMENT:
- CvDbgPrint ("Found a filename: %s\n", ACPI_CAST_PTR (char, Aml));
- FileNode = CvFilenameExists (ACPI_CAST_PTR (char, Aml), AcpiGbl_FileTreeRoot);
+ CvDbgPrint ("Found a filename: %s\n",
+ ACPI_CAST_PTR (char, Aml));
+ FileNode = CvFilenameExists (
+ ACPI_CAST_PTR (char, Aml), AcpiGbl_FileTreeRoot);
/*
* If there is an INCLUDE_COMMENT followed by a
@@ -851,7 +887,8 @@
* parse node created next. See the FILENAME_COMMENT case
* for more details
*/
- CommentNode = AcpiOsAcquireObject (AcpiGbl_RegCommentCache);
+ CommentNode = AcpiOsAcquireObject (
+ AcpiGbl_RegCommentCache);
CommentNode->Comment = ACPI_CAST_PTR (char, Aml);
CommentNode->Next = NULL;
@@ -863,10 +900,12 @@
else
{
AcpiGbl_IncCommentListTail->Next = CommentNode;
- AcpiGbl_IncCommentListTail = AcpiGbl_IncCommentListTail->Next;
+ AcpiGbl_IncCommentListTail =
+ AcpiGbl_IncCommentListTail->Next;
}
- CvDbgPrint ("Found a include comment: %s\n", CommentNode->Comment);
+ CvDbgPrint ("Found a include comment: %s\n",
+ CommentNode->Comment);
break;
default:
@@ -875,13 +914,12 @@
Aml -= 2;
goto DefBlock;
- break;
- } /* end switch statement */
+ } /* End switch statement */
- } /* end else */
+ } /* End else */
- /* determine the length and move forward that amount */
+ /* Determine the length and move forward that amount */
Length = 0;
while (ParserState->Aml[Length])
@@ -891,12 +929,10 @@
ParserState->Aml += Length + 1;
-
/* Peek at the next Opcode. */
Aml = ParserState->Aml;
Opcode = (UINT16) ACPI_GET8 (Aml);
-
}
DefBlock:
@@ -921,7 +957,7 @@
*
* PARAMETERS: ParserState - A parser state object
*
- * RETURN: none
+ * RETURN: None
*
* DESCRIPTION: Wrapper function for CvCaptureCommentsOnly
* This is referred as ASL_CV_CAPTURE_COMMENTS.
@@ -943,8 +979,8 @@
}
/*
- * Before parsing, check to see that comments that come directly after
- * deferred opcodes aren't being processed.
+ * Before parsing, check to see that comments that come directly
+ * after deferred opcodes aren't being processed.
*/
Aml = WalkState->ParserState.Aml;
Opcode = (UINT16) ACPI_GET8 (Aml);
@@ -965,9 +1001,9 @@
*
* FUNCTION: CvTransferComments
*
- * PARAMETERS: Op - Transfer comments to this Op
+ * PARAMETERS: Op - Transfer comments to this Op
*
- * RETURN: none
+ * RETURN: None
*
* DESCRIPTION: Transfer all of the commments stored in global containers to the
* given Op. This will be invoked shortly after the parser creates
@@ -980,6 +1016,7 @@
CvTransferComments (
ACPI_PARSE_OBJECT *Op)
{
+
Op->Common.InlineComment = AcpiGbl_CurrentInlineComment;
AcpiGbl_CurrentInlineComment = NULL;
@@ -996,5 +1033,4 @@
Op->Common.EndBlkComment = AcpiGbl_EndBlkCommentListHead;
AcpiGbl_EndBlkCommentListHead = NULL;
AcpiGbl_EndBlkCommentListTail = NULL;
-
}
Modified: trunk/sys/contrib/dev/acpica/compiler/dtcompile.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/dtcompile.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/dtcompile.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -487,18 +487,21 @@
}
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: trunk/sys/contrib/dev/acpica/compiler/dtcompiler.h
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/dtcompiler.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/dtcompiler.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -727,6 +727,7 @@
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: trunk/sys/contrib/dev/acpica/compiler/dttemplate.h
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/dttemplate.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/dttemplate.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -1179,6 +1179,15 @@
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: trunk/sys/contrib/dev/acpica/compiler/dtutils.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/dtutils.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/dtutils.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -191,7 +191,7 @@
/* Check if user wants to ignore this exception */
- if (AslIsExceptionDisabled (Level, MessageId))
+ if (AslIsExceptionIgnored (Level, MessageId))
{
return;
}
Modified: trunk/sys/contrib/dev/acpica/compiler/prmacros.c
===================================================================
--- trunk/sys/contrib/dev/acpica/compiler/prmacros.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/compiler/prmacros.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -484,7 +484,7 @@
{
/* 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: trunk/sys/contrib/dev/acpica/components/debugger/dbdisply.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/debugger/dbdisply.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/debugger/dbdisply.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -452,7 +452,7 @@
else
{
- AcpiOsPrintf ("Object (%p) Pathname: %s\n",
+ AcpiOsPrintf ("Object %p: Namespace Node - Pathname: %s\n",
Node, (char *) RetBuf.Pointer);
}
@@ -469,7 +469,7 @@
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",
@@ -477,8 +477,33 @@
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: trunk/sys/contrib/dev/acpica/components/disassembler/dmopcode.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/disassembler/dmopcode.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/disassembler/dmopcode.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -529,25 +529,30 @@
/* Major cheat: We previously put the Tag ptr in the Node field */
Tag = ACPI_CAST_PTR (char, IndexOp->Common.Node);
- if (!Tag)
+ if (!Tag || (*Tag == 0))
{
return;
}
- /* Match the name in the info table */
+ /* Is the tag a predefined name? */
Info = AcpiAhMatchPredefinedName (Tag);
- if (Info)
+ if (!Info)
{
- AcpiOsPrintf (" // %4.4s: %s", Tag,
- ACPI_CAST_PTR (char, Info->Description));
+ /* Not a predefined name (does not start with underscore) */
+
+ return;
}
- /* AML buffer (String) was allocated in AcpiGetTagPathname */
+ AcpiOsPrintf (" // %4.4s: %s", Tag,
+ ACPI_CAST_PTR (char, Info->Description));
+ /* String contains the prefix path, free it */
+
ACPI_FREE (IndexOp->Common.Value.String);
+ IndexOp->Common.Value.String = NULL;
+#endif
-#endif
return;
}
Modified: trunk/sys/contrib/dev/acpica/components/dispatcher/dsfield.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/dispatcher/dsfield.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/dispatcher/dsfield.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -314,6 +314,8 @@
if (!(WalkState->ParseFlags & ACPI_PARSE_EXECUTE))
{
+ ACPI_ERROR ((AE_INFO,
+ "Parse execute mode is not set"));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
@@ -702,6 +704,8 @@
return_ACPI_STATUS (AE_OK);
}
+ ACPI_ERROR ((AE_INFO,
+ "Parse deferred mode is not set"));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
Modified: trunk/sys/contrib/dev/acpica/components/dispatcher/dsobject.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/dispatcher/dsobject.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/dispatcher/dsobject.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -161,15 +161,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
/*******************************************************************************
*
@@ -186,7 +178,7 @@
*
******************************************************************************/
-static ACPI_STATUS
+ACPI_STATUS
AcpiDsBuildInternalObject (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op,
@@ -194,7 +186,6 @@
{
ACPI_OPERAND_OBJECT *ObjDesc;
ACPI_STATUS Status;
- ACPI_OBJECT_TYPE Type;
ACPI_FUNCTION_TRACE (DsBuildInternalObject);
@@ -205,129 +196,43 @@
{
/*
* 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 */
+
+ if ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
+ (Op->Common.Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP))
{
- /* 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)))
+ /*
+ * 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));
-
- return_ACPI_STATUS (AE_OK);
- }
- else
- {
ACPI_ERROR_NAMESPACE (Op->Common.Value.String, Status);
+ return_ACPI_STATUS (Status);
}
-
- return_ACPI_STATUS (Status);
}
}
+ }
- /* Special object resolution for elements of a package */
+CreateNewObject:
- if ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
- (Op->Common.Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP))
- {
- /*
- * Attempt to resolve the node to a value before we insert it into
- * the package. If this is a reference to a common data type,
- * resolve it immediately. According to the ACPI spec, package
- * elements can only be "data objects" or method references.
- * Attempt to resolve to an Integer, Buffer, String or Package.
- * If cannot, return the named reference (for things like Devices,
- * Methods, etc.) Buffer Fields and Fields will resolve to simple
- * objects (int/buf/str/pkg).
- *
- * NOTE: References to things like Devices, Methods, Mutexes, etc.
- * will remain as named references. This behavior is not described
- * in the ACPI spec, but it appears to be an oversight.
- */
- ObjDesc = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Op->Common.Node);
-
- Status = AcpiExResolveNodeToValue (
- ACPI_CAST_INDIRECT_PTR (ACPI_NAMESPACE_NODE, &ObjDesc),
- WalkState);
- if (ACPI_FAILURE (Status))
- {
- return_ACPI_STATUS (Status);
- }
-
- /*
- * Special handling for Alias objects. We need to setup the type
- * and the Op->Common.Node to point to the Alias target. Note,
- * Alias has at most one level of indirection internally.
- */
- Type = Op->Common.Node->Type;
- if (Type == ACPI_TYPE_LOCAL_ALIAS)
- {
- Type = ObjDesc->Common.Type;
- Op->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
- Op->Common.Node->Object);
- }
-
- switch (Type)
- {
- /*
- * For these types, we need the actual node, not the subobject.
- * However, the subobject did not get an extra reference count above.
- *
- * TBD: should ExResolveNodeToValue be changed to fix this?
- */
- case ACPI_TYPE_DEVICE:
- case ACPI_TYPE_THERMAL:
-
- AcpiUtAddReference (Op->Common.Node->Object);
-
- /*lint -fallthrough */
- /*
- * For these types, we need the actual node, not the subobject.
- * The subobject got an extra reference count in ExResolveNodeToValue.
- */
- case ACPI_TYPE_MUTEX:
- case ACPI_TYPE_METHOD:
- case ACPI_TYPE_POWER:
- case ACPI_TYPE_PROCESSOR:
- case ACPI_TYPE_EVENT:
- case ACPI_TYPE_REGION:
-
- /* We will create a reference object for these types below */
- break;
-
- default:
- /*
- * All other types - the node was resolved to an actual
- * object, we are done.
- */
- goto Exit;
- }
- }
- }
-
/* Create and init a new internal ACPI object */
ObjDesc = AcpiUtCreateInternalObject (
@@ -345,7 +250,28 @@
return_ACPI_STATUS (Status);
}
-Exit:
+ /*
+ * Handling for unresolved package reference elements.
+ * These are elements that are namepaths.
+ */
+ if ((Op->Common.Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
+ (Op->Common.Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP))
+ {
+ ObjDesc->Reference.Resolved = TRUE;
+
+ if ((Op->Common.AmlOpcode == AML_INT_NAMEPATH_OP) &&
+ !ObjDesc->Reference.Node)
+ {
+ /*
+ * Name was unresolved above.
+ * Get the prefix node for later lookup
+ */
+ ObjDesc->Reference.Node = WalkState->ScopeInfo->Scope.Node;
+ ObjDesc->Reference.Aml = Op->Common.Aml;
+ ObjDesc->Reference.Resolved = FALSE;
+ }
+ }
+
*ObjDescPtr = ObjDesc;
return_ACPI_STATUS (Status);
}
@@ -467,211 +393,8 @@
return_ACPI_STATUS (AE_OK);
}
-
/*******************************************************************************
*
- * FUNCTION: AcpiDsBuildInternalPackageObj
- *
- * PARAMETERS: WalkState - Current walk state
- * Op - Parser object to be translated
- * ElementCount - Number of elements in the package - this is
- * the NumElements argument to Package()
- * ObjDescPtr - Where the ACPI internal object is returned
- *
- * RETURN: Status
- *
- * DESCRIPTION: Translate a parser Op package object to the equivalent
- * namespace object
- *
- * NOTE: The number of elements in the package will be always be the NumElements
- * count, regardless of the number of elements in the package list. If
- * NumElements is smaller, only that many package list elements are used.
- * if NumElements is larger, the Package object is padded out with
- * objects of type Uninitialized (as per ACPI spec.)
- *
- * Even though the ASL compilers do not allow NumElements to be smaller
- * than the Package list length (for the fixed length package opcode), some
- * BIOS code modifies the AML on the fly to adjust the NumElements, and
- * this code compensates for that. This also provides compatibility with
- * other AML interpreters.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiDsBuildInternalPackageObj (
- ACPI_WALK_STATE *WalkState,
- ACPI_PARSE_OBJECT *Op,
- UINT32 ElementCount,
- ACPI_OPERAND_OBJECT **ObjDescPtr)
-{
- ACPI_PARSE_OBJECT *Arg;
- ACPI_PARSE_OBJECT *Parent;
- ACPI_OPERAND_OBJECT *ObjDesc = NULL;
- ACPI_STATUS Status = AE_OK;
- UINT32 i;
- UINT16 Index;
- UINT16 ReferenceCount;
-
-
- ACPI_FUNCTION_TRACE (DsBuildInternalPackageObj);
-
-
- /* Find the parent of a possibly nested package */
-
- Parent = Op->Common.Parent;
- while ((Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
- (Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP))
- {
- Parent = Parent->Common.Parent;
- }
-
- /*
- * If we are evaluating a Named package object "Name (xxxx, Package)",
- * the package object already exists, otherwise it must be created.
- */
- ObjDesc = *ObjDescPtr;
- if (!ObjDesc)
- {
- ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_PACKAGE);
- *ObjDescPtr = ObjDesc;
- if (!ObjDesc)
- {
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
-
- ObjDesc->Package.Node = Parent->Common.Node;
- }
-
- /*
- * Allocate the element array (array of pointers to the individual
- * objects) based on the NumElements parameter. Add an extra pointer slot
- * so that the list is always null terminated.
- */
- ObjDesc->Package.Elements = ACPI_ALLOCATE_ZEROED (
- ((ACPI_SIZE) ElementCount + 1) * sizeof (void *));
-
- if (!ObjDesc->Package.Elements)
- {
- AcpiUtDeleteObjectDesc (ObjDesc);
- return_ACPI_STATUS (AE_NO_MEMORY);
- }
-
- ObjDesc->Package.Count = ElementCount;
-
- /*
- * Initialize the elements of the package, up to the NumElements count.
- * Package is automatically padded with uninitialized (NULL) elements
- * if NumElements is greater than the package list length. Likewise,
- * Package is truncated if NumElements is less than the list length.
- */
- Arg = Op->Common.Value.Arg;
- Arg = Arg->Common.Next;
- for (i = 0; Arg && (i < ElementCount); i++)
- {
- if (Arg->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP)
- {
- if (Arg->Common.Node->Type == ACPI_TYPE_METHOD)
- {
- /*
- * A method reference "looks" to the parser to be a method
- * invocation, so we special case it here
- */
- Arg->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
- Status = AcpiDsBuildInternalObject (
- WalkState, Arg, &ObjDesc->Package.Elements[i]);
- }
- else
- {
- /* This package element is already built, just get it */
-
- ObjDesc->Package.Elements[i] =
- ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Arg->Common.Node);
- }
- }
- else
- {
- Status = AcpiDsBuildInternalObject (
- WalkState, Arg, &ObjDesc->Package.Elements[i]);
- }
-
- if (*ObjDescPtr)
- {
- /* Existing package, get existing reference count */
-
- ReferenceCount = (*ObjDescPtr)->Common.ReferenceCount;
- if (ReferenceCount > 1)
- {
- /* Make new element ref count match original ref count */
-
- for (Index = 0; Index < (ReferenceCount - 1); Index++)
- {
- AcpiUtAddReference ((ObjDesc->Package.Elements[i]));
- }
- }
- }
-
- Arg = Arg->Common.Next;
- }
-
- /* Check for match between NumElements and actual length of PackageList */
-
- if (Arg)
- {
- /*
- * NumElements was exhausted, but there are remaining elements in the
- * PackageList. Truncate the package to NumElements.
- *
- * Note: technically, this is an error, from ACPI spec: "It is an error
- * for NumElements to be less than the number of elements in the
- * PackageList". However, we just print a message and
- * no exception is returned. This provides Windows compatibility. Some
- * BIOSs will alter the NumElements on the fly, creating this type
- * of ill-formed package object.
- */
- while (Arg)
- {
- /*
- * We must delete any package elements that were created earlier
- * and are not going to be used because of the package truncation.
- */
- if (Arg->Common.Node)
- {
- AcpiUtRemoveReference (
- ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Arg->Common.Node));
- Arg->Common.Node = NULL;
- }
-
- /* Find out how many elements there really are */
-
- i++;
- Arg = Arg->Common.Next;
- }
-
- ACPI_INFO ((
- "Actual Package length (%u) is larger than "
- "NumElements field (%u), truncated",
- i, ElementCount));
- }
- else if (i < ElementCount)
- {
- /*
- * Arg list (elements) was exhausted, but we did not reach NumElements count.
- * Note: this is not an error, the package is padded out with NULLs.
- */
- ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
- "Package List length (%u) smaller than NumElements "
- "count (%u), padded with null elements\n",
- i, ElementCount));
- }
-
- ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
- Op->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjDesc);
- return_ACPI_STATUS (Status);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiDsCreateNode
*
* PARAMETERS: WalkState - Current walk state
@@ -797,10 +520,20 @@
case ACPI_TYPE_PACKAGE:
/*
- * Defer evaluation of Package TermArg operand
+ * Defer evaluation of Package TermArg operand and all
+ * package elements. (01/2017): We defer the element
+ * resolution to allow forward references from the package
+ * in order to provide compatibility with other ACPI
+ * implementations.
*/
ObjDesc->Package.Node = ACPI_CAST_PTR (
ACPI_NAMESPACE_NODE, WalkState->Operands[0]);
+
+ if (!Op->Named.Data)
+ {
+ return_ACPI_STATUS (AE_OK);
+ }
+
ObjDesc->Package.AmlStart = Op->Named.Data;
ObjDesc->Package.AmlLength = Op->Named.Length;
break;
@@ -941,8 +674,11 @@
/* Node was saved in Op */
ObjDesc->Reference.Node = Op->Common.Node;
- ObjDesc->Reference.Object = Op->Common.Node->Object;
ObjDesc->Reference.Class = ACPI_REFCLASS_NAME;
+ if (Op->Common.Node)
+ {
+ ObjDesc->Reference.Object = Op->Common.Node->Object;
+ }
break;
case AML_DEBUG_OP:
Modified: trunk/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -748,6 +748,16 @@
*/
WalkState->OperandIndex = WalkState->NumOperands;
+ /* Ignore if child is not valid */
+
+ if (!Op->Common.Value.Arg)
+ {
+ ACPI_ERROR ((AE_INFO,
+ "Dispatch: Missing child while executing TermArg for %X",
+ Op->Common.AmlOpcode));
+ return_ACPI_STATUS (AE_OK);
+ }
+
Status = AcpiDsCreateOperand (WalkState, Op->Common.Value.Arg, 1);
if (ACPI_FAILURE (Status))
{
Added: trunk/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c (rev 0)
+++ trunk/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -0,0 +1,635 @@
+/******************************************************************************
+ *
+ * Module Name: dspkginit - Completion of deferred package initialization
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
+ * All rights reserved.
+ *
+ * 2. License
+ *
+ * 2.1. This is your license from Intel Corp. under its intellectual property
+ * rights. You may have additional license terms from the party that provided
+ * you this software, covering your right to use that party's intellectual
+ * property rights.
+ *
+ * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
+ * copy of the source code appearing in this file ("Covered Code") an
+ * irrevocable, perpetual, worldwide license under Intel's copyrights in the
+ * base code distributed originally by Intel ("Original Intel Code") to copy,
+ * make derivatives, distribute, use and display any portion of the Covered
+ * Code in any form, with the right to sublicense such rights; and
+ *
+ * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
+ * license (with the right to sublicense), under only those claims of Intel
+ * patents that are infringed by the Original Intel Code, to make, use, sell,
+ * offer to sell, and import the Covered Code and derivative works thereof
+ * solely to the minimum extent necessary to exercise the above copyright
+ * license, and in no event shall the patent license extend to any additions
+ * to or modifications of the Original Intel Code. No other license or right
+ * is granted directly or by implication, estoppel or otherwise;
+ *
+ * The above copyright and patent license is granted only if the following
+ * conditions are met:
+ *
+ * 3. Conditions
+ *
+ * 3.1. Redistribution of Source with Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification with rights to further distribute source must include
+ * the above Copyright Notice, the above License, this list of Conditions,
+ * and the following Disclaimer and Export Compliance provision. In addition,
+ * Licensee must cause all Covered Code to which Licensee contributes to
+ * contain a file documenting the changes Licensee made to create that Covered
+ * Code and the date of any change. Licensee must include in that file the
+ * documentation of any changes made by any predecessor Licensee. Licensee
+ * must include a prominent statement that the modification is derived,
+ * directly or indirectly, from Original Intel Code.
+ *
+ * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
+ * Redistribution of source code of any substantial portion of the Covered
+ * Code or modification without rights to further distribute source must
+ * include the following Disclaimer and Export Compliance provision in the
+ * documentation and/or other materials provided with distribution. In
+ * addition, Licensee may not authorize further sublicense of source of any
+ * portion of the Covered Code, and must include terms to the effect that the
+ * license from Licensee to its licensee is limited to the intellectual
+ * property embodied in the software Licensee provides to its licensee, and
+ * not to intellectual property embodied in modifications its licensee may
+ * make.
+ *
+ * 3.3. Redistribution of Executable. Redistribution in executable form of any
+ * substantial portion of the Covered Code or modification must reproduce the
+ * above Copyright Notice, and the following Disclaimer and Export Compliance
+ * provision in the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3.4. Intel retains all right, title, and interest in and to the Original
+ * Intel Code.
+ *
+ * 3.5. Neither the name Intel nor any other trademark owned or controlled by
+ * Intel shall be used in advertising or otherwise to promote the sale, use or
+ * other dealings in products derived from or relating to the Covered Code
+ * without prior written authorization from Intel.
+ *
+ * 4. Disclaimer and Export Compliance
+ *
+ * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
+ * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
+ * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
+ * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
+ * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
+ * PARTICULAR PURPOSE.
+ *
+ * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
+ * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
+ * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
+ * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
+ * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
+ * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
+ * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
+ * LIMITED REMEDY.
+ *
+ * 4.3. Licensee shall not export, either directly or indirectly, any of this
+ * software or system incorporating such software without first obtaining any
+ * required license or other approval from the U. S. Department of Commerce or
+ * any other agency or department of the United States Government. In the
+ * event Licensee exports any such software from the United States or
+ * re-exports any such software from a foreign destination, Licensee shall
+ * ensure that the distribution and export/re-export of the software is in
+ * compliance with all laws, regulations, orders, or other restrictions of the
+ * U.S. Export Administration Regulations. Licensee agrees that neither it nor
+ * any of its subsidiaries will export/re-export any technical data, process,
+ * software, or service, directly or indirectly, to any country for which the
+ * United States government or any agency thereof requires an export license,
+ * other governmental approval, or letter of assurance, without first obtaining
+ * such license, approval or letter.
+ *
+ *****************************************************************************
+ *
+ * Alternatively, you may choose to be licensed under the terms of the
+ * following license:
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions, and the following disclaimer,
+ * without modification.
+ * 2. Redistributions in binary form must reproduce at minimum a disclaimer
+ * substantially similar to the "NO WARRANTY" disclaimer below
+ * ("Disclaimer") and any redistribution must be conditioned upon
+ * including a substantially similar Disclaimer requirement for further
+ * binary redistribution.
+ * 3. Neither the names of the above-listed copyright holders nor the names
+ * of any contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Alternatively, you may choose to be licensed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ *
+ *****************************************************************************/
+
+#include <contrib/dev/acpica/include/acpi.h>
+#include <contrib/dev/acpica/include/accommon.h>
+#include <contrib/dev/acpica/include/acnamesp.h>
+#include <contrib/dev/acpica/include/amlcode.h>
+#include <contrib/dev/acpica/include/acdispat.h>
+#include <contrib/dev/acpica/include/acinterp.h>
+
+
+#define _COMPONENT ACPI_NAMESPACE
+ ACPI_MODULE_NAME ("dspkginit")
+
+
+/* Local prototypes */
+
+static void
+AcpiDsResolvePackageElement (
+ ACPI_OPERAND_OBJECT **Element);
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsBuildInternalPackageObj
+ *
+ * PARAMETERS: WalkState - Current walk state
+ * Op - Parser object to be translated
+ * ElementCount - Number of elements in the package - this is
+ * the NumElements argument to Package()
+ * ObjDescPtr - Where the ACPI internal object is returned
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Translate a parser Op package object to the equivalent
+ * namespace object
+ *
+ * NOTE: The number of elements in the package will be always be the NumElements
+ * count, regardless of the number of elements in the package list. If
+ * NumElements is smaller, only that many package list elements are used.
+ * if NumElements is larger, the Package object is padded out with
+ * objects of type Uninitialized (as per ACPI spec.)
+ *
+ * Even though the ASL compilers do not allow NumElements to be smaller
+ * than the Package list length (for the fixed length package opcode), some
+ * BIOS code modifies the AML on the fly to adjust the NumElements, and
+ * this code compensates for that. This also provides compatibility with
+ * other AML interpreters.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsBuildInternalPackageObj (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op,
+ UINT32 ElementCount,
+ ACPI_OPERAND_OBJECT **ObjDescPtr)
+{
+ ACPI_PARSE_OBJECT *Arg;
+ ACPI_PARSE_OBJECT *Parent;
+ ACPI_OPERAND_OBJECT *ObjDesc = NULL;
+ ACPI_STATUS Status = AE_OK;
+ UINT16 ReferenceCount;
+ UINT32 Index;
+ UINT32 i;
+
+
+ ACPI_FUNCTION_TRACE (DsBuildInternalPackageObj);
+
+
+ /* Find the parent of a possibly nested package */
+
+ Parent = Op->Common.Parent;
+ while ((Parent->Common.AmlOpcode == AML_PACKAGE_OP) ||
+ (Parent->Common.AmlOpcode == AML_VARIABLE_PACKAGE_OP))
+ {
+ Parent = Parent->Common.Parent;
+ }
+
+ /*
+ * If we are evaluating a Named package object of the form:
+ * Name (xxxx, Package)
+ * the package object already exists, otherwise it must be created.
+ */
+ ObjDesc = *ObjDescPtr;
+ if (!ObjDesc)
+ {
+ ObjDesc = AcpiUtCreateInternalObject (ACPI_TYPE_PACKAGE);
+ *ObjDescPtr = ObjDesc;
+ if (!ObjDesc)
+ {
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ ObjDesc->Package.Node = Parent->Common.Node;
+ }
+
+ if (ObjDesc->Package.Flags & AOPOBJ_DATA_VALID) /* Just in case */
+ {
+ return_ACPI_STATUS (AE_OK);
+ }
+
+ /*
+ * Allocate the element array (array of pointers to the individual
+ * objects) based on the NumElements parameter. Add an extra pointer slot
+ * so that the list is always null terminated.
+ */
+ ObjDesc->Package.Elements = ACPI_ALLOCATE_ZEROED (
+ ((ACPI_SIZE) ElementCount + 1) * sizeof (void *));
+
+ if (!ObjDesc->Package.Elements)
+ {
+ AcpiUtDeleteObjectDesc (ObjDesc);
+ return_ACPI_STATUS (AE_NO_MEMORY);
+ }
+
+ ObjDesc->Package.Count = ElementCount;
+ Arg = Op->Common.Value.Arg;
+ Arg = Arg->Common.Next;
+
+ if (Arg)
+ {
+ ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
+ }
+
+ /*
+ * Initialize the elements of the package, up to the NumElements count.
+ * Package is automatically padded with uninitialized (NULL) elements
+ * if NumElements is greater than the package list length. Likewise,
+ * Package is truncated if NumElements is less than the list length.
+ */
+ for (i = 0; Arg && (i < ElementCount); i++)
+ {
+ if (Arg->Common.AmlOpcode == AML_INT_RETURN_VALUE_OP)
+ {
+ if (Arg->Common.Node->Type == ACPI_TYPE_METHOD)
+ {
+ /*
+ * A method reference "looks" to the parser to be a method
+ * invocation, so we special case it here
+ */
+ Arg->Common.AmlOpcode = AML_INT_NAMEPATH_OP;
+ Status = AcpiDsBuildInternalObject (
+ WalkState, Arg, &ObjDesc->Package.Elements[i]);
+ }
+ else
+ {
+ /* This package element is already built, just get it */
+
+ ObjDesc->Package.Elements[i] =
+ ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Arg->Common.Node);
+ }
+ }
+ else
+ {
+ Status = AcpiDsBuildInternalObject (
+ WalkState, Arg, &ObjDesc->Package.Elements[i]);
+ if (Status == AE_NOT_FOUND)
+ {
+ ACPI_ERROR ((AE_INFO, "%-48s", "****DS namepath not found"));
+ }
+
+ /*
+ * Initialize this package element. This function handles the
+ * resolution of named references within the package.
+ */
+ AcpiDsInitPackageElement (0, ObjDesc->Package.Elements[i],
+ NULL, &ObjDesc->Package.Elements[i]);
+ }
+
+ if (*ObjDescPtr)
+ {
+ /* Existing package, get existing reference count */
+
+ ReferenceCount = (*ObjDescPtr)->Common.ReferenceCount;
+ if (ReferenceCount > 1)
+ {
+ /* Make new element ref count match original ref count */
+ /* TBD: Probably need an AcpiUtAddReferences function */
+
+ for (Index = 0; Index < ((UINT32) ReferenceCount - 1); Index++)
+ {
+ AcpiUtAddReference ((ObjDesc->Package.Elements[i]));
+ }
+ }
+ }
+
+ Arg = Arg->Common.Next;
+ }
+
+ /* Check for match between NumElements and actual length of PackageList */
+
+ if (Arg)
+ {
+ /*
+ * NumElements was exhausted, but there are remaining elements in
+ * the PackageList. Truncate the package to NumElements.
+ *
+ * Note: technically, this is an error, from ACPI spec: "It is an
+ * error for NumElements to be less than the number of elements in
+ * the PackageList". However, we just print a message and no
+ * exception is returned. This provides compatibility with other
+ * ACPI implementations. Some firmware implementations will alter
+ * the NumElements on the fly, possibly creating this type of
+ * ill-formed package object.
+ */
+ while (Arg)
+ {
+ /*
+ * We must delete any package elements that were created earlier
+ * and are not going to be used because of the package truncation.
+ */
+ if (Arg->Common.Node)
+ {
+ AcpiUtRemoveReference (
+ ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, Arg->Common.Node));
+ Arg->Common.Node = NULL;
+ }
+
+ /* Find out how many elements there really are */
+
+ i++;
+ Arg = Arg->Common.Next;
+ }
+
+ ACPI_INFO ((
+ "Actual Package length (%u) is larger than "
+ "NumElements field (%u), truncated",
+ i, ElementCount));
+ }
+ else if (i < ElementCount)
+ {
+ /*
+ * Arg list (elements) was exhausted, but we did not reach
+ * NumElements count.
+ *
+ * Note: this is not an error, the package is padded out
+ * with NULLs.
+ */
+ ACPI_DEBUG_PRINT ((ACPI_DB_INFO,
+ "Package List length (%u) smaller than NumElements "
+ "count (%u), padded with null elements\n",
+ i, ElementCount));
+ }
+
+ ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
+ Op->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, ObjDesc);
+ return_ACPI_STATUS (Status);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsInitPackageElement
+ *
+ * PARAMETERS: ACPI_PKG_CALLBACK
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Resolve a named reference element within a package object
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiDsInitPackageElement (
+ UINT8 ObjectType,
+ ACPI_OPERAND_OBJECT *SourceObject,
+ ACPI_GENERIC_STATE *State,
+ void *Context)
+{
+ ACPI_OPERAND_OBJECT **ElementPtr;
+
+
+ if (!SourceObject)
+ {
+ return (AE_OK);
+ }
+
+ /*
+ * The following code is a bit of a hack to workaround a (current)
+ * limitation of the ACPI_PKG_CALLBACK interface. We need a pointer
+ * to the location within the element array because a new object
+ * may be created and stored there.
+ */
+ if (Context)
+ {
+ /* A direct call was made to this function */
+
+ ElementPtr = (ACPI_OPERAND_OBJECT **) Context;
+ }
+ else
+ {
+ /* Call came from AcpiUtWalkPackageTree */
+
+ ElementPtr = State->Pkg.ThisTargetObj;
+ }
+
+ /* We are only interested in reference objects/elements */
+
+ if (SourceObject->Common.Type == ACPI_TYPE_LOCAL_REFERENCE)
+ {
+ /* Attempt to resolve the (named) reference to a namespace node */
+
+ AcpiDsResolvePackageElement (ElementPtr);
+ }
+ else if (SourceObject->Common.Type == ACPI_TYPE_PACKAGE)
+ {
+ SourceObject->Package.Flags |= AOPOBJ_DATA_VALID;
+ }
+
+ return (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiDsResolvePackageElement
+ *
+ * PARAMETERS: ElementPtr - Pointer to a reference object
+ *
+ * RETURN: Possible new element is stored to the indirect ElementPtr
+ *
+ * DESCRIPTION: Resolve a package element that is a reference to a named
+ * object.
+ *
+ ******************************************************************************/
+
+static void
+AcpiDsResolvePackageElement (
+ ACPI_OPERAND_OBJECT **ElementPtr)
+{
+ ACPI_STATUS Status;
+ ACPI_GENERIC_STATE ScopeInfo;
+ ACPI_OPERAND_OBJECT *Element = *ElementPtr;
+ ACPI_NAMESPACE_NODE *ResolvedNode;
+ char *ExternalPath = NULL;
+ ACPI_OBJECT_TYPE Type;
+
+
+ ACPI_FUNCTION_TRACE (DsResolvePackageElement);
+
+
+ /* Check if reference element is already resolved */
+
+ if (Element->Reference.Resolved)
+ {
+ return_VOID;
+ }
+
+ /* Element must be a reference object of correct type */
+
+ ScopeInfo.Scope.Node = Element->Reference.Node; /* Prefix node */
+
+ Status = AcpiNsLookup (&ScopeInfo,
+ (char *) Element->Reference.Aml, /* Pointer to AML path */
+ ACPI_TYPE_ANY, ACPI_IMODE_EXECUTE,
+ ACPI_NS_SEARCH_PARENT | ACPI_NS_DONT_OPEN_SCOPE,
+ NULL, &ResolvedNode);
+ if (ACPI_FAILURE (Status))
+ {
+ Status = AcpiNsExternalizeName (ACPI_UINT32_MAX,
+ (char *) Element->Reference.Aml,
+ NULL, &ExternalPath);
+
+ ACPI_EXCEPTION ((AE_INFO, Status,
+ "Could not find/resolve named package element: %s", ExternalPath));
+
+ ACPI_FREE (ExternalPath);
+ *ElementPtr = NULL;
+ return_VOID;
+ }
+ else if (ResolvedNode->Type == ACPI_TYPE_ANY)
+ {
+ /* Named reference not resolved, return a NULL package element */
+
+ ACPI_ERROR ((AE_INFO,
+ "Could not resolve named package element [%4.4s] in [%4.4s]",
+ ResolvedNode->Name.Ascii, ScopeInfo.Scope.Node->Name.Ascii));
+ *ElementPtr = NULL;
+ return_VOID;
+ }
+#if 0
+ else if (ResolvedNode->Flags & ANOBJ_TEMPORARY)
+ {
+ /*
+ * A temporary node found here indicates that the reference is
+ * to a node that was created within this method. We are not
+ * going to allow it (especially if the package is returned
+ * from the method) -- the temporary node will be deleted out
+ * from under the method. (05/2017).
+ */
+ ACPI_ERROR ((AE_INFO,
+ "Package element refers to a temporary name [%4.4s], "
+ "inserting a NULL element",
+ ResolvedNode->Name.Ascii));
+ *ElementPtr = NULL;
+ return_VOID;
+ }
+#endif
+
+ /*
+ * Special handling for Alias objects. We need ResolvedNode to point
+ * to the Alias target. This effectively "resolves" the alias.
+ */
+ if (ResolvedNode->Type == ACPI_TYPE_LOCAL_ALIAS)
+ {
+ ResolvedNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
+ ResolvedNode->Object);
+ }
+
+ /* Update the reference object */
+
+ Element->Reference.Resolved = TRUE;
+ Element->Reference.Node = ResolvedNode;
+ Type = Element->Reference.Node->Type;
+
+ /*
+ * Attempt to resolve the node to a value before we insert it into
+ * the package. If this is a reference to a common data type,
+ * resolve it immediately. According to the ACPI spec, package
+ * elements can only be "data objects" or method references.
+ * Attempt to resolve to an Integer, Buffer, String or Package.
+ * If cannot, return the named reference (for things like Devices,
+ * Methods, etc.) Buffer Fields and Fields will resolve to simple
+ * objects (int/buf/str/pkg).
+ *
+ * NOTE: References to things like Devices, Methods, Mutexes, etc.
+ * will remain as named references. This behavior is not described
+ * in the ACPI spec, but it appears to be an oversight.
+ */
+ Status = AcpiExResolveNodeToValue (&ResolvedNode, NULL);
+ if (ACPI_FAILURE (Status))
+ {
+ return_VOID;
+ }
+
+#if 0
+/* TBD - alias support */
+ /*
+ * Special handling for Alias objects. We need to setup the type
+ * and the Op->Common.Node to point to the Alias target. Note,
+ * Alias has at most one level of indirection internally.
+ */
+ Type = Op->Common.Node->Type;
+ if (Type == ACPI_TYPE_LOCAL_ALIAS)
+ {
+ Type = ObjDesc->Common.Type;
+ Op->Common.Node = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE,
+ Op->Common.Node->Object);
+ }
+#endif
+
+ switch (Type)
+ {
+ /*
+ * These object types are a result of named references, so we will
+ * leave them as reference objects. In other words, these types
+ * have no intrinsic "value".
+ */
+ case ACPI_TYPE_DEVICE:
+ case ACPI_TYPE_THERMAL:
+
+ /* TBD: This may not be necesssary */
+
+ AcpiUtAddReference (ResolvedNode->Object);
+ break;
+
+ case ACPI_TYPE_MUTEX:
+ case ACPI_TYPE_METHOD:
+ case ACPI_TYPE_POWER:
+ case ACPI_TYPE_PROCESSOR:
+ case ACPI_TYPE_EVENT:
+ case ACPI_TYPE_REGION:
+
+ break;
+
+ default:
+ /*
+ * For all other types - the node was resolved to an actual
+ * operand object with a value, return the object
+ */
+ *ElementPtr = (ACPI_OPERAND_OBJECT *) ResolvedNode;
+ break;
+ }
+
+ return_VOID;
+}
Property changes on: trunk/sys/contrib/dev/acpica/components/dispatcher/dspkginit.c
___________________________________________________________________
Added: mnbsd:nokeywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:mime-type
## -0,0 +1 ##
+text/plain
\ No newline at end of property
Modified: trunk/sys/contrib/dev/acpica/components/executer/excreate.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/executer/excreate.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/executer/excreate.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -204,65 +204,40 @@
TargetNode = ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, TargetNode->Object);
}
- /*
- * For objects that can never change (i.e., the NS node will
- * permanently point to the same object), we can simply attach
- * the object to the new NS node. For other objects (such as
- * Integers, buffers, etc.), we have to point the Alias node
- * to the original Node.
- */
- switch (TargetNode->Type)
+ /* Ensure that the target node is valid */
+
+ if (!TargetNode)
{
+ return_ACPI_STATUS (AE_NULL_OBJECT);
+ }
- /* For these types, the sub-object can change dynamically via a Store */
+ /* Construct the alias object (a namespace node) */
- case ACPI_TYPE_INTEGER:
- case ACPI_TYPE_STRING:
- case ACPI_TYPE_BUFFER:
- case ACPI_TYPE_PACKAGE:
- case ACPI_TYPE_BUFFER_FIELD:
- /*
- * These types open a new scope, so we need the NS node in order to access
- * any children.
- */
- case ACPI_TYPE_DEVICE:
- case ACPI_TYPE_POWER:
- case ACPI_TYPE_PROCESSOR:
- case ACPI_TYPE_THERMAL:
- case ACPI_TYPE_LOCAL_SCOPE:
- /*
- * The new alias has the type ALIAS and points to the original
- * NS node, not the object itself.
- */
- AliasNode->Type = ACPI_TYPE_LOCAL_ALIAS;
- AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
- break;
-
+ switch (TargetNode->Type)
+ {
case ACPI_TYPE_METHOD:
/*
- * Control method aliases need to be differentiated
+ * Control method aliases need to be differentiated with
+ * a special type
*/
AliasNode->Type = ACPI_TYPE_LOCAL_METHOD_ALIAS;
- AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
break;
default:
-
- /* Attach the original source object to the new Alias Node */
-
/*
- * The new alias assumes the type of the target, and it points
- * to the same object. The reference count of the object has an
- * additional reference to prevent deletion out from under either the
- * target node or the alias Node
+ * All other object types.
+ *
+ * The new alias has the type ALIAS and points to the original
+ * NS node, not the object itself.
*/
- Status = AcpiNsAttachObject (AliasNode,
- AcpiNsGetAttachedObject (TargetNode), TargetNode->Type);
+ AliasNode->Type = ACPI_TYPE_LOCAL_ALIAS;
+ AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
break;
}
/* Since both operands are Nodes, we don't need to delete them */
+ AliasNode->Object = ACPI_CAST_PTR (ACPI_OPERAND_OBJECT, TargetNode);
return_ACPI_STATUS (Status);
}
Modified: trunk/sys/contrib/dev/acpica/components/executer/exdump.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/executer/exdump.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/executer/exdump.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -230,7 +230,7 @@
{ACPI_EXD_INIT, ACPI_EXD_TABLE_SIZE (AcpiExDumpPackage), NULL},
{ACPI_EXD_NODE, ACPI_EXD_OFFSET (Package.Node), "Parent Node"},
{ACPI_EXD_UINT8, ACPI_EXD_OFFSET (Package.Flags), "Flags"},
- {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Package.Count), "Elements"},
+ {ACPI_EXD_UINT32, ACPI_EXD_OFFSET (Package.Count), "Element Count"},
{ACPI_EXD_POINTER, ACPI_EXD_OFFSET (Package.Elements), "Element List"},
{ACPI_EXD_PACKAGE, 0, NULL}
};
@@ -511,6 +511,11 @@
while (Count)
{
+ if (!ObjDesc)
+ {
+ return;
+ }
+
Target = ACPI_ADD_PTR (UINT8, ObjDesc, Info->Offset);
Name = Info->Name;
@@ -523,7 +528,8 @@
case ACPI_EXD_TYPE:
AcpiOsPrintf ("%20s : %2.2X [%s]\n", "Type",
- ObjDesc->Common.Type, AcpiUtGetObjectTypeName (ObjDesc));
+ ObjDesc->Common.Type,
+ AcpiUtGetObjectTypeName (ObjDesc));
break;
case ACPI_EXD_UINT8:
@@ -589,10 +595,10 @@
Start = *ACPI_CAST_PTR (void *, Target);
Next = Start;
- AcpiOsPrintf ("%20s : %p", Name, Next);
+ AcpiOsPrintf ("%20s : %p ", Name, Next);
if (Next)
{
- AcpiOsPrintf ("(%s %2.2X)",
+ AcpiOsPrintf ("%s (Type %2.2X)",
AcpiUtGetObjectTypeName (Next), Next->Common.Type);
while (Next->Common.NextObject)
@@ -615,6 +621,10 @@
}
}
}
+ else
+ {
+ AcpiOsPrintf ("- No attached objects");
+ }
AcpiOsPrintf ("\n");
break;
@@ -1295,7 +1305,8 @@
default:
- AcpiOsPrintf ("[Unknown Type] %X\n", ObjDesc->Common.Type);
+ AcpiOsPrintf ("[%s] Type: %2.2X\n",
+ AcpiUtGetTypeName (ObjDesc->Common.Type), ObjDesc->Common.Type);
break;
}
}
@@ -1339,10 +1350,19 @@
{
AcpiExDumpNamespaceNode ((ACPI_NAMESPACE_NODE *) ObjDesc, Flags);
- AcpiOsPrintf ("\nAttached Object (%p):\n",
- ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object);
+ ObjDesc = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object;
+ if (!ObjDesc)
+ {
+ return_VOID;
+ }
- ObjDesc = ((ACPI_NAMESPACE_NODE *) ObjDesc)->Object;
+ AcpiOsPrintf ("\nAttached Object %p", ObjDesc);
+ if (ACPI_GET_DESCRIPTOR_TYPE (ObjDesc) == ACPI_DESC_TYPE_NAMED)
+ {
+ AcpiOsPrintf (" - Namespace Node");
+ }
+
+ AcpiOsPrintf (":\n");
goto DumpObject;
}
@@ -1366,6 +1386,11 @@
DumpObject:
+ if (!ObjDesc)
+ {
+ return_VOID;
+ }
+
/* Common Fields */
AcpiExDumpObject (ObjDesc, AcpiExDumpCommon);
Modified: trunk/sys/contrib/dev/acpica/components/executer/exmisc.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/executer/exmisc.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/executer/exmisc.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -402,6 +402,8 @@
default:
+ ACPI_ERROR ((AE_INFO,
+ "Invalid numeric logical opcode: %X", Opcode));
Status = AE_AML_INTERNAL;
break;
}
@@ -487,6 +489,9 @@
default:
+ ACPI_ERROR ((AE_INFO,
+ "Invalid object type for logical operator: %X",
+ Operand0->Common.Type));
Status = AE_AML_INTERNAL;
break;
}
@@ -536,6 +541,8 @@
default:
+ ACPI_ERROR ((AE_INFO,
+ "Invalid comparison opcode: %X", Opcode));
Status = AE_AML_INTERNAL;
break;
}
@@ -614,6 +621,8 @@
default:
+ ACPI_ERROR ((AE_INFO,
+ "Invalid comparison opcode: %X", Opcode));
Status = AE_AML_INTERNAL;
break;
}
Modified: trunk/sys/contrib/dev/acpica/components/executer/exoparg2.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/executer/exoparg2.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/executer/exoparg2.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -557,6 +557,8 @@
default:
+ ACPI_ERROR ((AE_INFO,
+ "Invalid object type: %X", (Operand[0])->Common.Type));
Status = AE_AML_INTERNAL;
goto Cleanup;
}
Modified: trunk/sys/contrib/dev/acpica/components/hardware/hwregs.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/hardware/hwregs.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/hardware/hwregs.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -229,7 +229,7 @@
}
else if (Reg->AccessWidth)
{
- AccessBitWidth = (1 << (Reg->AccessWidth + 2));
+ AccessBitWidth = ACPI_ACCESS_BIT_WIDTH (Reg->AccessWidth);
}
else
{
Modified: trunk/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/hardware/hwxfsleep.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -185,9 +185,18 @@
static ACPI_SLEEP_FUNCTIONS AcpiSleepDispatch[] =
{
- {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacySleep), AcpiHwExtendedSleep},
- {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep), AcpiHwExtendedWakePrep},
- {ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake), AcpiHwExtendedWake}
+ {ACPI_STRUCT_INIT (legacy_function,
+ ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacySleep)),
+ ACPI_STRUCT_INIT (extended_function,
+ AcpiHwExtendedSleep) },
+ {ACPI_STRUCT_INIT (legacy_function,
+ ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWakePrep)),
+ ACPI_STRUCT_INIT (extended_function,
+ AcpiHwExtendedWakePrep) },
+ {ACPI_STRUCT_INIT (legacy_function,
+ ACPI_HW_OPTIONAL_FUNCTION (AcpiHwLegacyWake)),
+ ACPI_STRUCT_INIT (extended_function,
+ AcpiHwExtendedWake) }
};
Modified: trunk/sys/contrib/dev/acpica/components/namespace/nsaccess.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/namespace/nsaccess.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/namespace/nsaccess.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -411,6 +411,7 @@
{
ACPI_STATUS Status;
char *Path = Pathname;
+ char *ExternalPath;
ACPI_NAMESPACE_NODE *PrefixNode;
ACPI_NAMESPACE_NODE *CurrentNode = NULL;
ACPI_NAMESPACE_NODE *ThisNode = NULL;
@@ -557,11 +558,21 @@
ThisNode = ThisNode->Parent;
if (!ThisNode)
{
- /* Current scope has no parent scope */
+ /*
+ * Current scope has no parent scope. Externalize
+ * the internal path for error message.
+ */
+ Status = AcpiNsExternalizeName (ACPI_UINT32_MAX, Pathname,
+ NULL, &ExternalPath);
+ if (ACPI_SUCCESS (Status))
+ {
+ ACPI_ERROR ((AE_INFO,
+ "%s: Path has too many parent prefixes (^)",
+ ExternalPath));
- ACPI_ERROR ((AE_INFO,
- "%s: Path has too many parent prefixes (^) "
- "- reached beyond root node", Pathname));
+ ACPI_FREE (ExternalPath);
+ }
+
return_ACPI_STATUS (AE_NOT_FOUND);
}
}
@@ -765,6 +776,13 @@
ThisNode = (ACPI_NAMESPACE_NODE *) ThisNode->Object;
}
}
+#ifdef ACPI_ASL_COMPILER
+ if (!AcpiGbl_DisasmFlag &&
+ (ThisNode->Flags & ANOBJ_IS_EXTERNAL))
+ {
+ ThisNode->Flags |= IMPLICIT_EXTERNAL;
+ }
+#endif
}
/* Special handling for the last segment (NumSegments == 0) */
Modified: trunk/sys/contrib/dev/acpica/components/namespace/nsarguments.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/namespace/nsarguments.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/namespace/nsarguments.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -184,9 +184,14 @@
UINT32 i;
- /* If not a predefined name, cannot typecheck args */
-
- if (!Info->Predefined)
+ /*
+ * If not a predefined name, cannot typecheck args, because
+ * we have no idea what argument types are expected.
+ * Also, ignore typecheck if warnings/errors if this method
+ * has already been evaluated at least once -- in order
+ * to suppress repetitive messages.
+ */
+ if (!Info->Predefined || (Info->Node->Flags & ANOBJ_EVALUATED))
{
return;
}
@@ -208,6 +213,10 @@
"Found [%s], ACPI requires [%s]", (i + 1),
AcpiUtGetTypeName (UserArgType),
AcpiUtGetTypeName (ArgType)));
+
+ /* Prevent any additional typechecking for this method */
+
+ Info->Node->Flags |= ANOBJ_EVALUATED;
}
}
}
@@ -239,7 +248,7 @@
UINT32 RequiredParamCount;
- if (!Predefined)
+ if (!Predefined || (Node->Flags & ANOBJ_EVALUATED))
{
return;
}
@@ -333,6 +342,11 @@
UINT32 RequiredParamCount;
+ if (Node->Flags & ANOBJ_EVALUATED)
+ {
+ return;
+ }
+
if (!Predefined)
{
/*
Modified: trunk/sys/contrib/dev/acpica/components/namespace/nsinit.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/namespace/nsinit.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/namespace/nsinit.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -536,6 +536,20 @@
Info->PackageInit++;
Status = AcpiDsGetPackageArguments (ObjDesc);
+ if (ACPI_FAILURE (Status))
+ {
+ break;
+ }
+
+ /*
+ * Resolve all named references in package objects (and all
+ * sub-packages). This action has been deferred until the entire
+ * namespace has been loaded, in order to support external and
+ * forward references from individual package elements (05/2017).
+ */
+ Status = AcpiUtWalkPackageTree (ObjDesc, NULL,
+ AcpiDsInitPackageElement, NULL);
+ ObjDesc->Package.Flags |= AOPOBJ_DATA_VALID;
break;
default:
Modified: trunk/sys/contrib/dev/acpica/components/namespace/nsnames.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/namespace/nsnames.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/namespace/nsnames.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -209,8 +209,15 @@
ACPI_SIZE Size;
- ACPI_FUNCTION_ENTRY ();
+ /* Validate the Node */
+ if (ACPI_GET_DESCRIPTOR_TYPE (Node) != ACPI_DESC_TYPE_NAMED)
+ {
+ ACPI_ERROR ((AE_INFO,
+ "Invalid/cached reference target node: %p, descriptor type %d",
+ Node, ACPI_GET_DESCRIPTOR_TYPE (Node)));
+ return (0);
+ }
Size = AcpiNsBuildNormalizedPath (Node, NULL, 0, FALSE);
return (Size);
Modified: trunk/sys/contrib/dev/acpica/components/namespace/nsprepkg.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/namespace/nsprepkg.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/namespace/nsprepkg.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -723,6 +723,8 @@
default: /* Should not get here, type was validated by caller */
+ ACPI_ERROR ((AE_INFO, "Invalid Package type: %X",
+ Package->RetInfo.Type));
return (AE_AML_INTERNAL);
}
Modified: trunk/sys/contrib/dev/acpica/components/parser/psloop.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/parser/psloop.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/parser/psloop.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -283,6 +283,9 @@
INCREMENT_ARG_LIST (WalkState->ArgTypes);
}
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ "Final argument count: %u pass %u\n",
+ WalkState->ArgCount, WalkState->PassNumber));
/*
* Handle executable code at "module-level". This refers to
@@ -381,6 +384,10 @@
(Op->Common.Parent->Common.AmlOpcode == AML_NAME_OP) &&
(WalkState->PassNumber <= ACPI_IMODE_LOAD_PASS2))
{
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ "Setup Package/Buffer: Pass %u, AML Ptr: %p\n",
+ WalkState->PassNumber, AmlOpStart));
+
/*
* Skip parsing of Buffers and Packages because we don't have
* enough info in the first pass to parse them correctly.
@@ -690,6 +697,9 @@
/* Check for arguments that need to be processed */
+ ACPI_DEBUG_PRINT ((ACPI_DB_PARSE,
+ "Parseloop: argument count: %u\n", WalkState->ArgCount));
+
if (WalkState->ArgCount)
{
/*
Modified: trunk/sys/contrib/dev/acpica/components/parser/psobject.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/parser/psobject.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/parser/psobject.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -488,6 +488,31 @@
{
Status = AcpiPsBuildNamedOp (WalkState, AmlOpStart, Op, &NamedOp);
AcpiPsFreeOp (Op);
+
+#ifdef ACPI_ASL_COMPILER
+ if (AcpiGbl_DisasmFlag && WalkState->Opcode == AML_EXTERNAL_OP &&
+ Status == AE_NOT_FOUND)
+ {
+ /*
+ * If parsing of AML_EXTERNAL_OP's name path fails, then skip
+ * past this opcode and keep parsing. This is a much better
+ * alternative than to abort the entire disassembler. At this
+ * point, the ParserState is at the end of the namepath of the
+ * external declaration opcode. Setting WalkState->Aml to
+ * WalkState->ParserState.Aml + 2 moves increments the
+ * WalkState->Aml past the object type and the paramcount of the
+ * external opcode. For the error message, only print the AML
+ * offset. We could attempt to print the name but this may cause
+ * a segmentation fault when printing the namepath because the
+ * AML may be incorrect.
+ */
+ AcpiOsPrintf (
+ "// Invalid external declaration at AML offset 0x%x.\n",
+ WalkState->Aml - WalkState->ParserState.AmlStart);
+ WalkState->Aml = WalkState->ParserState.Aml + 2;
+ return_ACPI_STATUS (AE_CTRL_PARSE_CONTINUE);
+ }
+#endif
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
Modified: trunk/sys/contrib/dev/acpica/components/resources/rsxface.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/resources/rsxface.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/resources/rsxface.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -797,7 +797,7 @@
* device we are querying
* Name - Method name of the resources we want.
* (METHOD_NAME__CRS, METHOD_NAME__PRS, or
- * METHOD_NAME__AEI)
+ * METHOD_NAME__AEI or METHOD_NAME__DMA)
* UserFunction - Called for each resource
* Context - Passed to UserFunction
*
@@ -828,12 +828,13 @@
if (!DeviceHandle || !UserFunction || !Name ||
(!ACPI_COMPARE_NAME (Name, METHOD_NAME__CRS) &&
!ACPI_COMPARE_NAME (Name, METHOD_NAME__PRS) &&
- !ACPI_COMPARE_NAME (Name, METHOD_NAME__AEI)))
+ !ACPI_COMPARE_NAME (Name, METHOD_NAME__AEI) &&
+ !ACPI_COMPARE_NAME (Name, METHOD_NAME__DMA)))
{
return_ACPI_STATUS (AE_BAD_PARAMETER);
}
- /* Get the _CRS/_PRS/_AEI resource list */
+ /* Get the _CRS/_PRS/_AEI/_DMA resource list */
Buffer.Length = ACPI_ALLOCATE_LOCAL_BUFFER;
Status = AcpiRsGetMethodData (DeviceHandle, Name, &Buffer);
Modified: trunk/sys/contrib/dev/acpica/components/tables/tbdata.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/tables/tbdata.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/tables/tbdata.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -159,9 +159,69 @@
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME ("tbdata")
+/* Local prototypes */
+static ACPI_STATUS
+AcpiTbCheckDuplication (
+ ACPI_TABLE_DESC *TableDesc,
+ UINT32 *TableIndex);
+
+static BOOLEAN
+AcpiTbCompareTables (
+ ACPI_TABLE_DESC *TableDesc,
+ UINT32 TableIndex);
+
+
/*******************************************************************************
*
+ * FUNCTION: AcpiTbCompareTables
+ *
+ * PARAMETERS: TableDesc - Table 1 descriptor to be compared
+ * TableIndex - Index of table 2 to be compared
+ *
+ * RETURN: TRUE if both tables are identical.
+ *
+ * DESCRIPTION: This function compares a table with another table that has
+ * already been installed in the root table list.
+ *
+ ******************************************************************************/
+
+static BOOLEAN
+AcpiTbCompareTables (
+ ACPI_TABLE_DESC *TableDesc,
+ UINT32 TableIndex)
+{
+ ACPI_STATUS Status = AE_OK;
+ BOOLEAN IsIdentical;
+ ACPI_TABLE_HEADER *Table;
+ UINT32 TableLength;
+ UINT8 TableFlags;
+
+
+ Status = AcpiTbAcquireTable (&AcpiGbl_RootTableList.Tables[TableIndex],
+ &Table, &TableLength, &TableFlags);
+ if (ACPI_FAILURE (Status))
+ {
+ return (FALSE);
+ }
+
+ /*
+ * Check for a table match on the entire table length,
+ * not just the header.
+ */
+ IsIdentical = (BOOLEAN)((TableDesc->Length != TableLength ||
+ memcmp (TableDesc->Pointer, Table, TableLength)) ?
+ FALSE : TRUE);
+
+ /* Release the acquired table */
+
+ AcpiTbReleaseTable (Table, TableLength, TableFlags);
+ return (IsIdentical);
+}
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiTbInitTableDescriptor
*
* PARAMETERS: TableDesc - Table descriptor
@@ -478,7 +538,7 @@
ACPI_TABLE_DESC *TableDesc)
{
- if (!TableDesc->Pointer && !AcpiGbl_VerifyTableChecksum)
+ if (!TableDesc->Pointer && !AcpiGbl_EnableTableValidation)
{
/*
* Only validates the header of the table.
@@ -496,6 +556,87 @@
}
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbCheckDuplication
+ *
+ * PARAMETERS: TableDesc - Table descriptor
+ * TableIndex - Where the table index is returned
+ *
+ * RETURN: Status
+ *
+ * DESCRIPTION: Avoid installing duplicated tables. However table override and
+ * user aided dynamic table load is allowed, thus comparing the
+ * address of the table is not sufficient, and checking the entire
+ * table content is required.
+ *
+ ******************************************************************************/
+
+static ACPI_STATUS
+AcpiTbCheckDuplication (
+ ACPI_TABLE_DESC *TableDesc,
+ UINT32 *TableIndex)
+{
+ UINT32 i;
+
+
+ ACPI_FUNCTION_TRACE (TbCheckDuplication);
+
+
+ /* Check if table is already registered */
+
+ for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
+ {
+ /* Do not compare with unverified tables */
+
+ if (!(AcpiGbl_RootTableList.Tables[i].Flags & ACPI_TABLE_IS_VERIFIED))
+ {
+ continue;
+ }
+
+ /*
+ * Check for a table match on the entire table length,
+ * not just the header.
+ */
+ if (!AcpiTbCompareTables (TableDesc, i))
+ {
+ continue;
+ }
+
+ /*
+ * Note: the current mechanism does not unregister a table if it is
+ * dynamically unloaded. The related namespace entries are deleted,
+ * but the table remains in the root table list.
+ *
+ * The assumption here is that the number of different tables that
+ * will be loaded is actually small, and there is minimal overhead
+ * in just keeping the table in case it is needed again.
+ *
+ * If this assumption changes in the future (perhaps on large
+ * machines with many table load/unload operations), tables will
+ * need to be unregistered when they are unloaded, and slots in the
+ * root table list should be reused when empty.
+ */
+ if (AcpiGbl_RootTableList.Tables[i].Flags &
+ ACPI_TABLE_IS_LOADED)
+ {
+ /* Table is still loaded, this is an error */
+
+ return_ACPI_STATUS (AE_ALREADY_EXISTS);
+ }
+ else
+ {
+ *TableIndex = i;
+ return_ACPI_STATUS (AE_CTRL_TERMINATE);
+ }
+ }
+
+ /* Indicate no duplication to the caller */
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
/******************************************************************************
*
* FUNCTION: AcpiTbVerifyTempTable
@@ -502,11 +643,14 @@
*
* PARAMETERS: TableDesc - Table descriptor
* Signature - Table signature to verify
+ * TableIndex - Where the table index is returned
*
* RETURN: Status
*
* DESCRIPTION: This function is called to validate and verify the table, the
* returned table descriptor is in "VALIDATED" state.
+ * Note that 'TableIndex' is required to be set to !NULL to
+ * enable duplication check.
*
*****************************************************************************/
@@ -513,7 +657,8 @@
ACPI_STATUS
AcpiTbVerifyTempTable (
ACPI_TABLE_DESC *TableDesc,
- char *Signature)
+ char *Signature,
+ UINT32 *TableIndex)
{
ACPI_STATUS Status = AE_OK;
@@ -541,10 +686,10 @@
goto InvalidateAndExit;
}
- /* Verify the checksum */
+ if (AcpiGbl_EnableTableValidation)
+ {
+ /* Verify the checksum */
- if (AcpiGbl_VerifyTableChecksum)
- {
Status = AcpiTbVerifyChecksum (TableDesc->Pointer, TableDesc->Length);
if (ACPI_FAILURE (Status))
{
@@ -557,9 +702,32 @@
goto InvalidateAndExit;
}
+
+ /* Avoid duplications */
+
+ if (TableIndex)
+ {
+ Status = AcpiTbCheckDuplication (TableDesc, TableIndex);
+ if (ACPI_FAILURE (Status))
+ {
+ if (Status != AE_CTRL_TERMINATE)
+ {
+ ACPI_EXCEPTION ((AE_INFO, AE_NO_MEMORY,
+ "%4.4s 0x%8.8X%8.8X"
+ " Table is duplicated",
+ AcpiUtValidNameseg (TableDesc->Signature.Ascii) ?
+ TableDesc->Signature.Ascii : "????",
+ ACPI_FORMAT_UINT64 (TableDesc->Address)));
+ }
+
+ goto InvalidateAndExit;
+ }
+ }
+
+ TableDesc->Flags |= ACPI_TABLE_IS_VERIFIED;
}
- return_ACPI_STATUS (AE_OK);
+ return_ACPI_STATUS (Status);
InvalidateAndExit:
AcpiTbInvalidateTable (TableDesc);
@@ -585,6 +753,8 @@
{
ACPI_TABLE_DESC *Tables;
UINT32 TableCount;
+ UINT32 CurrentTableCount, MaxTableCount;
+ UINT32 i;
ACPI_FUNCTION_TRACE (TbResizeRootTableList);
@@ -609,9 +779,9 @@
TableCount = AcpiGbl_RootTableList.CurrentTableCount;
}
+ MaxTableCount = TableCount + ACPI_ROOT_TABLE_SIZE_INCREMENT;
Tables = ACPI_ALLOCATE_ZEROED (
- ((ACPI_SIZE) TableCount + ACPI_ROOT_TABLE_SIZE_INCREMENT) *
- sizeof (ACPI_TABLE_DESC));
+ ((ACPI_SIZE) MaxTableCount) * sizeof (ACPI_TABLE_DESC));
if (!Tables)
{
ACPI_ERROR ((AE_INFO, "Could not allocate new root table array"));
@@ -620,10 +790,19 @@
/* Copy and free the previous table array */
+ CurrentTableCount = 0;
if (AcpiGbl_RootTableList.Tables)
{
- memcpy (Tables, AcpiGbl_RootTableList.Tables,
- (ACPI_SIZE) TableCount * sizeof (ACPI_TABLE_DESC));
+ for (i = 0; i < TableCount; i++)
+ {
+ if (AcpiGbl_RootTableList.Tables[i].Address)
+ {
+ memcpy (Tables + CurrentTableCount,
+ AcpiGbl_RootTableList.Tables + i,
+ sizeof (ACPI_TABLE_DESC));
+ CurrentTableCount++;
+ }
+ }
if (AcpiGbl_RootTableList.Flags & ACPI_ROOT_ORIGIN_ALLOCATED)
{
@@ -632,8 +811,8 @@
}
AcpiGbl_RootTableList.Tables = Tables;
- AcpiGbl_RootTableList.MaxTableCount =
- TableCount + ACPI_ROOT_TABLE_SIZE_INCREMENT;
+ AcpiGbl_RootTableList.MaxTableCount = MaxTableCount;
+ AcpiGbl_RootTableList.CurrentTableCount = CurrentTableCount;
AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ORIGIN_ALLOCATED;
return_ACPI_STATUS (AE_OK);
@@ -1030,14 +1209,9 @@
AcpiEvUpdateGpes (OwnerId);
}
- /* Invoke table handler if present */
+ /* Invoke table handler */
- if (AcpiGbl_TableHandler)
- {
- (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, Table,
- AcpiGbl_TableHandlerContext);
- }
-
+ AcpiTbNotifyTable (ACPI_TABLE_EVENT_LOAD, Table);
return_ACPI_STATUS (Status);
}
@@ -1071,8 +1245,6 @@
ACPI_FUNCTION_TRACE (TbInstallAndLoadTable);
- (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
-
/* Install the table and load it into the namespace */
Status = AcpiTbInstallStandardTable (Address, Flags, TRUE,
@@ -1079,16 +1251,13 @@
Override, &i);
if (ACPI_FAILURE (Status))
{
- goto UnlockAndExit;
+ goto Exit;
}
- (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
Status = AcpiTbLoadTable (i, AcpiGbl_RootNode);
- (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
-UnlockAndExit:
+Exit:
*TableIndex = i;
- (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
return_ACPI_STATUS (Status);
}
@@ -1123,16 +1292,12 @@
return_ACPI_STATUS (AE_NOT_EXIST);
}
- /* Invoke table handler if present */
+ /* Invoke table handler */
- if (AcpiGbl_TableHandler)
+ Status = AcpiGetTableByIndex (TableIndex, &Table);
+ if (ACPI_SUCCESS (Status))
{
- Status = AcpiGetTableByIndex (TableIndex, &Table);
- if (ACPI_SUCCESS (Status))
- {
- (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_UNLOAD, Table,
- AcpiGbl_TableHandlerContext);
- }
+ AcpiTbNotifyTable (ACPI_TABLE_EVENT_UNLOAD, Table);
}
/* Delete the portion of the namespace owned by this table */
@@ -1147,3 +1312,31 @@
AcpiTbSetTableLoadedFlag (TableIndex, FALSE);
return_ACPI_STATUS (Status);
}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiTbNotifyTable
+ *
+ * PARAMETERS: Event - Table event
+ * Table - Validated table pointer
+ *
+ * RETURN: None
+ *
+ * DESCRIPTION: Notify a table event to the users.
+ *
+ ******************************************************************************/
+
+void
+AcpiTbNotifyTable (
+ UINT32 Event,
+ void *Table)
+{
+ /* Invoke table handler if present */
+
+ if (AcpiGbl_TableHandler)
+ {
+ (void) AcpiGbl_TableHandler (Event, Table,
+ AcpiGbl_TableHandlerContext);
+ }
+}
Modified: trunk/sys/contrib/dev/acpica/components/tables/tbinstal.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/tables/tbinstal.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/tables/tbinstal.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -157,64 +157,9 @@
#define _COMPONENT ACPI_TABLES
ACPI_MODULE_NAME ("tbinstal")
-/* Local prototypes */
-static BOOLEAN
-AcpiTbCompareTables (
- ACPI_TABLE_DESC *TableDesc,
- UINT32 TableIndex);
-
-
/*******************************************************************************
*
- * FUNCTION: AcpiTbCompareTables
- *
- * PARAMETERS: TableDesc - Table 1 descriptor to be compared
- * TableIndex - Index of table 2 to be compared
- *
- * RETURN: TRUE if both tables are identical.
- *
- * DESCRIPTION: This function compares a table with another table that has
- * already been installed in the root table list.
- *
- ******************************************************************************/
-
-static BOOLEAN
-AcpiTbCompareTables (
- ACPI_TABLE_DESC *TableDesc,
- UINT32 TableIndex)
-{
- ACPI_STATUS Status = AE_OK;
- BOOLEAN IsIdentical;
- ACPI_TABLE_HEADER *Table;
- UINT32 TableLength;
- UINT8 TableFlags;
-
-
- Status = AcpiTbAcquireTable (&AcpiGbl_RootTableList.Tables[TableIndex],
- &Table, &TableLength, &TableFlags);
- if (ACPI_FAILURE (Status))
- {
- return (FALSE);
- }
-
- /*
- * Check for a table match on the entire table length,
- * not just the header.
- */
- IsIdentical = (BOOLEAN)((TableDesc->Length != TableLength ||
- memcmp (TableDesc->Pointer, Table, TableLength)) ?
- FALSE : TRUE);
-
- /* Release the acquired table */
-
- AcpiTbReleaseTable (Table, TableLength, TableFlags);
- return (IsIdentical);
-}
-
-
-/*******************************************************************************
- *
* FUNCTION: AcpiTbInstallTableWithOverride
*
* PARAMETERS: NewTableDesc - New table descriptor to install
@@ -338,92 +283,31 @@
goto ReleaseAndExit;
}
+ /* Acquire the table lock */
+
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+
/* Validate and verify a table before installation */
- Status = AcpiTbVerifyTempTable (&NewTableDesc, NULL);
+ Status = AcpiTbVerifyTempTable (&NewTableDesc, NULL, &i);
if (ACPI_FAILURE (Status))
{
- goto ReleaseAndExit;
- }
-
- if (Reload)
- {
- /*
- * Validate the incoming table signature.
- *
- * 1) Originally, we checked the table signature for "SSDT" or "PSDT".
- * 2) We added support for OEMx tables, signature "OEM".
- * 3) Valid tables were encountered with a null signature, so we just
- * gave up on validating the signature, (05/2008).
- * 4) We encountered non-AML tables such as the MADT, which caused
- * interpreter errors and kernel faults. So now, we once again allow
- * only "SSDT", "OEMx", and now, also a null signature. (05/2011).
- */
- if ((NewTableDesc.Signature.Ascii[0] != 0x00) &&
- (!ACPI_COMPARE_NAME (&NewTableDesc.Signature, ACPI_SIG_SSDT)) &&
- (strncmp (NewTableDesc.Signature.Ascii, "OEM", 3)))
+ if (Status == AE_CTRL_TERMINATE)
{
- ACPI_BIOS_ERROR ((AE_INFO,
- "Table has invalid signature [%4.4s] (0x%8.8X), "
- "must be SSDT or OEMx",
- AcpiUtValidNameseg (NewTableDesc.Signature.Ascii) ?
- NewTableDesc.Signature.Ascii : "????",
- NewTableDesc.Signature.Integer));
-
- Status = AE_BAD_SIGNATURE;
- goto ReleaseAndExit;
- }
-
- /* Check if table is already registered */
-
- for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
- {
/*
- * Check for a table match on the entire table length,
- * not just the header.
+ * Table was unloaded, allow it to be reloaded.
+ * As we are going to return AE_OK to the caller, we should
+ * take the responsibility of freeing the input descriptor.
+ * Refill the input descriptor to ensure
+ * AcpiTbInstallTableWithOverride() can be called again to
+ * indicate the re-installation.
*/
- if (!AcpiTbCompareTables (&NewTableDesc, i))
- {
- continue;
- }
-
- /*
- * Note: the current mechanism does not unregister a table if it is
- * dynamically unloaded. The related namespace entries are deleted,
- * but the table remains in the root table list.
- *
- * The assumption here is that the number of different tables that
- * will be loaded is actually small, and there is minimal overhead
- * in just keeping the table in case it is needed again.
- *
- * If this assumption changes in the future (perhaps on large
- * machines with many table load/unload operations), tables will
- * need to be unregistered when they are unloaded, and slots in the
- * root table list should be reused when empty.
- */
- if (AcpiGbl_RootTableList.Tables[i].Flags &
- ACPI_TABLE_IS_LOADED)
- {
- /* Table is still loaded, this is an error */
-
- Status = AE_ALREADY_EXISTS;
- goto ReleaseAndExit;
- }
- else
- {
- /*
- * Table was unloaded, allow it to be reloaded.
- * As we are going to return AE_OK to the caller, we should
- * take the responsibility of freeing the input descriptor.
- * Refill the input descriptor to ensure
- * AcpiTbInstallTableWithOverride() can be called again to
- * indicate the re-installation.
- */
- AcpiTbUninstallTable (&NewTableDesc);
- *TableIndex = i;
- return_ACPI_STATUS (AE_OK);
- }
+ AcpiTbUninstallTable (&NewTableDesc);
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+ *TableIndex = i;
+ return_ACPI_STATUS (AE_OK);
}
+ goto UnlockAndExit;
}
/* Add the table to the global root table list */
@@ -430,14 +314,18 @@
AcpiTbInstallTableWithOverride (&NewTableDesc, Override, TableIndex);
- /* Invoke table handler if present */
+ /* Invoke table handler */
- if (AcpiGbl_TableHandler)
- {
- (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_INSTALL,
- NewTableDesc.Pointer, AcpiGbl_TableHandlerContext);
- }
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+ AcpiTbNotifyTable (ACPI_TABLE_EVENT_INSTALL, NewTableDesc.Pointer);
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+UnlockAndExit:
+
+ /* Release the table lock */
+
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
+
ReleaseAndExit:
/* Release the temporary table descriptor */
@@ -504,9 +392,11 @@
FinishOverride:
- /* Validate and verify a table before overriding */
-
- Status = AcpiTbVerifyTempTable (&NewTableDesc, NULL);
+ /*
+ * Validate and verify a table before overriding, no nested table
+ * duplication check as it's too complicated and unnecessary.
+ */
+ Status = AcpiTbVerifyTempTable (&NewTableDesc, NULL, NULL);
if (ACPI_FAILURE (Status))
{
return;
Modified: trunk/sys/contrib/dev/acpica/components/tables/tbutils.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/tables/tbutils.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/tables/tbutils.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -560,14 +560,19 @@
}
}
- TableDesc->ValidationCount++;
- if (TableDesc->ValidationCount == 0)
+ if (TableDesc->ValidationCount < ACPI_MAX_TABLE_VALIDATIONS)
{
- ACPI_ERROR ((AE_INFO,
- "Table %p, Validation count is zero after increment\n",
- TableDesc));
- TableDesc->ValidationCount--;
- return_ACPI_STATUS (AE_LIMIT);
+ TableDesc->ValidationCount++;
+
+ /*
+ * Detect ValidationCount overflows to ensure that the warning
+ * message will only be printed once.
+ */
+ if (TableDesc->ValidationCount >= ACPI_MAX_TABLE_VALIDATIONS)
+ {
+ ACPI_WARNING((AE_INFO,
+ "Table %p, Validation count overflows\n", TableDesc));
+ }
}
*OutTable = TableDesc->Pointer;
@@ -598,14 +603,21 @@
ACPI_FUNCTION_TRACE (AcpiTbPutTable);
- if (TableDesc->ValidationCount == 0)
+ if (TableDesc->ValidationCount < ACPI_MAX_TABLE_VALIDATIONS)
{
- ACPI_WARNING ((AE_INFO,
- "Table %p, Validation count is zero before decrement\n",
- TableDesc));
- return_VOID;
+ TableDesc->ValidationCount--;
+
+ /*
+ * Detect ValidationCount underflows to ensure that the warning
+ * message will only be printed once.
+ */
+ if (TableDesc->ValidationCount >= ACPI_MAX_TABLE_VALIDATIONS)
+ {
+ ACPI_WARNING ((AE_INFO,
+ "Table %p, Validation count underflows\n", TableDesc));
+ return_VOID;
+ }
}
- TableDesc->ValidationCount--;
if (TableDesc->ValidationCount == 0)
{
Modified: trunk/sys/contrib/dev/acpica/components/tables/tbxface.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/tables/tbxface.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/tables/tbxface.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -293,7 +293,8 @@
void)
{
ACPI_STATUS Status;
- UINT32 i;
+ ACPI_TABLE_DESC *TableDesc;
+ UINT32 i, j;
ACPI_FUNCTION_TRACE (AcpiReallocateRootTable);
@@ -308,6 +309,8 @@
return_ACPI_STATUS (AE_SUPPORT);
}
+ (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
+
/*
* Ensure OS early boot logic, which is required by some hosts. If the
* table state is reported to be wrong, developers should fix the
@@ -316,17 +319,41 @@
*/
for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
{
- if (AcpiGbl_RootTableList.Tables[i].Pointer)
+ TableDesc = &AcpiGbl_RootTableList.Tables[i];
+ if (TableDesc->Pointer)
{
ACPI_ERROR ((AE_INFO,
"Table [%4.4s] is not invalidated during early boot stage",
- AcpiGbl_RootTableList.Tables[i].Signature.Ascii));
+ TableDesc->Signature.Ascii));
}
}
+ if (!AcpiGbl_EnableTableValidation)
+ {
+ /*
+ * Now it's safe to do full table validation. We can do deferred
+ * table initilization here once the flag is set.
+ */
+ AcpiGbl_EnableTableValidation = TRUE;
+ for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i)
+ {
+ TableDesc = &AcpiGbl_RootTableList.Tables[i];
+ if (!(TableDesc->Flags & ACPI_TABLE_IS_VERIFIED))
+ {
+ Status = AcpiTbVerifyTempTable (TableDesc, NULL, &j);
+ if (ACPI_FAILURE (Status))
+ {
+ AcpiTbUninstallTable (TableDesc);
+ }
+ }
+ }
+ }
+
AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ALLOW_RESIZE;
+ Status = AcpiTbResizeRootTableList ();
+ AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ORIGIN_ALLOCATED;
- Status = AcpiTbResizeRootTableList ();
+ (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES);
return_ACPI_STATUS (Status);
}
@@ -523,6 +550,11 @@
ACPI_FUNCTION_TRACE (AcpiPutTable);
+ if (!Table)
+ {
+ return_VOID;
+ }
+
(void) AcpiUtAcquireMutex (ACPI_MTX_TABLES);
/* Walk the root table list */
Modified: trunk/sys/contrib/dev/acpica/components/tables/tbxfload.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/tables/tbxfload.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/tables/tbxfload.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -337,11 +337,11 @@
{
Table = &AcpiGbl_RootTableList.Tables[i];
- if (!AcpiGbl_RootTableList.Tables[i].Address ||
+ if (!Table->Address ||
(!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_SSDT) &&
!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_PSDT) &&
!ACPI_COMPARE_NAME (Table->Signature.Ascii, ACPI_SIG_OSDT)) ||
- ACPI_FAILURE (AcpiTbValidateTable (Table)))
+ ACPI_FAILURE (AcpiTbValidateTable (Table)))
{
continue;
}
Modified: trunk/sys/contrib/dev/acpica/components/utilities/uthex.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/utilities/uthex.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/utilities/uthex.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -184,8 +184,10 @@
UINT64 Integer,
UINT32 Position)
{
+ UINT64 Index;
- return (AcpiGbl_HexToAscii[(Integer >> Position) & 0xF]);
+ AcpiUtShortShiftRight (Integer, Position, &Index);
+ return (AcpiGbl_HexToAscii[Index & 0xF]);
}
Modified: trunk/sys/contrib/dev/acpica/components/utilities/utmath.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/utilities/utmath.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/utilities/utmath.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -157,16 +157,6 @@
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("utmath")
-/*
- * Optional support for 64-bit double-precision integer divide. This code
- * is configurable and is implemented in order to support 32-bit kernel
- * environments where a 64-bit double-precision math library is not available.
- *
- * Support for a more normal 64-bit divide/modulo (with check for a divide-
- * by-zero) appears after this optional section of code.
- */
-#ifndef ACPI_USE_NATIVE_DIVIDE
-
/* Structures used only for 64-bit divide */
typedef struct uint64_struct
@@ -183,9 +173,260 @@
} UINT64_OVERLAY;
+/*
+ * Optional support for 64-bit double-precision integer multiply and shift.
+ * This code is configurable and is implemented in order to support 32-bit
+ * kernel environments where a 64-bit double-precision math library is not
+ * available.
+ */
+#ifndef ACPI_USE_NATIVE_MATH64
/*******************************************************************************
*
+ * FUNCTION: AcpiUtShortMultiply
+ *
+ * PARAMETERS: Multiplicand - 64-bit multiplicand
+ * Multiplier - 32-bit multiplier
+ * OutProduct - Pointer to where the product is returned
+ *
+ * DESCRIPTION: Perform a short multiply.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtShortMultiply (
+ UINT64 Multiplicand,
+ UINT32 Multiplier,
+ UINT64 *OutProduct)
+{
+ UINT64_OVERLAY MultiplicandOvl;
+ UINT64_OVERLAY Product;
+ UINT32 Carry32;
+
+
+ ACPI_FUNCTION_TRACE (UtShortMultiply);
+
+
+ MultiplicandOvl.Full = Multiplicand;
+
+ /*
+ * The Product is 64 bits, the carry is always 32 bits,
+ * and is generated by the second multiply.
+ */
+ ACPI_MUL_64_BY_32 (0, MultiplicandOvl.Part.Hi, Multiplier,
+ Product.Part.Hi, Carry32);
+
+ ACPI_MUL_64_BY_32 (0, MultiplicandOvl.Part.Lo, Multiplier,
+ Product.Part.Lo, Carry32);
+
+ Product.Part.Hi += Carry32;
+
+ /* Return only what was requested */
+
+ if (OutProduct)
+ {
+ *OutProduct = Product.Full;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtShortShiftLeft
+ *
+ * PARAMETERS: Operand - 64-bit shift operand
+ * Count - 32-bit shift count
+ * OutResult - Pointer to where the result is returned
+ *
+ * DESCRIPTION: Perform a short left shift.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtShortShiftLeft (
+ UINT64 Operand,
+ UINT32 Count,
+ UINT64 *OutResult)
+{
+ UINT64_OVERLAY OperandOvl;
+
+
+ ACPI_FUNCTION_TRACE (UtShortShiftLeft);
+
+
+ OperandOvl.Full = Operand;
+
+ if ((Count & 63) >= 32)
+ {
+ OperandOvl.Part.Hi = OperandOvl.Part.Lo;
+ OperandOvl.Part.Lo ^= OperandOvl.Part.Lo;
+ Count = (Count & 63) - 32;
+ }
+ ACPI_SHIFT_LEFT_64_BY_32 (OperandOvl.Part.Hi,
+ OperandOvl.Part.Lo, Count);
+
+ /* Return only what was requested */
+
+ if (OutResult)
+ {
+ *OutResult = OperandOvl.Full;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtShortShiftRight
+ *
+ * PARAMETERS: Operand - 64-bit shift operand
+ * Count - 32-bit shift count
+ * OutResult - Pointer to where the result is returned
+ *
+ * DESCRIPTION: Perform a short right shift.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtShortShiftRight (
+ UINT64 Operand,
+ UINT32 Count,
+ UINT64 *OutResult)
+{
+ UINT64_OVERLAY OperandOvl;
+
+
+ ACPI_FUNCTION_TRACE (UtShortShiftRight);
+
+
+ OperandOvl.Full = Operand;
+
+ if ((Count & 63) >= 32)
+ {
+ OperandOvl.Part.Lo = OperandOvl.Part.Hi;
+ OperandOvl.Part.Hi ^= OperandOvl.Part.Hi;
+ Count = (Count & 63) - 32;
+ }
+ ACPI_SHIFT_RIGHT_64_BY_32 (OperandOvl.Part.Hi,
+ OperandOvl.Part.Lo, Count);
+
+ /* Return only what was requested */
+
+ if (OutResult)
+ {
+ *OutResult = OperandOvl.Full;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+#else
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtShortMultiply
+ *
+ * PARAMETERS: See function headers above
+ *
+ * DESCRIPTION: Native version of the UtShortMultiply function.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtShortMultiply (
+ UINT64 Multiplicand,
+ UINT32 Multiplier,
+ UINT64 *OutProduct)
+{
+
+ ACPI_FUNCTION_TRACE (UtShortMultiply);
+
+
+ /* Return only what was requested */
+
+ if (OutProduct)
+ {
+ *OutProduct = Multiplicand * Multiplier;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtShortShiftLeft
+ *
+ * PARAMETERS: See function headers above
+ *
+ * DESCRIPTION: Native version of the UtShortShiftLeft function.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtShortShiftLeft (
+ UINT64 Operand,
+ UINT32 Count,
+ UINT64 *OutResult)
+{
+
+ ACPI_FUNCTION_TRACE (UtShortShiftLeft);
+
+
+ /* Return only what was requested */
+
+ if (OutResult)
+ {
+ *OutResult = Operand << Count;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+
+/*******************************************************************************
+ *
+ * FUNCTION: AcpiUtShortShiftRight
+ *
+ * PARAMETERS: See function headers above
+ *
+ * DESCRIPTION: Native version of the UtShortShiftRight function.
+ *
+ ******************************************************************************/
+
+ACPI_STATUS
+AcpiUtShortShiftRight (
+ UINT64 Operand,
+ UINT32 Count,
+ UINT64 *OutResult)
+{
+
+ ACPI_FUNCTION_TRACE (UtShortShiftRight);
+
+
+ /* Return only what was requested */
+
+ if (OutResult)
+ {
+ *OutResult = Operand >> Count;
+ }
+
+ return_ACPI_STATUS (AE_OK);
+}
+#endif
+
+/*
+ * Optional support for 64-bit double-precision integer divide. This code
+ * is configurable and is implemented in order to support 32-bit kernel
+ * environments where a 64-bit double-precision math library is not available.
+ *
+ * Support for a more normal 64-bit divide/modulo (with check for a divide-
+ * by-zero) appears after this optional section of code.
+ */
+#ifndef ACPI_USE_NATIVE_DIVIDE
+
+
+/*******************************************************************************
+ *
* FUNCTION: AcpiUtShortDivide
*
* PARAMETERS: Dividend - 64-bit dividend
Modified: trunk/sys/contrib/dev/acpica/components/utilities/utmisc.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/utilities/utmisc.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/utilities/utmisc.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -364,7 +364,7 @@
*
* RETURN: Status
*
- * DESCRIPTION: Walk through a package
+ * DESCRIPTION: Walk through a package, including subpackages
*
******************************************************************************/
@@ -378,8 +378,8 @@
ACPI_STATUS Status = AE_OK;
ACPI_GENERIC_STATE *StateList = NULL;
ACPI_GENERIC_STATE *State;
+ ACPI_OPERAND_OBJECT *ThisSourceObj;
UINT32 ThisIndex;
- ACPI_OPERAND_OBJECT *ThisSourceObj;
ACPI_FUNCTION_TRACE (UtWalkPackageTree);
@@ -396,8 +396,10 @@
/* Get one element of the package */
ThisIndex = State->Pkg.Index;
- ThisSourceObj = (ACPI_OPERAND_OBJECT *)
+ ThisSourceObj =
State->Pkg.SourceObject->Package.Elements[ThisIndex];
+ State->Pkg.ThisTargetObj =
+ &State->Pkg.SourceObject->Package.Elements[ThisIndex];
/*
* Check for:
@@ -413,7 +415,7 @@
(ThisSourceObj->Common.Type != ACPI_TYPE_PACKAGE))
{
Status = WalkCallback (ACPI_COPY_TYPE_SIMPLE, ThisSourceObj,
- State, Context);
+ State, Context);
if (ACPI_FAILURE (Status))
{
return_ACPI_STATUS (Status);
@@ -486,6 +488,9 @@
/* We should never get here */
+ ACPI_ERROR ((AE_INFO,
+ "State list did not terminate correctly"));
+
return_ACPI_STATUS (AE_AML_INTERNAL);
}
Modified: trunk/sys/contrib/dev/acpica/components/utilities/utobject.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/utilities/utobject.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/utilities/utobject.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -652,6 +652,10 @@
{
/* A namespace node should never get here */
+ ACPI_ERROR ((AE_INFO,
+ "Received a namespace node [%4.4s] "
+ "where an operand object is required",
+ ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, InternalObject)->Name.Ascii));
return_ACPI_STATUS (AE_AML_INTERNAL);
}
Modified: trunk/sys/contrib/dev/acpica/components/utilities/utresrc.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/utilities/utresrc.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/utilities/utresrc.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -304,11 +304,9 @@
ACPI_FUNCTION_TRACE (UtWalkAmlResources);
- /*
- * The absolute minimum resource template is one EndTag descriptor.
- * However, we will treat a lone EndTag as just a simple buffer.
- */
- if (AmlLength <= sizeof (AML_RESOURCE_END_TAG))
+ /* The absolute minimum resource template is one EndTag descriptor */
+
+ if (AmlLength < sizeof (AML_RESOURCE_END_TAG))
{
return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG);
}
@@ -363,14 +361,11 @@
}
/*
- * The EndTag opcode must be followed by a zero byte.
- * Although this byte is technically defined to be a checksum,
- * in practice, all ASL compilers set this byte to zero.
+ * Don't attempt to perform any validation on the 2nd byte.
+ * Although all known ASL compilers insert a zero for the 2nd
+ * byte, it can also be a checksum (as per the ACPI spec),
+ * and this is occasionally seen in the field. July 2017.
*/
- if (*(Aml + 1) != 0)
- {
- return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG);
- }
/* Return the pointer to the EndTag if requested */
@@ -379,10 +374,8 @@
*Context = Aml;
}
- /*
- * Normal exit. Note: We allow the buffer to be larger than
- * the resource template, as long as the END_TAG exists.
- */
+ /* Normal exit */
+
return_ACPI_STATUS (AE_OK);
}
Modified: trunk/sys/contrib/dev/acpica/components/utilities/utstate.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/utilities/utstate.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/utilities/utstate.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -364,7 +364,7 @@
AcpiUtCreatePkgState (
void *InternalObject,
void *ExternalObject,
- UINT16 Index)
+ UINT32 Index)
{
ACPI_GENERIC_STATE *State;
Modified: trunk/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/utilities/utstrtoul64.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -419,8 +419,8 @@
/* Convert and insert (add) the decimal digit */
- NextValue =
- (ReturnValue * 10) + (AsciiDigit - ACPI_ASCII_ZERO);
+ AcpiUtShortMultiply (ReturnValue, 10, &NextValue);
+ NextValue += (AsciiDigit - ACPI_ASCII_ZERO);
/* Check for overflow (32 or 64 bit) - return current converted value */
@@ -486,8 +486,8 @@
/* Convert and insert the hex digit */
- ReturnValue =
- (ReturnValue << 4) | AcpiUtAsciiCharToHex (AsciiDigit);
+ AcpiUtShortShiftLeft (ReturnValue, 4, &ReturnValue);
+ ReturnValue |= AcpiUtAsciiCharToHex (AsciiDigit);
String++;
ValidDigits++;
Modified: trunk/sys/contrib/dev/acpica/components/utilities/uttrack.c
===================================================================
--- trunk/sys/contrib/dev/acpica/components/utilities/uttrack.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/components/utilities/uttrack.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -777,6 +777,11 @@
return_VOID;
}
+ if (!AcpiGbl_GlobalList)
+ {
+ goto Exit;
+ }
+
Element = AcpiGbl_GlobalList->ListHead;
while (Element)
{
@@ -788,7 +793,7 @@
if (Element->Size < sizeof (ACPI_COMMON_DESCRIPTOR))
{
- AcpiOsPrintf ("%p Length 0x%04X %9.9s-%u "
+ AcpiOsPrintf ("%p Length 0x%04X %9.9s-%4.4u "
"[Not a Descriptor - too small]\n",
Descriptor, Element->Size, Element->Module,
Element->Line);
@@ -800,7 +805,7 @@
if (ACPI_GET_DESCRIPTOR_TYPE (Descriptor) !=
ACPI_DESC_TYPE_CACHED)
{
- AcpiOsPrintf ("%p Length 0x%04X %9.9s-%u [%s] ",
+ AcpiOsPrintf ("%p Length 0x%04X %9.9s-%4.4u [%s] ",
Descriptor, Element->Size, Element->Module,
Element->Line, AcpiUtGetDescriptorName (Descriptor));
@@ -876,6 +881,7 @@
Element = Element->Next;
}
+Exit:
(void) AcpiUtReleaseMutex (ACPI_MTX_MEMORY);
/* Print summary */
Modified: trunk/sys/contrib/dev/acpica/include/acapps.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/acapps.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/acapps.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -227,6 +227,10 @@
UINT8 GetOnlyAmlTables,
ACPI_NEW_TABLE_DESC **ReturnListHead);
+void
+AcDeleteTableList (
+ ACPI_NEW_TABLE_DESC *ListHead);
+
BOOLEAN
AcIsFileBinary (
FILE *File);
Modified: trunk/sys/contrib/dev/acpica/include/acdisasm.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/acdisasm.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/acdisasm.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -272,6 +272,7 @@
ACPI_DMT_PCCT,
ACPI_DMT_PMTT,
ACPI_DMT_PPTT,
+ ACPI_DMT_SDEI,
ACPI_DMT_SLIC,
ACPI_DMT_SRAT,
@@ -528,6 +529,7 @@
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSbst[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoSdei[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlic[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSlit[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoSpcr[];
Modified: trunk/sys/contrib/dev/acpica/include/acdispat.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/acdispat.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/acdispat.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -410,6 +410,12 @@
* dsobject - Parser/Interpreter interface - object initialization and conversion
*/
ACPI_STATUS
+AcpiDsBuildInternalObject (
+ ACPI_WALK_STATE *WalkState,
+ ACPI_PARSE_OBJECT *Op,
+ ACPI_OPERAND_OBJECT **ObjDescPtr);
+
+ACPI_STATUS
AcpiDsBuildInternalBufferObj (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT *Op,
@@ -438,6 +444,17 @@
/*
+ * dspkginit - Package object initialization
+ */
+ACPI_STATUS
+AcpiDsInitPackageElement (
+ UINT8 ObjectType,
+ ACPI_OPERAND_OBJECT *SourceObject,
+ ACPI_GENERIC_STATE *State,
+ void *Context);
+
+
+/*
* dsutils - Parser/Interpreter interface utility routines
*/
void
Modified: trunk/sys/contrib/dev/acpica/include/aclocal.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/aclocal.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/aclocal.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -329,6 +329,7 @@
#define ANOBJ_EVALUATED 0x20 /* Set on first evaluation of node */
#define ANOBJ_ALLOCATED_BUFFER 0x40 /* Method AML buffer is dynamic (InstallMethod) */
+#define IMPLICIT_EXTERNAL 0x02 /* iASL only: This object created implicitly via External */
#define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */
#define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */
#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */
@@ -813,7 +814,7 @@
typedef struct acpi_pkg_state
{
ACPI_STATE_COMMON
- UINT16 Index;
+ UINT32 Index;
union acpi_operand_object *SourceObject;
union acpi_operand_object *DestObject;
struct acpi_walk_state *WalkState;
@@ -1147,7 +1148,7 @@
/* This version is used by the iASL compiler only */
-#define ACPI_MAX_PARSEOP_NAME 20
+#define ACPI_MAX_PARSEOP_NAME 20
typedef struct acpi_parse_obj_asl
{
@@ -1191,11 +1192,12 @@
typedef struct asl_comment_state
{
- UINT8 CommentType;
- UINT32 SpacesBefore;
- ACPI_PARSE_OBJECT *Latest_Parse_Node;
- ACPI_PARSE_OBJECT *ParsingParenBraceNode;
- BOOLEAN CaptureComments;
+ UINT8 CommentType;
+ UINT32 SpacesBefore;
+ ACPI_PARSE_OBJECT *LatestParseOp;
+ ACPI_PARSE_OBJECT *ParsingParenBraceNode;
+ BOOLEAN CaptureComments;
+
} ASL_COMMENT_STATE;
Modified: trunk/sys/contrib/dev/acpica/include/acnames.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/acnames.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/acnames.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -163,6 +163,7 @@
#define METHOD_NAME__CLS "_CLS"
#define METHOD_NAME__CRS "_CRS"
#define METHOD_NAME__DDN "_DDN"
+#define METHOD_NAME__DMA "_DMA"
#define METHOD_NAME__HID "_HID"
#define METHOD_NAME__INI "_INI"
#define METHOD_NAME__PLD "_PLD"
Modified: trunk/sys/contrib/dev/acpica/include/acobject.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/acobject.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/acobject.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -242,7 +242,9 @@
UINT32 Length;
-typedef struct acpi_object_string /* Null terminated, ASCII characters only */
+/* Null terminated, ASCII characters only */
+
+typedef struct acpi_object_string
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_BUFFER_INFO (char) /* String in AML stream or allocated string */
@@ -360,8 +362,9 @@
union acpi_operand_object *NotifyList[2]; /* Handlers for system/device notifies */\
union acpi_operand_object *Handler; /* Handler for Address space */
+/* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
-typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */
+typedef struct acpi_object_notify_common
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_NOTIFY_INFO
@@ -432,8 +435,9 @@
UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\
UINT8 AccessLength; /* For serial regions/fields */
+/* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
-typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */
+typedef struct acpi_object_field_common
{
ACPI_OBJECT_COMMON_HEADER
ACPI_COMMON_FIELD_INFO
@@ -543,11 +547,12 @@
ACPI_OBJECT_COMMON_HEADER
UINT8 Class; /* Reference Class */
UINT8 TargetType; /* Used for Index Op */
- UINT8 Reserved;
+ UINT8 Resolved; /* Reference has been resolved to a value */
void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */
ACPI_NAMESPACE_NODE *Node; /* RefOf or Namepath */
union acpi_operand_object **Where; /* Target of Index */
UINT8 *IndexPointer; /* Used for Buffers and Strings */
+ UINT8 *Aml; /* Used for deferred resolution of the ref */
UINT32 Value; /* Used for Local/Arg/Index/DdbHandle */
} ACPI_OBJECT_REFERENCE;
@@ -568,7 +573,6 @@
} ACPI_REFERENCE_CLASSES;
-
/*
* Extra object is used as additional storage for types that
* have AML code in their declarations (TermArgs) that must be
Modified: trunk/sys/contrib/dev/acpica/include/acpi.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/acpi.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/acpi.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -163,8 +163,9 @@
* Note: The order of these include files is important.
*/
#include <contrib/dev/acpica/include/platform/acenv.h> /* Environment-specific items */
+#include <contrib/dev/acpica/include/actypes.h> /* ACPICA data types and structures */
+#include <contrib/dev/acpica/include/platform/acenvex.h> /* Extra environment-specific items */
#include <contrib/dev/acpica/include/acnames.h> /* Common ACPI names and strings */
-#include <contrib/dev/acpica/include/actypes.h> /* ACPICA data types and structures */
#include <contrib/dev/acpica/include/acexcep.h> /* ACPICA exceptions */
#include <contrib/dev/acpica/include/actbl.h> /* ACPI table definitions */
#include <contrib/dev/acpica/include/acoutput.h> /* Error output and Debug macros */
@@ -171,6 +172,5 @@
#include <contrib/dev/acpica/include/acrestyp.h> /* Resource Descriptor structs */
#include <contrib/dev/acpica/include/acpiosxf.h> /* OSL interfaces (ACPICA-to-OS) */
#include <contrib/dev/acpica/include/acpixf.h> /* ACPI core subsystem external interfaces */
-#include <contrib/dev/acpica/include/platform/acenvex.h> /* Extra environment-specific items */
#endif /* __ACPI_H__ */
Modified: trunk/sys/contrib/dev/acpica/include/acpixf.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/acpixf.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/acpixf.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -155,7 +155,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20170531
+#define ACPI_CA_VERSION 0x20170728
#include <contrib/dev/acpica/include/acconfig.h>
#include <contrib/dev/acpica/include/actypes.h>
@@ -271,13 +271,14 @@
ACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE);
/*
- * Whether or not to verify the table checksum before installation. Set
- * this to TRUE to verify the table checksum before install it to the table
- * manager. Note that enabling this option causes errors to happen in some
- * OSPMs during early initialization stages. Default behavior is to do such
- * verification.
+ * Whether or not to validate (map) an entire table to verify
+ * checksum/duplication in early stage before install. Set this to TRUE to
+ * allow early table validation before install it to the table manager.
+ * Note that enabling this option causes errors to happen in some OSPMs
+ * during early initialization stages. Default behavior is to allow such
+ * validation.
*/
-ACPI_INIT_GLOBAL (UINT8, AcpiGbl_VerifyTableChecksum, TRUE);
+ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableTableValidation, TRUE);
/*
* Optionally enable output from the AML Debug Object.
Modified: trunk/sys/contrib/dev/acpica/include/actables.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/actables.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/actables.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -207,7 +207,8 @@
ACPI_STATUS
AcpiTbVerifyTempTable (
ACPI_TABLE_DESC *TableDesc,
- char *Signature);
+ char *Signature,
+ UINT32 *TableIndex);
BOOLEAN
AcpiTbIsTableLoaded (
@@ -304,6 +305,11 @@
UINT32 TableIndex);
void
+AcpiTbNotifyTable (
+ UINT32 Event,
+ void *Table);
+
+void
AcpiTbTerminate (
void);
Modified: trunk/sys/contrib/dev/acpica/include/actbl.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/actbl.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/actbl.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -518,6 +518,20 @@
} ACPI_TABLE_DESC;
+/*
+ * Maximum value of the ValidationCount field in ACPI_TABLE_DESC.
+ * When reached, ValidationCount cannot be changed any more and the table will
+ * be permanently regarded as validated.
+ *
+ * This is to prevent situations in which unbalanced table get/put operations
+ * may cause premature table unmapping in the OS to happen.
+ *
+ * The maximum validation count can be defined to any value, but should be
+ * greater than the maximum number of OS early stage mapping slots to avoid
+ * leaking early stage table mappings to the late stage.
+ */
+#define ACPI_MAX_TABLE_VALIDATIONS ACPI_UINT16_MAX
+
/* Masks for Flags field above */
#define ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL (0) /* Virtual address, external maintained */
@@ -524,6 +538,7 @@
#define ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL (1) /* Physical address, internally mapped */
#define ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL (2) /* Virtual address, internallly allocated */
#define ACPI_TABLE_ORIGIN_MASK (3)
+#define ACPI_TABLE_IS_VERIFIED (4)
#define ACPI_TABLE_IS_LOADED (8)
Modified: trunk/sys/contrib/dev/acpica/include/actbl2.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/actbl2.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/actbl2.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -187,6 +187,7 @@
#define ACPI_SIG_MCHI "MCHI" /* Management Controller Host Interface table */
#define ACPI_SIG_MSDM "MSDM" /* Microsoft Data Management Table */
#define ACPI_SIG_MTMR "MTMR" /* MID Timer table */
+#define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
#define ACPI_SIG_SLIC "SLIC" /* Software Licensing Description Table */
#define ACPI_SIG_SPCR "SPCR" /* Serial Port Console Redirection table */
#define ACPI_SIG_SPMI "SPMI" /* Server Platform Management Interface table */
@@ -875,7 +876,7 @@
* IORT - IO Remapping Table
*
* Conforms to "IO Remapping Table System Software on ARM Platforms",
- * Document number: ARM DEN 0049B, October 2015
+ * Document number: ARM DEN 0049C, May 2017
*
******************************************************************************/
@@ -1014,6 +1015,8 @@
#define ACPI_IORT_SMMU_V2 0x00000001 /* Generic SMMUv2 */
#define ACPI_IORT_SMMU_CORELINK_MMU400 0x00000002 /* ARM Corelink MMU-400 */
#define ACPI_IORT_SMMU_CORELINK_MMU500 0x00000003 /* ARM Corelink MMU-500 */
+#define ACPI_IORT_SMMU_CORELINK_MMU401 0x00000004 /* ARM Corelink MMU-401 */
+#define ACPI_IORT_SMMU_CAVIUM_THUNDERX 0x00000005 /* Cavium ThunderX SMMUv2 */
/* Masks for Flags field above */
@@ -1037,18 +1040,28 @@
UINT32 Flags;
UINT32 Reserved;
UINT64 VatosAddress;
- UINT32 Model; /* O: generic SMMUv3 */
+ UINT32 Model;
UINT32 EventGsiv;
UINT32 PriGsiv;
UINT32 GerrGsiv;
UINT32 SyncGsiv;
+ UINT8 Pxm;
+ UINT8 Reserved1;
+ UINT16 Reserved2;
} ACPI_IORT_SMMU_V3;
+/* Values for Model field above */
+
+#define ACPI_IORT_SMMU_V3_GENERIC 0x00000000 /* Generic SMMUv3 */
+#define ACPI_IORT_SMMU_V3_HISILICON_HI161X 0x00000001 /* HiSilicon Hi161x SMMUv3 */
+#define ACPI_IORT_SMMU_V3_CAVIUM_CN99XX 0x00000002 /* Cavium CN99xx SMMUv3 */
+
/* Masks for Flags field above */
#define ACPI_IORT_SMMU_V3_COHACC_OVERRIDE (1)
#define ACPI_IORT_SMMU_V3_HTTU_OVERRIDE (1<<1)
+#define ACPI_IORT_SMMU_V3_PXM_VALID (1<<3)
/*******************************************************************************
@@ -1411,7 +1424,22 @@
} ACPI_MTMR_ENTRY;
+/*******************************************************************************
+ *
+ * SDEI - Software Delegated Exception Interface Descriptor Table
+ *
+ * Conforms to "Software Delegated Exception Interface (SDEI)" ARM DEN0054A,
+ * May 8th, 2017. Copyright 2017 ARM Ltd.
+ *
+ ******************************************************************************/
+typedef struct acpi_table_sdei
+{
+ ACPI_TABLE_HEADER Header; /* Common ACPI table header */
+
+} ACPI_TABLE_SDEI;
+
+
/*******************************************************************************
*
* SLIC - Software Licensing Description Table
Modified: trunk/sys/contrib/dev/acpica/include/actypes.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/actypes.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/actypes.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -277,6 +277,7 @@
#define ACPI_MAX_PTR ACPI_UINT64_MAX
#define ACPI_SIZE_MAX ACPI_UINT64_MAX
#define ACPI_USE_NATIVE_DIVIDE /* Has native 64-bit integer support */
+#define ACPI_USE_NATIVE_MATH64 /* Has native 64-bit integer support */
/*
* In the case of the Itanium Processor Family (IPF), the hardware does not
@@ -676,7 +677,14 @@
#define ACPI_VALIDATE_RSDP_SIG(a) (!strncmp (ACPI_CAST_PTR (char, (a)), ACPI_SIG_RSDP, 8))
#define ACPI_MAKE_RSDP_SIG(dest) (memcpy (ACPI_CAST_PTR (char, (dest)), ACPI_SIG_RSDP, 8))
+/*
+ * Algorithm to obtain access bit width.
+ * Can be used with AccessWidth of ACPI_GENERIC_ADDRESS and AccessSize of
+ * ACPI_RESOURCE_GENERIC_REGISTER.
+ */
+#define ACPI_ACCESS_BIT_WIDTH(size) (1 << ((size) + 2))
+
/*******************************************************************************
*
* Miscellaneous constants
Modified: trunk/sys/contrib/dev/acpica/include/acutils.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/acutils.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/acutils.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -846,7 +846,7 @@
AcpiUtCreatePkgState (
void *InternalObject,
void *ExternalObject,
- UINT16 Index);
+ UINT32 Index);
ACPI_STATUS
AcpiUtCreateUpdateStateAndPush (
@@ -880,7 +880,25 @@
UINT64 *OutQuotient,
UINT32 *OutRemainder);
+ACPI_STATUS
+AcpiUtShortMultiply (
+ UINT64 InMultiplicand,
+ UINT32 Multiplier,
+ UINT64 *Outproduct);
+ACPI_STATUS
+AcpiUtShortShiftLeft (
+ UINT64 Operand,
+ UINT32 Count,
+ UINT64 *OutResult);
+
+ACPI_STATUS
+AcpiUtShortShiftRight (
+ UINT64 Operand,
+ UINT32 Count,
+ UINT64 *OutResult);
+
+
/*
* utmisc
*/
Modified: trunk/sys/contrib/dev/acpica/include/platform/acenv.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/platform/acenv.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/platform/acenv.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -399,6 +399,11 @@
#define ACPI_INLINE
#endif
+/* Use ordered initialization if compiler doesn't support designated. */
+#ifndef ACPI_STRUCT_INIT
+#define ACPI_STRUCT_INIT(field, value) value
+#endif
+
/*
* Configurable calling conventions:
*
Modified: trunk/sys/contrib/dev/acpica/include/platform/acfreebsd.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/platform/acfreebsd.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/platform/acfreebsd.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -170,6 +170,7 @@
#define ACPI_USE_DO_WHILE_0
#define ACPI_USE_LOCAL_CACHE
#define ACPI_USE_NATIVE_DIVIDE
+#define ACPI_USE_NATIVE_MATH64
#define ACPI_USE_SYSTEM_CLIBRARY
#ifdef _KERNEL
Modified: trunk/sys/contrib/dev/acpica/include/platform/acgcc.h
===================================================================
--- trunk/sys/contrib/dev/acpica/include/platform/acgcc.h 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/contrib/dev/acpica/include/platform/acgcc.h 2018-10-21 17:19:58 UTC (rev 12112)
@@ -195,4 +195,8 @@
#define COMPILER_VA_MACRO 1
+/* GCC supports native multiply/shift on 32-bit platforms */
+
+#define ACPI_USE_NATIVE_MATH64
+
#endif /* __ACGCC_H__ */
Modified: trunk/sys/dev/acpica/acpi.c
===================================================================
--- trunk/sys/dev/acpica/acpi.c 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/sys/dev/acpica/acpi.c 2018-10-21 17:19:58 UTC (rev 12112)
@@ -336,6 +336,15 @@
started = 1;
/*
+ * Initialize the ACPICA subsystem.
+ */
+ if (ACPI_FAILURE(status = AcpiInitializeSubsystem())) {
+ printf("ACPI: Could not initialize Subsystem: %s\n",
+ AcpiFormatException(status));
+ return_VALUE (status);
+ }
+
+ /*
* Pre-allocate space for RSDT/XSDT and DSDT tables and allow resizing
* if more tables exist.
*/
@@ -484,14 +493,6 @@
AcpiDbgLevel = 0;
#endif
- /* Start up the ACPI CA subsystem. */
- status = AcpiInitializeSubsystem();
- if (ACPI_FAILURE(status)) {
- device_printf(dev, "Could not initialize Subsystem: %s\n",
- AcpiFormatException(status));
- goto out;
- }
-
/* Override OS interfaces if the user requested. */
acpi_reset_interfaces(dev);
Modified: trunk/usr.sbin/acpi/acpidb/Makefile
===================================================================
--- trunk/usr.sbin/acpi/acpidb/Makefile 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/usr.sbin/acpi/acpidb/Makefile 2018-10-21 17:19:58 UTC (rev 12112)
@@ -19,8 +19,9 @@
# components/dispatcher
SRCS+= dsargs.c dscontrol.c dsdebug.c dsfield.c dsinit.c \
- dsmethod.c dsmthdat.c dsobject.c dsopcode.c dsutils.c \
- dswexec.c dswload.c dswload2.c dswscope.c dswstate.c
+ dsmethod.c dsmthdat.c dsobject.c dsopcode.c dspkginit.c \
+ dsutils.c dswexec.c dswload.c dswload2.c dswscope.c \
+ dswstate.c
# components/events
SRCS+= evevent.c evglock.c evgpe.c evgpeblk.c evgpeinit.c \
Modified: trunk/usr.sbin/acpi/iasl/Makefile
===================================================================
--- trunk/usr.sbin/acpi/iasl/Makefile 2018-10-21 17:17:26 UTC (rev 12111)
+++ trunk/usr.sbin/acpi/iasl/Makefile 2018-10-21 17:19:58 UTC (rev 12112)
@@ -18,18 +18,19 @@
asllookup.c aslmain.c aslmap.c aslmapenter.c \
aslmapoutput.c aslmaputils.c aslmessages.c aslmethod.c \
aslnamesp.c asloffset.c aslopcodes.c asloperands.c \
- aslopt.c asloptions.c aslpld.c aslpredef.c aslprepkg.c \
- aslprintf.c aslprune.c aslresource.c aslrestype1.c \
- aslrestype1i.c aslrestype2.c aslrestype2d.c \
- aslrestype2e.c aslrestype2q.c aslrestype2s.c \
- aslrestype2w.c aslstartup.c aslstubs.c asltransform.c \
- asltree.c aslutils.c asluuid.c aslwalks.c aslxref.c \
- aslxrefout.c cvcompiler.c cvdisasm.c cvparser.c \
- dtcompile.c dtexpress.c dtfield.c dtio.c dtparser.y.h \
- dtparserlex.c dtparserparse.c dtsubtable.c dttable.c \
- dttable1.c dttable2.c dttemplate.c dtutils.c \
- prexpress.c prmacros.c prparser.y.h prparserlex.c \
- prparserparse.c prscan.c prutils.c
+ aslopt.c asloptions.c aslparseop.c aslpld.c aslpredef.c \
+ aslprepkg.c aslprintf.c aslprune.c aslresource.c \
+ aslrestype1.c aslrestype1i.c aslrestype2.c \
+ aslrestype2d.c aslrestype2e.c aslrestype2q.c \
+ aslrestype2s.c aslrestype2w.c aslstartup.c aslstubs.c \
+ asltransform.c asltree.c aslutils.c asluuid.c \
+ aslwalks.c aslxref.c aslxrefout.c cvcompiler.c \
+ cvdisasm.c cvparser.c dtcompile.c dtexpress.c dtfield.c \
+ dtio.c dtparser.y.h dtparserlex.c dtparserparse.c \
+ dtsubtable.c dttable.c dttable1.c dttable2.c \
+ dttemplate.c dtutils.c prexpress.c prmacros.c \
+ prparser.y.h prparserlex.c prparserparse.c prscan.c \
+ prutils.c
# components/debugger
SRCS+= dbfileio.c
@@ -41,8 +42,8 @@
# components/dispatcher
SRCS+= dsargs.c dscontrol.c dsfield.c dsobject.c dsopcode.c \
- dsutils.c dswexec.c dswload.c dswload2.c dswscope.c \
- dswstate.c
+ dspkginit.c dsutils.c dswexec.c dswload.c dswload2.c \
+ dswscope.c dswstate.c
# components/executer
SRCS+= exconcat.c exconvrt.c excreate.c exdump.c exmisc.c \
More information about the Midnightbsd-cvs
mailing list