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     * Miscellaneous named object creation
30     */
31    Name (Z133, 0x85)
32    /*
33     * This sub-test is intended to comprehensively verify
34     * the Control Method declaration syntax implementation.
35     *
36     * Declare the Control Method Objects of different signature,
37     * check that properly specified or default arguments values
38     * provide required functionality.
39     *
40     *    17.5.75    Method (Declare Control Method)
41     *    Syntax
42     * Method (MethodName, NumArgs, SerializeRule, SyncLevel,
43     *         ReturnType, ParameterTypes) {TermList}
44     *
45     *    Validated Assertions:
46     *
47     * - Control Method declaration creates an Object in the ACPI
48     *   namespace which can be referred by the specified MethodName
49     *   either to initiate its invocation or to obtain its AML Object
50     *   type. Also MethodName can be used to save a copy of the Object
51     *   or a reference to it in another AML Object.
52     *
53     * - ASL compiler should allow only a Namestring data type in the
54     *   MethodName position.
55     *
56     * - ASL compiler should allow only an Type3Opcode (integer) constant
57     *   expression of the value in the range 0-7 in the NumArgs position.
58     *   NumArgs is optional argument.
59     *
60     * - ASL compiler should allow only the keywords 'NotSerialized'
61     *   and 'Serialized' in the SerializeRule position. SerializeRule
62     *   is optional argument.
63     *
64     * - ASL compiler should allow only an Type3Opcode (integer) constant
65     *   expression of the value in the range 0-15 in the SyncLevel position.
66     *   SyncLevel is optional argument. If no SyncLevel is specified, SyncLevel
67     *   0 is assumed.
68     *
69     * - ASL compiler should allow only an ObjectTypeKeyword or
70     *   a comma-separated ObjectTypeKeywords enclosed with curly
71     *   brackets (OTK package) in the ReturnType position. ReturnType
72     *   is optional argument. If no ReturnType is specified, ReturnType
73     *   UnknownObj is assumed.
74     *   ObjectTypeKeyword := UnknownObj | IntObj | StrObj | BuffObj |
75     *                        PkgObj | FieldUnitObj | DeviceObj | EventObj |
76     *                        MethodObj | MutexObj | OpRegionObj | PowerResObj |
77     *                        ThermalZoneObj | BuffFieldObj | DDBHandleObj
78     *
79     * - Every ASL data type should have a respective unique ObjectType Keyword.
80     *
81     * - ASL compiler should report an error when an actual Object specified
82     *   to be returned is of inappropriate type.
83     *
84     * - ASL compiler should report an error when there is at least one
85     *   control path in the method that returns no any actual Object.
86     *
87     * - ASL compiler should report an error when some different from
88     *   UnknownObj ObjectType Keyword specified in the ReturnType position
89     *   but no any actual Object specified to be returned.
90     *
91     * - ASL compiler should allow only an OTK package or a package
92     *   containing OTK packages along with ObjectTypeKeywords in the
93     *   ParameterTypes position.
94     *
95     * - ASL compiler should report an error when ParameterTypes is specified
96     *   and the number of members in the ParameterTypes package don't match
97     *   NumArgs.
98     *
99     * - ASL compiler should report an error when an actual Object
100     *   specified to be a respective argument of the Method is of
101     *   inappropriate type.
102     *
103     * - System software should execute a control method by referencing
104     *   the objects in the Method body in order.
105     *
106     * - Method opens a name scope. All namespace references that occur
107     *   during the method execution are relative to the Method package
108     *   location.
109     *
110     * - If the  method is declared as Serialized, it can be called
111     *   recursively, maybe, through another auxiliary method.
112     *
113     * - One method declared as Serialized can call another
114     *   one declared as Serialized too when the SyncLevel of
115     *   the second method is not less than that of the first.
116     *
117     * - The method declared as Serialized can acquire an Mutex
118     *   when the SyncLevel of the Mutex is not less than that of
119     *   the method.
120     *
121     * - If some method acquired an Mutex it can call another one
122     *   declared as Serialized when the SyncLevel of the called
123     *   method is not less than that of the Mutex.
124     *
125     * - All Acquire terms must refer to a synchronization object
126     *   with an equal or greater SyncLevel to the current Method level.
127     *
128     * - The method declared as Serialized can release an Mutex
129     *   when the SyncLevel of the Mutex is not less than that of
130     *   the method.
131     *
132     * - All namespace objects created by a method should be destroyed
133     *   when method execution exits.
134     *
135     */
136    /* Flags of types of Computational Data Objects */
137    /* (Fields and Integer, String, Buffer) */
138    Name (BZ00, Buffer (0x12)
139    {
140        /* 0000 */  0x00, 0x01, 0x01, 0x01, 0x00, 0x01, 0x00, 0x00,  // ........
141        /* 0008 */  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,  // ........
142        /* 0010 */  0x00, 0x00                                       // ..
143    })
144    /* Check Result of operation on equal to Benchmark value */
145    /* m680(<method name>, */
146    /*	<internal type of error if it occurs>, */
147    /*	<Result>, */
148    /*	<Benchmark value>) */
149    Method (M205, 4, NotSerialized)
150    {
151        Local0 = ObjectType (Arg2)
152        Local1 = ObjectType (Arg3)
153        If ((Local0 != Local1))
154        {
155            ERR (Concatenate (Arg0, "-OType"), Z133, __LINE__, 0x00, 0x00, Local0, Local1)
156            Return (0x01)
157        }
158        ElseIf (DerefOf (BZ00 [Local0]))
159        {
160            If (!Y119)
161            {
162                If ((Local1 == 0x01))
163                {
164                    /* Cast 64-bit to 32-bit */
165
166                    If (!F64)
167                    {
168                        Arg3 = Arg3
169                    }
170                }
171            }
172
173            If ((Arg2 != Arg3))
174            {
175                ERR (Arg0, Z133, __LINE__, 0x00, 0x00, Arg2, Arg3)
176                Return (0x01)
177            }
178        }
179        ElseIf ((Local0 == 0x08))
180        {
181            /* Methods, compare the results of them */
182
183            Local2 = M209 (Concatenate (Arg0, "-Method"), Arg1, Arg2, Arg3)
184            Return (Local2)
185        }
186        ElseIf ((Local0 == 0x04))
187        {
188            /* Packages */
189
190            Local2 = M20A (Concatenate (Arg0, "-Pack"), Arg1, Arg2, Arg3)
191            Return (Local2)
192        }
193
194        Return (0x00)
195    }
196
197    /* Check that Results of the Methods are equal each other */
198
199    Method (M209, 4, Serialized)
200    {
201        Name (MMM0, 0x00)
202        Name (MMM1, 0x00)
203        CopyObject (Arg2, MMM0) /* \M209.MMM0 */
204        CopyObject (Arg3, MMM1) /* \M209.MMM1 */
205        Return (M205 (Arg0, Arg1, MMM0, MMM1))
206    }
207
208    /* Check that two Packages are equal each other */
209
210    Method (M20A, 4, NotSerialized)
211    {
212        Local0 = SizeOf (Arg3)
213        If ((SizeOf (Arg2) != Local0))
214        {
215            ERR (Concatenate (Arg0, "-Size"), Z133, __LINE__, 0x00, 0x00, SizeOf (Arg2), Local0)
216            Return (0x01)
217        }
218
219        While (Local0)
220        {
221            Local0--
222            Local1 = ObjectType (DerefOf (Arg2 [Local0]))
223            Local2 = ObjectType (DerefOf (Arg3 [Local0]))
224            If ((Local1 != Local2))
225            {
226                /* ObjectType is corrupted */
227
228                ERR (Concatenate (Arg0, "-OType"), Z133, __LINE__, 0x00, 0x00, Local1, Local2)
229                Return (0x01)
230            }
231            ElseIf (DerefOf (BZ00 [Local1]))
232            {
233                /* the computational data type */
234
235                If ((DerefOf (Arg2 [Local0]) != DerefOf (Arg3 [Local0]
236                    )))
237                {
238                    /* The value is corrupted */
239
240                    ERR (Arg0, Z133, __LINE__, 0x00, 0x00, DerefOf (Arg2 [Local0]), DerefOf (
241                        Arg3 [Local0]))
242                    Return (0x01)
243                }
244            }
245        }
246
247        Return (0x00)
248    }
249
250    Scope (\_SB)
251    {
252        Method (M206, 0, NotSerialized)
253        {
254        }
255    }
256
257    Method (M207, 0, Serialized)
258    {
259        Method (M240, 0, NotSerialized)
260        {
261            Method (MM00, 0, NotSerialized)
262            {
263                Return ("\\m207.m240.mm00")
264            }
265
266            Method (\_SB.M206.MM00, 0, NotSerialized)
267            {
268                Return ("\\_SB.m206.mm00")
269            }
270
271            M205 (__METHOD__, 0x01, ObjectType (MM00), 0x08)
272            M205 (__METHOD__, 0x02, MM00 (), "\\m207.m240.mm00")
273            M205 (__METHOD__, 0x03, ObjectType (\M207.M240.MM00), 0x08)
274            M205 (__METHOD__, 0x04, \M207.M240.MM00 (), "\\m207.m240.mm00")
275            M205 (__METHOD__, 0x05, ObjectType (^M240.MM00), 0x08)
276            M205 (__METHOD__, 0x06, ^M240.MM00 (), "\\m207.m240.mm00")
277            M205 (__METHOD__, 0x07, ObjectType (\_SB.M206.MM00), 0x08)
278            M205 (__METHOD__, 0x08, \_SB.M206.MM00 (), "\\_SB.m206.mm00")
279        }
280
281        Method (M241, 0, NotSerialized)
282        {
283            Method (MM10, 0, NotSerialized)
284            {
285                Return ("\\m207.m241.mm10")
286            }
287
288            Method (MM20, 0, NotSerialized)
289            {
290                Return ("\\m207.m241.mm20")
291            }
292
293            Method (MM30, 0, NotSerialized)
294            {
295                Return ("\\m207.m241.mm30")
296            }
297
298            Method (MM40, 0, NotSerialized)
299            {
300                Return ("\\m207.m241.mm40")
301            }
302
303            Method (MM50, 0, NotSerialized)
304            {
305                Return ("\\m207.m241.mm50")
306            }
307
308            Method (MM60, 0, NotSerialized)
309            {
310                Return ("\\m207.m241.mm60")
311            }
312
313            Method (MM00, 0, NotSerialized)
314            {
315                Return ("\\m207.m241.mm00")
316            }
317
318            Method (MM01, 1, NotSerialized)
319            {
320                Return ("\\m207.m241.mm01")
321            }
322
323            Method (MM02, 2, NotSerialized)
324            {
325                Return ("\\m207.m241.mm02")
326            }
327
328            Method (MM03, 3, NotSerialized)
329            {
330                Return ("\\m207.m241.mm03")
331            }
332
333            Method (MM04, 4, NotSerialized)
334            {
335                Return ("\\m207.m241.mm04")
336            }
337
338            Method (MM05, 5, NotSerialized)
339            {
340                Return ("\\m207.m241.mm05")
341            }
342
343            Method (MM06, 6, NotSerialized)
344            {
345                Return ("\\m207.m241.mm06")
346            }
347
348            Method (MM07, 7, NotSerialized)
349            {
350                Return ("\\m207.m241.mm07")
351            }
352
353            /* Numargs as Type3Opcode (integer) constant expression */
354            /* Invalid checksum warning */
355            /*		Method(mm09, Add(6, 1)) {Return ("\\m207.m241.mm09")} */
356            M205 (__METHOD__, 0x09, ObjectType (MM10), 0x08)
357            M205 (__METHOD__, 0x0A, MM10 (), "\\m207.m241.mm10")
358            M205 (__METHOD__, 0x0B, ObjectType (MM20), 0x08)
359            M205 (__METHOD__, 0x0C, MM20 (), "\\m207.m241.mm20")
360            M205 (__METHOD__, 0x0D, ObjectType (MM30), 0x08)
361            M205 (__METHOD__, 0x0E, MM30 (), "\\m207.m241.mm30")
362            M205 (__METHOD__, 0x0F, ObjectType (MM40), 0x08)
363            M205 (__METHOD__, 0x10, MM40 (), "\\m207.m241.mm40")
364            M205 (__METHOD__, 0x11, ObjectType (MM50), 0x08)
365            M205 (__METHOD__, 0x12, MM50 (), "\\m207.m241.mm50")
366            M205 (__METHOD__, 0x13, ObjectType (MM60), 0x08)
367            If (Y157)
368            {
369                M205 (__METHOD__, 0x14, MM60 (), "\\m207.m241.mm60")
370            }
371
372            M205 (__METHOD__, 0x15, ObjectType (MM00), 0x08)
373            M205 (__METHOD__, 0x16, MM00 (), "\\m207.m241.mm00")
374            M205 (__METHOD__, 0x17, ObjectType (MM01), 0x08)
375            M205 (__METHOD__, 0x18, MM01 (0x00), "\\m207.m241.mm01")
376            M205 (__METHOD__, 0x19, ObjectType (MM02), 0x08)
377            M205 (__METHOD__, 0x1A, MM02 (0x00, 0x01), "\\m207.m241.mm02")
378            M205 (__METHOD__, 0x1B, ObjectType (MM03), 0x08)
379            M205 (__METHOD__, 0x1C, MM03 (0x00, 0x01, 0x02), "\\m207.m241.mm03")
380            M205 (__METHOD__, 0x1D, ObjectType (MM04), 0x08)
381            M205 (__METHOD__, 0x1E, MM04 (0x00, 0x01, 0x02, 0x03), "\\m207.m241.mm04")
382            M205 (__METHOD__, 0x1F, ObjectType (MM05), 0x08)
383            M205 (__METHOD__, 0x20, MM05 (0x00, 0x01, 0x02, 0x03, 0x04), "\\m207.m241.mm05")
384            M205 (__METHOD__, 0x21, ObjectType (MM06), 0x08)
385            M205 (__METHOD__, 0x22, MM06 (0x00, 0x01, 0x02, 0x03, 0x04, 0x05), "\\m207.m241.mm06")
386            M205 (__METHOD__, 0x23, ObjectType (MM07), 0x08)
387            M205 (__METHOD__, 0x24, MM07 (0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06), "\\m207.m241.mm07")
388                /* Invalid checksum warning */
389        /*		m205(ts, 37, ObjectType(mm09), 8) */
390        /* Too many arguments ^  (MM09 requires 0) */
391        /*		m205(ts, 38, mm09(0, 1, 2, 3, 4, 5, 6), "\\m207.m241.mm09") */
392        }
393
394        Method (M242, 0, NotSerialized)
395        {
396            Method (MM10, 0, NotSerialized)
397            {
398                Return ("\\m207.m242.mm10")
399            }
400
401            Method (MM20, 0, Serialized)
402            {
403                Return ("\\m207.m242.mm20")
404            }
405
406            Method (MM30, 0, NotSerialized)
407            {
408                Return ("\\m207.m242.mm30")
409            }
410
411            Method (MM40, 0, Serialized)
412            {
413                Return ("\\m207.m242.mm40")
414            }
415
416            Method (MM50, 0, NotSerialized)
417            {
418                Return ("\\m207.m242.mm50")
419            }
420
421            Method (MM60, 0, Serialized)
422            {
423                Return ("\\m207.m242.mm60")
424            }
425
426            Method (MM00, 0, Serialized)
427            {
428                Return ("\\m207.m242.mm00")
429            }
430
431            Method (MM01, 1, Serialized, 1)
432            {
433                Return ("\\m207.m242.mm01")
434            }
435
436            Method (MM02, 2, Serialized, 2)
437            {
438                Return ("\\m207.m242.mm02")
439            }
440
441            Method (MM03, 3, Serialized, 3)
442            {
443                Return ("\\m207.m242.mm03")
444            }
445
446            Method (MM04, 4, Serialized, 4)
447            {
448                Return ("\\m207.m242.mm04")
449            }
450
451            Method (MM05, 5, Serialized, 5)
452            {
453                Return ("\\m207.m242.mm05")
454            }
455
456            Method (MM06, 6, Serialized, 6)
457            {
458                Return ("\\m207.m242.mm06")
459            }
460
461            Method (MM07, 7, Serialized, 7)
462            {
463                Return ("\\m207.m242.mm07")
464            }
465
466            Method (MM08, 0, Serialized, 8)
467            {
468                Return ("\\m207.m242.mm08")
469            }
470
471            Method (MM09, 1, Serialized, 9)
472            {
473                Return ("\\m207.m242.mm09")
474            }
475
476            Method (MM0A, 2, Serialized, 10)
477            {
478                Return ("\\m207.m242.mm0a")
479            }
480
481            Method (MM0B, 3, Serialized, 11)
482            {
483                Return ("\\m207.m242.mm0b")
484            }
485
486            Method (MM0C, 4, Serialized, 12)
487            {
488                Return ("\\m207.m242.mm0c")
489            }
490
491            Method (MM0D, 5, Serialized, 13)
492            {
493                Return ("\\m207.m242.mm0d")
494            }
495
496            Method (MM0E, 6, Serialized, 14)
497            {
498                Return ("\\m207.m242.mm0e")
499            }
500
501            Method (MM0F, 7, Serialized, 15)
502            {
503                Return ("\\m207.m242.mm0f")
504            }
505
506            /* Numargs as Type3Opcode (integer) constant expression */
507            /* Invalid checksum warning */
508            /*		Method(mm70, Add(6, 1), NotSerialized) {Return ("\\m207.m242.mm70")} */
509            /* SyncLevel as Type3Opcode (integer) constant expression */
510            Method (MM80, 7, Serialized, 15)
511            {
512                Return ("\\m207.m242.mm80")
513            }
514
515            /* Both Numargs and SyncLevel as Type3Opcode (integer) constant expressions */
516            /* Invalid checksum warning */
517            /*		Method(mm90, Add(6, 1), Serialized, Add(14, 1)) {Return ("\\m207.m242.mm90")} */
518            M205 (__METHOD__, 0x27, ObjectType (MM10), 0x08)
519            M205 (__METHOD__, 0x28, MM10 (), "\\m207.m242.mm10")
520            M205 (__METHOD__, 0x29, ObjectType (MM10), 0x08)
521            M205 (__METHOD__, 0x2A, MM20 (), "\\m207.m242.mm20")
522            M205 (__METHOD__, 0x2B, ObjectType (MM10), 0x08)
523            M205 (__METHOD__, 0x2C, MM30 (), "\\m207.m242.mm30")
524            M205 (__METHOD__, 0x2D, ObjectType (MM10), 0x08)
525            M205 (__METHOD__, 0x2E, MM40 (), "\\m207.m242.mm40")
526            M205 (__METHOD__, 0x2F, ObjectType (MM10), 0x08)
527            If (Y157)
528            {
529                M205 (__METHOD__, 0x30, MM50 (), "\\m207.m242.mm50")
530            }
531
532            M205 (__METHOD__, 0x31, ObjectType (MM10), 0x08)
533            If (Y157)
534            {
535                M205 (__METHOD__, 0x32, MM60 (), "\\m207.m242.mm60")
536            }
537
538            M205 (__METHOD__, 0x33, ObjectType (MM00), 0x08)
539            M205 (__METHOD__, 0x34, MM00 (), "\\m207.m242.mm00")
540            M205 (__METHOD__, 0x35, ObjectType (MM01), 0x08)
541            M205 (__METHOD__, 0x36, MM01 (0x00), "\\m207.m242.mm01")
542            M205 (__METHOD__, 0x37, ObjectType (MM02), 0x08)
543            M205 (__METHOD__, 0x38, MM02 (0x00, 0x01), "\\m207.m242.mm02")
544            M205 (__METHOD__, 0x39, ObjectType (MM03), 0x08)
545            M205 (__METHOD__, 0x3A, MM03 (0x00, 0x01, 0x02), "\\m207.m242.mm03")
546            M205 (__METHOD__, 0x3B, ObjectType (MM04), 0x08)
547            M205 (__METHOD__, 0x3C, MM04 (0x00, 0x01, 0x02, 0x03), "\\m207.m242.mm04")
548            M205 (__METHOD__, 0x3D, ObjectType (MM05), 0x08)
549            M205 (__METHOD__, 0x3E, MM05 (0x00, 0x01, 0x02, 0x03, 0x04), "\\m207.m242.mm05")
550            M205 (__METHOD__, 0x3F, ObjectType (MM06), 0x08)
551            M205 (__METHOD__, 0x40, MM06 (0x00, 0x01, 0x02, 0x03, 0x04, 0x05), "\\m207.m242.mm06")
552            M205 (__METHOD__, 0x41, ObjectType (MM07), 0x08)
553            M205 (__METHOD__, 0x42, MM07 (0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06), "\\m207.m242.mm07")
554            M205 (__METHOD__, 0x43, ObjectType (MM00), 0x08)
555            M205 (__METHOD__, 0x44, MM08 (), "\\m207.m242.mm08")
556            M205 (__METHOD__, 0x45, ObjectType (MM01), 0x08)
557            M205 (__METHOD__, 0x46, MM09 (0x00), "\\m207.m242.mm09")
558            M205 (__METHOD__, 0x47, ObjectType (MM02), 0x08)
559            M205 (__METHOD__, 0x48, MM0A (0x00, 0x01), "\\m207.m242.mm0a")
560            M205 (__METHOD__, 0x49, ObjectType (MM03), 0x08)
561            M205 (__METHOD__, 0x4A, MM0B (0x00, 0x01, 0x02), "\\m207.m242.mm0b")
562            M205 (__METHOD__, 0x4B, ObjectType (MM04), 0x08)
563            M205 (__METHOD__, 0x4C, MM0C (0x00, 0x01, 0x02, 0x03), "\\m207.m242.mm0c")
564            M205 (__METHOD__, 0x4D, ObjectType (MM05), 0x08)
565            M205 (__METHOD__, 0x4E, MM0D (0x00, 0x01, 0x02, 0x03, 0x04), "\\m207.m242.mm0d")
566            M205 (__METHOD__, 0x4F, ObjectType (MM06), 0x08)
567            M205 (__METHOD__, 0x50, MM0E (0x00, 0x01, 0x02, 0x03, 0x04, 0x05), "\\m207.m242.mm0e")
568            M205 (__METHOD__, 0x51, ObjectType (MM07), 0x08)
569            M205 (__METHOD__, 0x52, MM0F (0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06), "\\m207.m242.mm0f")
570            /* Invalid checksum warning */
571            /*		m205(ts, 83, ObjectType(mm70), 8) */
572            /*	Too many arguments ^  (MM70 requires 0) */
573            /*		m205(ts, 84, mm70(0, 1, 2, 3, 4, 5, 6), "\\m207.m242.mm70") */
574            M205 (__METHOD__, 0x55, ObjectType (MM80), 0x08)
575                /* Outstanding allocations */
576        /*		m205(ts, 86, mm80(0, 1, 2, 3, 4, 5, 6), "\\m207.m242.mm80") */
577        /* Invalid checksum warning */
578        /*		m205(ts, 87, ObjectType(mm90), 8) */
579        /*	Too many arguments ^  (MM90 requires 0) */
580        /*		m205(ts, 88, mm90(0, 1, 2, 3, 4, 5, 6), "\\m207.m242.mm90") */
581        }
582
583        /* Integer */
584
585        Name (INT0, 0xFEDCBA9876543210)
586        /* String */
587
588        Name (STR0, "source string")
589        /* Buffer */
590
591        Name (BUF0, Buffer (0x09)
592        {
593            /* 0000 */  0x09, 0x08, 0x07, 0x06, 0x05, 0x04, 0x03, 0x02,  // ........
594            /* 0008 */  0x01                                             // .
595        })
596        /* Initializer of Fields */
597
598        Name (BUF2, Buffer (0x09)
599        {
600            /* 0000 */  0x95, 0x85, 0x75, 0x65, 0x55, 0x45, 0x35, 0x25,  // ..ueUE5%
601            /* 0008 */  0x15                                             // .
602        })
603        /* Base of Buffer Fields */
604
605        Name (BUFZ, Buffer (0x30){})
606        /* Package */
607
608        Name (PAC0, Package (0x03)
609        {
610            0xFEDCBA987654321F,
611            "test package",
612            Buffer (0x09)
613            {
614                /* 0000 */  0x13, 0x12, 0x11, 0x10, 0x0F, 0x0E, 0x0D, 0x0C,  // ........
615                /* 0008 */  0x0B                                             // .
616            }
617        })
618        /* Operation Region */
619
620        OperationRegion (OPR0, SystemMemory, 0x00, 0x30)
621        /* Field Unit */
622
623        Field (OPR0, ByteAcc, NoLock, Preserve)
624        {
625            FLU0,   69,
626            FLU2,   64,
627            FLU4,   32
628        }
629
630        /* Device */
631
632        Device (DEV0)
633        {
634            Name (S000, "DEV0")
635        }
636
637        /* Event */
638
639        Event (EVE0)
640        /* Method */
641
642        Method (MMM0, 0, NotSerialized)
643        {
644            Return ("ff0X")
645        }
646
647        /* Mutex */
648
649        Mutex (MTX0, 0x00)
650        /* Power Resource */
651
652        PowerResource (PWR0, 0x00, 0x0000)
653        {
654            Name (S000, "PWR0")
655        }
656
657        /* Processor */
658
659        Processor (CPU0, 0x00, 0xFFFFFFFF, 0x00)
660        {
661            Name (S000, "CPU0")
662        }
663
664        /* Thermal Zone */
665
666        ThermalZone (TZN0)
667        {
668            Name (S000, "TZN0")
669        }
670
671        /* Buffer Field */
672
673        CreateField (BUFZ, 0x00, 0x45, BFL0)
674        CreateField (BUFZ, 0x50, 0x40, BFL2)
675        CreateField (BUFZ, 0xA0, 0x20, BFL4)
676        /* DDBHandle */
677
678        Name (DDB0, Ones)
679        /* Reference */
680
681        Name (ORF0, "ORF0")
682        Name (REF0, Package (0x01){})
683        Method (M243, 0, NotSerialized)
684        {
685            Method (MM00, 1, NotSerialized)
686            {
687                Arg0 = (DerefOf (Arg0) + 0x01)
688            }
689
690            Method (MM01, 0, NotSerialized)
691            {
692                Return (INT0) /* \M207.INT0 */
693            }
694
695            Method (MM11, 0, NotSerialized)
696            {
697                Return (INT0) /* \M207.INT0 */
698            }
699
700            Method (MM02, 0, NotSerialized)
701            {
702                Return (STR0) /* \M207.STR0 */
703            }
704
705            Method (MM03, 0, NotSerialized)
706            {
707                Return (BUF0) /* \M207.BUF0 */
708            }
709
710            Method (MM04, 0, NotSerialized)
711            {
712                Return (PAC0) /* \M207.PAC0 */
713            }
714
715            Method (MM05, 0, NotSerialized)
716            {
717                Return (FLU0) /* \M207.FLU0 */
718            }
719
720            Method (MM06, 0, NotSerialized)
721            {
722                Return (DEV0) /* \M207.DEV0 */
723            }
724
725            Method (MM07, 0, NotSerialized)
726            {
727                Return (EVE0) /* \M207.EVE0 */
728            }
729
730            Method (MM08, 0, NotSerialized)
731            {
732                CopyObject (MMM0 (), Local0)
733                Return (Local0)
734            }
735
736            Method (MM09, 0, NotSerialized)
737            {
738                Return (MTX0) /* \M207.MTX0 */
739            }
740
741            Method (MM0A, 0, NotSerialized)
742            {
743                Return (OPR0) /* \M207.OPR0 */
744            }
745
746            Method (MM0B, 0, NotSerialized)
747            {
748                Return (PWR0) /* \M207.PWR0 */
749            }
750
751            Method (MM0C, 0, NotSerialized)
752            {
753                Return (CPU0) /* \M207.CPU0 */
754            }
755
756            Method (MM0D, 0, NotSerialized)
757            {
758                Return (TZN0) /* \M207.TZN0 */
759            }
760
761            Method (MM0E, 0, NotSerialized)
762            {
763                Return (BFL0) /* \M207.BFL0 */
764            }
765
766            Method (MM0F, 0, NotSerialized)
767            {
768                Return (DDB0) /* \M207.DDB0 */
769            }
770
771            /* Formal declaration */
772            /* Method(mm0g, , , , DebugObj) {Return (Debug)} */
773            Method (MM0H, 0, NotSerialized)
774            {
775                Return (RefOf (ORF0))
776            }
777
778            Local0 = 0xFEDCBA9876543210
779            M205 (__METHOD__, 0x59, ObjectType (MM00), 0x08)
780            MM00 (RefOf (Local0))
781            M205 (__METHOD__, 0x5A, Local0, 0xFEDCBA9876543211)
782            M205 (__METHOD__, 0x5B, ObjectType (MM01), 0x08)
783            M205 (__METHOD__, 0x5C, MM01 (), INT0)
784            M205 (__METHOD__, 0x5D, ObjectType (MM02), 0x08)
785            M205 (__METHOD__, 0x5E, MM02 (), STR0)
786            M205 (__METHOD__, 0x5F, ObjectType (MM03), 0x08)
787            M205 (__METHOD__, 0x60, MM03 (), BUF0)
788            M205 (__METHOD__, 0x61, ObjectType (MM04), 0x08)
789            M205 (__METHOD__, 0x62, MM04 (), PAC0)
790            M205 (__METHOD__, 0x63, ObjectType (MM05), 0x08)
791            M205 (__METHOD__, 0x64, MM05 (), FLU0)
792            M205 (__METHOD__, 0x65, ObjectType (MM06), 0x08)
793            M205 (__METHOD__, 0x66, MM06 (), DEV0)
794            M205 (__METHOD__, 0x67, ObjectType (MM07), 0x08)
795            M205 (__METHOD__, 0x68, MM07 (), EVE0)
796            M205 (__METHOD__, 0x69, ObjectType (MM08), 0x08)
797            CopyObject (MMM0 (), Local0)
798            M205 (__METHOD__, 0x6A, MM08 (), Local0)
799            M205 (__METHOD__, 0x6B, ObjectType (MM09), 0x08)
800            M205 (__METHOD__, 0x6C, MM09 (), MTX0)
801            M205 (__METHOD__, 0x6D, ObjectType (MM0A), 0x08)
802            M205 (__METHOD__, 0x6E, MM0A (), OPR0)
803            M205 (__METHOD__, 0x6F, ObjectType (MM0B), 0x08)
804            M205 (__METHOD__, 0x70, MM0B (), PWR0)
805            M205 (__METHOD__, 0x71, ObjectType (MM0C), 0x08)
806            M205 (__METHOD__, 0x72, MM0C (), CPU0)
807            M205 (__METHOD__, 0x73, ObjectType (MM0D), 0x08)
808            If (Y350)
809            {
810                M205 (__METHOD__, 0x74, MM0D (), TZN0)
811            }
812
813            M205 (__METHOD__, 0x75, ObjectType (MM0E), 0x08)
814            M205 (__METHOD__, 0x76, MM0E (), BFL0)
815            M205 (__METHOD__, 0x77, ObjectType (MM0F), 0x08)
816            M205 (__METHOD__, 0x78, MM0F (), DDB0)
817            /*
818             m205(ts, 121, ObjectType(mm0g), 8)
819             m205(ts, 122, mm0g(), Debug)
820             */
821            M205 (__METHOD__, 0x7B, ObjectType (MM0H), 0x08)
822            M205 (__METHOD__, 0x7C, DerefOf (MM0H ()), ORF0)
823        }
824
825        Method (M244, 0, NotSerialized)
826        {
827            Method (MM00, 0, NotSerialized)
828            {
829                Return (STR0) /* \M207.STR0 */
830            }
831
832            Method (MM01, 0, NotSerialized)
833            {
834                Return (INT0) /* \M207.INT0 */
835            }
836
837            M205 (__METHOD__, 0x7D, ObjectType (MM00), 0x08)
838            M205 (__METHOD__, 0x7E, MM00 (), STR0)
839            M205 (__METHOD__, 0x7F, ObjectType (MM01), 0x08)
840            M205 (__METHOD__, 0x80, MM01 (), INT0)
841        }
842
843        Method (M245, 0, Serialized)
844        {
845            Name (FLAG, Ones)
846            /* List of types of the parameters contains the same keyword */
847
848            Method (MM00, 1, NotSerialized)
849            {
850                FLAG = 0x00
851            }
852
853            Method (MM01, 1, NotSerialized)
854            {
855                FLAG = 0x01
856            }
857
858            Method (MM02, 2, NotSerialized)
859            {
860                FLAG = 0x02
861            }
862
863            Method (MM03, 3, NotSerialized)
864            {
865                FLAG = 0x03
866            }
867
868            Method (MM04, 4, NotSerialized)
869            {
870                FLAG = 0x04
871            }
872
873            Method (MM05, 5, NotSerialized)
874            {
875                FLAG = 0x05
876            }
877
878            Method (MM06, 6, NotSerialized)
879            {
880                FLAG = 0x06
881            }
882
883            Method (MM07, 7, NotSerialized)
884            {
885                FLAG = 0x07
886            }
887
888            /* List of types of the parameters contains the UnknownObj keyword */
889
890            Method (MM08, 1, NotSerialized)
891            {
892                FLAG = 0x08
893            }
894
895            Method (MM09, 1, NotSerialized)
896            {
897                FLAG = 0x09
898            }
899
900            Method (MM0A, 7, NotSerialized)
901            {
902                FLAG = 0x0A
903            }
904
905            /* List of types of the parameters contains different keywords */
906
907            Method (MM10, 2, NotSerialized)
908            {
909                FLAG = 0x10
910            }
911
912            Method (MM11, 2, NotSerialized)
913            {
914                FLAG = 0x11
915            }
916
917            Method (MM12, 2, NotSerialized)
918            {
919                FLAG = 0x12
920            }
921
922            Method (MM13, 3, NotSerialized)
923            {
924                FLAG = 0x13
925            }
926
927            Method (MM14, 4, NotSerialized)
928            {
929                FLAG = 0x14
930            }
931
932            Method (MM15, 5, NotSerialized)
933            {
934                FLAG = 0x15
935            }
936
937            Method (MM16, 6, NotSerialized)
938            {
939                FLAG = 0x16
940            }
941
942            Method (MM17, 7, NotSerialized)
943            {
944                FLAG = 0x17
945            }
946
947            Method (MM18, 7, NotSerialized)
948            {
949                FLAG = 0x18
950            }
951
952            /* List of types of the parameters contains keyword packages */
953            /* along with different keywords */
954            Method (MM20, 1, NotSerialized)
955            {
956                FLAG = 0x20
957            }
958
959            Method (MM21, 1, NotSerialized)
960            {
961                FLAG = 0x21
962            }
963
964            /*
965             // Bug 148
966             Method(mm22, 1, , , , {{IntObj, StrObj, BuffObj, PkgObj,
967             FieldUnitObj, DeviceObj, EventObj, MethodObj,
968             MutexObj, OpRegionObj, PowerResObj, //ProcessorObj,
969             ThermalZoneObj, BuffFieldObj, DDBHandleObj}}) {Store(34, Flag)}
970             */
971            Method (MM23, 2, NotSerialized)
972            {
973                FLAG = 0x23
974            }
975
976            Method (MM24, 2, NotSerialized)
977            {
978                FLAG = 0x24
979            }
980
981            Method (MM25, 2, NotSerialized)
982            {
983                FLAG = 0x25
984            }
985
986            Method (MM26, 2, NotSerialized)
987            {
988                FLAG = 0x26
989            }
990
991            Method (MM27, 2, NotSerialized)
992            {
993                FLAG = 0x27
994            }
995
996            Method (MM28, 2, NotSerialized)
997            {
998                FLAG = 0x28
999            }
1000
1001            Method (MM29, 2, NotSerialized)
1002            {
1003                FLAG = 0x29
1004            }
1005
1006            /*
1007             // Bug 148
1008             Method(mm2a, 7, , , , {
1009             {IntObj, StrObj, BuffObj, PkgObj, FieldUnitObj, DeviceObj, EventObj, MethodObj,
1010             MutexObj, OpRegionObj, PowerResObj, ThermalZoneObj, BuffFieldObj, DDBHandleObj},
1011             {IntObj, StrObj, BuffObj, PkgObj, FieldUnitObj, DeviceObj, EventObj, MethodObj,
1012             MutexObj, OpRegionObj, PowerResObj, ThermalZoneObj, BuffFieldObj, DDBHandleObj},
1013             {IntObj, StrObj, BuffObj, PkgObj, FieldUnitObj, DeviceObj, EventObj, MethodObj,
1014             MutexObj, OpRegionObj, PowerResObj, ThermalZoneObj, BuffFieldObj, DDBHandleObj},
1015             {IntObj, StrObj, BuffObj, PkgObj, FieldUnitObj, DeviceObj, EventObj, MethodObj,
1016             MutexObj, OpRegionObj, PowerResObj, ThermalZoneObj, BuffFieldObj, DDBHandleObj},
1017             {IntObj, StrObj, BuffObj, PkgObj, FieldUnitObj, DeviceObj, EventObj, MethodObj,
1018             MutexObj, OpRegionObj, PowerResObj, ThermalZoneObj, BuffFieldObj, DDBHandleObj},
1019             {IntObj, StrObj, BuffObj, PkgObj, FieldUnitObj, DeviceObj, EventObj, MethodObj,
1020             MutexObj, OpRegionObj, PowerResObj, ThermalZoneObj, BuffFieldObj, DDBHandleObj},
1021             {IntObj, StrObj, BuffObj, PkgObj, FieldUnitObj, DeviceObj, EventObj, MethodObj,
1022             MutexObj, OpRegionObj, PowerResObj, ThermalZoneObj, BuffFieldObj, DDBHandleObj},
1023             }) {Store(42, Flag)}
1024             */
1025            /* List of types of the parameters contains the same keyword */
1026            M205 (__METHOD__, 0x81, ObjectType (MM00), 0x08)
1027            MM00 (0x01)
1028            M205 (__METHOD__, 0x82, FLAG, 0x00)
1029            M205 (__METHOD__, 0x83, ObjectType (MM01), 0x08)
1030            MM01 (0x01)
1031            M205 (__METHOD__, 0x84, FLAG, 0x01)
1032            M205 (__METHOD__, 0x85, ObjectType (MM02), 0x08)
1033            MM02 (0x01, 0x02)
1034            M205 (__METHOD__, 0x86, FLAG, 0x02)
1035            M205 (__METHOD__, 0x87, ObjectType (MM03), 0x08)
1036            MM03 (0x01, 0x02, 0x03)
1037            M205 (__METHOD__, 0x88, FLAG, 0x03)
1038            M205 (__METHOD__, 0x89, ObjectType (MM04), 0x08)
1039            MM04 (0x01, 0x02, 0x03, 0x04)
1040            M205 (__METHOD__, 0x8A, FLAG, 0x04)
1041            M205 (__METHOD__, 0x8B, ObjectType (MM05), 0x08)
1042            MM05 (0x01, 0x02, 0x03, 0x04, 0x05)
1043            M205 (__METHOD__, 0x8C, FLAG, 0x05)
1044            M205 (__METHOD__, 0x8D, ObjectType (MM06), 0x08)
1045            MM06 (0x01, 0x02, 0x03, 0x04, 0x05, 0x06)
1046            M205 (__METHOD__, 0x8E, FLAG, 0x06)
1047            M205 (__METHOD__, 0x8F, ObjectType (MM07), 0x08)
1048            MM07 (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07)
1049            M205 (__METHOD__, 0x90, FLAG, 0x07)
1050            /* List of types of the parameters contains the UnknownObj keyword */
1051
1052            M205 (__METHOD__, 0x91, ObjectType (MM08), 0x08)
1053            MM08 (0x01)
1054            M205 (__METHOD__, 0x92, FLAG, 0x08)
1055            M205 (__METHOD__, 0x93, ObjectType (MM09), 0x08)
1056            MM09 (0x01)
1057            M205 (__METHOD__, 0x94, FLAG, 0x09)
1058            M205 (__METHOD__, 0x95, ObjectType (MM0A), 0x08)
1059            MM0A (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07)
1060            M205 (__METHOD__, 0x96, FLAG, 0x0A)
1061            /* List of types of the parameters contains different keywords */
1062
1063            M205 (__METHOD__, 0x97, ObjectType (MM10), 0x08)
1064            MM10 (0x01, 0x02)
1065            M205 (__METHOD__, 0x98, FLAG, 0x10)
1066            M205 (__METHOD__, 0x99, ObjectType (MM11), 0x08)
1067            MM11 (0x01, 0x02)
1068            M205 (__METHOD__, 0x9A, FLAG, 0x11)
1069            M205 (__METHOD__, 0x9B, ObjectType (MM12), 0x08)
1070            MM12 (0x01, 0x02)
1071            M205 (__METHOD__, 0x9C, FLAG, 0x12)
1072            M205 (__METHOD__, 0x9D, ObjectType (MM13), 0x08)
1073            MM13 (0x01, 0x02, 0x03)
1074            M205 (__METHOD__, 0x9E, FLAG, 0x13)
1075            M205 (__METHOD__, 0x9F, ObjectType (MM14), 0x08)
1076            MM14 (0x01, 0x02, 0x03, 0x04)
1077            M205 (__METHOD__, 0xA0, FLAG, 0x14)
1078            M205 (__METHOD__, 0xA1, ObjectType (MM15), 0x08)
1079            MM15 (0x01, 0x02, 0x03, 0x04, 0x05)
1080            M205 (__METHOD__, 0xA2, FLAG, 0x15)
1081            M205 (__METHOD__, 0xA3, ObjectType (MM16), 0x08)
1082            MM16 (0x01, 0x02, 0x03, 0x04, 0x05, 0x06)
1083            M205 (__METHOD__, 0xA4, FLAG, 0x16)
1084            M205 (__METHOD__, 0xA5, ObjectType (MM17), 0x08)
1085            MM17 (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07)
1086            M205 (__METHOD__, 0xA6, FLAG, 0x17)
1087            M205 (__METHOD__, 0xA7, ObjectType (MM18), 0x08)
1088            MM18 (0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07)
1089            M205 (__METHOD__, 0xA8, FLAG, 0x18)
1090            /* List of types of the parameters contains keyword packages */
1091            /* along with different keywords */
1092            M205 (__METHOD__, 0xA9, ObjectType (MM20), 0x08)
1093            MM20 (0x01)
1094            M205 (__METHOD__, 0xAA, FLAG, 0x20)
1095            M205 (__METHOD__, 0xAB, ObjectType (MM21), 0x08)
1096            MM21 (0x01)
1097            M205 (__METHOD__, 0xAC, FLAG, 0x21)
1098            /*
1099             // Bug 148
1100             m205(ts, 173, ObjectType(mm22), 8)
1101             mm22(1)
1102             m205(ts, 174, Flag, 34)
1103             */
1104            M205 (__METHOD__, 0xAF, ObjectType (MM23), 0x08)
1105            MM23 (0x01, 0x02)
1106            M205 (__METHOD__, 0xB0, FLAG, 0x23)
1107            M205 (__METHOD__, 0xB1, ObjectType (MM24), 0x08)
1108            MM24 (0x01, 0x02)
1109            M205 (__METHOD__, 0xB2, FLAG, 0x24)
1110            M205 (__METHOD__, 0xB3, ObjectType (MM25), 0x08)
1111            MM25 (0x01, 0x02)
1112            M205 (__METHOD__, 0xB4, FLAG, 0x25)
1113            M205 (__METHOD__, 0xB5, ObjectType (MM26), 0x08)
1114            MM26 (0x01, 0x02)
1115            M205 (__METHOD__, 0xB6, FLAG, 0x26)
1116            M205 (__METHOD__, 0xB7, ObjectType (MM27), 0x08)
1117            MM27 (0x01, 0x02)
1118            M205 (__METHOD__, 0xB8, FLAG, 0x27)
1119            M205 (__METHOD__, 0xB9, ObjectType (MM28), 0x08)
1120            MM28 (0x01, 0x02)
1121            M205 (__METHOD__, 0xBA, FLAG, 0x28)
1122            M205 (__METHOD__, 0xBB, ObjectType (MM29), 0x08)
1123            MM29 (0x01, 0x02)
1124            M205 (__METHOD__, 0xBC, FLAG, 0x29)
1125                /*
1126         // Bug 148
1127         m205(ts, 189, ObjectType(mm2a), 8)
1128         mm2a(1, 2, 3, 4, 5, 6, 7)
1129         m205(ts, 190, Flag, 42)
1130         */
1131        }
1132
1133        /* UnSerialized Method can be invoked recursively */
1134
1135        Method (M246, 0, Serialized)
1136        {
1137            Name (I000, 0x00)
1138            Method (MM00, 1, NotSerialized)
1139            {
1140                I000++
1141                If (Arg0)
1142                {
1143                    MM01 ()
1144                }
1145            }
1146
1147            Method (MM01, 0, NotSerialized)
1148            {
1149                MM00 (0x00)
1150            }
1151
1152            I000 = 0x00
1153            MM00 (0x00)
1154            M205 (__METHOD__, 0xBF, I000, 0x01)
1155            I000 = 0x00
1156            MM00 (0x01)
1157            M205 (__METHOD__, 0xC0, I000, 0x02)
1158        }
1159
1160        /* Serialized Method can be invoked recursively */
1161
1162        Method (M247, 0, Serialized)
1163        {
1164            Name (I000, 0x00)
1165            Method (MM00, 1, Serialized)
1166            {
1167                I000++
1168                If (Arg0)
1169                {
1170                    MM01 ()
1171                }
1172            }
1173
1174            Method (MM01, 0, NotSerialized)
1175            {
1176                MM00 (0x00)
1177            }
1178
1179            I000 = 0x00
1180            MM00 (0x00)
1181            M205 (__METHOD__, 0xC1, I000, 0x01)
1182            I000 = 0x00
1183            MM00 (0x01)
1184            M205 (__METHOD__, 0xC2, I000, 0x02)
1185        }
1186
1187        /* Serialized Method can invoke another Serialized One */
1188        /* if SyncLevel is not lowered */
1189        Method (M248, 0, Serialized)
1190        {
1191            Name (I000, 0x00)
1192            Method (MM00, 1, Serialized)
1193            {
1194                I000++
1195                If (Arg0)
1196                {
1197                    MM01 ()
1198                }
1199            }
1200
1201            Method (MM01, 0, Serialized, 15)
1202            {
1203                I000++
1204            }
1205
1206            I000 = 0x00
1207            MM00 (0x00)
1208            M205 (__METHOD__, 0xC3, I000, 0x01)
1209            I000 = 0x00
1210            MM00 (0x01)
1211            M205 (__METHOD__, 0xC4, I000, 0x02)
1212        }
1213
1214        /* Serialized Method can acquire an Mutex */
1215        /* if SyncLevel is not lowered */
1216        Method (M249, 0, Serialized)
1217        {
1218            Mutex (MTX0, 0x0F)
1219            Name (I000, 0x00)
1220            Method (MM00, 1, Serialized)
1221            {
1222                I000++
1223                If (Arg0)
1224                {
1225                    Local0 = Acquire (MTX0, 0x0000)
1226                    If (!M205 (__METHOD__, 0xC5, Local0, Zero))
1227                    {
1228                        I000++
1229                        Release (MTX0)
1230                    }
1231                }
1232            }
1233
1234            I000 = 0x00
1235            MM00 (0x00)
1236            M205 (__METHOD__, 0xC6, I000, 0x01)
1237            I000 = 0x00
1238            MM00 (0x01)
1239            M205 (__METHOD__, 0xC7, I000, 0x02)
1240        }
1241
1242        /* When Serialized Method calls another one then */
1243        /* the last can acquire an Mutex if SyncLevel is not lowered */
1244        Method (M24A, 0, Serialized)
1245        {
1246            Mutex (MTX1, 0x0F)
1247            Name (I000, 0x00)
1248            Method (MM00, 1, Serialized)
1249            {
1250                I000++
1251                If (Arg0)
1252                {
1253                    MM01 ()
1254                }
1255            }
1256
1257            Method (MM01, 0, NotSerialized)
1258            {
1259                Local0 = Acquire (MTX1, 0x0000)
1260                If (!M205 (__METHOD__, 0xC8, Local0, Zero))
1261                {
1262                    I000++
1263                    Release (MTX1)
1264                }
1265            }
1266
1267            I000 = 0x00
1268            MM00 (0x00)
1269            M205 (__METHOD__, 0xC9, I000, 0x01)
1270            I000 = 0x00
1271            MM00 (0x01)
1272            M205 (__METHOD__, 0xCA, I000, 0x02)
1273        }
1274
1275        /* UnSerialized Method acquiring an Mutex can invoke */
1276        /* another Serialized One if SyncLevel is not lowered */
1277        Method (M24B, 0, Serialized)
1278        {
1279            Mutex (MTX0, 0x00)
1280            Name (I000, 0x00)
1281            Method (MM00, 1, NotSerialized)
1282            {
1283                Local0 = Acquire (MTX0, 0x0000)
1284                If (!M205 (__METHOD__, 0xCB, Local0, Zero))
1285                {
1286                    I000++
1287                    If (Arg0)
1288                    {
1289                        MM01 ()
1290                    }
1291
1292                    Release (MTX0)
1293                }
1294            }
1295
1296            Method (MM01, 0, Serialized, 15)
1297            {
1298                I000++
1299            }
1300
1301            I000 = 0x00
1302            MM00 (0x00)
1303            M205 (__METHOD__, 0xCC, I000, 0x01)
1304            I000 = 0x00
1305            MM00 (0x01)
1306            M205 (__METHOD__, 0xCD, I000, 0x02)
1307        }
1308
1309        /* When UnSerialized Method acquiring an Mutex invokes */
1310        /* another Serialized One then the last can release the */
1311        /* Mutex if Mutex's SyncLevel is not lower than the Method's */
1312        Method (M24C, 0, Serialized)
1313        {
1314            Mutex (MTX0, 0x00)
1315            Name (I000, 0x00)
1316            Method (MM00, 1, NotSerialized)
1317            {
1318                Local0 = Acquire (MTX0, 0x0000)
1319                If (!M205 (__METHOD__, 0xCE, Local0, Zero))
1320                {
1321                    I000++
1322                    If (Arg0)
1323                    {
1324                        MM01 ()
1325                    }
1326                    Else
1327                    {
1328                        Release (MTX0)
1329                    }
1330                }
1331            }
1332
1333            Method (MM01, 0, Serialized)
1334            {
1335                I000++
1336                Release (MTX0)
1337            }
1338
1339            I000 = 0x00
1340            MM00 (0x00)
1341            M205 (__METHOD__, 0xCF, I000, 0x01)
1342            I000 = 0x00
1343            MM00 (0x01)
1344            M205 (__METHOD__, 0xD0, I000, 0x02)
1345        }
1346
1347        SRMT ("m240")
1348        M240 ()
1349        SRMT ("m241")
1350        M241 ()
1351        SRMT ("m242")
1352        M242 ()
1353        SRMT ("m243")
1354        M243 ()
1355        SRMT ("m244")
1356        M244 ()
1357        SRMT ("m245")
1358        M245 ()
1359        SRMT ("m246")
1360        M246 ()
1361        SRMT ("m247")
1362        If (Y349)
1363        {
1364            M247 ()
1365        }
1366        Else
1367        {
1368            BLCK ()
1369        }
1370
1371        SRMT ("m248")
1372        M248 ()
1373        SRMT ("m249")
1374        M249 ()
1375        SRMT ("m24a")
1376        M24A ()
1377        SRMT ("m24b")
1378        M24B ()
1379        SRMT ("m24c")
1380        M24C ()
1381    }
1382
1383    /* Run-method */
1384
1385    Method (NM01, 0, NotSerialized)
1386    {
1387        Debug = "TEST: NM01, Declare Control Method Named Object"
1388        M207 ()
1389        CH03 ("NM01", Z133, __LINE__, 0x00, 0x00)
1390    }
1391