From 736e7250aaa8c08e504803ab6ff4d329bdd80215 Mon Sep 17 00:00:00 2001 From: Al Stone Date: Apr 04 2017 17:49:53 +0000 Subject: New upstream version 2016117 --- diff --git a/changes.txt b/changes.txt index 49c88a4..52bc749 100644 --- a/changes.txt +++ b/changes.txt @@ -1,4 +1,83 @@ ---------------------------------------- +17 November 2016. Summary of changes for version 20161117: + + +1) ACPICA kernel-resident subsystem: + +Table Manager: Fixed a regression introduced in 20160729, "FADT support +cleanup". This was an attempt to remove all references in the source to +the FADT version 2, which never was a legal version number. It was +skipped because it was an early version of 64-bit support that was +eventually abandoned for the current 64-bit support. + +Interpreter: Fixed a problem where runtime implicit conversion was +incorrectly disabled for the ASL operators below. This brings the +behavior into compliance with the ACPI specification: + FromBCD + ToBCD + ToDecimalString + ToHexString + ToInteger + ToBuffer + +Table Manager: Added a new public interface, AcpiPutTable, used to +release and free an ACPI table returned by AcpiGetTable and related +interfaces. Lv Zheng. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 140.5K Code, 58.5K Data, 198.9K Total + Debug Version: 201.3K Code, 82.7K Data, 284.0K Total + Previous Release: + Non-Debug Version: 140.4K Code, 58.1K Data, 198.5K Total + Debug Version: 200.7K Code, 82.1K Data, 282.8K Total + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Fixed a regression for disassembly of Resource Template. +Detection of templates in the AML stream missed some types of templates. + +iASL: Fixed a problem where an Access Size error was returned for the PCC +address space when the AccessSize of the GAS register is greater than a +DWORD. Hoan Tran. + +iASL: Implemented several grammar changes for the operators below. These +changes are slated for the next version of the ACPI specification: + RefOf - Disallow method invocation as an operand + CondRefOf - Disallow method invocation as an operand + DerefOf - Disallow operands that use the result from operators +that + do not return a reference (Changed TermArg to +SuperName). + +iASL: Control method invocations are now allowed for Target operands, as +per the ACPI specification. Removed error for using a control method +invocation as a Target operand. + +Disassembler: Improved detection of Resource Templates, Unicode, and +Strings within Buffer objects. These subtypes do not contain a specific +opcode to indicate the originating ASL code, and they must be detected by +other means within the disassembler. + +iASL: Implemented an optimization improvement for 32-bit ACPI tables +(DSDT/SSDT). For the 32-bit case only, compute the optimum integer opcode +only after 64-bit to 32-bit truncation. A truncation warning message is +still emitted, however. + +AcpiXtract: Implemented handling for both types of line terminators (LF +or CR/LF) so that it can accept AcpiDump output files from any system. +Peter Wu. + +AcpiBin: Added two new options for comparing AML files: + -a: compare and display ALL mismatches + -o: start compare at this offset into the second file + +---------------------------------------- 30 September 2016. Summary of changes for version 20160930: diff --git a/source/common/acfileio.c b/source/common/acfileio.c index 409e16f..ffa23a6 100644 --- a/source/common/acfileio.c +++ b/source/common/acfileio.c @@ -112,7 +112,7 @@ AcGetAllTablesFromFile ( if (FileSize == ACPI_UINT32_MAX) { Status = AE_ERROR; - goto ErrorExit; + goto Exit; } fprintf (stderr, @@ -124,7 +124,7 @@ AcGetAllTablesFromFile ( if (FileSize < sizeof (ACPI_TABLE_HEADER)) { Status = AE_BAD_HEADER; - goto ErrorExit; + goto Exit; } /* Check for an non-binary file */ @@ -134,7 +134,8 @@ AcGetAllTablesFromFile ( fprintf (stderr, " %s: File does not appear to contain a valid AML table\n", Filename); - return (AE_TYPE); + Status = AE_TYPE; + goto Exit; } /* Read all tables within the file */ @@ -153,23 +154,31 @@ AcGetAllTablesFromFile ( } else if (Status == AE_TYPE) { - return (AE_OK); + Status = AE_OK; + goto Exit; } else if (ACPI_FAILURE (Status)) { - goto ErrorExit; + goto Exit; } /* Print table header for iASL/disassembler only */ #ifdef ACPI_ASL_COMPILER - AcpiTbPrintTableHeader (0, Table); + AcpiTbPrintTableHeader (0, Table); #endif /* Allocate and link a table descriptor */ TableDesc = AcpiOsAllocate (sizeof (ACPI_NEW_TABLE_DESC)); + if (!TableDesc) + { + AcpiOsFree (Table); + Status = AE_NO_MEMORY; + goto Exit; + } + TableDesc->Table = Table; TableDesc->Next = NULL; @@ -204,7 +213,7 @@ AcGetAllTablesFromFile ( *ReturnListHead = ListHead; } -ErrorExit: +Exit: fclose(File); return (Status); } @@ -262,7 +271,6 @@ AcGetOneTableFromFile ( return (Status); } - if (GetOnlyAmlTables) { /* diff --git a/source/common/dmtbdump.c b/source/common/dmtbdump.c index 4ef670d..789256c 100644 --- a/source/common/dmtbdump.c +++ b/source/common/dmtbdump.c @@ -52,31 +52,12 @@ ACPI_MODULE_NAME ("dmtbdump") -/* Table of revision-dependent FADT sizes */ +/* Local prototypes */ -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 */ -}; +static void +AcpiDmValidateFadtLength ( + UINT32 Revision, + UINT32 Length); /******************************************************************************* @@ -366,11 +347,6 @@ 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. @@ -382,72 +358,142 @@ AcpiDmDumpFadt ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - UINT8 FadtRevision; - UINT32 ExpectedLength; - UINT32 i; - - FadtRevision = Table->Revision; - /* FADT revision/length validation */ + /* Always dump the minimum FADT revision 1 fields (ACPI 1.0) */ - if ((FadtRevision == 0) || - (FadtRevision == 2)) + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoFadt1); + if (ACPI_FAILURE (Status)) { - AcpiOsPrintf ( - "// ACPI Warning: Invalid or unsupported FADT revision: %u\n", - FadtRevision); return; } - if (FadtRevision > ACPI_FADT_MAX_VERSION) - { - AcpiOsPrintf ("// ACPI Warning: Revision %u is not fully supported, " - "disassembling known fields (up to revision %u)\n\n", - FadtRevision, ACPI_FADT_MAX_VERSION); - } - else + /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */ + + if ((Table->Length > ACPI_FADT_V1_SIZE) && + (Table->Length <= ACPI_FADT_V2_SIZE)) { - ExpectedLength = FadtRevisionLength[FadtRevision]; - if (Table->Length != ExpectedLength) + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoFadt2); + if (ACPI_FAILURE (Status)) { - AcpiOsPrintf ( - "// ACPI Warning: Input FADT revision %X does not match " - "expected length: found 0x%X expected 0x%X\n", - FadtRevision, Table->Length, ExpectedLength); + return; } } - /* - * 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++) + /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */ + + else if (Table->Length > ACPI_FADT_V2_SIZE) { - if (!FadtRevisionLength[i]) /* Skip any empty slots */ + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoFadt3); + if (ACPI_FAILURE (Status)) { - continue; + return; } - /* Dump the fields specific to FADT revision[i] */ + /* Check for FADT revision 5 fields and up (ACPI 5.0+) */ - Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, - FadtRevisionInfo[i]); - if (ACPI_FAILURE (Status)) + if (Table->Length > ACPI_FADT_V3_SIZE) { - return; + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoFadt5); + if (ACPI_FAILURE (Status)) + { + return; + } } - if (Table->Length <= FadtRevisionLength[i]) + /* Check for FADT revision 6 fields and up (ACPI 6.0+) */ + + if (Table->Length > ACPI_FADT_V3_SIZE) { - break; /* End of table */ + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoFadt6); + if (ACPI_FAILURE (Status)) + { + return; + } } } - /* Build a local FADT to test some FADT values */ + /* Validate various fields in the FADT, including length */ 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/source/common/dmtbinfo.c b/source/common/dmtbinfo.c index e0a6070..1cc37ef 100644 --- a/source/common/dmtbinfo.c +++ b/source/common/dmtbinfo.c @@ -400,7 +400,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFacs[] = * ******************************************************************************/ -/* FADT version 1 (ACPI 1.0) */ +/* ACPI 1.0 FADT (Version 1) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] = { @@ -486,7 +486,18 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] = ACPI_DMT_TERMINATOR }; -/* FADT version 3 (ACPI 2.0) */ +/* 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) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[] = { @@ -510,23 +521,16 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[] = ACPI_DMT_TERMINATOR }; -/* FADT version 4 (ACPI 3.0 and ACPI 4.0) */ - -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 5.0 Extensions (FADT version 5) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[] = { + {ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepControl), "Sleep Control Register", 0}, {ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepStatus), "Sleep Status Register", 0}, ACPI_DMT_TERMINATOR }; -/* FADT version 6 (ACPI 6.0) */ +/* ACPI 6.0 Extensions (FADT version 6) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt6[] = { diff --git a/source/compiler/aslbtypes.c b/source/compiler/aslbtypes.c index c956516..10ec3d4 100644 --- a/source/compiler/aslbtypes.c +++ b/source/compiler/aslbtypes.c @@ -151,7 +151,6 @@ AnMapArgTypeToBtype ( return (ACPI_BTYPE_DATA | ACPI_BTYPE_DEBUG_OBJECT | ACPI_BTYPE_REFERENCE_OBJECT); - case ARGI_FIXED_TARGET: case ARGI_SIMPLE_TARGET: return (ACPI_BTYPE_OBJECTS_AND_REFS); diff --git a/source/compiler/aslcompiler.l b/source/compiler/aslcompiler.l index 15c9dae..228db8b 100644 --- a/source/compiler/aslcompiler.l +++ b/source/compiler/aslcompiler.l @@ -156,8 +156,14 @@ NamePathTail [.]{NameSeg} "^=" { count (3); return (PARSEOP_EXP_XOR_EQ); } "|=" { count (3); return (PARSEOP_EXP_OR_EQ); } -"[" { count (3); return(PARSEOP_EXP_INDEX_LEFT); } -"]" { count (0); return(PARSEOP_EXP_INDEX_RIGHT); } +"[" { count (3); return (PARSEOP_EXP_INDEX_LEFT); } +"]" { count (0); return (PARSEOP_EXP_INDEX_RIGHT); } +"(" { count (0); return (PARSEOP_OPEN_PAREN); } +")" { count (0); return (PARSEOP_CLOSE_PAREN); } + +"{" { count (0); return ('{'); } +"}" { count (0); return ('}'); } +"," { count (0); return (','); } /* @@ -691,12 +697,6 @@ NamePathTail [.]{NameSeg} "__PATH__" { count (0); return (PARSEOP___PATH__); } -"{" { count (0); return('{'); } -"}" { count (0); return('}'); } -"," { count (0); return(','); } -"(" { count (0); return('('); } -")" { count (0); return(')'); } - {NameSeg} { char *s; count (0); s=UtStringCacheCalloc (ACPI_NAME_SIZE + 1); diff --git a/source/compiler/aslcstyle.y b/source/compiler/aslcstyle.y index fc7d593..d4034a5 100644 --- a/source/compiler/aslcstyle.y +++ b/source/compiler/aslcstyle.y @@ -149,21 +149,30 @@ Expression /* Parentheses */ - | '(' TermArg ')' { $$ = $2;} + | PARSEOP_OPEN_PAREN + Expression + PARSEOP_CLOSE_PAREN {$$ = $2;} /* 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); - TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());} + | IndexExpTerm ; - /* Index term -- "BUF1[5] = " on left-hand side of an equals (target) */ - + /* + * Index term -- "BUF1[5] = " or " = BUF1[5] on either the left side + * of an equals (target) or the right side (source) + * Currently used in these terms: + * Expression + * ObjectTypeSource + * DerefOfSource + * Type6Opcode + */ 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 ());} ; @@ -177,11 +186,26 @@ IndexExpTerm EqualsTerm + /* Allow parens anywhere */ + + : PARSEOP_OPEN_PAREN + EqualsTerm + PARSEOP_CLOSE_PAREN {$$ = $2;} + /* Simple Store() operation */ - : SuperName PARSEOP_EXP_EQUALS + | SuperName + PARSEOP_EXP_EQUALS TermArg {$$ = TrCreateAssignmentNode ($1, $3);} + /* Chained equals: (a=RefOf)=b, a=b=c=d etc. */ + + | PARSEOP_OPEN_PAREN + EqualsTerm + PARSEOP_CLOSE_PAREN + PARSEOP_EXP_EQUALS + TermArg {$$ = TrCreateAssignmentNode ($2, $5);} + /* Compound assignments -- Add (operand, operand, target) */ | TermArg PARSEOP_EXP_ADD_EQ {$$ = TrCreateLeafNode (PARSEOP_ADD);} diff --git a/source/compiler/aslexternal.c b/source/compiler/aslexternal.c index a814efd..8e76aa7 100644 --- a/source/compiler/aslexternal.c +++ b/source/compiler/aslexternal.c @@ -325,6 +325,7 @@ ExMoveExternals ( ACPI_PARSE_OBJECT *NextOp; ACPI_PARSE_OBJECT *Prev; ACPI_PARSE_OBJECT *Next; + char *ExternalName; ACPI_OBJECT_TYPE ObjType; UINT32 i; @@ -345,6 +346,12 @@ ExMoveExternals ( */ ExternalOp = NextOp->Asl.Child; + /* Get/set the fully qualified name */ + + ExternalName = AcpiNsGetNormalizedPathname (ExternalOp->Asl.Node, TRUE); + ExternalOp->Asl.ExternalName = ExternalName; + ExternalOp->Asl.Namepath = ExternalName; + /* Set line numbers (for listings, etc.) */ ExternalOp->Asl.LineNumber = 0; @@ -354,6 +361,14 @@ ExMoveExternals ( Next->Asl.LineNumber = 0; Next->Asl.LogicalLineNumber = 0; + if (Next->Asl.ParseOpcode == PARSEOP_NAMESEG) + { + Next->Asl.ParseOpcode = PARSEOP_NAMESTRING; + } + Next->Asl.ExternalName = ExternalName; + UtInternalizeName (ExternalName, &Next->Asl.Value.String); + Next->Asl.AmlLength = strlen (Next->Asl.Value.String); + Next = Next->Asl.Next; Next->Asl.LineNumber = 0; Next->Asl.LogicalLineNumber = 0; diff --git a/source/compiler/aslkeywords.y b/source/compiler/aslkeywords.y index 51af1c6..c908ae4 100644 --- a/source/compiler/aslkeywords.y +++ b/source/compiler/aslkeywords.y @@ -58,15 +58,18 @@ AccessAttribKeyword | 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 '(' {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_MULTIBYTE);} + | PARSEOP_ACCESSATTRIB_MULTIBYTE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_MULTIBYTE);} ByteConst - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_ACCESSATTRIB_RAW_BYTES '(' {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_BYTES);} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_ACCESSATTRIB_RAW_BYTES + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_BYTES);} ByteConst - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_ACCESSATTRIB_RAW_PROCESS '(' {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_ACCESSATTRIB_RAW_PROCESS + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);} ByteConst - ')' {$$ = TrLinkChildren ($3,1,$4);} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} ; AccessTypeKeyword diff --git a/source/compiler/aslopcodes.c b/source/compiler/aslopcodes.c index de9ffe1..c981f07 100644 --- a/source/compiler/aslopcodes.c +++ b/source/compiler/aslopcodes.c @@ -289,7 +289,7 @@ OpcSetOptimalIntegerSize ( Op->Asl.AmlOpcode = AML_DWORD_OP; return (4); } - else + else /* 64-bit integer */ { if (AcpiGbl_IntegerByteWidth == 4) { @@ -299,8 +299,12 @@ OpcSetOptimalIntegerSize ( if (!Gbl_IgnoreErrors) { /* Truncate the integer to 32-bit */ - Op->Asl.AmlOpcode = AML_DWORD_OP; - return (4); + + Op->Asl.Value.Integer &= ACPI_UINT32_MAX; + + /* Now set the optimal integer size */ + + return (OpcSetOptimalIntegerSize (Op)); } } diff --git a/source/compiler/aslprimaries.y b/source/compiler/aslprimaries.y index 742213a..b52bbcd 100644 --- a/source/compiler/aslprimaries.y +++ b/source/compiler/aslprimaries.y @@ -52,51 +52,61 @@ NoEcho(' ******************************************************************************/ AccessAsTerm - : PARSEOP_ACCESSAS '(' + : PARSEOP_ACCESSAS + PARSEOP_OPEN_PAREN AccessTypeKeyword OptionalAccessAttribTerm - ')' {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);} - | PARSEOP_ACCESSAS '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);} + | PARSEOP_ACCESSAS + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; AcquireTerm - : PARSEOP_ACQUIRE '(' {$$ = TrCreateLeafNode (PARSEOP_ACQUIRE);} + : PARSEOP_ACQUIRE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ACQUIRE);} SuperName ',' WordConstExpr - ')' {$$ = TrLinkChildren ($3,2,$4,$6);} - | PARSEOP_ACQUIRE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$6);} + | PARSEOP_ACQUIRE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; AddTerm - : PARSEOP_ADD '(' {$$ = TrCreateLeafNode (PARSEOP_ADD);} + : PARSEOP_ADD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ADD);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_ADD '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_ADD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; AliasTerm - : PARSEOP_ALIAS '(' {$$ = TrCreateLeafNode (PARSEOP_ALIAS);} + : PARSEOP_ALIAS + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ALIAS);} NameString NameStringItem - ')' {$$ = TrLinkChildren ($3,2,$4, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4, TrSetNodeFlags ($5, NODE_IS_NAME_DECLARATION));} - | PARSEOP_ALIAS '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_ALIAS + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; AndTerm - : PARSEOP_AND '(' {$$ = TrCreateLeafNode (PARSEOP_AND);} + : PARSEOP_AND + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_AND);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_AND '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_AND + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ArgTerm @@ -110,18 +120,21 @@ ArgTerm ; BankFieldTerm - : PARSEOP_BANKFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_BANKFIELD);} + : PARSEOP_BANKFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_BANKFIELD);} NameString NameStringItem TermArgItem ',' AccessTypeKeyword ',' LockRuleKeyword ',' UpdateRuleKeyword - ')' '{' + PARSEOP_CLOSE_PAREN '{' FieldUnitList '}' {$$ = TrLinkChildren ($3,7, $4,$5,$6,$8,$10,$12,$15);} - | PARSEOP_BANKFIELD '(' - error ')' '{' error '}' {$$ = AslDoError(); yyclearin;} + | PARSEOP_BANKFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN + '{' error '}' {$$ = AslDoError(); yyclearin;} ; BreakTerm @@ -144,58 +157,69 @@ BufferTermData ; CaseTerm - : PARSEOP_CASE '(' {$$ = TrCreateLeafNode (PARSEOP_CASE);} + : PARSEOP_CASE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CASE);} DataObject - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {$$ = TrLinkChildren ($3,2,$4,$7);} - | PARSEOP_CASE '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CASE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ConcatTerm - : PARSEOP_CONCATENATE '(' {$$ = TrCreateLeafNode (PARSEOP_CONCATENATE);} + : PARSEOP_CONCATENATE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CONCATENATE);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_CONCATENATE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_CONCATENATE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ConcatResTerm - : PARSEOP_CONCATENATERESTEMPLATE '(' {$$ = TrCreateLeafNode ( - PARSEOP_CONCATENATERESTEMPLATE);} + : PARSEOP_CONCATENATERESTEMPLATE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode ( + PARSEOP_CONCATENATERESTEMPLATE);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_CONCATENATERESTEMPLATE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_CONCATENATERESTEMPLATE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} + ; + +CondRefOfTerm + : PARSEOP_CONDREFOF + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CONDREFOF);} + CondRefOfSource + Target + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_CONDREFOF + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ConnectionTerm - : PARSEOP_CONNECTION '(' + : PARSEOP_CONNECTION + PARSEOP_OPEN_PAREN NameString - ')' {$$ = TrCreateNode (PARSEOP_CONNECTION,1,$3);} - | PARSEOP_CONNECTION '(' {$$ = TrCreateLeafNode (PARSEOP_CONNECTION);} + PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_CONNECTION,1,$3);} + | PARSEOP_CONNECTION + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CONNECTION);} ResourceMacroTerm - ')' {$$ = TrLinkChildren ($3, 1, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3, 1, TrLinkChildren ( TrCreateLeafNode (PARSEOP_RESOURCETEMPLATE), 3, TrCreateLeafNode (PARSEOP_DEFAULT_ARG), TrCreateLeafNode (PARSEOP_DEFAULT_ARG), $4));} - | PARSEOP_CONNECTION '(' - error ')' {$$ = AslDoError(); yyclearin;} - ; - -CondRefOfTerm - : PARSEOP_CONDREFOF '(' {$$ = TrCreateLeafNode (PARSEOP_CONDREFOF);} - SuperName - Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_CONDREFOF '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CONNECTION + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ContinueTerm @@ -203,92 +227,108 @@ ContinueTerm ; CopyObjectTerm - : PARSEOP_COPYOBJECT '(' {$$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);} + : PARSEOP_COPYOBJECT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);} TermArg - ',' SimpleTarget - ')' {$$ = TrLinkChildren ($3,2,$4, + ',' SimpleName + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4, TrSetNodeFlags ($6, NODE_IS_TARGET));} - | PARSEOP_COPYOBJECT '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_COPYOBJECT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateBitFieldTerm - : PARSEOP_CREATEBITFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);} + : PARSEOP_CREATEBITFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);} TermArg TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,3,$4,$5, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5, TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEBITFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEBITFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateByteFieldTerm - : PARSEOP_CREATEBYTEFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);} + : PARSEOP_CREATEBYTEFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);} TermArg TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,3,$4,$5, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5, TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEBYTEFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEBYTEFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateDWordFieldTerm - : PARSEOP_CREATEDWORDFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);} + : PARSEOP_CREATEDWORDFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);} TermArg TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,3,$4,$5, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5, TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEDWORDFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEDWORDFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateFieldTerm - : PARSEOP_CREATEFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);} + : PARSEOP_CREATEFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);} TermArg TermArgItem TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,4,$4,$5,$6, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,4,$4,$5,$6, TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateQWordFieldTerm - : PARSEOP_CREATEQWORDFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);} + : PARSEOP_CREATEQWORDFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);} TermArg TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,3,$4,$5, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5, TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEQWORDFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEQWORDFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateWordFieldTerm - : PARSEOP_CREATEWORDFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);} + : PARSEOP_CREATEWORDFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);} TermArg TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,3,$4,$5, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5, TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEWORDFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEWORDFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; DataRegionTerm - : PARSEOP_DATATABLEREGION '(' {$$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);} + : PARSEOP_DATATABLEREGION + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);} NameString TermArgItem TermArgItem TermArgItem - ')' {$$ = TrLinkChildren ($3,4, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,4, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$6,$7);} - | PARSEOP_DATATABLEREGION '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_DATATABLEREGION + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; DebugTerm @@ -296,11 +336,13 @@ DebugTerm ; DecTerm - : PARSEOP_DECREMENT '(' {$$ = TrCreateLeafNode (PARSEOP_DECREMENT);} + : PARSEOP_DECREMENT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DECREMENT);} SuperName - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_DECREMENT '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_DECREMENT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; DefaultTerm @@ -311,39 +353,48 @@ DefaultTerm ; DerefOfTerm - : PARSEOP_DEREFOF '(' {$$ = TrCreateLeafNode (PARSEOP_DEREFOF);} - TermArg - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_DEREFOF '(' - error ')' {$$ = AslDoError(); yyclearin;} + : PARSEOP_DEREFOF + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DEREFOF);} + DerefOfSource + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_DEREFOF + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; DeviceTerm - : PARSEOP_DEVICE '(' {$$ = TrCreateLeafNode (PARSEOP_DEVICE);} + : PARSEOP_DEVICE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DEVICE);} NameString - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {$$ = TrLinkChildren ($3,2, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);} - | PARSEOP_DEVICE '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_DEVICE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; DivideTerm - : PARSEOP_DIVIDE '(' {$$ = TrCreateLeafNode (PARSEOP_DIVIDE);} + : PARSEOP_DIVIDE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DIVIDE);} TermArg TermArgItem Target Target - ')' {$$ = TrLinkChildren ($3,4,$4,$5,$6,$7);} - | PARSEOP_DIVIDE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,4,$4,$5,$6,$7);} + | PARSEOP_DIVIDE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; EISAIDTerm - : PARSEOP_EISAID '(' - StringData ')' {$$ = TrUpdateNode (PARSEOP_EISAID, $3);} - | PARSEOP_EISAID '(' - error ')' {$$ = AslDoError(); yyclearin;} + : PARSEOP_EISAID + PARSEOP_OPEN_PAREN + StringData + PARSEOP_CLOSE_PAREN {$$ = TrUpdateNode (PARSEOP_EISAID, $3);} + | PARSEOP_EISAID + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ElseIfTerm @@ -361,88 +412,105 @@ ElseTerm | PARSEOP_ELSE error {$$ = AslDoError(); yyclearin;} - | PARSEOP_ELSEIF '(' {$$ = TrCreateLeafNode (PARSEOP_ELSE);} + | PARSEOP_ELSEIF + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ELSE);} TermArg {$$ = TrCreateLeafNode (PARSEOP_IF);} - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {TrLinkChildren ($5,2,$4,$8);} ElseTerm {TrLinkPeerNode ($5,$11);} {$$ = TrLinkChildren ($3,1,$5);} - | PARSEOP_ELSEIF '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_ELSEIF + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} | PARSEOP_ELSEIF error {$$ = AslDoError(); yyclearin;} ; EventTerm - : PARSEOP_EVENT '(' {$$ = TrCreateLeafNode (PARSEOP_EVENT);} + : PARSEOP_EVENT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_EVENT);} NameString - ')' {$$ = TrLinkChildren ($3,1, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION));} - | PARSEOP_EVENT '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_EVENT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ExternalTerm - : PARSEOP_EXTERNAL '(' + : PARSEOP_EXTERNAL + PARSEOP_OPEN_PAREN NameString OptionalObjectTypeKeyword OptionalParameterTypePackage OptionalParameterTypesPackage - ')' {$$ = TrCreateNode (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);} - | PARSEOP_EXTERNAL '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);} + | PARSEOP_EXTERNAL + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; FatalTerm - : PARSEOP_FATAL '(' {$$ = TrCreateLeafNode (PARSEOP_FATAL);} + : PARSEOP_FATAL + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_FATAL);} ByteConstExpr ',' DWordConstExpr TermArgItem - ')' {$$ = TrLinkChildren ($3,3,$4,$6,$7);} - | PARSEOP_FATAL '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$6,$7);} + | PARSEOP_FATAL + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; FieldTerm - : PARSEOP_FIELD '(' {$$ = TrCreateLeafNode (PARSEOP_FIELD);} + : PARSEOP_FIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_FIELD);} NameString ',' AccessTypeKeyword ',' LockRuleKeyword ',' UpdateRuleKeyword - ')' '{' + PARSEOP_CLOSE_PAREN '{' FieldUnitList '}' {$$ = TrLinkChildren ($3,5,$4,$6,$8,$10,$13);} - | PARSEOP_FIELD '(' - error ')' '{' error '}' {$$ = AslDoError(); yyclearin;} + | PARSEOP_FIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN + '{' error '}' {$$ = AslDoError(); yyclearin;} ; FindSetLeftBitTerm - : PARSEOP_FINDSETLEFTBIT '(' {$$ = TrCreateLeafNode (PARSEOP_FINDSETLEFTBIT);} + : PARSEOP_FINDSETLEFTBIT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_FINDSETLEFTBIT);} TermArg Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_FINDSETLEFTBIT '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_FINDSETLEFTBIT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; FindSetRightBitTerm - : PARSEOP_FINDSETRIGHTBIT '(' {$$ = TrCreateLeafNode (PARSEOP_FINDSETRIGHTBIT);} + : PARSEOP_FINDSETRIGHTBIT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_FINDSETRIGHTBIT);} TermArg Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_FINDSETRIGHTBIT '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_FINDSETRIGHTBIT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; /* Convert a For() loop to a While() loop */ ForTerm - : PARSEOP_FOR '(' {$$ = TrCreateLeafNode (PARSEOP_WHILE);} + : PARSEOP_FOR + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_WHILE);} OptionalTermArg ',' {} OptionalPredicate ',' OptionalTermArg {$$ = TrLinkPeerNode ($4,$3); - TrSetParent ($9,$3);} /* New parent is WHILE */ - ')' '{' TermList '}' {$$ = TrLinkChildren ($3,2,$7,$13);} + TrSetParent ($9,$3);} /* New parent is WHILE */ + PARSEOP_CLOSE_PAREN + '{' TermList '}' {$$ = TrLinkChildren ($3,2,$7,$13);} {$$ = TrLinkPeerNode ($13,$9); $$ = $10;} ; @@ -453,52 +521,62 @@ OptionalPredicate ; FprintfTerm - : PARSEOP_FPRINTF '(' {$$ = TrCreateLeafNode (PARSEOP_FPRINTF);} + : PARSEOP_FPRINTF + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_FPRINTF);} TermArg ',' StringData PrintfArgList - ')' {$$ = TrLinkChildren ($3,3,$4,$6,$7);} - | PARSEOP_FPRINTF '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$6,$7);} + | PARSEOP_FPRINTF + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; FromBCDTerm - : PARSEOP_FROMBCD '(' {$$ = TrCreateLeafNode (PARSEOP_FROMBCD);} + : PARSEOP_FROMBCD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_FROMBCD);} TermArg Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_FROMBCD '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_FROMBCD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; FunctionTerm - : PARSEOP_FUNCTION '(' {$$ = TrCreateLeafNode (PARSEOP_METHOD);} + : PARSEOP_FUNCTION + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_METHOD);} NameString OptionalParameterTypePackage OptionalParameterTypesPackage - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {$$ = TrLinkChildren ($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;} + | PARSEOP_FUNCTION + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; IfTerm - : PARSEOP_IF '(' {$$ = TrCreateLeafNode (PARSEOP_IF);} + : PARSEOP_IF + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_IF);} TermArg - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {$$ = TrLinkChildren ($3,2,$4,$7);} - | PARSEOP_IF '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_IF + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; IncludeTerm - : PARSEOP_INCLUDE '(' - String ')' {$$ = TrUpdateNode (PARSEOP_INCLUDE, $3); + : PARSEOP_INCLUDE + PARSEOP_OPEN_PAREN + String + PARSEOP_CLOSE_PAREN {$$ = TrUpdateNode (PARSEOP_INCLUDE, $3); FlOpenIncludeFile ($3);} ; @@ -508,130 +586,157 @@ IncludeEndTerm ; IncTerm - : PARSEOP_INCREMENT '(' {$$ = TrCreateLeafNode (PARSEOP_INCREMENT);} + : PARSEOP_INCREMENT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_INCREMENT);} SuperName - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_INCREMENT '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_INCREMENT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; IndexFieldTerm - : PARSEOP_INDEXFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_INDEXFIELD);} + : PARSEOP_INDEXFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_INDEXFIELD);} NameString NameStringItem ',' AccessTypeKeyword ',' LockRuleKeyword ',' UpdateRuleKeyword - ')' '{' + PARSEOP_CLOSE_PAREN '{' FieldUnitList '}' {$$ = TrLinkChildren ($3,6,$4,$5,$7,$9,$11,$14);} - | PARSEOP_INDEXFIELD '(' - error ')' '{' error '}' {$$ = AslDoError(); yyclearin;} + | PARSEOP_INDEXFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN + '{' error '}' {$$ = AslDoError(); yyclearin;} ; IndexTerm - : PARSEOP_INDEX '(' {$$ = TrCreateLeafNode (PARSEOP_INDEX);} + : PARSEOP_INDEX + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_INDEX);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_INDEX '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_INDEX + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LAndTerm - : PARSEOP_LAND '(' {$$ = TrCreateLeafNode (PARSEOP_LAND);} + : PARSEOP_LAND + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LAND);} TermArg TermArgItem - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_LAND '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_LAND + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LEqualTerm - : PARSEOP_LEQUAL '(' {$$ = TrCreateLeafNode (PARSEOP_LEQUAL);} + : PARSEOP_LEQUAL + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LEQUAL);} TermArg TermArgItem - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_LEQUAL '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_LEQUAL + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LGreaterEqualTerm - : PARSEOP_LGREATEREQUAL '(' {$$ = TrCreateLeafNode (PARSEOP_LLESS);} + : PARSEOP_LGREATEREQUAL + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LLESS);} TermArg TermArgItem - ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, + PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($3,2,$4,$5));} - | PARSEOP_LGREATEREQUAL '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_LGREATEREQUAL + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LGreaterTerm - : PARSEOP_LGREATER '(' {$$ = TrCreateLeafNode (PARSEOP_LGREATER);} + : PARSEOP_LGREATER + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LGREATER);} TermArg TermArgItem - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_LGREATER '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_LGREATER + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LLessEqualTerm - : PARSEOP_LLESSEQUAL '(' {$$ = TrCreateLeafNode (PARSEOP_LGREATER);} + : PARSEOP_LLESSEQUAL + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LGREATER);} TermArg TermArgItem - ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, + PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($3,2,$4,$5));} - | PARSEOP_LLESSEQUAL '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_LLESSEQUAL + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LLessTerm - : PARSEOP_LLESS '(' {$$ = TrCreateLeafNode (PARSEOP_LLESS);} + : PARSEOP_LLESS + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LLESS);} TermArg TermArgItem - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_LLESS '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_LLESS + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LNotEqualTerm - : PARSEOP_LNOTEQUAL '(' {$$ = TrCreateLeafNode (PARSEOP_LEQUAL);} + : PARSEOP_LNOTEQUAL + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LEQUAL);} TermArg TermArgItem - ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1, + PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_LNOT, 1, TrLinkChildren ($3,2,$4,$5));} - | PARSEOP_LNOTEQUAL '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_LNOTEQUAL + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LNotTerm - : PARSEOP_LNOT '(' {$$ = TrCreateLeafNode (PARSEOP_LNOT);} + : PARSEOP_LNOT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LNOT);} TermArg - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_LNOT '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_LNOT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LoadTableTerm - : PARSEOP_LOADTABLE '(' {$$ = TrCreateLeafNode (PARSEOP_LOADTABLE);} + : PARSEOP_LOADTABLE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LOADTABLE);} TermArg TermArgItem TermArgItem OptionalListString OptionalListString OptionalReference - ')' {$$ = TrLinkChildren ($3,6,$4,$5,$6,$7,$8,$9);} - | PARSEOP_LOADTABLE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,6,$4,$5,$6,$7,$8,$9);} + | PARSEOP_LOADTABLE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LoadTerm - : PARSEOP_LOAD '(' {$$ = TrCreateLeafNode (PARSEOP_LOAD);} + : PARSEOP_LOAD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LOAD);} NameString RequiredTarget - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_LOAD '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_LOAD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; LocalTerm @@ -646,102 +751,120 @@ LocalTerm ; LOrTerm - : PARSEOP_LOR '(' {$$ = TrCreateLeafNode (PARSEOP_LOR);} + : PARSEOP_LOR + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_LOR);} TermArg TermArgItem - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_LOR '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_LOR + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; MatchTerm - : PARSEOP_MATCH '(' {$$ = TrCreateLeafNode (PARSEOP_MATCH);} + : PARSEOP_MATCH + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_MATCH);} TermArg ',' MatchOpKeyword TermArgItem ',' MatchOpKeyword TermArgItem TermArgItem - ')' {$$ = TrLinkChildren ($3,6,$4,$6,$7,$9,$10,$11);} - | PARSEOP_MATCH '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,6,$4,$6,$7,$9,$10,$11);} + | PARSEOP_MATCH + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; MethodTerm - : PARSEOP_METHOD '(' {$$ = TrCreateLeafNode (PARSEOP_METHOD);} + : PARSEOP_METHOD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_METHOD);} NameString OptionalByteConstExpr {UtCheckIntegerRange ($5, 0, 7);} OptionalSerializeRuleKeyword OptionalByteConstExpr OptionalParameterTypePackage OptionalParameterTypesPackage - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {$$ = TrLinkChildren ($3,7, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION), $5,$7,$8,$9,$10,$13);} - | PARSEOP_METHOD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_METHOD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; MidTerm - : PARSEOP_MID '(' {$$ = TrCreateLeafNode (PARSEOP_MID);} + : PARSEOP_MID + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_MID);} TermArg TermArgItem TermArgItem Target - ')' {$$ = TrLinkChildren ($3,4,$4,$5,$6,$7);} - | PARSEOP_MID '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,4,$4,$5,$6,$7);} + | PARSEOP_MID + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ModTerm - : PARSEOP_MOD '(' {$$ = TrCreateLeafNode (PARSEOP_MOD);} + : PARSEOP_MOD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_MOD);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_MOD '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_MOD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; MultiplyTerm - : PARSEOP_MULTIPLY '(' {$$ = TrCreateLeafNode (PARSEOP_MULTIPLY);} + : PARSEOP_MULTIPLY + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_MULTIPLY);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_MULTIPLY '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_MULTIPLY + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; MutexTerm - : PARSEOP_MUTEX '(' {$$ = TrCreateLeafNode (PARSEOP_MUTEX);} + : PARSEOP_MUTEX + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_MUTEX);} NameString ',' ByteConstExpr - ')' {$$ = TrLinkChildren ($3,2, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);} - | PARSEOP_MUTEX '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_MUTEX + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; NameTerm - : PARSEOP_NAME '(' {$$ = TrCreateLeafNode (PARSEOP_NAME);} + : PARSEOP_NAME + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_NAME);} NameString ',' DataObject - ')' {$$ = TrLinkChildren ($3,2, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);} - | PARSEOP_NAME '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_NAME + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; NAndTerm - : PARSEOP_NAND '(' {$$ = TrCreateLeafNode (PARSEOP_NAND);} + : PARSEOP_NAND + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_NAND);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_NAND '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_NAND + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; NoOpTerm @@ -749,60 +872,72 @@ NoOpTerm ; NOrTerm - : PARSEOP_NOR '(' {$$ = TrCreateLeafNode (PARSEOP_NOR);} + : PARSEOP_NOR + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_NOR);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_NOR '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_NOR + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; NotifyTerm - : PARSEOP_NOTIFY '(' {$$ = TrCreateLeafNode (PARSEOP_NOTIFY);} + : PARSEOP_NOTIFY + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_NOTIFY);} SuperName TermArgItem - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_NOTIFY '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_NOTIFY + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; NotTerm - : PARSEOP_NOT '(' {$$ = TrCreateLeafNode (PARSEOP_NOT);} + : PARSEOP_NOT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_NOT);} TermArg Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_NOT '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_NOT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ObjectTypeTerm - : PARSEOP_OBJECTTYPE '(' {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);} - ObjectTypeName - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_OBJECTTYPE '(' - error ')' {$$ = AslDoError(); yyclearin;} + : PARSEOP_OBJECTTYPE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);} + ObjectTypeSource + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_OBJECTTYPE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; OffsetTerm - : PARSEOP_OFFSET '(' + : PARSEOP_OFFSET + PARSEOP_OPEN_PAREN AmlPackageLengthTerm - ')' {$$ = TrCreateNode (PARSEOP_OFFSET,1,$3);} - | PARSEOP_OFFSET '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_OFFSET,1,$3);} + | PARSEOP_OFFSET + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; OpRegionTerm - : PARSEOP_OPERATIONREGION '(' {$$ = TrCreateLeafNode (PARSEOP_OPERATIONREGION);} + : PARSEOP_OPERATIONREGION + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_OPERATIONREGION);} NameString ',' OpRegionSpaceIdTerm TermArgItem TermArgItem - ')' {$$ = TrLinkChildren ($3,4, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,4, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION), $6,$7,$8);} - | PARSEOP_OPERATIONREGION '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_OPERATIONREGION + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; OpRegionSpaceIdTerm @@ -811,13 +946,15 @@ OpRegionSpaceIdTerm ; OrTerm - : PARSEOP_OR '(' {$$ = TrCreateLeafNode (PARSEOP_OR);} + : PARSEOP_OR + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_OR);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_OR '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_OR + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; PackageTerm @@ -826,25 +963,29 @@ PackageTerm '{' PackageList '}' {$$ = TrLinkChildren ($2,2,$3,$5);} PowerResTerm - : PARSEOP_POWERRESOURCE '(' {$$ = TrCreateLeafNode (PARSEOP_POWERRESOURCE);} + : PARSEOP_POWERRESOURCE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_POWERRESOURCE);} NameString ',' ByteConstExpr ',' WordConstExpr - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {$$ = TrLinkChildren ($3,4, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION), $6,$8,$11);} - | PARSEOP_POWERRESOURCE '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_POWERRESOURCE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; PrintfTerm - : PARSEOP_PRINTF '(' {$$ = TrCreateLeafNode (PARSEOP_PRINTF);} + : PARSEOP_PRINTF + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_PRINTF);} StringData PrintfArgList - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_PRINTF '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_PRINTF + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; PrintfArgList @@ -855,26 +996,30 @@ PrintfArgList ; ProcessorTerm - : PARSEOP_PROCESSOR '(' {$$ = TrCreateLeafNode (PARSEOP_PROCESSOR);} + : PARSEOP_PROCESSOR + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_PROCESSOR);} NameString ',' ByteConstExpr OptionalDWordConstExpr OptionalByteConstExpr - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {$$ = TrLinkChildren ($3,5, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION), $6,$7,$8,$11);} - | PARSEOP_PROCESSOR '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_PROCESSOR + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; RawDataBufferTerm - : PARSEOP_DATABUFFER '(' {$$ = TrCreateLeafNode (PARSEOP_DATABUFFER);} + : PARSEOP_DATABUFFER + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DATABUFFER);} OptionalWordConst - ')' '{' + PARSEOP_CLOSE_PAREN '{' ByteList '}' {$$ = TrLinkChildren ($3,2,$4,$7);} - | PARSEOP_DATABUFFER '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_DATABUFFER + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; /* @@ -882,204 +1027,247 @@ RawDataBufferTerm * we've taken a pointer to it. (hard to tell if a local becomes initialized this way.) */ RefOfTerm - : PARSEOP_REFOF '(' {$$ = TrCreateLeafNode (PARSEOP_REFOF);} - SuperName - ')' {$$ = TrLinkChildren ($3,1, + : PARSEOP_REFOF + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_REFOF);} + RefOfSource + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1, TrSetNodeFlags ($4, NODE_IS_TARGET));} - | PARSEOP_REFOF '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_REFOF + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ReleaseTerm - : PARSEOP_RELEASE '(' {$$ = TrCreateLeafNode (PARSEOP_RELEASE);} + : PARSEOP_RELEASE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_RELEASE);} SuperName - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_RELEASE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_RELEASE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ResetTerm - : PARSEOP_RESET '(' {$$ = TrCreateLeafNode (PARSEOP_RESET);} + : PARSEOP_RESET + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_RESET);} SuperName - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_RESET '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_RESET + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ReturnTerm - : PARSEOP_RETURN '(' {$$ = TrCreateLeafNode (PARSEOP_RETURN);} + : PARSEOP_RETURN + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_RETURN);} OptionalReturnArg - ')' {$$ = TrLinkChildren ($3,1,$4);} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} | PARSEOP_RETURN {$$ = TrLinkChildren ( TrCreateLeafNode (PARSEOP_RETURN),1, TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO), NODE_IS_NULL_RETURN));} - | PARSEOP_RETURN '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_RETURN + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ScopeTerm - : PARSEOP_SCOPE '(' {$$ = TrCreateLeafNode (PARSEOP_SCOPE);} + : PARSEOP_SCOPE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_SCOPE);} NameString - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {$$ = TrLinkChildren ($3,2, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);} - | PARSEOP_SCOPE '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_SCOPE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ShiftLeftTerm - : PARSEOP_SHIFTLEFT '(' {$$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);} + : PARSEOP_SHIFTLEFT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_SHIFTLEFT '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_SHIFTLEFT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ShiftRightTerm - : PARSEOP_SHIFTRIGHT '(' {$$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);} + : PARSEOP_SHIFTRIGHT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_SHIFTRIGHT '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_SHIFTRIGHT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; SignalTerm - : PARSEOP_SIGNAL '(' {$$ = TrCreateLeafNode (PARSEOP_SIGNAL);} + : PARSEOP_SIGNAL + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_SIGNAL);} SuperName - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_SIGNAL '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_SIGNAL + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; SizeOfTerm - : PARSEOP_SIZEOF '(' {$$ = TrCreateLeafNode (PARSEOP_SIZEOF);} + : PARSEOP_SIZEOF + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_SIZEOF);} SuperName - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_SIZEOF '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_SIZEOF + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; SleepTerm - : PARSEOP_SLEEP '(' {$$ = TrCreateLeafNode (PARSEOP_SLEEP);} + : PARSEOP_SLEEP + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_SLEEP);} TermArg - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_SLEEP '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_SLEEP + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; StallTerm - : PARSEOP_STALL '(' {$$ = TrCreateLeafNode (PARSEOP_STALL);} + : PARSEOP_STALL + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_STALL);} TermArg - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_STALL '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_STALL + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; StoreTerm - : PARSEOP_STORE '(' {$$ = TrCreateLeafNode (PARSEOP_STORE);} + : PARSEOP_STORE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_STORE);} TermArg ',' SuperName - ')' {$$ = TrLinkChildren ($3,2,$4, - TrSetNodeFlags ($6, NODE_IS_TARGET));} - | PARSEOP_STORE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4, + TrSetNodeFlags ($6, NODE_IS_TARGET));} + | PARSEOP_STORE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; SubtractTerm - : PARSEOP_SUBTRACT '(' {$$ = TrCreateLeafNode (PARSEOP_SUBTRACT);} + : PARSEOP_SUBTRACT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_SUBTRACT);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_SUBTRACT '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_SUBTRACT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; SwitchTerm - : PARSEOP_SWITCH '(' {$$ = TrCreateLeafNode (PARSEOP_SWITCH);} + : PARSEOP_SWITCH + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_SWITCH);} TermArg - ')' '{' - CaseDefaultTermList '}' - {$$ = TrLinkChildren ($3,2,$4,$7);} - | PARSEOP_SWITCH '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN '{' + CaseDefaultTermList '}' {$$ = TrLinkChildren ($3,2,$4,$7);} + | PARSEOP_SWITCH + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ThermalZoneTerm - : PARSEOP_THERMALZONE '(' {$$ = TrCreateLeafNode (PARSEOP_THERMALZONE);} + : PARSEOP_THERMALZONE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_THERMALZONE);} NameString - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {$$ = TrLinkChildren ($3,2, TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);} - | PARSEOP_THERMALZONE '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_THERMALZONE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; TimerTerm - : PARSEOP_TIMER '(' {$$ = TrCreateLeafNode (PARSEOP_TIMER);} - ')' {$$ = TrLinkChildren ($3,0);} + : PARSEOP_TIMER + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_TIMER);} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,0);} | PARSEOP_TIMER {$$ = TrLinkChildren ( TrCreateLeafNode (PARSEOP_TIMER),0);} - | PARSEOP_TIMER '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_TIMER + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ToBCDTerm - : PARSEOP_TOBCD '(' {$$ = TrCreateLeafNode (PARSEOP_TOBCD);} + : PARSEOP_TOBCD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_TOBCD);} TermArg Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_TOBCD '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_TOBCD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ToBufferTerm - : PARSEOP_TOBUFFER '(' {$$ = TrCreateLeafNode (PARSEOP_TOBUFFER);} + : PARSEOP_TOBUFFER + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_TOBUFFER);} TermArg Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_TOBUFFER '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_TOBUFFER + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ToDecimalStringTerm - : PARSEOP_TODECIMALSTRING '(' {$$ = TrCreateLeafNode (PARSEOP_TODECIMALSTRING);} + : PARSEOP_TODECIMALSTRING + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_TODECIMALSTRING);} TermArg Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_TODECIMALSTRING '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_TODECIMALSTRING + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ToHexStringTerm - : PARSEOP_TOHEXSTRING '(' {$$ = TrCreateLeafNode (PARSEOP_TOHEXSTRING);} + : PARSEOP_TOHEXSTRING + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_TOHEXSTRING);} TermArg Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_TOHEXSTRING '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_TOHEXSTRING + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ToIntegerTerm - : PARSEOP_TOINTEGER '(' {$$ = TrCreateLeafNode (PARSEOP_TOINTEGER);} + : PARSEOP_TOINTEGER + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_TOINTEGER);} TermArg Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_TOINTEGER '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_TOINTEGER + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ToPLDTerm - : PARSEOP_TOPLD '(' {$$ = TrCreateLeafNode (PARSEOP_TOPLD);} + : PARSEOP_TOPLD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_TOPLD);} PldKeywordList - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_TOPLD '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_TOPLD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; PldKeywordList @@ -1099,62 +1287,77 @@ PldKeywordList ToStringTerm - : PARSEOP_TOSTRING '(' {$$ = TrCreateLeafNode (PARSEOP_TOSTRING);} + : PARSEOP_TOSTRING + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_TOSTRING);} TermArg OptionalCount Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_TOSTRING '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_TOSTRING + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ToUUIDTerm - : PARSEOP_TOUUID '(' - StringData ')' {$$ = TrUpdateNode (PARSEOP_TOUUID, $3);} - | PARSEOP_TOUUID '(' - error ')' {$$ = AslDoError(); yyclearin;} + : PARSEOP_TOUUID + PARSEOP_OPEN_PAREN + StringData + PARSEOP_CLOSE_PAREN {$$ = TrUpdateNode (PARSEOP_TOUUID, $3);} + | PARSEOP_TOUUID + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; UnicodeTerm - : PARSEOP_UNICODE '(' {$$ = TrCreateLeafNode (PARSEOP_UNICODE);} + : PARSEOP_UNICODE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_UNICODE);} StringData - ')' {$$ = TrLinkChildren ($3,2,0,$4);} - | PARSEOP_UNICODE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,0,$4);} + | PARSEOP_UNICODE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; UnloadTerm - : PARSEOP_UNLOAD '(' {$$ = TrCreateLeafNode (PARSEOP_UNLOAD);} + : PARSEOP_UNLOAD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_UNLOAD);} SuperName - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_UNLOAD '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_UNLOAD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; WaitTerm - : PARSEOP_WAIT '(' {$$ = TrCreateLeafNode (PARSEOP_WAIT);} + : PARSEOP_WAIT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_WAIT);} SuperName TermArgItem - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_WAIT '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_WAIT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; XOrTerm - : PARSEOP_XOR '(' {$$ = TrCreateLeafNode (PARSEOP_XOR);} + : PARSEOP_XOR + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_XOR);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_XOR '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_XOR + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; WhileTerm - : PARSEOP_WHILE '(' {$$ = TrCreateLeafNode (PARSEOP_WHILE);} + : PARSEOP_WHILE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_WHILE);} TermArg - ')' '{' TermList '}' - {$$ = TrLinkChildren ($3,2,$4,$7);} - | PARSEOP_WHILE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN + '{' TermList '}' {$$ = TrLinkChildren ($3,2,$4,$7);} + | PARSEOP_WHILE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; diff --git a/source/compiler/aslresources.y b/source/compiler/aslresources.y index 92d58a9..34ce475 100644 --- a/source/compiler/aslresources.y +++ b/source/compiler/aslresources.y @@ -56,7 +56,8 @@ NoEcho(' * Also, insert the EndTag at the end of the template. */ ResourceTemplateTerm - : PARSEOP_RESOURCETEMPLATE OptionalParentheses + : PARSEOP_RESOURCETEMPLATE + OptionalParentheses '{' ResourceMacroList '}' {$$ = TrCreateNode (PARSEOP_RESOURCETEMPLATE,4, TrCreateLeafNode (PARSEOP_DEFAULT_ARG), @@ -67,7 +68,8 @@ ResourceTemplateTerm OptionalParentheses : {$$ = NULL;} - | '(' ')' {$$ = NULL;} + | PARSEOP_OPEN_PAREN + PARSEOP_CLOSE_PAREN {$$ = NULL;} ; ResourceMacroList @@ -116,19 +118,22 @@ ResourceMacroTerm ; DMATerm - : PARSEOP_DMA '(' {$$ = TrCreateLeafNode (PARSEOP_DMA);} + : PARSEOP_DMA + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DMA);} DMATypeKeyword OptionalBusMasterKeyword ',' XferTypeKeyword OptionalNameString_Last - ')' '{' + PARSEOP_CLOSE_PAREN '{' ByteList '}' {$$ = TrLinkChildren ($3,5,$4,$5,$7,$8,$11);} - | PARSEOP_DMA '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_DMA + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; DWordIOTerm - : PARSEOP_DWORDIO '(' {$$ = TrCreateLeafNode (PARSEOP_DWORDIO);} + : PARSEOP_DWORDIO + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DWORDIO);} OptionalResourceType_First OptionalMinType OptionalMaxType @@ -144,14 +149,16 @@ DWordIOTerm OptionalNameString OptionalType OptionalTranslationType_Last - ')' {$$ = TrLinkChildren ($3,15, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,15, $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);} - | PARSEOP_DWORDIO '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_DWORDIO + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; DWordMemoryTerm - : PARSEOP_DWORDMEMORY '(' {$$ = TrCreateLeafNode (PARSEOP_DWORDMEMORY);} + : PARSEOP_DWORDMEMORY + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DWORDMEMORY);} OptionalResourceType_First OptionalDecodeType OptionalMinType @@ -168,14 +175,16 @@ DWordMemoryTerm OptionalNameString OptionalAddressRange OptionalType_Last - ')' {$$ = TrLinkChildren ($3,16, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,16, $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);} - | PARSEOP_DWORDMEMORY '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_DWORDMEMORY + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; DWordSpaceTerm - : PARSEOP_DWORDSPACE '(' {$$ = TrCreateLeafNode (PARSEOP_DWORDSPACE);} + : PARSEOP_DWORDSPACE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DWORDSPACE);} ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);} OptionalResourceType OptionalDecodeType @@ -190,21 +199,25 @@ DWordSpaceTerm OptionalByteConstExpr OptionalStringData OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,14, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,14, $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);} - | PARSEOP_DWORDSPACE '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_DWORDSPACE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; EndDependentFnTerm - : PARSEOP_ENDDEPENDENTFN '(' - ')' {$$ = TrCreateLeafNode (PARSEOP_ENDDEPENDENTFN);} - | PARSEOP_ENDDEPENDENTFN '(' - error ')' {$$ = AslDoError(); yyclearin;} + : PARSEOP_ENDDEPENDENTFN + PARSEOP_OPEN_PAREN + PARSEOP_CLOSE_PAREN {$$ = TrCreateLeafNode (PARSEOP_ENDDEPENDENTFN);} + | PARSEOP_ENDDEPENDENTFN + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ExtendedIOTerm - : PARSEOP_EXTENDEDIO '(' {$$ = TrCreateLeafNode (PARSEOP_EXTENDEDIO);} + : PARSEOP_EXTENDEDIO + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_EXTENDEDIO);} OptionalResourceType_First OptionalMinType OptionalMaxType @@ -219,14 +232,16 @@ ExtendedIOTerm OptionalNameString OptionalType OptionalTranslationType_Last - ')' {$$ = TrLinkChildren ($3,14, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,14, $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);} - | PARSEOP_EXTENDEDIO '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_EXTENDEDIO + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ExtendedMemoryTerm - : PARSEOP_EXTENDEDMEMORY '(' {$$ = TrCreateLeafNode (PARSEOP_EXTENDEDMEMORY);} + : PARSEOP_EXTENDEDMEMORY + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_EXTENDEDMEMORY);} OptionalResourceType_First OptionalDecodeType OptionalMinType @@ -242,14 +257,15 @@ ExtendedMemoryTerm OptionalNameString OptionalAddressRange OptionalType_Last - ')' {$$ = TrLinkChildren ($3,15, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,15, $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);} - | PARSEOP_EXTENDEDMEMORY '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_EXTENDEDMEMORY + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ExtendedSpaceTerm - : PARSEOP_EXTENDEDSPACE '(' {$$ = TrCreateLeafNode (PARSEOP_EXTENDEDSPACE);} + : PARSEOP_EXTENDEDSPACE PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_EXTENDEDSPACE);} ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);} OptionalResourceType OptionalDecodeType @@ -263,35 +279,41 @@ ExtendedSpaceTerm ',' QWordConstExpr OptionalQWordConstExpr OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,13, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,13, $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);} - | PARSEOP_EXTENDEDSPACE '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_EXTENDEDSPACE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; FixedDmaTerm - : PARSEOP_FIXEDDMA '(' {$$ = TrCreateLeafNode (PARSEOP_FIXEDDMA);} + : PARSEOP_FIXEDDMA + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_FIXEDDMA);} WordConstExpr /* 04: DMA RequestLines */ ',' WordConstExpr /* 06: DMA Channels */ OptionalXferSize /* 07: DMA TransferSize */ OptionalNameString /* 08: DescriptorName */ - ')' {$$ = TrLinkChildren ($3,4,$4,$6,$7,$8);} - | PARSEOP_FIXEDDMA '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,4,$4,$6,$7,$8);} + | PARSEOP_FIXEDDMA + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; FixedIOTerm - : PARSEOP_FIXEDIO '(' {$$ = TrCreateLeafNode (PARSEOP_FIXEDIO);} + : PARSEOP_FIXEDIO + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_FIXEDIO);} WordConstExpr ',' ByteConstExpr OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,3,$4,$6,$7);} - | PARSEOP_FIXEDIO '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$6,$7);} + | PARSEOP_FIXEDIO + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; GpioIntTerm - : PARSEOP_GPIO_INT '(' {$$ = TrCreateLeafNode (PARSEOP_GPIO_INT);} + : PARSEOP_GPIO_INT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_GPIO_INT);} InterruptTypeKeyword /* 04: InterruptType */ ',' InterruptLevel /* 06: InterruptLevel */ OptionalShareType /* 07: SharedType */ @@ -302,15 +324,17 @@ GpioIntTerm OptionalResourceType /* 14: ResourceType */ OptionalNameString /* 15: DescriptorName */ OptionalBuffer_Last /* 16: VendorData */ - ')' '{' + PARSEOP_CLOSE_PAREN '{' DWordConstExpr '}' {$$ = TrLinkChildren ($3,11, $4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);} - | PARSEOP_GPIO_INT '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_GPIO_INT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; GpioIoTerm - : PARSEOP_GPIO_IO '(' {$$ = TrCreateLeafNode (PARSEOP_GPIO_IO);} + : PARSEOP_GPIO_IO + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_GPIO_IO);} OptionalShareType_First /* 04: SharedType */ ',' PinConfigByte /* 06: PinConfig */ OptionalWordConstExpr /* 07: DebounceTimeout */ @@ -321,15 +345,17 @@ GpioIoTerm OptionalResourceType /* 13: ResourceType */ OptionalNameString /* 14: DescriptorName */ OptionalBuffer_Last /* 15: VendorData */ - ')' '{' + PARSEOP_CLOSE_PAREN '{' DWordList '}' {$$ = TrLinkChildren ($3,11, $4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);} - | PARSEOP_GPIO_IO '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_GPIO_IO + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; I2cSerialBusTerm - : PARSEOP_I2C_SERIALBUS '(' {$$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS);} + : PARSEOP_I2C_SERIALBUS + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS);} WordConstExpr /* 04: SlaveAddress */ OptionalSlaveMode /* 05: SlaveMode */ ',' DWordConstExpr /* 07: ConnectionSpeed */ @@ -339,15 +365,17 @@ I2cSerialBusTerm OptionalResourceType /* 12: ResourceType */ OptionalNameString /* 13: DescriptorName */ OptionalBuffer_Last /* 14: VendorData */ - ')' {$$ = TrLinkChildren ($3,10, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,10, $4,$5,$7,$8,$10,$11,$12,$13, TrCreateLeafNode (PARSEOP_DEFAULT_ARG),$14);} - | PARSEOP_I2C_SERIALBUS '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_I2C_SERIALBUS + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; I2cSerialBusTermV2 - : PARSEOP_I2C_SERIALBUS_V2 '(' {$$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS_V2);} + : PARSEOP_I2C_SERIALBUS_V2 + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_I2C_SERIALBUS_V2);} WordConstExpr /* 04: SlaveAddress */ OptionalSlaveMode /* 05: SlaveMode */ ',' DWordConstExpr /* 07: ConnectionSpeed */ @@ -358,14 +386,16 @@ I2cSerialBusTermV2 OptionalNameString /* 13: DescriptorName */ OptionalShareType /* 14: Share */ OptionalBuffer_Last /* 15: VendorData */ - ')' {$$ = TrLinkChildren ($3,10, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,10, $4,$5,$7,$8,$10,$11,$12,$13,$14,$15);} - | PARSEOP_I2C_SERIALBUS_V2 '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_I2C_SERIALBUS_V2 + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; InterruptTerm - : PARSEOP_INTERRUPT '(' {$$ = TrCreateLeafNode (PARSEOP_INTERRUPT);} + : PARSEOP_INTERRUPT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_INTERRUPT);} OptionalResourceType_First ',' InterruptTypeKeyword ',' InterruptLevel @@ -373,86 +403,100 @@ InterruptTerm OptionalByteConstExpr OptionalStringData OptionalNameString_Last - ')' '{' + PARSEOP_CLOSE_PAREN '{' DWordList '}' {$$ = TrLinkChildren ($3,8, $4,$6,$8,$9,$10,$11,$12,$15);} - | PARSEOP_INTERRUPT '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_INTERRUPT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; IOTerm - : PARSEOP_IO '(' {$$ = TrCreateLeafNode (PARSEOP_IO);} + : PARSEOP_IO + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_IO);} IODecodeKeyword ',' WordConstExpr ',' WordConstExpr ',' ByteConstExpr ',' ByteConstExpr OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,6,$4,$6,$8,$10,$12,$13);} - | PARSEOP_IO '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,6,$4,$6,$8,$10,$12,$13);} + | PARSEOP_IO + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; IRQNoFlagsTerm - : PARSEOP_IRQNOFLAGS '(' {$$ = TrCreateLeafNode (PARSEOP_IRQNOFLAGS);} + : PARSEOP_IRQNOFLAGS + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_IRQNOFLAGS);} OptionalNameString_First - ')' '{' + PARSEOP_CLOSE_PAREN '{' ByteList '}' {$$ = TrLinkChildren ($3,2,$4,$7);} - | PARSEOP_IRQNOFLAGS '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_IRQNOFLAGS + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; IRQTerm - : PARSEOP_IRQ '(' {$$ = TrCreateLeafNode (PARSEOP_IRQ);} + : PARSEOP_IRQ + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_IRQ);} InterruptTypeKeyword ',' InterruptLevel OptionalShareType OptionalNameString_Last - ')' '{' + PARSEOP_CLOSE_PAREN '{' ByteList '}' {$$ = TrLinkChildren ($3,5,$4,$6,$7,$8,$11);} - | PARSEOP_IRQ '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_IRQ + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; Memory24Term - : PARSEOP_MEMORY24 '(' {$$ = TrCreateLeafNode (PARSEOP_MEMORY24);} + : PARSEOP_MEMORY24 + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_MEMORY24);} OptionalReadWriteKeyword ',' WordConstExpr ',' WordConstExpr ',' WordConstExpr ',' WordConstExpr OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,6,$4,$6,$8,$10,$12,$13);} - | PARSEOP_MEMORY24 '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,6,$4,$6,$8,$10,$12,$13);} + | PARSEOP_MEMORY24 + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; Memory32FixedTerm - : PARSEOP_MEMORY32FIXED '(' {$$ = TrCreateLeafNode (PARSEOP_MEMORY32FIXED);} + : PARSEOP_MEMORY32FIXED + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_MEMORY32FIXED);} OptionalReadWriteKeyword ',' DWordConstExpr ',' DWordConstExpr OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,4,$4,$6,$8,$9);} - | PARSEOP_MEMORY32FIXED '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,4,$4,$6,$8,$9);} + | PARSEOP_MEMORY32FIXED + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; Memory32Term - : PARSEOP_MEMORY32 '(' {$$ = TrCreateLeafNode (PARSEOP_MEMORY32);} + : PARSEOP_MEMORY32 + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_MEMORY32);} OptionalReadWriteKeyword ',' DWordConstExpr ',' DWordConstExpr ',' DWordConstExpr ',' DWordConstExpr OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,6,$4,$6,$8,$10,$12,$13);} - | PARSEOP_MEMORY32 '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,6,$4,$6,$8,$10,$12,$13);} + | PARSEOP_MEMORY32 + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; QWordIOTerm - : PARSEOP_QWORDIO '(' {$$ = TrCreateLeafNode (PARSEOP_QWORDIO);} + : PARSEOP_QWORDIO + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_QWORDIO);} OptionalResourceType_First OptionalMinType OptionalMaxType @@ -468,14 +512,16 @@ QWordIOTerm OptionalNameString OptionalType OptionalTranslationType_Last - ')' {$$ = TrLinkChildren ($3,15, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,15, $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);} - | PARSEOP_QWORDIO '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_QWORDIO + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; QWordMemoryTerm - : PARSEOP_QWORDMEMORY '(' {$$ = TrCreateLeafNode (PARSEOP_QWORDMEMORY);} + : PARSEOP_QWORDMEMORY + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_QWORDMEMORY);} OptionalResourceType_First OptionalDecodeType OptionalMinType @@ -492,14 +538,16 @@ QWordMemoryTerm OptionalNameString OptionalAddressRange OptionalType_Last - ')' {$$ = TrLinkChildren ($3,16, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,16, $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);} - | PARSEOP_QWORDMEMORY '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_QWORDMEMORY + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; QWordSpaceTerm - : PARSEOP_QWORDSPACE '(' {$$ = TrCreateLeafNode (PARSEOP_QWORDSPACE);} + : PARSEOP_QWORDSPACE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_QWORDSPACE);} ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);} OptionalResourceType OptionalDecodeType @@ -514,27 +562,31 @@ QWordSpaceTerm OptionalByteConstExpr OptionalStringData OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,14, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,14, $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);} - | PARSEOP_QWORDSPACE '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_QWORDSPACE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; RegisterTerm - : PARSEOP_REGISTER '(' {$$ = TrCreateLeafNode (PARSEOP_REGISTER);} + : PARSEOP_REGISTER + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_REGISTER);} AddressSpaceKeyword ',' ByteConstExpr ',' ByteConstExpr ',' QWordConstExpr OptionalAccessSize OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,6,$4,$6,$8,$10,$11,$12);} - | PARSEOP_REGISTER '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,6,$4,$6,$8,$10,$11,$12);} + | PARSEOP_REGISTER + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; SpiSerialBusTerm - : PARSEOP_SPI_SERIALBUS '(' {$$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS);} + : PARSEOP_SPI_SERIALBUS + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS);} WordConstExpr /* 04: DeviceSelection */ OptionalDevicePolarity /* 05: DevicePolarity */ OptionalWireMode /* 06: WireMode */ @@ -548,15 +600,17 @@ SpiSerialBusTerm OptionalResourceType /* 19: ResourceType */ OptionalNameString /* 20: DescriptorName */ OptionalBuffer_Last /* 21: VendorData */ - ')' {$$ = TrLinkChildren ($3,14, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($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;} + | PARSEOP_SPI_SERIALBUS + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; SpiSerialBusTermV2 - : PARSEOP_SPI_SERIALBUS_V2 '(' {$$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS_V2);} + : PARSEOP_SPI_SERIALBUS_V2 + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_SPI_SERIALBUS_V2);} WordConstExpr /* 04: DeviceSelection */ OptionalDevicePolarity /* 05: DevicePolarity */ OptionalWireMode /* 06: WireMode */ @@ -571,32 +625,38 @@ SpiSerialBusTermV2 OptionalNameString /* 20: DescriptorName */ OptionalShareType /* 21: Share */ OptionalBuffer_Last /* 22: VendorData */ - ')' {$$ = TrLinkChildren ($3,14, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,14, $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21,$22);} - | PARSEOP_SPI_SERIALBUS_V2 '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_SPI_SERIALBUS_V2 + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; StartDependentFnNoPriTerm - : PARSEOP_STARTDEPENDENTFN_NOPRI '(' {$$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN_NOPRI);} - ')' '{' + : PARSEOP_STARTDEPENDENTFN_NOPRI + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN_NOPRI);} + PARSEOP_CLOSE_PAREN '{' ResourceMacroList '}' {$$ = TrLinkChildren ($3,1,$6);} - | PARSEOP_STARTDEPENDENTFN_NOPRI '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_STARTDEPENDENTFN_NOPRI + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; StartDependentFnTerm - : PARSEOP_STARTDEPENDENTFN '(' {$$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN);} + : PARSEOP_STARTDEPENDENTFN + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_STARTDEPENDENTFN);} ByteConstExpr ',' ByteConstExpr - ')' '{' + PARSEOP_CLOSE_PAREN '{' ResourceMacroList '}' {$$ = TrLinkChildren ($3,3,$4,$6,$9);} - | PARSEOP_STARTDEPENDENTFN '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_STARTDEPENDENTFN + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; UartSerialBusTerm - : PARSEOP_UART_SERIALBUS '(' {$$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS);} + : PARSEOP_UART_SERIALBUS + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS);} DWordConstExpr /* 04: ConnectionSpeed */ OptionalBitsPerByte /* 05: BitsPerByte */ OptionalStopBits /* 06: StopBits */ @@ -611,15 +671,17 @@ UartSerialBusTerm OptionalResourceType /* 19: ResourceType */ OptionalNameString /* 20: DescriptorName */ OptionalBuffer_Last /* 21: VendorData */ - ')' {$$ = TrLinkChildren ($3,15, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($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;} + | PARSEOP_UART_SERIALBUS + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; UartSerialBusTermV2 - : PARSEOP_UART_SERIALBUS_V2 '(' {$$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS_V2);} + : PARSEOP_UART_SERIALBUS_V2 + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_UART_SERIALBUS_V2);} DWordConstExpr /* 04: ConnectionSpeed */ OptionalBitsPerByte /* 05: BitsPerByte */ OptionalStopBits /* 06: StopBits */ @@ -635,32 +697,38 @@ UartSerialBusTermV2 OptionalNameString /* 20: DescriptorName */ OptionalShareType /* 21: Share */ OptionalBuffer_Last /* 22: VendorData */ - ')' {$$ = TrLinkChildren ($3,15, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,15, $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21,$22);} - | PARSEOP_UART_SERIALBUS_V2 '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_UART_SERIALBUS_V2 + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; VendorLongTerm - : PARSEOP_VENDORLONG '(' {$$ = TrCreateLeafNode (PARSEOP_VENDORLONG);} + : PARSEOP_VENDORLONG + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_VENDORLONG);} OptionalNameString_First - ')' '{' + PARSEOP_CLOSE_PAREN '{' ByteList '}' {$$ = TrLinkChildren ($3,2,$4,$7);} - | PARSEOP_VENDORLONG '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_VENDORLONG + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; VendorShortTerm - : PARSEOP_VENDORSHORT '(' {$$ = TrCreateLeafNode (PARSEOP_VENDORSHORT);} + : PARSEOP_VENDORSHORT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_VENDORSHORT);} OptionalNameString_First - ')' '{' + PARSEOP_CLOSE_PAREN '{' ByteList '}' {$$ = TrLinkChildren ($3,2,$4,$7);} - | PARSEOP_VENDORSHORT '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_VENDORSHORT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; WordBusNumberTerm - : PARSEOP_WORDBUSNUMBER '(' {$$ = TrCreateLeafNode (PARSEOP_WORDBUSNUMBER);} + : PARSEOP_WORDBUSNUMBER + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_WORDBUSNUMBER);} OptionalResourceType_First OptionalMinType OptionalMaxType @@ -673,14 +741,16 @@ WordBusNumberTerm OptionalByteConstExpr OptionalStringData OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,12, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,12, $4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);} - | PARSEOP_WORDBUSNUMBER '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_WORDBUSNUMBER + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; WordIOTerm - : PARSEOP_WORDIO '(' {$$ = TrCreateLeafNode (PARSEOP_WORDIO);} + : PARSEOP_WORDIO + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_WORDIO);} OptionalResourceType_First OptionalMinType OptionalMaxType @@ -696,14 +766,16 @@ WordIOTerm OptionalNameString OptionalType OptionalTranslationType_Last - ')' {$$ = TrLinkChildren ($3,15, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,15, $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);} - | PARSEOP_WORDIO '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_WORDIO + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; WordSpaceTerm - : PARSEOP_WORDSPACE '(' {$$ = TrCreateLeafNode (PARSEOP_WORDSPACE);} + : PARSEOP_WORDSPACE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_WORDSPACE);} ByteConstExpr {UtCheckIntegerRange ($4, 0xC0, 0xFF);} OptionalResourceType OptionalDecodeType @@ -718,8 +790,9 @@ WordSpaceTerm OptionalByteConstExpr OptionalStringData OptionalNameString_Last - ')' {$$ = TrLinkChildren ($3,14, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,14, $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);} - | PARSEOP_WORDSPACE '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_WORDSPACE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; diff --git a/source/compiler/aslrestype2.c b/source/compiler/aslrestype2.c index b75c118..bc130e5 100644 --- a/source/compiler/aslrestype2.c +++ b/source/compiler/aslrestype2.c @@ -127,6 +127,11 @@ RsDoGeneralRegisterDescriptor ( RsCreateByteField (InitializerOp, ACPI_RESTAG_ACCESSSIZE, CurrentByteOffset + ASL_RESDESC_OFFSET (GenericReg.AccessSize)); + if (Descriptor->GenericReg.AddressSpaceId == ACPI_ADR_SPACE_PLATFORM_COMM) + { + break; + } + if (Descriptor->GenericReg.AccessSize > AML_FIELD_ACCESS_QWORD) { AslError (ASL_ERROR, ASL_MSG_INVALID_ACCESS_SIZE, diff --git a/source/compiler/aslrules.y b/source/compiler/aslrules.y index 2cb972f..112f041 100644 --- a/source/compiler/aslrules.y +++ b/source/compiler/aslrules.y @@ -81,14 +81,15 @@ AslCode * The ObjectList term is obsolete and has been removed. */ DefinitionBlockTerm - : PARSEOP_DEFINITION_BLOCK '(' {$$ = TrCreateLeafNode (PARSEOP_DEFINITION_BLOCK);} + : PARSEOP_DEFINITION_BLOCK + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DEFINITION_BLOCK);} String ',' String ',' ByteConst ',' String ',' String ',' DWordConst - ')' {TrSetEndLineNumber ($3);} + PARSEOP_CLOSE_PAREN {TrSetEndLineNumber ($3);} '{' TermList '}' {$$ = TrLinkChildren ($3,7, $4,$6,$8,$10,$12,$14,$18);} ; @@ -99,6 +100,9 @@ DefinitionBlockList DefinitionBlockList {$$ = TrLinkPeerNodes (2, $1,$2);} ; + +/******* Basic ASCII identifiers **************************************************/ + /* Allow IO, DMA, IRQ Resource macro and FOR macro names to also be used as identifiers */ NameString @@ -112,20 +116,31 @@ NameString /* NameSeg : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, (ACPI_NATIVE_INT) - TrNormalizeNameSeg ($1));} + TrNormalizeNameSeg ($1));} ; */ NameSeg : PARSEOP_NAMESEG {$$ = TrCreateValuedLeafNode (PARSEOP_NAMESEG, - (ACPI_NATIVE_INT) AslCompilerlval.s);} + (ACPI_NATIVE_INT) AslCompilerlval.s);} ; +/******* Fundamental argument/statement types ***********************************/ + +Term + : Object {} + | Type1Opcode {} + | Type2Opcode {} + | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);} + | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);} + | Type2BufferOpcode {} + | Type2BufferOrStringOpcode {} + | error {$$ = AslDoError(); yyclearin;} + ; + SuperName - : NameString {} - | ArgTerm {} - | LocalTerm {} + : SimpleName {} | DebugTerm {} | Type6Opcode {} ; @@ -136,14 +151,19 @@ Target | ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);} ; +RequiredTarget + : ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);} + ; + TermArg - : Type2Opcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);} + : SimpleName {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);} + | Type2Opcode {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);} | DataObject {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);} - | NameString {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);} - | ArgTerm {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);} - | LocalTerm {$$ = TrSetNodeFlags ($1, NODE_IS_TERM_ARG);} - - +/* + | PARSEOP_OPEN_PAREN + TermArg + PARSEOP_CLOSE_PAREN {} +*/ ; /* @@ -156,8 +176,10 @@ TermArg */ MethodInvocationTerm - : NameString '(' {TrUpdateNode (PARSEOP_METHODCALL, $1);} - ArgList ')' {$$ = TrLinkChildNode ($1,$4);} + : NameString + PARSEOP_OPEN_PAREN {TrUpdateNode (PARSEOP_METHODCALL, $1);} + ArgList + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildNode ($1,$4);} ; /* OptionalCount must appear before ByteList or an incorrect reduction will result */ @@ -176,23 +198,44 @@ OptionalDataCount /* Legacy ASL */ : {$$ = NULL;} - | '(' TermArg ')' {$$ = $2;} - | '(' ')' {$$ = NULL;} + | PARSEOP_OPEN_PAREN + TermArg + PARSEOP_CLOSE_PAREN {$$ = $2;} + | PARSEOP_OPEN_PAREN + PARSEOP_CLOSE_PAREN {$$ = NULL;} /* C-style (ASL+) -- adds equals term */ | PARSEOP_EXP_EQUALS {$$ = NULL;} - | '(' TermArg ')' + | PARSEOP_OPEN_PAREN + TermArg + PARSEOP_CLOSE_PAREN PARSEOP_EXP_EQUALS {$$ = $2;} - | '(' ')' String + | PARSEOP_OPEN_PAREN + PARSEOP_CLOSE_PAREN + String PARSEOP_EXP_EQUALS {$$ = NULL;} ; /******* List Terms **************************************************/ + /* 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);} + ; + ArgList : {$$ = NULL;} | TermArg @@ -299,38 +342,13 @@ OptionalParameterTypesPackage 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);} - ; - -Term - : Object {} - | Type1Opcode {} - | Type2Opcode {} - | Type2IntegerOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);} - | Type2StringOpcode {$$ = TrSetNodeFlags ($1, NODE_COMPILE_TIME_CONST);} - | Type2BufferOpcode {} - | Type2BufferOrStringOpcode {} - | error {$$ = AslDoError(); yyclearin;} - ; - /* * Case-Default list; allow only one Default term and unlimited Case terms */ CaseDefaultTermList : {$$ = NULL;} - | CaseTerm {} - | DefaultTerm {} + | CaseTerm {} + | DefaultTerm {} | CaseDefaultTermList CaseTerm {$$ = TrLinkPeerNode ($1,$2);} | CaseDefaultTermList @@ -520,32 +538,59 @@ NameSpaceModifier | ScopeTerm {} ; -/* For ObjectType: SuperName except for MethodInvocationTerm */ - -ObjectTypeName +SimpleName : NameString {} - | ArgTerm {} | LocalTerm {} + | ArgTerm {} + ; + +/* For ObjectType(), SuperName except for MethodInvocationTerm */ + +ObjectTypeSource + : SimpleName {} | DebugTerm {} | RefOfTerm {} | DerefOfTerm {} | IndexTerm {} | IndexExpTerm {} -/* | MethodInvocationTerm {} */ /* Caused reduce/reduce with Type6Opcode->MethodInvocationTerm */ ; -RequiredTarget - : ',' SuperName {$$ = TrSetNodeFlags ($2, NODE_IS_TARGET);} +/* For DeRefOf(), SuperName except for DerefOf and Debug */ + +DerefOfSource + : SimpleName {} + | RefOfTerm {} + | DerefOfTerm {} + | IndexTerm {} + | IndexExpTerm {} + | StoreTerm {} + | EqualsTerm {} + | MethodInvocationTerm {} ; -SimpleTarget - : NameString {} - | LocalTerm {} - | ArgTerm {} +/* For RefOf(), SuperName except for RefOf and MethodInvocationTerm */ + +RefOfSource + : SimpleName {} + | DebugTerm {} + | DerefOfTerm {} + | IndexTerm {} + | IndexExpTerm {} ; -/* Opcode types */ +/* For CondRefOf(), SuperName except for RefOf and MethodInvocationTerm */ + +CondRefOfSource + : SimpleName {} + | DebugTerm {} + | DerefOfTerm {} + | IndexTerm {} + | IndexExpTerm {} + ; +/* + * Opcode types, as defined in the ACPI specification + */ Type1Opcode : BreakTerm {} | BreakPointTerm {} diff --git a/source/compiler/aslstubs.c b/source/compiler/aslstubs.c index b88513f..c472e07 100644 --- a/source/compiler/aslstubs.c +++ b/source/compiler/aslstubs.c @@ -188,8 +188,7 @@ AcpiEvReleaseGlobalLock ( ACPI_STATUS AcpiEvInitializeRegion ( - ACPI_OPERAND_OBJECT *RegionObj, - BOOLEAN AcpiNsLocked) + ACPI_OPERAND_OBJECT *RegionObj) { return (AE_OK); } diff --git a/source/compiler/asltokens.y b/source/compiler/asltokens.y index ff1dd42..61213db 100644 --- a/source/compiler/asltokens.y +++ b/source/compiler/asltokens.y @@ -465,6 +465,9 @@ NoEcho(' %left PARSEOP_EXP_INCREMENT PARSEOP_EXP_DECREMENT +%left PARSEOP_OPEN_PAREN + PARSEOP_CLOSE_PAREN + /* Brackets for Index() support */ %left PARSEOP_EXP_INDEX_LEFT diff --git a/source/compiler/asltypes.y b/source/compiler/asltypes.y index 1152a42..d463997 100644 --- a/source/compiler/asltypes.y +++ b/source/compiler/asltypes.y @@ -68,7 +68,7 @@ NoEcho(' %type ParameterTypesPackage %type ParameterTypesPackageList %type RequiredTarget -%type SimpleTarget +%type SimpleName %type StringData %type Target %type Term @@ -252,7 +252,10 @@ NoEcho(' /* Types */ %type SuperName -%type ObjectTypeName +%type ObjectTypeSource +%type DerefOfSource +%type RefOfSource +%type CondRefOfSource %type ArgTerm %type LocalTerm %type DebugTerm diff --git a/source/compiler/aslwalks.c b/source/compiler/aslwalks.c index 357b92d..9fbc582 100644 --- a/source/compiler/aslwalks.c +++ b/source/compiler/aslwalks.c @@ -862,21 +862,10 @@ AnAnalyzeStoreOperator ( case PARSEOP_DEREFOF: case PARSEOP_REFOF: case PARSEOP_INDEX: + case PARSEOP_STORE: return; - case PARSEOP_METHODCALL: - /* - * A target is not allowed to be a method call. - * It is not supported by the ACPICA interpreter, nor is it - * supported by the MS ASL compiler or the MS interpreter. - * Although legal syntax up until ACPI 6.1, support for this - * will be removed for ACPI 6.2 (02/2016) - */ - AslError (ASL_ERROR, ASL_MSG_SYNTAX, - TargetOperandOp, "Illegal method invocation as a target operand"); - return; - default: break; } diff --git a/source/compiler/dttable.c b/source/compiler/dttable.c index c1011f8..7b33e4d 100644 --- a/source/compiler/dttable.c +++ b/source/compiler/dttable.c @@ -129,12 +129,9 @@ DtCompileFadt ( DT_SUBTABLE *ParentTable; DT_FIELD **PFieldList = (DT_FIELD **) List; ACPI_TABLE_HEADER *Table; - UINT8 FadtRevision; - UINT32 i; + UINT8 Revision; - /* Minimum table is the FADT version 1 (ACPI 1.0) */ - Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt1, &Subtable, TRUE); if (ACPI_FAILURE (Status)) @@ -146,41 +143,22 @@ DtCompileFadt ( DtInsertSubtable (ParentTable, Subtable); Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER, ParentTable->Buffer); - FadtRevision = Table->Revision; - - /* Revision 0 and 2 are illegal */ - - if ((FadtRevision == 0) || - (FadtRevision == 2)) - { - DtError (ASL_ERROR, 0, NULL, - "Invalid value for FADT revision"); - - return (AE_BAD_VALUE); - } - - /* Revision out of supported range? */ + Revision = Table->Revision; - if (FadtRevision > ACPI_FADT_MAX_VERSION) + if (Revision == 2) { - DtError (ASL_ERROR, 0, NULL, - "Unknown or unsupported value for FADT revision"); - - return (AE_BAD_VALUE); - } - - /* Compile individual sub-parts of the FADT, per-revision */ - - for (i = 3; i <= ACPI_FADT_MAX_VERSION; i++) - { - if (i > FadtRevision) + Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt2, + &Subtable, TRUE); + if (ACPI_FAILURE (Status)) { - break; + return (Status); } - /* Compile the fields specific to this FADT revision */ - - Status = DtCompileTable (PFieldList, FadtRevisionInfo[i], + DtInsertSubtable (ParentTable, Subtable); + } + else if (Revision >= 2) + { + Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt3, &Subtable, TRUE); if (ACPI_FAILURE (Status)) { @@ -188,6 +166,30 @@ DtCompileFadt ( } DtInsertSubtable (ParentTable, Subtable); + + if (Revision >= 5) + { + Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt5, + &Subtable, TRUE); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + DtInsertSubtable (ParentTable, Subtable); + } + + if (Revision >= 6) + { + Status = DtCompileTable (PFieldList, AcpiDmTableInfoFadt6, + &Subtable, TRUE); + if (ACPI_FAILURE (Status)) + { + return (Status); + } + + DtInsertSubtable (ParentTable, Subtable); + } } return (AE_OK); diff --git a/source/components/disassembler/dmbuffer.c b/source/components/disassembler/dmbuffer.c index 4292050..7e2b6f9 100644 --- a/source/components/disassembler/dmbuffer.c +++ b/source/components/disassembler/dmbuffer.c @@ -439,12 +439,16 @@ AcpiDmIsUnicodeBuffer ( return (FALSE); } - /* For each word, 1st byte must be ascii (1-0x7F), 2nd byte must be zero */ - + /* + * For each word, 1st byte must be printable ascii, and the + * 2nd byte must be zero. This does not allow for escape + * sequences, but it is the most secure way to detect a + * unicode string. + */ for (i = 0; i < (ByteCount - 2); i += 2) { if ((ByteData[i] == 0) || - (ByteData[i] > 0x7F) || + !(isprint (ByteData[i])) || (ByteData[(ACPI_SIZE) i + 1] != 0)) { return (FALSE); @@ -507,12 +511,27 @@ AcpiDmIsStringBuffer ( return (FALSE); } + /* + * Check for a possible standalone resource EndTag, ignore it + * here. However, this sequence is also the string "Y", but + * this seems rare enough to be acceptable. + */ + if ((ByteCount == 2) && (ByteData[0] == 0x79)) + { + return (FALSE); + } + + /* Check all bytes for ASCII */ + for (i = 0; i < (ByteCount - 1); i++) { - /* TBD: allow some escapes (non-ascii chars). + /* + * TBD: allow some escapes (non-ascii chars). * they will be handled in the string output routine */ + /* Not a string if not printable ascii */ + if (!isprint (ByteData[i])) { return (FALSE); diff --git a/source/components/disassembler/dmcstyle.c b/source/components/disassembler/dmcstyle.c index 939168f..f5e9560 100644 --- a/source/components/disassembler/dmcstyle.c +++ b/source/components/disassembler/dmcstyle.c @@ -73,6 +73,11 @@ AcpiDmIsTargetAnOperand ( ACPI_PARSE_OBJECT *Operand, BOOLEAN TopLevel); +static BOOLEAN +AcpiDmIsOptimizationIgnored ( + ACPI_PARSE_OBJECT *StoreOp, + ACPI_PARSE_OBJECT *StoreArgument); + /******************************************************************************* * @@ -95,12 +100,10 @@ AcpiDmCheckForSymbolicOpcode ( ACPI_OP_WALK_INFO *Info) { char *OperatorSymbol = NULL; - ACPI_PARSE_OBJECT *Child1; - ACPI_PARSE_OBJECT *Child2; + ACPI_PARSE_OBJECT *Argument1; + ACPI_PARSE_OBJECT *Argument2; ACPI_PARSE_OBJECT *Target; - ACPI_PARSE_OBJECT *GrandChild1; - ACPI_PARSE_OBJECT *GrandChild2; - ACPI_PARSE_OBJECT *GrandTarget = NULL; + ACPI_PARSE_OBJECT *Target2; /* Exit immediately if ASL+ not enabled */ @@ -110,25 +113,17 @@ AcpiDmCheckForSymbolicOpcode ( return (FALSE); } - /* Check for a non-ASL+ statement, propagate the flag */ - - if (Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_LEGACY_ASL_ONLY) - { - Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; - return (FALSE); - } - /* Get the first operand */ - Child1 = AcpiPsGetArg (Op, 0); - if (!Child1) + Argument1 = AcpiPsGetArg (Op, 0); + if (!Argument1) { return (FALSE); } /* Get the second operand */ - Child2 = Child1->Common.Next; + Argument2 = Argument1->Common.Next; /* Setup the operator string for this opcode */ @@ -202,7 +197,7 @@ AcpiDmCheckForSymbolicOpcode ( * LNotEqual, LLessEqual, and LGreaterEqual. There are * no actual AML opcodes for these operators. */ - switch (Child1->Common.AmlOpcode) + switch (Argument1->Common.AmlOpcode) { case AML_LEQUAL_OP: OperatorSymbol = " != "; @@ -224,19 +219,18 @@ AcpiDmCheckForSymbolicOpcode ( return (TRUE); } - Child1->Common.DisasmOpcode = ACPI_DASM_LNOT_SUFFIX; + Argument1->Common.DisasmOpcode = ACPI_DASM_LNOT_SUFFIX; Op->Common.DisasmOpcode = ACPI_DASM_LNOT_PREFIX; - Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT; /* Save symbol string in the next child (not peer) */ - Child2 = AcpiPsGetArg (Child1, 0); - if (!Child2) + Argument2 = AcpiPsGetArg (Argument1, 0); + if (!Argument2) { return (FALSE); } - Child2->Common.OperatorSymbol = OperatorSymbol; + Argument2->Common.OperatorSymbol = OperatorSymbol; return (TRUE); case AML_INDEX_OP: @@ -246,10 +240,10 @@ AcpiDmCheckForSymbolicOpcode ( * the symbolic operators for Index(). It doesn't make sense to * use Index() with a constant anyway. */ - if ((Child1->Common.AmlOpcode == AML_STRING_OP) || - (Child1->Common.AmlOpcode == AML_BUFFER_OP) || - (Child1->Common.AmlOpcode == AML_PACKAGE_OP) || - (Child1->Common.AmlOpcode == AML_VAR_PACKAGE_OP)) + if ((Argument1->Common.AmlOpcode == AML_STRING_OP) || + (Argument1->Common.AmlOpcode == AML_BUFFER_OP) || + (Argument1->Common.AmlOpcode == AML_PACKAGE_OP) || + (Argument1->Common.AmlOpcode == AML_VAR_PACKAGE_OP)) { Op->Common.DisasmFlags |= ACPI_PARSEOP_CLOSING_PAREN; return (FALSE); @@ -257,8 +251,8 @@ AcpiDmCheckForSymbolicOpcode ( /* Index operator is [] */ - Child1->Common.OperatorSymbol = " ["; - Child2->Common.OperatorSymbol = "]"; + Argument1->Common.OperatorSymbol = " ["; + Argument2->Common.OperatorSymbol = "]"; break; /* Unary operators */ @@ -280,7 +274,7 @@ AcpiDmCheckForSymbolicOpcode ( return (FALSE); } - if (Child1->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX) + if (Argument1->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX) { return (TRUE); } @@ -291,9 +285,9 @@ AcpiDmCheckForSymbolicOpcode ( * deferring symbol output until after the first operand has been * emitted. */ - if (!Child1->Common.OperatorSymbol) + if (!Argument1->Common.OperatorSymbol) { - Child1->Common.OperatorSymbol = OperatorSymbol; + Argument1->Common.OperatorSymbol = OperatorSymbol; } /* @@ -323,23 +317,58 @@ AcpiDmCheckForSymbolicOpcode ( /* Target is 3rd operand */ - Target = Child2->Common.Next; + Target = Argument2->Common.Next; if (Op->Common.AmlOpcode == AML_DIVIDE_OP) { + Target2 = Target->Common.Next; + /* * Divide has an extra target operand (Remainder). - * If this extra target is specified, it cannot be converted - * to a C-style operator + * Default behavior is to simply ignore ASL+ conversion + * if the remainder target (modulo) is specified. */ - if (AcpiDmIsValidTarget (Target)) + if (!AcpiGbl_DoDisassemblerOptimizations) { - Child1->Common.OperatorSymbol = NULL; - Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; - return (FALSE); + if (AcpiDmIsValidTarget (Target)) + { + Argument1->Common.OperatorSymbol = NULL; + Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; + return (FALSE); + } + + Target->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; + Target = Target2; } + else + { + /* + * Divide has an extra target operand (Remainder). + * If both targets are specified, it cannot be converted + * to a C-style operator. + */ + if (AcpiDmIsValidTarget (Target) && + AcpiDmIsValidTarget (Target2)) + { + Argument1->Common.OperatorSymbol = NULL; + Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; + return (FALSE); + } + + if (AcpiDmIsValidTarget (Target)) /* Only first Target is valid (remainder) */ + { + /* Convert the Divide to Modulo */ + + Op->Common.AmlOpcode = AML_MOD_OP; - Target->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; - Target = Target->Common.Next; + Argument1->Common.OperatorSymbol = " % "; + Target2->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; + } + else /* Only second Target (quotient) is valid */ + { + Target->Common.DisasmFlags |= ACPI_PARSEOP_IGNORE; + Target = Target2; + } + } } /* Parser should ensure there is at least a placeholder target */ @@ -351,13 +380,6 @@ AcpiDmCheckForSymbolicOpcode ( if (!AcpiDmIsValidTarget (Target)) { - if (Op->Common.Parent->Common.AmlOpcode == AML_STORE_OP) - { - Op->Common.DisasmFlags = 0; - Child1->Common.OperatorSymbol = NULL; - return (FALSE); - } - /* Not a valid target (placeholder only, from parser) */ break; } @@ -390,8 +412,8 @@ AcpiDmCheckForSymbolicOpcode ( * Add (B, A, A) --> A += B * Add (B, C, A) --> A = (B + C) */ - if ((AcpiDmIsTargetAnOperand (Target, Child1, TRUE)) || - (AcpiDmIsTargetAnOperand (Target, Child2, TRUE))) + if ((AcpiDmIsTargetAnOperand (Target, Argument1, TRUE)) || + (AcpiDmIsTargetAnOperand (Target, Argument2, TRUE))) { Target->Common.OperatorSymbol = AcpiDmGetCompoundSymbol (Op->Common.AmlOpcode); @@ -399,7 +421,7 @@ AcpiDmCheckForSymbolicOpcode ( /* Convert operator to compound assignment */ Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT; - Child1->Common.OperatorSymbol = NULL; + Argument1->Common.OperatorSymbol = NULL; return (TRUE); } break; @@ -419,7 +441,7 @@ AcpiDmCheckForSymbolicOpcode ( * Subtract (A, B, A) --> A -= B * Subtract (B, A, A) --> A = (B - A) */ - if ((AcpiDmIsTargetAnOperand (Target, Child1, TRUE))) + if ((AcpiDmIsTargetAnOperand (Target, Argument1, TRUE))) { Target->Common.OperatorSymbol = AcpiDmGetCompoundSymbol (Op->Common.AmlOpcode); @@ -427,7 +449,7 @@ AcpiDmCheckForSymbolicOpcode ( /* Convert operator to compound assignment */ Op->Common.DisasmFlags |= ACPI_PARSEOP_COMPOUND_ASSIGNMENT; - Child1->Common.OperatorSymbol = NULL; + Argument1->Common.OperatorSymbol = NULL; return (TRUE); } break; @@ -481,7 +503,7 @@ AcpiDmCheckForSymbolicOpcode ( /* Target is optional, 3rd operand */ - Target = Child2->Common.Next; + Target = Argument2->Common.Next; if (AcpiDmIsValidTarget (Target)) { AcpiDmPromoteTarget (Op, Target); @@ -495,75 +517,23 @@ AcpiDmCheckForSymbolicOpcode ( case AML_STORE_OP: /* - * Target is the 2nd operand. - * We know the target is valid, it is not optional. + * For Store, the Target is the 2nd operand. We know the target + * is valid, because it is not optional. * - * The following block implements "Ignore conversion if a store - * is followed by a math/bit operator that has no target". Used - * only for the ASL test suite. + * Ignore any optimizations/folding if flag is set. + * Used for iASL/disassembler test suite only. */ - if (!AcpiGbl_DoDisassemblerOptimizations) + if (AcpiDmIsOptimizationIgnored (Op, Argument1)) { - switch (Child1->Common.AmlOpcode) - { - /* This operator has two operands and two targets */ - - case AML_DIVIDE_OP: - - GrandChild1 = Child1->Common.Value.Arg; - GrandChild2 = GrandChild1->Common.Next; - GrandTarget = GrandChild2->Common.Next; - - if (GrandTarget && !AcpiDmIsValidTarget (GrandTarget)) - { - Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; - return (FALSE); - } - GrandTarget = GrandTarget->Common.Next; - break; - - case AML_ADD_OP: - case AML_SUBTRACT_OP: - case AML_MULTIPLY_OP: - case AML_MOD_OP: - case AML_SHIFT_LEFT_OP: - case AML_SHIFT_RIGHT_OP: - case AML_BIT_AND_OP: - case AML_BIT_OR_OP: - case AML_BIT_XOR_OP: - case AML_INDEX_OP: - - /* These operators have two operands and a target */ - - GrandChild1 = Child1->Common.Value.Arg; - GrandChild2 = GrandChild1->Common.Next; - GrandTarget = GrandChild2->Common.Next; - break; - - case AML_BIT_NOT_OP: - - /* This operator has one operand and a target */ - - GrandChild1 = Child1->Common.Value.Arg; - GrandTarget = GrandChild1->Common.Next; - break; - - default: - break; - } - - if (GrandTarget && !AcpiDmIsValidTarget (GrandTarget)) - { - Op->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; - return (FALSE); - } + return (FALSE); } /* + * Perform conversion. * In the parse tree, simply swap the target with the * source so that the target is processed first. */ - Target = Child1->Common.Next; + Target = Argument1->Common.Next; if (!Target) { return (FALSE); @@ -580,7 +550,7 @@ AcpiDmCheckForSymbolicOpcode ( /* Target is optional, 2nd operand */ - Target = Child1->Common.Next; + Target = Argument1->Common.Next; if (!Target) { return (FALSE); @@ -605,23 +575,129 @@ AcpiDmCheckForSymbolicOpcode ( break; } + /* All other operators, emit an open paren */ + + AcpiOsPrintf ("("); + return (TRUE); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmIsOptimizationIgnored + * + * PARAMETERS: StoreOp - Store operator parse object + * StoreArgument - Target associate with the Op + * + * RETURN: TRUE if this Store operator should not be converted/removed. + * + * DESCRIPTION: The following function implements "Do not optimize if a + * store is immediately followed by a math/bit operator that + * has no target". + * + * Function is ignored if DoDisassemblerOptimizations is TRUE. + * This is the default, ignore this function. + * + * Disables these types of optimizations, and simply emits + * legacy ASL code: + * Store (Add (INT1, 4), INT2) --> Add (INT1, 4, INT2) + * --> INT2 = INT1 + 4 + * + * Store (Not (INT1), INT2) --> Not (INT1, INT2) + * --> INT2 = ~INT1 + * + * Used only for the ASL test suite. For the test suite, we + * don't want to perform some optimizations to ensure binary + * compatibility with the generation of the legacy ASL->AML. + * In other words, for all test modules we want exactly: + * (ASL+ -> AML) == (ASL- -> AML) + * + ******************************************************************************/ + +static BOOLEAN +AcpiDmIsOptimizationIgnored ( + ACPI_PARSE_OBJECT *StoreOp, + ACPI_PARSE_OBJECT *StoreArgument) +{ + ACPI_PARSE_OBJECT *Argument1; + ACPI_PARSE_OBJECT *Argument2; + ACPI_PARSE_OBJECT *Target; + + + /* No optimizations/folding for the typical case */ + + if (AcpiGbl_DoDisassemblerOptimizations) + { + return (FALSE); + } + /* - * Nodes marked with ACPI_PARSEOP_PARAMLIST don't need a parens - * output here. We also need to check the parent to see if this op - * is part of a compound test (!=, >=, <=). + * Only a small subset of ASL/AML operators can be optimized. + * Can only optimize/fold if there is no target (or targets) + * specified for the operator. And of course, the operator + * is surrrounded by a Store() operator. */ - if ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) || - ((Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) && - (Op->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX))) + switch (StoreArgument->Common.AmlOpcode) { - /* Do Nothing. Paren already generated */ - return (TRUE); - } + case AML_ADD_OP: + case AML_SUBTRACT_OP: + case AML_MULTIPLY_OP: + case AML_MOD_OP: + case AML_SHIFT_LEFT_OP: + case AML_SHIFT_RIGHT_OP: + case AML_BIT_AND_OP: + case AML_BIT_OR_OP: + case AML_BIT_XOR_OP: + case AML_INDEX_OP: - /* All other operators, emit an open paren */ + /* These operators have two arguments and one target */ - AcpiOsPrintf ("("); - return (TRUE); + Argument1 = StoreArgument->Common.Value.Arg; + Argument2 = Argument1->Common.Next; + Target = Argument2->Common.Next; + + if (!AcpiDmIsValidTarget (Target)) + { + StoreOp->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; + return (TRUE); + } + break; + + case AML_DIVIDE_OP: + + /* This operator has two arguments and two targets */ + + Argument1 = StoreArgument->Common.Value.Arg; + Argument2 = Argument1->Common.Next; + Target = Argument2->Common.Next; + + if (!AcpiDmIsValidTarget (Target) || + !AcpiDmIsValidTarget (Target->Common.Next)) + { + StoreOp->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; + return (TRUE); + } + break; + + case AML_BIT_NOT_OP: + + /* This operator has one operand and one target */ + + Argument1 = StoreArgument->Common.Value.Arg; + Target = Argument1->Common.Next; + + if (!AcpiDmIsValidTarget (Target)) + { + StoreOp->Common.DisasmFlags |= ACPI_PARSEOP_LEGACY_ASL_ONLY; + return (TRUE); + } + break; + + default: + break; + } + + return (FALSE); } @@ -643,8 +719,6 @@ void AcpiDmCloseOperator ( ACPI_PARSE_OBJECT *Op) { - BOOLEAN IsCStyleOp = FALSE; - /* Always emit paren if ASL+ disassembly disabled */ @@ -654,8 +728,6 @@ AcpiDmCloseOperator ( return; } - /* Check for a non-ASL+ statement */ - if (Op->Common.DisasmFlags & ACPI_PARSEOP_LEGACY_ASL_ONLY) { AcpiOsPrintf (")"); @@ -695,8 +767,6 @@ AcpiDmCloseOperator ( { AcpiOsPrintf (")"); } - - IsCStyleOp = TRUE; break; case AML_INDEX_OP: @@ -724,21 +794,7 @@ AcpiDmCloseOperator ( break; } - /* - * Nodes marked with ACPI_PARSEOP_PARAMLIST don't need a parens - * output here. We also need to check the parent to see if this op - * is part of a compound test (!=, >=, <=). - */ - if (IsCStyleOp && - ((Op->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) || - ((Op->Common.Parent->Common.DisasmFlags & ACPI_PARSEOP_PARAMETER_LIST) && - (Op->Common.DisasmOpcode == ACPI_DASM_LNOT_SUFFIX)))) - { - return; - } - AcpiOsPrintf (")"); - return; } diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c index a486f1d..ee4a55f 100644 --- a/source/components/disassembler/dmresrc.c +++ b/source/components/disassembler/dmresrc.c @@ -392,7 +392,8 @@ AcpiDmIsResourceTemplate ( ACPI_PARSE_OBJECT *NextOp; UINT8 *Aml; UINT8 *EndAml; - ACPI_SIZE Length; + UINT32 BufferLength; + UINT32 DeclaredBufferLength; /* This op must be a buffer */ @@ -402,8 +403,10 @@ AcpiDmIsResourceTemplate ( return (AE_TYPE); } - /* Get the ByteData list and length */ - + /* + * Get the declared length of the buffer. + * This is the nn in "Buffer (nn)" + */ NextOp = Op->Common.Value.Arg; if (!NextOp) { @@ -411,6 +414,10 @@ AcpiDmIsResourceTemplate ( return (AE_TYPE); } + DeclaredBufferLength = NextOp->Common.Value.Size; + + /* Get the length of the raw initialization byte list */ + NextOp = NextOp->Common.Next; if (!NextOp) { @@ -418,11 +425,22 @@ AcpiDmIsResourceTemplate ( } Aml = NextOp->Named.Data; - Length = (ACPI_SIZE) NextOp->Common.Value.Integer; + BufferLength = NextOp->Common.Value.Size; + + /* + * Not a template if declared buffer length != actual length of the + * intialization byte list. Because the resource macros will create + * a buffer of the exact required length (buffer length will be equal + * to the actual length). + */ + if (DeclaredBufferLength != BufferLength) + { + return (AE_TYPE); + } /* Walk the byte list, abort on any invalid descriptor type or length */ - Status = AcpiUtWalkAmlResources (WalkState, Aml, Length, + Status = AcpiUtWalkAmlResources (WalkState, Aml, BufferLength, NULL, ACPI_CAST_INDIRECT_PTR (void, &EndAml)); if (ACPI_FAILURE (Status)) { @@ -435,7 +453,7 @@ AcpiDmIsResourceTemplate ( * of a ResourceTemplate, the buffer must not have any extra data after * the EndTag.) */ - if ((Aml + Length - sizeof (AML_RESOURCE_END_TAG)) != EndAml) + if ((Aml + BufferLength - sizeof (AML_RESOURCE_END_TAG)) != EndAml) { return (AE_AML_NO_RESOURCE_END_TAG); } diff --git a/source/components/dispatcher/dsinit.c b/source/components/dispatcher/dsinit.c index 74e974d..67c8d61 100644 --- a/source/components/dispatcher/dsinit.c +++ b/source/components/dispatcher/dsinit.c @@ -46,6 +46,7 @@ #include "acdispat.h" #include "acnamesp.h" #include "actables.h" +#include "acinterp.h" #define _COMPONENT ACPI_DISPATCHER ACPI_MODULE_NAME ("dsinit") @@ -231,23 +232,16 @@ AcpiDsInitializeObjects ( /* Walk entire namespace from the supplied root */ - Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - /* * We don't use AcpiWalkNamespace since we do not want to acquire * the namespace reader lock. */ Status = AcpiNsWalkNamespace (ACPI_TYPE_ANY, StartNode, ACPI_UINT32_MAX, - ACPI_NS_WALK_UNLOCK, AcpiDsInitOneObject, NULL, &Info, NULL); + ACPI_NS_WALK_NO_UNLOCK, AcpiDsInitOneObject, NULL, &Info, NULL); if (ACPI_FAILURE (Status)) { ACPI_EXCEPTION ((AE_INFO, Status, "During WalkNamespace")); } - (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); Status = AcpiGetTableByIndex (TableIndex, &Table); if (ACPI_FAILURE (Status)) diff --git a/source/components/dispatcher/dsmethod.c b/source/components/dispatcher/dsmethod.c index 4c4ff22..92bdb2f 100644 --- a/source/components/dispatcher/dsmethod.c +++ b/source/components/dispatcher/dsmethod.c @@ -107,15 +107,12 @@ AcpiDsAutoSerializeMethod ( "Method auto-serialization parse [%4.4s] %p\n", AcpiUtGetNodeName (Node), Node)); - AcpiExEnterInterpreter (); - /* Create/Init a root op for the method parse tree */ Op = AcpiPsAllocOp (AML_METHOD_OP, ObjDesc->Method.AmlStart); if (!Op) { - Status = AE_NO_MEMORY; - goto Unlock; + return_ACPI_STATUS (AE_NO_MEMORY); } AcpiPsSetName (Op, Node->Name.Integer); @@ -127,8 +124,7 @@ AcpiDsAutoSerializeMethod ( if (!WalkState) { AcpiPsFreeOp (Op); - Status = AE_NO_MEMORY; - goto Unlock; + return_ACPI_STATUS (AE_NO_MEMORY); } Status = AcpiDsInitAmlWalk (WalkState, Op, Node, @@ -147,8 +143,6 @@ AcpiDsAutoSerializeMethod ( Status = AcpiPsParseAml (WalkState); AcpiPsDeleteParseTree (Op); -Unlock: - AcpiExExitInterpreter (); return_ACPI_STATUS (Status); } @@ -784,26 +778,6 @@ AcpiDsTerminateControlMethod ( AcpiDsMethodDataDeleteAll (WalkState); /* - * If method is serialized, release the mutex and restore the - * current sync level for this thread - */ - if (MethodDesc->Method.Mutex) - { - /* Acquisition Depth handles recursive calls */ - - MethodDesc->Method.Mutex->Mutex.AcquisitionDepth--; - if (!MethodDesc->Method.Mutex->Mutex.AcquisitionDepth) - { - WalkState->Thread->CurrentSyncLevel = - MethodDesc->Method.Mutex->Mutex.OriginalSyncLevel; - - AcpiOsReleaseMutex ( - MethodDesc->Method.Mutex->Mutex.OsMutex); - MethodDesc->Method.Mutex->Mutex.ThreadId = 0; - } - } - - /* * Delete any namespace objects created anywhere within the * namespace by the execution of this method. Unless: * 1) This method is a module-level executable code method, in which @@ -836,6 +810,26 @@ AcpiDsTerminateControlMethod ( ~ACPI_METHOD_MODIFIED_NAMESPACE; } } + + /* + * If method is serialized, release the mutex and restore the + * current sync level for this thread + */ + if (MethodDesc->Method.Mutex) + { + /* Acquisition Depth handles recursive calls */ + + MethodDesc->Method.Mutex->Mutex.AcquisitionDepth--; + if (!MethodDesc->Method.Mutex->Mutex.AcquisitionDepth) + { + WalkState->Thread->CurrentSyncLevel = + MethodDesc->Method.Mutex->Mutex.OriginalSyncLevel; + + AcpiOsReleaseMutex ( + MethodDesc->Method.Mutex->Mutex.OsMutex); + MethodDesc->Method.Mutex->Mutex.ThreadId = 0; + } + } } /* Decrement the thread count on the method */ diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c index 1c6b342..5cd9107 100644 --- a/source/components/dispatcher/dsopcode.c +++ b/source/components/dispatcher/dsopcode.c @@ -90,7 +90,7 @@ AcpiDsInitializeRegion ( /* Namespace is NOT locked */ - Status = AcpiEvInitializeRegion (ObjDesc, FALSE); + Status = AcpiEvInitializeRegion (ObjDesc); return (Status); } diff --git a/source/components/dispatcher/dswload2.c b/source/components/dispatcher/dswload2.c index ae076e2..c0e4ad4 100644 --- a/source/components/dispatcher/dswload2.c +++ b/source/components/dispatcher/dswload2.c @@ -626,23 +626,8 @@ AcpiDsLoad2EndOp ( } } - AcpiExExitInterpreter (); Status = AcpiEvInitializeRegion ( - AcpiNsGetAttachedObject (Node), FALSE); - AcpiExEnterInterpreter (); - - if (ACPI_FAILURE (Status)) - { - /* - * If AE_NOT_EXIST is returned, it is not fatal - * because many regions get created before a handler - * is installed for said region. - */ - if (AE_NOT_EXIST == Status) - { - Status = AE_OK; - } - } + AcpiNsGetAttachedObject (Node)); break; case AML_NAME_OP: diff --git a/source/components/events/evrgnini.c b/source/components/events/evrgnini.c index 51e3ce9..171602a 100644 --- a/source/components/events/evrgnini.c +++ b/source/components/events/evrgnini.c @@ -45,6 +45,7 @@ #include "accommon.h" #include "acevents.h" #include "acnamesp.h" +#include "acinterp.h" #define _COMPONENT ACPI_EVENTS ACPI_MODULE_NAME ("evrgnini") @@ -537,7 +538,6 @@ AcpiEvDefaultRegionSetup ( * FUNCTION: AcpiEvInitializeRegion * * PARAMETERS: RegionObj - Region we are initializing - * AcpiNsLocked - Is namespace locked? * * RETURN: Status * @@ -555,21 +555,33 @@ AcpiEvDefaultRegionSetup ( * MUTEX: Interpreter should be unlocked, because we may run the _REG * method for this region. * + * NOTE: Possible incompliance: + * There is a behavior conflict in automatic _REG execution: + * 1. When the interpreter is evaluating a method, we can only + * automatically run _REG for the following case: + * Method(_REG, 2) {} + * OperationRegion (OPR1, 0x80, 0x1000010, 0x4) + * 2. When the interpreter is loading a table, we can also + * automatically run _REG for the following case: + * OperationRegion (OPR1, 0x80, 0x1000010, 0x4) + * Method(_REG, 2) {} + * Though this may not be compliant to the de-facto standard, the + * logic is kept in order not to trigger regressions. And keeping + * this logic should be taken care by the caller of this function. + * ******************************************************************************/ ACPI_STATUS AcpiEvInitializeRegion ( - ACPI_OPERAND_OBJECT *RegionObj, - BOOLEAN AcpiNsLocked) + ACPI_OPERAND_OBJECT *RegionObj) { ACPI_OPERAND_OBJECT *HandlerObj; ACPI_OPERAND_OBJECT *ObjDesc; ACPI_ADR_SPACE_TYPE SpaceId; ACPI_NAMESPACE_NODE *Node; - ACPI_STATUS Status; - ACPI_FUNCTION_TRACE_U32 (EvInitializeRegion, AcpiNsLocked); + ACPI_FUNCTION_TRACE (EvInitializeRegion); if (!RegionObj) @@ -641,33 +653,15 @@ AcpiEvInitializeRegion ( "Found handler %p for region %p in obj %p\n", HandlerObj, RegionObj, ObjDesc)); - Status = AcpiEvAttachRegion (HandlerObj, RegionObj, - AcpiNsLocked); + (void) AcpiEvAttachRegion (HandlerObj, RegionObj, FALSE); /* * Tell all users that this region is usable by * running the _REG method */ - if (AcpiNsLocked) - { - Status = AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - } - - Status = AcpiEvExecuteRegMethod (RegionObj, ACPI_REG_CONNECT); - - if (AcpiNsLocked) - { - Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE); - if (ACPI_FAILURE (Status)) - { - return_ACPI_STATUS (Status); - } - } - + AcpiExExitInterpreter (); + (void) AcpiEvExecuteRegMethod (RegionObj, ACPI_REG_CONNECT); + AcpiExEnterInterpreter (); return_ACPI_STATUS (AE_OK); } } @@ -677,11 +671,14 @@ AcpiEvInitializeRegion ( Node = Node->Parent; } - /* If we get here, there is no handler for this region */ - + /* + * If we get here, there is no handler for this region. This is not + * fatal because many regions get created before a handler is installed + * for said region. + */ ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION, "No handler for RegionType %s(%X) (RegionObj %p)\n", AcpiUtGetRegionName (SpaceId), SpaceId, RegionObj)); - return_ACPI_STATUS (AE_NOT_EXIST); + return_ACPI_STATUS (AE_OK); } diff --git a/source/components/executer/exconfig.c b/source/components/executer/exconfig.c index c17beab..f49b0a9 100644 --- a/source/components/executer/exconfig.c +++ b/source/components/executer/exconfig.c @@ -480,7 +480,7 @@ AcpiExLoadOp ( ACPI_INFO (("Dynamic OEM Table Load:")); AcpiExExitInterpreter (); - Status = AcpiTbInstallAndLoadTable (Table, ACPI_PTR_TO_PHYSADDR (Table), + Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table), ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, TRUE, &TableIndex); AcpiExEnterInterpreter (); if (ACPI_FAILURE (Status)) @@ -545,7 +545,6 @@ AcpiExUnloadTable ( ACPI_STATUS Status = AE_OK; ACPI_OPERAND_OBJECT *TableDesc = DdbHandle; UINT32 TableIndex; - ACPI_TABLE_HEADER *Table; ACPI_FUNCTION_TRACE (ExUnloadTable); @@ -586,42 +585,7 @@ AcpiExUnloadTable ( * strict order requirement against it. */ AcpiExExitInterpreter (); - - /* Ensure the table is still loaded */ - - if (!AcpiTbIsTableLoaded (TableIndex)) - { - Status = AE_NOT_EXIST; - goto LockAndExit; - } - - /* Invoke table handler if present */ - - if (AcpiGbl_TableHandler) - { - Status = AcpiGetTableByIndex (TableIndex, &Table); - if (ACPI_SUCCESS (Status)) - { - (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_UNLOAD, Table, - AcpiGbl_TableHandlerContext); - } - } - - /* Delete the portion of the namespace owned by this table */ - - Status = AcpiTbDeleteNamespaceByOwner (TableIndex); - if (ACPI_FAILURE (Status)) - { - goto LockAndExit; - } - - (void) AcpiTbReleaseOwnerId (TableIndex); - AcpiTbSetTableLoadedFlag (TableIndex, FALSE); - -LockAndExit: - - /* Re-acquire the interpreter lock */ - + Status = AcpiTbUnloadTable (TableIndex); AcpiExEnterInterpreter (); /* diff --git a/source/components/executer/exconvrt.c b/source/components/executer/exconvrt.c index 5e0f549..ddbcc46 100644 --- a/source/components/executer/exconvrt.c +++ b/source/components/executer/exconvrt.c @@ -645,7 +645,6 @@ AcpiExConvertToTargetType ( switch (GET_CURRENT_ARG_TYPE (WalkState->OpInfo->RuntimeArgs)) { case ARGI_SIMPLE_TARGET: - case ARGI_FIXED_TARGET: case ARGI_INTEGER_REF: /* Handles Increment, Decrement cases */ switch (DestinationType) diff --git a/source/components/executer/exresop.c b/source/components/executer/exresop.c index d4352e2..bf1edd4 100644 --- a/source/components/executer/exresop.c +++ b/source/components/executer/exresop.c @@ -321,7 +321,6 @@ AcpiExResolveOperands ( case ARGI_OBJECT_REF: case ARGI_DEVICE_REF: case ARGI_TARGETREF: /* Allows implicit conversion rules before store */ - case ARGI_FIXED_TARGET: /* No implicit conversion before store to target */ case ARGI_SIMPLE_TARGET: /* Name, Local, or Arg - no implicit conversion */ case ARGI_STORE_TARGET: diff --git a/source/components/namespace/nsload.c b/source/components/namespace/nsload.c index 6e11d6b..d7dbf89 100644 --- a/source/components/namespace/nsload.c +++ b/source/components/namespace/nsload.c @@ -154,7 +154,9 @@ Unlock: ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Begin Table Object Initialization\n")); + AcpiExEnterInterpreter (); Status = AcpiDsInitializeObjects (TableIndex, Node); + AcpiExExitInterpreter (); ACPI_DEBUG_PRINT ((ACPI_DB_INFO, "**** Completed Table Object Initialization\n")); diff --git a/source/components/namespace/nsnames.c b/source/components/namespace/nsnames.c index 95f8c8d..8af12f1 100644 --- a/source/components/namespace/nsnames.c +++ b/source/components/namespace/nsnames.c @@ -110,6 +110,58 @@ AcpiNsGetPathnameLength ( /******************************************************************************* * + * FUNCTION: AcpiNsHandleToName + * + * PARAMETERS: TargetHandle - Handle of named object whose name is + * to be found + * Buffer - Where the name is returned + * + * RETURN: Status, Buffer is filled with name if status is AE_OK + * + * DESCRIPTION: Build and return a full namespace name + * + ******************************************************************************/ + +ACPI_STATUS +AcpiNsHandleToName ( + ACPI_HANDLE TargetHandle, + ACPI_BUFFER *Buffer) +{ + ACPI_STATUS Status; + ACPI_NAMESPACE_NODE *Node; + const char *NodeName; + + + ACPI_FUNCTION_TRACE_PTR (NsHandleToName, TargetHandle); + + + Node = AcpiNsValidateHandle (TargetHandle); + if (!Node) + { + return_ACPI_STATUS (AE_BAD_PARAMETER); + } + + /* Validate/Allocate/Clear caller buffer */ + + Status = AcpiUtInitializeBuffer (Buffer, ACPI_PATH_SEGMENT_LENGTH); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + + /* Just copy the ACPI name from the Node and zero terminate it */ + + NodeName = AcpiUtGetNodeName (Node); + ACPI_MOVE_NAME (Buffer->Pointer, NodeName); + ((char *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0; + + ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%4.4s\n", (char *) Buffer->Pointer)); + return_ACPI_STATUS (AE_OK); +} + + +/******************************************************************************* + * * FUNCTION: AcpiNsHandleToPathname * * PARAMETERS: TargetHandle - Handle of named object whose name is diff --git a/source/components/namespace/nsxfname.c b/source/components/namespace/nsxfname.c index cfd6937..1621ba9 100644 --- a/source/components/namespace/nsxfname.c +++ b/source/components/namespace/nsxfname.c @@ -176,8 +176,6 @@ AcpiGetName ( ACPI_BUFFER *Buffer) { ACPI_STATUS Status; - ACPI_NAMESPACE_NODE *Node; - const char *NodeName; /* Parameter validation */ @@ -193,16 +191,6 @@ AcpiGetName ( return (Status); } - if (NameType == ACPI_FULL_PATHNAME || - NameType == ACPI_FULL_PATHNAME_NO_TRAILING) - { - /* Get the full pathname (From the namespace root) */ - - Status = AcpiNsHandleToPathname (Handle, Buffer, - NameType == ACPI_FULL_PATHNAME ? FALSE : TRUE); - return (Status); - } - /* * Wants the single segment ACPI name. * Validate handle and convert to a namespace Node @@ -213,30 +201,20 @@ AcpiGetName ( return (Status); } - Node = AcpiNsValidateHandle (Handle); - if (!Node) + if (NameType == ACPI_FULL_PATHNAME || + NameType == ACPI_FULL_PATHNAME_NO_TRAILING) { - Status = AE_BAD_PARAMETER; - goto UnlockAndExit; - } - - /* Validate/Allocate/Clear caller buffer */ + /* Get the full pathname (From the namespace root) */ - Status = AcpiUtInitializeBuffer (Buffer, ACPI_PATH_SEGMENT_LENGTH); - if (ACPI_FAILURE (Status)) - { - goto UnlockAndExit; + Status = AcpiNsHandleToPathname (Handle, Buffer, + NameType == ACPI_FULL_PATHNAME ? FALSE : TRUE); } + else + { + /* Get the single name */ - /* Just copy the ACPI name from the Node and zero terminate it */ - - NodeName = AcpiUtGetNodeName (Node); - ACPI_MOVE_NAME (Buffer->Pointer, NodeName); - ((char *) Buffer->Pointer) [ACPI_NAME_SIZE] = 0; - Status = AE_OK; - - -UnlockAndExit: + Status = AcpiNsHandleToName (Handle, Buffer); + } (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); return (Status); diff --git a/source/components/parser/psargs.c b/source/components/parser/psargs.c index a4745c3..5cc3286 100644 --- a/source/components/parser/psargs.c +++ b/source/components/parser/psargs.c @@ -298,23 +298,12 @@ AcpiPsGetNextNamepath ( PossibleMethodCall && (Node->Type == ACPI_TYPE_METHOD)) { - if (WalkState->Opcode == AML_UNLOAD_OP) - { - /* - * AcpiPsGetNextNamestring has increased the AML pointer, - * so we need to restore the saved AML pointer for method call. - */ - WalkState->ParserState.Aml = Start; - WalkState->ArgCount = 1; - AcpiPsInitOp (Arg, AML_INT_METHODCALL_OP); - return_ACPI_STATUS (AE_OK); - } - /* This name is actually a control method invocation */ MethodDesc = AcpiNsGetAttachedObject (Node); ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, - "Control Method - %p Desc %p Path=%p\n", Node, MethodDesc, Path)); + "Control Method invocation %4.4s - %p Desc %p Path=%p\n", + Node->Name.Ascii, Node, MethodDesc, Path)); NameOp = AcpiPsAllocOp (AML_INT_NAMEPATH_OP, Start); if (!NameOp) @@ -771,6 +760,10 @@ AcpiPsGetNextArg ( ACPI_FUNCTION_TRACE_PTR (PsGetNextArg, ParserState); + ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, + "Expected argument type ARGP: %s (%2.2X)\n", + AcpiUtGetArgumentTypeName (ArgType), ArgType)); + switch (ArgType) { case ARGP_BYTEDATA: @@ -854,11 +847,13 @@ AcpiPsGetNextArg ( } break; - case ARGP_TARGET: - case ARGP_SUPERNAME: case ARGP_SIMPLENAME: case ARGP_NAME_OR_REF: + ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, + "**** SimpleName/NameOrRef: %s (%2.2X)\n", + AcpiUtGetArgumentTypeName (ArgType), ArgType)); + Subop = AcpiPsPeekOpcode (ParserState); if (Subop == 0 || AcpiPsIsLeadingChar (Subop) || @@ -873,28 +868,37 @@ AcpiPsGetNextArg ( return_ACPI_STATUS (AE_NO_MEMORY); } - /* To support SuperName arg of Unload */ + Status = AcpiPsGetNextNamepath (WalkState, ParserState, + Arg, ACPI_NOT_METHOD_CALL); + } + else + { + /* Single complex argument, nothing returned */ - if (WalkState->Opcode == AML_UNLOAD_OP) - { - Status = AcpiPsGetNextNamepath (WalkState, ParserState, - Arg, ACPI_POSSIBLE_METHOD_CALL); - - /* - * If the SuperName argument is a method call, we have - * already restored the AML pointer, just free this Arg - */ - if (Arg->Common.AmlOpcode == AML_INT_METHODCALL_OP) - { - AcpiPsFreeOp (Arg); - Arg = NULL; - } - } - else + WalkState->ArgCount = 1; + } + break; + + case ARGP_TARGET: + case ARGP_SUPERNAME: + + ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, + "**** Target/Supername: %s (%2.2X)\n", + AcpiUtGetArgumentTypeName (ArgType), ArgType)); + + Subop = AcpiPsPeekOpcode (ParserState); + if (Subop == 0) + { + /* NULL target (zero). Convert to a NULL namepath */ + + Arg = AcpiPsAllocOp (AML_INT_NAMEPATH_OP, ParserState->Aml); + if (!Arg) { - Status = AcpiPsGetNextNamepath (WalkState, ParserState, - Arg, ACPI_NOT_METHOD_CALL); + return_ACPI_STATUS (AE_NO_MEMORY); } + + Status = AcpiPsGetNextNamepath (WalkState, ParserState, + Arg, ACPI_POSSIBLE_METHOD_CALL); } else { @@ -907,6 +911,11 @@ AcpiPsGetNextArg ( case ARGP_DATAOBJ: case ARGP_TERMARG: + + ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, + "**** TermArg/DataObj: %s (%2.2X)\n", + AcpiUtGetArgumentTypeName (ArgType), ArgType)); + /* Single complex argument, nothing returned */ WalkState->ArgCount = 1; diff --git a/source/components/parser/psloop.c b/source/components/parser/psloop.c index e0839fd..5056cd1 100644 --- a/source/components/parser/psloop.c +++ b/source/components/parser/psloop.c @@ -104,6 +104,9 @@ AcpiPsGetArguments ( ACPI_FUNCTION_TRACE_PTR (PsGetArguments, WalkState); + ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, + "Get arguments for opcode [%s]\n", Op->Common.AmlOpName)); + switch (Op->Common.AmlOpcode) { case AML_BYTE_OP: /* AML_BYTEDATA_ARG */ diff --git a/source/components/parser/psobject.c b/source/components/parser/psobject.c index 7edc39e..d027f6d 100644 --- a/source/components/parser/psobject.c +++ b/source/components/parser/psobject.c @@ -373,7 +373,13 @@ AcpiPsCreateOp ( Op->Common.Flags |= ACPI_PARSEOP_TARGET; } } - else if (ParentScope->Common.AmlOpcode == AML_INCREMENT_OP) + + /* + * Special case for both Increment() and Decrement(), where + * the lone argument is both a source and a target. + */ + else if ((ParentScope->Common.AmlOpcode == AML_INCREMENT_OP) || + (ParentScope->Common.AmlOpcode == AML_DECREMENT_OP)) { Op->Common.Flags |= ACPI_PARSEOP_TARGET; } diff --git a/source/components/parser/pstree.c b/source/components/parser/pstree.c index 7298569..0d6ab63 100644 --- a/source/components/parser/pstree.c +++ b/source/components/parser/pstree.c @@ -142,12 +142,12 @@ AcpiPsAppendArg ( const ACPI_OPCODE_INFO *OpInfo; - ACPI_FUNCTION_ENTRY (); + ACPI_FUNCTION_TRACE ("PsAppendArg"); if (!Op) { - return; + return_VOID; } /* Get the info structure for this opcode */ @@ -159,7 +159,7 @@ AcpiPsAppendArg ( ACPI_ERROR ((AE_INFO, "Invalid AML Opcode: 0x%2.2X", Op->Common.AmlOpcode)); - return; + return_VOID; } /* Check if this opcode requires argument sub-objects */ @@ -168,7 +168,7 @@ AcpiPsAppendArg ( { /* Has no linked argument objects */ - return; + return_VOID; } /* Append the argument to the linked argument list */ @@ -200,6 +200,8 @@ AcpiPsAppendArg ( Op->Common.ArgListLength++; } + + return_VOID; } diff --git a/source/components/tables/tbdata.c b/source/components/tables/tbdata.c index 81b3abc..95b5b26 100644 --- a/source/components/tables/tbdata.c +++ b/source/components/tables/tbdata.c @@ -937,9 +937,9 @@ AcpiTbLoadTable ( * * FUNCTION: AcpiTbInstallAndLoadTable * - * PARAMETERS: Table - Pointer to the table - * Address - Physical address of the table + * PARAMETERS: Address - Physical address of the table * Flags - Allocation flags of the table + * Override - Whether override should be performed * TableIndex - Where table index is returned * * RETURN: Status @@ -950,7 +950,6 @@ AcpiTbLoadTable ( ACPI_STATUS AcpiTbInstallAndLoadTable ( - ACPI_TABLE_HEADER *Table, ACPI_PHYSICAL_ADDRESS Address, UINT8 Flags, BOOLEAN Override, @@ -958,10 +957,9 @@ AcpiTbInstallAndLoadTable ( { ACPI_STATUS Status; UINT32 i; - ACPI_OWNER_ID OwnerId; - ACPI_FUNCTION_TRACE (AcpiLoadTable); + ACPI_FUNCTION_TRACE (TbInstallAndLoadTable); (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); @@ -975,48 +973,68 @@ AcpiTbInstallAndLoadTable ( goto UnlockAndExit; } - /* - * Note: Now table is "INSTALLED", it must be validated before - * using. - */ - Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[i]); - if (ACPI_FAILURE (Status)) - { - goto UnlockAndExit; - } + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + Status = AcpiTbLoadTable (i, AcpiGbl_RootNode); + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); +UnlockAndExit: + *TableIndex = i; (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - Status = AcpiNsLoadTable (i, AcpiGbl_RootNode); + return_ACPI_STATUS (Status); +} - /* Execute any module-level code that was found in the table */ - if (!AcpiGbl_ParseTableAsTermList && AcpiGbl_GroupModuleLevelCode) - { - AcpiNsExecModuleCodeList (); - } +/******************************************************************************* + * + * FUNCTION: AcpiTbUnloadTable + * + * PARAMETERS: TableIndex - Table index + * + * RETURN: Status + * + * DESCRIPTION: Unload an ACPI table + * + ******************************************************************************/ - /* - * Update GPEs for any new _Lxx/_Exx methods. Ignore errors. The host is - * responsible for discovering any new wake GPEs by running _PRW methods - * that may have been loaded by this table. - */ - Status = AcpiTbGetOwnerId (i, &OwnerId); - if (ACPI_SUCCESS (Status)) +ACPI_STATUS +AcpiTbUnloadTable ( + UINT32 TableIndex) +{ + ACPI_STATUS Status = AE_OK; + ACPI_TABLE_HEADER *Table; + + + ACPI_FUNCTION_TRACE (TbUnloadTable); + + + /* Ensure the table is still loaded */ + + if (!AcpiTbIsTableLoaded (TableIndex)) { - AcpiEvUpdateGpes (OwnerId); + return_ACPI_STATUS (AE_NOT_EXIST); } /* Invoke table handler if present */ if (AcpiGbl_TableHandler) { - (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_LOAD, Table, - AcpiGbl_TableHandlerContext); + Status = AcpiGetTableByIndex (TableIndex, &Table); + if (ACPI_SUCCESS (Status)) + { + (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_UNLOAD, Table, + AcpiGbl_TableHandlerContext); + } } - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); -UnlockAndExit: - *TableIndex = i; - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + /* Delete the portion of the namespace owned by this table */ + + Status = AcpiTbDeleteNamespaceByOwner (TableIndex); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + + (void) AcpiTbReleaseOwnerId (TableIndex); + AcpiTbSetTableLoadedFlag (TableIndex, FALSE); return_ACPI_STATUS (Status); } diff --git a/source/components/tables/tbfadt.c b/source/components/tables/tbfadt.c index b75b52d..1d327dc 100644 --- a/source/components/tables/tbfadt.c +++ b/source/components/tables/tbfadt.c @@ -341,6 +341,8 @@ AcpiTbParseFadt ( { UINT32 Length; ACPI_TABLE_HEADER *Table; + ACPI_TABLE_DESC *FadtDesc; + ACPI_STATUS Status; /* @@ -350,14 +352,13 @@ AcpiTbParseFadt ( * Get a local copy of the FADT and convert it to a common format * Map entire FADT, assumed to be smaller than one page. */ - Length = AcpiGbl_RootTableList.Tables[AcpiGbl_FadtIndex].Length; - - Table = AcpiOsMapMemory ( - AcpiGbl_RootTableList.Tables[AcpiGbl_FadtIndex].Address, Length); - if (!Table) + FadtDesc = &AcpiGbl_RootTableList.Tables[AcpiGbl_FadtIndex]; + Status = AcpiTbGetTable (FadtDesc, &Table); + if (ACPI_FAILURE (Status)) { return; } + Length = FadtDesc->Length; /* * Validate the FADT checksum before we copy the table. Ignore @@ -371,7 +372,7 @@ AcpiTbParseFadt ( /* All done with the real FADT, unmap it */ - AcpiOsUnmapMemory (Table, Length); + AcpiTbPutTable (FadtDesc); /* Obtain the DSDT and FACS tables via their addresses within the FADT */ @@ -522,19 +523,17 @@ AcpiTbConvertFadt ( /* - * For ACPI 1.0 FADTs (revision 1), ensure that reserved fields which + * For ACPI 1.0 FADTs (revision 1 or 2), 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 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. + * Note: The FADT revision value is unreliable. Only the length can be + * trusted. */ - if (AcpiGbl_FADT.Header.Length <= ACPI_FADT_V3_SIZE) + if (AcpiGbl_FADT.Header.Length <= ACPI_FADT_V2_SIZE) { AcpiGbl_FADT.PreferredProfile = 0; AcpiGbl_FADT.PstateControl = 0; diff --git a/source/components/tables/tbutils.c b/source/components/tables/tbutils.c index 85b9c3e..6fc30a6 100644 --- a/source/components/tables/tbutils.c +++ b/source/components/tables/tbutils.c @@ -411,3 +411,99 @@ NextTable: AcpiOsUnmapMemory (Table, Length); return_ACPI_STATUS (AE_OK); } + + +/******************************************************************************* + * + * FUNCTION: AcpiTbGetTable + * + * PARAMETERS: TableDesc - Table descriptor + * OutTable - Where the pointer to the table is returned + * + * RETURN: Status and pointer to the requested table + * + * DESCRIPTION: Increase a reference to a table descriptor and return the + * validated table pointer. + * If the table descriptor is an entry of the root table list, + * this API must be invoked with ACPI_MTX_TABLES acquired. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiTbGetTable ( + ACPI_TABLE_DESC *TableDesc, + ACPI_TABLE_HEADER **OutTable) +{ + ACPI_STATUS Status; + + + ACPI_FUNCTION_TRACE (AcpiTbGetTable); + + + if (TableDesc->ValidationCount == 0) + { + /* Table need to be "VALIDATED" */ + + Status = AcpiTbValidateTable (TableDesc); + if (ACPI_FAILURE (Status)) + { + return_ACPI_STATUS (Status); + } + } + + TableDesc->ValidationCount++; + if (TableDesc->ValidationCount == 0) + { + ACPI_ERROR ((AE_INFO, + "Table %p, Validation count is zero after increment\n", + TableDesc)); + TableDesc->ValidationCount--; + return_ACPI_STATUS (AE_LIMIT); + } + + *OutTable = TableDesc->Pointer; + return_ACPI_STATUS (AE_OK); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiTbPutTable + * + * PARAMETERS: TableDesc - Table descriptor + * + * RETURN: None + * + * DESCRIPTION: Decrease a reference to a table descriptor and release the + * validated table pointer if no references. + * If the table descriptor is an entry of the root table list, + * this API must be invoked with ACPI_MTX_TABLES acquired. + * + ******************************************************************************/ + +void +AcpiTbPutTable ( + ACPI_TABLE_DESC *TableDesc) +{ + + ACPI_FUNCTION_TRACE (AcpiTbPutTable); + + + if (TableDesc->ValidationCount == 0) + { + ACPI_WARNING ((AE_INFO, + "Table %p, Validation count is zero before decrement\n", + TableDesc)); + return_VOID; + } + TableDesc->ValidationCount--; + + if (TableDesc->ValidationCount == 0) + { + /* Table need to be "INVALIDATED" */ + + AcpiTbInvalidateTable (TableDesc); + } + + return_VOID; +} diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c index 4c8c065..9346933 100644 --- a/source/components/tables/tbxface.c +++ b/source/components/tables/tbxface.c @@ -184,6 +184,7 @@ AcpiReallocateRootTable ( void) { ACPI_STATUS Status; + UINT32 i; ACPI_FUNCTION_TRACE (AcpiReallocateRootTable); @@ -198,6 +199,22 @@ AcpiReallocateRootTable ( return_ACPI_STATUS (AE_SUPPORT); } + /* + * Ensure OS early boot logic, which is required by some hosts. If the + * table state is reported to be wrong, developers should fix the + * issue by invoking AcpiPutTable() for the reported table during the + * early stage. + */ + for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; ++i) + { + if (AcpiGbl_RootTableList.Tables[i].Pointer) + { + ACPI_ERROR ((AE_INFO, + "Table [%4.4s] is not invalidated during early boot stage", + AcpiGbl_RootTableList.Tables[i].Signature.Ascii)); + } + } + AcpiGbl_RootTableList.Flags |= ACPI_ROOT_ALLOW_RESIZE; Status = AcpiTbResizeRootTableList (); @@ -307,6 +324,11 @@ ACPI_EXPORT_SYMBOL (AcpiGetTableHeader) * * DESCRIPTION: Finds and verifies an ACPI table. Table must be in the * RSDT/XSDT. + * Note that an early stage AcpiGetTable() call must be paired + * with an early stage AcpiPutTable() call. otherwise the table + * pointer mapped by the early stage mapping implementation may be + * erroneously unmapped by the late stage unmapping implementation + * in an AcpiPutTable() invoked during the late stage. * ******************************************************************************/ @@ -318,7 +340,8 @@ AcpiGetTable ( { UINT32 i; UINT32 j; - ACPI_STATUS Status; + ACPI_STATUS Status = AE_NOT_FOUND; + ACPI_TABLE_DESC *TableDesc; /* Parameter validation */ @@ -328,12 +351,22 @@ AcpiGetTable ( return (AE_BAD_PARAMETER); } + /* + * Note that the following line is required by some OSPMs, they only + * check if the returned table is NULL instead of the returned status + * to determined if this function is succeeded. + */ + *OutTable = NULL; + + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + /* Walk the root table list */ for (i = 0, j = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++) { - if (!ACPI_COMPARE_NAME ( - &(AcpiGbl_RootTableList.Tables[i].Signature), Signature)) + TableDesc = &AcpiGbl_RootTableList.Tables[i]; + + if (!ACPI_COMPARE_NAME (&TableDesc->Signature, Signature)) { continue; } @@ -343,19 +376,66 @@ AcpiGetTable ( continue; } - Status = AcpiTbValidateTable (&AcpiGbl_RootTableList.Tables[i]); - if (ACPI_SUCCESS (Status)) + Status = AcpiTbGetTable (TableDesc, OutTable); + break; + } + + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + return (Status); +} + +ACPI_EXPORT_SYMBOL (AcpiGetTable) + + +/******************************************************************************* + * + * FUNCTION: AcpiPutTable + * + * PARAMETERS: Table - The pointer to the table + * + * RETURN: None + * + * DESCRIPTION: Release a table returned by AcpiGetTable() and its clones. + * Note that it is not safe if this function was invoked after an + * uninstallation happened to the original table descriptor. + * Currently there is no OSPMs' requirement to handle such + * situations. + * + ******************************************************************************/ + +void +AcpiPutTable ( + ACPI_TABLE_HEADER *Table) +{ + UINT32 i; + ACPI_TABLE_DESC *TableDesc; + + + ACPI_FUNCTION_TRACE (AcpiPutTable); + + + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); + + /* Walk the root table list */ + + for (i = 0; i < AcpiGbl_RootTableList.CurrentTableCount; i++) + { + TableDesc = &AcpiGbl_RootTableList.Tables[i]; + + if (TableDesc->Pointer != Table) { - *OutTable = AcpiGbl_RootTableList.Tables[i].Pointer; + continue; } - return (Status); + AcpiTbPutTable (TableDesc); + break; } - return (AE_NOT_FOUND); + (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); + return_VOID; } -ACPI_EXPORT_SYMBOL (AcpiGetTable) +ACPI_EXPORT_SYMBOL (AcpiPutTable) /******************************************************************************* @@ -363,7 +443,7 @@ ACPI_EXPORT_SYMBOL (AcpiGetTable) * FUNCTION: AcpiGetTableByIndex * * PARAMETERS: TableIndex - Table index - * Table - Where the pointer to the table is returned + * OutTable - Where the pointer to the table is returned * * RETURN: Status and pointer to the requested table * @@ -375,7 +455,7 @@ ACPI_EXPORT_SYMBOL (AcpiGetTable) ACPI_STATUS AcpiGetTableByIndex ( UINT32 TableIndex, - ACPI_TABLE_HEADER **Table) + ACPI_TABLE_HEADER **OutTable) { ACPI_STATUS Status; @@ -385,37 +465,34 @@ AcpiGetTableByIndex ( /* Parameter validation */ - if (!Table) + if (!OutTable) { return_ACPI_STATUS (AE_BAD_PARAMETER); } + /* + * Note that the following line is required by some OSPMs, they only + * check if the returned table is NULL instead of the returned status + * to determined if this function is succeeded. + */ + *OutTable = NULL; + (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); /* Validate index */ if (TableIndex >= AcpiGbl_RootTableList.CurrentTableCount) { - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return_ACPI_STATUS (AE_BAD_PARAMETER); + Status = AE_BAD_PARAMETER; + goto UnlockAndExit; } - if (!AcpiGbl_RootTableList.Tables[TableIndex].Pointer) - { - /* Table is not mapped, map it */ - - Status = AcpiTbValidateTable ( - &AcpiGbl_RootTableList.Tables[TableIndex]); - if (ACPI_FAILURE (Status)) - { - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return_ACPI_STATUS (Status); - } - } + Status = AcpiTbGetTable ( + &AcpiGbl_RootTableList.Tables[TableIndex], OutTable); - *Table = AcpiGbl_RootTableList.Tables[TableIndex].Pointer; +UnlockAndExit: (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - return_ACPI_STATUS (AE_OK); + return_ACPI_STATUS (Status); } ACPI_EXPORT_SYMBOL (AcpiGetTableByIndex) diff --git a/source/components/tables/tbxfload.c b/source/components/tables/tbxfload.c index 43fe397..30c6534 100644 --- a/source/components/tables/tbxfload.c +++ b/source/components/tables/tbxfload.c @@ -372,7 +372,7 @@ AcpiLoadTable ( /* Install the table and load it into the namespace */ ACPI_INFO (("Host-directed Dynamic ACPI Table Load:")); - Status = AcpiTbInstallAndLoadTable (Table, ACPI_PTR_TO_PHYSADDR (Table), + Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table), ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex); return_ACPI_STATUS (Status); } @@ -459,39 +459,8 @@ AcpiUnloadParentTable ( break; } - /* Ensure the table is actually loaded */ - (void) AcpiUtReleaseMutex (ACPI_MTX_TABLES); - if (!AcpiTbIsTableLoaded (i)) - { - Status = AE_NOT_EXIST; - (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); - break; - } - - /* Invoke table handler if present */ - - if (AcpiGbl_TableHandler) - { - (void) AcpiGbl_TableHandler (ACPI_TABLE_EVENT_UNLOAD, - AcpiGbl_RootTableList.Tables[i].Pointer, - AcpiGbl_TableHandlerContext); - } - - /* - * Delete all namespace objects owned by this table. Note that - * these objects can appear anywhere in the namespace by virtue - * of the AML "Scope" operator. Thus, we need to track ownership - * by an ID, not simply a position within the hierarchy. - */ - Status = AcpiTbDeleteNamespaceByOwner (i); - if (ACPI_FAILURE (Status)) - { - break; - } - - Status = AcpiTbReleaseOwnerId (i); - AcpiTbSetTableLoadedFlag (i, FALSE); + Status = AcpiTbUnloadTable (i); (void) AcpiUtAcquireMutex (ACPI_MTX_TABLES); break; } diff --git a/source/components/utilities/utdecode.c b/source/components/utilities/utdecode.c index 5c8f2ce..45adf14 100644 --- a/source/components/utilities/utdecode.c +++ b/source/components/utilities/utdecode.c @@ -44,6 +44,7 @@ #include "acpi.h" #include "accommon.h" #include "acnamesp.h" +#include "amlcode.h" #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME ("utdecode") @@ -604,6 +605,59 @@ AcpiUtGetNotifyName ( return ("Hardware-Specific"); } + + +/******************************************************************************* + * + * FUNCTION: AcpiUtGetArgumentTypeName + * + * PARAMETERS: ArgType - an ARGP_* parser argument type + * + * RETURN: Decoded ARGP_* type + * + * DESCRIPTION: Decode an ARGP_* parser type, as defined in the amlcode.h file, + * and used in the acopcode.h file. For example, ARGP_TERMARG. + * Used for debug only. + * + ******************************************************************************/ + +static const char *AcpiGbl_ArgumentType[20] = +{ + /* 00 */ "Unknown ARGP", + /* 01 */ "ByteData", + /* 02 */ "ByteList", + /* 03 */ "CharList", + /* 04 */ "DataObject", + /* 05 */ "DataObjectList", + /* 06 */ "DWordData", + /* 07 */ "FieldList", + /* 08 */ "Name", + /* 09 */ "NameString", + /* 0A */ "ObjectList", + /* 0B */ "PackageLength", + /* 0C */ "SuperName", + /* 0D */ "Target", + /* 0E */ "TermArg", + /* 0F */ "TermList", + /* 10 */ "WordData", + /* 11 */ "QWordData", + /* 12 */ "SimpleName", + /* 13 */ "NameOrRef" +}; + +const char * +AcpiUtGetArgumentTypeName ( + UINT32 ArgType) +{ + + if (ArgType > ARGP_MAX) + { + return ("Unknown ARGP"); + } + + return (AcpiGbl_ArgumentType[ArgType]); +} + #endif diff --git a/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c index 8efae42..8c44a1c 100644 --- a/source/components/utilities/utresrc.c +++ b/source/components/utilities/utresrc.c @@ -468,9 +468,11 @@ AcpiUtWalkAmlResources ( ACPI_FUNCTION_TRACE (UtWalkAmlResources); - /* The absolute minimum resource template is one EndTag descriptor */ - - if (AmlLength < sizeof (AML_RESOURCE_END_TAG)) + /* + * The absolute minimum resource template is one EndTag descriptor. + * However, we will treat a lone EndTag as just a simple buffer. + */ + if (AmlLength <= sizeof (AML_RESOURCE_END_TAG)) { return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG); } @@ -503,8 +505,8 @@ AcpiUtWalkAmlResources ( if (UserFunction) { - Status = UserFunction ( - Aml, Length, Offset, ResourceIndex, Context); + Status = UserFunction (Aml, Length, Offset, + ResourceIndex, Context); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); @@ -531,6 +533,13 @@ AcpiUtWalkAmlResources ( *Context = Aml; } + /* Check if buffer is defined to be longer than the resource length */ + + if (AmlLength > (Offset + Length)) + { + return_ACPI_STATUS (AE_AML_NO_RESOURCE_END_TAG); + } + /* Normal exit */ return_ACPI_STATUS (AE_OK); diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h index d60be8f..719ff85 100644 --- a/source/include/acdisasm.h +++ b/source/include/acdisasm.h @@ -280,8 +280,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[]; @@ -425,9 +425,6 @@ 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/source/include/acevents.h b/source/include/acevents.h index 14f2b79..a2ea520 100644 --- a/source/include/acevents.h +++ b/source/include/acevents.h @@ -336,8 +336,7 @@ AcpiEvDefaultRegionSetup ( ACPI_STATUS AcpiEvInitializeRegion ( - ACPI_OPERAND_OBJECT *RegionObj, - BOOLEAN AcpiNsLocked); + ACPI_OPERAND_OBJECT *RegionObj); /* diff --git a/source/include/acnamesp.h b/source/include/acnamesp.h index 440ff5b..09b319c 100644 --- a/source/include/acnamesp.h +++ b/source/include/acnamesp.h @@ -385,6 +385,11 @@ AcpiNsNameOfCurrentScope ( ACPI_WALK_STATE *WalkState); ACPI_STATUS +AcpiNsHandleToName ( + ACPI_HANDLE TargetHandle, + ACPI_BUFFER *Buffer); + +ACPI_STATUS AcpiNsHandleToPathname ( ACPI_HANDLE TargetHandle, ACPI_BUFFER *Buffer, diff --git a/source/include/acopcode.h b/source/include/acopcode.h index a278d4a..e5c3525 100644 --- a/source/include/acopcode.h +++ b/source/include/acopcode.h @@ -93,7 +93,7 @@ #define ARGP_BYTELIST_OP ARGP_LIST1 (ARGP_NAMESTRING) #define ARGP_CONCAT_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) #define ARGP_CONCAT_RES_OP ARGP_LIST3 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET) -#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_NAME_OR_REF,ARGP_TARGET) +#define ARGP_COND_REF_OF_OP ARGP_LIST2 (ARGP_SIMPLENAME, ARGP_TARGET) #define ARGP_CONNECTFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) #define ARGP_CONTINUE_OP ARG_NONE #define ARGP_COPY_OP ARGP_LIST2 (ARGP_TERMARG, ARGP_SIMPLENAME) @@ -106,7 +106,7 @@ #define ARGP_DATA_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_TERMARG, ARGP_TERMARG, ARGP_TERMARG) #define ARGP_DEBUG_OP ARG_NONE #define ARGP_DECREMENT_OP ARGP_LIST1 (ARGP_SUPERNAME) -#define ARGP_DEREF_OF_OP ARGP_LIST1 (ARGP_TERMARG) +#define ARGP_DEREF_OF_OP ARGP_LIST1 (ARGP_SUPERNAME) #define ARGP_DEVICE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_OBJLIST) #define ARGP_DIVIDE_OP ARGP_LIST4 (ARGP_TERMARG, ARGP_TERMARG, ARGP_TARGET, ARGP_TARGET) #define ARGP_DWORD_OP ARGP_LIST1 (ARGP_DWORDDATA) @@ -153,14 +153,14 @@ #define ARGP_NAMEPATH_OP ARGP_LIST1 (ARGP_NAMESTRING) #define ARGP_NOOP_OP ARG_NONE #define ARGP_NOTIFY_OP ARGP_LIST2 (ARGP_SUPERNAME, ARGP_TERMARG) -#define ARGP_OBJECT_TYPE_OP ARGP_LIST1 (ARGP_NAME_OR_REF) +#define ARGP_OBJECT_TYPE_OP ARGP_LIST1 (ARGP_SIMPLENAME) #define ARGP_ONE_OP ARG_NONE #define ARGP_ONES_OP ARG_NONE #define ARGP_PACKAGE_OP ARGP_LIST3 (ARGP_PKGLENGTH, ARGP_BYTEDATA, ARGP_DATAOBJLIST) #define ARGP_POWER_RES_OP ARGP_LIST5 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_WORDDATA, ARGP_OBJLIST) #define ARGP_PROCESSOR_OP ARGP_LIST6 (ARGP_PKGLENGTH, ARGP_NAME, ARGP_BYTEDATA, ARGP_DWORDDATA, ARGP_BYTEDATA, ARGP_OBJLIST) #define ARGP_QWORD_OP ARGP_LIST1 (ARGP_QWORDDATA) -#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_NAME_OR_REF) +#define ARGP_REF_OF_OP ARGP_LIST1 (ARGP_SIMPLENAME) #define ARGP_REGION_OP ARGP_LIST4 (ARGP_NAME, ARGP_BYTEDATA, ARGP_TERMARG, ARGP_TERMARG) #define ARGP_RELEASE_OP ARGP_LIST1 (ARGP_SUPERNAME) #define ARGP_RESERVEDFIELD_OP ARGP_LIST1 (ARGP_NAMESTRING) @@ -251,7 +251,7 @@ #define ARGI_FIELD_OP ARGI_INVALID_OPCODE #define ARGI_FIND_SET_LEFT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_FIND_SET_RIGHT_BIT_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) -#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET) +#define ARGI_FROM_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_IF_OP ARGI_INVALID_OPCODE #define ARGI_INCREMENT_OP ARGI_LIST1 (ARGI_TARGETREF) #define ARGI_INDEX_FIELD_OP ARGI_INVALID_OPCODE @@ -315,12 +315,12 @@ #define ARGI_SUBTRACT_OP ARGI_LIST3 (ARGI_INTEGER, ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_THERMAL_ZONE_OP ARGI_INVALID_OPCODE #define ARGI_TIMER_OP ARG_NONE -#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_FIXED_TARGET) -#define ARGI_TO_BUFFER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) -#define ARGI_TO_DEC_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) -#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) -#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_FIXED_TARGET) -#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_FIXED_TARGET) +#define ARGI_TO_BCD_OP ARGI_LIST2 (ARGI_INTEGER, ARGI_TARGETREF) +#define ARGI_TO_BUFFER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_TARGETREF) +#define ARGI_TO_DEC_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_TARGETREF) +#define ARGI_TO_HEX_STR_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_TARGETREF) +#define ARGI_TO_INTEGER_OP ARGI_LIST2 (ARGI_COMPUTEDATA,ARGI_TARGETREF) +#define ARGI_TO_STRING_OP ARGI_LIST3 (ARGI_BUFFER, ARGI_INTEGER, ARGI_TARGETREF) #define ARGI_UNLOAD_OP ARGI_LIST1 (ARGI_DDBHANDLE) #define ARGI_VAR_PACKAGE_OP ARGI_LIST1 (ARGI_INTEGER) #define ARGI_WAIT_OP ARGI_LIST2 (ARGI_EVENT, ARGI_INTEGER) diff --git a/source/include/acpixf.h b/source/include/acpixf.h index b2655e9..f5f86d4 100644 --- a/source/include/acpixf.h +++ b/source/include/acpixf.h @@ -46,7 +46,7 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20160930 +#define ACPI_CA_VERSION 0x20161117 #include "acconfig.h" #include "actypes.h" @@ -582,6 +582,11 @@ AcpiGetTable ( UINT32 Instance, ACPI_TABLE_HEADER **OutTable)) +ACPI_EXTERNAL_RETURN_VOID ( +void +AcpiPutTable ( + ACPI_TABLE_HEADER *Table)) + ACPI_EXTERNAL_RETURN_STATUS ( ACPI_STATUS AcpiGetTableByIndex ( diff --git a/source/include/actables.h b/source/include/actables.h index 3325f19..3269728 100644 --- a/source/include/actables.h +++ b/source/include/actables.h @@ -185,12 +185,15 @@ AcpiTbLoadTable ( ACPI_STATUS AcpiTbInstallAndLoadTable ( - ACPI_TABLE_HEADER *Table, ACPI_PHYSICAL_ADDRESS Address, UINT8 Flags, BOOLEAN Override, UINT32 *TableIndex); +ACPI_STATUS +AcpiTbUnloadTable ( + UINT32 TableIndex); + void AcpiTbTerminate ( void); @@ -253,6 +256,15 @@ ACPI_STATUS AcpiTbParseRootTable ( ACPI_PHYSICAL_ADDRESS RsdpAddress); +ACPI_STATUS +AcpiTbGetTable ( + ACPI_TABLE_DESC *TableDesc, + ACPI_TABLE_HEADER **OutTable); + +void +AcpiTbPutTable ( + ACPI_TABLE_DESC *TableDesc); + /* * tbxfload diff --git a/source/include/actbl.h b/source/include/actbl.h index b5c76c9..93e1a51 100644 --- a/source/include/actbl.h +++ b/source/include/actbl.h @@ -256,72 +256,62 @@ typedef struct acpi_table_facs typedef struct acpi_table_fadt { - 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_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_FADT; @@ -337,8 +327,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 */ @@ -415,6 +405,7 @@ typedef struct acpi_table_desc ACPI_NAME_UNION Signature; ACPI_OWNER_ID OwnerId; UINT8 Flags; + UINT16 ValidationCount; } ACPI_TABLE_DESC; @@ -445,34 +436,20 @@ 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. * - * 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 + * 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 */ -#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_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_MAX_VERSION 6 #define ACPI_FADT_CONFORMANCE "ACPI 6.1 (FADT version 6)" #endif /* __ACTBL_H__ */ diff --git a/source/include/acutils.h b/source/include/acutils.h index bdd6f9b..ac135eb 100644 --- a/source/include/acutils.h +++ b/source/include/acutils.h @@ -283,6 +283,10 @@ const char * AcpiUtGetEventName ( UINT32 EventId); +const char * +AcpiUtGetArgumentTypeName ( + UINT32 ArgType); + char AcpiUtHexToAsciiChar ( UINT64 Integer, diff --git a/source/include/amlcode.h b/source/include/amlcode.h index a432c2b..640029b 100644 --- a/source/include/amlcode.h +++ b/source/include/amlcode.h @@ -243,6 +243,7 @@ #define ARGP_QWORDDATA 0x11 #define ARGP_SIMPLENAME 0x12 /* NameString | LocalTerm | ArgTerm */ #define ARGP_NAME_OR_REF 0x13 /* For ObjectType only */ +#define ARGP_MAX 0x13 /* * Resolved argument types for the AML Interpreter @@ -279,9 +280,24 @@ #define ARGI_DEVICE_REF 0x0D #define ARGI_REFERENCE 0x0E #define ARGI_TARGETREF 0x0F /* Target, subject to implicit conversion */ -#define ARGI_FIXED_TARGET 0x10 /* Target, no implicit conversion */ -#define ARGI_SIMPLE_TARGET 0x11 /* Name, Local, Arg -- no implicit conversion */ -#define ARGI_STORE_TARGET 0x12 /* Target for store is TARGETREF + package objects */ +#define ARGI_SIMPLE_TARGET 0x10 /* Name, Local, Arg -- no implicit conversion */ +#define ARGI_STORE_TARGET 0x11 /* Target for store is TARGETREF + package objects */ +/* + * #define ARGI_FIXED_TARGET 0x10 Target, no implicit conversion + * + * Removed 10/2016. ARGI_FIXED_TARGET was used for these operators: + * FromBCD + * ToBCD + * ToDecimalString + * ToHexString + * ToInteger + * ToBuffer + * The purpose of this type was to disable "implicit result conversion", + * but this was incorrect per the ACPI spec and other ACPI implementations. + * These operators now have the target operand defined as a normal + * ARGI_TARGETREF. + */ + /* Multiple/complex types */ diff --git a/source/tools/acpibin/abcompare.c b/source/tools/acpibin/abcompare.c index e21e29d..3d99c60 100644 --- a/source/tools/acpibin/abcompare.c +++ b/source/tools/acpibin/abcompare.c @@ -414,6 +414,7 @@ AbCompareAmlFiles ( { /* Display header information */ + printf ("Comparing %s to %s\n", File1Path, File2Path); AbPrintHeadersInfo (&Header1, &Header2); } @@ -425,6 +426,12 @@ AbCompareAmlFiles ( /* Do the byte-by-byte compare */ + printf ("Compare offset: %u\n", AbGbl_CompareOffset); + if (AbGbl_CompareOffset) + { + fseek (File2, AbGbl_CompareOffset, SEEK_CUR); + } + Actual1 = fread (&Char1, 1, 1, File1); Actual2 = fread (&Char2, 1, 1, File2); Offset = sizeof (ACPI_TABLE_HEADER); @@ -436,7 +443,7 @@ AbCompareAmlFiles ( printf ("Error - Byte mismatch at offset %8.4X: 0x%2.2X 0x%2.2X\n", Offset, Char1, Char2); Mismatches++; - if (Mismatches > 100) + if ((Mismatches > 100) && (!AbGbl_DisplayAllMiscompares)) { printf ("100 Mismatches: Too many mismatches\n"); goto Exit2; diff --git a/source/tools/acpibin/abmain.c b/source/tools/acpibin/abmain.c index 5334bc0..ccc355c 100644 --- a/source/tools/acpibin/abmain.c +++ b/source/tools/acpibin/abmain.c @@ -52,7 +52,7 @@ AbDisplayUsage ( #define AB_UTILITY_NAME "ACPI Binary Table Dump Utility" -#define AB_SUPPORTED_OPTIONS "c:d:h:s:tv" +#define AB_SUPPORTED_OPTIONS "a:c:d:h:o:s:tv" /****************************************************************************** @@ -75,9 +75,11 @@ AbDisplayUsage ( ACPI_USAGE_HEADER ("acpibin [options]"); - ACPI_OPTION ("-c ", "Compare two binary AML files"); + ACPI_OPTION ("-a ", "Compare two binary AML files, dump all mismatches"); + ACPI_OPTION ("-c ", "Compare two binary AML files, dump first 100 mismatches"); ACPI_OPTION ("-d ", "Dump AML binary to text file"); ACPI_OPTION ("-e ", "Extract binary AML table from acpidump file"); + ACPI_OPTION ("-o ", "Start comparison at this offset into second file"); ACPI_OPTION ("-h ", "Display table header for binary AML file"); ACPI_OPTION ("-s ", "Update checksum for binary AML file"); ACPI_OPTION ("-t", "Terse mode"); @@ -120,6 +122,12 @@ main ( while ((j = AcpiGetopt (argc, argv, AB_SUPPORTED_OPTIONS)) != ACPI_OPT_END) switch(j) { + case 'a': /* Compare Files, display all differences */ + + AbGbl_DisplayAllMiscompares = TRUE; + + /* Fallthrough */ + case 'c': /* Compare Files */ if (argc < 4) @@ -153,6 +161,11 @@ main ( AbDisplayHeader (AcpiGbl_Optarg); return (0); + case 'o': + + AbGbl_CompareOffset = atoi (AcpiGbl_Optarg); + continue; + case 's': /* Compute/update checksum */ if (argc < 3) diff --git a/source/tools/acpibin/acpibin.h b/source/tools/acpibin/acpibin.h index 679f1a5..dd5940f 100644 --- a/source/tools/acpibin/acpibin.h +++ b/source/tools/acpibin/acpibin.h @@ -63,6 +63,8 @@ /* Globals */ EXTERN BOOLEAN INIT_GLOBAL (Gbl_TerseMode, FALSE); +EXTERN BOOLEAN INIT_GLOBAL (AbGbl_DisplayAllMiscompares, FALSE); +EXTERN UINT32 INIT_GLOBAL (AbGbl_CompareOffset, 0); /* Prototypes */ diff --git a/source/tools/acpinames/anstubs.c b/source/tools/acpinames/anstubs.c index 78984ce..ab4df3c 100644 --- a/source/tools/acpinames/anstubs.c +++ b/source/tools/acpinames/anstubs.c @@ -112,8 +112,7 @@ AcpiEvInitializeOpRegions ( ACPI_STATUS AcpiEvInitializeRegion ( - ACPI_OPERAND_OBJECT *RegionObj, - BOOLEAN AcpiNsLocked) + ACPI_OPERAND_OBJECT *RegionObj) { return (AE_OK); } diff --git a/source/tools/acpixtract/acpixtract.c b/source/tools/acpixtract/acpixtract.c index 1573cee..01c748c 100644 --- a/source/tools/acpixtract/acpixtract.c +++ b/source/tools/acpixtract/acpixtract.c @@ -87,7 +87,7 @@ AxExtractTables ( /* Open input in text mode, output is in binary mode */ - InputFile = fopen (InputPathname, "rt"); + InputFile = fopen (InputPathname, "r"); if (!InputFile) { printf ("Could not open input file %s\n", InputPathname); @@ -286,7 +286,7 @@ AxExtractToMultiAmlFile ( /* Open the input file in text mode */ - InputFile = fopen (InputPathname, "rt"); + InputFile = fopen (InputPathname, "r"); if (!InputFile) { printf ("Could not open input file %s\n", InputPathname); @@ -417,7 +417,7 @@ AxListTables ( /* Open input in text mode, output is in binary mode */ - InputFile = fopen (InputPathname, "rt"); + InputFile = fopen (InputPathname, "r"); if (!InputFile) { printf ("Could not open input file %s\n", InputPathname); diff --git a/source/tools/acpixtract/axutils.c b/source/tools/acpixtract/axutils.c index 6af8cdc..68e51da 100644 --- a/source/tools/acpixtract/axutils.c +++ b/source/tools/acpixtract/axutils.c @@ -100,9 +100,9 @@ AxIsEmptyLine ( Buffer++; } - /* If end-of-line, this line is empty */ + /* Line is empty when a Unix or DOS-style line terminator is found. */ - if (*Buffer == '\n') + if ((*Buffer == '\r') || (*Buffer == '\n')) { return (1); } @@ -262,7 +262,7 @@ AxCountTableInstances ( unsigned int Instances = 0; - InputFile = fopen (InputPathname, "rt"); + InputFile = fopen (InputPathname, "r"); if (!InputFile) { printf ("Could not open input file %s\n", InputPathname); diff --git a/tests/aslts/HOW_TO_USE b/tests/aslts/HOW_TO_USE index cb6c236..233fdbb 100644 --- a/tests/aslts/HOW_TO_USE +++ b/tests/aslts/HOW_TO_USE @@ -71,7 +71,7 @@ How to execute the run-time tests and the batch execute option. For example: > cd aslts/tmp/aml - > acpiexec -eMAIN 20090320/nopt/32/arithmetic.aml + > acpiexec -b "Execute MAIN" 20090320/nopt/32/arithmetic.aml 6. When all tests are executed in batch mode (Do 1), the individual test diff --git a/tests/aslts/src/runtime/cntl/runmode.asl b/tests/aslts/src/runtime/cntl/runmode.asl index 2a85c4d..1c84838 100644 --- a/tests/aslts/src/runtime/cntl/runmode.asl +++ b/tests/aslts/src/runtime/cntl/runmode.asl @@ -29,7 +29,7 @@ /* * Run Tests Parameters Technique (RTPT) * - * Tese parameters have effect only when + * These parameters have effect only when * running a group of tests (collections) * such as all Functional tests, all Complex * tests, all Exceptions tests, Full test @@ -37,10 +37,10 @@ * * Main flag: * 0 - run unconditionally all tests - * 1 - run all the tests whit non-zero params - * 2 - run all the tests whit zero params - * 3 - run all the tests whit params equal to RUN1 - * 4 - run one the particular test specified so: + * 1 - run all the tests with non-zero params + * 2 - run all the tests with zero params + * 3 - run all the tests with params equal to RUN1 + * 4 - run a particular test specified by: * RUN2 - index of collection * RUN3 - index of the test inside the collection */ @@ -117,7 +117,7 @@ Method(SRTP, 1) { /* * Set up the particular desirable set of tests to be run * - * Tese parameters have effect only when + * These parameters have effect only when * running a group of test cases or even * collections) such as all Functional tests, * all Complex tests, all Exceptions tests, @@ -128,10 +128,10 @@ Method(SRTP, 1) { * * RUN0 - main flag * 0 - run unconditionally all tests - * 1 - run all the tests whit non-zero params - * 2 - run all the tests whit zero params - * 3 - run all the tests whit params equal to RUN1 - * 4 - run one the particular test specified in this way: + * 1 - run all the tests with non-zero params + * 2 - run all the tests with zero params + * 3 - run all the tests with params equal to RUN1 + * 4 - run a particular test specified by: * RUN2 - index of collection * 1 - functional * 2 - complex @@ -143,7 +143,7 @@ Method(SRTP, 1) { */ Method(RTPI) { -// PARAMETRES OF MODE +// PARAMETERS OF MODE Store(0, RUN0) // main flag Store(0, RUN1) // level @@ -200,8 +200,8 @@ Store(1, W018) // condbranches 0 * ATTENTION: all these variables should be set to 1 eventually * (after all bugs fixing). * - * Lyout of variable name: y - xxx is the number of bug - * 0 - dont run + * Format of variable name: y - xxx is the number of bug + * 0 - do not run * non-zero - run * * ATTENTION: see all the qXXX & rnXX conditions of the particular @@ -275,7 +275,7 @@ Name(y242, 0) // Releasing the mutex the first Acquired on the non-zero level ma Name(y243, 0) // the normal work with mutexes is broken after the mutex Release order violation Name(y248, 0) // Incorrect ReferenceCount on Switch operation Name(y251, 0) // AE_ALREADY_EXISTS on multi-threading on Switch operator -Name(y260, 0) // For a DDBHandle Object ObjectType unexpectedly results in AE_AML_INTERNAL +Name(y260, 0) // AE_AML_TARGET_TYPE on writing NewObj to ArgX [RefOf(OldObj)] instead of RefOf(NewObj) Name(y261, 0) // Crash when DDBHandle parameter of Load is an Indexed Reference Name(y262, 0) // Unexpected AE_STACK_OVERFLOW for a method call expression with nested calls Name(y263, 0) // The sequence of evaluating operands of expression with the named objects is violated @@ -377,7 +377,7 @@ Name(y902, 1) // Expected is that Serialized method being invoked recursively on * All them should be set to non-zero after * clarifying the relevant issue, or provided * with the comment clarifying what is wrong in - * the sub-test - dont remove them even in the + * the sub-test - don't remove them even in the * latter case. */ Name(q001, 1) // Dereference of Store(Index(x,x,Index(x,x)), Index(x,x)) diff --git a/tests/aslts/src/runtime/collections/IMPL/ACPICA/tests/dynobj/TestResult.txt b/tests/aslts/src/runtime/collections/IMPL/ACPICA/tests/dynobj/TestResult.txt deleted file mode 100644 index 4a466c6..0000000 --- a/tests/aslts/src/runtime/collections/IMPL/ACPICA/tests/dynobj/TestResult.txt +++ /dev/null @@ -1,353 +0,0 @@ - -#REM "C:\Documents and Settings\vapodrez\My Documents\acpi\ACPICA\Acpi\libraries\acpiexec.exe" -s "dynobj.aml" - -#REM "C:\Documents and Settings\vapodrez\My Documents\acpi\ACPICA\Acpi\libraries\acpiexec.exe" -bMAIN -s "dynobj.aml" - -#REM "C:\Documents and Settings\vapodrez\My Documents\acpi\ACPICA\Acpi\libraries\acpiexec.exe" -bMAIN "dynobj.aml" - -#REM "C:\Documents and Settings\vapodrez\My Documents\acpi\ACPICA\Acpi\libraries\acpiexecdebug.exe" "dynobj.aml" - -#"C:\Documents and Settings\vapodrez\My Documents\acpi\ACPICA\Acpi\libraries\acpiexec.exe" "dynobj.aml" - -Intel ACPI Component Architecture -AML Execution/Debug Utility version 20060608 [Jun 23 2006] - - tbxface-0193 [22] LoadTables : ACPI Tables successfully acquired -Parsing all Control Methods: -Table [DSDT](id 0007) - 365 Objects with 0 Devices 70 Methods 0 Regions -Parsing all Control Methods: -Table [SSDT](id 0004) - 1 Objects with 0 Devices 1 Methods 0 Regions -Parsing all Control Methods: -Table [SSDT](id 0005) - 1 Objects with 0 Devices 1 Methods 0 Regions -ACPI Namespace successfully loaded at root 00454320 -evgpeblk-1108 [7368] EvCreateGpeBlock : GPE 00 to 3F [_GPE] 8 regs on int 0x0 -evgpeblk-1108 [7368] EvCreateGpeBlock : GPE 60 to 77 [_GPE] 3 regs on int 0x0 -evgpeblk-1208 [7369] EvInitializeGpeBlock : Found 0 Wake, Enabled 0 Runtime GPEs in this block -evgpeblk-1208 [7371] EvInitializeGpeBlock : Found 0 Wake, Enabled 0 Runtime GPEs in this block -Completing Region/Field/Buffer/Package initialization:........... -Initialized 0/0 Regions 0/0 Fields 0/0 Buffers 11/11 Packages (376 nodes) -Initializing Device/Processor/Thermal objects by executing _INI methods: -Executed 0 _INI methods requiring 0 _STA executions (examined 2 objects) -- Executing \MAIN -tbxfroot-0269 [13350] TbFindTable : Found table [DSDT] -[ACPI Debug] String: [0x0B] "64-bit mode" -[ACPI Debug] String: [0x42] "TEST (IMPL), Dynamic Object Deletion implementation dependent test" -[ACPI Debug] String: [0x43] "Check for the Test Command Interface with the ACPICA (_TCI) support" -[ACPI Debug] String: [0x40] "Check that the Memory Consumption Statistics is handled properly" -[ACPI Debug] String: [0x18] "Optimization is tuned on" -[ACPI Debug] String: [0x1C] ":CTST:IMPL:dynobj:DYN0:PASS:" -[ACPI Debug] String: [0x05] "While" -[ACPI Debug] String: [0x24] ":CTST:IMPL:dynobj:dobexec-m370:PASS:" -[ACPI Debug] String: [0x07] "Acquire" -[ACPI Debug] String: [0x03] "Add" -[ACPI Debug] String: [0x03] "And" -[ACPI Debug] String: [0x0B] "Concatenate" -[ACPI Debug] String: [0x16] "ConcatenateResTemplate" -[ACPI Debug] String: [0x0A] "CopyObject" -[ACPI Debug] String: [0x09] "Decrement" -[ACPI Debug] String: [0x07] "DerefOf" -[ACPI Debug] String: [0x05] "Fatal" -[ACPI Debug] String: [0x0E] "FindSetLeftBit" -[ACPI Debug] String: [0x0F] "FindSetRightBit" -[ACPI Debug] String: [0x07] "FromBCD" -[ACPI Debug] String: [0x09] "Increment" -[ACPI Debug] String: [0x05] "Index" -[ACPI Debug] String: [0x04] "LAnd" -[ACPI Debug] String: [0x06] "LEqual" -[ACPI Debug] String: [0x08] "LGreater" -[ACPI Debug] String: [0x05] "LLess" -[ACPI Debug] String: [0x04] "LNot" -[ACPI Debug] String: [0x03] "LOr" -[ACPI Debug] String: [0x05] "Match" -[ACPI Debug] String: [0x03] "Mid" -[ACPI Debug] String: [0x03] "Mod" -[ACPI Debug] String: [0x08] "Multiply" -[ACPI Debug] String: [0x04] "NAnd" -[ACPI Debug] String: [0x03] "NOr" -[ACPI Debug] String: [0x03] "Not" -[ACPI Debug] String: [0x0A] "ObjectType" -[ACPI Debug] String: [0x02] "Or" -[ACPI Debug] String: [0x05] "RefOf" -[ACPI Debug] String: [0x07] "Release" -[ACPI Debug] String: [0x05] "Reset" -[ACPI Debug] String: [0x09] "ShiftLeft" -[ACPI Debug] String: [0x0A] "ShiftRight" -[ACPI Debug] String: [0x06] "Signal" -[ACPI Debug] String: [0x06] "SizeOf" -[ACPI Debug] String: [0x05] "Sleep" -[ACPI Debug] String: [0x05] "Stall" -[ACPI Debug] String: [0x08] "Subtract" -[ACPI Debug] String: [0x05] "ToBCD" -[ACPI Debug] String: [0x08] "ToBuffer" -[ACPI Debug] String: [0x0F] "ToDecimalString" -[ACPI Debug] String: [0x0B] "ToHexString" -[ACPI Debug] String: [0x04] "Wait" -[ACPI Debug] String: [0x03] "XOr" -[ACPI Debug] String: [0x24] ":CTST:IMPL:dynobj:dobexec-m371:PASS:" -[ACPI Debug] String: [0x16] "While, Continue, Break" -[ACPI Debug] String: [0x10] "If, ElseIf, Else" -[ACPI Debug] String: [0x06] "Method" -[ACPI Debug] String: [0x04] "NoOp" -[ACPI Debug] String: [0x23] ":CTST:IMPL:dynobj:dobctl-m372:PASS:" -[ACPI Debug] String: [0x04] "Name" -[ACPI Debug] String: [0x0B] "CreateField" -[ACPI Debug] String: [0x03] "DMA" -[ACPI Debug] String: [0x0F] "DataTableRegion" -tbxfroot-0269 [134191441] TbFindTable : Found table [DSDT] -[ACPI Debug] String: [0x05] "Event" -[ACPI Debug] String: [0x05] "Mutex" -[ACPI Debug] String: [0x24] ":CTST:IMPL:dynobj:dobdecl-m373:PASS:" -ACPI Error (utmath-0239): Divide by zero [20060608] -**** AcpiExec: Exception AE_AML_DIVIDE_BY_ZERO during execution of method [M000] Opcode [Divide] @4 -**** AcpiExec: Exception override, new status AE_OK -Current name M000 and start name _ERR differ -================= M000 <1> <<<< ERRORS! (summary scale 0x200000; cache 0x0, object 0x0) >>>> - All alloc/free : (all, cached, diff) - Point (1) : 925 - 948 == ffffffdd - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : 10 0 0 0 0 1 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 17f 19 641 a 2 (2021) - Correction : 0 0 0 0 0 (0) - Point (1) : 17f 15 63e 5 1 (2008) -Per object type : - All : 0 43a 148 0 66 0 2 0 4b 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (1598) - Declarations : 0 439 147 0 66 0 2 0 4b 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (1588) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) -================= -Current name M000 and start name _ERR differ -================= M000 <2> <<<< ERRORS! (summary scale 0x280000; cache 0x0, object 0x40) >>>> - All alloc/free : (all, cached, diff) - Point (2) : 925 - 948 == ffffffdd - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : 10 0 0 0 0 1 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 17f 19 641 a 2 (2021) - Correction : 0 1 1 0 0 (2) - Point (2) : 17f 14 63e 5 1 (2007) -Per object type : - Point (0) objs : 0 43c 149 0 66 0 2 0 4b 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (1601) - All : 0 43a 148 0 66 0 2 0 4b 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (1598) - Declarations : 0 439 147 0 66 0 2 0 4b 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (1588) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) - At point (0) : 0 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (12) -<<< ERRORS >>> : 0 40 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (summary scale 0x40) -================= -Current name M000 and start name _ERR differ -================= M000 <3> <<<< ERRORS! (summary scale 0x280000; cache 0x0, object 0x40) >>>> - All alloc/free : (all, cached, diff) - Point (3) : 924 - 948 == ffffffdc - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : 10 0 0 0 0 1 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 17f 19 641 a 2 (2021) - Correction : 0 0 1 0 0 (1) - Point (3) : 17f 13 63e 5 1 (2006) -Per object type : - Point (0) objs : 0 43c 149 0 66 0 2 0 4b 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (1601) - All : 0 43a 148 0 66 0 2 0 4b 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (1598) - Declarations : 0 439 147 0 66 0 2 0 4b 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (1588) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) - At point (0) : 0 2 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (12) -<<< ERRORS >>> : 0 40 40 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (summary scale 0x40) - IncrMemAllocs : -4 -IncrMemAllocsCh : 0 -================= -Current name M374 and start name M000 differ -================= M374 <1> <<<< ERRORS! (summary scale 0x200000; cache 0x0, object 0x0) >>>> - All alloc/free : (all, cached, diff) - Point (1) : 87f - 8a7 == ffffffd8 - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : a0 0 0 0 0 1 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 17f 13 63f 5 1 (2007) - Correction : 0 0 0 0 0 (0) - Point (1) : 17c f 547 3 1 (1750) -Per object type : - All : 0 349 146 0 63 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (1351) - Declarations : 0 348 145 0 63 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (1341) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) -================= -Current name M374 and start name M000 differ -================= M374 <2> <<<< ERRORS! (summary scale 0x200000; cache 0x0, object 0x0) >>>> - All alloc/free : (all, cached, diff) - Point (2) : 87e - 8a6 == ffffffd8 - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : a0 0 0 0 0 1 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 17f 13 63f 5 1 (2007) - Correction : 0 1 1 0 0 (2) - Point (2) : 17c e 547 3 1 (1749) -Per object type : - All : 0 349 146 0 63 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (1351) - Declarations : 0 348 145 0 63 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (1341) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) -================= -Current name M374 and start name M000 differ -================= M374 <3> <<<< ERRORS! (summary scale 0x200000; cache 0x0, object 0x0) >>>> - All alloc/free : (all, cached, diff) - Point (3) : 87c - 8a5 == ffffffd7 - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : a0 0 0 0 0 1 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 17f 13 63f 5 1 (2007) - Correction : 0 0 1 0 0 (1) - Point (3) : 17c d 547 3 1 (1748) -Per object type : - All : 0 349 146 0 63 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (1351) - Declarations : 0 348 145 0 63 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (1341) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) - IncrMemAllocs : -298 -IncrMemAllocsCh : -294 -================= -Current name DYN0 and start name M374 differ -================= DYN0 <1> <<<< ERRORS! (summary scale 0x200000; cache 0x0, object 0x0) >>>> - All alloc/free : (all, cached, diff) - Point (1) : 6e6 - 713 == ffffffd3 - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : a0 0 1 0 0 0 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 17c d 547 3 1 (1748) - Correction : 0 0 0 0 0 (0) - Point (1) : 179 a 3b8 1 1 (1341) -Per object type : - All : 0 1bf 145 0 5f 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (952) - Declarations : 0 1be 144 0 5f 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (942) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) -================= -Current name DYN0 and start name M374 differ -================= DYN0 <2> <<<< ERRORS! (summary scale 0x200000; cache 0x0, object 0x0) >>>> - All alloc/free : (all, cached, diff) - Point (2) : 6e4 - 711 == ffffffd3 - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : a0 0 1 0 0 0 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 17c d 547 3 1 (1748) - Correction : 0 2 0 0 0 (2) - Point (2) : 179 9 3b7 1 1 (1339) -Per object type : - All : 0 1be 145 0 5f 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (951) - Declarations : 0 1bd 144 0 5f 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (941) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) -================= -Current name DYN0 and start name M374 differ -================= DYN0 <3> <<<< ERRORS! (summary scale 0x200000; cache 0x0, object 0x0) >>>> - All alloc/free : (all, cached, diff) - Point (3) : 6e1 - 70f == ffffffd2 - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : a0 0 1 0 0 0 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 17c d 547 3 1 (1748) - Correction : 0 0 0 0 0 (0) - Point (3) : 179 7 3b7 1 1 (1337) -Per object type : - All : 0 1be 145 0 5f 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (951) - Declarations : 0 1bd 144 0 5f 0 2 0 4a 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (941) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) - IncrMemAllocs : -411 -IncrMemAllocsCh : -406 -================= -[ACPI Debug] String: [0x2A] ":CTST:IMPL:dynobj:dobexceptions-m374:PASS:" -[ACPI Debug] String: [0x29] "Run time (in seconds): 0x00000000000001C6" -[ACPI Debug] String: [0x38] "The total number of exceptions handled: 0000000000000001" -[ACPI Debug] String: [0x29] "========= ROOT METHODS SUMMARY (max 600):" -[ACPI Debug] String: [0x1C] ":STST:IMPL:dynobj:DYN0:PASS:" -[ACPI Debug] String: [0x24] ":STST:IMPL:dynobj:dobexec-m370:PASS:" -[ACPI Debug] String: [0x24] ":STST:IMPL:dynobj:dobexec-m371:PASS:" -[ACPI Debug] String: [0x23] ":STST:IMPL:dynobj:dobctl-m372:PASS:" -[ACPI Debug] String: [0x24] ":STST:IMPL:dynobj:dobdecl-m373:PASS:" -[ACPI Debug] String: [0x2A] ":STST:IMPL:dynobj:dobexceptions-m374:PASS:" -[ACPI Debug] String: [0x0E] "========= END." -[ACPI Debug] String: [0x1A] "TEST ACPICA: 64-bit : PASS" -Current name MAIN and start name DYN0 differ -================= MAIN <1> <<<< ERRORS! (summary scale 0x200000; cache 0x0, object 0x0) >>>> - All alloc/free : (all, cached, diff) - Point (1) : 6df - 70c == ffffffd3 - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : a0 0 1 0 0 0 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 179 7 3b2 1 1 (1332) - Correction : 0 0 0 0 0 (0) - Point (1) : 178 4 3b8 0 1 (1333) -Per object type : - All : 0 1bf 146 0 5f 0 2 0 49 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (952) - Declarations : 0 1be 145 0 5f 0 2 0 49 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (942) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) -================= -Current name MAIN and start name DYN0 differ -================= MAIN <2> <<<< ERRORS! (summary scale 0x200000; cache 0x0, object 0x0) >>>> - All alloc/free : (all, cached, diff) - Point (2) : 6de - 70b == ffffffd3 - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : a0 0 1 0 6 0 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 179 7 3b2 1 1 (1332) - Correction : 0 2 6 0 0 (8) - Point (2) : 178 3 3b8 0 1 (1332) -Per object type : - All : 0 1bf 146 0 5f 0 2 0 49 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (952) - Declarations : 0 1be 145 0 5f 0 2 0 49 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (942) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) -================= -Current name MAIN and start name DYN0 differ -================= MAIN <3> <<<< ERRORS! (summary scale 0x200000; cache 0x0, object 0x0) >>>> - All alloc/free : (all, cached, diff) - Point (3) : 6db - 709 == ffffffd2 - Scope info : (AmlOpcodeOfScope, ArgReferencesCount, ReturnValue, ReturnUsed; decl, arg, ret) - : a0 0 1 0 6 0 0 - Per cache list : (state, operand, psnode, psnode_ext) - Point (0) : 179 7 3b2 1 1 (1332) - Correction : 0 0 6 0 0 (6) - Point (3) : 178 1 3b8 0 1 (1330) -Per object type : - All : 0 1bf 146 0 5f 0 2 0 49 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (952) - Declarations : 0 1be 145 0 5f 0 2 0 49 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (942) - Arguments : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Return : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (0) - Result current : 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 7 0 0 0 0 0 (10) - IncrMemAllocs : -4 -IncrMemAllocsCh : -3 -================= -Outstanding: 0x6 allocations after execution -Execution of \MAIN returned object 00326E68 Buflen 10 - [Integer] = 0000000000000000 -- ACPI (uttrack-0703): No outstanding allocations [20060608] -utdebugstat-0203 [136606830] "UtCloseStat" : Memory Consumption errors encountered! -ERRORS SUMMARY: ErrorScale 0xe00000; Sum 0x280000, CSum 0x0, OSum 0x40, Failed executions of methods number 12 -Memory Consumption failed executions of methods summary: -M000: Point 1, Errors: Sum 0x200000, CSum 0x0, OSum 0x0 -M000: Point 2, Errors: Sum 0x280000, CSum 0x0, OSum 0x40 -M000: Point 3, Errors: Sum 0x280000, CSum 0x0, OSum 0x40 -M374: Point 1, Errors: Sum 0x200000, CSum 0x0, OSum 0x0 -M374: Point 2, Errors: Sum 0x200000, CSum 0x0, OSum 0x0 -M374: Point 3, Errors: Sum 0x200000, CSum 0x0, OSum 0x0 -DYN0: Point 1, Errors: Sum 0x200000, CSum 0x0, OSum 0x0 -DYN0: Point 2, Errors: Sum 0x200000, CSum 0x0, OSum 0x0 -DYN0: Point 3, Errors: Sum 0x200000, CSum 0x0, OSum 0x0 -MAIN: Point 1, Errors: Sum 0x200000, CSum 0x0, OSum 0x0 -MAIN: Point 2, Errors: Sum 0x200000, CSum 0x0, OSum 0x0 -MAIN: Point 3, Errors: Sum 0x200000, CSum 0x0, OSum 0x0 -ERROR: allocated memory total 0xb4b649 (times), freed total 0xb4b647 (times) - Uncounted are 0xb4b649 - (0xb4b647 + 4) == 0xfffffffe allocations \ No newline at end of file diff --git a/tests/aslts/src/runtime/collections/IMPL/ACPICA/tests/dynobj/state_of_all_testst.txt b/tests/aslts/src/runtime/collections/IMPL/ACPICA/tests/dynobj/state_of_all_testst.txt deleted file mode 100644 index fcdec00..0000000 --- a/tests/aslts/src/runtime/collections/IMPL/ACPICA/tests/dynobj/state_of_all_testst.txt +++ /dev/null @@ -1,50 +0,0 @@ -Describe here how all other tests of ASLTS go with ML consumption engine. - -1. - -arithmetic - ok -constant - ok -descriptor - ok -logic - ok -region - ok -synchronization - ok -==================== all them result in something like these: -ACPI (uttrack-0703): No outstanding allocations [20060707] -utdebugstat-0194 [1858285] "UtCloseStat" : Memory Consumption errors encountered! -ERRORS SUMMARY: ErrorScale 0x800000; Sum 0x0, CSum 0x0, OSum 0x0, Failed executions of methods number 0 -ERROR: allocated memory total 0x2488f (times), freed total 0x2488d (times) - Uncounted are 0x2488f - (0x2488d + 4) == 0xfffffffe allocations -==================== - -2. - -bfield - Point 2, Errors: Sum 0x100000, CSum 0x80, OSum 0x0 - -Fixed by this: -============== -ACPI_STATUS -AcpiDsExecBeginOp ( - ACPI_WALK_STATE *WalkState, - ACPI_PARSE_OBJECT **OutOp) -{ - case AML_CLASS_EXECUTE: - case AML_CLASS_CREATE: - /* - * Most operators with arguments. - * Start a new result/operand state - */ - if (WalkState->OpInfo->ObjectType != ACPI_TYPE_BUFFER_FIELD) - { - Status = AcpiDsResultStackPush (WalkState); - } - break; -} - - -control - Errors: Sum 0x280000, CSum 0x0, OSum 0x40 -manipulation - Sum 0x280000, CSum 0x0, OSum 0x40; Errors: Sum 0x100000, CSum 0x80, OSum 0x0 -name - Errors: Sum 0x80000, CSum 0x0, OSum 0x60 -reference - Sum 0x280000, CSum 0x0, OSum 0x70 - - - diff --git a/tests/aslts/src/runtime/collections/Identity2MS/abbu/initial/ns_in50.asl b/tests/aslts/src/runtime/collections/Identity2MS/abbu/initial/ns_in50.asl index b837867..c8854b5 100644 --- a/tests/aslts/src/runtime/collections/Identity2MS/abbu/initial/ns_in50.asl +++ b/tests/aslts/src/runtime/collections/Identity2MS/abbu/initial/ns_in50.asl @@ -73,40 +73,40 @@ Name(z168, 168) */ Method(in50,, Serialized) { - Name(ts, "in50") + Name(ts, "in50") - Store(0xabcd0000, Local0) - Store(2, Local1) + Store(0xabcd0000, Local0) + Store(2, Local1) - Add (Local0, Local1, Local2) - Decrement (Local0) - Increment (Local0) - Divide (Local0, Local1, Local2, Local3) - ShiftLeft (Local0, Local1, Local2) - Multiply (Local0, Local1, Local2) - Store (Local0, Local2) - Or (Local0, Local1, Local2) - ShiftRight (Local0, Local1, Local2) - Subtract (Local0, Local1, Local2) - And (Local0, Local1, Local2) - if (chk0) { - Mod (Local0, Local1, Local2) - } - FindSetLeftBit (Local0, Local2) - FindSetRightBit (Local0, Local2) - XOr (Local0, Local1, Local2) - NAnd (Local0, Local1, Local2) - NOr (Local0, Local1, Local2) - Not (Local0, Local2) - Store(LNot (Local0), Local4) - Store(LOr (Local0, Local1), Local4) - Store(LAnd (Local0, Local1), Local4) - Store(LEqual (Local0, Local1), Local4) - Store(LGreater (Local0, Local1), Local4) - Store(LGreaterEqual (Local0, Local1), Local4) - Store(LLess (Local0, Local1), Local4) - Store(LLessEqual (Local0, Local1), Local4) - Store(LNotEqual (Local0, Local1), Local4) + Add (Local0, Local1, Local2) + Decrement (Local0) + Increment (Local0) + Divide (Local0, Local1, Local2, Local3) + ShiftLeft (Local0, Local1, Local2) + Multiply (Local0, Local1, Local2) + Store (Local0, Local2) + Or (Local0, Local1, Local2) + ShiftRight (Local0, Local1, Local2) + Subtract (Local0, Local1, Local2) + And (Local0, Local1, Local2) + if (chk0) { + Mod (Local0, Local1, Local2) + } + FindSetLeftBit (Local0, Local2) + FindSetRightBit (Local0, Local2) + XOr (Local0, Local1, Local2) + NAnd (Local0, Local1, Local2) + NOr (Local0, Local1, Local2) + Not (Local0, Local2) + Store(LNot (Local0), Local4) + Store(LOr (Local0, Local1), Local4) + Store(LAnd (Local0, Local1), Local4) + Store(LEqual (Local0, Local1), Local4) + Store(LGreater (Local0, Local1), Local4) + Store(LGreaterEqual (Local0, Local1), Local4) + Store(LLess (Local0, Local1), Local4) + Store(LLessEqual (Local0, Local1), Local4) + Store(LNotEqual (Local0, Local1), Local4) } /* @@ -149,502 +149,516 @@ Name(ii47, 0xabcd0047) */ Method(in51, 7, Serialized) { - Name(ts, "in51") + Name(ts, "in51") - Name(i000, 0x00010000) - Name(i001, 0x0a510010) - Name(i002, 0x15210800) - Name(i003, 0xfeabc8d9) - Name(i004, 0x1234bcde) - Name(i005, 0xfe04bcde) - Name(i006, 0x12345678) - Name(i007, 0x01000000) - Name(i008, 0x60f5c7a2) + Name(i000, 0x00010000) + Name(i001, 0x0a510010) + Name(i002, 0x15210800) + Name(i003, 0xfeabc8d9) + Name(i004, 0x1234bcde) + Name(i005, 0xfe04bcde) + Name(i006, 0x12345678) + Name(i007, 0x01000000) + Name(i008, 0x60f5c7a2) - Name(ii00, 0xabcd0000) - Name(ii01, 0xabcd0001) - Name(ii02, 0xabcd0002) - Name(ii03, 0xabcd0003) - Name(ii04, 0xabcd0004) - Name(ii05, 0xabcd0005) - Name(ii06, 0xabcd0006) - Name(ii07, 0xabcd0007) - Name(ii08, 0xabcd0008) - Name(ii09, 0xabcd0009) - Name(ii0a, 0xabcd000a) - Name(ii0b, 0xabcd000b) - Name(ii0c, 0xabcd000c) - Name(ii0d, 0xabcd000d) - Name(ii0e, 0xabcd000e) - Name(ii0f, 0xabcd000f) - Name(ii10, 0xabcd0010) - Name(ii11, 0xabcd0011) - Name(ii12, 0xabcd0012) - Name(ii13, 0xabcd0013) - Name(ii14, 0xabcd0014) - Name(ii15, 0xabcd0015) - Name(ii16, 0xabcd0016) - Name(ii17, 0xabcd0017) - Name(ii18, 0xabcd0018) - Name(ii19, 0xabcd0019) - Name(ii1a, 0xabcd001a) - Name(ii1b, 0xabcd001b) - Name(ii1c, 0xabcd001c) - Name(ii1d, 0xabcd001d) - Name(ii1e, 0xabcd001e) - Name(ii1f, 0xabcd001f) - Name(ii20, 0xabcd0020) - Name(ii21, 0xabcd0021) - Name(ii22, 0xabcd0022) - Name(ii23, 0xabcd0023) - Name(ii24, 0xabcd0024) - Name(ii25, 0xabcd0025) - Name(ii26, 0xabcd0026) - Name(ii27, 0xabcd0027) - Name(ii28, 0xabcd0028) - Name(ii29, 0xabcd0029) - Name(ii2a, 0xabcd002a) - Name(ii2b, 0xabcd002b) - Name(ii2c, 0xabcd002c) - Name(ii2d, 0xabcd002d) - Name(ii2e, 0xabcd002e) - Name(ii2f, 0xabcd002f) - Name(ii30, 0xabcd0030) + Name(ii00, 0xabcd0000) + Name(ii01, 0xabcd0001) + Name(ii02, 0xabcd0002) + Name(ii03, 0xabcd0003) + Name(ii04, 0xabcd0004) + Name(ii05, 0xabcd0005) + Name(ii06, 0xabcd0006) + Name(ii07, 0xabcd0007) + Name(ii08, 0xabcd0008) + Name(ii09, 0xabcd0009) + Name(ii0a, 0xabcd000a) + Name(ii0b, 0xabcd000b) + Name(ii0c, 0xabcd000c) + Name(ii0d, 0xabcd000d) + Name(ii0e, 0xabcd000e) + Name(ii0f, 0xabcd000f) + Name(ii10, 0xabcd0010) + Name(ii11, 0xabcd0011) + Name(ii12, 0xabcd0012) + Name(ii13, 0xabcd0013) + Name(ii14, 0xabcd0014) + Name(ii15, 0xabcd0015) + Name(ii16, 0xabcd0016) + Name(ii17, 0xabcd0017) + Name(ii18, 0xabcd0018) + Name(ii19, 0xabcd0019) + Name(ii1a, 0xabcd001a) + Name(ii1b, 0xabcd001b) + Name(ii1c, 0xabcd001c) + Name(ii1d, 0xabcd001d) + Name(ii1e, 0xabcd001e) + Name(ii1f, 0xabcd001f) + Name(ii20, 0xabcd0020) + Name(ii21, 0xabcd0021) + Name(ii22, 0xabcd0022) + Name(ii23, 0xabcd0023) + Name(ii24, 0xabcd0024) + Name(ii25, 0xabcd0025) + Name(ii26, 0xabcd0026) + Name(ii27, 0xabcd0027) + Name(ii28, 0xabcd0028) + Name(ii29, 0xabcd0029) + Name(ii2a, 0xabcd002a) + Name(ii2b, 0xabcd002b) + Name(ii2c, 0xabcd002c) + Name(ii2d, 0xabcd002d) + Name(ii2e, 0xabcd002e) + Name(ii2f, 0xabcd002f) + Name(ii30, 0xabcd0030) /* - Name(ii31, 0xabcd0031) - Name(ii32, 0xabcd0032) - Name(ii33, 0xabcd0033) - Name(ii34, 0xabcd0034) - Name(ii35, 0xabcd0035) - Name(ii36, 0xabcd0036) - Name(ii37, 0xabcd0037) - Name(ii38, 0xabcd0038) - Name(ii39, 0xabcd0039) - Name(ii3a, 0xabcd003a) - Name(ii3b, 0xabcd003b) - Name(ii3c, 0xabcd003c) - Name(ii3d, 0xabcd003d) - Name(ii3e, 0xabcd003e) - Name(ii3f, 0xabcd003f) - Name(ii40, 0xabcd0040) - Name(ii41, 0xabcd0041) - Name(ii42, 0xabcd0042) - Name(ii43, 0xabcd0043) - Name(ii44, 0xabcd0044) - Name(ii45, 0xabcd0045) - Name(ii46, 0xabcd0046) - Name(ii47, 0xabcd0047) + Name(ii31, 0xabcd0031) + Name(ii32, 0xabcd0032) + Name(ii33, 0xabcd0033) + Name(ii34, 0xabcd0034) + Name(ii35, 0xabcd0035) + Name(ii36, 0xabcd0036) + Name(ii37, 0xabcd0037) + Name(ii38, 0xabcd0038) + Name(ii39, 0xabcd0039) + Name(ii3a, 0xabcd003a) + Name(ii3b, 0xabcd003b) + Name(ii3c, 0xabcd003c) + Name(ii3d, 0xabcd003d) + Name(ii3e, 0xabcd003e) + Name(ii3f, 0xabcd003f) + Name(ii40, 0xabcd0040) + Name(ii41, 0xabcd0041) + Name(ii42, 0xabcd0042) + Name(ii43, 0xabcd0043) + Name(ii44, 0xabcd0044) + Name(ii45, 0xabcd0045) + Name(ii46, 0xabcd0046) + Name(ii47, 0xabcd0047) */ - Add( - Add( - Add( - Add( - Add( - Add( - Add( - Add( - Add( - Subtract( - Or( - And( - Store( - Multiply( - ShiftLeft( - Divide( - Add( - Add( - Add(Add(Increment(i000), Increment(i000), i000), - Add(Increment(i000), Increment(i000), i000), Local0), - Add(Add(Decrement(i000), Decrement(i000), i000), - Add(Decrement(i000), Decrement(i000), i000), Local1), - arg0), - Add(Add(Increment(i000), Decrement(i000), i000), - Add(Increment(i000), Decrement(i000), i000), Local2), arg1), - 17, // Divide - ii00, Local3 // Divide - ), // ShiftLeft - 3, // ShiftLeft - ii01), // ShiftLeft - 2, // Multiply - i000), // Multiply - arg2), // Store - 0xffffffff, // And - ii0c), // And - 0x20000000, // Or - ii0d), // Or + Add( + Add( + Add( + Add( + Add( + Add( + Add( + Add( + Add( + Subtract( + Or( + And( + //Store( + Multiply( + ShiftLeft( + Divide( + Add( + Add( + Add( + Add( + Increment(i000), + Increment(i000), + i000), + Add( + Increment(i000), + Increment(i000), + i000), + Local0), + Add( + Add( + Decrement(i000), + Decrement(i000), + i000), + Add( + Decrement(i000), + Decrement(i000), + i000), + Local1), + arg0), + Add( + Add( + Increment(i000), + Decrement(i000), + i000), + Add( + Increment(i000), + Decrement(i000), + i000), + Local2), + arg1), + 17, // Divide + ii00, + Local3), // Divide + 3, // ShiftLeft + ii01), // ShiftLeft + 2, // Multiply + i000), // Multiply + //arg2), // Store + 0xffffffff, // And + ii0c), // And + 0x20000000, // Or + ii0d), // Or - // Subtract + Multiply( + And( + Add( + Add( + Add( + XOr( + Add( + Add( + Add( + //Store( + And( + ShiftRight( + Or( + i001, + 0x15210800, + Local5), + 3, // ShiftRight + ii02), // ShiftRight + 0x035E2102, // And + Local6), // And + //Local6), // Store + //Add(0, 7, ii03), // OLD + Add(ii0d, 7, ii03), // NEW + ii04), // Add + FindSetLeftBit(0x7bcd0000, ii05), + arg3), // Add + FindSetRightBit(0x7bcd0000, ii06), + arg4), // Add + 0x11b4937f, // XOr + arg5), // XOr + NAnd(i003, 0xffffffff, ii07), + arg6), // Add + NOr(i004, 0xf8f0f0f0, ii08), + Local7), // Add + Not(i005, ii09), + ii0a), // Add + 0xffffffff, // And + ii0b), // And + And(Store(LNot(Store(LNot(ii0b), ii0e)), ii0f), 0x01)), // Multiply + Local4), // Subtract + Store(LNot(Store(LNot(i006), ii11)), ii12), + ii10), // Add + Store(LOr(LNot(And(Store(LOr(i007, 0), ii14), 0x01)), 0), ii15), + ii13), // Add + Store(LAnd(LNot(And(Store(LAnd(i007, 1), ii16), 0x01)), 0), ii17), + ii18), // Add + Add( + Store(LEqual(i008, 0x60f5c7a2), ii19), + Store(LEqual(i008, 0x60f5c7a0), ii1a), ii1b), + ii1c), // Add + Add( + Add( + Store(LGreater(i008, 0x60f5c7a2), ii1d), + Store(LGreater(i008, 0x60f5c7a3), ii1e), ii1f), + Add( + Store(LGreater(i008, 0x60f5c7a1), ii20), + Store(LGreater(i008, 0x60f5c7a0), ii21), ii22), + ii23), + ii24), // Add + Add( + Add( + Store(LGreaterEqual(i008, 0x60f5c7a2), ii25), + Store(LGreaterEqual(i008, 0x60f5c7a3), ii26), ii27), + Add( + Store(LGreaterEqual(i008, 0x60f5c7a1), ii28), + Store(LGreaterEqual(i008, 0x60f5c7a0), ii29), ii2a), + ii2b), + ii2c), // Add + Add( + Add( + Store(LLess(i008, 0x60f5c7a2), ii2d), + Store(LLess(i008, 0x60f5c7a3), ii2e), ii2f), + Add( + Store(LLess(i008, 0x60f5c7a1), ii30), + Store(LLess(i008, 0x60f5c7a0), ii31), ii32), + ii33), + ii34), // Add + Add( + Add( + Store(LLessEqual(i008, 0x60f5c7a2), ii35), + Store(LLessEqual(i008, 0x60f5c7a3), ii36), ii37), + Add( + Store(LLessEqual(i008, 0x60f5c7a1), ii38), + Store(LLessEqual(i008, 0x60f5c7a0), ii39), ii3a), + ii3b), + ii3c), // Add + Add( + Add( + Store(LNotEqual(i008, 0x60f5c7a2), ii3d), + Store(LNotEqual(i008, 0x60f5c7a3), ii3e), ii3f), + Add( + Store(LNotEqual(i008, 0x60f5c7a1), ii40), + Store(LNotEqual(i008, 0x60f5c7a0), ii41), ii42), + ii43), + ii44) // Add - Multiply( - And( - Add( - Add( - Add( - XOr( - Add( - Add( - Add( - Store( - And( - ShiftRight( - Or(i001, 0x15210800, Local5), - 3, // ShiftRight - ii02), // ShiftRight - 0x035E2102, // And - i000), // And - Local6), // Store - // Add - Add(0, 7, ii03), - ii04), // Add - FindSetLeftBit(0x7bcd0000, ii05), - arg3), // Add - FindSetRightBit(0x7bcd0000, ii06), - arg4), // Add - 0x11b4937f, // XOr - arg5), // XOr - NAnd(i003, 0xffffffff, ii07), - arg6), // Add - NOr(i004, 0xf8f0f0f0, ii08), - Local7), // Add - Not(i005, ii09), - ii0a), // Add - 0xffffffff, // And - ii0b), // And - And(Store(LNot(Store(LNot(ii0b), ii0e)), ii0f), 0x01) - ), // Multiply - Local4), // Subtract - - // Add - Store(LNot(Store(LNot(i006), ii11)), ii12), - ii10), // Add - // Add - Store(LOr(LNot(And(Store(LOr(i007, 0), ii14), 0x01)), 0), ii15), - ii13), // Add - // Add - Store(LAnd(LNot(And(Store(LAnd(i007, 1), ii16), 0x01)), 0), ii17), - ii18), // Add - // Add - Add( - Store(LEqual(i008, 0x60f5c7a2), ii19), - Store(LEqual(i008, 0x60f5c7a0), ii1a), ii1b), - ii1c), // Add - // Add - Add( - Add( - Store(LGreater(i008, 0x60f5c7a2), ii1d), - Store(LGreater(i008, 0x60f5c7a3), ii1e), ii1f), - Add( - Store(LGreater(i008, 0x60f5c7a1), ii20), - Store(LGreater(i008, 0x60f5c7a0), ii21), ii22), - ii23), - ii24), // Add - // Add - Add( - Add( - Store(LGreaterEqual(i008, 0x60f5c7a2), ii25), - Store(LGreaterEqual(i008, 0x60f5c7a3), ii26), ii27), - Add( - Store(LGreaterEqual(i008, 0x60f5c7a1), ii28), - Store(LGreaterEqual(i008, 0x60f5c7a0), ii29), ii2a), - ii2b), - ii2c), // Add - // Add - Add( - Add( - Store(LLess(i008, 0x60f5c7a2), ii2d), - Store(LLess(i008, 0x60f5c7a3), ii2e), ii2f), - Add( - Store(LLess(i008, 0x60f5c7a1), ii30), - Store(LLess(i008, 0x60f5c7a0), ii31), ii32), - ii33), - ii34), // Add - // Add - Add( - Add( - Store(LLessEqual(i008, 0x60f5c7a2), ii35), - Store(LLessEqual(i008, 0x60f5c7a3), ii36), ii37), - Add( - Store(LLessEqual(i008, 0x60f5c7a1), ii38), - Store(LLessEqual(i008, 0x60f5c7a0), ii39), ii3a), - ii3b), - ii3c), // Add - // Add - Add( - Add( - Store(LNotEqual(i008, 0x60f5c7a2), ii3d), - Store(LNotEqual(i008, 0x60f5c7a3), ii3e), ii3f), - Add( - Store(LNotEqual(i008, 0x60f5c7a1), ii40), - Store(LNotEqual(i008, 0x60f5c7a0), ii41), ii42), - ii43), - ii44) // Add - - - if (LNotEqual(Local0, 0x0006000C)) { - err(ts, z168, 0x000, 0, 0, Local0, 0x0006000C) - } - if (LNotEqual(Local1, 0x0018002A)) { - err(ts, z168, 0x001, 0, 0, Local1, 0x0018002A) - } - if (LNotEqual(Local2, 0x006000A6)) { - err(ts, z168, 0x002, 0, 0, Local2, 0x006000A6) - } - if (LNotEqual(arg0, 0x001E0036)) { - err(ts, z168, 0x003, 0, 0, arg0, 0x001E0036) - } - if (LNotEqual(arg1, 0x007E00DC)) { - err(ts, z168, 0x004, 0, 0, arg1, 0x007E00DC) - } - if (LNotEqual(ii00, 0x00000006)) { - err(ts, z168, 0x005, 0, 0, ii00, 0x00000006) - } - if (LNotEqual(Local3, 0x00076976)) { - err(ts, z168, 0x006, 0, 0, Local3, 0x00076976) - } - if (LNotEqual(ii01, 0x003B4BB0)) { - err(ts, z168, 0x007, 0, 0, ii01, 0x003B4BB0) - } - if (LNotEqual(arg2, 0x00769760)) { - err(ts, z168, 0x008, 0, 0, arg2, 0x00769760) - } - if (LNotEqual(Local5, 0x1F710810)) { - err(ts, z168, 0x009, 0, 0, Local5, 0x1F710810) - } - if (LNotEqual(ii02, 0x03EE2102)) { - err(ts, z168, 0x00a, 0, 0, ii02, 0x03EE2102) - } - if (LNotEqual(Local6, 0x034E2102)) { - err(ts, z168, 0x00b, 0, 0, Local6, 0x034E2102) - } - if (LNotEqual(ii03, 0x00000007)) { - err(ts, z168, 0x00c, 0, 0, ii03, 0x00000007) - } - if (LNotEqual(ii04, 0x034E2109)) { - err(ts, z168, 0x00d, 0, 0, ii04, 0x034E2109) - } - if (LNotEqual(ii05, 0x0000001F)) { - err(ts, z168, 0x00e, 0, 0, ii05, 0x0000001F) - } - if (LNotEqual(arg3, 0x034E2128)) { - err(ts, z168, 0x00f, 0, 0, arg3, 0x034E2128) - } - if (LNotEqual(ii06, 0x00000011)) { - err(ts, z168, 0x010, 0, 0, ii06, 0x00000011) - } - if (LNotEqual(arg4, 0x034E2139)) { - err(ts, z168, 0x011, 0, 0, arg4, 0x034E2139) - } - if (LNotEqual(arg5, 0x12FAB246)) { - err(ts, z168, 0x012, 0, 0, arg5, 0x12FAB246) - } - if (LNotEqual(ii07, 0xFFFFFFFF01543726)) { - err(ts, z168, 0x013, 0, 0, ii07, 0xFFFFFFFF01543726) - } - if (LNotEqual(arg6, 0xFFFFFFFF144EE96C)) { - err(ts, z168, 0x014, 0, 0, arg6, 0xFFFFFFFF144EE96C) - } - if (LNotEqual(ii08, 0xFFFFFFFF050B0301)) { - err(ts, z168, 0x015, 0, 0, ii08, 0xFFFFFFFF050B0301) - } - if (LNotEqual(Local7, 0xFFFFFFFE1959EC6D)) { - err(ts, z168, 0x016, 0, 0, Local7, 0xFFFFFFFE1959EC6D) - } - if (LNotEqual(ii09, 0xFFFFFFFF01FB4321)) { - err(ts, z168, 0x017, 0, 0, ii09, 0xFFFFFFFF01FB4321) - } - if (LNotEqual(ii0a, 0xFFFFFFFD1B552F8E)) { - err(ts, z168, 0x018, 0, 0, ii0a, 0xFFFFFFFD1B552F8E) - } - if (LNotEqual(ii0b, 0x1B552F8E)) { - err(ts, z168, 0x019, 0, 0, ii0b, 0x1B552F8E) - } - if (LNotEqual(ii0c, 0x00769760)) { - err(ts, z168, 0x01a, 0, 0, ii0c, 0x00769760) - } - if (LNotEqual(ii0d, 0x20769760)) { - err(ts, z168, 0x01b, 0, 0, ii0d, 0x20769760) - } - if (LNotEqual(ii0e, 0)) { - err(ts, z168, 0x01c, 0, 0, ii0e, 0) - } - if (LNotEqual(ii0f, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x01d, 0, 0, ii0f, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(Local4, 0x052167D2)) { - err(ts, z168, 0x01e, 0, 0, Local4, 0x052167D2) - } - if (LNotEqual(ii10, 0x052167D1)) { - err(ts, z168, 0x01f, 0, 0, ii10, 0x052167D1) - } - if (LNotEqual(ii11, 0)) { - err(ts, z168, 0x020, 0, 0, ii11, 0) - } - if (LNotEqual(ii12, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x021, 0, 0, ii12, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii13, 0x00000000052167D1)) { - err(ts, z168, 0x022, 0, 0, ii13, 0x00000000052167D1) - } - if (LNotEqual(ii14, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x023, 0, 0, ii14, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii15, 0)) { - err(ts, z168, 0x024, 0, 0, ii15, 0) - } - if (LNotEqual(ii16, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x025, 0, 0, ii16, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii17, 0)) { - err(ts, z168, 0x026, 0, 0, ii17, 0) - } - if (LNotEqual(ii18, 0x052167D1)) { - err(ts, z168, 0x027, 0, 0, ii18, 0x052167D1) - } - if (LNotEqual(ii19, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x028, 0, 0, ii19, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii1a, 0)) { - err(ts, z168, 0x029, 0, 0, ii1a, 0) - } - if (LNotEqual(ii1b, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x02a, 0, 0, ii1c, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii1c, 0x052167D0)) { - err(ts, z168, 0x02b, 0, 0, ii1d, 0x052167D0) - } - if (LNotEqual(ii1d, 0)) { - err(ts, z168, 0x02c, 0, 0, ii1d, 0) - } - if (LNotEqual(ii1e, 0)) { - err(ts, z168, 0x02d, 0, 0, ii1e, 0) - } - if (LNotEqual(ii1f, 0)) { - err(ts, z168, 0x02e, 0, 0, ii1f, 0) - } - if (LNotEqual(ii20, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x02f, 0, 0, ii20, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii21, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x30, 0, 0, ii21, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii22, 0xFFFFFFFFFFFFFFFE)) { - err(ts, z168, 0x031, 0, 0, ii22, 0xFFFFFFFFFFFFFFFE) - } - if (LNotEqual(ii23, 0xFFFFFFFFFFFFFFFE)) { - err(ts, z168, 0x032, 0, 0, ii23, 0xFFFFFFFFFFFFFFFE) - } - if (LNotEqual(ii24, 0x052167CE)) { - err(ts, z168, 0x033, 0, 0, ii24, 0x052167CE) - } - if (LNotEqual(ii25, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x034, 0, 0, ii25, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii26, 0)) { - err(ts, z168, 0x035, 0, 0, ii26, 0) - } - if (LNotEqual(ii27, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x036, 0, 0, ii27, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii28, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x037, 0, 0, ii28, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii29, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x038, 0, 0, ii29, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii2a, 0xFFFFFFFFFFFFFFFE)) { - err(ts, z168, 0x039, 0, 0, ii2a, 0xFFFFFFFFFFFFFFFE) - } - if (LNotEqual(ii2b, 0xFFFFFFFFFFFFFFFD)) { - err(ts, z168, 0x03a, 0, 0, ii2b, 0xFFFFFFFFFFFFFFFD) - } - if (LNotEqual(ii2c, 0x052167CB)) { - err(ts, z168, 0x03b, 0, 0, ii2c, 0x052167CB) - } - if (LNotEqual(ii2d, 0)) { - err(ts, z168, 0x03c, 0, 0, ii2d, 0) - } - if (LNotEqual(ii2e, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x03d, 0, 0, ii2e, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii2f, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x03e, 0, 0, ii2f, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii30, 0)) { - err(ts, z168, 0x03f, 0, 0, ii30, 0) - } - if (LNotEqual(ii31, 0)) { - err(ts, z168, 0x040, 0, 0, ii31, 0) - } - if (LNotEqual(ii32, 0)) { - err(ts, z168, 0x041, 0, 0, ii32, 0) - } - if (LNotEqual(ii33, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x042, 0, 0, ii33, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii34, 0x052167CA)) { - err(ts, z168, 0x043, 0, 0, ii34, 0x052167CA) - } - if (LNotEqual(ii35, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x044, 0, 0, ii35, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii36, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x045, 0, 0, ii36, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii37, 0xFFFFFFFFFFFFFFFE)) { - err(ts, z168, 0x046, 0, 0, ii37, 0xFFFFFFFFFFFFFFFE) - } - if (LNotEqual(ii38, 0)) { - err(ts, z168, 0x047, 0, 0, ii38, 0) - } - if (LNotEqual(ii39, 0)) { - err(ts, z168, 0x048, 0, 0, ii39, 0) - } - if (LNotEqual(ii3a, 0)) { - err(ts, z168, 0x049, 0, 0, ii3a, 0) - } - if (LNotEqual(ii3b, 0xFFFFFFFFFFFFFFFE)) { - err(ts, z168, 0x04a, 0, 0, ii3b, 0xFFFFFFFFFFFFFFFE) - } - if (LNotEqual(ii3c, 0x052167C8)) { - err(ts, z168, 0x04b, 0, 0, ii3c, 0x052167C8) - } - if (LNotEqual(ii3d, 0)) { - err(ts, z168, 0x04c, 0, 0, ii3d, 0) - } - if (LNotEqual(ii3e, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x04d, 0, 0, ii3e, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii3f, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x04e, 0, 0, ii3f, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii40, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x04f, 0, 0, ii40, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii41, 0xFFFFFFFFFFFFFFFF)) { - err(ts, z168, 0x050, 0, 0, ii41, 0xFFFFFFFFFFFFFFFF) - } - if (LNotEqual(ii42, 0xFFFFFFFFFFFFFFFE)) { - err(ts, z168, 0x051, 0, 0, ii42, 0xFFFFFFFFFFFFFFFE) - } - if (LNotEqual(ii43, 0xFFFFFFFFFFFFFFFD)) { - err(ts, z168, 0x052, 0, 0, ii43, 0xFFFFFFFFFFFFFFFD) - } - if (LNotEqual(ii44, 0x052167C5)) { - err(ts, z168, 0x053, 0, 0, ii44, 0x052167C5) - } + if (LNotEqual(Local0, 0x0006000C)) { + err(ts, z168, 0x000, 0, 0, Local0, 0x0006000C) + } + if (LNotEqual(Local1, 0x0018002A)) { + err(ts, z168, 0x001, 0, 0, Local1, 0x0018002A) + } + if (LNotEqual(Local2, 0x006000A6)) { + err(ts, z168, 0x002, 0, 0, Local2, 0x006000A6) + } + if (LNotEqual(arg0, 0x001E0036)) { + err(ts, z168, 0x003, 0, 0, arg0, 0x001E0036) + } + if (LNotEqual(arg1, 0x007E00DC)) { + err(ts, z168, 0x004, 0, 0, arg1, 0x007E00DC) + } + if (LNotEqual(ii00, 0x00000006)) { + err(ts, z168, 0x005, 0, 0, ii00, 0x00000006) + } + if (LNotEqual(Local3, 0x00076976)) { + err(ts, z168, 0x006, 0, 0, Local3, 0x00076976) + } + if (LNotEqual(ii01, 0x003B4BB0)) { + err(ts, z168, 0x007, 0, 0, ii01, 0x003B4BB0) + } + if (LNotEqual(arg2, 0x00769760)) { + err(ts, z168, 0x008, 0, 0, arg2, 0x00769760) + } + if (LNotEqual(Local5, 0x1F710810)) { + err(ts, z168, 0x009, 0, 0, Local5, 0x1F710810) + } + if (LNotEqual(ii02, 0x03EE2102)) { + err(ts, z168, 0x00a, 0, 0, ii02, 0x03EE2102) + } + if (LNotEqual(Local6, 0x034E2102)) { + err(ts, z168, 0x00b, 0, 0, Local6, 0x034E2102) + } + if (LNotEqual(ii03, 0x00000007)) { + err(ts, z168, 0x00c, 0, 0, ii03, 0x00000007) + } + if (LNotEqual(ii04, 0x034E2109)) { + err(ts, z168, 0x00d, 0, 0, ii04, 0x034E2109) + } + if (LNotEqual(ii05, 0x0000001F)) { + err(ts, z168, 0x00e, 0, 0, ii05, 0x0000001F) + } + if (LNotEqual(arg3, 0x034E2128)) { + err(ts, z168, 0x00f, 0, 0, arg3, 0x034E2128) + } + if (LNotEqual(ii06, 0x00000011)) { + err(ts, z168, 0x010, 0, 0, ii06, 0x00000011) + } + if (LNotEqual(arg4, 0x034E2139)) { + err(ts, z168, 0x011, 0, 0, arg4, 0x034E2139) + } + if (LNotEqual(arg5, 0x12FAB246)) { + err(ts, z168, 0x012, 0, 0, arg5, 0x12FAB246) + } + if (LNotEqual(ii07, 0xFFFFFFFF01543726)) { + err(ts, z168, 0x013, 0, 0, ii07, 0xFFFFFFFF01543726) + } + if (LNotEqual(arg6, 0xFFFFFFFF144EE96C)) { + err(ts, z168, 0x014, 0, 0, arg6, 0xFFFFFFFF144EE96C) + } + if (LNotEqual(ii08, 0xFFFFFFFF050B0301)) { + err(ts, z168, 0x015, 0, 0, ii08, 0xFFFFFFFF050B0301) + } + if (LNotEqual(Local7, 0xFFFFFFFE1959EC6D)) { + err(ts, z168, 0x016, 0, 0, Local7, 0xFFFFFFFE1959EC6D) + } + if (LNotEqual(ii09, 0xFFFFFFFF01FB4321)) { + err(ts, z168, 0x017, 0, 0, ii09, 0xFFFFFFFF01FB4321) + } + if (LNotEqual(ii0a, 0xFFFFFFFD1B552F8E)) { + err(ts, z168, 0x018, 0, 0, ii0a, 0xFFFFFFFD1B552F8E) + } + if (LNotEqual(ii0b, 0x1B552F8E)) { + err(ts, z168, 0x019, 0, 0, ii0b, 0x1B552F8E) + } + if (LNotEqual(ii0c, 0x00769760)) { + err(ts, z168, 0x01a, 0, 0, ii0c, 0x00769760) + } + if (LNotEqual(ii0d, 0x20769760)) { + err(ts, z168, 0x01b, 0, 0, ii0d, 0x20769760) + } + if (LNotEqual(ii0e, 0)) { + err(ts, z168, 0x01c, 0, 0, ii0e, 0) + } + if (LNotEqual(ii0f, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x01d, 0, 0, ii0f, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(Local4, 0x052167D2)) { + err(ts, z168, 0x01e, 0, 0, Local4, 0x052167D2) + } + if (LNotEqual(ii10, 0x052167D1)) { + err(ts, z168, 0x01f, 0, 0, ii10, 0x052167D1) + } + if (LNotEqual(ii11, 0)) { + err(ts, z168, 0x020, 0, 0, ii11, 0) + } + if (LNotEqual(ii12, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x021, 0, 0, ii12, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii13, 0x00000000052167D1)) { + err(ts, z168, 0x022, 0, 0, ii13, 0x00000000052167D1) + } + if (LNotEqual(ii14, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x023, 0, 0, ii14, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii15, 0)) { + err(ts, z168, 0x024, 0, 0, ii15, 0) + } + if (LNotEqual(ii16, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x025, 0, 0, ii16, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii17, 0)) { + err(ts, z168, 0x026, 0, 0, ii17, 0) + } + if (LNotEqual(ii18, 0x052167D1)) { + err(ts, z168, 0x027, 0, 0, ii18, 0x052167D1) + } + if (LNotEqual(ii19, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x028, 0, 0, ii19, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii1a, 0)) { + err(ts, z168, 0x029, 0, 0, ii1a, 0) + } + if (LNotEqual(ii1b, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x02a, 0, 0, ii1c, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii1c, 0x052167D0)) { + err(ts, z168, 0x02b, 0, 0, ii1d, 0x052167D0) + } + if (LNotEqual(ii1d, 0)) { + err(ts, z168, 0x02c, 0, 0, ii1d, 0) + } + if (LNotEqual(ii1e, 0)) { + err(ts, z168, 0x02d, 0, 0, ii1e, 0) + } + if (LNotEqual(ii1f, 0)) { + err(ts, z168, 0x02e, 0, 0, ii1f, 0) + } + if (LNotEqual(ii20, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x02f, 0, 0, ii20, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii21, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x30, 0, 0, ii21, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii22, 0xFFFFFFFFFFFFFFFE)) { + err(ts, z168, 0x031, 0, 0, ii22, 0xFFFFFFFFFFFFFFFE) + } + if (LNotEqual(ii23, 0xFFFFFFFFFFFFFFFE)) { + err(ts, z168, 0x032, 0, 0, ii23, 0xFFFFFFFFFFFFFFFE) + } + if (LNotEqual(ii24, 0x052167CE)) { + err(ts, z168, 0x033, 0, 0, ii24, 0x052167CE) + } + if (LNotEqual(ii25, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x034, 0, 0, ii25, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii26, 0)) { + err(ts, z168, 0x035, 0, 0, ii26, 0) + } + if (LNotEqual(ii27, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x036, 0, 0, ii27, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii28, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x037, 0, 0, ii28, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii29, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x038, 0, 0, ii29, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii2a, 0xFFFFFFFFFFFFFFFE)) { + err(ts, z168, 0x039, 0, 0, ii2a, 0xFFFFFFFFFFFFFFFE) + } + if (LNotEqual(ii2b, 0xFFFFFFFFFFFFFFFD)) { + err(ts, z168, 0x03a, 0, 0, ii2b, 0xFFFFFFFFFFFFFFFD) + } + if (LNotEqual(ii2c, 0x052167CB)) { + err(ts, z168, 0x03b, 0, 0, ii2c, 0x052167CB) + } + if (LNotEqual(ii2d, 0)) { + err(ts, z168, 0x03c, 0, 0, ii2d, 0) + } + if (LNotEqual(ii2e, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x03d, 0, 0, ii2e, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii2f, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x03e, 0, 0, ii2f, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii30, 0)) { + err(ts, z168, 0x03f, 0, 0, ii30, 0) + } + if (LNotEqual(ii31, 0)) { + err(ts, z168, 0x040, 0, 0, ii31, 0) + } + if (LNotEqual(ii32, 0)) { + err(ts, z168, 0x041, 0, 0, ii32, 0) + } + if (LNotEqual(ii33, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x042, 0, 0, ii33, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii34, 0x052167CA)) { + err(ts, z168, 0x043, 0, 0, ii34, 0x052167CA) + } + if (LNotEqual(ii35, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x044, 0, 0, ii35, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii36, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x045, 0, 0, ii36, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii37, 0xFFFFFFFFFFFFFFFE)) { + err(ts, z168, 0x046, 0, 0, ii37, 0xFFFFFFFFFFFFFFFE) + } + if (LNotEqual(ii38, 0)) { + err(ts, z168, 0x047, 0, 0, ii38, 0) + } + if (LNotEqual(ii39, 0)) { + err(ts, z168, 0x048, 0, 0, ii39, 0) + } + if (LNotEqual(ii3a, 0)) { + err(ts, z168, 0x049, 0, 0, ii3a, 0) + } + if (LNotEqual(ii3b, 0xFFFFFFFFFFFFFFFE)) { + err(ts, z168, 0x04a, 0, 0, ii3b, 0xFFFFFFFFFFFFFFFE) + } + if (LNotEqual(ii3c, 0x052167C8)) { + err(ts, z168, 0x04b, 0, 0, ii3c, 0x052167C8) + } + if (LNotEqual(ii3d, 0)) { + err(ts, z168, 0x04c, 0, 0, ii3d, 0) + } + if (LNotEqual(ii3e, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x04d, 0, 0, ii3e, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii3f, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x04e, 0, 0, ii3f, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii40, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x04f, 0, 0, ii40, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii41, 0xFFFFFFFFFFFFFFFF)) { + err(ts, z168, 0x050, 0, 0, ii41, 0xFFFFFFFFFFFFFFFF) + } + if (LNotEqual(ii42, 0xFFFFFFFFFFFFFFFE)) { + err(ts, z168, 0x051, 0, 0, ii42, 0xFFFFFFFFFFFFFFFE) + } + if (LNotEqual(ii43, 0xFFFFFFFFFFFFFFFD)) { + err(ts, z168, 0x052, 0, 0, ii43, 0xFFFFFFFFFFFFFFFD) + } + if (LNotEqual(ii44, 0x052167C5)) { + err(ts, z168, 0x053, 0, 0, ii44, 0x052167C5) + } } Method(ini5) { - SRMT("in50") - in50() + SRMT("in50") + in50() - SRMT("in51") - in51(0,0,0,0,0,0,0) + SRMT("in51") + in51(0,0,0,0,0,0,0) - CH03("ini5", z168, 0x000, 0, 0) + CH03("ini5", z168, 0x000, 0, 0) } diff --git a/tests/aslts/src/runtime/collections/Identity2MS/abbu/misc/ms1.asl b/tests/aslts/src/runtime/collections/Identity2MS/abbu/misc/ms1.asl index 16596be..b216678 100644 --- a/tests/aslts/src/runtime/collections/Identity2MS/abbu/misc/ms1.asl +++ b/tests/aslts/src/runtime/collections/Identity2MS/abbu/misc/ms1.asl @@ -6480,13 +6480,7 @@ Method(ms31, 1, Serialized) if (y290) { m002() - } - - if (LAnd(y260, y290)) { m003() - } - - if (LAnd(y260, y290)) { m004() } diff --git a/tests/aslts/src/runtime/collections/complex/misc/misc.asl b/tests/aslts/src/runtime/collections/complex/misc/misc.asl index d86f464..eca5b27 100644 --- a/tests/aslts/src/runtime/collections/complex/misc/misc.asl +++ b/tests/aslts/src/runtime/collections/complex/misc/misc.asl @@ -1115,17 +1115,18 @@ Method(m15b,, Serialized) Method(m003) { - CH03(ts, z054, 0x009, 0, 0) - Store(DerefOf("mm00"), Local0) - if (SLCK) { - CH03(ts, z054, 0x00a, 0, 0) - Store(ObjectType(Local0), Local1) - if (LNotEqual(Local1, c010)) { - err(ts, z054, 0x00b, 0, 0, Local1, c010) - } - } else { - CH04(ts, 0, 47, z054, 0x00c, 0, 0) // AE_AML_OPERAND_TYPE - } +// 10/2016: Compiler now catches illegal DerefOf(StringConstant) +// CH03(ts, z054, 0x009, 0, 0) +// Store(DerefOf("mm00"), Local0) +// if (SLCK) { +// CH03(ts, z054, 0x00a, 0, 0) +// Store(ObjectType(Local0), Local1) +// if (LNotEqual(Local1, c010)) { +// err(ts, z054, 0x00b, 0, 0, Local1, c010) +// } +// } else { +// CH04(ts, 0, 47, z054, 0x00c, 0, 0) // AE_AML_OPERAND_TYPE +// } } /* CopyObject */ @@ -1164,14 +1165,16 @@ Method(m15b,, Serialized) Method(m007) { - CH03(ts, z054, 0x014, 0, 0) - CopyObject(DerefOf("mm00"), Local0) - CH03(ts, z054, 0x015, 0, 0) +// 10/2016: Compiler now catches illegal DerefOf(StringConstant) - Store(ObjectType(Local0), Local1) - if (LNotEqual(Local1, c010)) { - err(ts, z054, 0x016, 0, 0, Local1, c010) - } +// CH03(ts, z054, 0x014, 0, 0) +// CopyObject(DerefOf("mm00"), Local0) +// CH03(ts, z054, 0x015, 0, 0) +// +// Store(ObjectType(Local0), Local1) +// if (LNotEqual(Local1, c010)) { +// err(ts, z054, 0x016, 0, 0, Local1, c010) +// } } /* Add */ @@ -1200,9 +1203,11 @@ Method(m15b,, Serialized) Method(m00b) { - CH03(ts, z054, 0x01c, 0, 0) - Add(DerefOf("mm00"), 4, Local0) - CH04(ts, 0, 47, z054, 0x01d, 0, 0) // AE_AML_OPERAND_TYPE +// 10/2016: Compiler now catches illegal DerefOf(StringConstant) + +// CH03(ts, z054, 0x01c, 0, 0) +// Add(DerefOf("mm00"), 4, Local0) +// CH04(ts, 0, 47, z054, 0x01d, 0, 0) // AE_AML_OPERAND_TYPE } /* ObjectType */ @@ -1233,10 +1238,12 @@ Method(m15b,, Serialized) Method(m00f) { - Store(ObjectType(DerefOf("mm00")), Local0) - if (LNotEqual(Local0, c010)) { - err(ts, z054, 0x021, 0, 0, Local0, c010) - } +// 10/2016: Compiler now catches illegal DerefOf(StringConstant) + +// Store(ObjectType(DerefOf("mm00")), Local0) +// if (LNotEqual(Local0, c010)) { +// err(ts, z054, 0x021, 0, 0, Local0, c010) +// } } Method(m100) diff --git a/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl b/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl index b9a5b8e..ecb2d6b 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc/exc.asl @@ -159,28 +159,27 @@ Method(m143,, Serialized) Store(SizeOf(Local1), Local5) CH04(ts, 1, 49, z058, 12, 0, 0) // AE_AML_UNINITIALIZED_LOCAL -#if 0 /* These are now caught by the compiler - Aug 2015 */ - Store(SizeOf(DEV0), Local5) - CH04(ts, 1, 47, z058, 13, 0, 0) // AE_AML_OPERAND_TYPE - - Store(SizeOf(EVE0), Local5) - CH04(ts, 1, 47, z058, 14, 0, 0) // AE_AML_OPERAND_TYPE - - Store(SizeOf(MTX0), Local5) - CH04(ts, 1, 47, z058, 15, 0, 0) // AE_AML_OPERAND_TYPE - - Store(SizeOf(OPR0), Local5) - CH04(ts, 1, 47, z058, 16, 0, 0) // AE_AML_OPERAND_TYPE - - Store(SizeOf(PWR0), Local5) - CH04(ts, 1, 47, z058, 17, 0, 0) // AE_AML_OPERAND_TYPE - - Store(SizeOf(CPU0), Local5) - CH04(ts, 1, 47, z058, 18, 0, 0) // AE_AML_OPERAND_TYPE - - Store(SizeOf(TZN0), Local5) - CH04(ts, 1, 47, z058, 19, 0, 0) // AE_AML_OPERAND_TYPE -#endif +/* These are now caught by the compiler - Aug 2015 */ +// Store(SizeOf(DEV0), Local5) +// CH04(ts, 1, 47, z058, 13, 0, 0) // AE_AML_OPERAND_TYPE +// +// Store(SizeOf(EVE0), Local5) +// CH04(ts, 1, 47, z058, 14, 0, 0) // AE_AML_OPERAND_TYPE +// +// Store(SizeOf(MTX0), Local5) +// CH04(ts, 1, 47, z058, 15, 0, 0) // AE_AML_OPERAND_TYPE +// +// Store(SizeOf(OPR0), Local5) +// CH04(ts, 1, 47, z058, 16, 0, 0) // AE_AML_OPERAND_TYPE +// +// Store(SizeOf(PWR0), Local5) +// CH04(ts, 1, 47, z058, 17, 0, 0) // AE_AML_OPERAND_TYPE +// +// Store(SizeOf(CPU0), Local5) +// CH04(ts, 1, 47, z058, 18, 0, 0) // AE_AML_OPERAND_TYPE +// +// Store(SizeOf(TZN0), Local5) +// CH04(ts, 1, 47, z058, 19, 0, 0) // AE_AML_OPERAND_TYPE } // ToString() when the number of characters copied from buffer exceeds 200 @@ -1304,22 +1303,21 @@ Method(m709,, Serialized) Name(lenp, Package(1){0x123}) Name(i000, 0x100) -#if 0 /* These are now caught by the compiler - Aug 2015 */ - - Method(m000,, Serialized) { - OperationRegion(OPR0, SystemMemory, offp, 1) - } - - CH03(ts, z058, 188, 0, 0) - - m000() - - CH04(ts, 0, 47, z058, 189, 0, 0) // AE_AML_OPERAND_TYPE - - OperationRegion(OPR1, SystemMemory, 1, lenp) - - CH04(ts, 0, 47, z058, 190, 0, 0) // AE_AML_OPERAND_TYPE -#endif +/* These are now caught by the compiler - Aug 2015 */ +// +// Method(m000,, Serialized) { +// OperationRegion(OPR0, SystemMemory, offp, 1) +// } +// +// CH03(ts, z058, 188, 0, 0) +// +// m000() +// +// CH04(ts, 0, 47, z058, 189, 0, 0) // AE_AML_OPERAND_TYPE +// +// OperationRegion(OPR1, SystemMemory, 1, lenp) +// +// CH04(ts, 0, 47, z058, 190, 0, 0) // AE_AML_OPERAND_TYPE } // Try OpRegion arguments when Offset + Length > MaxInteger @@ -1398,17 +1396,16 @@ Method(m7f5,, Serialized) DataTableRegion (DR05, "SSDT", "", i000) CH04(ts, 0, 5, z058, 201, 0, 0) // AE_NOT_FOUND -#if 0 /* These are now caught by the compiler - Aug 2015 */ - - DataTableRegion (DR06, p000, "", i000) - CH04(ts, 0, 47, z058, 202, 0, 0) // AE_AML_OPERAND_TYPE - - DataTableRegion (DR07, "SSDT", p000, "") - CH04(ts, 0, 47, z058, 203, 0, 0) // AE_AML_OPERAND_TYPE - - DataTableRegion (DR08, "SSDT", "", p000) - CH04(ts, 0, 47, z058, 204, 0, 0) // AE_AML_OPERAND_TYPE -#endif +/* These are now caught by the compiler - Aug 2015 */ +// +// DataTableRegion (DR06, p000, "", i000) +// CH04(ts, 0, 47, z058, 202, 0, 0) // AE_AML_OPERAND_TYPE +// +// DataTableRegion (DR07, "SSDT", p000, "") +// CH04(ts, 0, 47, z058, 203, 0, 0) // AE_AML_OPERAND_TYPE +// +// DataTableRegion (DR08, "SSDT", "", p000) +// CH04(ts, 0, 47, z058, 204, 0, 0) // AE_AML_OPERAND_TYPE } // Check SMBus OpRegion restictions @@ -1466,14 +1463,14 @@ Method(m0bc,, Serialized) Method(m002) { - CH03(ts, z058, 0x0d0, 0, 0) - m004() - CH04(ts, 0, 5, z058, 0x0d1, 0, 0) // AE_NOT_FOUND - Method(m004) { return (0xabcd0002) } + + CH03(ts, z058, 0x0d0, 0, 0) + m004() + CH04(ts, 0, 5, z058, 0x0d1, 0, 0) // AE_NOT_FOUND } Method(m003) diff --git a/tests/aslts/src/runtime/collections/exceptions/exc_operand/FULL/MAIN.asl b/tests/aslts/src/runtime/collections/exceptions/exc_operand/FULL/MAIN.asl index d993337..418e924 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc_operand/FULL/MAIN.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc_operand/FULL/MAIN.asl @@ -27,7 +27,7 @@ */ DefinitionBlock( - "exc_operand.aml", // Output filename + "full.aml", // Output filename "DSDT", // Signature 0x02, // DSDT Revision "Intel", // OEMID diff --git a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_04_pckg.asl b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_04_pckg.asl index a70242f..afd1ae5 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_04_pckg.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_04_pckg.asl @@ -2113,11 +2113,14 @@ Method(m4b4, 1, Serialized) // CondRefOf +// **** 10/2016 changed method invocation to just a namestring +// CondRefOf no longer invokes the method + if (y601) { - Store (CondRefOf(m000()), Local1) + Store (CondRefOf(m000), Local1) CH06(arg0, 0, 47) - CondRefOf(m000(), Local1) + CondRefOf(m000, Local1) CH06(arg0, 1, 47) } @@ -2166,18 +2169,19 @@ Method(m4b4, 1, Serialized) Not(m000(), Local1) CH06(arg0, 13, 47) - // ObjectType + // **** ObjectType /* Nov. 2012: Method invocation as arg to ObjectType is now illegal */ -// -// ObjectType(m000()) -// CH03(ts, z096, 63, 0, 0) + + Store (ObjectType(m000), Local0) + CH03(ts, z096, 63, 0, 0) // RefOf + /* **** Oct. 2016: Method invocation as arg to RefOf is now illegal */ - if (y601) { - Store (RefOf(m000()), Local1) - CH06(arg0, 14, 47) - } +// if (y601) { +// Store (RefOf(m000()), Local1) +// CH06(arg0, 14, 47) +// } // Release @@ -2559,14 +2563,18 @@ Method(m4b4, 1, Serialized) } // CondRefOf + + +// **** 10/2016 changed method invocation to just a namestring +// CondRefOf no longer invokes the method if (y601) { - Store (CondRefOf(m000(1)), Local1) + Store (CondRefOf(m000), Local1) CH06(arg0, 1, 47) CH00(arg0, 1) } - Store (CondRefOf(m000(2)), Local1) + Store (CondRefOf(m000), Local1) CH06(arg0, 2, 47) if (y600) { CH00(arg0, 2) @@ -2579,12 +2587,13 @@ Method(m4b4, 1, Serialized) CH00(arg0, 3) // RefOf + /* Oct. 2016: Method invocation as arg to RefOf is now illegal */ - if (y601) { - Store (RefOf(m000(4)), Local1) - CH06(arg0, 4, 47) - CH00(arg0, 4) - } +// if (y601) { +// Store (RefOf(m000(4)), Local1) +// CH06(arg0, 4, 47) +// CH00(arg0, 4) +// } // Release diff --git a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_06_dev.asl b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_06_dev.asl index 30aa858..8ae723a 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_06_dev.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_06_dev.asl @@ -807,13 +807,16 @@ Method(m4b6,, Serialized) } // CondRefOf + +// **** 10/2016 changed method invocation to just a namestring +// CondRefOf no longer invokes the method - CondRefOf(m000(), Local1) + CondRefOf(m000, Local1) CH06(arg0, 1, 47) // CopyObject - CopyObject(m000(), Local1) + CopyObject(m000, Local1) CH03(ts, z098, 7, 0, 0) // Decrement @@ -856,16 +859,17 @@ Method(m4b6,, Serialized) Not(m000(), Local1) CH06(arg0, 13, 47) - // ObjectType - /* Nov. 2012: Method invocation as arg to ObjectType is now illegal */ -// -// ObjectType(m000()) -// CH03(ts, z098, 8, 0, 0) + // **** ObjectType + /* Nov. 2016: Method invocation as arg to ObjectType is now illegal */ + + Store (ObjectType(m000), Local0) + CH03(ts, z098, 8, 0, 0) // RefOf + /* **** Oct. 2016: Method invocation as arg to RefOf is now illegal */ - Store (RefOf(m000()), Local1) - CH06(arg0, 14, 47) +// Store (RefOf(m000()), Local1) +// CH06(arg0, 14, 47) // Release diff --git a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_07_event.asl b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_07_event.asl index 956d45a..ab2bb6f 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_07_event.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_07_event.asl @@ -803,11 +803,14 @@ Method(m4b7,, Serialized) // CondRefOf +// **** 10/2016 changed method invocation to just a namestring +// CondRefOf no longer invokes the method + if (y601) { - Store (CondRefOf(m000()), Local1) + Store (CondRefOf(m000), Local1) CH06(arg0, 0, 47) - CondRefOf(m000(), Local1) + CondRefOf(m000, Local1) CH06(arg0, 1, 47) } @@ -857,17 +860,18 @@ Method(m4b7,, Serialized) CH06(arg0, 13, 47) // ObjectType - /* Nov. 2012: Method invocation as arg to ObjectType is now illegal */ -// -// ObjectType(m000()) -// CH03(ts, z099, 8, 0, 0) + /* **** Nov. 2016: Method invocation as arg to ObjectType is now illegal */ + + Store (ObjectType(m000), Local0) + CH03(ts, z099, 8, 0, 0) // RefOf + /* **** Oct. 2016: Method invocation as arg to RefOf is now illegal */ - if (y601) { - Store (RefOf(m000()), Local1) - CH06(arg0, 14, 47) - } +// if (y601) { +// Store (RefOf(m000()), Local1) +// CH06(arg0, 14, 47) +// } // Release diff --git a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_08_method.asl b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_08_method.asl index 4cd55ea..f4bffbc 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_08_method.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_08_method.asl @@ -800,12 +800,14 @@ Method(m4b8,, Serialized) } // CondRefOf +// **** 10/2016 changed method invocation to just a namestring +// CondRefOf no longer invokes the method if (y601) { - Store (CondRefOf(m000()), Local1) + Store (CondRefOf(m000), Local1) CH06(arg0, 0, 47) - CondRefOf(m000(), Local1) + CondRefOf(m000, Local1) CH06(arg0, 1, 47) } @@ -855,17 +857,18 @@ Method(m4b8,, Serialized) CH06(arg0, 13, 47) // ObjectType - /* Nov. 2012: Method invocation as arg to ObjectType is now illegal */ -// -// ObjectType(m000()) -// CH03(ts, z100, 8, 0, 0) + /* **** Nov. 2016: Method invocation as arg to ObjectType is now illegal */ + + Store (ObjectType(m000), Local0) + CH03(ts, z100, 8, 0, 0) // RefOf + /* **** Oct. 2016: Method invocation as arg to RefOf is now illegal */ - if (y601) { - Store (RefOf(m000()), Local1) - CH06(arg0, 14, 47) - } +// if (y601) { +// Store (RefOf(m000()), Local1) +// CH06(arg0, 14, 47) +// } // Release diff --git a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_09_mux.asl b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_09_mux.asl index fa9241c..3cd17e9 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_09_mux.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_09_mux.asl @@ -804,12 +804,14 @@ Method(m4b9,, Serialized) } // CondRefOf - + // **** 10/2016 changed method invocation to just a namestring + // CondRefOf no longer invokes the method + if (y601) { - Store (CondRefOf(m000()), Local1) + Store (CondRefOf(m000), Local1) CH06(arg0, 0, 47) - Store (CondRefOf(m000(), Local1), Local1) + Store (CondRefOf(m000, Local1), Local1) CH06(arg0, 1, 47) } @@ -859,17 +861,18 @@ Method(m4b9,, Serialized) CH06(arg0, 13, 47) // ObjectType - /* Nov. 2012: Method invocation as arg to ObjectType is now illegal */ -// -// ObjectType(m000()) -// CH03(ts, z101, 8, 0, 0) + /* **** Nov. 2016: Method invocation as arg to ObjectType is now illegal */ + + Store (ObjectType(m000), Local0) + CH03(ts, z101, 8, 0, 0) // RefOf + /* **** Oct. 2016: Method invocation as arg to RefOf is now illegal */ - if (y601) { - Store (RefOf(m000()), Local1) - CH06(arg0, 14, 47) - } +// if (y601) { +// Store (RefOf(m000()), Local1) +// CH06(arg0, 14, 47) +// } // Release diff --git a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_10_oreg.asl b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_10_oreg.asl index 3041231..e6456a4 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_10_oreg.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_10_oreg.asl @@ -804,8 +804,10 @@ Method(m4ba,, Serialized) } // CondRefOf - - CondRefOf(m000(), Local1) + // **** 10/2016 changed method invocation to just a namestring + // CondRefOf no longer invokes the method + + CondRefOf(m000, Local1) CH06(arg0, 1, 47) // CopyObject @@ -854,15 +856,16 @@ Method(m4ba,, Serialized) CH06(arg0, 13, 47) // ObjectType - /* Nov. 2012: Method invocation as arg to ObjectType is now illegal */ -// -// ObjectType(m000()) -// CH03(ts, z102, 8, 0, 0) + /* **** Nov. 2016: Method invocation as arg to ObjectType is now illegal */ + + Store (ObjectType(m000), Local0) + CH03(ts, z102, 8, 0, 0) // RefOf + /* **** Oct. 2016: Method invocation as arg to RefOf is now illegal */ - Store (RefOf(m000()), Local1) - CH06(arg0, 14, 47) +// Store (RefOf(m000()), Local1) +// CH06(arg0, 14, 47) // Release diff --git a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_11_pwr.asl b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_11_pwr.asl index 2756e5b..4114686 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_11_pwr.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_11_pwr.asl @@ -804,12 +804,14 @@ Method(m4bb,, Serialized) } // CondRefOf + // **** 10/2016 changed method invocation to just a namestring + // CondRefOf no longer invokes the method if (y601) { - Store (CondRefOf(m000()), Local1) + Store (CondRefOf(m000), Local1) CH06(arg0, 0, 47) - Store (CondRefOf(m000()), Local1) + Store (CondRefOf(m000), Local1) CH06(arg0, 1, 47) } @@ -859,17 +861,18 @@ Method(m4bb,, Serialized) CH06(arg0, 13, 47) // ObjectType - /* Nov. 2012: Method invocation as arg to ObjectType is now illegal */ -// -// ObjectType(m000()) -// CH03(ts, z103, 8, 0, 0) + /* **** Nov. 2016: Method invocation as arg to ObjectType is now illegal */ + + Store (ObjectType(m000), Local0) + CH03(ts, z103, 8, 0, 0) // RefOf + /* **** Oct. 2016: Method invocation as arg to RefOf is now illegal */ - if (y601) { - Store (RefOf(m000()), Local1) - CH06(arg0, 14, 47) - } +// if (y601) { +// Store (RefOf(m000()), Local1) +// CH06(arg0, 14, 47) +// } // Release diff --git a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_12_proc.asl b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_12_proc.asl index 5de022d..f4eb3dd 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_12_proc.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_12_proc.asl @@ -806,12 +806,14 @@ Method(m4bc,, Serialized) } // CondRefOf + // **** 10/2016 changed method invocation to just a namestring + // CondRefOf no longer invokes the method if (y601) { - Store (CondRefOf(m000()), Local1) + Store (CondRefOf(m000), Local1) CH06(arg0, 0, 47) - Store (CondRefOf(m000(), Local1), Local1) + Store (CondRefOf(m000, Local1), Local1) CH06(arg0, 1, 47) } @@ -861,17 +863,18 @@ Method(m4bc,, Serialized) CH06(arg0, 13, 47) // ObjectType - /* Nov. 2012: Method invocation as arg to ObjectType is now illegal */ -// -// ObjectType(m000()) -// CH03(ts, z104, 8, 0, 0) + /* **** Nov. 2016: Method invocation as arg to ObjectType is now illegal */ + + Store (ObjectType(m000), Local0) + CH03(ts, z104, 8, 0, 0) // RefOf + /* **** Oct. 2016: Method invocation as arg to RefOf is now illegal */ - if (y601) { - Store (RefOf(m000()), Local1) - CH06(arg0, 14, 47) - } +// if (y601) { +// Store (RefOf(m000()), Local1) +// CH06(arg0, 14, 47) +// } // Release diff --git a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_13_tzone.asl b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_13_tzone.asl index de523bb..32272d6 100644 --- a/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_13_tzone.asl +++ b/tests/aslts/src/runtime/collections/exceptions/exc_operand/exc_operand2/exc_13_tzone.asl @@ -810,8 +810,10 @@ Method(m4bd,, Serialized) } // CondRefOf + // **** 10/2016 changed method invocation to just a namestring + // CondRefOf no longer invokes the method - CondRefOf(m000(), Local1) + CondRefOf(m000, Local1) CH06(arg0, 1, 47) // CopyObject @@ -860,15 +862,16 @@ Method(m4bd,, Serialized) CH06(arg0, 13, 47) // ObjectType - /* Nov. 2012: Method invocation as arg to ObjectType is now illegal */ -// -// ObjectType(m000()) -// CH03(ts, z105, 8, 0, 0) + /* **** Nov. 2016: Method invocation as arg to ObjectType is now illegal */ + + Store (ObjectType(m000), Local0) + CH03(ts, z105, 8, 0, 0) // RefOf + /* **** Oct. 2016: Method invocation as arg to RefOf is now illegal */ - Store (RefOf(m000()), Local1) - CH06(arg0, 14, 47) +// Store (RefOf(m000()), Local1) +// CH06(arg0, 14, 47) // Release diff --git a/tests/aslts/src/runtime/collections/functional/reference/ref50.asl b/tests/aslts/src/runtime/collections/functional/reference/ref50.asl index 3fe68c3..5c55fa5 100644 --- a/tests/aslts/src/runtime/collections/functional/reference/ref50.asl +++ b/tests/aslts/src/runtime/collections/functional/reference/ref50.asl @@ -1481,7 +1481,8 @@ Method(m256,, Serialized) Store(0x2b, Index(s000, 1)) m385(ts, s000, 0, 0) - Store(0x2b, Index(s010, 1, Local0)) + Index(s010, 1, Local0) + Store(0x2b, Index(s010, 1)) m385(ts, s010, 0, 1) // CopyObject @@ -1511,7 +1512,8 @@ Method(m257,, Serialized) Store(0x2b, Index(b000, 1)) m386(ts, b000, 0, 0) - Store(0x2b, Index(b010, 1, Local0)) + Index(b010, 1, Local0) + Store(0x2b, Index(b010, 1)) m386(ts, b010, 0, 1) END0() @@ -1650,7 +1652,8 @@ Method(m25c,, Serialized) Store(0x2b, Index(p000, 1)) m387(ts, p000, 0, 0) - Store(0x2b, Index(p010, 1, Local0)) + Index(p010, 1, Local0) + Store(0x2b, Index(p010, 1)) m387(ts, p010, 0, 1) END0() @@ -3758,7 +3761,8 @@ Method(m345,, Serialized) // Store to reference immediately Method(m003, 1) { - Store(0x2b, Index(arg0, 1, Local0)) + Index(arg0, 1, Local0) + Store(0x2b, Index(arg0, 1)) } // CopyObject to reference immediately @@ -4348,7 +4352,8 @@ Method(m34c,, Serialized) { Store(DerefOf(arg0), Local2) - Store(0x2b, Index(Local2, 1, Local0)) + Index(Local2, 1, Local0) + Store(0x2b, Index(Local2, 1)) if (LEqual(arg1, c00a)) { m385(ts, Local2, 0, 3) diff --git a/tests/aslts/src/runtime/collections/functional/table/load.asl b/tests/aslts/src/runtime/collections/functional/table/load.asl index 9adcf97..26ab9e4 100644 --- a/tests/aslts/src/runtime/collections/functional/table/load.asl +++ b/tests/aslts/src/runtime/collections/functional/table/load.asl @@ -347,16 +347,14 @@ Device(DTM0) { Store("Table Loaded", Debug) // Check DDBHandle ObjectType - if (y260) { - switch (ToInteger (arg1)) { - case (0) {Store(ObjectType(HI0), Local1)} - case (1) {Store(ObjectType(\DTM0.HI0), Local1)} - case (2) {Store(ObjectType(Local2), Local1)} - case (3) {Store(ObjectType(Index(PHI0, 0)), Local1)} - } - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z174, 0x004, 0, 0, Local1, c017) - } + switch (ToInteger (arg1)) { + case (0) {Store(ObjectType(HI0), Local1)} + case (1) {Store(ObjectType(\DTM0.HI0), Local1)} + case (2) {Store(ObjectType(Local2), Local1)} + case (3) {Store(ObjectType(Index(PHI0, 0)), Local1)} + } + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z174, 0x004, 0, 0, Local1, c017) } // Check the new Object appears @@ -443,11 +441,9 @@ Device(DTM0) { Concatenate(arg0, "-m002", arg0) // Check DDBHandle ObjectType - if (y260) { - Store(ObjectType(Arg1), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z174, 0x00e, 0, 0, Local1, c017) - } + Store(ObjectType(Arg1), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z174, 0x00e, 0, 0, Local1, c017) } // Check the new Object appears @@ -648,16 +644,14 @@ Device(DTM0) { Store("SSDT Loaded", Debug) // Check DDBHandle ObjectType - if (y260) { - switch (ToInteger (arg1)) { - case (0) {Store(ObjectType(HI0), Local1)} - case (1) {Store(ObjectType(\DTM0.HI0), Local1)} - case (2) {Store(ObjectType(Local2), Local1)} - case (3) {Store(ObjectType(Index(PHI0, 0)), Local1)} - } - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z174, 0x019, 0, 0, Local1, c017) - } + switch (ToInteger (arg1)) { + case (0) {Store(ObjectType(HI0), Local1)} + case (1) {Store(ObjectType(\DTM0.HI0), Local1)} + case (2) {Store(ObjectType(Local2), Local1)} + case (3) {Store(ObjectType(Index(PHI0, 0)), Local1)} + } + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z174, 0x019, 0, 0, Local1, c017) } // Check the new Object appears @@ -1199,11 +1193,11 @@ Device(DTM0) { // Originated from ssdt3.asl: iasl -tc ssdt3.asl Name(BUF3, Buffer(){ - 0x53,0x53,0x44,0x54,0x1F,0x01,0x00,0x00, /* 00000000 "SSDT...." */ - 0x02,0x58,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 ".XIntel." */ + 0x53,0x53,0x44,0x54,0x1D,0x01,0x00,0x00, /* 00000000 "SSDT...." */ + 0x02,0x4F,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 ".OIntel." */ 0x4D,0x61,0x6E,0x79,0x00,0x00,0x00,0x00, /* 00000010 "Many...." */ 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ - 0x15,0x12,0x06,0x20,0x5B,0x82,0x49,0x0F, /* 00000020 "... [.I." */ + 0x31,0x08,0x16,0x20,0x5B,0x82,0x47,0x0F, /* 00000020 "1.. [.G." */ 0x41,0x55,0x58,0x44,0x08,0x49,0x4E,0x54, /* 00000028 "AUXD.INT" */ 0x30,0x0E,0x10,0x32,0x54,0x76,0x98,0xBA, /* 00000030 "0..2Tv.." */ 0xDC,0xFE,0x08,0x53,0x54,0x52,0x30,0x0D, /* 00000038 "...STR0." */ @@ -1216,25 +1210,25 @@ Device(DTM0) { 0xDC,0xFE,0x0D,0x74,0x65,0x73,0x74,0x20, /* 00000070 "...test " */ 0x70,0x61,0x63,0x6B,0x61,0x67,0x65,0x30, /* 00000078 "package0" */ 0x00,0x11,0x0C,0x0A,0x09,0x13,0x12,0x11, /* 00000080 "........" */ - 0x10,0x0F,0x0E,0x0D,0x0C,0x0B,0x5B,0x81, /* 00000088 "......[." */ - 0x0B,0x4F,0x50,0x52,0x30,0x01,0x46,0x4C, /* 00000090 ".OPR0.FL" */ - 0x55,0x30,0x20,0x5B,0x82,0x10,0x44,0x45, /* 00000098 "U0 [..DE" */ - 0x56,0x30,0x08,0x53,0x30,0x30,0x30,0x0D, /* 000000A0 "V0.S000." */ - 0x44,0x45,0x56,0x30,0x00,0x5B,0x02,0x45, /* 000000A8 "DEV0.[.E" */ - 0x56,0x45,0x30,0x14,0x09,0x4D,0x4D,0x4D, /* 000000B0 "VE0..MMM" */ - 0x30,0x00,0xA4,0x0A,0x00,0x5B,0x01,0x4D, /* 000000B8 "0....[.M" */ - 0x54,0x58,0x30,0x00,0x5B,0x80,0x4F,0x50, /* 000000C0 "TX0.[.OP" */ - 0x52,0x30,0x00,0x0C,0x21,0x43,0x65,0x07, /* 000000C8 "R0..!Ce." */ - 0x0A,0x98,0x5B,0x84,0x13,0x50,0x57,0x52, /* 000000D0 "..[..PWR" */ - 0x30,0x00,0x00,0x00,0x08,0x53,0x30,0x30, /* 000000D8 "0....S00" */ - 0x30,0x0D,0x50,0x57,0x52,0x30,0x00,0x5B, /* 000000E0 "0.PWR0.[" */ - 0x83,0x16,0x43,0x50,0x55,0x30,0x00,0xFF, /* 000000E8 "..CPU0.." */ - 0xFF,0xFF,0xFF,0x00,0x08,0x53,0x30,0x30, /* 000000F0 ".....S00" */ - 0x30,0x0D,0x43,0x50,0x55,0x30,0x00,0x5B, /* 000000F8 "0.CPU0.[" */ - 0x85,0x10,0x54,0x5A,0x4E,0x30,0x08,0x53, /* 00000100 "..TZN0.S" */ - 0x30,0x30,0x30,0x0D,0x54,0x5A,0x4E,0x30, /* 00000108 "000.TZN0" */ - 0x00,0x5B,0x13,0x42,0x55,0x46,0x30,0x0A, /* 00000110 ".[.BUF0." */ - 0x00,0x0A,0x45,0x42,0x46,0x4C,0x30, + 0x10,0x0F,0x0E,0x0D,0x0C,0x0B,0x5B,0x80, /* 00000088 "......[." */ + 0x4F,0x50,0x52,0x30,0x00,0x0C,0x21,0x43, /* 00000090 "OPR0..!C" */ + 0x65,0x07,0x0A,0x98,0x5B,0x81,0x0B,0x4F, /* 00000098 "e...[..O" */ + 0x50,0x52,0x30,0x01,0x46,0x4C,0x55,0x30, /* 000000A0 "PR0.FLU0" */ + 0x20,0x5B,0x82,0x10,0x44,0x45,0x56,0x30, /* 000000A8 " [..DEV0" */ + 0x08,0x53,0x30,0x30,0x30,0x0D,0x44,0x45, /* 000000B0 ".S000.DE" */ + 0x56,0x30,0x00,0x5B,0x02,0x45,0x56,0x45, /* 000000B8 "V0.[.EVE" */ + 0x30,0x14,0x08,0x4D,0x4D,0x4D,0x30,0x00, /* 000000C0 "0..MMM0." */ + 0xA4,0x00,0x5B,0x01,0x4D,0x54,0x58,0x30, /* 000000C8 "..[.MTX0" */ + 0x00,0x5B,0x84,0x13,0x50,0x57,0x52,0x30, /* 000000D0 ".[..PWR0" */ + 0x00,0x00,0x00,0x08,0x53,0x30,0x30,0x30, /* 000000D8 "....S000" */ + 0x0D,0x50,0x57,0x52,0x30,0x00,0x5B,0x83, /* 000000E0 ".PWR0.[." */ + 0x16,0x43,0x50,0x55,0x30,0x00,0xFF,0xFF, /* 000000E8 ".CPU0..." */ + 0xFF,0xFF,0x00,0x08,0x53,0x30,0x30,0x30, /* 000000F0 "....S000" */ + 0x0D,0x43,0x50,0x55,0x30,0x00,0x5B,0x85, /* 000000F8 ".CPU0.[." */ + 0x10,0x54,0x5A,0x4E,0x30,0x08,0x53,0x30, /* 00000100 ".TZN0.S0" */ + 0x30,0x30,0x0D,0x54,0x5A,0x4E,0x30,0x00, /* 00000108 "00.TZN0." */ + 0x5B,0x13,0x42,0x55,0x46,0x30,0x00,0x0A, /* 00000110 "[.BUF0.." */ + 0x45,0x42,0x46,0x4C,0x30 /* 00000118 "EBFL0" */ }) OperationRegion (IST3, SystemMemory, 0x400, 0x11f) @@ -1369,11 +1363,9 @@ Device(DTM0) { // DDB Handle Load(DDB0, DDBH) CH04(arg0, 0, 47, z174, 0x069, 0, 0) // AE_AML_OPERAND_TYPE - if (y260) { - Store(ObjectType(DDB0), Local0) - if (LNotEqual(c017, Local0)) { - err(arg0, z174, 0x06a, 0, 0, Local0, c017) - } + Store(ObjectType(DDB0), Local0) + if (LNotEqual(c017, Local0)) { + err(arg0, z174, 0x06a, 0, 0, Local0, c017) } UnLoad(DDB0) @@ -1700,25 +1692,12 @@ Device(DTM0) { } Load(RFU0, arg2) - if (LOr(LEqual(arg3, c00d), // Field Unit - LEqual(arg3, c016))) { // Buffer Field - - // AE_AML_OPERAND_TYPE - if (CH04(arg0, 2, 47, z174, 0x0e9, 0, 0)) { - return (1) - } else { - return (0) - } - } else { - if (CH03(arg0, z174, 0x0b2, 0, 0)) { - return (1) - } + if (CH03(arg0, z174, 0x0b2, 0, 0)) { + return (1) } - if (y260) { - Store(ObjectType(arg2), Local0) - if (LNotEqual(c017, Local0)) { - err(arg0, z174, 0x0b3, 0, 0, Local0, c017) - } + Store(ObjectType(arg2), Local0) + if (LNotEqual(c017, Local0)) { + err(arg0, z174, 0x0b3, 0, 0, Local0, c017) } if (CondRefof(\SSS0, Local0)) { } else { @@ -1765,41 +1744,44 @@ Device(DTM0) { // Buffer m000(arg0, "buf", Refof(\AUXD.BUF0), c00b) - // Package - m000(arg0, "pac", Refof(\AUXD.PAC0), c00c) + // Writing NewObj to ArgX which is a RefOf(OldObj), should + // result in RefOf(NewObj), but this is currently not + // working. + if (y260) { + // Package + m000(arg0, "pac", Refof(\AUXD.PAC0), c00c) - // Field Unit - m000(arg0, "flu", Refof(\AUXD.FLU0), c00d) + // Field Unit + m000(arg0, "flu", Refof(\AUXD.FLU0), c00d) - // Device - m000(arg0, "dev", Refof(\AUXD.DEV0), c00e) + // Device + m000(arg0, "dev", Refof(\AUXD.DEV0), c00e) - // Event - m000(arg0, "evt", Refof(\AUXD.EVE0), c00f) + // Event + m000(arg0, "evt", Refof(\AUXD.EVE0), c00f) - // Method - m000(arg0, "met", Refof(\AUXD.MMM0), c010) + // Method + m000(arg0, "met", Refof(\AUXD.MMM0), c010) - // Mutex - m000(arg0, "mtx", Refof(\AUXD.MTX0), c011) + // Mutex + m000(arg0, "mtx", Refof(\AUXD.MTX0), c011) - // OpRegion - m000(arg0, "opr", Refof(\AUXD.OPR0), c012) + // OpRegion + m000(arg0, "opr", Refof(\AUXD.OPR0), c012) - // Power Resource - m000(arg0, "pwr", Refof(\AUXD.PWR0), c013) + // Power Resource + m000(arg0, "pwr", Refof(\AUXD.PWR0), c013) - // Processor - m000(arg0, "cpu", Refof(\AUXD.CPU0), c014) + // Processor + m000(arg0, "cpu", Refof(\AUXD.CPU0), c014) - // Thermal Zone - m000(arg0, "tzn", Refof(\AUXD.TZN0), c015) + // Thermal Zone + m000(arg0, "tzn", Refof(\AUXD.TZN0), c015) - // Buffer Field - m000(arg0, "bfl", Refof(\AUXD.BFL0), c016) + // Buffer Field + m000(arg0, "bfl", Refof(\AUXD.BFL0), c016) - // DDB Handle - if (y260) { + // DDB Handle CopyObject(DDB0, DDB1) m000(arg0, "ddb", Refof(DDB1), c017) } @@ -1910,11 +1892,9 @@ Device(DTM0) { return (1) } - if (y260) { - Store(ObjectType(HI0), Local0) - if (LNotEqual(c017, Local0)) { - err(arg0, z174, 0x0d3, 0, 0, Local0, c017) - } + Store(ObjectType(HI0), Local0) + if (LNotEqual(c017, Local0)) { + err(arg0, z174, 0x0d3, 0, 0, Local0, c017) } if (CondRefof(\SSS0, Local0)) { @@ -1981,11 +1961,9 @@ Device(DTM0) { return (1) } - if (y260) { - Store(ObjectType(HI0), Local0) - if (LNotEqual(c017, Local0)) { - err(arg0, z174, 0x0e3, 0, 0, Local0, c017) - } + Store(ObjectType(HI0), Local0) + if (LNotEqual(c017, Local0)) { + err(arg0, z174, 0x0e3, 0, 0, Local0, c017) } if (CondRefof(\SSS0, Local0)) { @@ -2054,6 +2032,89 @@ Device(DTM0) { return (0) } + + // Originated from ssdt5.asl: iasl -tc ssdt5.asl + Name(BUF5, Buffer(){ + 0x53,0x53,0x44,0x54,0x92,0x00,0x00,0x00, /* 00000000 "SSDT...." */ + 0x02,0xBA,0x69,0x41,0x53,0x4C,0x54,0x53, /* 00000008 "..iASLTS" */ + 0x4C,0x54,0x42,0x4C,0x30,0x30,0x30,0x35, /* 00000010 "LTBL0005" */ + 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ + 0x31,0x08,0x16,0x20,0x08,0x44,0x44,0x42, /* 00000020 "1.. .DDB" */ + 0x58,0x00,0x08,0x42,0x55,0x46,0x58,0x11, /* 00000028 "X..BUFX." */ + 0x37,0x0A,0x34,0x53,0x53,0x44,0x54,0x34, /* 00000030 "7.4SSDT4" */ + 0x00,0x00,0x00,0x02,0x98,0x49,0x6E,0x74, /* 00000038 ".....Int" */ + 0x65,0x6C,0x00,0x4D,0x61,0x6E,0x79,0x00, /* 00000040 "el.Many." */ + 0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x49, /* 00000048 ".......I" */ + 0x4E,0x54,0x4C,0x15,0x12,0x06,0x20,0x14, /* 00000050 "NTL... ." */ + 0x0F,0x5C,0x53,0x53,0x53,0x30,0x00,0xA4, /* 00000058 ".\SSS0.." */ + 0x0D,0x5C,0x53,0x53,0x53,0x30,0x00,0x5B, /* 00000060 ".\SSS0.[" */ + 0x80,0x49,0x53,0x54,0x58,0x00,0x00,0x0A, /* 00000068 ".ISTX..." */ + 0x34,0x5B,0x81,0x0C,0x49,0x53,0x54,0x58, /* 00000070 "4[..ISTX" */ + 0x01,0x52,0x46,0x55,0x58,0x40,0x1A,0x70, /* 00000078 ".RFUX@.p" */ + 0x42,0x55,0x46,0x58,0x52,0x46,0x55,0x58, /* 00000080 "BUFXRFUX" */ + 0x5B,0x20,0x52,0x46,0x55,0x58,0x44,0x44, /* 00000088 "[ RFUXDD" */ + 0x42,0x58 /* 00000090 "BX" */ + }) + OperationRegion (IST5, SystemMemory, 0x600, 0x92) + Field(IST5, ByteAcc, NoLock, Preserve) { + RFU5, 0x490, + } + // DDB Handle + External(\DDBX) + + // Recursive Load in module level code + Method(tstk, 1, Serialized) + { + Name(DDBH, 0) + + Concatenate(arg0, "-tstk", arg0) + + if (CondRefof(\DDBX, Local0)) { + err(arg0, z174, 0x0f0, 0, 0, "\\DDBX", 1) + return + } + if (CondRefof(\SSS0, Local0)) { + err(arg0, z174, 0x0f1, 0, 0, "\\SSS0", 1) + return + } + + Store(BUF5, RFU5) + Load(RFU5, DDBH) + if (CH03(arg0, z174, 0x0f2, 0, 0)) { + return (1) + } + + if (CondRefof(\DDBX, Local0)) { + } else { + err(arg0, z174, 0x0f3, 0, 0, "\\DDBX", 1) + return + } + if (CondRefof(\SSS0, Local0)) { + } else { + err(arg0, z174, 0x0f4, 0, 0, "\\SSS0", 1) + return + } + + Unload(DDBX) + if (CH03(arg0, z174, 0x0f5, 0, 0)) { + return (1) + } + + if (CondRefof(\SSS0, Local0)) { + err(arg0, z174, 0x0f6, 0, 0, "\\SSS0", 1) + return + } + + UnLoad(DDBH) + if (CH03(arg0, z174, 0x0f7, 0, 0)) { + return (1) + } + + if (CondRefof(\DDBX, Local0)) { + err(arg0, z174, 0x0f8, 0, 0, "\\DDBX", 1) + return + } + } } Method(TLD0,, Serialized) @@ -2146,6 +2207,12 @@ Method(TLD0,, Serialized) } CH03(ts, z174, 0x20c, 0, 0) + + // Recursive Load in module level + SRMT("TLD0.tstk") + \DTM0.tstk(ts) + + CH03(ts, z174, 0x20d, 0, 0) } // Exceptional conditions diff --git a/tests/aslts/src/runtime/collections/functional/table/loadtable.asl b/tests/aslts/src/runtime/collections/functional/table/loadtable.asl index 72be5b4..7431d8b 100644 --- a/tests/aslts/src/runtime/collections/functional/table/loadtable.asl +++ b/tests/aslts/src/runtime/collections/functional/table/loadtable.asl @@ -187,12 +187,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x005, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDBH), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x005, 0, 0, Local1, c017) + return (1) } if (LNotEqual(1, \DTM2.PLDT)) { @@ -245,12 +243,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x012, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDBH), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x012, 0, 0, Local1, c017) + return (1) } if (LNotEqual(1, \DTM2.PLDT)) { @@ -283,26 +279,37 @@ Device(DTM2) { } Store(LoadTable("OeM1", "Intel", "Many", "\\", PPST, 1), Local2) - - if (CH03(arg0, z176, 0x018, 0, 0)) { - return (1) + if (y281) { + // No exception + if (CH03(arg0, z176, 0x018, 0, 0)) { + return (1) + } + } else { + // Exception: AE_BAD_SIGNATURE + if (CH04(arg0, 1, 37, z176, 0x019, 0, 0)) { + return (1) + } } - Store(ObjectType(Local2), Local1) - if (LNotEqual(Local1, c009)) { - err(arg0, z176, 0x019, 0, 0, Local1, c009) - } - - if (LNotEqual(Local2, 0)) { - err(arg0, z176, 0x01a, 0, 0, Local2, 0) + if (y281) { + if (LNotEqual(Local1, c009)) { + err(arg0, z176, 0x01a, 0, 0, Local1, c009) + } + if (LNotEqual(Local2, 0)) { + err(arg0, z176, 0x01b, 0, 0, Local2, 0) + } + } else { + if (LNotEqual(Local1, c008)) { + err(arg0, z176, 0x01c, 0, 0, Local1, c008) + } } if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, 0x01b, 0, 0, \DTM2.PLDT, 0) + err(arg0, z176, 0x01d, 0, 0, \DTM2.PLDT, 0) } if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, 0x01c, 0, 0, "\\_XT2", 1) + err(arg0, z176, 0x01e, 0, 0, "\\_XT2", 1) } // Unhappy comparison due to the OEMIDString @@ -311,30 +318,30 @@ Device(DTM2) { Store(ObjectType(Local3), Local1) if (LNotEqual(Local1, c008)) { - err(arg0, z176, 0x01d, 0, 0, Local1, c008) + err(arg0, z176, 0x01f, 0, 0, Local1, c008) } Store(LoadTable("OEM1", "InteL", "Many", "\\", PPST, 1), Local3) - if (CH03(arg0, z176, 0x01e, 0, 0)) { + if (CH03(arg0, z176, 0x020, 0, 0)) { return (1) } Store(ObjectType(Local3), Local1) if (LNotEqual(Local1, c009)) { - err(arg0, z176, 0x01f, 0, 0, Local1, c009) + err(arg0, z176, 0x021, 0, 0, Local1, c009) } if (LNotEqual(Local3, 0)) { - err(arg0, z176, 0x020, 0, 0, Local3, 0) + err(arg0, z176, 0x022, 0, 0, Local3, 0) } if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, 0x021, 0, 0, \DTM2.PLDT, 0) + err(arg0, z176, 0x023, 0, 0, \DTM2.PLDT, 0) } if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, 0x022, 0, 0, "\\_XT2", 1) + err(arg0, z176, 0x024, 0, 0, "\\_XT2", 1) } // Unhappy comparison due to the OEMTableIDString @@ -343,30 +350,30 @@ Device(DTM2) { Store(ObjectType(Local4), Local1) if (LNotEqual(Local1, c008)) { - err(arg0, z176, 0x023, 0, 0, Local1, c008) + err(arg0, z176, 0x025, 0, 0, Local1, c008) } Store(LoadTable("OEM1", "Intel", "many", "\\", PPST, 1), Local4) - if (CH03(arg0, z176, 0x024, 0, 0)) { + if (CH03(arg0, z176, 0x026, 0, 0)) { return (1) } Store(ObjectType(Local4), Local1) if (LNotEqual(Local1, c009)) { - err(arg0, z176, 0x025, 0, 0, Local1, c009) + err(arg0, z176, 0x027, 0, 0, Local1, c009) } if (LNotEqual(Local4, 0)) { - err(arg0, z176, 0x026, 0, 0, Local4, 0) + err(arg0, z176, 0x028, 0, 0, Local4, 0) } if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, 0x027, 0, 0, \DTM2.PLDT, 0) + err(arg0, z176, 0x029, 0, 0, \DTM2.PLDT, 0) } if (CondRefof(\_XT2, Local0)) { - err(arg0, z176, 0x028, 0, 0, "\\_XT2", 1) + err(arg0, z176, 0x02a, 0, 0, "\\_XT2", 1) } return (0) @@ -398,12 +405,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDB0), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x032, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDB0), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x032, 0, 0, Local1, c017) + return (1) } if (LNotEqual(1, \DTM2.PLDT)) { @@ -436,12 +441,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDB1), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x038, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDB1), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x038, 0, 0, Local1, c017) + return (1) } if (LNotEqual(0, \DTM2.PLDT)) { @@ -474,12 +477,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDB2), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x03e, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDB2), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x03e, 0, 0, Local1, c017) + return (1) } if (LNotEqual(0, \DTM2.PLDT)) { @@ -512,12 +513,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDB3), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x044, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDB3), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x044, 0, 0, Local1, c017) + return (1) } if (LNotEqual(0, \DTM2.PLDT)) { @@ -570,12 +569,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(arg1), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x052, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(arg1), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x052, 0, 0, Local1, c017) + return (1) } if (LNotEqual(0, \DTM2.PLDT)) { @@ -757,12 +754,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(arg1), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x062, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(arg1), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x062, 0, 0, Local1, c017) + return (1) } if (LNotEqual(1, \DTM2.PLDT)) { @@ -913,7 +908,7 @@ Device(DTM2) { Store(3, Local4) Store(LoadTable("OEM1", "", "", - Mid(ToString(Local2), 4, 1), + Mid(ToString(Local2), 4, 5), ToString(m000(Local3)), // Bug 288: iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm // Subtract(m000(Local4), 2)), @@ -954,12 +949,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x073, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDBH), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x073, 0, 0, Local1, c017) + return (1) } if (LNotEqual(1, \DTM2.PLDT)) { @@ -1014,12 +1007,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x082, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDBH), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x082, 0, 0, Local1, c017) + return (1) } if (LNotEqual(1, \DTM2.PLDT)) { @@ -1062,12 +1053,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x092, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDBH), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x092, 0, 0, Local1, c017) + return (1) } if (LNotEqual(1, PLDT)) { @@ -1089,12 +1078,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x096, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDBH), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x096, 0, 0, Local1, c017) + return (1) } if (LNotEqual(0, PLDT)) { @@ -1218,12 +1205,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x0b2, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDBH), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x0b2, 0, 0, Local1, c017) + return (1) } if (LNotEqual(1, \DTM2.PLDT)) { @@ -1307,12 +1292,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x0c2, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDBH), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x0c2, 0, 0, Local1, c017) + return (1) } if (CondRefof(\_XT2, Local0)) { @@ -1407,7 +1390,7 @@ Device(DTM2) { Switch(ToInteger (arg2)) { Case(0) { LoadTable(arg1, SOID, STID, RPST, PPST, 1) - return (CH04(arg0, 0, 61, z176, 0x0d0, 0, 0))// AE_AML_STRING_LIMIT + return (CH04(arg0, 0, 37, z176, 0x0d0, 0, 0))// AE_BAD_SIGNATURE } Case(1) { Store(LoadTable(SOEM, arg1, STID, RPST, PPST, 1), DDBH) @@ -1417,36 +1400,36 @@ Device(DTM2) { } Case(3) { LoadTable(SOEM, SOID, STID, arg1, PPST, 1) - return (CH04(arg0, 0, 30, z176, 0x0d0, 0, 0)) // AE_BAD_PATHNAME + return (CH04(arg0, 0, 30, z176, 0x0d1, 0, 0)) // AE_BAD_PATHNAME } Case(4) { LoadTable(SOEM, SOID, STID, RPST, arg1, 1) - return (CH04(arg0, 0, 30, z176, 0x0d1, 0, 0)) // AE_BAD_PATHNAME + return (CH04(arg0, 0, 30, z176, 0x0d2, 0, 0)) // AE_BAD_PATHNAME } } - if (CH03(arg0, z176, 0x0d2, 0, 0)) { + if (CH03(arg0, z176, 0x0d3, 0, 0)) { return (1) } if (LNotEqual(0, \DTM2.PLDT)) { - err(arg0, z176, 0x0d3, 0, 0, \DTM2.PLDT, 0) + err(arg0, z176, 0x0d4, 0, 0, \DTM2.PLDT, 0) return (1) } Store(ObjectType(DDBH), Local5) - if (CH03(arg0, z176, 0x0d4, 0, 0)) { + if (CH03(arg0, z176, 0x0d5, 0, 0)) { return (1) } if (LNotEqual(Local5, c009)) { // Integer - err(arg0, z176, 0x0d5, 0, 0, Local5, c009) + err(arg0, z176, 0x0d6, 0, 0, Local5, c009) return (1) } if (LNotEqual(0, DDBH)) { - err(arg0, z176, 0x0d6, 0, 0, DDBH, 0) + err(arg0, z176, 0x0d7, 0, 0, DDBH, 0) return (1) } @@ -1479,27 +1462,27 @@ Device(DTM2) { // Check consistency of the parameters if (LNotEqual(ToBuffer(SOEM), Local0)) { - err(arg0, z176, 0x0d7, 0, 0, Local0, ToBuffer(SOEM)) + err(arg0, z176, 0x0d8, 0, 0, Local0, ToBuffer(SOEM)) return (1) } if (LNotEqual(ToBuffer(SOID), Local1)) { - err(arg0, z176, 0x0d8, 0, 0, Local1, ToBuffer(SOID)) + err(arg0, z176, 0x0d9, 0, 0, Local1, ToBuffer(SOID)) return (1) } if (LNotEqual(ToBuffer(STID), Local2)) { - err(arg0, z176, 0x0d9, 0, 0, Local2, ToBuffer(STID)) + err(arg0, z176, 0x0da, 0, 0, Local2, ToBuffer(STID)) return (1) } if (LNotEqual(ToBuffer(RPST), Local3)) { - err(arg0, z176, 0x0da, 0, 0, Local3, ToBuffer(RPST)) + err(arg0, z176, 0x0db, 0, 0, Local3, ToBuffer(RPST)) return (1) } if (LNotEqual(ToBuffer(PPST), Local4)) { - err(arg0, z176, 0x0db, 0, 0, Local4, ToBuffer(PPST)) + err(arg0, z176, 0x0dc, 0, 0, Local4, ToBuffer(PPST)) return (1) } @@ -1511,7 +1494,7 @@ Device(DTM2) { ToInteger(Local3, Local3) ToInteger(Local4, Local4) - if (m000(arg0, Local0, 0)) {return (1)} + //if (m000(arg0, Local0, 0)) {return (1)} //if (m000(arg0, Local1, 1)) {return (1)} //if (m000(arg0, Local2, 2)) {return (1)} if (m000(arg0, Local3, 3)) {return (1)} @@ -1598,12 +1581,10 @@ Device(DTM2) { return (1) } - if (y260) { - Store(ObjectType(DDBH), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z176, 0x0f3, 0, 0, Local1, c017) - return (1) - } + Store(ObjectType(DDBH), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z176, 0x0f3, 0, 0, Local1, c017) + return (1) } if (CondRefof(\_XT2, Local0)) { diff --git a/tests/aslts/src/runtime/collections/functional/table/ssdt3.asl b/tests/aslts/src/runtime/collections/functional/table/ssdt3.asl index 856a8d0..3889fa5 100644 --- a/tests/aslts/src/runtime/collections/functional/table/ssdt3.asl +++ b/tests/aslts/src/runtime/collections/functional/table/ssdt3.asl @@ -58,6 +58,9 @@ DefinitionBlock( Buffer(9){19,18,17,16,15,14,13,12,11}, }) + // Operation Region + OperationRegion(OPR0, SystemMemory, 0x7654321, 0x98) + // Field Unit Field(OPR0, ByteAcc, NoLock, Preserve) { FLU0, 32, @@ -75,9 +78,6 @@ DefinitionBlock( // Mutex Mutex(MTX0, 0) - // Operation Region - OperationRegion(OPR0, SystemMemory, 0x7654321, 0x98) - // Power Resource PowerResource(PWR0, 0, 0) {Name(s000, "PWR0")} diff --git a/tests/aslts/src/runtime/collections/functional/table/ssdt5.asl b/tests/aslts/src/runtime/collections/functional/table/ssdt5.asl new file mode 100644 index 0000000..faf3f16 --- /dev/null +++ b/tests/aslts/src/runtime/collections/functional/table/ssdt5.asl @@ -0,0 +1,55 @@ +/* + * Some or all of this work - Copyright (c) 2006 - 2016, Intel Corp. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * Neither the name of Intel Corporation nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +DefinitionBlock( + "ssdt5.aml", // Output filename + "SSDT", // Signature + 0x02, // DSDT Revision + "iASLTS", // OEMID + "LTBL0005", // TABLE ID + 0x00000001 // OEM Revision + ) { + + Name(DDBX, 0) + // Originated from ssdt0.asl: iasl -tc ssdt0.asl + Name(BUFX, Buffer() { + 0x53,0x53,0x44,0x54,0x34,0x00,0x00,0x00, /* 00000000 "SSDT4..." */ + 0x02,0x98,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 "..Intel." */ + 0x4D,0x61,0x6E,0x79,0x00,0x00,0x00,0x00, /* 00000010 "Many...." */ + 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */ + 0x15,0x12,0x06,0x20,0x14,0x0F,0x5C,0x53, /* 00000020 "... ..\S" */ + 0x53,0x53,0x30,0x00,0xA4,0x0D,0x5C,0x53, /* 00000028 "SS0...\S" */ + 0x53,0x53,0x30,0x00, + }) + OperationRegion (ISTX, SystemMemory, 0, 0x34) + Field(ISTX, ByteAcc, NoLock, Preserve) { + RFUX, 0x1a0, + } + Store(BUFX, RFUX) + Load(RFUX, DDBX) +} diff --git a/tests/aslts/src/runtime/collections/functional/table/unload.asl b/tests/aslts/src/runtime/collections/functional/table/unload.asl index d5f36cb..2e280ae 100644 --- a/tests/aslts/src/runtime/collections/functional/table/unload.asl +++ b/tests/aslts/src/runtime/collections/functional/table/unload.asl @@ -118,11 +118,9 @@ Device(DTM1) { Store("Table Loaded", Debug) - if (y260) { - Store(ObjectType(HI0), Local1) - if (LNotEqual(Local1, c017)) { // DDB Handle - err(arg0, z175, 0x003, 0, 0, Local1, c017) - } + Store(ObjectType(HI0), Local1) + if (LNotEqual(Local1, c017)) { // DDB Handle + err(arg0, z175, 0x003, 0, 0, Local1, c017) } // Check the new Object appears diff --git a/tests/misc/grammar.aml b/tests/misc/grammar.aml index 279c91c..0ab8445 100755 Binary files a/tests/misc/grammar.aml and b/tests/misc/grammar.aml differ diff --git a/tests/misc/grammar.dsl b/tests/misc/grammar.dsl index 6477a39..e2cd76d 100755 --- a/tests/misc/grammar.dsl +++ b/tests/misc/grammar.dsl @@ -1,26 +1,26 @@ /* * Intel ACPI Component Architecture - * AML/ASL+ Disassembler version 20160729-32 + * AML/ASL+ Disassembler version 20160930-32 * Copyright (c) 2000 - 2016 Intel Corporation * * Disassembling to symbolic ASL+ operators * - * Disassembly of grammar.aml, Fri Aug 19 13:49:10 2016 + * Disassembly of grammar.aml, Tue Oct 25 13:59:22 2016 * * Original Table Header: * Signature "DSDT" * Length 0x0000A9E2 (43490) * Revision 0x01 **** 32-bit table (V1), no 64-bit math support - * Checksum 0xF0 + * Checksum 0xE7 * OEM ID "Intel" * OEM Table ID "GRMTEST" * OEM Revision 0x20090511 (537462033) * Compiler ID "INTL" - * Compiler Version 0x20160729 (538314537) + * Compiler Version 0x20160930 (538315056) */ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) { - External (ABCD, UnknownObj) + External (\ABCD, UnknownObj) Device (A1) { @@ -66,7 +66,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (IRES) { - Buffer PRT0 = ResourceTemplate () + Name (PRT0, ResourceTemplate () { IRQ (Edge, ActiveHigh, Exclusive, ) {3,4,5,6,7,9,10,11,14,15} @@ -76,7 +76,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) {0,1,2} } EndDependentFn () - } + }) Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Debug = "_CRS:" @@ -92,16 +92,16 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } } - Package _NPK (0x4) = + Name (_NPK, Package (0x04) { 0x1111, 0x2222, 0x3333, 0x4444 - } + }) Device (RES) { - Package _PRT (0x4) = + Name (_PRT, Package (0x04) // _PRT: PCI Routing Table { Package (0x04) { @@ -134,10 +134,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Zero, Zero } - } // _PRT: PCI Routing Table + }) Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings { - Buffer PRT0 = ResourceTemplate () + Name (PRT0, ResourceTemplate () { WordBusNumber (ResourceConsumer, MinFixed, MaxFixed, SubDecode, 0x0000, // Granularity @@ -172,21 +172,21 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x0CF7, // Range Maximum 0x0000, // Translation Offset 0x0CF8, // Length - ,, , TypeStatic) + ,, , TypeStatic, DenseTranslation) WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 0x0000, // Granularity 0x0D00, // Range Minimum 0xFFFF, // Range Maximum 0x0000, // Translation Offset 0xF300, // Length - ,, , TypeStatic) + ,, , TypeStatic, DenseTranslation) DWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 0x00000000, // Granularity 0x00000000, // Range Minimum 0x00000CF7, // Range Maximum 0x00000000, // Translation Offset 0x00000CF8, // Length - ,, , TypeStatic) + ,, , TypeStatic, DenseTranslation) DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 0x00000000, // Granularity 0x000C8000, // Range Minimum @@ -207,14 +207,14 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x0000000000000CF7, // Range Maximum 0x0000000000000000, // Translation Offset 0x0000000000000CF8, // Length - 0x44, "This is a ResouceSource string", , TypeStatic) + 0x44, "This is a ResouceSource string", , TypeStatic, DenseTranslation) QWordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange, 0x0000000000000000, // Granularity 0x0000000000000000, // Range Minimum 0x0000000000000CF7, // Range Maximum 0x0000000000000000, // Translation Offset 0x0000000000000CF8, // Length - ,, , TypeStatic) + ,, , TypeStatic, DenseTranslation) QWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 0x0000000000000000, // Granularity 0x0000000000100000, // Range Minimum @@ -236,7 +236,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x0000000000000000, // Translation Offset 0x0000000000000CF8, // Length 0x0000000000000000, // Type-Specific Attributes - , TypeStatic) + , TypeStatic, DenseTranslation) ExtendedMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite, 0x0000000000000000, // Granularity 0x0000000000100000, // Range Minimum @@ -343,7 +343,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) {3,4,5,6,7,9,10,11,14,15} } EndDependentFn () - } + }) CreateWordField (PRT0, \RES._CRS._Y00._MIN, BMIN) // _MIN: Minimum Base Address CreateByteField (PRT0, \RES._CRS._Y01._ASZ, RSIZ) // _ASZ: Access Size BMIN = 0x03 @@ -352,7 +352,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (_PRS, 0, Serialized) // _PRS: Possible Resource Settings { - Buffer BUF0 = ResourceTemplate () + Name (BUF0, ResourceTemplate () { StartDependentFn (0x01, 0x02) { @@ -410,7 +410,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) {1,3,4,5,6,7,8,10,11,12,13,14,15} } EndDependentFn () - } + }) Return (BUF0) /* \RES_._PRS.BUF0 */ } @@ -420,35 +420,35 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } } - Package _S0 (0x4) = + Name (_S0, Package (0x04) // _S0_: S0 System State { Zero, Zero, Zero, Zero - } // _S0_: S0 System State - Package _S3 (0x4) = + }) + Name (_S3, Package (0x04) // _S3_: S3 System State { 0x05, 0x05, Zero, Zero - } // _S3_: S3 System State - Package _S4 (0x4) = + }) + Name (_S4, Package (0x04) // _S4_: S4 System State { 0x06, 0x06, Zero, Zero - } // _S4_: S4 System State - Package _S5 (0x4) = + }) + Name (_S5, Package (0x04) // _S5_: S5 System State { 0x07, 0x07, Zero, Zero - } // _S5_: S5 System State - Integer SIZE = Zero + }) + Name (SIZE, Zero) OperationRegion (MYOP, 0x80, 0xFD60, 0x06) Field (MYOP, ByteAcc, NoLock, Preserve) { @@ -457,20 +457,16 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TCOP, 0, Serialized) { - Buffer _STR(0xA) = - { - /* 0000 */ 0x74, 0x00, 0x65, 0x00, 0x73, 0x00, 0x74, 0x00, /* t.e.s.t. */ - /* 0008 */ 0x00, 0x00 /* .. */ - } // _STR: Description String + Name (_STR, Unicode ("test")) // _STR: Description String MFLD = 0x04 Local0 = MFLD /* \MFLD */ } - Integer ERRS = Zero - String ESC1 = "abcdefghijklmn" - String ESC2 = "abcdefghijklmn" - String ESC3 = "abc\a\bdef\f\n\r\t\v\x03ffff\x1A" - Buffer CRSA = ResourceTemplate () + Name (ERRS, Zero) + Name (ESC1, "abcdefghijklmn") + Name (ESC2, "abcdefghijklmn") + Name (ESC3, "abc\a\bdef\f\n\r\t\v\x03ffff\x1A") + Name (CRSA, ResourceTemplate () { WordBusNumber (ResourceProducer, MinFixed, MaxFixed, PosDecode, 0x0000, // Granularity @@ -485,7 +481,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0xCFFF, // Range Maximum 0x0000, // Translation Offset 0x1000, // Length - ,, , TypeStatic) + ,, , TypeStatic, DenseTranslation) DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, // Granularity 0xD8000000, // Range Minimum @@ -493,8 +489,8 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x00000000, // Translation Offset 0x04000000, // Length ,, , AddressRangeMemory, TypeStatic) - } - Buffer CRSB = ResourceTemplate () + }) + Name (CRSB, ResourceTemplate () { DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, NonCacheable, ReadWrite, 0x00000000, // Granularity @@ -503,32 +499,30 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x00000000, // Translation Offset 0x04000000, // Length ,, , AddressRangeMemory, TypeStatic) - } - Buffer CRSC = ResourceTemplate () + }) + Name (CRSC, ResourceTemplate () { VendorShort () // Length = 0x03 { 0x01, 0x02, 0x03 /* ... */ } - } - Buffer CRSD = ResourceTemplate () + }) + Name (CRSD, ResourceTemplate () { VendorLong () // Length = 0x09 { /* 0000 */ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, /* ........ */ /* 0008 */ 0x09 /* . */ } - } - Buffer CRSE = ResourceTemplate () + }) + Name (CRSE, ResourceTemplate () { IRQNoFlags () {3,4,10,11} IRQNoFlags () {3,4,10,11} - } - Buffer CRSR(0x63AC80) = - { - } + }) + Name (CRSR, Buffer (SizeOf (CRSA) + SizeOf (CRSB)) {}) Method (_CRS, 0, NotSerialized) // _CRS: Current Resource Settings { Return (CRSR) /* \CRSR */ @@ -536,10 +530,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Scope (\) { - Integer BXXX = Ones + Name (BXXX, Ones) } - Integer LANS = Zero + Name (LANS, Zero) PowerResource (LANP, 0x01, 0x0000) { Method (_STA, 0, NotSerialized) // _STA: Status @@ -592,22 +586,22 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Processor (CPU0, 0x00, 0xFFFFFFFF, 0x00) {} } - Integer B1TP = Ones - Integer B2TP = Ones - Integer ADPS = Ones - Integer B1PS = Ones - Integer B1RS = Ones - Integer B1CS = Ones - Integer B2PS = Ones - Integer B2RS = Ones - Integer B2CS = Ones - Integer B1DC = 0x0BB8 - Integer B2DC = 0x0A28 - Integer B1LF = 0x0BB8 - Integer B2LF = 0x0A28 - Integer BPIF = Zero - Integer PBLL = Zero - Package RBIF (0xD) = + Name (B1TP, Ones) + Name (B2TP, Ones) + Name (ADPS, Ones) + Name (B1PS, Ones) + Name (B1RS, Ones) + Name (B1CS, Ones) + Name (B2PS, Ones) + Name (B2RS, Ones) + Name (B2CS, Ones) + Name (B1DC, 0x0BB8) + Name (B2DC, 0x0A28) + Name (B1LF, 0x0BB8) + Name (B2LF, 0x0A28) + Name (BPIF, Zero) + Name (PBLL, Zero) + Name (RBIF, Package (0x0D) { One, 0x0898, @@ -622,7 +616,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) "1", "LION", "Fujitsu" - } + }) Method (SMWE, 4, NotSerialized) { Return (Ones) @@ -635,9 +629,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Scope (_SB) { - Buffer SBUF(0x80) = - { - } + Name (SBUF, Buffer (0x80) {}) CreateBitField (SBUF, 0x03, BITY) CreateByteField (SBUF, One, BYTY) CreateWordField (SBUF, 0x02, WRDZ) @@ -653,11 +645,11 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (PCI0) { - Integer _HID = EisaId ("PNP0A03") /* PCI Bus */ // _HID: Hardware ID - Integer _ADR = Zero // _ADR: Address + Name (_HID, EisaId ("PNP0A03") /* PCI Bus */) // _HID: Hardware ID + Name (_ADR, Zero) // _ADR: Address Method (_CRS, 0, Serialized) // _CRS: Current Resource Settings { - Buffer PRT0 = ResourceTemplate () + Name (PRT0, ResourceTemplate () { WordBusNumber (ResourceConsumer, MinFixed, MaxFixed, SubDecode, 0x0000, // Granularity @@ -666,7 +658,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x0032, // Translation Offset 0x0002, // Length ,, _Y02) - } + }) CreateWordField (PRT0, \_SB.PCI0._CRS._Y02._MIN, BMIN) // _MIN: Minimum Base Address BMIN = 0x03 Return (PRT0) /* \_SB_.PCI0._CRS.PRT0 */ @@ -775,8 +767,8 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (CMB1) { - Integer _HID = EisaId ("PNP0C0A") /* Control Method Battery */ // _HID: Hardware ID - Integer _UID = One // _UID: Unique ID + Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */) // _HID: Hardware ID + Name (_UID, One) // _UID: Unique ID Alias (\_SB.PCI0.EIO.B1P, \_SB.PCI0.XXXX) Alias (\_SB.PCI0.EIO.B1P, B1P) Alias (\_SB.PCI0.EIO.B1C, B1C) @@ -823,11 +815,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } Local1 = MKWD (B1CL, B1CH) - Local2 = (((B1CP * B1LF) + 0x63) / 0x64) + Store (Divide (Add (Multiply (B1CP, B1LF), 0x63), 0x64, ), + Local2) Local3 = MKWD (B1VL, B1VH) - Package STAT (0x4) = - { - } + Name (STAT, Package (0x04) {}) STAT [Zero] = Local0 STAT [One] = Local1 STAT [0x02] = Local2 @@ -849,19 +840,19 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) { ThermalZone (TZ1) { - Package _PSL (0x1) = + Name (_PSL, Package (0x01) // _PSL: Passive List { \_PR.CPU0 - } // _PSL: Passive List + }) } } Method (TZ2, 0, Serialized) { - Package _PSL (0x1) = + Name (_PSL, Package (0x01) // _PSL: Passive List { \_PR.CPU0 - } // _PSL: Passive List + }) Return (_PSL) /* \TZ2_._PSL */ } @@ -1216,16 +1207,12 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (OBJ1, 1, Serialized) { Local0 = 0x03 - Buffer BUFR(0x0) = - { - } - Buffer BUF1(0x4) = + Name (BUFR, Buffer (Local0) {}) + Name (BUF1, Buffer (0x04) { 0x01, 0x02, 0x03, 0x04 /* .... */ - } - Buffer BUF2(0x4) = - { - } + }) + Name (BUF2, Buffer (0x04) {}) BUF2 = BUF1 /* \OBJ1.BUF1 */ Mutex (MTX1, 0x04) Alias (MTX1, MTX2) @@ -1236,9 +1223,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (FLDS, 0, Serialized) { Debug = "++++++++ Creating BufferFields" - Buffer BUF2(0x80) = - { - } + Name (BUF2, Buffer (0x80) {}) CreateBitField (BUF2, 0x03, BIT2) CreateByteField (BUF2, One, BYT2) CreateWordField (BUF2, 0x02, WRD2) @@ -1351,9 +1336,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (OBJ2, 1, Serialized) { Debug = "++++++++ Creating Buffer BUFO" - Buffer BUFO(0x20) = - { - } + Name (BUFO, Buffer (0x20) {}) Debug = "++++++++ Creating OpRegion OPR2" OperationRegion (OPR2, SystemMemory, Arg0, 0x0100) Debug = "++++++++ Creating Field(s) in OpRegion OPR2" @@ -1423,7 +1406,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Debug = "++++++++ Add (0x12345678, 0x11111111, Local0)" Local0 = (0x12345678 + 0x11111111) Debug = "++++++++ Store (Add (0x12345678, 0x11111111), Local1)" - Local1 = (0x12345678 + 0x11111111) + Store (Add (0x12345678, 0x11111111), Local1) Debug = "++++++++ Checking result from ADD" If (Local0 != Local1) { @@ -1433,7 +1416,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Debug = "++++++++ Subtract (0x87654321, 0x11111111, Local4)" Local4 = (0x87654321 - 0x11111111) Debug = "++++++++ Store (Subtract (0x87654321, 0x11111111), Local5)" - Local5 = (0x87654321 - 0x11111111) + Store (Subtract (0x87654321, 0x11111111), Local5) Debug = "++++++++ Checking result from SUBTRACT" If (Local4 != Local5) { @@ -1443,7 +1426,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Debug = "++++++++ Multiply (33, 10, Local6)" Local6 = (0x21 * 0x0A) Debug = "++++++++ Store (Multiply (33, 10), Local7)" - Local7 = (0x21 * 0x0A) + Store (Multiply (0x21, 0x0A), Local7) Debug = "++++++++ Checking result from MULTIPLY" If (Local6 != Local7) { @@ -1453,7 +1436,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Debug = "++++++++ Divide (100, 9, Local1, Local2)" Divide (0x64, 0x09, Local1, Local2) Debug = "++++++++ Store (Divide (100, 9), Local3)" - Local3 = (0x64 / 0x09) + Store (Divide (0x64, 0x09, ), Local3) Debug = "++++++++ Checking (quotient) result from DIVIDE" If (Local2 != Local3) { @@ -1736,11 +1719,11 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (REFS, 0, Serialized) { - Buffer BBUF(0x8) = + Name (BBUF, Buffer (0x08) { 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7 /* ........ */ - } - Package NEST (0x2) = + }) + Name (NEST, Package (0x02) { Package (0x06) { @@ -1761,7 +1744,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x15, 0x16 } - } + }) Local5 = RefOf (MAIN) Local1 = CondRefOf (ABCD, Local0) If (Local1 != Zero) @@ -1798,16 +1781,14 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (INDX, 0, Serialized) { - Package STAT (0x4) = - { - } + Name (STAT, Package (0x04) {}) STAT [Zero] = 0x44443333 } Device (IFEL) { - Integer DWRD = One - Integer RSLT = Zero + Name (DWRD, One) + Name (RSLT, Zero) Method (IFNR, 0, NotSerialized) { RSLT = DWRD /* \IFEL.DWRD */ @@ -1938,7 +1919,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TEST, 0, Serialized) { Debug = "++++++++ NoSave Test" - Integer WRD = 0x1234 + Name (WRD, 0x1234) If (0x03 & One) { WRD = One @@ -2321,10 +2302,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Scope (_SB) { - Integer ZER0 = Zero - Integer ZER1 = Zero - Integer ZER2 = Zero - Integer ONE0 = One + Name (ZER0, Zero) + Name (ZER1, Zero) + Name (ZER2, Zero) + Name (ONE0, One) Device (NSTL) { Method (TEST, 0, NotSerialized) @@ -2353,10 +2334,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (RBUF, 0, Serialized) { - Buffer ABUF(0x11) = + Name (ABUF, Buffer (0x11) { "ARBITRARY_BUFFER" - } + }) Local0 = ABUF /* \RTBF.RBUF.ABUF */ Local1 = ObjectType (Local0) If (Local1 != 0x03) @@ -2372,9 +2353,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } Local1 = 0x05 - Buffer BUFR(0x0) = - { - } + Name (BUFR, Buffer (Local1) {}) Local0 = SUBR (BUFR) Local1 = ObjectType (Local0) If (Local1 != 0x03) @@ -2425,7 +2404,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (PRW2) { - Package _PRW (0x2) = + Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake { Package (0x02) { @@ -2434,12 +2413,12 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) }, 0x03 - } // _PRW: Power Resources for Wake + }) } Scope (_GPE) { - Integer ACST = 0xFF + Name (ACST, 0xFF) Method (_L08, 0, NotSerialized) // _Lxx: Level-Triggered GPE { Debug = "Method _GPE._L08 invoked" @@ -2479,32 +2458,32 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (PRW1) { - Package _PRW (0x2) = + Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake { 0x11, 0x03 - } // _PRW: Power Resources for Wake + }) } Device (PWRB) { - Integer _HID = EisaId ("PNP0C0C") /* Power Button Device */ // _HID: Hardware ID - Package _PRW (0x2) = + Name (_HID, EisaId ("PNP0C0C") /* Power Button Device */) // _HID: Hardware ID + Name (_PRW, Package (0x02) // _PRW: Power Resources for Wake { 0x33, 0x03 - } // _PRW: Power Resources for Wake + }) } Scope (_SB) { Device (ACAD) { - String _HID = "ACPI0003" /* Power Source Device */ // _HID: Hardware ID - Package _PCL (0x1) = + Name (_HID, "ACPI0003" /* Power Source Device */) // _HID: Hardware ID + Name (_PCL, Package (0x01) // _PCL: Power Consumer List { _SB - } // _PCL: Power Consumer List + }) OperationRegion (AREG, SystemIO, 0x0372, 0x02) Field (AREG, ByteAcc, NoLock, Preserve) { @@ -2610,34 +2589,34 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) { Device (LNKA) { - Integer _HID = EisaId ("PNP0C0F") /* PCI Interrupt Link Device */ // _HID: Hardware ID - Integer _UID = One // _UID: Unique ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID + Name (_UID, One) // _UID: Unique ID } Device (LNKB) { - Integer _HID = EisaId ("PNP0C0F") /* PCI Interrupt Link Device */ // _HID: Hardware ID - Integer _UID = 0x02 // _UID: Unique ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID + Name (_UID, 0x02) // _UID: Unique ID } Device (LNKC) { - Integer _HID = EisaId ("PNP0C0F") /* PCI Interrupt Link Device */ // _HID: Hardware ID - Integer _UID = 0x03 // _UID: Unique ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID + Name (_UID, 0x03) // _UID: Unique ID } Device (LNKD) { - Integer _HID = EisaId ("PNP0C0F") /* PCI Interrupt Link Device */ // _HID: Hardware ID - Integer _UID = 0x04 // _UID: Unique ID + Name (_HID, EisaId ("PNP0C0F") /* PCI Interrupt Link Device */) // _HID: Hardware ID + Name (_UID, 0x04) // _UID: Unique ID } Device (PCI1) { - String _HID = "PNP0A03" /* PCI Bus */ // _HID: Hardware ID - Integer _ADR = Zero // _ADR: Address - Integer _CRS = Zero // _CRS: Current Resource Settings - Package _PRT (0xC) = + Name (_HID, "PNP0A03" /* PCI Bus */) // _HID: Hardware ID + Name (_ADR, Zero) // _ADR: Address + Name (_CRS, Zero) // _CRS: Current Resource Settings + Name (_PRT, Package (0x0C) // _PRT: PCI Routing Table { Package (0x04) { @@ -2734,10 +2713,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) LNKB, Zero } - } // _PRT: PCI Routing Table + }) Device (PX40) { - Integer _ADR = 0x00070000 // _ADR: Address + Name (_ADR, 0x00070000) // _ADR: Address } } @@ -2768,7 +2747,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (WHLR) { - Integer LCNT = Zero + Name (LCNT, Zero) Method (WIR, 0, NotSerialized) { While (LCNT < 0x04) @@ -2809,15 +2788,15 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) SMBY, 8 } - Integer BYT1 = 0xFF - Integer BYT2 = 0xFF - Integer BRSL = Zero - Integer WRD1 = 0xFFFF - Integer WRD2 = 0xFFFF - Integer WRSL = Zero - Integer DWD1 = Ones - Integer DWD2 = Ones - Integer DRSL = Zero + Name (BYT1, 0xFF) + Name (BYT2, 0xFF) + Name (BRSL, Zero) + Name (WRD1, 0xFFFF) + Name (WRD2, 0xFFFF) + Name (WRSL, Zero) + Name (DWD1, Ones) + Name (DWD2, Ones) + Name (DRSL, Zero) Method (ANDP, 0, NotSerialized) { BRSL = (BYT1 & BYT2) /* \ANDO.BYT2 */ @@ -2991,7 +2970,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TEST, 0, Serialized) { Debug = "++++++++ AndOrOp Test" - Integer RSLT = One + Name (RSLT, One) RSLT = ANDP () If (RSLT == One) { @@ -3019,7 +2998,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (BRKP) { - Integer CNT0 = Zero + Name (CNT0, Zero) Method (BK1, 0, NotSerialized) { BreakPoint @@ -3057,9 +3036,9 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TEST, 0, Serialized) { Debug = "++++++++ AddSubOp Test" - Integer DWRD = 0x12345678 - Integer WRD = 0x1234 - Integer BYT = 0x12 + Name (DWRD, 0x12345678) + Name (WRD, 0x1234) + Name (BYT, 0x12) DWRD = 0x12345678 DWRD += 0x07 If (DWRD != 0x1234567F) @@ -3153,9 +3132,9 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TEST, 0, Serialized) { Debug = "++++++++ IncDecOp Test" - Integer DWRD = 0x12345678 - Integer WRD = 0x1234 - Integer BYT = 0x12 + Name (DWRD, 0x12345678) + Name (WRD, 0x1234) + Name (BYT, 0x12) DWRD = 0x12345678 DWRD++ If (DWRD != 0x12345679) @@ -3246,16 +3225,16 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) SMBY, 8 } - Integer BYT1 = 0xFF - Integer BYT2 = 0xFF - Integer BRSL = Zero - Integer WRD1 = 0xFFFF - Integer WRD2 = 0xFFFF - Integer WRSL = Zero - Integer DWD1 = Ones - Integer DWD2 = Ones - Integer DRSL = Zero - Integer RSLT = One + Name (BYT1, 0xFF) + Name (BYT2, 0xFF) + Name (BRSL, Zero) + Name (WRD1, 0xFFFF) + Name (WRD2, 0xFFFF) + Name (WRSL, Zero) + Name (DWD1, Ones) + Name (DWD2, Ones) + Name (DRSL, Zero) + Name (RSLT, One) Method (ANDL, 2, NotSerialized) { If (Arg0 == Arg1) @@ -3575,14 +3554,14 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) SMBY, 8 } - Integer BYT1 = One - Integer BRSL = Zero - Integer WRD1 = 0x0100 - Integer WRSL = Zero - Integer DWD1 = 0x00010000 - Integer DRSL = Zero - Integer RSLT = One - Integer CNTR = One + Name (BYT1, One) + Name (BRSL, Zero) + Name (WRD1, 0x0100) + Name (WRSL, Zero) + Name (DWD1, 0x00010000) + Name (DRSL, Zero) + Name (RSLT, One) + Name (CNTR, One) Method (SHFT, 2, NotSerialized) { Local0 = Arg0 @@ -3746,10 +3725,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TEST, 0, Serialized) { Debug = "++++++++ MulDivOp Test" - Integer RMDR = Zero - Integer DWRD = 0x12345678 - Integer WRD = 0x1234 - Integer BYT = 0x12 + Name (RMDR, Zero) + Name (DWRD, 0x12345678) + Name (WRD, 0x1234) + Name (BYT, 0x12) DWRD = 0x12345678 DWRD *= 0x03 If (DWRD != 0x369D0368) @@ -3870,18 +3849,18 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) SMBY, 8 } - Integer BYT1 = 0xFF - Integer BYT2 = 0xFF - Integer BRSL = Zero - Integer WRD1 = 0xFFFF - Integer WRD2 = 0xFFFF - Integer WRSL = Zero - Integer DWD1 = Ones - Integer DWD2 = Ones - Integer DRSL = Zero - Integer RSLT = One - Integer ARSL = Zero - Integer LRSL = Zero + Name (BYT1, 0xFF) + Name (BYT2, 0xFF) + Name (BRSL, Zero) + Name (WRD1, 0xFFFF) + Name (WRD2, 0xFFFF) + Name (WRSL, Zero) + Name (DWD1, Ones) + Name (DWD2, Ones) + Name (DRSL, Zero) + Name (RSLT, One) + Name (ARSL, Zero) + Name (LRSL, Zero) Method (NNDB, 2, NotSerialized) { SMDW = Ones @@ -4093,16 +4072,16 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) SMBY, 8 } - Integer SHFC = Zero - Integer BYT1 = 0xFF - Integer BRSL = Zero - Integer WRD1 = 0xFFFF - Integer WRSL = Zero - Integer DWD1 = Ones - Integer DRSL = Zero - Integer RSLT = One - Integer ARSL = Zero - Integer LRSL = Zero + Name (SHFC, Zero) + Name (BYT1, 0xFF) + Name (BRSL, Zero) + Name (WRD1, 0xFFFF) + Name (WRSL, Zero) + Name (DWD1, Ones) + Name (DRSL, Zero) + Name (RSLT, One) + Name (ARSL, Zero) + Name (LRSL, Zero) Method (SLFT, 2, NotSerialized) { SMDW = Ones @@ -4582,8 +4561,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TEST, 0, NotSerialized) { Debug = "++++++++ CrBytFld Test" - Local0 = 0x04 - } + Local0 = Buffer (0x04) {} CreateByteField (Local0, Zero, BF0) Local1 = ObjectType (Local0) If (Local1 != 0x03) @@ -5394,13 +5372,13 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } } - Package PKG0 (0x3) = + Name (PKG0, Package (0x03) { 0x0123, 0x4567, 0x89AB - } - Package PKG1 (0x3) = + }) + Name (PKG1, Package (0x03) { Package (0x03) { @@ -5422,38 +5400,30 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x3210, 0x1234 } - } - Package PKG2 (0x4) = + }) + Name (PKG2, Package (0x04) { 0x0123, 0x4567, 0x89AB, 0x8888 - } - Package PKG3 (0x5) = + }) + Name (PKG3, Package (0x05) { 0x0123, 0x4567, 0x89AB, 0x8888, 0x7777 - } - String STR0 = "ACPI permits very flexible methods of expressing a system" - String STR1 = "MIKE permits very flexible methods of expressing a system" - String STR2 = "Needless to say, Mike and ACPI are frequently at odds" - String STR3 = "12345" - Buffer BUF0(0xA) = - { - } - Buffer BUF1(0xA) = - { - } - Buffer BUF2(0x8) = - { - } - Buffer BUF3(0x5) = - { - } + }) + Name (STR0, "ACPI permits very flexible methods of expressing a system") + Name (STR1, "MIKE permits very flexible methods of expressing a system") + Name (STR2, "Needless to say, Mike and ACPI are frequently at odds") + Name (STR3, "12345") + Name (BUF0, Buffer (0x0A) {}) + Name (BUF1, Buffer (0x0A) {}) + Name (BUF2, Buffer (0x08) {}) + Name (BUF3, Buffer (0x05) {}) Device (SZLV) { Method (CMPR, 2, NotSerialized) @@ -5531,7 +5501,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Local0 = ^C005.C013.C058.C07E /* \_SB_.C005.C013.C058.C07E */ Release (_GL) Local0 &= 0x10 - Local1 = (Local0 >> 0x04) + Store (ShiftRight (Local0, 0x04), Local1) If (Local1 == Zero) { Return (One) @@ -5559,8 +5529,8 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } Mutex (C01F, 0x00) - Integer C020 = Zero - Integer C021 = Zero + Name (C020, Zero) + Name (C021, Zero) Method (C022, 0, NotSerialized) { Acquire (C01F, 0xFFFF) @@ -5579,7 +5549,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) { Device (C058) { - String _HID = "*PNP0A06" // _HID: Hardware ID + Name (_HID, "*PNP0A06") // _HID: Hardware ID OperationRegion (C059, SystemIO, 0xE0, 0x02) Field (C059, ByteAcc, NoLock, Preserve) { @@ -5663,12 +5633,11 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Mutex (C08B, 0x00) Mutex (C08C, 0x00) Mutex (C08D, 0x00) - Integer C08E = 0xFFFFFFFD - Integer C08F = Zero + Name (C08E, 0xFFFFFFFD) + Name (C08F, Zero) Method (C0AA, 4, NotSerialized) { - Local7 = 0x04 - } + Local7 = Buffer (0x04) {} CreateByteField (Local7, Zero, C0AB) CreateByteField (Local7, One, C0AC) CreateByteField (Local7, 0x02, C0AD) @@ -5710,7 +5679,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Scope (_TZ) { - Package C18B (0x2) = + Name (C18B, Package (0x02) { Package (0x02) { @@ -5753,8 +5722,8 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x0FA2 } } - } - Package C18C (0x2) = + }) + Name (C18C, Package (0x02) { Package (0x02) { @@ -5772,24 +5741,24 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x32 } } - } - Integer C18D = Zero - Integer C18E = Zero - Integer C18F = Zero - Integer C190 = Zero - Integer C191 = 0x03 - Integer C192 = Zero - Integer C193 = One - Integer C194 = 0x02 + }) + Name (C18D, Zero) + Name (C18E, Zero) + Name (C18F, Zero) + Name (C190, Zero) + Name (C191, 0x03) + Name (C192, Zero) + Name (C193, One) + Name (C194, 0x02) Mutex (C195, 0x00) - Integer C196 = One - Integer C197 = 0x0B9C - Integer C198 = 0x0B9C - Integer C199 = 0xFFFFFFFD - Integer C19A = Zero + Name (C196, One) + Name (C197, 0x0B9C) + Name (C198, 0x0B9C) + Name (C199, 0xFFFFFFFD) + Name (C19A, Zero) Device (C19B) { - Integer RSLT = Zero + Name (RSLT, Zero) Method (XINI, 0, NotSerialized) { C19A = \_SB.C115 () @@ -5827,11 +5796,11 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } } - Buffer BUFR(0xA) = + Name (BUFR, Buffer (0x0A) { /* 0000 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ /* 0008 */ 0x00, 0x00 /* .. */ - } + }) Device (DWDF) { Method (TEST, 0, NotSerialized) @@ -5851,8 +5820,8 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } } - Integer B1LO = 0xAA - Integer B1HI = 0xBB + Name (B1LO, 0xAA) + Name (B1HI, 0xBB) Method (MKW, 2, NotSerialized) { Local0 = (B1HI * 0x0100) @@ -5867,7 +5836,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Debug = "++++++++ DivAddx Test" B1LO = 0x19 B1HI = Zero - Divide (((0x03 * MKW (B1LO, B1HI)) + 0x63), 0x64, Local4, + Divide (Add (Multiply (0x03, MKW (B1LO, B1HI)), 0x63), 0x64, Local4, Local2) If ((0x4A == Local4) && (One == Local2)) { @@ -5938,7 +5907,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (IDX5) { - Integer OSFL = Zero + Name (OSFL, Zero) Method (MCTH, 2, Serialized) { If (SizeOf (Arg0) < SizeOf (Arg1)) @@ -5947,12 +5916,8 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } Local0 = (SizeOf (Arg0) + One) - Buffer BUF0(0x0) = - { - } - Buffer BUF1(0x0) = - { - } + Name (BUF0, Buffer (Local0) {}) + Name (BUF1, Buffer (Local0) {}) BUF0 = Arg0 BUF1 = Arg1 Local1 = ObjectType (BUF0) @@ -6007,12 +5972,12 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (PCI2) { - Integer _HID = EisaId ("PNP0A03") /* PCI Bus */ // _HID: Hardware ID - Integer _ADR = Zero // _ADR: Address - Buffer _CRS(0x1A) = + Name (_HID, EisaId ("PNP0A03") /* PCI Bus */) // _HID: Hardware ID + Name (_ADR, Zero) // _ADR: Address + Name (_CRS, Buffer (0x1A) // _CRS: Current Resource Settings { "_SB_.PCI2._CRS..........." - } // _CRS: Current Resource Settings + }) Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0F) @@ -6020,17 +5985,17 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (ISA) { - Integer _ADR = 0x00030000 // _ADR: Address + Name (_ADR, 0x00030000) // _ADR: Address Device (EC0) { - Integer _GPE = Zero // _GPE: General Purpose Events - Integer _ADR = 0x00030000 // _ADR: Address + Name (_GPE, Zero) // _GPE: General Purpose Events + Name (_ADR, 0x00030000) // _ADR: Address Method (_STA, 0, NotSerialized) // _STA: Status { Return (0x0F) } - Buffer _CRS = ResourceTemplate () + Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings { IO (Decode16, 0x0062, // Range Minimum @@ -6044,7 +6009,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x01, // Alignment 0x01, // Length ) - } // _CRS: Current Resource Settings + }) OperationRegion (RAM, SystemMemory, 0x00400000, 0x0100) Field (RAM, AnyAcc, NoLock, Preserve) { @@ -6079,11 +6044,11 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (IDX0) { - Integer _HID = EisaId ("PNP0C0A") /* Control Method Battery */ // _HID: Hardware ID - Package _PCL (0x1) = + Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */) // _HID: Hardware ID + Name (_PCL, Package (0x01) // _PCL: Power Consumer List { _SB - } // _PCL: Power Consumer List + }) Method (_STA, 0, NotSerialized) // _STA: Status { If (^^PCI2.ISA.EC0.BAT0) @@ -6098,9 +6063,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (_BIF, 0, Serialized) // _BIF: Battery Information { - Package BUFR (0xD) = - { - } + Name (BUFR, Package (0x0D) {}) BUFR [Zero] = ^^PCI2.ISA.EC0.BPU0 /* \_SB_.PCI2.ISA_.EC0_.BPU0 */ BUFR [One] = ^^PCI2.ISA.EC0.BDC0 /* \_SB_.PCI2.ISA_.EC0_.BDC0 */ BUFR [0x02] = ^^PCI2.ISA.EC0.BFC0 /* \_SB_.PCI2.ISA_.EC0_.BFC0 */ @@ -6119,13 +6082,13 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (_BST, 0, Serialized) // _BST: Battery Status { - Package BUFR (0x4) = + Name (BUFR, Package (0x04) { One, 0x0100, 0x76543210, 0x0180 - } + }) Return (BUFR) /* \_SB_.IDX0._BST.BUFR */ } @@ -6137,9 +6100,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TEST, 0, Serialized) { Debug = "++++++++ IndexOp Test" - Package PBUF (0x4) = - { - } + Name (PBUF, Package (0x04) {}) PBUF [Zero] = 0x01234567 PBUF [One] = 0x89ABCDEF PBUF [0x02] = 0xFEDCBA98 @@ -6171,11 +6132,11 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Return (0x21) } - Buffer BUFR(0x10) = + Name (BUFR, Buffer (0x10) { /* 0000 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* ........ */ /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* ........ */ - } + }) BUFR [Zero] = 0x01234567 BUFR [0x04] = 0x89ABCDEF BUFR [0x08] = 0xFEDCBA98 @@ -6320,15 +6281,15 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Scope (_SB) { - Integer C174 = 0x0D - Integer C175 = 0x08 + Name (C174, 0x0D) + Name (C175, 0x08) Device (C158) { - String _HID = "ACPI0003" /* Power Source Device */ // _HID: Hardware ID - Package _PCL (0x1) = + Name (_HID, "ACPI0003" /* Power Source Device */) // _HID: Hardware ID + Name (_PCL, Package (0x01) // _PCL: Power Consumer List { _SB - } // _PCL: Power Consumer List + }) Method (_PSR, 0, NotSerialized) // _PSR: Power Source { Acquire (_GL, 0xFFFF) @@ -6338,21 +6299,21 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } } - Package C176 (0x4) = + Name (C176, Package (0x04) { "Primary", "MultiBay", "DockRight", "DockLeft" - } - Package C177 (0x4) = + }) + Name (C177, Package (0x04) { 0x99F5, 0x99F5, 0x995F, 0x995F - } - Package C178 (0x4) = + }) + Name (C178, Package (0x04) { Package (0x04) { @@ -6385,15 +6346,15 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x966B, 0x4190 } - } - Package C179 (0x4) = + }) + Name (C179, Package (0x04) { Zero, Zero, 0x966B, 0x4190 - } - Package C17A (0x4) = + }) + Name (C17A, Package (0x04) { Package (0x03) { @@ -6422,10 +6383,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Zero, Zero } - } + }) Method (C17B, 1, Serialized) { - Package C17C (0xD) = + Name (C17C, Package (0x0D) { Zero, 0x99F5, @@ -6440,7 +6401,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) "(-Unknown-)", "LIon", Zero - } + }) Local0 = (Arg0 & 0x07) Local4 = (Local0 >> One) C178 [Local4] = C179 /* \_SB_.C179 */ @@ -6477,8 +6438,8 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (C154) { - String _HID = "*PNP0C0A" // _HID: Hardware ID - Integer _UID = Zero // _UID: Unique ID + Name (_HID, "*PNP0C0A") // _HID: Hardware ID + Name (_UID, Zero) // _UID: Unique ID Method (_BIF, 0, NotSerialized) // _BIF: Battery Information { Return (C17B (0x30)) @@ -6489,11 +6450,11 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) { Method (LCLB, 0, Serialized) { - Buffer BUFR(0xA) = + Name (BUFR, Buffer (0x0A) { /* 0000 */ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, /* ........ */ /* 0008 */ 0x08, 0x09 /* .. */ - } + }) Local1 = BUFR /* \_SB_.IDX3.LCLB.BUFR */ Local3 = ObjectType (Local1) If (Local3 != 0x03) @@ -6526,7 +6487,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (LCLP, 0, Serialized) { - Package PKG (0xA) = + Name (PKG, Package (0x0A) { Zero, One, @@ -6538,7 +6499,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) 0x07, 0x08, 0x09 - } + }) Local1 = PKG /* \_SB_.IDX3.LCLP.PKG_ */ Local3 = ObjectType (Local1) If (Local3 != 0x04) @@ -6605,11 +6566,13 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (IDX7) { - Package PKG4 (0x5) = + Name (PKG4, Package (0x05) { 0x02, "A short string", - 0x04, 0x0A, 0x0B, 0x0C, 0x0D /* .... */ + Buffer (0x04) + { + 0x0A, 0x0B, 0x0C, 0x0D /* .... */ }, 0x1234, @@ -6618,14 +6581,14 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) IDX7, 0x03 } - } + }) Method (TST1, 0, Serialized) { - Buffer DEST(0x3F) = + Name (DEST, Buffer (0x3F) { "Destination buffer that is longer than the short source buffer" - } - Local1 = DEST [0x02] + }) + Store (Index (DEST, 0x02), Local1) Local2 = ObjectType (Local1) If (Local2 == 0x0E) { @@ -6639,10 +6602,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TST2, 0, Serialized) { - Buffer BUF0(0x5) = + Name (BUF0, Buffer (0x05) { 0x01, 0x02, 0x03, 0x04, 0x05 /* ..... */ - } + }) BUF0 [0x02] = 0x55 Local0 = DerefOf (BUF0 [0x02]) If (Local0 == 0x55) @@ -6657,11 +6620,11 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TST3, 0, Serialized) { - Buffer BUF1(0x5) = + Name (BUF1, Buffer (0x05) { 0x01, 0x02, 0x03, 0x04, 0x05 /* ..... */ - } - Local0 = BUF1 [One] + }) + Store (Index (BUF1, One), Local0) Local1 = DerefOf (Local0) If (Local1 == 0x02) { @@ -6675,7 +6638,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TST4, 0, NotSerialized) { - Local0 = PKG4 [Zero] + Store (Index (PKG4, Zero), Local0) Local1 = ObjectType (Local0) If (Local1 == One) { @@ -6689,7 +6652,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TST5, 0, NotSerialized) { - Local0 = PKG4 [One] + Store (Index (PKG4, One), Local0) Local1 = ObjectType (Local0) If (Local1 == 0x02) { @@ -6703,7 +6666,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TST6, 0, NotSerialized) { - Local0 = PKG4 [0x02] + Store (Index (PKG4, 0x02), Local0) Local1 = ObjectType (Local0) If (Local1 == 0x03) { @@ -6717,7 +6680,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TST7, 0, NotSerialized) { - Local0 = PKG4 [0x03] + Store (Index (PKG4, 0x03), Local0) Local1 = ObjectType (Local0) If (Local1 == One) { @@ -6731,7 +6694,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TST8, 0, NotSerialized) { - Local0 = PKG4 [0x04] + Store (Index (PKG4, 0x04), Local0) Local1 = ObjectType (Local0) If (Local1 == 0x04) { @@ -6827,14 +6790,12 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TSTF, 0, Serialized) { - Buffer SRCB(0xC) = - { - } + Name (SRCB, Buffer (0x0C) {}) SRCB = "Short Buffer" - Buffer DEST(0x3F) = + Name (DEST, Buffer (0x3F) { "Destination buffer that is longer than the short source buffer" - } + }) DEST [0x02] = SRCB /* \IDX7.TSTF.SRCB */ Local0 = DerefOf (DEST [0x02]) If (Local0 != 0x72) @@ -6847,14 +6808,12 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TSTG, 0, Serialized) { - Buffer SRCB(0xC) = - { - } + Name (SRCB, Buffer (0x0C) {}) SRCB = "Short Buffer" - Buffer DEST(0x3F) = + Name (DEST, Buffer (0x3F) { "Destination buffer that is longer than the short source buffer" - } + }) DEST [0x02] = SRCB /* \IDX7.TSTG.SRCB */ Local0 = DerefOf (DEST [0x03]) If (Local0 != 0x74) @@ -6897,10 +6856,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TSTH, 0, Serialized) { - Buffer DBUF(0x1B) = + Name (DBUF, Buffer (0x1B) { "abcdefghijklmnopqrstuvwxyz" - } + }) DBUF [0x02] = 0x12345678 Local0 = DerefOf (DBUF [0x02]) If (Local0 != 0x78) @@ -6931,10 +6890,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TSTI, 0, Serialized) { - Buffer DBUF(0x1B) = + Name (DBUF, Buffer (0x1B) { "abcdefghijklmnopqrstuvwxyz" - } + }) DBUF [0x02] = "ABCDEFGH" Local0 = DerefOf (DBUF [0x02]) If (Local0 != 0x48) @@ -6965,10 +6924,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TSTJ, 0, Serialized) { - Buffer DBUF(0x1B) = + Name (DBUF, Buffer (0x1B) { "abcdefghijklmnopqrstuvwxyz" - } + }) DBUF [0x02] = 0x1234 Local0 = DerefOf (DBUF [0x02]) If (Local0 != 0x34) @@ -6999,10 +6958,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TSTK, 0, Serialized) { - Buffer DBUF(0x1B) = + Name (DBUF, Buffer (0x1B) { "abcdefghijklmnopqrstuvwxyz" - } + }) DBUF [0x02] = 0x00123456 Local0 = DerefOf (DBUF [0x02]) If (Local0 != 0x56) @@ -7033,10 +6992,10 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TSTL, 0, Serialized) { - Buffer DBUF(0x1B) = + Name (DBUF, Buffer (0x1B) { "abcdefghijklmnopqrstuvwxyz" - } + }) DBUF [0x02] = 0x12 Local0 = DerefOf (DBUF [0x02]) If (Local0 != 0x12) @@ -7191,7 +7150,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (TEST, 0, Serialized) { Debug = "++++++++ MatchOp Test" - Package TIM0 (0x8) = + Name (TIM0, Package (0x08) { Package (0x04) { @@ -7259,11 +7218,11 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Zero, Zero } - } - Buffer TMD0(0x14) = + }) + Name (TMD0, Buffer (0x14) { 0xFF, 0xFF, 0xFF, 0xFF /* .... */ - } + }) CreateDWordField (TMD0, Zero, PIO0) CreateDWordField (TMD0, 0x04, DMA0) CreateDWordField (TMD0, 0x08, PIO1) @@ -7378,8 +7337,8 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (WHLB) { - Integer CNT0 = Zero - Integer CNT1 = Zero + Name (CNT0, Zero) + Name (CNT1, Zero) Method (TEST, 0, NotSerialized) { CNT0 = Zero @@ -7476,8 +7435,8 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) { Device (MEM) { - Integer _HID = EisaId ("PNP0C01") /* System Board */ // _HID: Hardware ID - Integer _STA = 0x0F // _STA: Status + Name (_HID, EisaId ("PNP0C01") /* System Board */) // _HID: Hardware ID + Name (_STA, 0x0F) // _STA: Status OperationRegion (SMEM, SystemMemory, 0x00800000, 0x0100) Field (SMEM, AnyAcc, NoLock, Preserve) { @@ -7657,12 +7616,12 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Device (BAT1) { - Integer _HID = EisaId ("PNP0C0A") /* Control Method Battery */ // _HID: Hardware ID - Integer _UID = One // _UID: Unique ID - Package _PCL (0x1) = + Name (_HID, EisaId ("PNP0C0A") /* Control Method Battery */) // _HID: Hardware ID + Name (_UID, One) // _UID: Unique ID + Name (_PCL, Package (0x01) // _PCL: Power Consumer List { _SB - } // _PCL: Power Consumer List + }) Method (_STA, 0, NotSerialized) // _STA: Status { If (^^MEM.BES1) @@ -7677,9 +7636,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (_BIF, 0, Serialized) // _BIF: Battery Information { - Package BUFR (0xD) = - { - } + Name (BUFR, Package (0x0D) {}) BUFR [Zero] = ^^MEM.BPU1 /* \_SB_.MEM_.BPU1 */ BUFR [One] = ^^MEM.BDC1 /* \_SB_.MEM_.BDC1 */ BUFR [0x02] = ^^MEM.BLF1 /* \_SB_.MEM_.BLF1 */ @@ -7701,15 +7658,15 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) { Method (B2IB, 0, Serialized) { - Buffer SRCB(0xD) = + Name (SRCB, Buffer (0x0D) { "Short Buffer" - } - Buffer DEST(0x3F) = + }) + Name (DEST, Buffer (0x3F) { "Destination buffer that is longer than the short source buffer" - } - Local1 = DEST [0x02] + }) + Store (Index (DEST, 0x02), Local1) Local2 = ObjectType (Local1) If (Local2 != 0x0E) { @@ -7822,9 +7779,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (FB2P, 0, Serialized) { - Package DEST (0x2) = - { - } + Name (DEST, Package (0x02) {}) ^^MEM.SMD0 = 0x01234567 ^^MEM.SMD1 = 0x89ABCDEF ^^MEM.SMD2 = 0xFEDCBA98 @@ -7960,32 +7915,26 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (SARG, 0, Serialized) { - Buffer BUFR(0xC) = - { - } - Buffer BUF1(0x5) = + Name (BUFR, Buffer (0x0C) {}) + Name (BUF1, Buffer (0x05) { 0x01, 0x02, 0x03, 0x04, 0x05 /* ..... */ - } - Package PKG0 (0x4) = - { - } - String STR0 = "String" - Package PKG1 (0x4) = + }) + Name (PKG0, Package (0x04) {}) + Name (STR0, "String") + Name (PKG1, Package (0x04) { BUFR, "String2", STR0, PKG0 - } - Package PKG2 (0x4) = + }) + Name (PKG2, Package (0x04) { - 0x0F - }, - + Buffer (0x0F) {}, "String 1", Package (0x02) {} - } + }) Local0 = SAR0 (BUFR, 0x0C) Local1 = ObjectType (Local0) If (Local1 != One) @@ -8136,9 +8085,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (SBUF, 0, Serialized) { - Buffer BUFR(0xC) = - { - } + Name (BUFR, Buffer (0x0C) {}) Local0 = SizeOf (BUFR) Local1 = ObjectType (Local0) If (Local1 != One) @@ -8157,13 +8104,9 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) Method (SLOC, 0, Serialized) { - Buffer BUFR(0xC) = - { - } - String STR0 = "String" - Package PKG0 (0x4) = - { - } + Name (BUFR, Buffer (0x0C) {}) + Name (STR0, "String") + Name (PKG0, Package (0x04) {}) Local2 = BUFR /* \SIZO.SLOC.BUFR */ Local0 = SizeOf (Local2) Local1 = ObjectType (Local0) @@ -8442,7 +8385,7 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) } } - Buffer WQAB(0x1A64) = + Name (WQAB, Buffer (0x1A64) { /* 0000 */ 0x46, 0x4F, 0x4D, 0x42, 0x01, 0x00, 0x00, 0x00, /* FOMB.... */ /* 0008 */ 0x54, 0x1A, 0x00, 0x00, 0xBA, 0xAD, 0x00, 0x00, /* T....... */ @@ -9289,6 +9232,6 @@ DefinitionBlock ("", "DSDT", 1, "Intel", "GRMTEST", 0x20090511) /* 1A50 */ 0x06, 0x40, 0x40, 0x68, 0x4E, 0x30, 0xAA, 0xA8, /* .@@hN0.. */ /* 1A58 */ 0xD1, 0xD1, 0x84, 0x82, 0x50, 0xDD, 0x2F, 0x4E, /* ....P./N */ /* 1A60 */ 0x81, 0xF8, 0xFF, 0x0F /* .... */ - } + }) }