1/*
2 * Some or all of this work - Copyright (c) 2006 - 2016, 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/*
30 * The tests differ those from ns1.asl by that the parent object is
31 * passed to methods as argument (Arg) but not directly by name.
32 */
33Name(z157, 157)
34
35Method(m300,, Serialized)
36{
37	Name(ts, "m300")
38	Name(p000, Package() {0xabcd0000, 0xabcd0001, 0xabcd0002})
39	Method(m000, 1)
40	{
41		Method(m001, 2)
42		{
43			Store(0x11112222, Index(arg0, 0))
44		}
45
46		m001(arg0, RefOf(arg0))
47
48		Store(DerefOf(Index(arg0, 0)), Local0)
49
50		if (LNotEqual(Local0, 0x11112222)) {
51			err(ts, z157, 0x000, 0, 0, Local0, 0x11112222)
52		}
53	}
54
55	m000(p000)
56
57	Store(DerefOf(Index(p000, 0)), Local0)
58
59	if (LNotEqual(Local0, 0x11112222)) {
60		err(ts, z157, 0x001, 0, 0, Local0, 0x11112222)
61	}
62
63	CH03(ts, z157, 0x002, 0, 0)
64}
65
66Method(m301,, Serialized)
67{
68	Name(ts, "m301")
69	Name(b000, Buffer() {0x10, 0x11, 0x12})
70
71	Method(m000, 1)
72	{
73		Method(m001, 2)
74		{
75			Store(0x67, Index(arg0, 0))
76		}
77
78		m001(arg0, RefOf(arg0))
79
80		Store(DerefOf(Index(arg0, 0)), Local0)
81
82		if (LNotEqual(Local0, 0x67)) {
83			err(ts, z157, 0x003, 0, 0, Local0, 0x67)
84		}
85	}
86
87	m000(b000)
88
89	Store(DerefOf(Index(b000, 0)), Local0)
90
91	if (LNotEqual(Local0, 0x67)) {
92		err(ts, z157, 0x004, 0, 0, Local0, 0x67)
93	}
94
95	CH03(ts, z157, 0x005, 0, 0)
96}
97
98Method(m302,, Serialized)
99{
100	Name(ts, "m302")
101	Name(s000, "qqqqqqqqqqqqqq")
102	Method(m000, 1)
103	{
104		Method(m001, 2)
105		{
106			Store(0x38, Index(arg0, 0))
107		}
108
109		m001(arg0, RefOf(arg0))
110
111		Store(DerefOf(Index(arg0, 0)), Local0)
112
113		if (LNotEqual(Local0, 0x38)) {
114			err(ts, z157, 0x006, 0, 0, Local0, 0x38)
115		}
116	}
117
118	m000(s000)
119
120	Store(DerefOf(Index(s000, 0)), Local0)
121
122	if (LNotEqual(Local0, 0x38)) {
123		err(ts, z157, 0x007, 0, 0, Local0, 0x38)
124	}
125
126	CH03(ts, z157, 0x008, 0, 0)
127}
128
129/*
130 * Element of Package instead of i000 (in m001)
131 */
132Method(m303, 1, Serialized)
133{
134	Name(ts, "m303")
135	Name(pp00, Package() {0x11111111, 0x00000001, 0x22223333})
136
137	Method(m000, 2, Serialized)
138	{
139		Name(i001, 0)
140		Name(p000, Package() {1,2,3,4})
141
142		CH03(ts, z157, 0x009, 0, 0)
143
144		Store(arg1, i001)
145
146		Method(m001, 1)
147		{
148			Method(m002, 1)
149			{
150				Method(m003, 1)
151				{
152					Method(m004, 1)
153					{
154						Method(m005, 1)
155						{
156							Method(m006, 1)
157							{
158								Method(m007, 1)
159								{
160									Method(m008, 1)
161									{
162										if (i001)
163										{
164											Store(p000, Index(arg0, 1))
165										}
166										Return (0)
167									}
168									Store(0x80000000, Index(arg0, 1))
169									Return (Add(DerefOf(Index(arg0, 1)), m008(arg0)))
170								}
171								Store(0x07000000, Index(arg0, 1))
172								Return (Add(DerefOf(Index(arg0, 1)), m007(arg0)))
173							}
174							Store(0x00600000, Index(arg0, 1))
175							Return (Add(DerefOf(Index(arg0, 1)), m006(arg0)))
176						}
177						Store(0x00050000, Index(arg0, 1))
178						Return (Add(DerefOf(Index(arg0, 1)), m005(arg0)))
179					}
180					Store(0x00004000, Index(arg0, 1))
181					Return (Add(DerefOf(Index(arg0, 1)), m004(arg0)))
182				}
183				Store(0x00000300, Index(arg0, 1))
184				Return (Add(DerefOf(Index(arg0, 1)), m003(arg0)))
185			}
186			Store(0x00000020, Index(arg0, 1))
187			Return (Add(DerefOf(Index(arg0, 1)), m002(arg0)))
188		}
189		Store(Add(DerefOf(Index(arg0, 1)), m001(arg0)), Local0)
190
191		if (LNotEqual(Local0, 0x87654321)) {
192			err(ts, z157, 0x00a, 0, 0, Local0, 0x87654321)
193		}
194
195		Store(DerefOf(Index(arg0, 1)), Local1)
196
197		if (LNotEqual(Local1, 0x80000000)) {
198			err(ts, z157, 0x00b, 0, 0, Local1, 0x80000000)
199		}
200
201		CH03(ts, z157, 0x00c, 0, 0)
202
203		Return (Local0)
204	}
205
206	Store(m000(pp00, arg0), Local0)
207
208	if (LNotEqual(Local0, 0x87654321)) {
209		err(ts, z157, 0x00d, 0, 0, Local0, 0x87654321)
210	}
211
212	Store(DerefOf(Index(pp00, 1)), Local0)
213
214	if (LNotEqual(Local0, 0x80000000)) {
215		err(ts, z157, 0x00e, 0, 0, Local0, 0x80000000)
216	}
217
218	CH03(ts, z157, 0x00f, 0, 0)
219}
220
221/*
222 * Element of Package instead of i000 (in m002)
223 */
224Method(m304,, Serialized)
225{
226	Name(ts, "m304")
227	Name(i001, 0)
228	Name(pp00, Package() {0x11111111, 0x00100000, 0x22223333})
229
230	Method(m000, 1)
231	{
232		Method(m001, 1)
233		{
234			if (LLess(i001, 100)) {
235				Store(DerefOf(Index(arg0, 1)), Local0)
236				Increment(Local0)
237				Store(Local0, Index(arg0, 1))
238				Increment(i001)
239				Add(DerefOf(Index(arg0, 1)), m001(arg0), Local0)
240				Return (Local0)
241			}
242			Return (0)
243		}
244		Store(Add(DerefOf(Index(arg0, 1)), m001(arg0)), Local0)
245
246		if (LNotEqual(Local0, 0x065013BA)) {
247			err(ts, z157, 0x010, 0, 0, Local0, 0x065013BA)
248		}
249
250		Store(DerefOf(Index(arg0, 1)), Local1)
251
252		if (LNotEqual(Local1, 0x00100064)) {
253			err(ts, z157, 0x011, 0, 0, Local1, 0x00100064)
254		}
255		Return (Local0)
256	}
257
258	Store(m000(pp00), Local0)
259
260	if (LNotEqual(Local0, 0x065013BA)) {
261		err(ts, z157, 0x012, 0, 0, Local0, 0x065013BA)
262	}
263
264	Store(DerefOf(Index(pp00, 1)), Local1)
265
266	if (LNotEqual(Local1, 0x00100064)) {
267		err(ts, z157, 0x013, 0, 0, Local1, 0x00100064)
268	}
269
270	CH03(ts, z157, 0x014, 0, 0)
271}
272
273/*
274 * Buffer Field instead of i000 (in m001)
275 */
276Method(m305,, Serialized)
277{
278	Name(ts, "m305")
279	Name(b000, Buffer(16) {})
280
281	CH03(ts, z157, 0x015, 0, 0)
282
283	CreateField(b000, 5, 32, bf00)
284	Store(0xabcdef70, bf00)
285
286	Method(m000, 1)
287	{
288		Method(m001)
289		{
290			Method(m002)
291			{
292				Method(m003)
293				{
294					Method(m004)
295					{
296						Method(m005)
297						{
298							Method(m006)
299							{
300								Method(m007)
301								{
302									Method(m008)
303									{
304										Return (0)
305									}
306									Store(0x80000000, arg0)
307									Return (Add(arg0, m008()))
308								}
309								Store(0x07000000, arg0)
310								Return (Add(arg0, m007()))
311							}
312							Store(0x00600000, arg0)
313							Return (Add(arg0, m006()))
314						}
315						Store(0x00050000, arg0)
316						Return (Add(arg0, m005()))
317					}
318					Store(0x00004000, arg0)
319					Return (Add(arg0, m004()))
320				}
321				Store(0x00000300, arg0)
322				Return (Add(arg0, m003()))
323			}
324			Store(0x00000020, arg0)
325			Return (Add(arg0, m002()))
326		}
327
328		Store(0x0000001, arg0)
329
330		Store(Add(arg0, m001()), Local0)
331
332		if (LNotEqual(Local0, 0x87654321)) {
333			err(ts, z157, 0x016, 0, 0, Local0, 0x87654321)
334		}
335
336		Store(0x0000001, Local1)
337
338		if (LNotEqual(arg0, Local1)) {
339			err(ts, z157, 0x017, 0, 0, arg0, Local1)
340		}
341
342		CH03(ts, z157, 0x018, 0, 0)
343
344		Return (Local0)
345	}
346
347	Store(m000(bf00), Local0)
348
349	if (LNotEqual(Local0, 0x87654321)) {
350		err(ts, z157, 0x019, 0, 0, Local0, 0x87654321)
351	}
352
353	Store(0xabcdef70, Local1)
354
355	if (LNotEqual(bf00, Local1)) {
356		err(ts, z157, 0x01a, 0, 0, bf00, Local1)
357	}
358
359	CH03(ts, z157, 0x01b, 0, 0)
360}
361
362/*
363 * Field instead of i000 (in m001)
364 */
365Method(m306,, Serialized)
366{
367	Name(ts, "m306")
368	Name(i001, 0)
369	OperationRegion(r000, SystemMemory, 0x100, 0x100)
370	Field(r000, ByteAcc, NoLock, Preserve) { f000,32, f001,32 }
371
372	CH03(ts, z157, 0x01c, 0, 0)
373
374	Store(0xabcdef70, f000)
375
376	Method(m000, 1)
377	{
378		Method(m001)
379		{
380			Method(m002)
381			{
382				Method(m003)
383				{
384					Method(m004)
385					{
386						Method(m005)
387						{
388							Method(m006)
389							{
390								Method(m007)
391								{
392									Method(m008)
393									{
394										Return (0)
395									}
396									Store(0x80000000, arg0)
397									Return (Add(arg0, m008()))
398								}
399								Store(0x07000000, arg0)
400								Return (Add(arg0, m007()))
401							}
402							Store(0x00600000, arg0)
403							Return (Add(arg0, m006()))
404						}
405						Store(0x00050000, arg0)
406						Return (Add(arg0, m005()))
407					}
408					Store(0x00004000, arg0)
409					Return (Add(arg0, m004()))
410				}
411				Store(0x00000300, arg0)
412				Return (Add(arg0, m003()))
413			}
414			Store(0x00000020, arg0)
415			Return (Add(arg0, m002()))
416		}
417
418		Store(0x0000001, arg0)
419
420		Store(Add(arg0, m001()), Local0)
421
422		if (LNotEqual(Local0, 0x87654321)) {
423			err(ts, z157, 0x01d, 0, 0, Local0, 0x87654321)
424		}
425
426		Store(0x0000001, Local1)
427
428		if (LNotEqual(arg0, Local1)) {
429			err(ts, z157, 0x01e, 0, 0, arg0, Local1)
430		}
431
432		CH03(ts, z157, 0x01f, 0, 0)
433
434		Return (Local0)
435	}
436
437	Store(m000(f000), Local0)
438
439	if (LNotEqual(Local0, 0x87654321)) {
440		err(ts, z157, 0x020, 0, 0, Local0, 0x87654321)
441	}
442
443	Store(0xabcdef70, Local1)
444
445	if (LNotEqual(f000, Local1)) {
446		err(ts, z157, 0x021, 0, 0, f000, Local1)
447	}
448
449	CH03(ts, z157, 0x022, 0, 0)
450}
451
452/*
453 * Bank Field instead of i000 (in m001)
454 */
455Method(m307,, Serialized)
456{
457	Name(ts, "m307")
458	Name(i001, 0)
459	OperationRegion(r000, SystemMemory, 0x100, 0x100)
460	Field(r000, ByteAcc, NoLock, Preserve) { f000,32, f001,32 }
461	BankField(r000, f001, 0, ByteAcc, NoLock, Preserve) { bnk0, 32 }
462
463	CH03(ts, z157, 0x023, 0, 0)
464
465	Store(0xabcdef70, bnk0)
466
467	Method(m000, 1)
468	{
469		Method(m001)
470		{
471			Method(m002)
472			{
473				Method(m003)
474				{
475					Method(m004)
476					{
477						Method(m005)
478						{
479							Method(m006)
480							{
481								Method(m007)
482								{
483									Method(m008)
484									{
485										Return (0)
486									}
487									Store(0x80000000, arg0)
488									Return (Add(arg0, m008()))
489								}
490								Store(0x07000000, arg0)
491								Return (Add(arg0, m007()))
492							}
493							Store(0x00600000, arg0)
494							Return (Add(arg0, m006()))
495						}
496						Store(0x00050000, arg0)
497						Return (Add(arg0, m005()))
498					}
499					Store(0x00004000, arg0)
500					Return (Add(arg0, m004()))
501				}
502				Store(0x00000300, arg0)
503				Return (Add(arg0, m003()))
504			}
505			Store(0x00000020, arg0)
506			Return (Add(arg0, m002()))
507		}
508
509		Store(0x0000001, arg0)
510
511		Store(Add(arg0, m001()), Local0)
512
513		if (LNotEqual(Local0, 0x87654321)) {
514			err(ts, z157, 0x024, 0, 0, Local0, 0x87654321)
515		}
516
517		Store(0x0000001, Local1)
518
519		if (LNotEqual(arg0, Local1)) {
520			err(ts, z157, 0x025, 0, 0, arg0, Local1)
521		}
522
523		CH03(ts, z157, 0x026, 0, 0)
524
525		Return (Local0)
526	}
527
528	Store(m000(bnk0), Local0)
529
530	if (LNotEqual(Local0, 0x87654321)) {
531		err(ts, z157, 0x027, 0, 0, Local0, 0x87654321)
532	}
533
534	Store(0xabcdef70, Local1)
535
536	if (LNotEqual(bnk0, Local1)) {
537		err(ts, z157, 0x028, 0, 0, bnk0, Local1)
538	}
539
540	CH03(ts, z157, 0x029, 0, 0)
541}
542
543/*
544 * Index Field instead of i000 (in m001)
545 */
546Method(m308,, Serialized)
547{
548	Name(ts, "m308")
549	Name(i001, 0)
550	OperationRegion(r000, SystemMemory, 0x100, 0x100)
551	Field(r000, ByteAcc, NoLock, Preserve) { f000,32, f001,32 }
552	IndexField(f000, f001, ByteAcc, NoLock, Preserve) { if00, 32 }
553
554	CH03(ts, z157, 0x02a, 0, 0)
555
556	Store(0xabcdef70, if00)
557
558	Method(m000, 1)
559	{
560		Method(m001)
561		{
562			Method(m002)
563			{
564				Method(m003)
565				{
566					Method(m004)
567					{
568						Method(m005)
569						{
570							Method(m006)
571							{
572								Method(m007)
573								{
574									Method(m008)
575									{
576										Return (0)
577									}
578									Store(0x80000000, arg0)
579									Return (Add(arg0, m008()))
580								}
581								Store(0x07000000, arg0)
582								Return (Add(arg0, m007()))
583							}
584							Store(0x00600000, arg0)
585							Return (Add(arg0, m006()))
586						}
587						Store(0x00050000, arg0)
588						Return (Add(arg0, m005()))
589					}
590					Store(0x00004000, arg0)
591					Return (Add(arg0, m004()))
592				}
593				Store(0x00000300, arg0)
594				Return (Add(arg0, m003()))
595			}
596			Store(0x00000020, arg0)
597			Return (Add(arg0, m002()))
598		}
599
600		Store(0x0000001, arg0)
601
602		Store(Add(arg0, m001()), Local0)
603
604		if (LNotEqual(Local0, 0x87654321)) {
605			err(ts, z157, 0x02b, 0, 0, Local0, 0x87654321)
606		}
607
608		Store(0x0000001, Local1)
609
610		if (LNotEqual(arg0, Local1)) {
611			err(ts, z157, 0x02c, 0, 0, arg0, Local1)
612		}
613
614		CH03(ts, z157, 0x02d, 0, 0)
615
616		Return (Local0)
617	}
618
619	Store(m000(if00), Local0)
620
621	if (LNotEqual(Local0, 0x87654321)) {
622		err(ts, z157, 0x02e, 0, 0, Local0, 0x87654321)
623	}
624
625	Store(0xabcdef70, Local1)
626
627	if (LNotEqual(if00, Local1)) {
628		err(ts, z157, 0x02f, 0, 0, if00, Local1)
629	}
630
631	CH03(ts, z157, 0x030, 0, 0)
632}
633
634/*
635 * Element of Buffer instead of i000 (in m001)
636 */
637Method(m309, 1, Serialized)
638{
639	Name(ts, "m309")
640	Name(i001, 0)
641	Name(b000, Buffer() {0x11, 0x01, 0x22})
642
643	CH03(ts, z157, 0x031, 0, 0)
644
645	Store(arg0, i001)
646
647	Method(m000, 2)
648	{
649		Method(m001, 1)
650		{
651			Method(m002, 1)
652			{
653				Method(m003, 1)
654				{
655					Method(m004, 1)
656					{
657						Method(m005, 1)
658						{
659							Method(m006, 1)
660							{
661								Method(m007, 1)
662								{
663									Method(m008, 1)
664									{
665										if (i001)
666										{
667											Store(0xff, Index(arg0, 1))
668										}
669										Return (0)
670									}
671									Store(0x08, Index(arg0, 1))
672									Return (Add(DerefOf(Index(arg0, 1)), m008(arg0)))
673								}
674								Store(0x07, Index(arg0, 1))
675								Return (Add(DerefOf(Index(arg0, 1)), m007(arg0)))
676							}
677							Store(0x06, Index(arg0, 1))
678							Return (Add(DerefOf(Index(arg0, 1)), m006(arg0)))
679						}
680						Store(0x05, Index(arg0, 1))
681						Return (Add(DerefOf(Index(arg0, 1)), m005(arg0)))
682					}
683					Store(0x04, Index(arg0, 1))
684					Return (Add(DerefOf(Index(arg0, 1)), m004(arg0)))
685				}
686				Store(0x03, Index(arg0, 1))
687				Return (Add(DerefOf(Index(arg0, 1)), m003(arg0)))
688			}
689			Store(0x02, Index(arg0, 1))
690			Return (Add(DerefOf(Index(arg0, 1)), m002(arg0)))
691		}
692		Store(Add(DerefOf(Index(arg0, 1)), m001(arg0)), Local0)
693
694		if (LNotEqual(Local0, 0x24)) {
695			err(ts, z157, 0x032, 0, 0, Local0, 0x24)
696		}
697
698		Store(DerefOf(Index(arg0, 1)), Local1)
699
700		if (arg1) {
701			Store(0xff, Local2)
702		} else {
703			Store(0x08, Local2)
704		}
705
706		if (LNotEqual(Local1, Local2)) {
707			err(ts, z157, 0x033, 0, 0, Local1, Local2)
708		}
709
710		CH03(ts, z157, 0x034, 0, 0)
711
712		Return (Local0)
713	}
714
715	Store(m000(b000, arg0), Local0)
716
717	if (LNotEqual(Local0, 0x24)) {
718		err(ts, z157, 0x035, 0, 0, Local0, 0x24)
719	}
720
721	Store(DerefOf(Index(b000, 1)), Local1)
722
723	if (arg0) {
724		Store(0xff, Local2)
725	} else {
726		Store(0x08, Local2)
727	}
728
729	if (LNotEqual(Local1, Local2)) {
730		err(ts, z157, 0x036, 0, 0, Local1, Local2)
731	}
732
733	CH03(ts, z157, 0x037, 0, 0)
734}
735
736/*
737 * Element of String instead of i000 (in m001)
738 */
739Method(m30a, 1, Serialized)
740{
741	Name(ts, "m30a")
742	Name(i001, 0)
743	Name(s000, "q\001ertyuiop")
744
745	CH03(ts, z157, 0x038, 0, 0)
746
747	Store(arg0, i001)
748
749	Method(m000, 2)
750	{
751		Method(m001, 1)
752		{
753			Method(m002, 1)
754			{
755				Method(m003, 1)
756				{
757					Method(m004, 1)
758					{
759						Method(m005, 1)
760						{
761							Method(m006, 1)
762							{
763								Method(m007, 1)
764								{
765									Method(m008, 1)
766									{
767										if (i001)
768										{
769											Store(0xff, Index(arg0, 1))
770										}
771										Return (0)
772									}
773									Store(0x08, Index(arg0, 1))
774									Return (Add(DerefOf(Index(arg0, 1)), m008(arg0)))
775								}
776								Store(0x07, Index(arg0, 1))
777								Return (Add(DerefOf(Index(arg0, 1)), m007(arg0)))
778							}
779							Store(0x06, Index(arg0, 1))
780							Return (Add(DerefOf(Index(arg0, 1)), m006(arg0)))
781						}
782						Store(0x05, Index(arg0, 1))
783						Return (Add(DerefOf(Index(arg0, 1)), m005(arg0)))
784					}
785					Store(0x04, Index(arg0, 1))
786					Return (Add(DerefOf(Index(arg0, 1)), m004(arg0)))
787				}
788				Store(0x03, Index(arg0, 1))
789				Return (Add(DerefOf(Index(arg0, 1)), m003(arg0)))
790			}
791			Store(0x02, Index(arg0, 1))
792			Return (Add(DerefOf(Index(arg0, 1)), m002(arg0)))
793		}
794		Store(Add(DerefOf(Index(arg0, 1)), m001(arg0)), Local0)
795
796		if (LNotEqual(Local0, 0x24)) {
797			err(ts, z157, 0x039, 0, 0, Local0, 0x24)
798		}
799
800		Store(DerefOf(Index(arg0, 1)), Local1)
801
802		if (arg1) {
803			Store(0xff, Local2)
804		} else {
805			Store(0x08, Local2)
806		}
807
808		if (LNotEqual(Local1, Local2)) {
809			err(ts, z157, 0x03a, 0, 0, Local1, Local2)
810		}
811
812		CH03(ts, z157, 0x03b, 0, 0)
813
814		Return (Local0)
815	}
816
817	Store(m000(s000, arg0), Local0)
818
819	if (LNotEqual(Local0, 0x24)) {
820		err(ts, z157, 0x03c, 0, 0, Local0, 0x24)
821	}
822
823	Store(DerefOf(Index(s000, 1)), Local1)
824
825	if (arg0) {
826		Store(0xff, Local2)
827	} else {
828		Store(0x08, Local2)
829	}
830
831	if (LNotEqual(Local1, Local2)) {
832		err(ts, z157, 0x03d, 0, 0, Local1, Local2)
833	}
834
835	CH03(ts, z157, 0x03e, 0, 0)
836}
837
838/*
839 * Buffer Field instead of i000 (in m001)
840 *
841 * CreateField deeper than parent
842 */
843Method(m30b, 1, Serialized)
844{
845	Name(ts, "m30b")
846	Name(i001, 0)
847	Name(b000, Buffer(16) {})
848
849	Store(arg0, i001)
850
851	CH03(ts, z157, 0x03f, 0, 0)
852
853	Method(m000, 2)
854	{
855		CreateField(b000, 5, 32, bf00)
856
857		Method(m001)
858		{
859			Method(m002)
860			{
861				Method(m003)
862				{
863					Method(m004)
864					{
865						Method(m005)
866						{
867							Method(m006)
868							{
869								Method(m007)
870								{
871									Method(m008)
872									{
873										if (i001)
874										{
875											Store(0x11223344, bf00)
876										}
877										Return (0)
878									}
879									Store(0x80000000, bf00)
880									Return (Add(bf00, m008()))
881								}
882								Store(0x07000000, bf00)
883								Return (Add(bf00, m007()))
884							}
885							Store(0x00600000, bf00)
886							Return (Add(bf00, m006()))
887						}
888						Store(0x00050000, bf00)
889						Return (Add(bf00, m005()))
890					}
891					Store(0x00004000, bf00)
892					Return (Add(bf00, m004()))
893				}
894				Store(0x00000300, bf00)
895				Return (Add(bf00, m003()))
896			}
897			Store(0x00000020, bf00)
898			Return (Add(bf00, m002()))
899		}
900
901		Store(0x00000001, bf00)
902
903		Store(Add(bf00, m001()), Local0)
904
905		if (LNotEqual(Local0, 0x87654321)) {
906			err(ts, z157, 0x040, 0, 0, Local0, 0x87654321)
907		}
908
909		if (arg1) {
910			Store(0x11223344, Local1)
911		} else {
912			Store(0x80000000, Local1)
913		}
914
915		if (LNotEqual(bf00, Local1)) {
916			err(ts, z157, 0x041, 0, 0, bf00, Local1)
917		}
918
919		CH03(ts, z157, 0x042, 0, 0)
920
921		Return (Local0)
922	}
923
924	Store(m000(0, arg0), Local0)
925
926	if (LNotEqual(Local0, 0x87654321)) {
927		err(ts, z157, 0x043, 0, 0, Local0, 0x87654321)
928	}
929
930	CH03(ts, z157, 0x044, 0, 0)
931}
932
933Method(n003)
934{
935if (1) {
936	SRMT("m300")
937	m300()
938	SRMT("m301")
939	m301()
940	SRMT("m302")
941	m302()
942	SRMT("m303-0")
943	m303(0)
944	SRMT("m303-1")
945	if (y200) {
946		m303(1)
947	} else {
948		BLCK()
949	}
950	SRMT("m304")
951	m304()
952	SRMT("m305")
953	m305()
954	SRMT("m306")
955	m306()
956	SRMT("m307")
957	m307()
958	SRMT("m308")
959	m308()
960	SRMT("m309-0")
961	m309(0)
962	SRMT("m309-1")
963	m309(1)
964	SRMT("m30a-0")
965	m30a(0)
966	SRMT("m30a-1")
967	m30a(1)
968	SRMT("m30b-0")
969	m30b(0)
970	SRMT("m30b-1")
971	m30b(1)
972} else {
973	SRMT("m300")
974	m300()
975}
976}
977
978