<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><br>
</p>
<br>
<div class="moz-cite-prefix">On 2016年08月15日 16:02, Colin King wrote:<br>
</div>
<blockquote
cite="mid:1471248160-23620-1-git-send-email-colin.king@canonical.com"
type="cite">
<pre wrap="">From: Colin Ian King <a class="moz-txt-link-rfc2396E" href="mailto:colin.king@canonical.com"><colin.king@canonical.com></a>
Changes in this release of ACPICA are detailed at the following
link on the ACPICA developer mailing list:
<a class="moz-txt-link-freetext" href="https://lists.acpica.org/pipermail/devel/2016-July/000940.html">https://lists.acpica.org/pipermail/devel/2016-July/000940.html</a>
Signed-off-by: Colin Ian King <a class="moz-txt-link-rfc2396E" href="mailto:colin.king@canonical.com"><colin.king@canonical.com></a>
---
src/acpica/Makefile.am | 1 -
src/acpica/source/common/acfileio.c | 9 +-
src/acpica/source/common/acgetline.c | 2 -
src/acpica/source/common/adisasm.c | 2 -
src/acpica/source/common/ahtable.c | 1 +
src/acpica/source/common/cmfsize.c | 13 +-
src/acpica/source/common/dmtable.c | 7 +
src/acpica/source/common/dmtables.c | 4 +-
src/acpica/source/common/dmtbdump.c | 184 ++-
src/acpica/source/common/dmtbinfo.c | 41 +-
src/acpica/source/common/getopt.c | 4 +-
src/acpica/source/compiler/aslcompiler.h | 1 -
src/acpica/source/compiler/aslcompiler.y | 613 +++++++---
src/acpica/source/compiler/aslcstyle.y | 33 +-
src/acpica/source/compiler/aslhelpers.y | 358 ++++++
src/acpica/source/compiler/aslkeywords.y | 424 +++++++
src/acpica/source/compiler/aslmain.c | 28 +-
src/acpica/source/compiler/aslparser.y | 6 +-
src/acpica/source/compiler/aslprimaries.y | 1232 ++++++++++++++++++++
src/acpica/source/compiler/aslresources.y | 621 +---------
src/acpica/source/compiler/aslrules.y | 1208 ++-----------------
src/acpica/source/compiler/asltokens.y | 42 +-
src/acpica/source/compiler/asltypes.y | 51 +-
src/acpica/source/compiler/dtcompiler.h | 1 +
src/acpica/source/compiler/dttable.c | 70 +-
src/acpica/source/compiler/dttemplate.h | 10 +
src/acpica/source/compiler/dtutils.c | 6 +
src/acpica/source/components/debugger/dbfileio.c | 19 +-
src/acpica/source/components/tables/tbfadt.c | 10 +-
src/acpica/source/components/tables/tbutils.c | 2 +-
src/acpica/source/components/tables/tbxface.c | 4 +-
src/acpica/source/components/tables/tbxfload.c | 4 +-
src/acpica/source/components/tables/tbxfroot.c | 4 +-
src/acpica/source/components/utilities/utbuffer.c | 26 +-
src/acpica/source/components/utilities/utdebug.c | 30 -
src/acpica/source/components/utilities/utinit.c | 2 +-
src/acpica/source/components/utilities/utpredef.c | 2 -
src/acpica/source/components/utilities/utprint.c | 121 +-
src/acpica/source/components/utilities/uttrack.c | 4 +-
src/acpica/source/components/utilities/utxface.c | 2 +-
src/acpica/source/components/utilities/utxfinit.c | 6 +-
src/acpica/source/include/acapps.h | 14 +-
src/acpica/source/include/acconfig.h | 4 +
src/acpica/source/include/acdisasm.h | 7 +-
src/acpica/source/include/acglobal.h | 1 +
src/acpica/source/include/acpiosxf.h | 67 +-
src/acpica/source/include/acpixf.h | 27 +-
src/acpica/source/include/actables.h | 2 +-
src/acpica/source/include/actbl.h | 164 +--
src/acpica/source/include/actypes.h | 10 -
src/acpica/source/include/acutils.h | 42 -
src/acpica/source/include/platform/acenv.h | 90 +-
src/acpica/source/include/platform/acenvex.h | 21 +-
src/acpica/source/include/platform/acgcc.h | 17 +-
src/acpica/source/include/platform/acgccex.h | 130 +++
src/acpica/source/include/platform/aclinux.h | 14 +-
src/acpica/source/include/platform/aclinuxex.h | 2 +-
.../source/os_specific/service_layers/oslibcfs.c | 330 ------
.../source/os_specific/service_layers/osunixxf.c | 3 -
src/acpica/source/tools/acpiexec/aecommon.h | 5 -
src/acpica/source/tools/acpiexec/aeinitfile.c | 3 +-
61 files changed, 3352 insertions(+), 2809 deletions(-)
create mode 100644 src/acpica/source/compiler/aslhelpers.y
create mode 100644 src/acpica/source/compiler/aslkeywords.y
create mode 100644 src/acpica/source/compiler/aslprimaries.y
create mode 100644 src/acpica/source/include/platform/acgccex.h
delete mode 100644 src/acpica/source/os_specific/service_layers/oslibcfs.c
diff --git a/src/acpica/Makefile.am b/src/acpica/Makefile.am
index 28b458c..fb3c29a 100644
--- a/src/acpica/Makefile.am
+++ b/src/acpica/Makefile.am
@@ -67,7 +67,6 @@ libfwtsacpica_la_SOURCES = \
fwts_acpica.c \
osunixxf_munged.c \
dscontrol_munged.c \
- source/os_specific/service_layers/oslibcfs.c \
source/components/debugger/dbcmds.c \
source/components/debugger/dbdisply.c \
source/components/debugger/dbexec.c \
diff --git a/src/acpica/source/common/acfileio.c b/src/acpica/source/common/acfileio.c
index c00580f..b7d5039 100644
--- a/src/acpica/source/common/acfileio.c
+++ b/src/acpica/source/common/acfileio.c
@@ -115,10 +115,9 @@
#include "acpi.h"
#include "accommon.h"
-#include "acapps.h"
#include "actables.h"
#include "acutils.h"
-#include <errno.h>
+#include "acapps.h"
#define _COMPONENT ACPI_UTILITIES
ACPI_MODULE_NAME ("acfileio")
@@ -170,7 +169,7 @@ AcGetAllTablesFromFile (
File = fopen (Filename, "rb");
if (!File)
{
- perror ("Could not open input file");
+ fprintf (stderr, "Could not open input file: %s\n", Filename);
if (errno == ENOENT)
{
return (AE_NOT_EXIST);
@@ -352,7 +351,7 @@ AcGetOneTableFromFile (
/* Allocate a buffer for the entire table */
- Table = AcpiOsAllocate ((size_t) TableHeader.Length);
+ Table = AcpiOsAllocate ((ACPI_SIZE) TableHeader.Length);
if (!Table)
{
return (AE_NO_MEMORY);
@@ -460,7 +459,7 @@ AcValidateTableHeader (
long TableOffset)
{
ACPI_TABLE_HEADER TableHeader;
- size_t Actual;
+ ACPI_SIZE Actual;
long OriginalOffset;
UINT32 FileSize;
UINT32 i;
diff --git a/src/acpica/source/common/acgetline.c b/src/acpica/source/common/acgetline.c
index dfc0653..a28aaf7 100644
--- a/src/acpica/source/common/acgetline.c
+++ b/src/acpica/source/common/acgetline.c
@@ -119,8 +119,6 @@
#include "acparser.h"
#include "acdebug.h"
-#include <stdio.h>
-
/*
* This is an os-independent implementation of line-editing services needed
* by the AcpiExec utility. It uses getchar() and putchar() and the existing
diff --git a/src/acpica/source/common/adisasm.c b/src/acpica/source/common/adisasm.c
index 520863c..2d46c50 100644
--- a/src/acpica/source/common/adisasm.c
+++ b/src/acpica/source/common/adisasm.c
@@ -121,8 +121,6 @@
#include "acparser.h"
#include "acapps.h"
-#include <stdio.h>
-
#define _COMPONENT ACPI_TOOLS
ACPI_MODULE_NAME ("adisasm")
diff --git a/src/acpica/source/common/ahtable.c b/src/acpica/source/common/ahtable.c
index 021ae33..59ddc83 100644
--- a/src/acpica/source/common/ahtable.c
+++ b/src/acpica/source/common/ahtable.c
@@ -196,6 +196,7 @@ const AH_TABLE AcpiSupportedTables[] =
{ACPI_SIG_NFIT, "NVDIMM Firmware Interface Table"},
{ACPI_SIG_PCCT, "Platform Communications Channel Table"},
{ACPI_SIG_PMTT, "Platform Memory Topology Table"},
+ {ACPI_SIG_RASF, "RAS Features Table"},
{ACPI_RSDP_NAME,"Root System Description Pointer"},
{ACPI_SIG_RSDT, "Root System Description Table"},
{ACPI_SIG_S3PT, "S3 Performance Table"},
diff --git a/src/acpica/source/common/cmfsize.c b/src/acpica/source/common/cmfsize.c
index accdf22..2139e4b 100644
--- a/src/acpica/source/common/cmfsize.c
+++ b/src/acpica/source/common/cmfsize.c
@@ -116,7 +116,6 @@
#include "acpi.h"
#include "accommon.h"
#include "acapps.h"
-#include <stdio.h>
#define _COMPONENT ACPI_TOOLS
ACPI_MODULE_NAME ("cmfsize")
@@ -146,19 +145,19 @@ CmGetFileSize (
/* Save the current file pointer, seek to EOF to obtain file size */
- CurrentOffset = AcpiOsGetFileOffset (File);
+ CurrentOffset = ftell (File);
if (CurrentOffset < 0)
{
goto OffsetError;
}
- Status = AcpiOsSetFileOffset (File, 0, ACPI_FILE_END);
+ Status = fseek (File, 0, SEEK_END);
if (ACPI_FAILURE (Status))
{
goto SeekError;
}
- FileSize = AcpiOsGetFileOffset (File);
+ FileSize = ftell (File);
if (FileSize < 0)
{
goto OffsetError;
@@ -166,7 +165,7 @@ CmGetFileSize (
/* Restore original file pointer */
- Status = AcpiOsSetFileOffset (File, CurrentOffset, ACPI_FILE_BEGIN);
+ Status = fseek (File, CurrentOffset, SEEK_SET);
if (ACPI_FAILURE (Status))
{
goto SeekError;
@@ -176,10 +175,10 @@ CmGetFileSize (
OffsetError:
- AcpiLogError ("Could not get file offset");
+ fprintf (stderr, "Could not get file offset\n");
return (ACPI_UINT32_MAX);
SeekError:
- AcpiLogError ("Could not set file offset");
+ fprintf (stderr, "Could not set file offset\n");
return (ACPI_UINT32_MAX);
}
diff --git a/src/acpica/source/common/dmtable.c b/src/acpica/source/common/dmtable.c
index 51d91f8..ff0603d 100644
--- a/src/acpica/source/common/dmtable.c
+++ b/src/acpica/source/common/dmtable.c
@@ -430,6 +430,7 @@ const ACPI_DMTABLE_DATA AcpiDmTableData[] =
{ACPI_SIG_NFIT, AcpiDmTableInfoNfit, AcpiDmDumpNfit, DtCompileNfit, TemplateNfit},
{ACPI_SIG_PCCT, AcpiDmTableInfoPcct, AcpiDmDumpPcct, DtCompilePcct, TemplatePcct},
{ACPI_SIG_PMTT, NULL, AcpiDmDumpPmtt, DtCompilePmtt, TemplatePmtt},
+ {ACPI_SIG_RASF, AcpiDmTableInfoRasf, NULL, NULL, TemplateRasf},
{ACPI_SIG_RSDT, NULL, AcpiDmDumpRsdt, DtCompileRsdt, TemplateRsdt},
{ACPI_SIG_S3PT, NULL, NULL, NULL, TemplateS3pt},
{ACPI_SIG_SBST, AcpiDmTableInfoSbst, NULL, NULL, TemplateSbst},
@@ -916,6 +917,11 @@ AcpiDmDumpTable (
ByteLength = 10;
break;
+ case ACPI_DMT_BUF12:
+
+ ByteLength = 12;
+ break;
+
case ACPI_DMT_BUF16:
case ACPI_DMT_UUID:
@@ -1078,6 +1084,7 @@ AcpiDmDumpTable (
case ACPI_DMT_BUF7:
case ACPI_DMT_BUF10:
+ case ACPI_DMT_BUF12:
case ACPI_DMT_BUF16:
case ACPI_DMT_BUF128:
/*
diff --git a/src/acpica/source/common/dmtables.c b/src/acpica/source/common/dmtables.c
index 813ba83..06897dc 100644
--- a/src/acpica/source/common/dmtables.c
+++ b/src/acpica/source/common/dmtables.c
@@ -114,14 +114,12 @@
*****************************************************************************/
#include "aslcompiler.h"
-#include "acapps.h"
#include "acdispat.h"
#include "acnamesp.h"
#include "actables.h"
#include "acparser.h"
+#include "acapps.h"
-#include <stdio.h>
-#include <time.h>
#define _COMPONENT ACPI_TOOLS
ACPI_MODULE_NAME ("dmtables")
diff --git a/src/acpica/source/common/dmtbdump.c b/src/acpica/source/common/dmtbdump.c
index ae48276..fe4ce2f 100644
--- a/src/acpica/source/common/dmtbdump.c
+++ b/src/acpica/source/common/dmtbdump.c
@@ -124,12 +124,31 @@
ACPI_MODULE_NAME ("dmtbdump")
-/* Local prototypes */
+/* Table of revision-dependent FADT sizes */
-static void
-AcpiDmValidateFadtLength (
- UINT32 Revision,
- UINT32 Length);
+static const UINT32 FadtRevisionLength [ACPI_FADT_MAX_VERSION + 1] =
+{
+ 0, /* 0 - illegal */
+ ACPI_FADT_V1_SIZE, /* 1 - ACPI 1.0 */
+ 0, /* 2 - illegal */
+ ACPI_FADT_V3_SIZE, /* 3 - ACPI 2.0 */
+ ACPI_FADT_V4_SIZE, /* 4 - ACPI 3.0 and ACPI 4.0 */
+ ACPI_FADT_V5_SIZE, /* 5 - ACPI 5.0 */
+ ACPI_FADT_V6_SIZE /* 6 - ACPI 6.0 */
+};
+
+/* Table of revision-dependent FADT info tables */
+
+ACPI_DMTABLE_INFO *FadtRevisionInfo [ACPI_FADT_MAX_VERSION + 1] =
+{
+ NULL, /* 0 - illegal */
+ AcpiDmTableInfoFadt1, /* 1 - ACPI 1.0 */
+ NULL, /* 2 - illegal */
+ AcpiDmTableInfoFadt3, /* 3 - ACPI 2.0 */
+ AcpiDmTableInfoFadt4, /* 4 - ACPI 3.0 and ACPI 4.0 */
+ AcpiDmTableInfoFadt5, /* 5 - ACPI 5.0 */
+ AcpiDmTableInfoFadt6 /* 6 - ACPI 6.0 */
+};
/*******************************************************************************
@@ -419,6 +438,11 @@ AcpiDmDumpXsdt (
*
* DESCRIPTION: Format the contents of a FADT
*
+ * Check the FADT revision against the expected table length for
+ * that revision. Issue a warning if the length is not what was
+ * expected. This seems to be such a common BIOS bug that the
+ * FADT revision has been rendered virtually meaningless.
+ *
* NOTE: We cannot depend on the FADT version to indicate the actual
* contents of the FADT because of BIOS bugs. The table length
* is the only reliable indicator.
@@ -430,142 +454,72 @@ AcpiDmDumpFadt (
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
+ UINT8 FadtRevision;
+ UINT32 ExpectedLength;
+ UINT32 i;
- /* Always dump the minimum FADT revision 1 fields (ACPI 1.0) */
+ FadtRevision = Table->Revision;
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
- AcpiDmTableInfoFadt1);
- if (ACPI_FAILURE (Status))
+ /* FADT revision/length validation */
+
+ if ((FadtRevision == 0) ||
+ (FadtRevision == 2))
{
+ AcpiOsPrintf (
+ "// ACPI Warning: Invalid or unsupported FADT revision: %u\n",
+ FadtRevision);
return;
}
- /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */
-
- if ((Table->Length > ACPI_FADT_V1_SIZE) &&
- (Table->Length <= ACPI_FADT_V2_SIZE))
+ if (FadtRevision > ACPI_FADT_MAX_VERSION)
{
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
- AcpiDmTableInfoFadt2);
- if (ACPI_FAILURE (Status))
+ AcpiOsPrintf ("// ACPI Warning: Revision %u is not fully supported, "
+ "disassembling known fields (up to revision %u)\n\n",
+ FadtRevision, ACPI_FADT_MAX_VERSION);
+ }
+ else
+ {
+ ExpectedLength = FadtRevisionLength[FadtRevision];
+ if (Table->Length != ExpectedLength)
{
- return;
+ AcpiOsPrintf (
+ "// ACPI Warning: Input FADT revision %X does not match "
+ "expected length: found 0x%X expected 0x%X\n",
+ FadtRevision, Table->Length, ExpectedLength);
}
}
- /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */
-
- else if (Table->Length > ACPI_FADT_V2_SIZE)
+ /*
+ * Dump the input table on a per-version basis, but is actually
+ * based upon the length of the table. Table length must
+ * be larger than the required length of the previous version.
+ */
+ for (i = 1; i <= ACPI_FADT_MAX_VERSION; i++)
{
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
- AcpiDmTableInfoFadt3);
- if (ACPI_FAILURE (Status))
+ if (!FadtRevisionLength[i]) /* Skip any empty slots */
{
- return;
+ continue;
}
- /* Check for FADT revision 5 fields and up (ACPI 5.0+) */
+ /* Dump the fields specific to FADT revision[i] */
- if (Table->Length > ACPI_FADT_V3_SIZE)
+ Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
+ FadtRevisionInfo[i]);
+ if (ACPI_FAILURE (Status))
{
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
- AcpiDmTableInfoFadt5);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
+ return;
}
- /* Check for FADT revision 6 fields and up (ACPI 6.0+) */
-
- if (Table->Length > ACPI_FADT_V3_SIZE)
+ if (Table->Length <= FadtRevisionLength[i])
{
- Status = AcpiDmDumpTable (Table->Length, 0, Table, 0,
- AcpiDmTableInfoFadt6);
- if (ACPI_FAILURE (Status))
- {
- return;
- }
+ break; /* End of table */
}
}
- /* Validate various fields in the FADT, including length */
+ /* Build a local FADT to test some FADT values */
AcpiTbCreateLocalFadt (Table, Table->Length);
-
- /* Validate FADT length against the revision */
-
- AcpiDmValidateFadtLength (Table->Revision, Table->Length);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiDmValidateFadtLength
- *
- * PARAMETERS: Revision - FADT revision (Header->Revision)
- * Length - FADT length (Header->Length
- *
- * RETURN: None
- *
- * DESCRIPTION: Check the FADT revision against the expected table length for
- * that revision. Issue a warning if the length is not what was
- * expected. This seems to be such a common BIOS bug that the
- * FADT revision has been rendered virtually meaningless.
- *
- ******************************************************************************/
-
-static void
-AcpiDmValidateFadtLength (
- UINT32 Revision,
- UINT32 Length)
-{
- UINT32 ExpectedLength;
-
-
- switch (Revision)
- {
- case 0:
-
- AcpiOsPrintf ("// ACPI Warning: Invalid FADT revision: 0\n");
- return;
-
- case 1:
-
- ExpectedLength = ACPI_FADT_V1_SIZE;
- break;
-
- case 2:
-
- ExpectedLength = ACPI_FADT_V2_SIZE;
- break;
-
- case 3:
- case 4:
-
- ExpectedLength = ACPI_FADT_V3_SIZE;
- break;
-
- case 5:
-
- ExpectedLength = ACPI_FADT_V5_SIZE;
- break;
-
- default:
-
- return;
- }
-
- if (Length == ExpectedLength)
- {
- return;
- }
-
- AcpiOsPrintf (
- "\n// ACPI Warning: FADT revision %X does not match length: "
- "found %X expected %X\n",
- Revision, Length, ExpectedLength);
}
diff --git a/src/acpica/source/common/dmtbinfo.c b/src/acpica/source/common/dmtbinfo.c
index 5520da2..e920724 100644
--- a/src/acpica/source/common/dmtbinfo.c
+++ b/src/acpica/source/common/dmtbinfo.c
@@ -178,6 +178,7 @@
#define ACPI_NFIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_NFIT,f)
#define ACPI_PCCT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PCCT,f)
#define ACPI_PMTT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_PMTT,f)
+#define ACPI_RASF_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_RASF,f)
#define ACPI_S3PT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_S3PT,f)
#define ACPI_SBST_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SBST,f)
#define ACPI_SLIT_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SLIT,f)
@@ -471,7 +472,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFacs[] =
*
******************************************************************************/
-/* ACPI 1.0 FADT (Version 1) */
+/* FADT version 1 (ACPI 1.0) */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] =
{
@@ -557,18 +558,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] =
ACPI_DMT_TERMINATOR
};
-/* ACPI 1.0 MS Extensions (FADT version 2) */
-
-ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[] =
-{
- {ACPI_DMT_GAS, ACPI_FADT_OFFSET (ResetRegister), "Reset Register", 0},
- {ACPI_DMT_UINT8, ACPI_FADT_OFFSET (ResetValue), "Value to cause reset", 0},
- {ACPI_DMT_UINT16, ACPI_FADT_OFFSET (ArmBootFlags), "Reserved", 0},
- {ACPI_DMT_UINT8, ACPI_FADT_OFFSET (MinorRevision), "Reserved", 0},
- ACPI_DMT_TERMINATOR
-};
-
-/* ACPI 2.0+ Extensions (FADT version 3, 4, and 5) */
+/* FADT version 3 (ACPI 2.0) */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[] =
{
@@ -592,16 +582,23 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[] =
ACPI_DMT_TERMINATOR
};
-/* ACPI 5.0 Extensions (FADT version 5) */
+/* FADT version 4 (ACPI 3.0 and ACPI 4.0) */
-ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[] =
+ACPI_DMTABLE_INFO AcpiDmTableInfoFadt4[] =
{
{ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepControl), "Sleep Control Register", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/* FADT version 5 (ACPI 5.0) */
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[] =
+{
{ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepStatus), "Sleep Status Register", 0},
ACPI_DMT_TERMINATOR
};
-/* ACPI 6.0 Extensions (FADT version 6) */
+/* FADT version 6 (ACPI 6.0) */
ACPI_DMTABLE_INFO AcpiDmTableInfoFadt6[] =
{
@@ -2512,6 +2509,18 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoPmtt2[] =
/*******************************************************************************
*
+ * RASF - RAS Feature table
+ *
+ ******************************************************************************/
+
+ACPI_DMTABLE_INFO AcpiDmTableInfoRasf[] =
+{
+ {ACPI_DMT_BUF12, ACPI_RASF_OFFSET (ChannelId[0]), "Channel ID", 0},
+ ACPI_DMT_TERMINATOR
+};
+
+/*******************************************************************************
+ *
* S3PT - S3 Performance Table
*
******************************************************************************/
diff --git a/src/acpica/source/common/getopt.c b/src/acpica/source/common/getopt.c
index 15eadc2..d309789 100644
--- a/src/acpica/source/common/getopt.c
+++ b/src/acpica/source/common/getopt.c
@@ -129,7 +129,7 @@
#include "acapps.h"
#define ACPI_OPTION_ERROR(msg, badchar) \
- if (AcpiGbl_Opterr) {AcpiLogError ("%s%c\n", msg, badchar);}
+ if (AcpiGbl_Opterr) {fprintf (stderr, "%s%c\n", msg, badchar);}
int AcpiGbl_Opterr = 1;
@@ -173,7 +173,7 @@ AcpiGetoptArgument (
}
else if (++AcpiGbl_Optind >= argc)
{
- ACPI_OPTION_ERROR ("Option requires an argument: -", 'v');
+ ACPI_OPTION_ERROR ("\nOption requires an argument", 0);
CurrentCharPtr = 1;
return (-1);
diff --git a/src/acpica/source/compiler/aslcompiler.h b/src/acpica/source/compiler/aslcompiler.h
index 4d02852..64a9ae7 100644
--- a/src/acpica/source/compiler/aslcompiler.h
+++ b/src/acpica/source/compiler/aslcompiler.h
@@ -134,7 +134,6 @@
#include <stdio.h>
#include <stdlib.h>
-#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <ctype.h>
diff --git a/src/acpica/source/compiler/aslcompiler.y b/src/acpica/source/compiler/aslcompiler.y
index fa5c64b..4dd34d4 100644
--- a/src/acpica/source/compiler/aslcompiler.y
+++ b/src/acpica/source/compiler/aslcompiler.y
@@ -138,6 +138,7 @@ void *
AslLocalAllocate (
unsigned int Size);
+
/* Bison/yacc configuration */
#define static
@@ -171,7 +172,7 @@ AslLocalAllocate (
* These shift/reduce conflicts are expected. There should be zero
* reduce/reduce conflicts.
*/
-%expect 101
+%expect 102
/*! [Begin] no source code translation */
@@ -195,6 +196,16 @@ AslLocalAllocate (
*
*****************************************************************************/
+/*
+ * Most tokens are defined to return <i>, which is a UINT64.
+ *
+ * These tokens return <s>, a pointer to the associated lexed string:
+ *
+ * PARSEOP_NAMESEG
+ * PARSEOP_NAMESTRING
+ * PARSEOP_STRING_LITERAL
+ * PARSEOP_STRUCTURE_NAMESTRING
+ */
%token <i> PARSEOP_ACCESSAS
%token <i> PARSEOP_ACCESSATTRIB_BLOCK
%token <i> PARSEOP_ACCESSATTRIB_BLOCK_CALL
@@ -608,12 +619,42 @@ AslLocalAllocate (
%token <i> PARSEOP_FPRINTF
%token <i> PARSEOP_FOR
+/* Structures */
+
+%token <i> PARSEOP_STRUCTURE
+%token <s> PARSEOP_STRUCTURE_NAMESTRING
+%token <i> PARSEOP_STRUCTURE_TAG
+%token <i> PARSEOP_STRUCTURE_ELEMENT
+%token <i> PARSEOP_STRUCTURE_INSTANCE
+%token <i> PARSEOP_STRUCTURE_REFERENCE
+%token <i> PARSEOP_STRUCTURE_POINTER
+
+/* Top level */
+
+%token <i> PARSEOP_ASL_CODE
+
+
+/*******************************************************************************
+ *
+ * Tokens below are not in the aslmap.c file
+ *
+ ******************************************************************************/
+
+
+/* Tokens below this are not in the aslmap.c file */
+
/* Specific parentheses tokens are not used at this time */
/* PARSEOP_EXP_PAREN_OPEN */
/* PARSEOP_EXP_PAREN_CLOSE */
+/* ASL+ variable creation */
+
+%token <i> PARSEOP_INTEGER_TYPE
+%token <i> PARSEOP_STRING_TYPE
+%token <i> PARSEOP_BUFFER_TYPE
+%token <i> PARSEOP_PACKAGE_TYPE
+%token <i> PARSEOP_REFERENCE_TYPE
-%token <i> PARSEOP_ASL_CODE
/*
* Special functions. These should probably stay at the end of this
@@ -863,7 +904,6 @@ AslLocalAllocate (
%type <n> PackageElement
%type <n> PackageList
%type <n> PackageTerm
-%type <n> VarPackageLengthTerm
/* Macros */
@@ -935,9 +975,9 @@ AslLocalAllocate (
%type <n> OptionalAddressRange
%type <n> OptionalBitsPerByte
%type <n> OptionalBuffer_Last
-%type <n> OptionalBufferLength
%type <n> OptionalByteConstExpr
%type <n> OptionalCount
+%type <n> OptionalDataCount
%type <n> OptionalDecodeType
%type <n> OptionalDevicePolarity
%type <n> OptionalDWordConstExpr
@@ -954,6 +994,7 @@ AslLocalAllocate (
%type <n> OptionalObjectTypeKeyword
%type <n> OptionalParameterTypePackage
%type <n> OptionalParameterTypesPackage
+%type <n> OptionalParentheses
%type <n> OptionalParityType
%type <n> OptionalPredicate
%type <n> OptionalQWordConstExpr
@@ -978,12 +1019,57 @@ AslLocalAllocate (
%type <n> OptionalXferSize
/*
- * C-style expression parser
+ * ASL+ (C-style) parser
*/
+
+/* Expressions and symbolic operators */
+
%type <n> Expression
%type <n> EqualsTerm
%type <n> IndexExpTerm
+/* ASL+ Named object declaration support */
+/*
+%type <n> NameTermAslPlus
+
+%type <n> BufferBegin
+%type <n> BufferEnd
+%type <n> PackageBegin
+%type <n> PackageEnd
+%type <n> OptionalLength
+*/
+/* ASL+ Structure declarations */
+/*
+%type <n> StructureTerm
+%type <n> StructureTermBegin
+%type <n> StructureType
+%type <n> StructureTag
+%type <n> StructureElementList
+%type <n> StructureElement
+%type <n> StructureElementType
+%type <n> OptionalStructureElementType
+%type <n> StructureId
+*/
+/* Structure instantiantion */
+/*
+%type <n> StructureInstanceTerm
+%type <n> StructureTagReference
+%type <n> StructureInstanceEnd
+*/
+/* Pseudo-instantiantion for method Args/Locals */
+/*
+%type <n> MethodStructureTerm
+%type <n> LocalStructureName
+*/
+/* Direct structure references via the Index operator */
+/*
+%type <n> StructureReference
+%type <n> StructureIndexTerm
+%type <n> StructurePointerTerm
+%type <n> StructurePointerReference
+%type <n> OptionalDefinePointer
+*/
+
%%
/* Production rules */
@@ -1001,7 +1087,8 @@ AslLocalAllocate (
* to handle output from preprocessors
*/
AslCode
- : DefinitionBlockList {$<n>$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_ASL_CODE),1, $1);}
+ : DefinitionBlockList {$<n>$ = TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_ASL_CODE),1, $1);}
| error {YYABORT; $$ = NULL;}
;
@@ -1034,7 +1121,8 @@ DefinitionBlockTerm
String ','
DWordConst
')' {TrSetEndLineNumber ($<n>3);}
- '{' TermList '}' {$$ = TrLinkChildren ($<n>3,7,$4,$6,$8,$10,$12,$14,$18);}
+ '{' TermList '}' {$$ = TrLinkChildren ($<n>3,7,
+ $4,$6,$8,$10,$12,$14,$18);}
;
DefinitionBlockList
@@ -1043,12 +1131,36 @@ DefinitionBlockList
DefinitionBlockList {$$ = TrLinkPeerNodes (2, $1,$2);}
;
+/* Allow IO, DMA, IRQ Resource macro and FOR macro names to also be used as identifiers */
+
+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");}
+ ;
+/*
+NameSeg
+ : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT)
+ TrNormalizeNameSeg ($1));}
+ ;
+*/
+
+NameSeg
+ : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
+ (ACPI_NATIVE_INT) AslCompilerlval.s);}
+ ;
+
+
SuperName
: NameString {}
| ArgTerm {}
| LocalTerm {}
| DebugTerm {}
| Type6Opcode {}
+ ;
Target
: {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
@@ -1062,6 +1174,8 @@ TermArg
| NameString {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
| ArgTerm {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
| LocalTerm {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+
+
;
/*
@@ -1086,9 +1200,26 @@ OptionalCount
| ',' TermArg {$$ = $2;}
;
-VarPackageLengthTerm
- : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
- | TermArg {$$ = $1;}
+/*
+ * Data count for buffers and packages (byte count for buffers,
+ * element count for packages).
+ */
+OptionalDataCount
+
+ /* Legacy ASL */
+ : {$$ = NULL;}
+ | '(' TermArg ')' {$$ = $2;}
+ | '(' ')' {$$ = NULL;}
+
+ /* C-style (ASL+) -- adds equals term */
+
+ | PARSEOP_EXP_EQUALS {$$ = NULL;}
+
+ | '(' TermArg ')'
+ PARSEOP_EXP_EQUALS {$$ = $2;}
+
+ | '(' ')' String
+ PARSEOP_EXP_EQUALS {$$ = NULL;}
;
@@ -1143,6 +1274,7 @@ Object
: CompilerDirective {}
| NamedObject {}
| NameSpaceModifier {}
+// | StructureTerm {}
;
PackageList
@@ -1175,7 +1307,8 @@ ParameterTypePackageList
OptionalParameterTypePackage
: {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
- | ',' ParameterTypePackageList {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
+ | ',' ParameterTypePackageList {$$ = TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
;
/* Rules for specifying the types for method arguments */
@@ -1194,17 +1327,22 @@ ParameterTypesPackageList
OptionalParameterTypesPackage
: {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
- | ',' ParameterTypesPackageList {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
+ | ',' ParameterTypesPackageList {$$ = TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
;
/* ACPI 3.0 -- allow semicolons between terms */
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 {$$ = 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);}
;
Term
@@ -1312,29 +1450,37 @@ QWordConst
* 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);}
+ : 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);}
| ByteConst {}
;
WordConstExpr
- : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 2);}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 2);}
+ : 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);}
| WordConst {}
;
DWordConstExpr
- : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 4);}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 4);}
+ : 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);}
| DWordConst {}
;
QWordConstExpr
- : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 8);}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 8);}
+ : 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);}
| QWordConst {}
;
@@ -1355,11 +1501,13 @@ ConstExprTerm
;
Integer
- : PARSEOP_INTEGER {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, AslCompilerlval.i);}
+ : PARSEOP_INTEGER {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER,
+ AslCompilerlval.i);}
;
String
- : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, (ACPI_NATIVE_INT) AslCompilerlval.s);}
+ : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
+ (ACPI_NATIVE_INT) AslCompilerlval.s);}
;
@@ -1400,6 +1548,7 @@ NamedObject
NameSpaceModifier
: AliasTerm {}
| NameTerm {}
+// | NameTermAslPlus {}
| ScopeTerm {}
;
@@ -1413,6 +1562,7 @@ ObjectTypeName
| RefOfTerm {}
| DerefOfTerm {}
| IndexTerm {}
+
/* | MethodInvocationTerm {} */ /* Caused reduce/reduce with Type6Opcode->MethodInvocationTerm */
;
@@ -1478,6 +1628,8 @@ Type2IntegerOpcode /* "Type3" opcodes */
| FromBCDTerm {}
| IncTerm {}
| IndexTerm {}
+// | StructureIndexTerm {}
+// | StructurePointerTerm {}
| LAndTerm {}
| LEqualTerm {}
| LGreaterTerm {}
@@ -1538,6 +1690,8 @@ Type4Opcode
;
*/
+/* Type 5 opcodes are a subset of Type2 opcodes, and return a constant */
+
Type5Opcode
: ResourceTemplateTerm {}
| UnicodeTerm {}
@@ -1550,12 +1704,66 @@ Type6Opcode
| DerefOfTerm {}
| IndexTerm {}
| IndexExpTerm {}
+// | StructureIndexTerm {}
+// | StructurePointerTerm {}
| MethodInvocationTerm {}
;
/*******************************************************************************
*
+ * ASL Helper Terms
+ *
+ ******************************************************************************/
+
+AmlPackageLengthTerm
+ : Integer {$$ = TrUpdateNode (PARSEOP_PACKAGE_LENGTH,
+ (ACPI_PARSE_OBJECT *) $1);}
+ ;
+
+NameStringItem
+ : ',' NameString {$$ = $2;}
+ | ',' error {$$ = AslDoError (); yyclearin;}
+ ;
+
+TermArgItem
+ : ',' TermArg {$$ = $2;}
+ | ',' error {$$ = AslDoError (); yyclearin;}
+ ;
+
+OptionalReference
+ : {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
+ | ',' {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
+ | ',' TermArg {$$ = $2;}
+ ;
+
+OptionalReturnArg
+ : {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO),
+ NODE_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */
+ | TermArg {$$ = $1;}
+ ;
+
+OptionalSerializeRuleKeyword
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' SerializeRuleKeyword {$$ = $2;}
+ ;
+
+OptionalTermArg
+ : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
+ | TermArg {$$ = $1;}
+ ;
+
+OptionalWordConst
+ : {$$ = NULL;}
+ | WordConst {$$ = $1;}
+ ;
+
+
+
+
+/*******************************************************************************
+ *
* ASL Primary Terms
*
******************************************************************************/
@@ -1627,7 +1835,8 @@ BankFieldTerm
',' LockRuleKeyword
',' UpdateRuleKeyword
')' '{'
- FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,7,$4,$5,$6,$8,$10,$12,$15);}
+ FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,7,
+ $4,$5,$6,$8,$10,$12,$15);}
| PARSEOP_BANKFIELD '('
error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
;
@@ -1641,12 +1850,9 @@ BreakPointTerm
;
BufferTerm
- : PARSEOP_BUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER);}
- OptionalBufferLength
- ')' '{'
- BufferTermData '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
- | PARSEOP_BUFFER '('
- error ')' {$$ = AslDoError(); yyclearin;}
+ : PARSEOP_BUFFER {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER);}
+ OptionalDataCount
+ '{' BufferTermData '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5);}
;
BufferTermData
@@ -1674,7 +1880,8 @@ ConcatTerm
;
ConcatResTerm
- : PARSEOP_CONCATENATERESTEMPLATE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONCATENATERESTEMPLATE);}
+ : PARSEOP_CONCATENATERESTEMPLATE '(' {$<n>$ = TrCreateLeafNode (
+ PARSEOP_CONCATENATERESTEMPLATE);}
TermArg
TermArgItem
Target
@@ -1690,10 +1897,11 @@ ConnectionTerm
| PARSEOP_CONNECTION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONNECTION);}
ResourceMacroTerm
')' {$$ = TrLinkChildren ($<n>3, 1,
- TrLinkChildren (TrCreateLeafNode (PARSEOP_RESOURCETEMPLATE), 3,
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
- $4));}
+ TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_RESOURCETEMPLATE), 3,
+ TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
+ TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
+ $4));}
| PARSEOP_CONNECTION '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1715,7 +1923,8 @@ CopyObjectTerm
: PARSEOP_COPYOBJECT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);}
TermArg
',' SimpleTarget
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,TrSetNodeFlags ($6, NODE_IS_TARGET));}
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,
+ TrSetNodeFlags ($6, NODE_IS_TARGET));}
| PARSEOP_COPYOBJECT '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1725,7 +1934,8 @@ CreateBitFieldTerm
TermArg
TermArgItem
NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
+ TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
| PARSEOP_CREATEBITFIELD '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1735,7 +1945,8 @@ CreateByteFieldTerm
TermArg
TermArgItem
NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
+ TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
| PARSEOP_CREATEBYTEFIELD '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1745,7 +1956,8 @@ CreateDWordFieldTerm
TermArg
TermArgItem
NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
+ TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
| PARSEOP_CREATEDWORDFIELD '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1756,7 +1968,8 @@ CreateFieldTerm
TermArgItem
TermArgItem
NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));}
+ ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,
+ TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));}
| PARSEOP_CREATEFIELD '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1766,7 +1979,8 @@ CreateQWordFieldTerm
TermArg
TermArgItem
NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
+ TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
| PARSEOP_CREATEQWORDFIELD '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1776,7 +1990,8 @@ CreateWordFieldTerm
TermArg
TermArgItem
NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
+ TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
| PARSEOP_CREATEWORDFIELD '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1787,7 +2002,8 @@ DataRegionTerm
TermArgItem
TermArgItem
TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$6,$7);}
+ ')' {$$ = TrLinkChildren ($<n>3,4,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$6,$7);}
| PARSEOP_DATATABLEREGION '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1823,7 +2039,8 @@ DeviceTerm
: PARSEOP_DEVICE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);}
NameString
')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
+ TermList '}' {$$ = TrLinkChildren ($<n>3,2,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
| PARSEOP_DEVICE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1878,7 +2095,8 @@ ElseTerm
EventTerm
: PARSEOP_EVENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EVENT);}
NameString
- ')' {$$ = TrLinkChildren ($<n>3,1,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION));}
+ ')' {$$ = TrLinkChildren ($<n>3,1,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION));}
| PARSEOP_EVENT '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1976,7 +2194,8 @@ FunctionTerm
OptionalParameterTypePackage
OptionalParameterTypesPackage
')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,7,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ 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,$9);}
@@ -2001,7 +2220,8 @@ IncludeTerm
;
IncludeEndTerm
- : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafNode (PARSEOP_INCLUDE_END); TrSetCurrentFilename ($$);}
+ : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafNode (PARSEOP_INCLUDE_END);
+ TrSetCurrentFilename ($$);}
;
IncTerm
@@ -2057,7 +2277,8 @@ LGreaterEqualTerm
: PARSEOP_LGREATEREQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
TermArg
TermArgItem
- ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($<n>3,2,$4,$5));}
+ ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1,
+ TrLinkChildren ($<n>3,2,$4,$5));}
| PARSEOP_LGREATEREQUAL '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2075,7 +2296,8 @@ LLessEqualTerm
: PARSEOP_LLESSEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
TermArg
TermArgItem
- ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($<n>3,2,$4,$5));}
+ ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1,
+ TrLinkChildren ($<n>3,2,$4,$5));}
| PARSEOP_LLESSEQUAL '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2093,7 +2315,8 @@ LNotEqualTerm
: PARSEOP_LNOTEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
TermArg
TermArgItem
- ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($<n>3,2,$4,$5));}
+ ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1,
+ TrLinkChildren ($<n>3,2,$4,$5));}
| PARSEOP_LNOTEQUAL '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2170,7 +2393,9 @@ MethodTerm
OptionalParameterTypePackage
OptionalParameterTypesPackage
')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,7,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$7,$8,$9,$10,$13);}
+ TermList '}' {$$ = TrLinkChildren ($<n>3,7,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ $5,$7,$8,$9,$10,$13);}
| PARSEOP_METHOD '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2210,7 +2435,8 @@ MutexTerm
: PARSEOP_MUTEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MUTEX);}
NameString
',' ByteConstExpr
- ')' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
+ ')' {$$ = TrLinkChildren ($<n>3,2,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
| PARSEOP_MUTEX '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2219,7 +2445,8 @@ NameTerm
: PARSEOP_NAME '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAME);}
NameString
',' DataObject
- ')' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
+ ')' {$$ = TrLinkChildren ($<n>3,2,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
| PARSEOP_NAME '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2288,7 +2515,9 @@ OpRegionTerm
',' OpRegionSpaceIdTerm
TermArgItem
TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8);}
+ ')' {$$ = TrLinkChildren ($<n>3,4,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ $6,$7,$8);}
| PARSEOP_OPERATIONREGION '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2309,13 +2538,9 @@ OrTerm
;
PackageTerm
- : PARSEOP_PACKAGE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_VAR_PACKAGE);}
- VarPackageLengthTerm
- ')' '{'
- PackageList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
- | PARSEOP_PACKAGE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
+ : PARSEOP_PACKAGE {$<n>$ = TrCreateLeafNode (PARSEOP_VAR_PACKAGE);}
+ OptionalDataCount
+ '{' PackageList '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5);}
PowerResTerm
: PARSEOP_POWERRESOURCE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_POWERRESOURCE);}
@@ -2323,7 +2548,9 @@ PowerResTerm
',' ByteConstExpr
',' WordConstExpr
')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$8,$11);}
+ TermList '}' {$$ = TrLinkChildren ($<n>3,4,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ $6,$8,$11);}
| PARSEOP_POWERRESOURCE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2351,7 +2578,9 @@ ProcessorTerm
OptionalDWordConstExpr
OptionalByteConstExpr
')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,5,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8,$11);}
+ TermList '}' {$$ = TrLinkChildren ($<n>3,5,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ $6,$7,$8,$11);}
| PARSEOP_PROCESSOR '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2372,7 +2601,8 @@ RawDataBufferTerm
RefOfTerm
: PARSEOP_REFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_REFOF);}
SuperName
- ')' {$$ = TrLinkChildren ($<n>3,1,TrSetNodeFlags ($4, NODE_IS_TARGET));}
+ ')' {$$ = TrLinkChildren ($<n>3,1,
+ TrSetNodeFlags ($4, NODE_IS_TARGET));}
| PARSEOP_REFOF '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2397,7 +2627,10 @@ ReturnTerm
: PARSEOP_RETURN '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RETURN);}
OptionalReturnArg
')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_RETURN {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_RETURN),1,TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_NULL_RETURN));}
+ | PARSEOP_RETURN {$$ = TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_RETURN),1,
+ TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO),
+ NODE_IS_NULL_RETURN));}
| PARSEOP_RETURN '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2406,7 +2639,8 @@ ScopeTerm
: PARSEOP_SCOPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);}
NameString
')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
+ TermList '}' {$$ = TrLinkChildren ($<n>3,2,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
| PARSEOP_SCOPE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2467,7 +2701,8 @@ StoreTerm
: PARSEOP_STORE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STORE);}
TermArg
',' SuperName
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,TrSetNodeFlags ($6, NODE_IS_TARGET));}
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,
+ TrSetNodeFlags ($6, NODE_IS_TARGET));}
| PARSEOP_STORE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2481,6 +2716,7 @@ SubtractTerm
| PARSEOP_SUBTRACT '('
error ')' {$$ = AslDoError(); yyclearin;}
;
+
SwitchTerm
: PARSEOP_SWITCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SWITCH);}
TermArg
@@ -2495,7 +2731,8 @@ ThermalZoneTerm
: PARSEOP_THERMALZONE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);}
NameString
')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
+ TermList '}' {$$ = TrLinkChildren ($<n>3,2,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
| PARSEOP_THERMALZONE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2503,7 +2740,8 @@ ThermalZoneTerm
TimerTerm
: PARSEOP_TIMER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TIMER);}
')' {$$ = TrLinkChildren ($<n>3,0);}
- | PARSEOP_TIMER {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_TIMER),0);}
+ | PARSEOP_TIMER {$$ = TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_TIMER),0);}
| PARSEOP_TIMER '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -2639,59 +2877,6 @@ WhileTerm
;
-/*******************************************************************************
- *
- * ASL Helper Terms
- *
- ******************************************************************************/
-
-AmlPackageLengthTerm
- : Integer {$$ = TrUpdateNode (PARSEOP_PACKAGE_LENGTH,(ACPI_PARSE_OBJECT *) $1);}
- ;
-
-NameStringItem
- : ',' NameString {$$ = $2;}
- | ',' error {$$ = AslDoError (); yyclearin;}
- ;
-
-TermArgItem
- : ',' TermArg {$$ = $2;}
- | ',' error {$$ = AslDoError (); yyclearin;}
- ;
-
-OptionalReference
- : {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
- | ',' {$$ = TrCreateLeafNode (PARSEOP_ZERO);} /* Placeholder is a ZeroOp object */
- | ',' TermArg {$$ = $2;}
- ;
-
-OptionalReturnArg
- : {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */
- | TermArg {$$ = $1;}
- ;
-
-OptionalSerializeRuleKeyword
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' SerializeRuleKeyword {$$ = $2;}
- ;
-
-OptionalTermArg
- : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
- | TermArg {$$ = $1;}
- ;
-
-OptionalBufferLength
- : {$$ = NULL;}
- | TermArg {$$ = $1;}
- ;
-
-OptionalWordConst
- : {$$ = NULL;}
- | WordConst {$$ = $1;}
- ;
-
-
/*******************************************************************************
*
@@ -2731,6 +2916,13 @@ OptionalWordConst
* 13) = += -= *= /= %= <<= >>= &= ^= |=
*/
+
+/*******************************************************************************
+ *
+ * Basic operations for math and logical expressions.
+ *
+ ******************************************************************************/
+
Expression
/* Unary operators */
@@ -2789,33 +2981,43 @@ Expression
| TermArg PARSEOP_EXP_LOGICAL_OR {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
- /* Parentheses */
+ /* Parentheses */
| '(' TermArg ')' { $$ = $2;}
- /* Index term -- "= BUF1[5]" on right-hand side of an equals (source) */
+ /* Index term -- "= BUF1[5]" on right-hand side of an equals (source) */
- | SuperName PARSEOP_EXP_INDEX_LEFT TermArg PARSEOP_EXP_INDEX_RIGHT
- {$$ = TrCreateLeafNode (PARSEOP_INDEX);
+ | SuperName PARSEOP_EXP_INDEX_LEFT
+ TermArg PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX);
TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());}
;
- /* Index term -- "BUF1[5] = " on left-hand side of an equals (target) */
+ /* Index term -- "BUF1[5] = " on left-hand side of an equals (target) */
IndexExpTerm
- : SuperName PARSEOP_EXP_INDEX_LEFT TermArg PARSEOP_EXP_INDEX_RIGHT
- {$$ = TrCreateLeafNode (PARSEOP_INDEX);
+ : SuperName PARSEOP_EXP_INDEX_LEFT
+ TermArg PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX);
TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());}
;
+
+/*******************************************************************************
+ *
+ * All assignment-type operations -- math and logical. Includes simple
+ * assignment and compound assignments.
+ *
+ ******************************************************************************/
+
EqualsTerm
- /* All assignment-type operations */
+ /* Simple Store() operation */
: SuperName PARSEOP_EXP_EQUALS
TermArg {$$ = TrCreateAssignmentNode ($1, $3);}
+ /* Compound assignments -- Add (operand, operand, target) */
+
| TermArg PARSEOP_EXP_ADD_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
@@ -3167,6 +3369,8 @@ XferTypeKeyword
;
+
+
/*******************************************************************************
*
* ASL Resource Template Terms
@@ -3178,15 +3382,20 @@ XferTypeKeyword
* Also, insert the EndTag at the end of the template.
*/
ResourceTemplateTerm
- : PARSEOP_RESOURCETEMPLATE '(' ')'
+ : PARSEOP_RESOURCETEMPLATE OptionalParentheses
'{'
ResourceMacroList '}' {$$ = TrCreateNode (PARSEOP_RESOURCETEMPLATE,4,
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
- $5,
+ $4,
TrCreateLeafNode (PARSEOP_ENDTAG));}
;
+OptionalParentheses
+ : {$$ = NULL;}
+ | '(' ')' {$$ = NULL;}
+ ;
+
ResourceMacroList
: {$$ = NULL;}
| ResourceMacroList
@@ -3261,7 +3470,8 @@ DWordIOTerm
OptionalNameString
OptionalType
OptionalTranslationType_Last
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
| PARSEOP_DWORDIO '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3284,7 +3494,8 @@ DWordMemoryTerm
OptionalNameString
OptionalAddressRange
OptionalType_Last
- ')' {$$ = TrLinkChildren ($<n>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
+ ')' {$$ = TrLinkChildren ($<n>3,16,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
| PARSEOP_DWORDMEMORY '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3305,7 +3516,8 @@ DWordSpaceTerm
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
| PARSEOP_DWORDSPACE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3333,7 +3545,8 @@ ExtendedIOTerm
OptionalNameString
OptionalType
OptionalTranslationType_Last
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
| PARSEOP_EXTENDEDIO '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3355,7 +3568,8 @@ ExtendedMemoryTerm
OptionalNameString
OptionalAddressRange
OptionalType_Last
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
| PARSEOP_EXTENDEDMEMORY '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3375,7 +3589,8 @@ ExtendedSpaceTerm
',' QWordConstExpr
OptionalQWordConstExpr
OptionalNameString_Last
- ')' {$$ = TrLinkChildren ($<n>3,13,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
+ ')' {$$ = TrLinkChildren ($<n>3,13,
+ $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
| PARSEOP_EXTENDEDSPACE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3414,7 +3629,8 @@ GpioIntTerm
OptionalNameString /* 15: DescriptorName */
OptionalBuffer_Last /* 16: VendorData */
')' '{'
- DWordConstExpr '}' {$$ = TrLinkChildren ($<n>3,11,$4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
+ DWordConstExpr '}' {$$ = TrLinkChildren ($<n>3,11,
+ $4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
| PARSEOP_GPIO_INT '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3432,7 +3648,8 @@ GpioIoTerm
OptionalNameString /* 14: DescriptorName */
OptionalBuffer_Last /* 15: VendorData */
')' '{'
- DWordList '}' {$$ = TrLinkChildren ($<n>3,11,$4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
+ DWordList '}' {$$ = TrLinkChildren ($<n>3,11,
+ $4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
| PARSEOP_GPIO_IO '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3448,7 +3665,8 @@ I2cSerialBusTerm
OptionalResourceType /* 12: ResourceType */
OptionalNameString /* 13: DescriptorName */
OptionalBuffer_Last /* 14: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13,
+ ')' {$$ = TrLinkChildren ($<n>3,10,
+ $4,$5,$7,$8,$10,$11,$12,$13,
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$14);}
| PARSEOP_I2C_SERIALBUS '('
error ')' {$$ = AslDoError(); yyclearin;}
@@ -3466,8 +3684,8 @@ I2cSerialBusTermV2
OptionalNameString /* 13: DescriptorName */
OptionalShareType /* 14: Share */
OptionalBuffer_Last /* 15: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13,
- $14,$15);}
+ ')' {$$ = TrLinkChildren ($<n>3,10,
+ $4,$5,$7,$8,$10,$11,$12,$13,$14,$15);}
| PARSEOP_I2C_SERIALBUS_V2 '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3482,7 +3700,8 @@ InterruptTerm
OptionalStringData
OptionalNameString_Last
')' '{'
- DWordList '}' {$$ = TrLinkChildren ($<n>3,8,$4,$6,$8,$9,$10,$11,$12,$15);}
+ DWordList '}' {$$ = TrLinkChildren ($<n>3,8,
+ $4,$6,$8,$9,$10,$11,$12,$15);}
| PARSEOP_INTERRUPT '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3575,7 +3794,8 @@ QWordIOTerm
OptionalNameString
OptionalType
OptionalTranslationType_Last
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
| PARSEOP_QWORDIO '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3598,7 +3818,8 @@ QWordMemoryTerm
OptionalNameString
OptionalAddressRange
OptionalType_Last
- ')' {$$ = TrLinkChildren ($<n>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
+ ')' {$$ = TrLinkChildren ($<n>3,16,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
| PARSEOP_QWORDMEMORY '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3619,7 +3840,8 @@ QWordSpaceTerm
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
| PARSEOP_QWORDSPACE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3652,7 +3874,8 @@ SpiSerialBusTerm
OptionalResourceType /* 19: ResourceType */
OptionalNameString /* 20: DescriptorName */
OptionalBuffer_Last /* 21: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
| PARSEOP_SPI_SERIALBUS '('
error ')' {$$ = AslDoError(); yyclearin;}
@@ -3674,8 +3897,8 @@ SpiSerialBusTermV2
OptionalNameString /* 20: DescriptorName */
OptionalShareType /* 21: Share */
OptionalBuffer_Last /* 22: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
- $21,$22);}
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
| PARSEOP_SPI_SERIALBUS_V2 '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3714,7 +3937,8 @@ UartSerialBusTerm
OptionalResourceType /* 19: ResourceType */
OptionalNameString /* 20: DescriptorName */
OptionalBuffer_Last /* 21: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
| PARSEOP_UART_SERIALBUS '('
error ')' {$$ = AslDoError(); yyclearin;}
@@ -3737,8 +3961,8 @@ UartSerialBusTermV2
OptionalNameString /* 20: DescriptorName */
OptionalShareType /* 21: Share */
OptionalBuffer_Last /* 22: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
- $21,$22);}
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
| PARSEOP_UART_SERIALBUS_V2 '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3775,7 +3999,8 @@ WordBusNumberTerm
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- ')' {$$ = TrLinkChildren ($<n>3,12,$4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
+ ')' {$$ = TrLinkChildren ($<n>3,12,
+ $4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
| PARSEOP_WORDBUSNUMBER '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3797,7 +4022,8 @@ WordIOTerm
OptionalNameString
OptionalType
OptionalTranslationType_Last
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
| PARSEOP_WORDIO '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -3818,27 +4044,13 @@ WordSpaceTerm
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
| PARSEOP_WORDSPACE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
-/******* Object References ***********************************************/
-
-/* Allow IO, DMA, IRQ Resource macro names to also be used as identifiers */
-
-NameString
- : NameSeg {}
- | PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) AslCompilerlval.s);}
- | 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");}
- ;
-
-NameSeg
- : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT) AslCompilerlval.s);}
- ;
/*******************************************************************************
@@ -3848,9 +4060,12 @@ NameSeg
******************************************************************************/
OptionalBusMasterKeyword
- : ',' {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_MASTER);}
- | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_MASTER);}
- | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_NOTMASTER);}
+ : ',' {$$ = TrCreateLeafNode (
+ PARSEOP_BUSMASTERTYPE_MASTER);}
+ | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafNode (
+ PARSEOP_BUSMASTERTYPE_MASTER);}
+ | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafNode (
+ PARSEOP_BUSMASTERTYPE_NOTMASTER);}
;
OptionalAccessAttribTerm
@@ -3861,8 +4076,10 @@ OptionalAccessAttribTerm
;
OptionalAccessSize
- : {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);}
- | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);}
+ : {$$ = TrCreateValuedLeafNode (
+ PARSEOP_BYTECONST, 0);}
+ | ',' {$$ = TrCreateValuedLeafNode (
+ PARSEOP_BYTECONST, 0);}
| ',' ByteConstExpr {$$ = $2;}
;
@@ -3926,8 +4143,12 @@ OptionalIoRestriction
;
OptionalListString
- : {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
- | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
+ : {$$ = TrCreateValuedLeafNode (
+ PARSEOP_STRING_LITERAL,
+ ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
+ | ',' {$$ = TrCreateValuedLeafNode (
+ PARSEOP_STRING_LITERAL,
+ ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
| ',' TermArg {$$ = $2;}
;
@@ -3959,12 +4180,14 @@ OptionalNameString_Last
;
OptionalNameString_First
- : {$$ = TrCreateLeafNode (PARSEOP_ZERO);}
+ : {$$ = TrCreateLeafNode (
+ PARSEOP_ZERO);}
| NameString {$$ = $1;}
;
OptionalObjectTypeKeyword
- : {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);}
+ : {$$ = TrCreateLeafNode (
+ PARSEOP_OBJECTTYPE_UNK);}
| ',' ObjectTypeKeyword {$$ = $2;}
;
@@ -3985,19 +4208,25 @@ OptionalRangeType
;
OptionalReadWriteKeyword
- : {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);}
- | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);}
- | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_READONLY);}
+ : {$$ = TrCreateLeafNode (
+ PARSEOP_READWRITETYPE_BOTH);}
+ | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafNode (
+ PARSEOP_READWRITETYPE_BOTH);}
+ | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafNode (
+ PARSEOP_READWRITETYPE_READONLY);}
;
OptionalResourceType_First
- : {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
+ : {$$ = TrCreateLeafNode (
+ PARSEOP_RESOURCETYPE_CONSUMER);}
| ResourceTypeKeyword {$$ = $1;}
;
OptionalResourceType
- : {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
- | ',' {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
+ : {$$ = TrCreateLeafNode (
+ PARSEOP_RESOURCETYPE_CONSUMER);}
+ | ',' {$$ = TrCreateLeafNode (
+ PARSEOP_RESOURCETYPE_CONSUMER);}
| ',' ResourceTypeKeyword {$$ = $2;}
;
@@ -4057,8 +4286,10 @@ OptionalWordConstExpr
;
OptionalXferSize
- : {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);}
- | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);}
+ : {$$ = TrCreateValuedLeafNode (
+ PARSEOP_XFERSIZE_32, 2);}
+ | ',' {$$ = TrCreateValuedLeafNode (
+ PARSEOP_XFERSIZE_32, 2);}
| ',' XferSizeKeyword {$$ = $2;}
;
diff --git a/src/acpica/source/compiler/aslcstyle.y b/src/acpica/source/compiler/aslcstyle.y
index f510b87..305d60d 100644
--- a/src/acpica/source/compiler/aslcstyle.y
+++ b/src/acpica/source/compiler/aslcstyle.y
@@ -154,6 +154,13 @@ NoEcho('
* 13) = += -= *= /= %= <<= >>= &= ^= |=
*/
+
+/*******************************************************************************
+ *
+ * Basic operations for math and logical expressions.
+ *
+ ******************************************************************************/
+
Expression
/* Unary operators */
@@ -212,33 +219,43 @@ Expression
| TermArg PARSEOP_EXP_LOGICAL_OR {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
TermArg {$$ = TrLinkChildren ($<n>3,2,$1,$4);}
- /* Parentheses */
+ /* Parentheses */
| '(' TermArg ')' { $$ = $2;}
- /* Index term -- "= BUF1[5]" on right-hand side of an equals (source) */
+ /* Index term -- "= BUF1[5]" on right-hand side of an equals (source) */
- | SuperName PARSEOP_EXP_INDEX_LEFT TermArg PARSEOP_EXP_INDEX_RIGHT
- {$$ = TrCreateLeafNode (PARSEOP_INDEX);
+ | SuperName PARSEOP_EXP_INDEX_LEFT
+ TermArg PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX);
TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());}
;
- /* Index term -- "BUF1[5] = " on left-hand side of an equals (target) */
+ /* Index term -- "BUF1[5] = " on left-hand side of an equals (target) */
IndexExpTerm
- : SuperName PARSEOP_EXP_INDEX_LEFT TermArg PARSEOP_EXP_INDEX_RIGHT
- {$$ = TrCreateLeafNode (PARSEOP_INDEX);
+ : SuperName PARSEOP_EXP_INDEX_LEFT
+ TermArg PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX);
TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());}
;
+
+/*******************************************************************************
+ *
+ * All assignment-type operations -- math and logical. Includes simple
+ * assignment and compound assignments.
+ *
+ ******************************************************************************/
+
EqualsTerm
- /* All assignment-type operations */
+ /* Simple Store() operation */
: SuperName PARSEOP_EXP_EQUALS
TermArg {$$ = TrCreateAssignmentNode ($1, $3);}
+ /* Compound assignments -- Add (operand, operand, target) */
+
| TermArg PARSEOP_EXP_ADD_EQ {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
TermArg {$$ = TrLinkChildren ($<n>3,3,$1,$4,
TrSetNodeFlags (TrCreateTargetOperand ($1, NULL), NODE_IS_TARGET));}
diff --git a/src/acpica/source/compiler/aslhelpers.y b/src/acpica/source/compiler/aslhelpers.y
new file mode 100644
index 0000000..ed96eba
--- /dev/null
+++ b/src/acpica/source/compiler/aslhelpers.y
@@ -0,0 +1,358 @@
+NoEcho('
+/******************************************************************************
+ *
+ * Module Name: aslhelpers.y - helper and option terms
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2016, 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.
+ *
+ *****************************************************************************/
+
+')
+
+
+/*******************************************************************************
+ *
+ * ASL Helper Terms
+ *
+ ******************************************************************************/
+
+OptionalBusMasterKeyword
+ : ',' {$$ = TrCreateLeafNode (
+ PARSEOP_BUSMASTERTYPE_MASTER);}
+ | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafNode (
+ PARSEOP_BUSMASTERTYPE_MASTER);}
+ | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafNode (
+ PARSEOP_BUSMASTERTYPE_NOTMASTER);}
+ ;
+
+OptionalAccessAttribTerm
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' ByteConstExpr {$$ = $2;}
+ | ',' AccessAttribKeyword {$$ = $2;}
+ ;
+
+OptionalAccessSize
+ : {$$ = TrCreateValuedLeafNode (
+ PARSEOP_BYTECONST, 0);}
+ | ',' {$$ = TrCreateValuedLeafNode (
+ PARSEOP_BYTECONST, 0);}
+ | ',' ByteConstExpr {$$ = $2;}
+ ;
+
+OptionalAddressingMode
+ : ',' {$$ = NULL;}
+ | ',' AddressingModeKeyword {$$ = $2;}
+ ;
+
+OptionalAddressRange
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' AddressKeyword {$$ = $2;}
+ ;
+
+OptionalBitsPerByte
+ : ',' {$$ = NULL;}
+ | ',' BitsPerByteKeyword {$$ = $2;}
+ ;
+
+OptionalBuffer_Last
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' RawDataBufferTerm {$$ = $2;}
+ ;
+
+OptionalByteConstExpr
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' ByteConstExpr {$$ = $2;}
+ ;
+
+OptionalDecodeType
+ : ',' {$$ = NULL;}
+ | ',' DecodeKeyword {$$ = $2;}
+ ;
+
+OptionalDevicePolarity
+ : ',' {$$ = NULL;}
+ | ',' DevicePolarityKeyword {$$ = $2;}
+ ;
+
+OptionalDWordConstExpr
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' DWordConstExpr {$$ = $2;}
+ ;
+
+OptionalEndian
+ : ',' {$$ = NULL;}
+ | ',' EndianKeyword {$$ = $2;}
+ ;
+
+OptionalFlowControl
+ : ',' {$$ = NULL;}
+ | ',' FlowControlKeyword {$$ = $2;}
+ ;
+
+OptionalIoRestriction
+ : ',' {$$ = NULL;}
+ | ',' IoRestrictionKeyword {$$ = $2;}
+ ;
+
+OptionalListString
+ : {$$ = TrCreateValuedLeafNode (
+ PARSEOP_STRING_LITERAL,
+ ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
+ | ',' {$$ = TrCreateValuedLeafNode (
+ PARSEOP_STRING_LITERAL,
+ ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
+ | ',' TermArg {$$ = $2;}
+ ;
+
+OptionalMaxType
+ : ',' {$$ = NULL;}
+ | ',' MaxKeyword {$$ = $2;}
+ ;
+
+OptionalMemType
+ : ',' {$$ = NULL;}
+ | ',' MemTypeKeyword {$$ = $2;}
+ ;
+
+OptionalMinType
+ : ',' {$$ = NULL;}
+ | ',' MinKeyword {$$ = $2;}
+ ;
+
+OptionalNameString
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' NameString {$$ = $2;}
+ ;
+
+OptionalNameString_Last
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' NameString {$$ = $2;}
+ ;
+
+OptionalNameString_First
+ : {$$ = TrCreateLeafNode (
+ PARSEOP_ZERO);}
+ | NameString {$$ = $1;}
+ ;
+
+OptionalObjectTypeKeyword
+ : {$$ = TrCreateLeafNode (
+ PARSEOP_OBJECTTYPE_UNK);}
+ | ',' ObjectTypeKeyword {$$ = $2;}
+ ;
+
+OptionalParityType
+ : ',' {$$ = NULL;}
+ | ',' ParityTypeKeyword {$$ = $2;}
+ ;
+
+OptionalQWordConstExpr
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' QWordConstExpr {$$ = $2;}
+ ;
+
+OptionalRangeType
+ : ',' {$$ = NULL;}
+ | ',' RangeTypeKeyword {$$ = $2;}
+ ;
+
+OptionalReadWriteKeyword
+ : {$$ = TrCreateLeafNode (
+ PARSEOP_READWRITETYPE_BOTH);}
+ | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafNode (
+ PARSEOP_READWRITETYPE_BOTH);}
+ | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafNode (
+ PARSEOP_READWRITETYPE_READONLY);}
+ ;
+
+OptionalResourceType_First
+ : {$$ = TrCreateLeafNode (
+ PARSEOP_RESOURCETYPE_CONSUMER);}
+ | ResourceTypeKeyword {$$ = $1;}
+ ;
+
+OptionalResourceType
+ : {$$ = TrCreateLeafNode (
+ PARSEOP_RESOURCETYPE_CONSUMER);}
+ | ',' {$$ = TrCreateLeafNode (
+ PARSEOP_RESOURCETYPE_CONSUMER);}
+ | ',' ResourceTypeKeyword {$$ = $2;}
+ ;
+
+OptionalSlaveMode
+ : ',' {$$ = NULL;}
+ | ',' SlaveModeKeyword {$$ = $2;}
+ ;
+
+OptionalShareType
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' ShareTypeKeyword {$$ = $2;}
+ ;
+
+OptionalShareType_First
+ : {$$ = NULL;}
+ | ShareTypeKeyword {$$ = $1;}
+ ;
+
+OptionalStopBits
+ : ',' {$$ = NULL;}
+ | ',' StopBitsKeyword {$$ = $2;}
+ ;
+
+OptionalStringData
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' StringData {$$ = $2;}
+ ;
+
+OptionalTranslationType_Last
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' TranslationKeyword {$$ = $2;}
+ ;
+
+OptionalType
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' TypeKeyword {$$ = $2;}
+ ;
+
+OptionalType_Last
+ : {$$ = NULL;}
+ | ',' {$$ = NULL;}
+ | ',' TypeKeyword {$$ = $2;}
+ ;
+
+OptionalWireMode
+ : ',' {$$ = NULL;}
+ | ',' WireModeKeyword {$$ = $2;}
+ ;
+
+OptionalWordConstExpr
+ : ',' {$$ = NULL;}
+ | ',' WordConstExpr {$$ = $2;}
+ ;
+
+OptionalXferSize
+ : {$$ = TrCreateValuedLeafNode (
+ PARSEOP_XFERSIZE_32, 2);}
+ | ',' {$$ = TrCreateValuedLeafNode (
+ PARSEOP_XFERSIZE_32, 2);}
+ | ',' XferSizeKeyword {$$ = $2;}
+ ;
diff --git a/src/acpica/source/compiler/aslkeywords.y b/src/acpica/source/compiler/aslkeywords.y
new file mode 100644
index 0000000..644a1a1
--- /dev/null
+++ b/src/acpica/source/compiler/aslkeywords.y
@@ -0,0 +1,424 @@
+NoEcho('
+/******************************************************************************
+ *
+ * Module Name: aslkeywords.y - Rules for resource descriptor keywords
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2016, 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.
+ *
+ *****************************************************************************/
+
+')
+
+/*******************************************************************************
+ *
+ * ASL Parameter Keyword Terms
+ *
+ ******************************************************************************/
+
+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_MULTIBYTE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_MULTIBYTE);}
+ ByteConst
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_ACCESSATTRIB_RAW_BYTES '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_BYTES);}
+ ByteConst
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_ACCESSATTRIB_RAW_PROCESS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);}
+ ByteConst
+ ')' {$$ = TrLinkChildren ($<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);}
+ ;
+
+AddressingModeKeyword
+ : PARSEOP_ADDRESSINGMODE_7BIT {$$ = TrCreateLeafNode (PARSEOP_ADDRESSINGMODE_7BIT);}
+ | PARSEOP_ADDRESSINGMODE_10BIT {$$ = TrCreateLeafNode (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);}
+ ;
+
+AddressSpaceKeyword
+ : ByteConst {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
+ | RegionSpaceKeyword {}
+ ;
+
+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);}
+ ;
+
+ClockPhaseKeyword
+ : PARSEOP_CLOCKPHASE_FIRST {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_FIRST);}
+ | PARSEOP_CLOCKPHASE_SECOND {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_SECOND);}
+ ;
+
+ClockPolarityKeyword
+ : PARSEOP_CLOCKPOLARITY_LOW {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_LOW);}
+ | PARSEOP_CLOCKPOLARITY_HIGH {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_HIGH);}
+ ;
+
+DecodeKeyword
+ : PARSEOP_DECODETYPE_POS {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_POS);}
+ | PARSEOP_DECODETYPE_SUB {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_SUB);}
+ ;
+
+DevicePolarityKeyword
+ : PARSEOP_DEVICEPOLARITY_LOW {$$ = TrCreateLeafNode (PARSEOP_DEVICEPOLARITY_LOW);}
+ | PARSEOP_DEVICEPOLARITY_HIGH {$$ = TrCreateLeafNode (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);}
+ ;
+
+EndianKeyword
+ : PARSEOP_ENDIAN_LITTLE {$$ = TrCreateLeafNode (PARSEOP_ENDIAN_LITTLE);}
+ | PARSEOP_ENDIAN_BIG {$$ = TrCreateLeafNode (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);}
+ ;
+
+InterruptLevel
+ : PARSEOP_INTLEVEL_ACTIVEBOTH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEBOTH);}
+ | PARSEOP_INTLEVEL_ACTIVEHIGH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEHIGH);}
+ | PARSEOP_INTLEVEL_ACTIVELOW {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVELOW);}
+ ;
+
+InterruptTypeKeyword
+ : PARSEOP_INTTYPE_EDGE {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_EDGE);}
+ | PARSEOP_INTTYPE_LEVEL {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_LEVEL);}
+ ;
+
+IODecodeKeyword
+ : PARSEOP_IODECODETYPE_16 {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_16);}
+ | PARSEOP_IODECODETYPE_10 {$$ = TrCreateLeafNode (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);}
+ ;
+
+LockRuleKeyword
+ : PARSEOP_LOCKRULE_LOCK {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_LOCK);}
+ | PARSEOP_LOCKRULE_NOLOCK {$$ = TrCreateLeafNode (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);}
+ ;
+
+MaxKeyword
+ : PARSEOP_MAXTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_FIXED);}
+ | PARSEOP_MAXTYPE_NOTFIXED {$$ = TrCreateLeafNode (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);}
+ ;
+
+MinKeyword
+ : PARSEOP_MINTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_FIXED);}
+ | PARSEOP_MINTYPE_NOTFIXED {$$ = TrCreateLeafNode (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);}
+ ;
+
+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);}
+ ;
+
+PinConfigByte
+ : PinConfigKeyword {$$ = $1;}
+ | ByteConstExpr {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
+ ;
+
+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);}
+ ;
+
+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);}
+ ;
+
+RangeTypeKeyword
+ : PARSEOP_RANGETYPE_ISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ISAONLY);}
+ | PARSEOP_RANGETYPE_NONISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_NONISAONLY);}
+ | PARSEOP_RANGETYPE_ENTIRE {$$ = TrCreateLeafNode (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);}
+ ;
+
+ResourceTypeKeyword
+ : PARSEOP_RESOURCETYPE_CONSUMER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
+ | PARSEOP_RESOURCETYPE_PRODUCER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_PRODUCER);}
+ ;
+
+SerializeRuleKeyword
+ : PARSEOP_SERIALIZERULE_SERIAL {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_SERIAL);}
+ | PARSEOP_SERIALIZERULE_NOTSERIAL {$$ = TrCreateLeafNode (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);}
+ ;
+
+SlaveModeKeyword
+ : PARSEOP_SLAVEMODE_CONTROLLERINIT {$$ = TrCreateLeafNode (PARSEOP_SLAVEMODE_CONTROLLERINIT);}
+ | PARSEOP_SLAVEMODE_DEVICEINIT {$$ = TrCreateLeafNode (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);}
+ ;
+
+TranslationKeyword
+ : PARSEOP_TRANSLATIONTYPE_SPARSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_SPARSE);}
+ | PARSEOP_TRANSLATIONTYPE_DENSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_DENSE);}
+ ;
+
+TypeKeyword
+ : PARSEOP_TYPE_TRANSLATION {$$ = TrCreateLeafNode (PARSEOP_TYPE_TRANSLATION);}
+ | PARSEOP_TYPE_STATIC {$$ = TrCreateLeafNode (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);}
+ ;
+
+WireModeKeyword
+ : PARSEOP_WIREMODE_FOUR {$$ = TrCreateLeafNode (PARSEOP_WIREMODE_FOUR);}
+ | PARSEOP_WIREMODE_THREE {$$ = TrCreateLeafNode (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);}
+ ;
+
+XferTypeKeyword
+ : PARSEOP_XFERTYPE_8 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8);}
+ | PARSEOP_XFERTYPE_8_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8_16);}
+ | PARSEOP_XFERTYPE_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_16);}
+ ;
diff --git a/src/acpica/source/compiler/aslmain.c b/src/acpica/source/compiler/aslmain.c
index 671c76f..4233ad3 100644
--- a/src/acpica/source/compiler/aslmain.c
+++ b/src/acpica/source/compiler/aslmain.c
@@ -169,8 +169,6 @@ Usage (
printf ("\nGeneral:\n");
ACPI_OPTION ("-@ <file>", "Specify command file");
ACPI_OPTION ("-I <dir>", "Specify additional include directory");
- ACPI_OPTION ("-T <sig list>|ALL", "Create ACPI table template/example files");
- ACPI_OPTION ("-T <count>", "Emit DSDT and <count> SSDTs to same file");
ACPI_OPTION ("-p <prefix>", "Specify path/filename prefix for all output files");
ACPI_OPTION ("-v", "Display compiler version");
ACPI_OPTION ("-vo", "Enable optimization comments");
@@ -195,7 +193,7 @@ Usage (
ACPI_OPTION ("-vi", "Less verbose errors and warnings for use with IDEs");
ACPI_OPTION ("-vr", "Disable remarks");
ACPI_OPTION ("-vw <messageid>", "Disable specific warning or remark");
- ACPI_OPTION ("-w1 -w2 -w3", "Set warning reporting level");
+ ACPI_OPTION ("-w <1|2|3>", "Set warning reporting level");
ACPI_OPTION ("-we", "Report warnings as errors");
printf ("\nAML Code Generation (*.aml):\n");
@@ -208,21 +206,31 @@ Usage (
ACPI_OPTION ("-in", "Ignore NoOp operators");
ACPI_OPTION ("-r <revision>", "Override table header Revision (1-255)");
- printf ("\nOptional Source Code Output Files:\n");
- ACPI_OPTION ("-sc -sa", "Create source file in C or assembler (*.c or *.asm)");
- ACPI_OPTION ("-ic -ia", "Create include file in C or assembler (*.h or *.inc)");
- ACPI_OPTION ("-tc -ta -ts", "Create hex AML table in C, assembler, or ASL (*.hex)");
- ACPI_OPTION ("-so", "Create offset table in C (*.offset.h)");
-
- printf ("\nOptional Listing Files:\n");
+ printf ("\nListings:\n");
ACPI_OPTION ("-l", "Create mixed listing file (ASL source and AML) (*.lst)");
ACPI_OPTION ("-lm", "Create hardware summary map file (*.map)");
ACPI_OPTION ("-ln", "Create namespace file (*.nsp)");
ACPI_OPTION ("-ls", "Create combined source file (expanded includes) (*.src)");
ACPI_OPTION ("-lx", "Create cross-reference file (*.xrf)");
+ printf ("\nFirmware Support - C Output:\n");
+ ACPI_OPTION ("-tc", "Create hex AML table in C (*.hex)");
+ ACPI_OPTION ("-sc", "Create named hex AML arrays in C (*.c)");
+ ACPI_OPTION ("-ic", "Create include file in C for -sc symbols (*.h)");
+ ACPI_OPTION ("-so", "Create namespace AML offset table in C (*.offset.h)");
+
+ printf ("\nFirmware Support - Assembler Output:\n");
+ ACPI_OPTION ("-ta", "Create hex AML table in assembler (*.hex)");
+ ACPI_OPTION ("-sa", "Create named hex AML arrays in assembler (*.asm)");
+ ACPI_OPTION ("-ia", "Create include file in assembler for -sa symbols (*.inc)");
+
+ printf ("\nFirmware Support - ASL Output:\n");
+ ACPI_OPTION ("-ts", "Create hex AML table in ASL (Buffer object) (*.hex)");
+
printf ("\nData Table Compiler:\n");
ACPI_OPTION ("-G", "Compile custom table that contains generic operators");
+ ACPI_OPTION ("-T <sig list>|ALL", "Create ACPI table template/example files");
+ ACPI_OPTION ("-T <count>", "Emit DSDT and <count> SSDTs to same file");
ACPI_OPTION ("-vt", "Create verbose template files (full disassembly)");
printf ("\nAML Disassembler:\n");
diff --git a/src/acpica/source/compiler/aslparser.y b/src/acpica/source/compiler/aslparser.y
index 1d6210b..cca976b 100644
--- a/src/acpica/source/compiler/aslparser.y
+++ b/src/acpica/source/compiler/aslparser.y
@@ -138,6 +138,7 @@ void *
AslLocalAllocate (
unsigned int Size);
+
/* Bison/yacc configuration */
#define static
@@ -171,7 +172,7 @@ AslLocalAllocate (
* These shift/reduce conflicts are expected. There should be zero
* reduce/reduce conflicts.
*/
-%expect 101
+%expect 102
/*! [Begin] no source code translation */
@@ -194,8 +195,11 @@ m4_include(asltypes.y)
/* Production rules */
m4_include(aslrules.y)
+m4_include(aslprimaries.y)
m4_include(aslcstyle.y)
+m4_include(aslkeywords.y)
m4_include(aslresources.y)
+m4_include(aslhelpers.y)
%%
/*! [End] no source code translation !*/
diff --git a/src/acpica/source/compiler/aslprimaries.y b/src/acpica/source/compiler/aslprimaries.y
new file mode 100644
index 0000000..605c889
--- /dev/null
+++ b/src/acpica/source/compiler/aslprimaries.y
@@ -0,0 +1,1232 @@
+NoEcho('
+/******************************************************************************
+ *
+ * Module Name: aslprimaries.y - Rules for primary ASL operators
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2016, 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.
+ *
+ *****************************************************************************/
+
+')
+
+
+/*******************************************************************************
+ *
+ * ASL Primary Terms
+ *
+ ******************************************************************************/
+
+AccessAsTerm
+ : PARSEOP_ACCESSAS '('
+ AccessTypeKeyword
+ OptionalAccessAttribTerm
+ ')' {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);}
+ | PARSEOP_ACCESSAS '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+AcquireTerm
+ : PARSEOP_ACQUIRE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACQUIRE);}
+ SuperName
+ ',' WordConstExpr
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$6);}
+ | PARSEOP_ACQUIRE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+AddTerm
+ : PARSEOP_ADD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_ADD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+AliasTerm
+ : PARSEOP_ALIAS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ALIAS);}
+ NameString
+ NameStringItem
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,
+ TrSetNodeFlags ($5, NODE_IS_NAME_DECLARATION));}
+ | PARSEOP_ALIAS '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+AndTerm
+ : PARSEOP_AND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_AND '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+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);}
+ ;
+
+BankFieldTerm
+ : PARSEOP_BANKFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_BANKFIELD);}
+ NameString
+ NameStringItem
+ TermArgItem
+ ',' AccessTypeKeyword
+ ',' LockRuleKeyword
+ ',' UpdateRuleKeyword
+ ')' '{'
+ FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,7,
+ $4,$5,$6,$8,$10,$12,$15);}
+ | PARSEOP_BANKFIELD '('
+ error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
+ ;
+
+BreakTerm
+ : PARSEOP_BREAK {$$ = TrCreateNode (PARSEOP_BREAK, 0);}
+ ;
+
+BreakPointTerm
+ : PARSEOP_BREAKPOINT {$$ = TrCreateNode (PARSEOP_BREAKPOINT, 0);}
+ ;
+
+BufferTerm
+ : PARSEOP_BUFFER {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER);}
+ OptionalDataCount
+ '{' BufferTermData '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5);}
+ ;
+
+BufferTermData
+ : ByteList {}
+ | StringData {}
+ ;
+
+CaseTerm
+ : PARSEOP_CASE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CASE);}
+ DataObject
+ ')' '{'
+ TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ | PARSEOP_CASE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ConcatTerm
+ : PARSEOP_CONCATENATE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONCATENATE);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_CONCATENATE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ConcatResTerm
+ : PARSEOP_CONCATENATERESTEMPLATE '(' {$<n>$ = TrCreateLeafNode (
+ PARSEOP_CONCATENATERESTEMPLATE);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_CONCATENATERESTEMPLATE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ConnectionTerm
+ : PARSEOP_CONNECTION '('
+ NameString
+ ')' {$$ = TrCreateNode (PARSEOP_CONNECTION,1,$3);}
+ | PARSEOP_CONNECTION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONNECTION);}
+ ResourceMacroTerm
+ ')' {$$ = TrLinkChildren ($<n>3, 1,
+ TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_RESOURCETEMPLATE), 3,
+ TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
+ TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
+ $4));}
+ | PARSEOP_CONNECTION '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+CondRefOfTerm
+ : PARSEOP_CONDREFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONDREFOF);}
+ SuperName
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_CONDREFOF '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ContinueTerm
+ : PARSEOP_CONTINUE {$$ = TrCreateNode (PARSEOP_CONTINUE, 0);}
+ ;
+
+CopyObjectTerm
+ : PARSEOP_COPYOBJECT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);}
+ TermArg
+ ',' SimpleTarget
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,
+ TrSetNodeFlags ($6, NODE_IS_TARGET));}
+ | PARSEOP_COPYOBJECT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+CreateBitFieldTerm
+ : PARSEOP_CREATEBITFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);}
+ TermArg
+ TermArgItem
+ NameStringItem
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
+ TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ | PARSEOP_CREATEBITFIELD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+CreateByteFieldTerm
+ : PARSEOP_CREATEBYTEFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);}
+ TermArg
+ TermArgItem
+ NameStringItem
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
+ TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ | PARSEOP_CREATEBYTEFIELD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+CreateDWordFieldTerm
+ : PARSEOP_CREATEDWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);}
+ TermArg
+ TermArgItem
+ NameStringItem
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
+ TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ | PARSEOP_CREATEDWORDFIELD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+CreateFieldTerm
+ : PARSEOP_CREATEFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);}
+ TermArg
+ TermArgItem
+ TermArgItem
+ NameStringItem
+ ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,
+ TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));}
+ | PARSEOP_CREATEFIELD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+CreateQWordFieldTerm
+ : PARSEOP_CREATEQWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);}
+ TermArg
+ TermArgItem
+ NameStringItem
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
+ TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ | PARSEOP_CREATEQWORDFIELD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+CreateWordFieldTerm
+ : PARSEOP_CREATEWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);}
+ TermArg
+ TermArgItem
+ NameStringItem
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
+ TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
+ | PARSEOP_CREATEWORDFIELD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+DataRegionTerm
+ : PARSEOP_DATATABLEREGION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);}
+ NameString
+ TermArgItem
+ TermArgItem
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,4,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$6,$7);}
+ | PARSEOP_DATATABLEREGION '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+DebugTerm
+ : PARSEOP_DEBUG {$$ = TrCreateLeafNode (PARSEOP_DEBUG);}
+ ;
+
+DecTerm
+ : PARSEOP_DECREMENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DECREMENT);}
+ SuperName
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_DECREMENT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+DefaultTerm
+ : PARSEOP_DEFAULT '{' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFAULT);}
+ TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_DEFAULT '{'
+ error '}' {$$ = AslDoError(); yyclearin;}
+ ;
+
+DerefOfTerm
+ : PARSEOP_DEREFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEREFOF);}
+ TermArg
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_DEREFOF '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+DeviceTerm
+ : PARSEOP_DEVICE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);}
+ NameString
+ ')' '{'
+ TermList '}' {$$ = TrLinkChildren ($<n>3,2,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
+ | PARSEOP_DEVICE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+DivideTerm
+ : PARSEOP_DIVIDE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
+ TermArg
+ TermArgItem
+ Target
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
+ | PARSEOP_DIVIDE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+EISAIDTerm
+ : PARSEOP_EISAID '('
+ StringData ')' {$$ = TrUpdateNode (PARSEOP_EISAID, $3);}
+ | PARSEOP_EISAID '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ElseIfTerm
+ : IfTerm ElseTerm {$$ = TrLinkPeerNode ($1,$2);}
+ ;
+
+ElseTerm
+ : {$$ = NULL;}
+ | PARSEOP_ELSE '{' {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
+ TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);}
+
+ | PARSEOP_ELSE '{'
+ error '}' {$$ = AslDoError(); yyclearin;}
+
+ | PARSEOP_ELSE
+ error {$$ = AslDoError(); yyclearin;}
+
+ | PARSEOP_ELSEIF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
+ TermArg {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
+ ')' '{'
+ TermList '}' {TrLinkChildren ($<n>5,2,$4,$8);}
+ ElseTerm {TrLinkPeerNode ($<n>5,$11);}
+ {$$ = TrLinkChildren ($<n>3,1,$<n>5);}
+
+ | PARSEOP_ELSEIF '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+
+ | PARSEOP_ELSEIF
+ error {$$ = AslDoError(); yyclearin;}
+ ;
+
+EventTerm
+ : PARSEOP_EVENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EVENT);}
+ NameString
+ ')' {$$ = TrLinkChildren ($<n>3,1,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION));}
+ | PARSEOP_EVENT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ExternalTerm
+ : PARSEOP_EXTERNAL '('
+ NameString
+ OptionalObjectTypeKeyword
+ OptionalParameterTypePackage
+ OptionalParameterTypesPackage
+ ')' {$$ = TrCreateNode (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);}
+ | PARSEOP_EXTERNAL '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+FatalTerm
+ : PARSEOP_FATAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FATAL);}
+ ByteConstExpr
+ ',' DWordConstExpr
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
+ | PARSEOP_FATAL '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+FieldTerm
+ : PARSEOP_FIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FIELD);}
+ NameString
+ ',' AccessTypeKeyword
+ ',' LockRuleKeyword
+ ',' UpdateRuleKeyword
+ ')' '{'
+ FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$8,$10,$13);}
+ | PARSEOP_FIELD '('
+ error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
+ ;
+
+FindSetLeftBitTerm
+ : PARSEOP_FINDSETLEFTBIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETLEFTBIT);}
+ TermArg
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_FINDSETLEFTBIT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+FindSetRightBitTerm
+ : PARSEOP_FINDSETRIGHTBIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETRIGHTBIT);}
+ TermArg
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_FINDSETRIGHTBIT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ /* Convert a For() loop to a While() loop */
+ForTerm
+ : PARSEOP_FOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
+ OptionalTermArg ',' {}
+ OptionalPredicate ','
+ OptionalTermArg {$<n>$ = TrLinkPeerNode ($4,$<n>3);
+ TrSetParent ($9,$<n>3);} /* New parent is WHILE */
+ ')' '{' TermList '}' {$<n>$ = TrLinkChildren ($<n>3,2,$7,$13);}
+ {$<n>$ = TrLinkPeerNode ($13,$9);
+ $$ = $<n>10;}
+ ;
+
+OptionalPredicate
+ : {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, 1);}
+ | TermArg {$$ = $1;}
+ ;
+
+FprintfTerm
+ : PARSEOP_FPRINTF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FPRINTF);}
+ TermArg ','
+ StringData
+ PrintfArgList
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
+ | PARSEOP_FPRINTF '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+FromBCDTerm
+ : PARSEOP_FROMBCD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FROMBCD);}
+ TermArg
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_FROMBCD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+FunctionTerm
+ : PARSEOP_FUNCTION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD);}
+ NameString
+ OptionalParameterTypePackage
+ OptionalParameterTypesPackage
+ ')' '{'
+ 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,$9);}
+ | PARSEOP_FUNCTION '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+IfTerm
+ : PARSEOP_IF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
+ TermArg
+ ')' '{'
+ TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+
+ | PARSEOP_IF '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+IncludeTerm
+ : PARSEOP_INCLUDE '('
+ String ')' {$$ = TrUpdateNode (PARSEOP_INCLUDE, $3);
+ FlOpenIncludeFile ($3);}
+ ;
+
+IncludeEndTerm
+ : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafNode (PARSEOP_INCLUDE_END);
+ TrSetCurrentFilename ($$);}
+ ;
+
+IncTerm
+ : PARSEOP_INCREMENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
+ SuperName
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_INCREMENT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+IndexFieldTerm
+ : PARSEOP_INDEXFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INDEXFIELD);}
+ NameString
+ NameStringItem
+ ',' AccessTypeKeyword
+ ',' LockRuleKeyword
+ ',' UpdateRuleKeyword
+ ')' '{'
+ FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$7,$9,$11,$14);}
+ | PARSEOP_INDEXFIELD '('
+ error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
+ ;
+
+IndexTerm
+ : PARSEOP_INDEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INDEX);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_INDEX '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+LAndTerm
+ : PARSEOP_LAND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LAND);}
+ TermArg
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_LAND '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+LEqualTerm
+ : PARSEOP_LEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
+ TermArg
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_LEQUAL '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+LGreaterEqualTerm
+ : PARSEOP_LGREATEREQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
+ TermArg
+ TermArgItem
+ ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1,
+ TrLinkChildren ($<n>3,2,$4,$5));}
+ | PARSEOP_LGREATEREQUAL '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+LGreaterTerm
+ : PARSEOP_LGREATER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
+ TermArg
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_LGREATER '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+LLessEqualTerm
+ : PARSEOP_LLESSEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
+ TermArg
+ TermArgItem
+ ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1,
+ TrLinkChildren ($<n>3,2,$4,$5));}
+ | PARSEOP_LLESSEQUAL '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+LLessTerm
+ : PARSEOP_LLESS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
+ TermArg
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_LLESS '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+LNotEqualTerm
+ : PARSEOP_LNOTEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
+ TermArg
+ TermArgItem
+ ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1,
+ TrLinkChildren ($<n>3,2,$4,$5));}
+ | PARSEOP_LNOTEQUAL '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+LNotTerm
+ : PARSEOP_LNOT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
+ TermArg
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_LNOT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+LoadTableTerm
+ : PARSEOP_LOADTABLE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOADTABLE);}
+ TermArg
+ TermArgItem
+ TermArgItem
+ OptionalListString
+ OptionalListString
+ OptionalReference
+ ')' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);}
+ | PARSEOP_LOADTABLE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+LoadTerm
+ : PARSEOP_LOAD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOAD);}
+ NameString
+ RequiredTarget
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_LOAD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+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);}
+ ;
+
+LOrTerm
+ : PARSEOP_LOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
+ TermArg
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_LOR '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+MatchTerm
+ : PARSEOP_MATCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MATCH);}
+ TermArg
+ ',' MatchOpKeyword
+ TermArgItem
+ ',' MatchOpKeyword
+ TermArgItem
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);}
+ | PARSEOP_MATCH '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+MethodTerm
+ : PARSEOP_METHOD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD);}
+ NameString
+ OptionalByteConstExpr {UtCheckIntegerRange ($5, 0, 7);}
+ OptionalSerializeRuleKeyword
+ OptionalByteConstExpr
+ OptionalParameterTypePackage
+ OptionalParameterTypesPackage
+ ')' '{'
+ TermList '}' {$$ = TrLinkChildren ($<n>3,7,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ $5,$7,$8,$9,$10,$13);}
+ | PARSEOP_METHOD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+MidTerm
+ : PARSEOP_MID '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MID);}
+ TermArg
+ TermArgItem
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
+ | PARSEOP_MID '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ModTerm
+ : PARSEOP_MOD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_MOD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+MultiplyTerm
+ : PARSEOP_MULTIPLY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_MULTIPLY '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+MutexTerm
+ : PARSEOP_MUTEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MUTEX);}
+ NameString
+ ',' ByteConstExpr
+ ')' {$$ = TrLinkChildren ($<n>3,2,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
+ | PARSEOP_MUTEX '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+NameTerm
+ : PARSEOP_NAME '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAME);}
+ NameString
+ ',' DataObject
+ ')' {$$ = TrLinkChildren ($<n>3,2,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
+ | PARSEOP_NAME '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+NAndTerm
+ : PARSEOP_NAND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAND);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_NAND '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+NoOpTerm
+ : PARSEOP_NOOP {$$ = TrCreateNode (PARSEOP_NOOP, 0);}
+ ;
+
+NOrTerm
+ : PARSEOP_NOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOR);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_NOR '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+NotifyTerm
+ : PARSEOP_NOTIFY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOTIFY);}
+ SuperName
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_NOTIFY '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+NotTerm
+ : PARSEOP_NOT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
+ TermArg
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_NOT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ObjectTypeTerm
+ : PARSEOP_OBJECTTYPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);}
+ ObjectTypeName
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_OBJECTTYPE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+OffsetTerm
+ : PARSEOP_OFFSET '('
+ AmlPackageLengthTerm
+ ')' {$$ = TrCreateNode (PARSEOP_OFFSET,1,$3);}
+ | PARSEOP_OFFSET '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+OpRegionTerm
+ : PARSEOP_OPERATIONREGION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OPERATIONREGION);}
+ NameString
+ ',' OpRegionSpaceIdTerm
+ TermArgItem
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,4,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ $6,$7,$8);}
+ | PARSEOP_OPERATIONREGION '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+OpRegionSpaceIdTerm
+ : RegionSpaceKeyword {}
+ | ByteConst {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
+ ;
+
+OrTerm
+ : PARSEOP_OR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_OR '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+PackageTerm
+ : PARSEOP_PACKAGE {$<n>$ = TrCreateLeafNode (PARSEOP_VAR_PACKAGE);}
+ OptionalDataCount
+ '{' PackageList '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5);}
+
+PowerResTerm
+ : PARSEOP_POWERRESOURCE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_POWERRESOURCE);}
+ NameString
+ ',' ByteConstExpr
+ ',' WordConstExpr
+ ')' '{'
+ TermList '}' {$$ = TrLinkChildren ($<n>3,4,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ $6,$8,$11);}
+ | PARSEOP_POWERRESOURCE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+PrintfTerm
+ : PARSEOP_PRINTF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_PRINTF);}
+ StringData
+ PrintfArgList
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_PRINTF '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+PrintfArgList
+ : {$$ = NULL;}
+ | TermArg {$$ = $1;}
+ | PrintfArgList ','
+ TermArg {$$ = TrLinkPeerNode ($1, $3);}
+ ;
+
+ProcessorTerm
+ : PARSEOP_PROCESSOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_PROCESSOR);}
+ NameString
+ ',' ByteConstExpr
+ OptionalDWordConstExpr
+ OptionalByteConstExpr
+ ')' '{'
+ TermList '}' {$$ = TrLinkChildren ($<n>3,5,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
+ $6,$7,$8,$11);}
+ | PARSEOP_PROCESSOR '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+RawDataBufferTerm
+ : PARSEOP_DATABUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DATABUFFER);}
+ OptionalWordConst
+ ')' '{'
+ ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ | PARSEOP_DATABUFFER '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+/*
+ * In RefOf, the node isn't really a target, but we can't keep track of it after
+ * we've taken a pointer to it. (hard to tell if a local becomes initialized this way.)
+ */
+RefOfTerm
+ : PARSEOP_REFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_REFOF);}
+ SuperName
+ ')' {$$ = TrLinkChildren ($<n>3,1,
+ TrSetNodeFlags ($4, NODE_IS_TARGET));}
+ | PARSEOP_REFOF '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ReleaseTerm
+ : PARSEOP_RELEASE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RELEASE);}
+ SuperName
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_RELEASE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ResetTerm
+ : PARSEOP_RESET '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RESET);}
+ SuperName
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_RESET '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ReturnTerm
+ : PARSEOP_RETURN '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RETURN);}
+ OptionalReturnArg
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_RETURN {$$ = TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_RETURN),1,
+ TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO),
+ NODE_IS_NULL_RETURN));}
+ | PARSEOP_RETURN '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ScopeTerm
+ : PARSEOP_SCOPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);}
+ NameString
+ ')' '{'
+ TermList '}' {$$ = TrLinkChildren ($<n>3,2,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
+ | PARSEOP_SCOPE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ShiftLeftTerm
+ : PARSEOP_SHIFTLEFT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_SHIFTLEFT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ShiftRightTerm
+ : PARSEOP_SHIFTRIGHT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_SHIFTRIGHT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+SignalTerm
+ : PARSEOP_SIGNAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SIGNAL);}
+ SuperName
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_SIGNAL '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+SizeOfTerm
+ : PARSEOP_SIZEOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SIZEOF);}
+ SuperName
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_SIZEOF '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+SleepTerm
+ : PARSEOP_SLEEP '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SLEEP);}
+ TermArg
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_SLEEP '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+StallTerm
+ : PARSEOP_STALL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STALL);}
+ TermArg
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_STALL '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+StoreTerm
+ : PARSEOP_STORE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STORE);}
+ TermArg
+ ',' SuperName
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,
+ TrSetNodeFlags ($6, NODE_IS_TARGET));}
+ | PARSEOP_STORE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+SubtractTerm
+ : PARSEOP_SUBTRACT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_SUBTRACT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+SwitchTerm
+ : PARSEOP_SWITCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SWITCH);}
+ TermArg
+ ')' '{'
+ CaseDefaultTermList '}'
+ {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ | PARSEOP_SWITCH '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ThermalZoneTerm
+ : PARSEOP_THERMALZONE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);}
+ NameString
+ ')' '{'
+ TermList '}' {$$ = TrLinkChildren ($<n>3,2,
+ TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
+ | PARSEOP_THERMALZONE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+TimerTerm
+ : PARSEOP_TIMER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TIMER);}
+ ')' {$$ = TrLinkChildren ($<n>3,0);}
+ | PARSEOP_TIMER {$$ = TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_TIMER),0);}
+ | PARSEOP_TIMER '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ToBCDTerm
+ : PARSEOP_TOBCD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOBCD);}
+ TermArg
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_TOBCD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ToBufferTerm
+ : PARSEOP_TOBUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOBUFFER);}
+ TermArg
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_TOBUFFER '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ToDecimalStringTerm
+ : PARSEOP_TODECIMALSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TODECIMALSTRING);}
+ TermArg
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_TODECIMALSTRING '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ToHexStringTerm
+ : PARSEOP_TOHEXSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOHEXSTRING);}
+ TermArg
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_TOHEXSTRING '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ToIntegerTerm
+ : PARSEOP_TOINTEGER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOINTEGER);}
+ TermArg
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_TOINTEGER '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ToPLDTerm
+ : PARSEOP_TOPLD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOPLD);}
+ PldKeywordList
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_TOPLD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+PldKeywordList
+ : {$$ = NULL;}
+ | PldKeyword
+ PARSEOP_EXP_EQUALS Integer {$$ = TrLinkChildren ($1,1,$3);}
+ | PldKeyword
+ PARSEOP_EXP_EQUALS String {$$ = TrLinkChildren ($1,1,$3);}
+ | PldKeywordList ',' /* Allows a trailing comma at list end */
+ | PldKeywordList ','
+ PldKeyword
+ PARSEOP_EXP_EQUALS Integer {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
+ | PldKeywordList ','
+ PldKeyword
+ PARSEOP_EXP_EQUALS String {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
+ ;
+
+
+ToStringTerm
+ : PARSEOP_TOSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOSTRING);}
+ TermArg
+ OptionalCount
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_TOSTRING '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+ToUUIDTerm
+ : PARSEOP_TOUUID '('
+ StringData ')' {$$ = TrUpdateNode (PARSEOP_TOUUID, $3);}
+ | PARSEOP_TOUUID '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+UnicodeTerm
+ : PARSEOP_UNICODE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UNICODE);}
+ StringData
+ ')' {$$ = TrLinkChildren ($<n>3,2,0,$4);}
+ | PARSEOP_UNICODE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+UnloadTerm
+ : PARSEOP_UNLOAD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UNLOAD);}
+ SuperName
+ ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
+ | PARSEOP_UNLOAD '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+WaitTerm
+ : PARSEOP_WAIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WAIT);}
+ SuperName
+ TermArgItem
+ ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
+ | PARSEOP_WAIT '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+XOrTerm
+ : PARSEOP_XOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
+ TermArg
+ TermArgItem
+ Target
+ ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
+ | PARSEOP_XOR '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
+
+WhileTerm
+ : PARSEOP_WHILE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
+ TermArg
+ ')' '{' TermList '}'
+ {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
+ | PARSEOP_WHILE '('
+ error ')' {$$ = AslDoError(); yyclearin;}
+ ;
diff --git a/src/acpica/source/compiler/aslresources.y b/src/acpica/source/compiler/aslresources.y
index d3dbe99..9f5fb02 100644
--- a/src/acpica/source/compiler/aslresources.y
+++ b/src/acpica/source/compiler/aslresources.y
@@ -116,313 +116,6 @@ NoEcho('
')
-/*******************************************************************************
- *
- * ASL Parameter Keyword Terms
- *
- ******************************************************************************/
-
-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_MULTIBYTE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_MULTIBYTE);}
- ByteConst
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_ACCESSATTRIB_RAW_BYTES '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_BYTES);}
- ByteConst
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_ACCESSATTRIB_RAW_PROCESS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);}
- ByteConst
- ')' {$$ = TrLinkChildren ($<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);}
- ;
-
-AddressingModeKeyword
- : PARSEOP_ADDRESSINGMODE_7BIT {$$ = TrCreateLeafNode (PARSEOP_ADDRESSINGMODE_7BIT);}
- | PARSEOP_ADDRESSINGMODE_10BIT {$$ = TrCreateLeafNode (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);}
- ;
-
-AddressSpaceKeyword
- : ByteConst {$$ = UtCheckIntegerRange ($1, 0x0A, 0xFF);}
- | RegionSpaceKeyword {}
- ;
-
-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);}
- ;
-
-ClockPhaseKeyword
- : PARSEOP_CLOCKPHASE_FIRST {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_FIRST);}
- | PARSEOP_CLOCKPHASE_SECOND {$$ = TrCreateLeafNode (PARSEOP_CLOCKPHASE_SECOND);}
- ;
-
-ClockPolarityKeyword
- : PARSEOP_CLOCKPOLARITY_LOW {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_LOW);}
- | PARSEOP_CLOCKPOLARITY_HIGH {$$ = TrCreateLeafNode (PARSEOP_CLOCKPOLARITY_HIGH);}
- ;
-
-DecodeKeyword
- : PARSEOP_DECODETYPE_POS {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_POS);}
- | PARSEOP_DECODETYPE_SUB {$$ = TrCreateLeafNode (PARSEOP_DECODETYPE_SUB);}
- ;
-
-DevicePolarityKeyword
- : PARSEOP_DEVICEPOLARITY_LOW {$$ = TrCreateLeafNode (PARSEOP_DEVICEPOLARITY_LOW);}
- | PARSEOP_DEVICEPOLARITY_HIGH {$$ = TrCreateLeafNode (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);}
- ;
-
-EndianKeyword
- : PARSEOP_ENDIAN_LITTLE {$$ = TrCreateLeafNode (PARSEOP_ENDIAN_LITTLE);}
- | PARSEOP_ENDIAN_BIG {$$ = TrCreateLeafNode (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);}
- ;
-
-InterruptLevel
- : PARSEOP_INTLEVEL_ACTIVEBOTH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEBOTH);}
- | PARSEOP_INTLEVEL_ACTIVEHIGH {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVEHIGH);}
- | PARSEOP_INTLEVEL_ACTIVELOW {$$ = TrCreateLeafNode (PARSEOP_INTLEVEL_ACTIVELOW);}
- ;
-
-InterruptTypeKeyword
- : PARSEOP_INTTYPE_EDGE {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_EDGE);}
- | PARSEOP_INTTYPE_LEVEL {$$ = TrCreateLeafNode (PARSEOP_INTTYPE_LEVEL);}
- ;
-
-IODecodeKeyword
- : PARSEOP_IODECODETYPE_16 {$$ = TrCreateLeafNode (PARSEOP_IODECODETYPE_16);}
- | PARSEOP_IODECODETYPE_10 {$$ = TrCreateLeafNode (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);}
- ;
-
-LockRuleKeyword
- : PARSEOP_LOCKRULE_LOCK {$$ = TrCreateLeafNode (PARSEOP_LOCKRULE_LOCK);}
- | PARSEOP_LOCKRULE_NOLOCK {$$ = TrCreateLeafNode (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);}
- ;
-
-MaxKeyword
- : PARSEOP_MAXTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MAXTYPE_FIXED);}
- | PARSEOP_MAXTYPE_NOTFIXED {$$ = TrCreateLeafNode (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);}
- ;
-
-MinKeyword
- : PARSEOP_MINTYPE_FIXED {$$ = TrCreateLeafNode (PARSEOP_MINTYPE_FIXED);}
- | PARSEOP_MINTYPE_NOTFIXED {$$ = TrCreateLeafNode (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);}
- ;
-
-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);}
- ;
-
-PinConfigByte
- : PinConfigKeyword {$$ = $1;}
- | ByteConstExpr {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
- ;
-
-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);}
- ;
-
-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);}
- ;
-
-RangeTypeKeyword
- : PARSEOP_RANGETYPE_ISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_ISAONLY);}
- | PARSEOP_RANGETYPE_NONISAONLY {$$ = TrCreateLeafNode (PARSEOP_RANGETYPE_NONISAONLY);}
- | PARSEOP_RANGETYPE_ENTIRE {$$ = TrCreateLeafNode (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);}
- ;
-
-ResourceTypeKeyword
- : PARSEOP_RESOURCETYPE_CONSUMER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
- | PARSEOP_RESOURCETYPE_PRODUCER {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_PRODUCER);}
- ;
-
-SerializeRuleKeyword
- : PARSEOP_SERIALIZERULE_SERIAL {$$ = TrCreateLeafNode (PARSEOP_SERIALIZERULE_SERIAL);}
- | PARSEOP_SERIALIZERULE_NOTSERIAL {$$ = TrCreateLeafNode (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);}
- ;
-
-SlaveModeKeyword
- : PARSEOP_SLAVEMODE_CONTROLLERINIT {$$ = TrCreateLeafNode (PARSEOP_SLAVEMODE_CONTROLLERINIT);}
- | PARSEOP_SLAVEMODE_DEVICEINIT {$$ = TrCreateLeafNode (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);}
- ;
-
-TranslationKeyword
- : PARSEOP_TRANSLATIONTYPE_SPARSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_SPARSE);}
- | PARSEOP_TRANSLATIONTYPE_DENSE {$$ = TrCreateLeafNode (PARSEOP_TRANSLATIONTYPE_DENSE);}
- ;
-
-TypeKeyword
- : PARSEOP_TYPE_TRANSLATION {$$ = TrCreateLeafNode (PARSEOP_TYPE_TRANSLATION);}
- | PARSEOP_TYPE_STATIC {$$ = TrCreateLeafNode (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);}
- ;
-
-WireModeKeyword
- : PARSEOP_WIREMODE_FOUR {$$ = TrCreateLeafNode (PARSEOP_WIREMODE_FOUR);}
- | PARSEOP_WIREMODE_THREE {$$ = TrCreateLeafNode (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);}
- ;
-
-XferTypeKeyword
- : PARSEOP_XFERTYPE_8 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8);}
- | PARSEOP_XFERTYPE_8_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_8_16);}
- | PARSEOP_XFERTYPE_16 {$$ = TrCreateLeafNode (PARSEOP_XFERTYPE_16);}
- ;
-
/*******************************************************************************
*
@@ -435,15 +128,20 @@ XferTypeKeyword
* Also, insert the EndTag at the end of the template.
*/
ResourceTemplateTerm
- : PARSEOP_RESOURCETEMPLATE '(' ')'
+ : PARSEOP_RESOURCETEMPLATE OptionalParentheses
'{'
ResourceMacroList '}' {$$ = TrCreateNode (PARSEOP_RESOURCETEMPLATE,4,
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
- $5,
+ $4,
TrCreateLeafNode (PARSEOP_ENDTAG));}
;
+OptionalParentheses
+ : {$$ = NULL;}
+ | '(' ')' {$$ = NULL;}
+ ;
+
ResourceMacroList
: {$$ = NULL;}
| ResourceMacroList
@@ -518,7 +216,8 @@ DWordIOTerm
OptionalNameString
OptionalType
OptionalTranslationType_Last
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
| PARSEOP_DWORDIO '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -541,7 +240,8 @@ DWordMemoryTerm
OptionalNameString
OptionalAddressRange
OptionalType_Last
- ')' {$$ = TrLinkChildren ($<n>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
+ ')' {$$ = TrLinkChildren ($<n>3,16,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
| PARSEOP_DWORDMEMORY '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -562,7 +262,8 @@ DWordSpaceTerm
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
| PARSEOP_DWORDSPACE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -590,7 +291,8 @@ ExtendedIOTerm
OptionalNameString
OptionalType
OptionalTranslationType_Last
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
| PARSEOP_EXTENDEDIO '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -612,7 +314,8 @@ ExtendedMemoryTerm
OptionalNameString
OptionalAddressRange
OptionalType_Last
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
| PARSEOP_EXTENDEDMEMORY '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -632,7 +335,8 @@ ExtendedSpaceTerm
',' QWordConstExpr
OptionalQWordConstExpr
OptionalNameString_Last
- ')' {$$ = TrLinkChildren ($<n>3,13,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
+ ')' {$$ = TrLinkChildren ($<n>3,13,
+ $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
| PARSEOP_EXTENDEDSPACE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -671,7 +375,8 @@ GpioIntTerm
OptionalNameString /* 15: DescriptorName */
OptionalBuffer_Last /* 16: VendorData */
')' '{'
- DWordConstExpr '}' {$$ = TrLinkChildren ($<n>3,11,$4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
+ DWordConstExpr '}' {$$ = TrLinkChildren ($<n>3,11,
+ $4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
| PARSEOP_GPIO_INT '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -689,7 +394,8 @@ GpioIoTerm
OptionalNameString /* 14: DescriptorName */
OptionalBuffer_Last /* 15: VendorData */
')' '{'
- DWordList '}' {$$ = TrLinkChildren ($<n>3,11,$4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
+ DWordList '}' {$$ = TrLinkChildren ($<n>3,11,
+ $4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
| PARSEOP_GPIO_IO '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -705,7 +411,8 @@ I2cSerialBusTerm
OptionalResourceType /* 12: ResourceType */
OptionalNameString /* 13: DescriptorName */
OptionalBuffer_Last /* 14: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13,
+ ')' {$$ = TrLinkChildren ($<n>3,10,
+ $4,$5,$7,$8,$10,$11,$12,$13,
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$14);}
| PARSEOP_I2C_SERIALBUS '('
error ')' {$$ = AslDoError(); yyclearin;}
@@ -723,8 +430,8 @@ I2cSerialBusTermV2
OptionalNameString /* 13: DescriptorName */
OptionalShareType /* 14: Share */
OptionalBuffer_Last /* 15: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,10,$4,$5,$7,$8,$10,$11,$12,$13,
- $14,$15);}
+ ')' {$$ = TrLinkChildren ($<n>3,10,
+ $4,$5,$7,$8,$10,$11,$12,$13,$14,$15);}
| PARSEOP_I2C_SERIALBUS_V2 '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -739,7 +446,8 @@ InterruptTerm
OptionalStringData
OptionalNameString_Last
')' '{'
- DWordList '}' {$$ = TrLinkChildren ($<n>3,8,$4,$6,$8,$9,$10,$11,$12,$15);}
+ DWordList '}' {$$ = TrLinkChildren ($<n>3,8,
+ $4,$6,$8,$9,$10,$11,$12,$15);}
| PARSEOP_INTERRUPT '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -832,7 +540,8 @@ QWordIOTerm
OptionalNameString
OptionalType
OptionalTranslationType_Last
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
| PARSEOP_QWORDIO '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -855,7 +564,8 @@ QWordMemoryTerm
OptionalNameString
OptionalAddressRange
OptionalType_Last
- ')' {$$ = TrLinkChildren ($<n>3,16,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
+ ')' {$$ = TrLinkChildren ($<n>3,16,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
| PARSEOP_QWORDMEMORY '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -876,7 +586,8 @@ QWordSpaceTerm
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
| PARSEOP_QWORDSPACE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -909,7 +620,8 @@ SpiSerialBusTerm
OptionalResourceType /* 19: ResourceType */
OptionalNameString /* 20: DescriptorName */
OptionalBuffer_Last /* 21: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
| PARSEOP_SPI_SERIALBUS '('
error ')' {$$ = AslDoError(); yyclearin;}
@@ -931,8 +643,8 @@ SpiSerialBusTermV2
OptionalNameString /* 20: DescriptorName */
OptionalShareType /* 21: Share */
OptionalBuffer_Last /* 22: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
- $21,$22);}
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
| PARSEOP_SPI_SERIALBUS_V2 '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -971,7 +683,8 @@ UartSerialBusTerm
OptionalResourceType /* 19: ResourceType */
OptionalNameString /* 20: DescriptorName */
OptionalBuffer_Last /* 21: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$21);}
| PARSEOP_UART_SERIALBUS '('
error ')' {$$ = AslDoError(); yyclearin;}
@@ -994,8 +707,8 @@ UartSerialBusTermV2
OptionalNameString /* 20: DescriptorName */
OptionalShareType /* 21: Share */
OptionalBuffer_Last /* 22: VendorData */
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
- $21,$22);}
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
| PARSEOP_UART_SERIALBUS_V2 '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1032,7 +745,8 @@ WordBusNumberTerm
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- ')' {$$ = TrLinkChildren ($<n>3,12,$4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
+ ')' {$$ = TrLinkChildren ($<n>3,12,
+ $4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
| PARSEOP_WORDBUSNUMBER '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1054,7 +768,8 @@ WordIOTerm
OptionalNameString
OptionalType
OptionalTranslationType_Last
- ')' {$$ = TrLinkChildren ($<n>3,15,$4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
+ ')' {$$ = TrLinkChildren ($<n>3,15,
+ $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
| PARSEOP_WORDIO '('
error ')' {$$ = AslDoError(); yyclearin;}
;
@@ -1075,246 +790,8 @@ WordSpaceTerm
OptionalByteConstExpr
OptionalStringData
OptionalNameString_Last
- ')' {$$ = TrLinkChildren ($<n>3,14,$4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
+ ')' {$$ = TrLinkChildren ($<n>3,14,
+ $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
| PARSEOP_WORDSPACE '('
error ')' {$$ = AslDoError(); yyclearin;}
;
-
-
-/******* Object References ***********************************************/
-
-/* Allow IO, DMA, IRQ Resource macro names to also be used as identifiers */
-
-NameString
- : NameSeg {}
- | PARSEOP_NAMESTRING {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESTRING, (ACPI_NATIVE_INT) AslCompilerlval.s);}
- | 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");}
- ;
-
-NameSeg
- : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT) AslCompilerlval.s);}
- ;
-
-
-/*******************************************************************************
- *
- * ASL Helper Terms
- *
- ******************************************************************************/
-
-OptionalBusMasterKeyword
- : ',' {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_MASTER);}
- | ',' PARSEOP_BUSMASTERTYPE_MASTER {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_MASTER);}
- | ',' PARSEOP_BUSMASTERTYPE_NOTMASTER {$$ = TrCreateLeafNode (PARSEOP_BUSMASTERTYPE_NOTMASTER);}
- ;
-
-OptionalAccessAttribTerm
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' ByteConstExpr {$$ = $2;}
- | ',' AccessAttribKeyword {$$ = $2;}
- ;
-
-OptionalAccessSize
- : {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);}
- | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0);}
- | ',' ByteConstExpr {$$ = $2;}
- ;
-
-OptionalAddressingMode
- : ',' {$$ = NULL;}
- | ',' AddressingModeKeyword {$$ = $2;}
- ;
-
-OptionalAddressRange
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' AddressKeyword {$$ = $2;}
- ;
-
-OptionalBitsPerByte
- : ',' {$$ = NULL;}
- | ',' BitsPerByteKeyword {$$ = $2;}
- ;
-
-OptionalBuffer_Last
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' RawDataBufferTerm {$$ = $2;}
- ;
-
-OptionalByteConstExpr
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' ByteConstExpr {$$ = $2;}
- ;
-
-OptionalDecodeType
- : ',' {$$ = NULL;}
- | ',' DecodeKeyword {$$ = $2;}
- ;
-
-OptionalDevicePolarity
- : ',' {$$ = NULL;}
- | ',' DevicePolarityKeyword {$$ = $2;}
- ;
-
-OptionalDWordConstExpr
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' DWordConstExpr {$$ = $2;}
- ;
-
-OptionalEndian
- : ',' {$$ = NULL;}
- | ',' EndianKeyword {$$ = $2;}
- ;
-
-OptionalFlowControl
- : ',' {$$ = NULL;}
- | ',' FlowControlKeyword {$$ = $2;}
- ;
-
-OptionalIoRestriction
- : ',' {$$ = NULL;}
- | ',' IoRestrictionKeyword {$$ = $2;}
- ;
-
-OptionalListString
- : {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
- | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, ACPI_TO_INTEGER (""));} /* Placeholder is a NULL string */
- | ',' TermArg {$$ = $2;}
- ;
-
-OptionalMaxType
- : ',' {$$ = NULL;}
- | ',' MaxKeyword {$$ = $2;}
- ;
-
-OptionalMemType
- : ',' {$$ = NULL;}
- | ',' MemTypeKeyword {$$ = $2;}
- ;
-
-OptionalMinType
- : ',' {$$ = NULL;}
- | ',' MinKeyword {$$ = $2;}
- ;
-
-OptionalNameString
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' NameString {$$ = $2;}
- ;
-
-OptionalNameString_Last
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' NameString {$$ = $2;}
- ;
-
-OptionalNameString_First
- : {$$ = TrCreateLeafNode (PARSEOP_ZERO);}
- | NameString {$$ = $1;}
- ;
-
-OptionalObjectTypeKeyword
- : {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE_UNK);}
- | ',' ObjectTypeKeyword {$$ = $2;}
- ;
-
-OptionalParityType
- : ',' {$$ = NULL;}
- | ',' ParityTypeKeyword {$$ = $2;}
- ;
-
-OptionalQWordConstExpr
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' QWordConstExpr {$$ = $2;}
- ;
-
-OptionalRangeType
- : ',' {$$ = NULL;}
- | ',' RangeTypeKeyword {$$ = $2;}
- ;
-
-OptionalReadWriteKeyword
- : {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);}
- | PARSEOP_READWRITETYPE_BOTH {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_BOTH);}
- | PARSEOP_READWRITETYPE_READONLY {$$ = TrCreateLeafNode (PARSEOP_READWRITETYPE_READONLY);}
- ;
-
-OptionalResourceType_First
- : {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
- | ResourceTypeKeyword {$$ = $1;}
- ;
-
-OptionalResourceType
- : {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
- | ',' {$$ = TrCreateLeafNode (PARSEOP_RESOURCETYPE_CONSUMER);}
- | ',' ResourceTypeKeyword {$$ = $2;}
- ;
-
-OptionalSlaveMode
- : ',' {$$ = NULL;}
- | ',' SlaveModeKeyword {$$ = $2;}
- ;
-
-OptionalShareType
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' ShareTypeKeyword {$$ = $2;}
- ;
-
-OptionalShareType_First
- : {$$ = NULL;}
- | ShareTypeKeyword {$$ = $1;}
- ;
-
-OptionalStopBits
- : ',' {$$ = NULL;}
- | ',' StopBitsKeyword {$$ = $2;}
- ;
-
-OptionalStringData
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' StringData {$$ = $2;}
- ;
-
-OptionalTranslationType_Last
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' TranslationKeyword {$$ = $2;}
- ;
-
-OptionalType
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' TypeKeyword {$$ = $2;}
- ;
-
-OptionalType_Last
- : {$$ = NULL;}
- | ',' {$$ = NULL;}
- | ',' TypeKeyword {$$ = $2;}
- ;
-
-OptionalWireMode
- : ',' {$$ = NULL;}
- | ',' WireModeKeyword {$$ = $2;}
- ;
-
-OptionalWordConstExpr
- : ',' {$$ = NULL;}
- | ',' WordConstExpr {$$ = $2;}
- ;
-
-OptionalXferSize
- : {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);}
- | ',' {$$ = TrCreateValuedLeafNode (PARSEOP_XFERSIZE_32, 2);}
- | ',' XferSizeKeyword {$$ = $2;}
- ;
diff --git a/src/acpica/source/compiler/aslrules.y b/src/acpica/source/compiler/aslrules.y
index c4b0fc2..73c8062 100644
--- a/src/acpica/source/compiler/aslrules.y
+++ b/src/acpica/source/compiler/aslrules.y
@@ -127,7 +127,8 @@ NoEcho('
* to handle output from preprocessors
*/
AslCode
- : DefinitionBlockList {$<n>$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_ASL_CODE),1, $1);}
+ : DefinitionBlockList {$<n>$ = TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_ASL_CODE),1, $1);}
| error {YYABORT; $$ = NULL;}
;
@@ -160,7 +161,8 @@ DefinitionBlockTerm
String ','
DWordConst
')' {TrSetEndLineNumber ($<n>3);}
- '{' TermList '}' {$$ = TrLinkChildren ($<n>3,7,$4,$6,$8,$10,$12,$14,$18);}
+ '{' TermList '}' {$$ = TrLinkChildren ($<n>3,7,
+ $4,$6,$8,$10,$12,$14,$18);}
;
DefinitionBlockList
@@ -169,12 +171,36 @@ DefinitionBlockList
DefinitionBlockList {$$ = TrLinkPeerNodes (2, $1,$2);}
;
+/* Allow IO, DMA, IRQ Resource macro and FOR macro names to also be used as identifiers */
+
+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");}
+ ;
+/*
+NameSeg
+ : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT)
+ TrNormalizeNameSeg ($1));}
+ ;
+*/
+
+NameSeg
+ : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG,
+ (ACPI_NATIVE_INT) AslCompilerlval.s);}
+ ;
+
+
SuperName
: NameString {}
| ArgTerm {}
| LocalTerm {}
| DebugTerm {}
| Type6Opcode {}
+ ;
Target
: {$$ = TrCreateNullTarget ();} /* Placeholder is a ZeroOp object */
@@ -188,6 +214,8 @@ TermArg
| NameString {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
| ArgTerm {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
| LocalTerm {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);}
+
+
;
/*
@@ -212,9 +240,26 @@ OptionalCount
| ',' TermArg {$$ = $2;}
;
-VarPackageLengthTerm
- : {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
- | TermArg {$$ = $1;}
+/*
+ * Data count for buffers and packages (byte count for buffers,
+ * element count for packages).
+ */
+OptionalDataCount
+
+ /* Legacy ASL */
+ : {$$ = NULL;}
+ | '(' TermArg ')' {$$ = $2;}
+ | '(' ')' {$$ = NULL;}
+
+ /* C-style (ASL+) -- adds equals term */
+
+ | PARSEOP_EXP_EQUALS {$$ = NULL;}
+
+ | '(' TermArg ')'
+ PARSEOP_EXP_EQUALS {$$ = $2;}
+
+ | '(' ')' String
+ PARSEOP_EXP_EQUALS {$$ = NULL;}
;
@@ -269,6 +314,7 @@ Object
: CompilerDirective {}
| NamedObject {}
| NameSpaceModifier {}
+// | StructureTerm {}
;
PackageList
@@ -301,7 +347,8 @@ ParameterTypePackageList
OptionalParameterTypePackage
: {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
- | ',' ParameterTypePackageList {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
+ | ',' ParameterTypePackageList {$$ = TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
;
/* Rules for specifying the types for method arguments */
@@ -320,17 +367,22 @@ ParameterTypesPackageList
OptionalParameterTypesPackage
: {$$ = TrCreateLeafNode (PARSEOP_DEFAULT_ARG);}
- | ',' ParameterTypesPackageList {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
+ | ',' ParameterTypesPackageList {$$ = TrLinkChildren (
+ TrCreateLeafNode (PARSEOP_DEFAULT_ARG),1,$2);}
;
/* ACPI 3.0 -- allow semicolons between terms */
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 {$$ = 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);}
;
Term
@@ -438,29 +490,37 @@ QWordConst
* 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);}
+ : 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);}
| ByteConst {}
;
WordConstExpr
- : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 2);}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 2);}
+ : 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);}
| WordConst {}
;
DWordConstExpr
- : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 4);}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 4);}
+ : 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);}
| DWordConst {}
;
QWordConstExpr
- : Type3Opcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 8);}
- | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST); TrSetNodeAmlLength ($1, 8);}
+ : 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);}
| QWordConst {}
;
@@ -481,11 +541,13 @@ ConstExprTerm
;
Integer
- : PARSEOP_INTEGER {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, AslCompilerlval.i);}
+ : PARSEOP_INTEGER {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER,
+ AslCompilerlval.i);}
;
String
- : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL, (ACPI_NATIVE_INT) AslCompilerlval.s);}
+ : PARSEOP_STRING_LITERAL {$$ = TrCreateValuedLeafNode (PARSEOP_STRING_LITERAL,
+ (ACPI_NATIVE_INT) AslCompilerlval.s);}
;
@@ -526,6 +588,7 @@ NamedObject
NameSpaceModifier
: AliasTerm {}
| NameTerm {}
+// | NameTermAslPlus {}
| ScopeTerm {}
;
@@ -539,6 +602,7 @@ ObjectTypeName
| RefOfTerm {}
| DerefOfTerm {}
| IndexTerm {}
+
/* | MethodInvocationTerm {} */ /* Caused reduce/reduce with Type6Opcode->MethodInvocationTerm */
;
@@ -604,6 +668,8 @@ Type2IntegerOpcode /* "Type3" opcodes */
| FromBCDTerm {}
| IncTerm {}
| IndexTerm {}
+// | StructureIndexTerm {}
+// | StructurePointerTerm {}
| LAndTerm {}
| LEqualTerm {}
| LGreaterTerm {}
@@ -664,6 +730,8 @@ Type4Opcode
;
*/
+/* Type 5 opcodes are a subset of Type2 opcodes, and return a constant */
+
Type5Opcode
: ResourceTemplateTerm {}
| UnicodeTerm {}
@@ -676,1103 +744,21 @@ Type6Opcode
| DerefOfTerm {}
| IndexTerm {}
| IndexExpTerm {}
+// | StructureIndexTerm {}
+// | StructurePointerTerm {}
| MethodInvocationTerm {}
;
/*******************************************************************************
*
- * ASL Primary Terms
- *
- ******************************************************************************/
-
-AccessAsTerm
- : PARSEOP_ACCESSAS '('
- AccessTypeKeyword
- OptionalAccessAttribTerm
- ')' {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);}
- | PARSEOP_ACCESSAS '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-AcquireTerm
- : PARSEOP_ACQUIRE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACQUIRE);}
- SuperName
- ',' WordConstExpr
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$6);}
- | PARSEOP_ACQUIRE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-AddTerm
- : PARSEOP_ADD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_ADD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-AliasTerm
- : PARSEOP_ALIAS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ALIAS);}
- NameString
- NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,
- TrSetNodeFlags ($5, NODE_IS_NAME_DECLARATION));}
- | PARSEOP_ALIAS '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-AndTerm
- : PARSEOP_AND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_AND '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-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);}
- ;
-
-BankFieldTerm
- : PARSEOP_BANKFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_BANKFIELD);}
- NameString
- NameStringItem
- TermArgItem
- ',' AccessTypeKeyword
- ',' LockRuleKeyword
- ',' UpdateRuleKeyword
- ')' '{'
- FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,7,$4,$5,$6,$8,$10,$12,$15);}
- | PARSEOP_BANKFIELD '('
- error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
- ;
-
-BreakTerm
- : PARSEOP_BREAK {$$ = TrCreateNode (PARSEOP_BREAK, 0);}
- ;
-
-BreakPointTerm
- : PARSEOP_BREAKPOINT {$$ = TrCreateNode (PARSEOP_BREAKPOINT, 0);}
- ;
-
-BufferTerm
- : PARSEOP_BUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER);}
- OptionalBufferLength
- ')' '{'
- BufferTermData '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
- | PARSEOP_BUFFER '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-BufferTermData
- : ByteList {}
- | StringData {}
- ;
-
-CaseTerm
- : PARSEOP_CASE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CASE);}
- DataObject
- ')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
- | PARSEOP_CASE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ConcatTerm
- : PARSEOP_CONCATENATE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONCATENATE);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_CONCATENATE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ConcatResTerm
- : PARSEOP_CONCATENATERESTEMPLATE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONCATENATERESTEMPLATE);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_CONCATENATERESTEMPLATE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ConnectionTerm
- : PARSEOP_CONNECTION '('
- NameString
- ')' {$$ = TrCreateNode (PARSEOP_CONNECTION,1,$3);}
- | PARSEOP_CONNECTION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONNECTION);}
- ResourceMacroTerm
- ')' {$$ = TrLinkChildren ($<n>3, 1,
- TrLinkChildren (TrCreateLeafNode (PARSEOP_RESOURCETEMPLATE), 3,
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
- TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
- $4));}
- | PARSEOP_CONNECTION '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-CondRefOfTerm
- : PARSEOP_CONDREFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONDREFOF);}
- SuperName
- Target
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_CONDREFOF '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ContinueTerm
- : PARSEOP_CONTINUE {$$ = TrCreateNode (PARSEOP_CONTINUE, 0);}
- ;
-
-CopyObjectTerm
- : PARSEOP_COPYOBJECT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);}
- TermArg
- ',' SimpleTarget
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,TrSetNodeFlags ($6, NODE_IS_TARGET));}
- | PARSEOP_COPYOBJECT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateBitFieldTerm
- : PARSEOP_CREATEBITFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);}
- TermArg
- TermArgItem
- NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEBITFIELD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateByteFieldTerm
- : PARSEOP_CREATEBYTEFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);}
- TermArg
- TermArgItem
- NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEBYTEFIELD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateDWordFieldTerm
- : PARSEOP_CREATEDWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);}
- TermArg
- TermArgItem
- NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEDWORDFIELD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateFieldTerm
- : PARSEOP_CREATEFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);}
- TermArg
- TermArgItem
- TermArgItem
- NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEFIELD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateQWordFieldTerm
- : PARSEOP_CREATEQWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);}
- TermArg
- TermArgItem
- NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEQWORDFIELD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-CreateWordFieldTerm
- : PARSEOP_CREATEWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);}
- TermArg
- TermArgItem
- NameStringItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
- | PARSEOP_CREATEWORDFIELD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-DataRegionTerm
- : PARSEOP_DATATABLEREGION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);}
- NameString
- TermArgItem
- TermArgItem
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$6,$7);}
- | PARSEOP_DATATABLEREGION '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-DebugTerm
- : PARSEOP_DEBUG {$$ = TrCreateLeafNode (PARSEOP_DEBUG);}
- ;
-
-DecTerm
- : PARSEOP_DECREMENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DECREMENT);}
- SuperName
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_DECREMENT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-DefaultTerm
- : PARSEOP_DEFAULT '{' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFAULT);}
- TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_DEFAULT '{'
- error '}' {$$ = AslDoError(); yyclearin;}
- ;
-
-DerefOfTerm
- : PARSEOP_DEREFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEREFOF);}
- TermArg
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_DEREFOF '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-DeviceTerm
- : PARSEOP_DEVICE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);}
- NameString
- ')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
- | PARSEOP_DEVICE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-DivideTerm
- : PARSEOP_DIVIDE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
- TermArg
- TermArgItem
- Target
- Target
- ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
- | PARSEOP_DIVIDE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-EISAIDTerm
- : PARSEOP_EISAID '('
- StringData ')' {$$ = TrUpdateNode (PARSEOP_EISAID, $3);}
- | PARSEOP_EISAID '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ElseIfTerm
- : IfTerm ElseTerm {$$ = TrLinkPeerNode ($1,$2);}
- ;
-
-ElseTerm
- : {$$ = NULL;}
- | PARSEOP_ELSE '{' {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
- TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);}
-
- | PARSEOP_ELSE '{'
- error '}' {$$ = AslDoError(); yyclearin;}
-
- | PARSEOP_ELSE
- error {$$ = AslDoError(); yyclearin;}
-
- | PARSEOP_ELSEIF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
- TermArg {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
- ')' '{'
- TermList '}' {TrLinkChildren ($<n>5,2,$4,$8);}
- ElseTerm {TrLinkPeerNode ($<n>5,$11);}
- {$$ = TrLinkChildren ($<n>3,1,$<n>5);}
-
- | PARSEOP_ELSEIF '('
- error ')' {$$ = AslDoError(); yyclearin;}
-
- | PARSEOP_ELSEIF
- error {$$ = AslDoError(); yyclearin;}
- ;
-
-EventTerm
- : PARSEOP_EVENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EVENT);}
- NameString
- ')' {$$ = TrLinkChildren ($<n>3,1,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION));}
- | PARSEOP_EVENT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ExternalTerm
- : PARSEOP_EXTERNAL '('
- NameString
- OptionalObjectTypeKeyword
- OptionalParameterTypePackage
- OptionalParameterTypesPackage
- ')' {$$ = TrCreateNode (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);}
- | PARSEOP_EXTERNAL '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-FatalTerm
- : PARSEOP_FATAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FATAL);}
- ByteConstExpr
- ',' DWordConstExpr
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
- | PARSEOP_FATAL '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-FieldTerm
- : PARSEOP_FIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FIELD);}
- NameString
- ',' AccessTypeKeyword
- ',' LockRuleKeyword
- ',' UpdateRuleKeyword
- ')' '{'
- FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$8,$10,$13);}
- | PARSEOP_FIELD '('
- error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
- ;
-
-FindSetLeftBitTerm
- : PARSEOP_FINDSETLEFTBIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETLEFTBIT);}
- TermArg
- Target
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_FINDSETLEFTBIT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-FindSetRightBitTerm
- : PARSEOP_FINDSETRIGHTBIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETRIGHTBIT);}
- TermArg
- Target
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_FINDSETRIGHTBIT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
- /* Convert a For() loop to a While() loop */
-ForTerm
- : PARSEOP_FOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
- OptionalTermArg ',' {}
- OptionalPredicate ','
- OptionalTermArg {$<n>$ = TrLinkPeerNode ($4,$<n>3);
- TrSetParent ($9,$<n>3);} /* New parent is WHILE */
- ')' '{' TermList '}' {$<n>$ = TrLinkChildren ($<n>3,2,$7,$13);}
- {$<n>$ = TrLinkPeerNode ($13,$9);
- $$ = $<n>10;}
- ;
-
-OptionalPredicate
- : {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, 1);}
- | TermArg {$$ = $1;}
- ;
-
-FprintfTerm
- : PARSEOP_FPRINTF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FPRINTF);}
- TermArg ','
- StringData
- PrintfArgList
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
- | PARSEOP_FPRINTF '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-FromBCDTerm
- : PARSEOP_FROMBCD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FROMBCD);}
- TermArg
- Target
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_FROMBCD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-FunctionTerm
- : PARSEOP_FUNCTION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD);}
- NameString
- OptionalParameterTypePackage
- OptionalParameterTypesPackage
- ')' '{'
- 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,$9);}
- | PARSEOP_FUNCTION '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-IfTerm
- : PARSEOP_IF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
- TermArg
- ')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
-
- | PARSEOP_IF '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-IncludeTerm
- : PARSEOP_INCLUDE '('
- String ')' {$$ = TrUpdateNode (PARSEOP_INCLUDE, $3);
- FlOpenIncludeFile ($3);}
- ;
-
-IncludeEndTerm
- : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafNode (PARSEOP_INCLUDE_END); TrSetCurrentFilename ($$);}
- ;
-
-IncTerm
- : PARSEOP_INCREMENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
- SuperName
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_INCREMENT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-IndexFieldTerm
- : PARSEOP_INDEXFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INDEXFIELD);}
- NameString
- NameStringItem
- ',' AccessTypeKeyword
- ',' LockRuleKeyword
- ',' UpdateRuleKeyword
- ')' '{'
- FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$7,$9,$11,$14);}
- | PARSEOP_INDEXFIELD '('
- error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
- ;
-
-IndexTerm
- : PARSEOP_INDEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INDEX);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_INDEX '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-LAndTerm
- : PARSEOP_LAND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LAND);}
- TermArg
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LAND '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-LEqualTerm
- : PARSEOP_LEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
- TermArg
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LEQUAL '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-LGreaterEqualTerm
- : PARSEOP_LGREATEREQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
- TermArg
- TermArgItem
- ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($<n>3,2,$4,$5));}
- | PARSEOP_LGREATEREQUAL '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-LGreaterTerm
- : PARSEOP_LGREATER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
- TermArg
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LGREATER '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-LLessEqualTerm
- : PARSEOP_LLESSEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
- TermArg
- TermArgItem
- ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($<n>3,2,$4,$5));}
- | PARSEOP_LLESSEQUAL '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-LLessTerm
- : PARSEOP_LLESS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
- TermArg
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LLESS '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-LNotEqualTerm
- : PARSEOP_LNOTEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
- TermArg
- TermArgItem
- ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($<n>3,2,$4,$5));}
- | PARSEOP_LNOTEQUAL '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-LNotTerm
- : PARSEOP_LNOT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
- TermArg
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_LNOT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-LoadTableTerm
- : PARSEOP_LOADTABLE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOADTABLE);}
- TermArg
- TermArgItem
- TermArgItem
- OptionalListString
- OptionalListString
- OptionalReference
- ')' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);}
- | PARSEOP_LOADTABLE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-LoadTerm
- : PARSEOP_LOAD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOAD);}
- NameString
- RequiredTarget
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LOAD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-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);}
- ;
-
-LOrTerm
- : PARSEOP_LOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
- TermArg
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_LOR '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-MatchTerm
- : PARSEOP_MATCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MATCH);}
- TermArg
- ',' MatchOpKeyword
- TermArgItem
- ',' MatchOpKeyword
- TermArgItem
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);}
- | PARSEOP_MATCH '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-MethodTerm
- : PARSEOP_METHOD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD);}
- NameString
- OptionalByteConstExpr {UtCheckIntegerRange ($5, 0, 7);}
- OptionalSerializeRuleKeyword
- OptionalByteConstExpr
- OptionalParameterTypePackage
- OptionalParameterTypesPackage
- ')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,7,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$7,$8,$9,$10,$13);}
- | PARSEOP_METHOD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-MidTerm
- : PARSEOP_MID '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MID);}
- TermArg
- TermArgItem
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
- | PARSEOP_MID '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ModTerm
- : PARSEOP_MOD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_MOD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-MultiplyTerm
- : PARSEOP_MULTIPLY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_MULTIPLY '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-MutexTerm
- : PARSEOP_MUTEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MUTEX);}
- NameString
- ',' ByteConstExpr
- ')' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
- | PARSEOP_MUTEX '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-NameTerm
- : PARSEOP_NAME '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAME);}
- NameString
- ',' DataObject
- ')' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
- | PARSEOP_NAME '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-NAndTerm
- : PARSEOP_NAND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAND);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_NAND '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-NoOpTerm
- : PARSEOP_NOOP {$$ = TrCreateNode (PARSEOP_NOOP, 0);}
- ;
-
-NOrTerm
- : PARSEOP_NOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOR);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_NOR '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-NotifyTerm
- : PARSEOP_NOTIFY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOTIFY);}
- SuperName
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_NOTIFY '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-NotTerm
- : PARSEOP_NOT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
- TermArg
- Target
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_NOT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ObjectTypeTerm
- : PARSEOP_OBJECTTYPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);}
- ObjectTypeName
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_OBJECTTYPE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-OffsetTerm
- : PARSEOP_OFFSET '('
- AmlPackageLengthTerm
- ')' {$$ = TrCreateNode (PARSEOP_OFFSET,1,$3);}
- | PARSEOP_OFFSET '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-OpRegionTerm
- : PARSEOP_OPERATIONREGION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OPERATIONREGION);}
- NameString
- ',' OpRegionSpaceIdTerm
- TermArgItem
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8);}
- | PARSEOP_OPERATIONREGION '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-OpRegionSpaceIdTerm
- : RegionSpaceKeyword {}
- | ByteConst {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
- ;
-
-OrTerm
- : PARSEOP_OR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_OR '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-PackageTerm
- : PARSEOP_PACKAGE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_VAR_PACKAGE);}
- VarPackageLengthTerm
- ')' '{'
- PackageList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
- | PARSEOP_PACKAGE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-PowerResTerm
- : PARSEOP_POWERRESOURCE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_POWERRESOURCE);}
- NameString
- ',' ByteConstExpr
- ',' WordConstExpr
- ')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,4,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$8,$11);}
- | PARSEOP_POWERRESOURCE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-PrintfTerm
- : PARSEOP_PRINTF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_PRINTF);}
- StringData
- PrintfArgList
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_PRINTF '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-PrintfArgList
- : {$$ = NULL;}
- | TermArg {$$ = $1;}
- | PrintfArgList ','
- TermArg {$$ = TrLinkPeerNode ($1, $3);}
- ;
-
-ProcessorTerm
- : PARSEOP_PROCESSOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_PROCESSOR);}
- NameString
- ',' ByteConstExpr
- OptionalDWordConstExpr
- OptionalByteConstExpr
- ')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,5,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6,$7,$8,$11);}
- | PARSEOP_PROCESSOR '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-RawDataBufferTerm
- : PARSEOP_DATABUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DATABUFFER);}
- OptionalWordConst
- ')' '{'
- ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
- | PARSEOP_DATABUFFER '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-/*
- * In RefOf, the node isn't really a target, but we can't keep track of it after
- * we've taken a pointer to it. (hard to tell if a local becomes initialized this way.)
- */
-RefOfTerm
- : PARSEOP_REFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_REFOF);}
- SuperName
- ')' {$$ = TrLinkChildren ($<n>3,1,TrSetNodeFlags ($4, NODE_IS_TARGET));}
- | PARSEOP_REFOF '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ReleaseTerm
- : PARSEOP_RELEASE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RELEASE);}
- SuperName
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_RELEASE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ResetTerm
- : PARSEOP_RESET '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RESET);}
- SuperName
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_RESET '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ReturnTerm
- : PARSEOP_RETURN '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RETURN);}
- OptionalReturnArg
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_RETURN {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_RETURN),1,TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_NULL_RETURN));}
- | PARSEOP_RETURN '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ScopeTerm
- : PARSEOP_SCOPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);}
- NameString
- ')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
- | PARSEOP_SCOPE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ShiftLeftTerm
- : PARSEOP_SHIFTLEFT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_SHIFTLEFT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ShiftRightTerm
- : PARSEOP_SHIFTRIGHT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_SHIFTRIGHT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-SignalTerm
- : PARSEOP_SIGNAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SIGNAL);}
- SuperName
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_SIGNAL '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-SizeOfTerm
- : PARSEOP_SIZEOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SIZEOF);}
- SuperName
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_SIZEOF '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-SleepTerm
- : PARSEOP_SLEEP '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SLEEP);}
- TermArg
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_SLEEP '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-StallTerm
- : PARSEOP_STALL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STALL);}
- TermArg
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_STALL '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-StoreTerm
- : PARSEOP_STORE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STORE);}
- TermArg
- ',' SuperName
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,TrSetNodeFlags ($6, NODE_IS_TARGET));}
- | PARSEOP_STORE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-SubtractTerm
- : PARSEOP_SUBTRACT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_SUBTRACT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-SwitchTerm
- : PARSEOP_SWITCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SWITCH);}
- TermArg
- ')' '{'
- CaseDefaultTermList '}'
- {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
- | PARSEOP_SWITCH '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ThermalZoneTerm
- : PARSEOP_THERMALZONE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);}
- NameString
- ')' '{'
- TermList '}' {$$ = TrLinkChildren ($<n>3,2,TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
- | PARSEOP_THERMALZONE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-TimerTerm
- : PARSEOP_TIMER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TIMER);}
- ')' {$$ = TrLinkChildren ($<n>3,0);}
- | PARSEOP_TIMER {$$ = TrLinkChildren (TrCreateLeafNode (PARSEOP_TIMER),0);}
- | PARSEOP_TIMER '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ToBCDTerm
- : PARSEOP_TOBCD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOBCD);}
- TermArg
- Target
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_TOBCD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ToBufferTerm
- : PARSEOP_TOBUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOBUFFER);}
- TermArg
- Target
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_TOBUFFER '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ToDecimalStringTerm
- : PARSEOP_TODECIMALSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TODECIMALSTRING);}
- TermArg
- Target
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_TODECIMALSTRING '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ToHexStringTerm
- : PARSEOP_TOHEXSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOHEXSTRING);}
- TermArg
- Target
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_TOHEXSTRING '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ToIntegerTerm
- : PARSEOP_TOINTEGER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOINTEGER);}
- TermArg
- Target
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_TOINTEGER '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ToPLDTerm
- : PARSEOP_TOPLD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOPLD);}
- PldKeywordList
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_TOPLD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-PldKeywordList
- : {$$ = NULL;}
- | PldKeyword
- PARSEOP_EXP_EQUALS Integer {$$ = TrLinkChildren ($1,1,$3);}
- | PldKeyword
- PARSEOP_EXP_EQUALS String {$$ = TrLinkChildren ($1,1,$3);}
- | PldKeywordList ',' /* Allows a trailing comma at list end */
- | PldKeywordList ','
- PldKeyword
- PARSEOP_EXP_EQUALS Integer {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
- | PldKeywordList ','
- PldKeyword
- PARSEOP_EXP_EQUALS String {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
- ;
-
-
-ToStringTerm
- : PARSEOP_TOSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOSTRING);}
- TermArg
- OptionalCount
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_TOSTRING '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-ToUUIDTerm
- : PARSEOP_TOUUID '('
- StringData ')' {$$ = TrUpdateNode (PARSEOP_TOUUID, $3);}
- | PARSEOP_TOUUID '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-UnicodeTerm
- : PARSEOP_UNICODE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UNICODE);}
- StringData
- ')' {$$ = TrLinkChildren ($<n>3,2,0,$4);}
- | PARSEOP_UNICODE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-UnloadTerm
- : PARSEOP_UNLOAD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UNLOAD);}
- SuperName
- ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
- | PARSEOP_UNLOAD '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-WaitTerm
- : PARSEOP_WAIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WAIT);}
- SuperName
- TermArgItem
- ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
- | PARSEOP_WAIT '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-XOrTerm
- : PARSEOP_XOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
- TermArg
- TermArgItem
- Target
- ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
- | PARSEOP_XOR '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-WhileTerm
- : PARSEOP_WHILE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
- TermArg
- ')' '{' TermList '}'
- {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
- | PARSEOP_WHILE '('
- error ')' {$$ = AslDoError(); yyclearin;}
- ;
-
-
-/*******************************************************************************
- *
* ASL Helper Terms
*
******************************************************************************/
AmlPackageLengthTerm
- : Integer {$$ = TrUpdateNode (PARSEOP_PACKAGE_LENGTH,(ACPI_PARSE_OBJECT *) $1);}
+ : Integer {$$ = TrUpdateNode (PARSEOP_PACKAGE_LENGTH,
+ (ACPI_PARSE_OBJECT *) $1);}
;
NameStringItem
@@ -1792,7 +778,8 @@ OptionalReference
;
OptionalReturnArg
- : {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */
+ : {$$ = TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO),
+ NODE_IS_NULL_RETURN);} /* Placeholder is a ZeroOp object */
| TermArg {$$ = $1;}
;
@@ -1807,11 +794,6 @@ OptionalTermArg
| TermArg {$$ = $1;}
;
-OptionalBufferLength
- : {$$ = NULL;}
- | TermArg {$$ = $1;}
- ;
-
OptionalWordConst
: {$$ = NULL;}
| WordConst {$$ = $1;}
diff --git a/src/acpica/source/compiler/asltokens.y b/src/acpica/source/compiler/asltokens.y
index 993d0f1..04e21ff 100644
--- a/src/acpica/source/compiler/asltokens.y
+++ b/src/acpica/source/compiler/asltokens.y
@@ -125,6 +125,16 @@ NoEcho('
*
*****************************************************************************/
+/*
+ * Most tokens are defined to return <i>, which is a UINT64.
+ *
+ * These tokens return <s>, a pointer to the associated lexed string:
+ *
+ * PARSEOP_NAMESEG
+ * PARSEOP_NAMESTRING
+ * PARSEOP_STRING_LITERAL
+ * PARSEOP_STRUCTURE_NAMESTRING
+ */
%token <i> PARSEOP_ACCESSAS
%token <i> PARSEOP_ACCESSATTRIB_BLOCK
%token <i> PARSEOP_ACCESSATTRIB_BLOCK_CALL
@@ -538,12 +548,42 @@ NoEcho('
%token <i> PARSEOP_FPRINTF
%token <i> PARSEOP_FOR
+/* Structures */
+
+%token <i> PARSEOP_STRUCTURE
+%token <s> PARSEOP_STRUCTURE_NAMESTRING
+%token <i> PARSEOP_STRUCTURE_TAG
+%token <i> PARSEOP_STRUCTURE_ELEMENT
+%token <i> PARSEOP_STRUCTURE_INSTANCE
+%token <i> PARSEOP_STRUCTURE_REFERENCE
+%token <i> PARSEOP_STRUCTURE_POINTER
+
+/* Top level */
+
+%token <i> PARSEOP_ASL_CODE
+
+
+/*******************************************************************************
+ *
+ * Tokens below are not in the aslmap.c file
+ *
+ ******************************************************************************/
+
+
+/* Tokens below this are not in the aslmap.c file */
+
/* Specific parentheses tokens are not used at this time */
/* PARSEOP_EXP_PAREN_OPEN */
/* PARSEOP_EXP_PAREN_CLOSE */
+/* ASL+ variable creation */
+
+%token <i> PARSEOP_INTEGER_TYPE
+%token <i> PARSEOP_STRING_TYPE
+%token <i> PARSEOP_BUFFER_TYPE
+%token <i> PARSEOP_PACKAGE_TYPE
+%token <i> PARSEOP_REFERENCE_TYPE
-%token <i> PARSEOP_ASL_CODE
/*
* Special functions. These should probably stay at the end of this
diff --git a/src/acpica/source/compiler/asltypes.y b/src/acpica/source/compiler/asltypes.y
index 118ad57..811bed6 100644
--- a/src/acpica/source/compiler/asltypes.y
+++ b/src/acpica/source/compiler/asltypes.y
@@ -350,7 +350,6 @@ NoEcho('
%type <n> PackageElement
%type <n> PackageList
%type <n> PackageTerm
-%type <n> VarPackageLengthTerm
/* Macros */
@@ -422,9 +421,9 @@ NoEcho('
%type <n> OptionalAddressRange
%type <n> OptionalBitsPerByte
%type <n> OptionalBuffer_Last
-%type <n> OptionalBufferLength
%type <n> OptionalByteConstExpr
%type <n> OptionalCount
+%type <n> OptionalDataCount
%type <n> OptionalDecodeType
%type <n> OptionalDevicePolarity
%type <n> OptionalDWordConstExpr
@@ -441,6 +440,7 @@ NoEcho('
%type <n> OptionalObjectTypeKeyword
%type <n> OptionalParameterTypePackage
%type <n> OptionalParameterTypesPackage
+%type <n> OptionalParentheses
%type <n> OptionalParityType
%type <n> OptionalPredicate
%type <n> OptionalQWordConstExpr
@@ -465,8 +465,53 @@ NoEcho('
%type <n> OptionalXferSize
/*
- * C-style expression parser
+ * ASL+ (C-style) parser
*/
+
+/* Expressions and symbolic operators */
+
%type <n> Expression
%type <n> EqualsTerm
%type <n> IndexExpTerm
+
+/* ASL+ Named object declaration support */
+/*
+%type <n> NameTermAslPlus
+
+%type <n> BufferBegin
+%type <n> BufferEnd
+%type <n> PackageBegin
+%type <n> PackageEnd
+%type <n> OptionalLength
+*/
+/* ASL+ Structure declarations */
+/*
+%type <n> StructureTerm
+%type <n> StructureTermBegin
+%type <n> StructureType
+%type <n> StructureTag
+%type <n> StructureElementList
+%type <n> StructureElement
+%type <n> StructureElementType
+%type <n> OptionalStructureElementType
+%type <n> StructureId
+*/
+/* Structure instantiantion */
+/*
+%type <n> StructureInstanceTerm
+%type <n> StructureTagReference
+%type <n> StructureInstanceEnd
+*/
+/* Pseudo-instantiantion for method Args/Locals */
+/*
+%type <n> MethodStructureTerm
+%type <n> LocalStructureName
+*/
+/* Direct structure references via the Index operator */
+/*
+%type <n> StructureReference
+%type <n> StructureIndexTerm
+%type <n> StructurePointerTerm
+%type <n> StructurePointerReference
+%type <n> OptionalDefinePointer
+*/
diff --git a/src/acpica/source/compiler/dtcompiler.h b/src/acpica/source/compiler/dtcompiler.h
index eb85ddc..1072f52 100644
--- a/src/acpica/source/compiler/dtcompiler.h
+++ b/src/acpica/source/compiler/dtcompiler.h
@@ -681,6 +681,7 @@ extern const unsigned char TemplateMtmr[];
extern const unsigned char TemplateNfit[];
extern const unsigned char TemplatePcct[];
extern const unsigned char TemplatePmtt[];
+extern const unsigned char TemplateRasf[];
extern const unsigned char TemplateRsdt[];
extern const unsigned char TemplateS3pt[];
extern const unsigned char TemplateSbst[];
diff --git a/src/acpica/source/compiler/dttable.c b/src/acpica/source/compiler/dttable.c
index 561c5ce..ee3d26d 100644
--- a/src/acpica/source/compiler/dttable.c
+++ b/src/acpica/source/compiler/dttable.c
@@ -201,9 +201,12 @@ DtCompileFadt (
DT_SUBTABLE *ParentTable;
DT_FIELD **PFieldList = (DT_FIELD **) List;
ACPI_TABLE_HEADER *Table;
- UINT8 Revision;
+ UINT8 FadtRevision;
+ UINT32 i;
+ /* Minimum table is the FADT version 1 (ACPI 1.0) */
+
Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt1,
&Subtable, TRUE);
if (ACPI_FAILURE (Status))
@@ -215,53 +218,48 @@ DtCompileFadt (
DtInsertSubtable (ParentTable, Subtable);
Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ParentTable->Buffer);
- Revision = Table->Revision;
+ FadtRevision = Table->Revision;
+
+ /* Revision 0 and 2 are illegal */
- if (Revision == 2)
+ if ((FadtRevision == 0) ||
+ (FadtRevision == 2))
{
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt2,
- &Subtable, TRUE);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
+ DtError (ASL_ERROR, 0, NULL,
+ "Invalid value for FADT revision");
- DtInsertSubtable (ParentTable, Subtable);
+ return (AE_BAD_VALUE);
}
- else if (Revision >= 2)
+
+ /* Revision out of supported range? */
+
+ if (FadtRevision > ACPI_FADT_MAX_VERSION)
{
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt3,
- &Subtable, TRUE);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
+ DtError (ASL_ERROR, 0, NULL,
+ "Unknown or unsupported value for FADT revision");
- DtInsertSubtable (ParentTable, Subtable);
+ return (AE_BAD_VALUE);
+ }
+
+ /* Compile individual sub-parts of the FADT, per-revision */
- if (Revision >= 5)
+ for (i = 3; i <= ACPI_FADT_MAX_VERSION; i++)
+ {
+ if (i > FadtRevision)
{
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt5,
- &Subtable, TRUE);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- DtInsertSubtable (ParentTable, Subtable);
+ break;
}
- if (Revision >= 6)
+ /* Compile the fields specific to this FADT revision */
+
+ Status = DtCompileTable (PFieldList, FadtRevisionInfo[i],
+ &Subtable, TRUE);
+ if (ACPI_FAILURE (Status))
{
- Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt6,
- &Subtable, TRUE);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- DtInsertSubtable (ParentTable, Subtable);
+ return (Status);
}
+
+ DtInsertSubtable (ParentTable, Subtable);
}
return (AE_OK);
diff --git a/src/acpica/source/compiler/dttemplate.h b/src/acpica/source/compiler/dttemplate.h
index e420ec4..8bf873b 100644
--- a/src/acpica/source/compiler/dttemplate.h
+++ b/src/acpica/source/compiler/dttemplate.h
@@ -978,6 +978,16 @@ const unsigned char TemplatePmtt[] =
0x00,0x00,0x00,0x00 /* 000000B0 "...." */
};
+const unsigned char TemplateRasf[] =
+{
+ 0x52,0x41,0x53,0x46,0x30,0x00,0x00,0x00, /* 00000000 "RASF0..." */
+ 0x01,0x31,0x49,0x4E,0x54,0x45,0x4C,0x20, /* 00000008 ".1INTEL " */
+ 0x54,0x65,0x6D,0x70,0x6C,0x61,0x74,0x65, /* 00000010 "Template" */
+ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
+ 0x27,0x05,0x16,0x20,0x00,0x00,0x00,0x00, /* 00000020 "'.. ...." */
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 /* 00000028 "........" */
+};
+
const unsigned char TemplateRsdp[] =
{
0x52,0x53,0x44,0x20,0x50,0x54,0x52,0x20, /* 00000000 "RSD PTR " */
diff --git a/src/acpica/source/compiler/dtutils.c b/src/acpica/source/compiler/dtutils.c
index 6ca418c..fa12b51 100644
--- a/src/acpica/source/compiler/dtutils.c
+++ b/src/acpica/source/compiler/dtutils.c
@@ -439,6 +439,7 @@ DtGetFieldType (
case ACPI_DMT_RAW_BUFFER:
case ACPI_DMT_BUF7:
case ACPI_DMT_BUF10:
+ case ACPI_DMT_BUF12:
case ACPI_DMT_BUF16:
case ACPI_DMT_BUF128:
case ACPI_DMT_PCI_PATH:
@@ -688,6 +689,11 @@ DtGetFieldLength (
ByteLength = 10;
break;
+ case ACPI_DMT_BUF12:
+
+ ByteLength = 12;
+ break;
+
case ACPI_DMT_BUF16:
case ACPI_DMT_UUID:
diff --git a/src/acpica/source/components/debugger/dbfileio.c b/src/acpica/source/components/debugger/dbfileio.c
index d7942b7..ecc202f 100644
--- a/src/acpica/source/components/debugger/dbfileio.c
+++ b/src/acpica/source/components/debugger/dbfileio.c
@@ -118,15 +118,15 @@
#include "accommon.h"
#include "acdebug.h"
#include "actables.h"
-#include <stdio.h>
-#ifdef ACPI_APPLICATION
-#include "acapps.h"
-#endif
#define _COMPONENT ACPI_CA_DEBUGGER
ACPI_MODULE_NAME ("dbfileio")
+#ifdef ACPI_APPLICATION
+#include "acapps.h"
+
+
#ifdef ACPI_DEBUGGER
/*******************************************************************************
*
@@ -145,8 +145,6 @@ AcpiDbCloseDebugFile (
void)
{
-#ifdef ACPI_APPLICATION
-
if (AcpiGbl_DebugFile)
{
fclose (AcpiGbl_DebugFile);
@@ -155,7 +153,6 @@ AcpiDbCloseDebugFile (
AcpiOsPrintf ("Debug output file %s closed\n",
AcpiGbl_DbDebugFilename);
}
-#endif
}
@@ -176,8 +173,6 @@ AcpiDbOpenDebugFile (
char *Name)
{
-#ifdef ACPI_APPLICATION
-
AcpiDbCloseDebugFile ();
AcpiGbl_DebugFile = fopen (Name, "w+");
if (!AcpiGbl_DebugFile)
@@ -190,8 +185,6 @@ AcpiDbOpenDebugFile (
strncpy (AcpiGbl_DbDebugFilename, Name,
sizeof (AcpiGbl_DbDebugFilename));
AcpiGbl_DbOutputToFile = TRUE;
-
-#endif
}
#endif
@@ -241,8 +234,7 @@ AcpiDbLoadTables (
return (Status);
}
- fprintf (stderr,
- "Acpi table [%4.4s] successfully installed and loaded\n",
+ AcpiOsPrintf ("Acpi table [%4.4s] successfully installed and loaded\n",
Table->Signature);
TableListHead = TableListHead->Next;
@@ -250,3 +242,4 @@ AcpiDbLoadTables (
return (AE_OK);
}
+#endif
diff --git a/src/acpica/source/components/tables/tbfadt.c b/src/acpica/source/components/tables/tbfadt.c
index 413b2fd..6fb738d 100644
--- a/src/acpica/source/components/tables/tbfadt.c
+++ b/src/acpica/source/components/tables/tbfadt.c
@@ -588,17 +588,19 @@ AcpiTbConvertFadt (
/*
- * For ACPI 1.0 FADTs (revision 1 or 2), ensure that reserved fields which
+ * For ACPI 1.0 FADTs (revision 1), ensure that reserved fields which
* should be zero are indeed zero. This will workaround BIOSs that
* inadvertently place values in these fields.
*
* The ACPI 1.0 reserved fields that will be zeroed are the bytes located
* at offset 45, 55, 95, and the word located at offset 109, 110.
*
- * Note: The FADT revision value is unreliable. Only the length can be
- * trusted.
+ * Note: The FADT revision value is unreliable because of BIOS errors.
+ * The table length is instead used as the final word on the version.
+ *
+ * Note: FADT revision 3 is the ACPI 2.0 version of the FADT.
*/
- if (AcpiGbl_FADT.Header.Length <= ACPI_FADT_V2_SIZE)
+ if (AcpiGbl_FADT.Header.Length <= ACPI_FADT_V3_SIZE)
{
AcpiGbl_FADT.PreferredProfile = 0;
AcpiGbl_FADT.PstateControl = 0;
diff --git a/src/acpica/source/components/tables/tbutils.c b/src/acpica/source/components/tables/tbutils.c
index fd1d427..f270b94 100644
--- a/src/acpica/source/components/tables/tbutils.c
+++ b/src/acpica/source/components/tables/tbutils.c
@@ -345,7 +345,7 @@ AcpiTbGetRootTableEntry (
*
******************************************************************************/
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiTbParseRootTable (
ACPI_PHYSICAL_ADDRESS RsdpAddress)
{
diff --git a/src/acpica/source/components/tables/tbxface.c b/src/acpica/source/components/tables/tbxface.c
index 09753bf..9ac9dc1 100644
--- a/src/acpica/source/components/tables/tbxface.c
+++ b/src/acpica/source/components/tables/tbxface.c
@@ -175,7 +175,7 @@ AcpiAllocateRootTable (
*
******************************************************************************/
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInitializeTables (
ACPI_TABLE_DESC *InitialTableArray,
UINT32 InitialTableCount,
@@ -251,7 +251,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInitializeTables)
*
******************************************************************************/
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiReallocateRootTable (
void)
{
diff --git a/src/acpica/source/components/tables/tbxfload.c b/src/acpica/source/components/tables/tbxfload.c
index 6c6f2be..6ffc3cc 100644
--- a/src/acpica/source/components/tables/tbxfload.c
+++ b/src/acpica/source/components/tables/tbxfload.c
@@ -137,7 +137,7 @@
*
******************************************************************************/
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiLoadTables (
void)
{
@@ -372,7 +372,7 @@ UnlockAndExit:
*
******************************************************************************/
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInstallTable (
ACPI_PHYSICAL_ADDRESS Address,
BOOLEAN Physical)
diff --git a/src/acpica/source/components/tables/tbxfroot.c b/src/acpica/source/components/tables/tbxfroot.c
index c5275c8..abd29a8 100644
--- a/src/acpica/source/components/tables/tbxfroot.c
+++ b/src/acpica/source/components/tables/tbxfroot.c
@@ -228,7 +228,7 @@ AcpiTbValidateRsdp (
*
******************************************************************************/
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiFindRootPointer (
ACPI_PHYSICAL_ADDRESS *TableAddress)
{
@@ -334,7 +334,7 @@ AcpiFindRootPointer (
return_ACPI_STATUS (AE_NOT_FOUND);
}
-ACPI_EXPORT_SYMBOL (AcpiFindRootPointer)
+ACPI_EXPORT_SYMBOL_INIT (AcpiFindRootPointer)
/*******************************************************************************
diff --git a/src/acpica/source/components/utilities/utbuffer.c b/src/acpica/source/components/utilities/utbuffer.c
index 4a50e9e..fe5c7d5 100644
--- a/src/acpica/source/components/utilities/utbuffer.c
+++ b/src/acpica/source/components/utilities/utbuffer.c
@@ -336,7 +336,7 @@ AcpiUtDumpBufferToFile (
if (!Buffer)
{
- AcpiUtFilePrintf (File, "Null Buffer Pointer in DumpBuffer!\n");
+ fprintf (File, "Null Buffer Pointer in DumpBuffer!\n");
return;
}
@@ -351,7 +351,7 @@ AcpiUtDumpBufferToFile (
{
/* Print current offset */
- AcpiUtFilePrintf (File, "%6.4X: ", (BaseOffset + i));
+ fprintf (File, "%6.4X: ", (BaseOffset + i));
/* Print 16 hex chars */
@@ -361,7 +361,7 @@ AcpiUtDumpBufferToFile (
{
/* Dump fill spaces */
- AcpiUtFilePrintf (File, "%*s", ((Display * 2) + 1), " ");
+ fprintf (File, "%*s", ((Display * 2) + 1), " ");
j += Display;
continue;
}
@@ -371,28 +371,28 @@ AcpiUtDumpBufferToFile (
case DB_BYTE_DISPLAY:
default: /* Default is BYTE display */
- AcpiUtFilePrintf (File, "%02X ", Buffer[(ACPI_SIZE) i + j]);
+ fprintf (File, "%02X ", Buffer[(ACPI_SIZE) i + j]);
break;
case DB_WORD_DISPLAY:
ACPI_MOVE_16_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
- AcpiUtFilePrintf (File, "%04X ", Temp32);
+ fprintf (File, "%04X ", Temp32);
break;
case DB_DWORD_DISPLAY:
ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
- AcpiUtFilePrintf (File, "%08X ", Temp32);
+ fprintf (File, "%08X ", Temp32);
break;
case DB_QWORD_DISPLAY:
ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
- AcpiUtFilePrintf (File, "%08X", Temp32);
+ fprintf (File, "%08X", Temp32);
ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j + 4]);
- AcpiUtFilePrintf (File, "%08X ", Temp32);
+ fprintf (File, "%08X ", Temp32);
break;
}
@@ -403,29 +403,29 @@ AcpiUtDumpBufferToFile (
* Print the ASCII equivalent characters but watch out for the bad
* unprintable ones (printable chars are 0x20 through 0x7E)
*/
- AcpiUtFilePrintf (File, " ");
+ fprintf (File, " ");
for (j = 0; j < 16; j++)
{
if (i + j >= Count)
{
- AcpiUtFilePrintf (File, "\n");
+ fprintf (File, "\n");
return;
}
BufChar = Buffer[(ACPI_SIZE) i + j];
if (isprint (BufChar))
{
- AcpiUtFilePrintf (File, "%c", BufChar);
+ fprintf (File, "%c", BufChar);
}
else
{
- AcpiUtFilePrintf (File, ".");
+ fprintf (File, ".");
}
}
/* Done with that line. */
- AcpiUtFilePrintf (File, "\n");
+ fprintf (File, "\n");
i += 16;
}
diff --git a/src/acpica/source/components/utilities/utdebug.c b/src/acpica/source/components/utilities/utdebug.c
index 4d2b306..995d45c 100644
--- a/src/acpica/source/components/utilities/utdebug.c
+++ b/src/acpica/source/components/utilities/utdebug.c
@@ -780,33 +780,3 @@ AcpiTracePoint (
ACPI_EXPORT_SYMBOL (AcpiTracePoint)
#endif
-
-
-#ifdef ACPI_APPLICATION
-/*******************************************************************************
- *
- * FUNCTION: AcpiLogError
- *
- * PARAMETERS: Format - Printf format field
- * ... - Optional printf arguments
- *
- * RETURN: None
- *
- * DESCRIPTION: Print error message to the console, used by applications.
- *
- ******************************************************************************/
-
-void ACPI_INTERNAL_VAR_XFACE
-AcpiLogError (
- const char *Format,
- ...)
-{
- va_list Args;
-
- va_start (Args, Format);
- (void) AcpiUtFileVprintf (ACPI_FILE_ERR, Format, Args);
- va_end (Args);
-}
-
-ACPI_EXPORT_SYMBOL (AcpiLogError)
-#endif
diff --git a/src/acpica/source/components/utilities/utinit.c b/src/acpica/source/components/utilities/utinit.c
index 7a80f43..ba42ad2 100644
--- a/src/acpica/source/components/utilities/utinit.c
+++ b/src/acpica/source/components/utilities/utinit.c
@@ -298,7 +298,7 @@ AcpiUtInitGlobals (
AcpiGbl_NextOwnerIdOffset = 0;
AcpiGbl_DebuggerConfiguration = DEBUGGER_THREADING;
AcpiGbl_OsiMutex = NULL;
- AcpiGbl_MaxLoopIterations = 0xFFFF;
+ AcpiGbl_MaxLoopIterations = ACPI_MAX_LOOP_COUNT;
/* Hardware oriented */
diff --git a/src/acpica/source/components/utilities/utpredef.c b/src/acpica/source/components/utilities/utpredef.c
index 01196bb..a97064c 100644
--- a/src/acpica/source/components/utilities/utpredef.c
+++ b/src/acpica/source/components/utilities/utpredef.c
@@ -268,8 +268,6 @@ AcpiUtGetExpectedReturnTypes (
******************************************************************************/
#if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
-#include <stdio.h>
-#include <string.h>
/* Local prototypes */
diff --git a/src/acpica/source/components/utilities/utprint.c b/src/acpica/source/components/utilities/utprint.c
index 5ca859e..552656f 100644
--- a/src/acpica/source/components/utilities/utprint.c
+++ b/src/acpica/source/components/utilities/utprint.c
@@ -488,7 +488,7 @@ AcpiUtFormatNumber (
/*******************************************************************************
*
- * FUNCTION: AcpiUtVsnprintf
+ * FUNCTION: vsnprintf
*
* PARAMETERS: String - String with boundary
* Size - Boundary of the string
@@ -502,7 +502,7 @@ AcpiUtFormatNumber (
******************************************************************************/
int
-AcpiUtVsnprintf (
+vsnprintf (
char *String,
ACPI_SIZE Size,
const char *Format,
@@ -785,7 +785,7 @@ AcpiUtVsnprintf (
/*******************************************************************************
*
- * FUNCTION: AcpiUtSnprintf
+ * FUNCTION: snprintf
*
* PARAMETERS: String - String with boundary
* Size - Boundary of the string
@@ -798,7 +798,7 @@ AcpiUtVsnprintf (
******************************************************************************/
int
-AcpiUtSnprintf (
+snprintf (
char *String,
ACPI_SIZE Size,
const char *Format,
@@ -809,7 +809,38 @@ AcpiUtSnprintf (
va_start (Args, Format);
- Length = AcpiUtVsnprintf (String, Size, Format, Args);
+ Length = vsnprintf (String, Size, Format, Args);
+ va_end (Args);
+
+ return (Length);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: sprintf
+ *
+ * PARAMETERS: String - String with boundary
+ * Format, ... - Standard printf format
+ *
+ * RETURN: Number of bytes actually written.
+ *
+ * DESCRIPTION: Formatted output to a string.
+ *
+ ******************************************************************************/
+
+int
+sprintf (
+ char *String,
+ const char *Format,
+ ...)
+{
+ va_list Args;
+ int Length;
+
+
+ va_start (Args, Format);
+ Length = vsnprintf (String, ACPI_UINT32_MAX, Format, Args);
va_end (Args);
return (Length);
@@ -819,7 +850,69 @@ AcpiUtSnprintf (
#ifdef ACPI_APPLICATION
/*******************************************************************************
*
- * FUNCTION: AcpiUtFileVprintf
+ * FUNCTION: vprintf
+ *
+ * PARAMETERS: Format - Standard printf format
+ * Args - Argument list
+ *
+ * RETURN: Number of bytes actually written.
+ *
+ * DESCRIPTION: Formatted output to stdout using argument list pointer.
+ *
+ ******************************************************************************/
+
+int
+vprintf (
+ const char *Format,
+ va_list Args)
+{
+ ACPI_CPU_FLAGS Flags;
+ int Length;
+
+
+ Flags = AcpiOsAcquireLock (AcpiGbl_PrintLock);
+ Length = vsnprintf (AcpiGbl_PrintBuffer,
+ sizeof (AcpiGbl_PrintBuffer), Format, Args);
+
+ (void) fwrite (AcpiGbl_PrintBuffer, Length, 1, ACPI_FILE_OUT);
+ AcpiOsReleaseLock (AcpiGbl_PrintLock, Flags);
+
+ return (Length);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: printf
+ *
+ * PARAMETERS: Format, ... - Standard printf format
+ *
+ * RETURN: Number of bytes actually written.
+ *
+ * DESCRIPTION: Formatted output to stdout.
+ *
+ ******************************************************************************/
+
+int
+printf (
+ const char *Format,
+ ...)
+{
+ va_list Args;
+ int Length;
+
+
+ va_start (Args, Format);
+ Length = vprintf (Format, Args);
+ va_end (Args);
+
+ return (Length);
+}
+
+
+/*******************************************************************************
+ *
+ * FUNCTION: vfprintf
*
* PARAMETERS: File - File descriptor
* Format - Standard printf format
@@ -832,8 +925,8 @@ AcpiUtSnprintf (
******************************************************************************/
int
-AcpiUtFileVprintf (
- ACPI_FILE File,
+vfprintf (
+ FILE *File,
const char *Format,
va_list Args)
{
@@ -842,10 +935,10 @@ AcpiUtFileVprintf (
Flags = AcpiOsAcquireLock (AcpiGbl_PrintLock);
- Length = AcpiUtVsnprintf (AcpiGbl_PrintBuffer,
+ Length = vsnprintf (AcpiGbl_PrintBuffer,
sizeof (AcpiGbl_PrintBuffer), Format, Args);
- (void) AcpiOsWriteFile (File, AcpiGbl_PrintBuffer, Length, 1);
+ (void) fwrite (AcpiGbl_PrintBuffer, Length, 1, File);
AcpiOsReleaseLock (AcpiGbl_PrintLock, Flags);
return (Length);
@@ -854,7 +947,7 @@ AcpiUtFileVprintf (
/*******************************************************************************
*
- * FUNCTION: AcpiUtFilePrintf
+ * FUNCTION: fprintf
*
* PARAMETERS: File - File descriptor
* Format, ... - Standard printf format
@@ -866,8 +959,8 @@ AcpiUtFileVprintf (
******************************************************************************/
int
-AcpiUtFilePrintf (
- ACPI_FILE File,
+fprintf (
+ FILE *File,
const char *Format,
...)
{
@@ -876,7 +969,7 @@ AcpiUtFilePrintf (
va_start (Args, Format);
- Length = AcpiUtFileVprintf (File, Format, Args);
+ Length = vfprintf (File, Format, Args);
va_end (Args);
return (Length);
diff --git a/src/acpica/source/components/utilities/uttrack.c b/src/acpica/source/components/utilities/uttrack.c
index cd3495f..c3cb9b9 100644
--- a/src/acpica/source/components/utilities/uttrack.c
+++ b/src/acpica/source/components/utilities/uttrack.c
@@ -179,14 +179,12 @@ AcpiUtCreateList (
ACPI_MEMORY_LIST *Cache;
- Cache = AcpiOsAllocate (sizeof (ACPI_MEMORY_LIST));
+ Cache = AcpiOsAllocateZeroed (sizeof (ACPI_MEMORY_LIST));
if (!Cache)
{
return (AE_NO_MEMORY);
}
- memset (Cache, 0, sizeof (ACPI_MEMORY_LIST));
-
Cache->ListName = ListName;
Cache->ObjectSize = ObjectSize;
diff --git a/src/acpica/source/components/utilities/utxface.c b/src/acpica/source/components/utilities/utxface.c
index b616ed9..a8aeef6 100644
--- a/src/acpica/source/components/utilities/utxface.c
+++ b/src/acpica/source/components/utilities/utxface.c
@@ -135,7 +135,7 @@
*
******************************************************************************/
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiTerminate (
void)
{
diff --git a/src/acpica/source/components/utilities/utxfinit.c b/src/acpica/source/components/utilities/utxfinit.c
index c6a26d9..c6f875c 100644
--- a/src/acpica/source/components/utilities/utxfinit.c
+++ b/src/acpica/source/components/utilities/utxfinit.c
@@ -144,7 +144,7 @@ AeDoObjectOverrides (
*
******************************************************************************/
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInitializeSubsystem (
void)
{
@@ -223,7 +223,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInitializeSubsystem)
*
******************************************************************************/
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiEnableSubsystem (
UINT32 Flags)
{
@@ -335,7 +335,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiEnableSubsystem)
*
******************************************************************************/
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInitializeObjects (
UINT32 Flags)
{
diff --git a/src/acpica/source/include/acapps.h b/src/acpica/source/include/acapps.h
index b8ab5a3..d580245 100644
--- a/src/acpica/source/include/acapps.h
+++ b/src/acpica/source/include/acapps.h
@@ -116,11 +116,9 @@
#ifndef _ACAPPS
#define _ACAPPS
-#include <stdio.h>
-
-#ifdef _MSC_VER /* disable some level-4 warnings */
-#pragma warning(disable:4100) /* warning C4100: unreferenced formal parameter */
-#endif
+#ifdef ACPI_USE_STANDARD_HEADERS
+#include <sys/stat.h>
+#endif /* ACPI_USE_STANDARD_HEADERS */
/* Common info for tool signons */
@@ -157,13 +155,13 @@
/* Macros for usage messages */
#define ACPI_USAGE_HEADER(Usage) \
- AcpiOsPrintf ("Usage: %s\nOptions:\n", Usage);
+ printf ("Usage: %s\nOptions:\n", Usage);
#define ACPI_USAGE_TEXT(Description) \
- AcpiOsPrintf (Description);
+ printf (Description);
#define ACPI_OPTION(Name, Description) \
- AcpiOsPrintf (" %-20s%s\n", Name, Description);
+ printf (" %-20s%s\n", Name, Description);
/* Check for unexpected exceptions */
diff --git a/src/acpica/source/include/acconfig.h b/src/acpica/source/include/acconfig.h
index 96da50c..23cf1c2 100644
--- a/src/acpica/source/include/acconfig.h
+++ b/src/acpica/source/include/acconfig.h
@@ -218,6 +218,10 @@
#define ACPI_ADDRESS_RANGE_MAX 2
+/* Maximum number of While() loops before abort */
+
+#define ACPI_MAX_LOOP_COUNT 0xFFFF
+
/******************************************************************************
*
diff --git a/src/acpica/source/include/acdisasm.h b/src/acpica/source/include/acdisasm.h
index ba8f274..640ecf5 100644
--- a/src/acpica/source/include/acdisasm.h
+++ b/src/acpica/source/include/acdisasm.h
@@ -181,6 +181,7 @@ typedef enum
ACPI_DMT_UINT64,
ACPI_DMT_BUF7,
ACPI_DMT_BUF10,
+ ACPI_DMT_BUF12,
ACPI_DMT_BUF16,
ACPI_DMT_BUF128,
ACPI_DMT_SIG,
@@ -351,8 +352,8 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFacs[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[];
-extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt4[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt6[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt[];
@@ -458,6 +459,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcctHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[];
+extern ACPI_DMTABLE_INFO AcpiDmTableInfoRasf[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[];
@@ -495,6 +497,9 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoXenv[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGeneric[][2];
+extern ACPI_DMTABLE_INFO *FadtRevisionInfo [ACPI_FADT_MAX_VERSION + 1];
+
+
/*
* dmtable and ahtable
*/
diff --git a/src/acpica/source/include/acglobal.h b/src/acpica/source/include/acglobal.h
index 2376312..001519f 100644
--- a/src/acpica/source/include/acglobal.h
+++ b/src/acpica/source/include/acglobal.h
@@ -464,6 +464,7 @@ ACPI_GLOBAL (const char, *AcpiGbl_PldShapeList[]);
ACPI_INIT_GLOBAL (ACPI_FILE, AcpiGbl_DebugFile, NULL);
ACPI_INIT_GLOBAL (ACPI_FILE, AcpiGbl_OutputFile, NULL);
+ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DebugTimeout, FALSE);
/* Print buffer */
diff --git a/src/acpica/source/include/acpiosxf.h b/src/acpica/source/include/acpiosxf.h
index 550e264..60d61f1 100644
--- a/src/acpica/source/include/acpiosxf.h
+++ b/src/acpica/source/include/acpiosxf.h
@@ -564,6 +564,15 @@ AcpiOsGetLine (
UINT32 *BytesRead);
#endif
+#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTracePoint
+void
+AcpiOsTracePoint (
+ ACPI_TRACE_EVENT_TYPE Type,
+ BOOLEAN Begin,
+ UINT8 *Aml,
+ char *Pathname);
+#endif
+
/*
* Obtain ACPI table(s)
@@ -624,62 +633,4 @@ AcpiOsCloseDirectory (
#endif
-/*
- * File I/O and related support
- */
-#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsOpenFile
-ACPI_FILE
-AcpiOsOpenFile (
- const char *Path,
- UINT8 Modes);
-#endif
-
-#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCloseFile
-void
-AcpiOsCloseFile (
- ACPI_FILE File);
-#endif
-
-#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadFile
-int
-AcpiOsReadFile (
- ACPI_FILE File,
- void *Buffer,
- ACPI_SIZE Size,
- ACPI_SIZE Count);
-#endif
-
-#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWriteFile
-int
-AcpiOsWriteFile (
- ACPI_FILE File,
- void *Buffer,
- ACPI_SIZE Size,
- ACPI_SIZE Count);
-#endif
-
-#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetFileOffset
-long
-AcpiOsGetFileOffset (
- ACPI_FILE File);
-#endif
-
-#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSetFileOffset
-ACPI_STATUS
-AcpiOsSetFileOffset (
- ACPI_FILE File,
- long Offset,
- UINT8 From);
-#endif
-
-#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTracePoint
-void
-AcpiOsTracePoint (
- ACPI_TRACE_EVENT_TYPE Type,
- BOOLEAN Begin,
- UINT8 *Aml,
- char *Pathname);
-#endif
-
-
#endif /* __ACPIOSXF_H__ */
diff --git a/src/acpica/source/include/acpixf.h b/src/acpica/source/include/acpixf.h
index 2f939b1..68faadc 100644
--- a/src/acpica/source/include/acpixf.h
+++ b/src/acpica/source/include/acpixf.h
@@ -118,7 +118,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
-#define ACPI_CA_VERSION 0x20160527
+#define ACPI_CA_VERSION 0x20160729
#include "acconfig.h"
#include "actypes.h"
@@ -492,29 +492,29 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning);
* Initialization
*/
ACPI_EXTERNAL_RETURN_STATUS (
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInitializeTables (
ACPI_TABLE_DESC *InitialStorage,
UINT32 InitialTableCount,
BOOLEAN AllowResize))
ACPI_EXTERNAL_RETURN_STATUS (
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInitializeSubsystem (
void))
ACPI_EXTERNAL_RETURN_STATUS (
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiEnableSubsystem (
UINT32 Flags))
ACPI_EXTERNAL_RETURN_STATUS (
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInitializeObjects (
UINT32 Flags))
ACPI_EXTERNAL_RETURN_STATUS (
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiTerminate (
void))
@@ -592,7 +592,7 @@ AcpiDecodePldBuffer (
* ACPI table load/unload interfaces
*/
ACPI_EXTERNAL_RETURN_STATUS (
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInstallTable (
ACPI_PHYSICAL_ADDRESS Address,
BOOLEAN Physical))
@@ -608,7 +608,7 @@ AcpiUnloadParentTable (
ACPI_HANDLE Object))
ACPI_EXTERNAL_RETURN_STATUS (
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiLoadTables (
void))
@@ -617,12 +617,12 @@ AcpiLoadTables (
* ACPI table manipulation interfaces
*/
ACPI_EXTERNAL_RETURN_STATUS (
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiReallocateRootTable (
void))
ACPI_EXTERNAL_RETURN_STATUS (
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiFindRootPointer (
ACPI_PHYSICAL_ADDRESS *RsdpAddress))
@@ -1304,13 +1304,6 @@ AcpiTracePoint (
UINT8 *Aml,
char *Pathname))
-ACPI_APP_DEPENDENT_RETURN_VOID (
-ACPI_PRINTF_LIKE(1)
-void ACPI_INTERNAL_VAR_XFACE
-AcpiLogError (
- const char *Format,
- ...))
-
ACPI_STATUS
AcpiInitializeDebugger (
void);
diff --git a/src/acpica/source/include/actables.h b/src/acpica/source/include/actables.h
index 204af43..31a4b7d 100644
--- a/src/acpica/source/include/actables.h
+++ b/src/acpica/source/include/actables.h
@@ -314,7 +314,7 @@ AcpiTbInstallFixedTable (
char *Signature,
UINT32 *TableIndex);
-ACPI_STATUS
+ACPI_STATUS ACPI_INIT_FUNCTION
AcpiTbParseRootTable (
ACPI_PHYSICAL_ADDRESS RsdpAddress);
diff --git a/src/acpica/source/include/actbl.h b/src/acpica/source/include/actbl.h
index 65261e1..3c73998 100644
--- a/src/acpica/source/include/actbl.h
+++ b/src/acpica/source/include/actbl.h
@@ -328,62 +328,72 @@ typedef struct acpi_table_facs
typedef struct acpi_table_fadt
{
- ACPI_TABLE_HEADER Header; /* Common ACPI table header */
- UINT32 Facs; /* 32-bit physical address of FACS */
- UINT32 Dsdt; /* 32-bit physical address of DSDT */
- UINT8 Model; /* System Interrupt Model (ACPI 1.0) - not used in ACPI 2.0+ */
- UINT8 PreferredProfile; /* Conveys preferred power management profile to OSPM. */
- UINT16 SciInterrupt; /* System vector of SCI interrupt */
- UINT32 SmiCommand; /* 32-bit Port address of SMI command port */
- UINT8 AcpiEnable; /* Value to write to SMI_CMD to enable ACPI */
- UINT8 AcpiDisable; /* Value to write to SMI_CMD to disable ACPI */
- UINT8 S4BiosRequest; /* Value to write to SMI_CMD to enter S4BIOS state */
- UINT8 PstateControl; /* Processor performance state control*/
- UINT32 Pm1aEventBlock; /* 32-bit port address of Power Mgt 1a Event Reg Blk */
- UINT32 Pm1bEventBlock; /* 32-bit port address of Power Mgt 1b Event Reg Blk */
- UINT32 Pm1aControlBlock; /* 32-bit port address of Power Mgt 1a Control Reg Blk */
- UINT32 Pm1bControlBlock; /* 32-bit port address of Power Mgt 1b Control Reg Blk */
- UINT32 Pm2ControlBlock; /* 32-bit port address of Power Mgt 2 Control Reg Blk */
- UINT32 PmTimerBlock; /* 32-bit port address of Power Mgt Timer Ctrl Reg Blk */
- UINT32 Gpe0Block; /* 32-bit port address of General Purpose Event 0 Reg Blk */
- UINT32 Gpe1Block; /* 32-bit port address of General Purpose Event 1 Reg Blk */
- UINT8 Pm1EventLength; /* Byte Length of ports at Pm1xEventBlock */
- UINT8 Pm1ControlLength; /* Byte Length of ports at Pm1xControlBlock */
- UINT8 Pm2ControlLength; /* Byte Length of ports at Pm2ControlBlock */
- UINT8 PmTimerLength; /* Byte Length of ports at PmTimerBlock */
- UINT8 Gpe0BlockLength; /* Byte Length of ports at Gpe0Block */
- UINT8 Gpe1BlockLength; /* Byte Length of ports at Gpe1Block */
- UINT8 Gpe1Base; /* Offset in GPE number space where GPE1 events start */
- UINT8 CstControl; /* Support for the _CST object and C-States change notification */
- UINT16 C2Latency; /* Worst case HW latency to enter/exit C2 state */
- UINT16 C3Latency; /* Worst case HW latency to enter/exit C3 state */
- UINT16 FlushSize; /* Processor memory cache line width, in bytes */
- UINT16 FlushStride; /* Number of flush strides that need to be read */
- UINT8 DutyOffset; /* Processor duty cycle index in processor P_CNT reg */
- UINT8 DutyWidth; /* Processor duty cycle value bit width in P_CNT register */
- UINT8 DayAlarm; /* Index to day-of-month alarm in RTC CMOS RAM */
- UINT8 MonthAlarm; /* Index to month-of-year alarm in RTC CMOS RAM */
- UINT8 Century; /* Index to century in RTC CMOS RAM */
- UINT16 BootFlags; /* IA-PC Boot Architecture Flags (see below for individual flags) */
- UINT8 Reserved; /* Reserved, must be zero */
- UINT32 Flags; /* Miscellaneous flag bits (see below for individual flags) */
- ACPI_GENERIC_ADDRESS ResetRegister; /* 64-bit address of the Reset register */
- UINT8 ResetValue; /* Value to write to the ResetRegister port to reset the system */
- UINT16 ArmBootFlags; /* ARM-Specific Boot Flags (see below for individual flags) (ACPI 5.1) */
- UINT8 MinorRevision; /* FADT Minor Revision (ACPI 5.1) */
- UINT64 XFacs; /* 64-bit physical address of FACS */
- UINT64 XDsdt; /* 64-bit physical address of DSDT */
- ACPI_GENERIC_ADDRESS XPm1aEventBlock; /* 64-bit Extended Power Mgt 1a Event Reg Blk address */
- ACPI_GENERIC_ADDRESS XPm1bEventBlock; /* 64-bit Extended Power Mgt 1b Event Reg Blk address */
- ACPI_GENERIC_ADDRESS XPm1aControlBlock; /* 64-bit Extended Power Mgt 1a Control Reg Blk address */
- ACPI_GENERIC_ADDRESS XPm1bControlBlock; /* 64-bit Extended Power Mgt 1b Control Reg Blk address */
- ACPI_GENERIC_ADDRESS XPm2ControlBlock; /* 64-bit Extended Power Mgt 2 Control Reg Blk address */
- ACPI_GENERIC_ADDRESS XPmTimerBlock; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */
- ACPI_GENERIC_ADDRESS XGpe0Block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */
- ACPI_GENERIC_ADDRESS XGpe1Block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */
- ACPI_GENERIC_ADDRESS SleepControl; /* 64-bit Sleep Control register (ACPI 5.0) */
- ACPI_GENERIC_ADDRESS SleepStatus; /* 64-bit Sleep Status register (ACPI 5.0) */
- UINT64 HypervisorId; /* Hypervisor Vendor ID (ACPI 6.0) */
+ ACPI_TABLE_HEADER Header; /* [V1] Common ACPI table header */
+ UINT32 Facs; /* [V1] 32-bit physical address of FACS */
+ UINT32 Dsdt; /* [V1] 32-bit physical address of DSDT */
+ UINT8 Model; /* [V1] System Interrupt Model (ACPI 1.0) - not used in ACPI 2.0+ */
+ UINT8 PreferredProfile; /* [V1] Conveys preferred power management profile to OSPM. */
+ UINT16 SciInterrupt; /* [V1] System vector of SCI interrupt */
+ UINT32 SmiCommand; /* [V1] 32-bit Port address of SMI command port */
+ UINT8 AcpiEnable; /* [V1] Value to write to SMI_CMD to enable ACPI */
+ UINT8 AcpiDisable; /* [V1] Value to write to SMI_CMD to disable ACPI */
+ UINT8 S4BiosRequest; /* [V1] Value to write to SMI_CMD to enter S4BIOS state */
+ UINT8 PstateControl; /* [V1] Processor performance state control*/
+ UINT32 Pm1aEventBlock; /* [V1] 32-bit port address of Power Mgt 1a Event Reg Blk */
+ UINT32 Pm1bEventBlock; /* [V1] 32-bit port address of Power Mgt 1b Event Reg Blk */
+ UINT32 Pm1aControlBlock; /* [V1] 32-bit port address of Power Mgt 1a Control Reg Blk */
+ UINT32 Pm1bControlBlock; /* [V1] 32-bit port address of Power Mgt 1b Control Reg Blk */
+ UINT32 Pm2ControlBlock; /* [V1] 32-bit port address of Power Mgt 2 Control Reg Blk */
+ UINT32 PmTimerBlock; /* [V1] 32-bit port address of Power Mgt Timer Ctrl Reg Blk */
+ UINT32 Gpe0Block; /* [V1] 32-bit port address of General Purpose Event 0 Reg Blk */
+ UINT32 Gpe1Block; /* [V1] 32-bit port address of General Purpose Event 1 Reg Blk */
+ UINT8 Pm1EventLength; /* [V1] Byte Length of ports at Pm1xEventBlock */
+ UINT8 Pm1ControlLength; /* [V1] Byte Length of ports at Pm1xControlBlock */
+ UINT8 Pm2ControlLength; /* [V1] Byte Length of ports at Pm2ControlBlock */
+ UINT8 PmTimerLength; /* [V1] Byte Length of ports at PmTimerBlock */
+ UINT8 Gpe0BlockLength; /* [V1] Byte Length of ports at Gpe0Block */
+ UINT8 Gpe1BlockLength; /* [V1] Byte Length of ports at Gpe1Block */
+ UINT8 Gpe1Base; /* [V1] Offset in GPE number space where GPE1 events start */
+ UINT8 CstControl; /* [V1] Support for the _CST object and C-States change notification */
+ UINT16 C2Latency; /* [V1] Worst case HW latency to enter/exit C2 state */
+ UINT16 C3Latency; /* [V1] Worst case HW latency to enter/exit C3 state */
+ UINT16 FlushSize; /* [V1] Processor memory cache line width, in bytes */
+ UINT16 FlushStride; /* [V1] Number of flush strides that need to be read */
+ UINT8 DutyOffset; /* [V1] Processor duty cycle index in processor P_CNT reg */
+ UINT8 DutyWidth; /* [V1] Processor duty cycle value bit width in P_CNT register */
+ UINT8 DayAlarm; /* [V1] Index to day-of-month alarm in RTC CMOS RAM */
+ UINT8 MonthAlarm; /* [V1] Index to month-of-year alarm in RTC CMOS RAM */
+ UINT8 Century; /* [V1] Index to century in RTC CMOS RAM */
+ UINT16 BootFlags; /* [V3] IA-PC Boot Architecture Flags (see below for individual flags) */
+ UINT8 Reserved; /* [V1] Reserved, must be zero */
+ UINT32 Flags; /* [V1] Miscellaneous flag bits (see below for individual flags) */
+ /* End of Version 1 FADT fields (ACPI 1.0) */
+
+ ACPI_GENERIC_ADDRESS ResetRegister; /* [V3] 64-bit address of the Reset register */
+ UINT8 ResetValue; /* [V3] Value to write to the ResetRegister port to reset the system */
+ UINT16 ArmBootFlags; /* [V5] ARM-Specific Boot Flags (see below for individual flags) (ACPI 5.1) */
+ UINT8 MinorRevision; /* [V5] FADT Minor Revision (ACPI 5.1) */
+ UINT64 XFacs; /* [V3] 64-bit physical address of FACS */
+ UINT64 XDsdt; /* [V3] 64-bit physical address of DSDT */
+ ACPI_GENERIC_ADDRESS XPm1aEventBlock; /* [V3] 64-bit Extended Power Mgt 1a Event Reg Blk address */
+ ACPI_GENERIC_ADDRESS XPm1bEventBlock; /* [V3] 64-bit Extended Power Mgt 1b Event Reg Blk address */
+ ACPI_GENERIC_ADDRESS XPm1aControlBlock; /* [V3] 64-bit Extended Power Mgt 1a Control Reg Blk address */
+ ACPI_GENERIC_ADDRESS XPm1bControlBlock; /* [V3] 64-bit Extended Power Mgt 1b Control Reg Blk address */
+ ACPI_GENERIC_ADDRESS XPm2ControlBlock; /* [V3] 64-bit Extended Power Mgt 2 Control Reg Blk address */
+ ACPI_GENERIC_ADDRESS XPmTimerBlock; /* [V3] 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */
+ ACPI_GENERIC_ADDRESS XGpe0Block; /* [V3] 64-bit Extended General Purpose Event 0 Reg Blk address */
+ ACPI_GENERIC_ADDRESS XGpe1Block; /* [V3] 64-bit Extended General Purpose Event 1 Reg Blk address */
+ /* End of Version 3 FADT fields (ACPI 2.0) */
+
+ ACPI_GENERIC_ADDRESS SleepControl; /* [V4] 64-bit Sleep Control register (ACPI 5.0) */
+ /* End of Version 4 FADT fields (ACPI 3.0 and ACPI 4.0) (Field was originally reserved in ACPI 3.0) */
+
+ ACPI_GENERIC_ADDRESS SleepStatus; /* [V5] 64-bit Sleep Status register (ACPI 5.0) */
+ /* End of Version 5 FADT fields (ACPI 5.0) */
+
+ UINT64 HypervisorId; /* [V6] Hypervisor Vendor ID (ACPI 6.0) */
+ /* End of Version 6 FADT fields (ACPI 6.0) */
+
} ACPI_TABLE_FADT;
@@ -399,8 +409,8 @@ typedef struct acpi_table_fadt
/* Masks for FADT ARM Boot Architecture Flags (arm_boot_flags) ACPI 5.1 */
-#define ACPI_FADT_PSCI_COMPLIANT (1) /* 00: [V5+] PSCI 0.2+ is implemented */
-#define ACPI_FADT_PSCI_USE_HVC (1<<1) /* 01: [V5+] HVC must be used instead of SMC as the PSCI conduit */
+#define ACPI_FADT_PSCI_COMPLIANT (1) /* 00: [V5] PSCI 0.2+ is implemented */
+#define ACPI_FADT_PSCI_USE_HVC (1<<1) /* 01: [V5] HVC must be used instead of SMC as the PSCI conduit */
/* Masks for FADT flags */
@@ -507,20 +517,34 @@ typedef struct acpi_table_desc
* match the expected length. In other words, the length of the
* FADT is the bottom line as to what the version really is.
*
- * For reference, the values below are as follows:
- * FADT V1 size: 0x074
- * FADT V2 size: 0x084
- * FADT V3 size: 0x0F4
- * FADT V4 size: 0x0F4
- * FADT V5 size: 0x10C
- * FADT V6 size: 0x114
+ * NOTE: There is no officialy released V2 of the FADT. This
+ * version was used only for prototyping and testing during the
+ * 32-bit to 64-bit transition. V3 was the first official 64-bit
+ * version of the FADT.
+ *
+ * Update this list of defines when a new version of the FADT is
+ * added to the ACPI specification. Note that the FADT version is
+ * only incremented when new fields are appended to the existing
+ * version. Therefore, the FADT version is competely independent
+ * from the version of the ACPI specification where it is
+ * defined.
+ *
+ * For reference, the various FADT lengths are as follows:
+ * FADT V1 size: 0x074 ACPI 1.0
+ * FADT V3 size: 0x0F4 ACPI 2.0
+ * FADT V4 size: 0x100 ACPI 3.0 and ACPI 4.0
+ * FADT V5 size: 0x10C ACPI 5.0
+ * FADT V6 size: 0x114 ACPI 6.0
*/
-#define ACPI_FADT_V1_SIZE (UINT32) (ACPI_FADT_OFFSET (Flags) + 4)
-#define ACPI_FADT_V2_SIZE (UINT32) (ACPI_FADT_OFFSET (MinorRevision) + 1)
-#define ACPI_FADT_V3_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepControl))
-#define ACPI_FADT_V5_SIZE (UINT32) (ACPI_FADT_OFFSET (HypervisorId))
-#define ACPI_FADT_V6_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT))
+#define ACPI_FADT_V1_SIZE (UINT32) (ACPI_FADT_OFFSET (Flags) + 4) /* ACPI 1.0 */
+#define ACPI_FADT_V3_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepControl)) /* ACPI 2.0 */
+#define ACPI_FADT_V4_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepStatus)) /* ACPI 3.0 and ACPI 4.0 */
+#define ACPI_FADT_V5_SIZE (UINT32) (ACPI_FADT_OFFSET (HypervisorId)) /* ACPI 5.0 */
+#define ACPI_FADT_V6_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT)) /* ACPI 6.0 */
+
+/* Update these when new FADT versions are added */
+#define ACPI_FADT_MAX_VERSION 6
#define ACPI_FADT_CONFORMANCE "ACPI 6.1 (FADT version 6)"
#endif /* __ACTBL_H__ */
diff --git a/src/acpica/source/include/actypes.h b/src/acpica/source/include/actypes.h
index 039d71a..abc4f7b 100644
--- a/src/acpica/source/include/actypes.h
+++ b/src/acpica/source/include/actypes.h
@@ -1459,16 +1459,6 @@ typedef enum
#define ACPI_OSI_WIN_10 0x0D
-/* Definitions of file IO */
-
-#define ACPI_FILE_READING 0x01
-#define ACPI_FILE_WRITING 0x02
-#define ACPI_FILE_BINARY 0x04
-
-#define ACPI_FILE_BEGIN 0x01
-#define ACPI_FILE_END 0x02
-
-
/* Definitions of getopt */
#define ACPI_OPT_END -1
diff --git a/src/acpica/source/include/acutils.h b/src/acpica/source/include/acutils.h
index 3fdca45..358d1c8 100644
--- a/src/acpica/source/include/acutils.h
+++ b/src/acpica/source/include/acutils.h
@@ -1140,48 +1140,6 @@ AcpiAhMatchUuid (
/*
- * utprint - printf/vprintf output functions
- */
-const char *
-AcpiUtScanNumber (
- const char *String,
- UINT64 *NumberPtr);
-
-const char *
-AcpiUtPrintNumber (
- char *String,
- UINT64 Number);
-
-int
-AcpiUtVsnprintf (
- char *String,
- ACPI_SIZE Size,
- const char *Format,
- va_list Args);
-
-int
-AcpiUtSnprintf (
- char *String,
- ACPI_SIZE Size,
- const char *Format,
- ...);
-
-#ifdef ACPI_APPLICATION
-int
-AcpiUtFileVprintf (
- ACPI_FILE File,
- const char *Format,
- va_list Args);
-
-int
-AcpiUtFilePrintf (
- ACPI_FILE File,
- const char *Format,
- ...);
-#endif
-
-
-/*
* utuuid -- UUID support functions
*/
#if (defined ACPI_ASL_COMPILER || defined ACPI_EXEC_APP || defined ACPI_HELP_APP)
diff --git a/src/acpica/source/include/platform/acenv.h b/src/acpica/source/include/platform/acenv.h
index 7a72456..4982c87 100644
--- a/src/acpica/source/include/platform/acenv.h
+++ b/src/acpica/source/include/platform/acenv.h
@@ -151,6 +151,7 @@
(defined ACPI_EXAMPLE_APP)
#define ACPI_APPLICATION
#define ACPI_SINGLE_THREADED
+#define USE_NATIVE_ALLOCATE_ZEROED
#endif
/* iASL configuration */
@@ -197,7 +198,6 @@
#ifdef ACPI_DUMP_APP
#define ACPI_USE_NATIVE_MEMORY_MAPPING
-#define USE_NATIVE_ALLOCATE_ZEROED
#endif
/* AcpiNames/Example configuration. Hardware disabled */
@@ -222,7 +222,6 @@
/* Common for all ACPICA applications */
#ifdef ACPI_APPLICATION
-#define ACPI_USE_SYSTEM_CLIBRARY
#define ACPI_USE_LOCAL_CACHE
#endif
@@ -239,10 +238,21 @@
/******************************************************************************
*
* Host configuration files. The compiler configuration files are included
- * by the host files.
+ * first.
*
*****************************************************************************/
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+#include "acgcc.h"
+
+#elif defined(_MSC_VER)
+#include "acmsvc.h"
+
+#elif defined(__INTEL_COMPILER)
+#include "acintel.h"
+
+#endif
+
#if defined(_LINUX) || defined(__linux__)
#include "aclinux.h"
@@ -282,18 +292,20 @@
#elif defined(__OS2__)
#include "acos2.h"
-#elif defined(_AED_EFI)
-#include "acefi.h"
-
-#elif defined(_GNU_EFI)
-#include "acefi.h"
-
#elif defined(__HAIKU__)
#include "achaiku.h"
#elif defined(__QNX__)
#include "acqnx.h"
+/*
+ * EFI applications can be built with -nostdlib, in this case, it must be
+ * included after including all other host environmental definitions, in
+ * order to override the definitions.
+ */
+#elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI)
+#include "acefi.h"
+
#else
/* Unknown environment */
@@ -402,7 +414,8 @@
* ACPI_USE_SYSTEM_CLIBRARY - Define this if linking to an actual C library.
* Otherwise, local versions of string/memory functions will be used.
* ACPI_USE_STANDARD_HEADERS - Define this if linking to a C library and
- * the standard header files may be used.
+ * the standard header files may be used. Defining this implies that
+ * ACPI_USE_SYSTEM_CLIBRARY has been defined.
*
* The ACPICA subsystem only uses low level C library functions that do not
* call operating system services and may therefore be inlined in the code.
@@ -410,7 +423,6 @@
* It may be necessary to tailor these include files to the target
* generation environment.
*/
-#ifdef ACPI_USE_SYSTEM_CLIBRARY
/* Use the standard C library headers. We want to keep these to a minimum. */
@@ -418,57 +430,20 @@
/* Use the standard headers from the standard locations */
-#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
+#ifdef ACPI_APPLICATION
+#include <stdio.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <time.h>
+#include <signal.h>
+#endif
#endif /* ACPI_USE_STANDARD_HEADERS */
-/* We will be linking to the standard Clib functions */
-
-#else
-
-/******************************************************************************
- *
- * Not using native C library, use local implementations
- *
- *****************************************************************************/
-
-/*
- * Use local definitions of C library macros and functions. These function
- * implementations may not be as efficient as an inline or assembly code
- * implementation provided by a native C library, but they are functionally
- * equivalent.
- */
-#ifndef va_arg
-
-#ifndef _VALIST
-#define _VALIST
-typedef char *va_list;
-#endif /* _VALIST */
-
-/* Storage alignment properties */
-
-#define _AUPBND (sizeof (ACPI_NATIVE_INT) - 1)
-#define _ADNBND (sizeof (ACPI_NATIVE_INT) - 1)
-
-/* Variable argument list macro definitions */
-
-#define _Bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd)))
-#define va_arg(ap, T) (*(T *)(((ap) += (_Bnd (T, _AUPBND))) - (_Bnd (T,_ADNBND))))
-#define va_end(ap) (ap = (va_list) NULL)
-#define va_start(ap, A) (void) ((ap) = (((char *) &(A)) + (_Bnd (A,_AUPBND))))
-
-#endif /* va_arg */
-
-/* Use the local (ACPICA) definitions of the clib functions */
-
-#endif /* ACPI_USE_SYSTEM_CLIBRARY */
-
-#ifndef ACPI_FILE
#ifdef ACPI_APPLICATION
-#include <stdio.h>
#define ACPI_FILE FILE *
#define ACPI_FILE_OUT stdout
#define ACPI_FILE_ERR stderr
@@ -477,6 +452,9 @@ typedef char *va_list;
#define ACPI_FILE_OUT NULL
#define ACPI_FILE_ERR NULL
#endif /* ACPI_APPLICATION */
-#endif /* ACPI_FILE */
+
+#ifndef ACPI_INIT_FUNCTION
+#define ACPI_INIT_FUNCTION
+#endif
#endif /* __ACENV_H__ */
diff --git a/src/acpica/source/include/platform/acenvex.h b/src/acpica/source/include/platform/acenvex.h
index a0a4ed1..94b53e7 100644
--- a/src/acpica/source/include/platform/acenvex.h
+++ b/src/acpica/source/include/platform/acenvex.h
@@ -128,17 +128,24 @@
#if defined(_LINUX) || defined(__linux__)
#include "aclinuxex.h"
-#elif defined(WIN32)
-#include "acwinex.h"
+#elif defined(__DragonFly__)
+#include "acdragonflyex.h"
-#elif defined(_AED_EFI)
+/*
+ * EFI applications can be built with -nostdlib, in this case, it must be
+ * included after including all other host environmental definitions, in
+ * order to override the definitions.
+ */
+#elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI)
#include "acefiex.h"
-#elif defined(_GNU_EFI)
-#include "acefiex.h"
+#endif
-#elif defined(__DragonFly__)
-#include "acdragonflyex.h"
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+#include "acgccex.h"
+
+#elif defined(_MSC_VER)
+#include "acmsvcex.h"
#endif
diff --git a/src/acpica/source/include/platform/acgcc.h b/src/acpica/source/include/platform/acgcc.h
index 3d36a38..097539c 100644
--- a/src/acpica/source/include/platform/acgcc.h
+++ b/src/acpica/source/include/platform/acgcc.h
@@ -116,6 +116,12 @@
#ifndef __ACGCC_H__
#define __ACGCC_H__
+/*
+ * Use compiler specific <stdarg.h> is a good practice for even when
+ * -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined.
+ */
+#include <stdarg.h>
+
#define ACPI_INLINE __inline__
/* Function name is used for debug output. Non-ANSI, compiler-dependent */
@@ -136,17 +142,6 @@
*/
#define ACPI_UNUSED_VAR __attribute__ ((unused))
-/*
- * Some versions of gcc implement strchr() with a buggy macro. So,
- * undef it here. Prevents error messages of this form (usually from the
- * file getopt.c):
- *
- * error: logical '&&' with non-zero constant will always evaluate as true
- */
-#ifdef strchr
-#undef strchr
-#endif
-
/* GCC supports __VA_ARGS__ in macros */
#define COMPILER_VA_MACRO 1
diff --git a/src/acpica/source/include/platform/acgccex.h b/src/acpica/source/include/platform/acgccex.h
new file mode 100644
index 0000000..8aed194
--- /dev/null
+++ b/src/acpica/source/include/platform/acgccex.h
@@ -0,0 +1,130 @@
+/******************************************************************************
+ *
+ * Name: acgccex.h - Extra GCC specific defines, etc.
+ *
+ *****************************************************************************/
+
+/******************************************************************************
+ *
+ * 1. Copyright Notice
+ *
+ * Some or all of this work - Copyright (c) 1999 - 2016, 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.
+ *
+ *****************************************************************************/
+
+#ifndef __ACGCCEX_H__
+#define __ACGCCEX_H__
+
+/*
+ * Some versions of gcc implement strchr() with a buggy macro. So,
+ * undef it here. Prevents error messages of this form (usually from the
+ * file getopt.c):
+ *
+ * error: logical '&&' with non-zero constant will always evaluate as true
+ */
+#ifdef strchr
+#undef strchr
+#endif
+
+#endif /* __ACGCCEX_H__ */
diff --git a/src/acpica/source/include/platform/aclinux.h b/src/acpica/source/include/platform/aclinux.h
index 9127735..6f7c577 100644
--- a/src/acpica/source/include/platform/aclinux.h
+++ b/src/acpica/source/include/platform/aclinux.h
@@ -161,6 +161,8 @@
#include <asm/acenv.h>
#endif
+#define ACPI_INIT_FUNCTION __init
+
#ifndef CONFIG_ACPI
/* External globals for __KERNEL__, stubs is needed */
@@ -245,11 +247,11 @@
#else /* !__KERNEL__ */
-#include <stdarg.h>
-#include <string.h>
-#include <stdlib.h>
-#include <ctype.h>
+#define ACPI_USE_STANDARD_HEADERS
+
+#ifdef ACPI_USE_STANDARD_HEADERS
#include <unistd.h>
+#endif
/* Define/disable kernel-specific declarators */
@@ -280,8 +282,4 @@
#endif /* __KERNEL__ */
-/* Linux uses GCC */
-
-#include "acgcc.h"
-
#endif /* __ACLINUX_H__ */
diff --git a/src/acpica/source/include/platform/aclinuxex.h b/src/acpica/source/include/platform/aclinuxex.h
index fb259b0..7f24989 100644
--- a/src/acpica/source/include/platform/aclinuxex.h
+++ b/src/acpica/source/include/platform/aclinuxex.h
@@ -143,7 +143,7 @@
/*
* Overrides for in-kernel ACPICA
*/
-ACPI_STATUS __init AcpiOsInitialize (
+ACPI_STATUS ACPI_INIT_FUNCTION AcpiOsInitialize (
void);
ACPI_STATUS AcpiOsTerminate (
diff --git a/src/acpica/source/os_specific/service_layers/oslibcfs.c b/src/acpica/source/os_specific/service_layers/oslibcfs.c
deleted file mode 100644
index 26c1a8f..0000000
--- a/src/acpica/source/os_specific/service_layers/oslibcfs.c
+++ /dev/null
@@ -1,330 +0,0 @@
-/******************************************************************************
- *
- * Module Name: oslibcfs - C library OSL for file I/O
- *
- *****************************************************************************/
-
-/******************************************************************************
- *
- * 1. Copyright Notice
- *
- * Some or all of this work - Copyright (c) 1999 - 2016, 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.
- *
- *****************************************************************************/
-
-#include "acpi.h"
-#include <stdio.h>
-#include <stdarg.h>
-
-#define _COMPONENT ACPI_OS_SERVICES
- ACPI_MODULE_NAME ("oslibcfs")
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiOsOpenFile
- *
- * PARAMETERS: Path - File path
- * Modes - File operation type
- *
- * RETURN: File descriptor.
- *
- * DESCRIPTION: Open a file for reading (ACPI_FILE_READING) or/and writing
- * (ACPI_FILE_WRITING).
- *
- ******************************************************************************/
-
-ACPI_FILE
-AcpiOsOpenFile (
- const char *Path,
- UINT8 Modes)
-{
- ACPI_FILE File;
- UINT32 i = 0;
- char ModesStr[4];
-
-
- if (Modes & ACPI_FILE_READING)
- {
- ModesStr[i++] = 'r';
- }
- if (Modes & ACPI_FILE_WRITING)
- {
- ModesStr[i++] = 'w';
- }
-
- if (Modes & ACPI_FILE_BINARY)
- {
- ModesStr[i++] = 'b';
- }
-
- ModesStr[i++] = '\0';
-
- File = fopen (Path, ModesStr);
- if (!File)
- {
- perror ("Could not open file");
- }
-
- return (File);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiOsCloseFile
- *
- * PARAMETERS: File - An open file descriptor
- *
- * RETURN: None.
- *
- * DESCRIPTION: Close a file opened via AcpiOsOpenFile.
- *
- ******************************************************************************/
-
-void
-AcpiOsCloseFile (
- ACPI_FILE File)
-{
-
- fclose (File);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiOsReadFile
- *
- * PARAMETERS: File - An open file descriptor
- * Buffer - Data buffer
- * Size - Data block size
- * Count - Number of data blocks
- *
- * RETURN: Number of bytes actually read.
- *
- * DESCRIPTION: Read from a file.
- *
- ******************************************************************************/
-
-int
-AcpiOsReadFile (
- ACPI_FILE File,
- void *Buffer,
- ACPI_SIZE Size,
- ACPI_SIZE Count)
-{
- int Length;
-
-
- Length = fread (Buffer, Size, Count, File);
- if (Length < 0)
- {
- perror ("Error reading file");
- }
-
- return (Length);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiOsWriteFile
- *
- * PARAMETERS: File - An open file descriptor
- * Buffer - Data buffer
- * Size - Data block size
- * Count - Number of data blocks
- *
- * RETURN: Number of bytes actually written.
- *
- * DESCRIPTION: Write to a file.
- *
- ******************************************************************************/
-
-int
-AcpiOsWriteFile (
- ACPI_FILE File,
- void *Buffer,
- ACPI_SIZE Size,
- ACPI_SIZE Count)
-{
- int Length;
-
-
- Length = fwrite (Buffer, Size, Count, File);
- if (Length < 0)
- {
- perror ("Error writing file");
- }
-
- return (Length);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiOsGetFileOffset
- *
- * PARAMETERS: File - An open file descriptor
- *
- * RETURN: Current file pointer position.
- *
- * DESCRIPTION: Get current file offset.
- *
- ******************************************************************************/
-
-long
-AcpiOsGetFileOffset (
- ACPI_FILE File)
-{
- long Offset;
-
-
- Offset = ftell (File);
- return (Offset);
-}
-
-
-/*******************************************************************************
- *
- * FUNCTION: AcpiOsSetFileOffset
- *
- * PARAMETERS: File - An open file descriptor
- * Offset - New file offset
- * From - From begin/end of file
- *
- * RETURN: Status
- *
- * DESCRIPTION: Set current file offset.
- *
- ******************************************************************************/
-
-ACPI_STATUS
-AcpiOsSetFileOffset (
- ACPI_FILE File,
- long Offset,
- UINT8 From)
-{
- int Ret = 0;
-
-
- if (From == ACPI_FILE_BEGIN)
- {
- Ret = fseek (File, Offset, SEEK_SET);
- }
-
- if (From == ACPI_FILE_END)
- {
- Ret = fseek (File, Offset, SEEK_END);
- }
-
- if (Ret < 0)
- {
- return (AE_ERROR);
- }
- else
- {
- return (AE_OK);
- }
-}
diff --git a/src/acpica/source/os_specific/service_layers/osunixxf.c b/src/acpica/source/os_specific/service_layers/osunixxf.c
index c3a66d7..f04b59e 100644
--- a/src/acpica/source/os_specific/service_layers/osunixxf.c
+++ b/src/acpica/source/os_specific/service_layers/osunixxf.c
@@ -136,9 +136,6 @@
ACPI_MODULE_NAME ("osunixxf")
-BOOLEAN AcpiGbl_DebugTimeout = FALSE;
-
-
/* Upcalls to AcpiExec */
void
diff --git a/src/acpica/source/tools/acpiexec/aecommon.h b/src/acpica/source/tools/acpiexec/aecommon.h
index 12199b0..dc15556 100644
--- a/src/acpica/source/tools/acpiexec/aecommon.h
+++ b/src/acpica/source/tools/acpiexec/aecommon.h
@@ -131,11 +131,6 @@
#include "amlresrc.h"
#include "acapps.h"
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <signal.h>
-
/*
* Debug Regions
diff --git a/src/acpica/source/tools/acpiexec/aeinitfile.c b/src/acpica/source/tools/acpiexec/aeinitfile.c
index 57c20dc..b1b60cd 100644
--- a/src/acpica/source/tools/acpiexec/aeinitfile.c
+++ b/src/acpica/source/tools/acpiexec/aeinitfile.c
@@ -158,7 +158,8 @@ AeOpenInitializationFile (
InitFile = fopen (Filename, "r");
if (!InitFile)
{
- perror ("Could not open initialization file");
+ fprintf (stderr,
+ "Could not open initialization file: %s\n", Filename);
return (-1);
}
</pre>
</blockquote>
Acked-by: Ivan Hu <a class="moz-txt-link-rfc2396E"
href="mailto:ivan.hu@canonical.com"><ivan.hu@canonical.com></a>
</body>
</html>