1    /*
2     * Some or all of this work - Copyright (c) 2006 - 2021, Intel Corp.
3     * All rights reserved.
4     *
5     * Redistribution and use in source and binary forms, with or without modification,
6     * are permitted provided that the following conditions are met:
7     *
8     * Redistributions of source code must retain the above copyright notice,
9     * this list of conditions and the following disclaimer.
10     * Redistributions in binary form must reproduce the above copyright notice,
11     * this list of conditions and the following disclaimer in the documentation
12     * and/or other materials provided with the distribution.
13     * Neither the name of Intel Corporation nor the names of its contributors
14     * may be used to endorse or promote products derived from this software
15     * without specific prior written permission.
16     *
17     * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18     * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19     * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20     * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
21     * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22     * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23     * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24     * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
25     * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
26     * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27     */
28    /*
29     * Run Tests Parameters Technique (RTPT)
30     *
31     * These parameters have effect only when
32     * running a group of tests (collections)
33     * such as all Functional tests, all Complex
34     * tests, all Exceptions tests, Full test
35     * (all enumerated above tests).
36     *
37     * Main flag:
38     * 0 - run unconditionally all tests
39     * 1 - run all the tests with non-zero params
40     * 2 - run all the tests with zero params
41     * 3 - run all the tests with params equal to RUN1
42     * 4 - run a particular test specified by:
43     *     RUN2 - index of collection
44     *     RUN3 - index of the test inside the collection
45     */
46    Name (RUN0, 0x00)   /* main flag */
47    Name (RUN1, 0x00)   /* level */
48    Name (RUN2, 0x00)   /* collection */
49    Name (RUN3, 0x00)   /* test */
50    Name (RTPT, 0x00)   /* validity of RTPT mode */
51    /* FUNCTIONAL */
52
53    Name (W000, 0x00) /* arithmetic */
54    Name (W001, 0x00) /* bfield */
55    Name (W002, 0x00) /* constant */
56    Name (W003, 0x00) /* control */
57    Name (W004, 0x00) /* descriptor */
58    Name (W005, 0x00) /* extern */
59    Name (W006, 0x00) /* local */
60    Name (W007, 0x00) /* logic */
61    Name (W008, 0x00) /* manipulation */
62    Name (W009, 0x00) /* name */
63    Name (W00A, 0x00) /* reference */
64    Name (W00B, 0x00) /* region */
65    Name (W00C, 0x00) /* synchronization */
66    Name (W00D, 0x00) /* table */
67    Name (W01A, 0x00) /* module */
68    /* COMPLEX */
69
70    Name (W00E, 0x00) /* misc */
71    Name (W00F, 0x00) /* provoke */
72    Name (W010, 0x00) /* operand */
73    Name (W011, 0x00) /* result */
74    Name (W012, 0x00) /* namespace */
75    Name (W022, 0x00) /* badasl */
76    /* EXCEPTIONS */
77
78    Name (W013, 0x00) /* exc */
79    Name (W014, 0x00) /* exc_operand */
80    Name (W015, 0x00) /* exc_result */
81    Name (W016, 0x00) /* exc_ref */
82    /* DEMO */
83
84    Name (W017, 0x00) /* Bugs (0-N) */
85    /* IMPL */
86
87    Name (W021, 0x00) /* dynobj */
88    /* SERVICE */
89
90    Name (W018, 0x00) /* condbranches */
91    /* Identity2MS */
92
93    Name (W019, 0x00) /* abbu */
94    /* Reserved names */
95
96    Name (W020, 0x00)
97    /*
98     * Set RTPT technique.
99     * Should be invoked in MAIN files of
100     * ALL functional, complex, exceptions,...
101     */
102    Method (SRTP, 1, NotSerialized)
103    {
104        RTPT = Arg0
105    }
106
107    /*
108     * Set up the particular desirable set of tests to be run
109     *
110     * These parameters have effect only when
111     * running a group of test cases or even
112     * collections) such as all Functional tests,
113     * all Complex tests, all Exceptions tests,
114     * Full test (all enumerated above tests)
115     * compiled all as one DefinitionBlock.
116     *
117     * Parameters:
118     *
119     * RUN0 - main flag
120     * 0 - run unconditionally all tests
121     * 1 - run all the tests with non-zero params
122     * 2 - run all the tests with zero params
123     * 3 - run all the tests with params equal to RUN1
124     * 4 - run a particular test specified by:
125     *     RUN2 - index of collection
126     *            1 - functional
127     *            2 - complex
128     *            3 - exceptions
129     *     RUN3 - index of the test inside the collection
130     * RUN1 - level
131     * RUN2 - collection
132     * RUN3 - test
133     */
134    Method (RTPI, 0, NotSerialized)
135    {
136        /* PARAMETERS OF MODE */
137
138        RUN0 = 0x00 /* main flag */
139        RUN1 = 0x00 /* level */
140        RUN2 = 0x01 /* collection */
141        RUN3 = 0x03 /* test */
142        /* FUNCTIONAL, collection # 1 */
143
144        W000 = 0x01 /* arithmetic        0 */
145        W001 = 0x01 /* bfield            1 */
146        W002 = 0x01 /* constant          2 */
147        W003 = 0x01 /* control           3 */
148        W004 = 0x01 /* descriptor        4 */
149        W005 = 0x01 /* extern            5 */
150        W006 = 0x01 /* local             6 */
151        W007 = 0x01 /* logic             7 */
152        W008 = 0x01 /* manipulation      8 */
153        W009 = 0x01 /* name              9 */
154        W00A = 0x01 /* reference        10 */
155        W00B = 0x01 /* region           11 */
156        W00C = 0x01 /* synchronization  12 */
157        W00D = 0x01 /* table            13 */
158        /* COMPLEX, collection # 2 */
159
160        W00E = 0x01 /* misc              0 */
161        W00F = 0x01 /* provoke           1 */
162        W010 = 0x01 /* operand           2 */
163        W011 = 0x01 /* result            3 */
164        W021 = 0x01 /* dynobj            4 */
165        W012 = 0x01 /* RESERVED, not in use */
166        /* EXCEPTIONS, collection # 3 */
167
168        W013 = 0x01 /* exc               0 */
169        W014 = 0x01 /* exc_operand       1,2 */
170        W015 = 0x01 /* exc_result        3,4 */
171        W016 = 0x01 /* exc_ref           5 */
172        W019 = 0x01 /* exc_tbl           6 */
173        /* DEMO */
174
175        W017 = 0x01 /* Bugs (0-N)		0 */
176        /* SERVICE */
177
178        W018 = 0x01 /* condbranches	0 */
179    }
180
181    /*
182     * Variables below allow to exclude code which causes crashes
183     * or hangs or prevents execution of other tests.
184     *
185     * ATTENTION: all these variables should be set to 1 eventually
186     *            (after all bugs fixing).
187     *
188     * Format of variable name: y<xxx> - xxx is the number of bug
189     *        0 - do not run
190     * non-zero - run
191     *
192     * ATTENTION: see all the qXXX & rnXX conditions of the particular
193     *            tests (which also provide the temporary exclusion).
194     *
195     * ATTENTION: all disablings must go through this technique of
196     *            y<xxx> disable/enable variables.
197     *
198     * y<xxx>   - prevents undesirable consequences of the surrounded
199     *            code (crashes, hangs etc. of tests). Should be finally
200     *            set to non-zero (after the product-bug fixing) so
201     *            enabling execution of the surrounded code.
202     * X<xxx>   - surrounds particular Bugs. Used mostly to point out
203     *            the reasons of test failures (xxx - number of bug)
204     *            not to review the results of tests each time anew.
205     *            So, as a rule these variables are set to non-zero.
206     */
207    /*
208     * Bugs
209     */
210    Name (Y078, 0x00)
211    Name (Y083, 0x00)
212    Name (Y084, 0x01)
213    Name (Y098, 0x01)
214    Name (Y100, 0x00)
215    Name (Y103, 0x01)
216    Name (Y104, 0x01)
217    Name (Y105, 0x01)
218    Name (Y106, 0x00)
219    Name (Y111, 0x01)
220    Name (Y113, 0x00)
221    Name (Y114, 0x00)
222    Name (Y118, 0x00)   /* elements of Package are NamedX, failed access to Field Unit and Buffer Field */
223    Name (Y119, 0x00)
224    Name (Y120, 0x00)
225    Name (Y121, 0x00)
226    Name (Y126, 0x00)
227    Name (Y127, 0x00)   /* Automatic dereference of Index in CopyObject */
228    Name (Y128, 0x01)
229    Name (Y132, 0x00)
230    Name (Y133, 0x00)   /* Write access automatic dereference for Index reference */
231    Name (Y134, 0x00)
232    Name (Y135, 0x00)
233    Name (Y136, 0x01)   /* CopyObject(A, B) for Buffers causes implicit */
234    Name (Y157, 0x01)   /* problems when ParameterTypes declaration data omitted */
235    Name (Y164, 0x01)   /* tests m22d and m26b of reference test */
236    Name (Y176, 0x00)
237    Name (Y178, 0x01)   /* Non-constant Bank values works since ACPICA release 20071211 */
238    Name (Y182, 0x01)
239    Name (Y192, 0x01)   /* AcpiExec is able to emulate access to BankField Objects since ACPICA release 20071211 */
240    Name (Y200, 0x00)   /* The code path taken after exception in AcpiPsParseLoop is incorrect */
241    Name (Y203, 0x00)   /* ObjectType operation falls into infinite loop for ring of RefOf references */
242    Name (Y204, 0x00)   /* SizeOf operation falls into infinite loop for ring of RefOf references */
243    Name (Y205, 0x00)   /* Store-to-Debug operation falls into infinite loop for ring of RefOf references */
244    Name (Y206, 0x00)   /* ObjectType operation falls into infinite loop for ring of Index references */
245    Name (Y207, 0x00)   /* SizeOf operation falls into infinite loop for ring of Index references */
246    Name (Y208, 0x00)   /* Store-to-Debug operation falls into infinite loop for ring of Index references */
247    Name (Y213, 0x00)   /* Crash */
248    Name (Y214, 0x00)   /* Crash on repeated duplication of an OpRegion by CopyObject */
249    Name (Y215, 0x00)   /* Exception AE_BUFFER_OVERFLOW when IndexName Field exceeds 32 bits */
250    Name (Y216, 0x00)   /* exception AE_NOT_FOUND on CreateField under specific conditions */
251    Name (Y217, 0x00)   /* Dynamic OpRegion _REG method execution problem */
252    Name (Y220, 0x00)   /* Inconsistent "Access is available/unavailable" _REG method calls */
253    Name (Y221, 0x01)   /* Alternating access to OpRegions covering different ranges */
254    Name (Y222, 0x00)   /* Alternating access to OpRegions of different Address Spaces */
255    Name (Y223, 0x01)   /* DataTableRegion with the non-constant *Strings works since ACPICA release 20071211 */
256    Name (Y224, 0x00)   /* AcpiExec is unable to emulate access to IndexField Objects */
257    Name (Y238, 0x00)   /* the jumping over levels in releasing mutexes is not prohibited */
258    Name (Y242, 0x00)   /* Releasing the mutex the first Acquired on the non-zero level makes Releasing the residuary mutexes of that level impossible */
259    Name (Y243, 0x00)   /* the normal work with mutexes is broken after the mutex Release order violation */
260    Name (Y248, 0x00)   /* Incorrect ReferenceCount on Switch operation */
261    Name (Y251, 0x00)   /* AE_ALREADY_EXISTS on multi-threading on Switch operator */
262    Name (Y260, 0x00)   /* AE_AML_TARGET_TYPE on writing NewObj to ArgX [RefOf(OldObj)] instead of RefOf(NewObj) */
263    Name (Y261, 0x00)   /* Crash when DDBHandle parameter of Load is an Indexed Reference */
264    Name (Y262, 0x00)   /* Unexpected AE_STACK_OVERFLOW for a method call expression with nested calls */
265    Name (Y263, 0x00)   /* The sequence of evaluating operands of expression with the named objects is violated */
266    Name (Y264, 0x00)   /* Crash on re-writing named element of Package */
267    Name (Y275, 0x00)   /* Pop result from bottom principle doesn't work */
268    Name (Y276, 0x00)   /* 'Large Reference Count' on AML code with LoadTable/UnLoad in a slack mode */
269    Name (Y281, 0x00)   /* Normal strings as the LoadTable parameters can cause the matching table to be not found */
270    Name (Y282, 0x00)   /* Crash when the Buffer Object parameter of Load is used after an exception in it */
271    Name (Y283, 0x01)   /* When the Object parameter of Load is a Field the checksum of the supplied SSDT should be verified */
272    Name (Y284, 0x01)   /* An exception should be emitted on Load if the Length field of SSDT exceeds length of its source */
273    Name (Y286, 0x01)   /* After an exception the elements of the Package passed to Unload are unexpectedly deleted */
274    Name (Y287, 0x00)   /* If any string to match a proper field on LoadTable exceeds field's length an exception should be emitted */
275    Name (Y288, 0x00)   /* iASL unexpectedly forbids ParameterData of Loadtable to be LocalX or UserTerm */
276    Name (Y289, 0x00)   /* Search of the table matched Loadtable parameters should be restricted to XSDT */
277    Name (Y290, 0x00)   /* AcpiExec is unable to emulate Load from OpRegion */
278    Name (Y292, 0x00)   /* Different second and third UnLoad execution with the same argument behavior */
279    Name (Y293, 0x00)   /* Incorrect zero-length Buffer to String conversion */
280    Name (Y294, 0x00)   /* _ERR method can not be evaluated when AE_OWNER_ID_LIMIT is emitted */
281    Name (Y296, 0x00)   /* AE_AML_INTERNAL unexpectedly occurs when the Loadtable ParameterData and its Target differ in the types */
282    Name (Y297, 0x00)   /* After AE_LIMIT the further work of ACPICA mutex framework looks unstable */
283    Name (Y300, 0x00)   /* Recursive calls to methods with the internal names (and Switches) should be provided */
284    Name (Y301, 0x00)   /* Recursive call on the same thread to the Serialized method with the internal objects (Switches) causes AE_AML_INTERNAL */
285    Name (Y302, 0x00)   /* Scope operation doesn't work for the root node Location */
286    /*
287     * Issues (replace them with the Bug indexes)
288     */
289    Name (Y349, 0x00)   /* to clarify what is the proper behaviour when Serialized Method is invoked recursively (now hangs) */
290    Name (Y350, 0x00)   /* TermalZone AE_AML_NO_RETURN_VALUE exception */
291    Name (Y361, 0x00)   /* OperationRegion in Result tests */
292    Name (Y362, 0x00)   /* Investigate and uncomment m4ba */
293    Name (Y364, 0x00)   /* if (Derefof(Refof(bf76))) exception in m61b-m06e */
294    Name (Y365, 0x00)   /* Increment(Derefof(Refof(bf76))) exception in m61b-m64l */
295    Name (Y366, 0x00)   /* exception on Store(Package, Derefof(Arg(Int/Str/Buf))) */
296    Name (Y367, 0x00)   /* Increment(Refof(Named))) exception in m692-m00b */
297    Name (Y500, 0x00)   /* Deletion of Named Object due to DeRefOf(m000()) */
298    Name (Y501, 0x00)   /* Increment/Decrement for String/Buffer Named Object */
299    Name (Y502, 0x00)   /* Exceptions on DeRefOf(Index(p000, 0)) */
300    Name (Y503, 0x00)   /* AE_AML_OPERAND_TYPE => AE_AML_NO_RETURN_VALUE */
301    Name (Y504, 0x00)   /* Exception on CopyObject(ThermalZone, ...) */
302    Name (Y505, 0x00)   /* Buffer Field and Field Unit types should allow SizeOf() */
303    Name (Y506, 0x00)   /* exc_ref: crash for DerefOf */
304    Name (Y507, 0x00)   /* ref: read of ArgX-RefOf_References without DerefOf */
305    Name (Y508, 0x00)   /* all about ThermalZone */
306    Name (Y509, 0x00)   /* all about Method */
307    Name (Y510, 0x00)   /* all about OperationRegion */
308    Name (Y511, 0x00)   /* all about Device */
309    Name (Y512, 0x00)   /* the checking causes unexpected exception */
310    Name (Y513, 0x00)   /* m005(Index(s021, 1, Local0), RefOf(i020)) */
311    /* m005(RefOf(i000), RefOf(i061)) */
312
313    Name (Y514, 0x00)   /* repeated attempts to overwrite RefOf_Reference-ArgX cause exceptions */
314    /* Name(y515, 0)	// Uninitialized element of Package (the same as y127) */
315
316    Name (Y516, 0x00)   /* write from {Integer/String/Buffer} to Package */
317    Name (Y517, 0x00)   /* Buffer Field (and Field Unit) as elements of Package */
318    Name (Y518, 0x00)   /* utdelete-0487 [07] UtUpdateRefCount : **** Warning */
319    /* **** Large Reference Count (EAEA) in object 00466BC8 */
320
321    Name (Y519, 0x00)   /* ArgX term effectively becomes a LocalX term */
322    /* Store(x,ArgX-Object) should be identical to Store(x,LocalX) */
323
324    Name (Y520, 0x00)   /* ArgX term effectively becomes a LocalX term */
325    /* CopyObject(x,ArgX-Object) should be identical to CopyObject(x,LocalX) */
326    /* Now, DerefOf(arg0) causes exception */
327    Name (Y521, 0x00)   /* Store reference to NamedX */
328    Name (Y522, 0x01)   /* CopyObject reference to NamedX */
329    Name (Y523, 0x00)   /* Store(RefOf(NamedX), NamedX) */
330    Name (Y524, 0x00)   /* Store(RefOf(NamedX), DerefOf(Expr_resulting_in_ORef)) */
331    Name (Y525, 0x00)   /* Store(RefOf(NamedX), RefOf(Named_X)) */
332    Name (Y526, 0x00)   /* CopyObject(RefOf(NamedX), ArgX-ORef-to-Named_X) */
333    Name (Y527, 0x00)   /* The code path taken after AE_OWNER_ID_LIMIT is incorrect */
334    Name (Y600, 0x00)   /* Some oprators (not all) doesn't provide passing invocation */
335    /* of Method as a parameter to them (though iASL succeeds). */
336    /* Looks that Method is simply not invoked. But, since it doesn't */
337    /* now look as an important feature for those particular operators */
338    /* we don't file bug in this respect but exclude tesing. */
339    Name (Y601, 0x00)   /* The Reference issues to be thought over in the future */
340    Name (Y602, 0x01)   /* generalized - new specs of String to Integer conversion */
341    Name (Y603, 0x00)   /* bunch of anomalies with references to be splited to separate bugs, */
342    /* mostly - cyclical references (rings of references). */
343
344    Name (Y900, 0x00)   /* Allow immediate Index(Buffer(){}), Index("qwerty"), Index(Package(){}) */
345    Name (Y901, 0x01)   /* Predicate generates Implicit Return */
346    Name (Y902, 0x01)   /* Expected is that Serialized method being invoked recursively on the same thread: */
347    /* 1) 0 - doesn't cause */
348    /* 2) otherwise - causes */
349    /* exception in case it has either internal objects (including Methods) or Switches */
350    /*
351     * functional/reference
352     *
353     * Exclude temporary the relevant checking.
354     *
355     * All them should be set to non-zero after
356     * clarifying the relevant issue, or provided
357     * with the comment clarifying what is wrong in
358     * the sub-test - don't remove them even in the
359     * latter case.
360     */
361    Name (Q001, 0x01) /* Dereference of Store(Index(x,x,Index(x,x)), Index(x,x)) */
362    Name (Q002, 0x00) /* The chain of Index_References */
363    Name (Q003, 0x00) /* CURRENTLY: compiler failed CopyObject(xx, Index(xx,xx)) */
364    Name (Q004, 0x00) /* Implicit Operand conversion on MS contradicts ACPI Spec */
365    Name (Q005, 0x00) /* Method object as a Source of Index operation is treated as a call to that Method */
366    Name (Q006, 0x00) /* on MS Name of an Object as an element of Package is treated as String */
367    Name (Q007, 0x00) /* Disregard of the length Buffer Fields on MS are read as Buffers */
368    Name (Q008, 0x00) /* On MS Store to LocalX containing a reference causes indirect access */
369    Name (Q009, 0x00) /* It looks like on MS writing to a narrow Field Unit is splited on pieces */
370    Name (Q00A, 0x00) /* On MS writing to unmodified bits of Field OpRegion implemented differently */
371    Name (Q00B, 0x00) /* On MS Break in Switch is not implemented */
372    /*
373     * The non-zero value flags allow to run the relevant part of sub-tests.
374     *
375     * Each sub-test is conditioned by some rn0*.
376     *
377     * ATTENTION: many sub-tests conditioned by rn01-rn04 are not run now
378     *            in general mode, they should be investigated.
379     */
380    Name (RN00, 0x01) /* Correct, no any remarks */
381    Name (RN01, 0x00) /* Investigation needed */
382    Name (RN02, 0x00) /* Classified as a bug */
383    Name (RN03, 0x00) /* Causes exception */
384    Name (RN04, 0x00) /* Regression */
385    Name (RN05, 0x00) /* Long-time tests of bug-demo collection */
386    Name (RN06, 0x00) /* 1 - CopyObject and Store of Method doesn't evaluate that Method */
387    /*
388     * Indicators of bugs.
389     */
390    Name (X104, 0x01)
391    Name (X114, 0x01)
392    Name (X127, 0x01)
393    Name (X128, 0x01)
394    Name (X131, 0x01)
395    Name (X132, 0x01)
396    Name (X133, 0x01)
397    Name (X153, 0x01) /* Store() to Named Target allows to update the Source */
398    Name (X170, 0x01)
399    Name (X191, 0x01)
400    Name (X192, 0x01)
401    Name (X193, 0x01) /* 32-bit mode optional storing of Not, NAnd, or NOr */
402    /* ASL operators result to Buffer Field produces 64-bit */
403
404    Name (X194, 0x01) /* Unexpected implicit result object conversion when the */
405    /* Target operand of ToBuffer operator is a Named Buffer */
406
407    Name (X195, 0x00) /* Increment and Decrement of an either String or Buffer */
408    /* Object will not change the type of the Object to Integer (~ y501) */
409    /*
410     * Flag, allows (when non-zero) access to the internal objects of method.
411     *
412     * No entry of type Method should occur in the declared path specified for search.
413     */
414    Name (FLG9, 0x00)
415    /*
416     * Set up run4 to non-zero when compile aslts (affects actually only Identity2MS)
417     * for to run on MS, and reset it to zero when compile to run on ACPICA
418     *
419     *   for ACPICA - 0
420     *   for MS     - non-zero
421     */
422    Name (RUN4, 0x00)
423    /*
424     * Current release of ASLTS test suite
425     *
426     * Layout:
427     *   now simply incremental number
428     *
429     * Releases:
430     *
431     *   31.12.2004 - 1
432     *   31.07.2005 - 2
433     *   16.11.2005 - 3
434     *   21.07.2006 - 4, (1115 files), with ACPICA version 20060721 released
435     *   25.12.2006 - 5, (1277 files, 382 folder, 15.3 MB, 2006 tests, 38(44) test cases, 278 bugs of ACPICA)
436     *   01.03.2007 - 6, (1403 files, 415 folder, 17.0 MB, 2227 tests, 40(46) test cases, 305 bugs of ACPICA)
437     *   21.03.2007 - 7, (1409 files, 417 folder, 17.1 MB, 2236 tests, 40(46) test cases, 307 bugs of ACPICA)
438     *   December 2011: - 0x15 (ACPI 5.0)
439     *   April 2011: - 0x16, iASL fix for StartDependentFunction* descriptors to account for descriptor length.
440     */
441    Name (REL0, 0x16)
442    /*
443     * Settings number, used to adjust the aslts tests for different releases of ACPICA
444     *
445     * SETN - settings number of aslts:
446     *        0 - release from Bob
447     *        1 - release from Bob + my updates
448     *        2 - new architecture of Method calculation
449     *        3 - fixed bug 263,266
450     *        4 - fixed bugs 275,276
451     *        5 - fixed bugs 262 (corresponds to the 20070320 release of ACPICA)
452     *        6 - 20074403
453     *        all the greater - not used yet
454     *
455     * Used for to adjust some skippings of tests for different ACPICA releases
456     * (set up this value manually). See Method SET2 below.
457     *
458     * Note: the value 5 of SETN corresponds to the 20070320 release of ACPICA.
459     */
460    Name (SETN, 0x05)
461    /*
462     * Adjust some skippings of tests for different ACPICA releases
463     *
464     * arg0 - settings number of aslts (see SETN for comment)
465     */
466    Method (SET2, 1, Serialized)
467    {
468        Local0 = Arg0
469        /*
470         if (ABUU) {
471         Store(0, Local0)
472         } else {
473         Store(arg0, Local0)
474         }
475         */
476        Switch (ToInteger (Local0))
477        {
478            Case (0x00)
479            {
480                Y135 = 0x00
481                Y900 = 0x01
482                Y901 = 0x00
483                FLG9 = 0x01
484                Y263 = 0x00
485                Y275 = 0x00
486                Y276 = 0x00
487            }
488            Case (0x01)
489            {
490                Y135 = 0x01
491                Y900 = 0x00
492                Y901 = 0x00
493                FLG9 = 0x01
494                Y263 = 0x00
495                Y275 = 0x00
496                Y276 = 0x00
497            }
498            Case (0x02)
499            {
500                Y135 = 0x00
501                Y900 = 0x00
502                Y901 = 0x01
503                FLG9 = 0x00
504                Y263 = 0x00
505                Y275 = 0x00
506                Y276 = 0x00
507            }
508            Case (0x03)
509            {
510                Y135 = 0x00
511                Y900 = 0x01
512                Y901 = 0x00
513                FLG9 = 0x01
514                Y263 = 0x01
515                Y275 = 0x00
516                Y276 = 0x00
517                Y262 = 0x00
518            }
519            Case (0x04)
520            {
521                Y135 = 0x00 /* Store of Index reference to another element of the same Package causes hang */
522                Y900 = 0x01 /* Allow immediate Index(Buffer(){}), Index("qwerty"), Index(Package(){}) */
523                Y901 = 0x00 /* Predicate generates Implicit Return */
524                FLG9 = 0x01 /* Non-zero allows accessing internal objects of method */
525                Y263 = 0x01 /* The sequence of evaluating operands of expression with the named objects is violated */
526                Y275 = 0x01 /* Pop result from bottom principle doesn't work */
527                Y276 = 0x01 /* 'Large Reference Count' on AML code with LoadTable/UnLoad in a slack mode */
528                Y262 = 0x00 /* Unexpected AE_STACK_OVERFLOW for a method call expression with nested calls */
529                Y251 = 0x00 /* AE_ALREADY_EXISTS on multi-threading on Switch operator */
530                Y300 = 0x00 /* Recursive calls to methods with the internal names (and Switches) should be provided */
531            }
532            Case (0x05)
533            {
534                Y135 = 0x00
535                Y900 = 0x01
536                Y901 = 0x01 /* Predicate generates Implicit Return since ACPICA release 20080926 */
537                FLG9 = 0x01
538                Y263 = 0x01
539                Y275 = 0x01
540                Y276 = 0x01
541                Y262 = 0x01
542                Y251 = 0x00
543                Y300 = 0x00
544            }
545            Case (0x06)
546            {
547                Y135 = 0x00
548                Y900 = 0x01
549                Y901 = 0x00
550                FLG9 = 0x01
551                Y263 = 0x01
552                Y275 = 0x01
553                Y276 = 0x01
554                Y262 = 0x01
555                Y251 = 0x01
556                Y300 = 0x01
557                Y902 = 0x00
558            }
559
560        }
561
562        If (!RUN4)
563        {
564            Concatenate ("Release of parent ACPICA code 0x", Revision, Debug)
565            Concatenate ("Release of ASLTS test suite  0x", REL0, Debug)
566            Concatenate ("Settings of ASLTS test suite 0x", Arg0, Debug)
567        }
568    }
569