• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/acpica/tests/aslts/src/runtime/collections/functional/reference/
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 * References
31 *
32 * Verify exceptions for different operators dealing with references
33 */
34
35/*
36SEE: FILE BUG: hangs without printing error
37SEE: FILE BUG: CondRefOf doesnt cause exception but only under some conditions
38*/
39
40Name(z081, 81)
41
42// Run operator and expect ANY exception(s)
43Method(m1a7, 7, Serialized)
44{
45	Name(ts, "m1a7")
46
47	Store(1, FLG3)
48	Store(1, FLG4)
49
50	// flag, run test till the first error
51	if (c086) {
52		// Get current indicator of errors
53		if (GET2()) {
54			return
55		}
56	}
57
58	CH03(ts, z081, 0x200, arg6, arg6)
59/*
60	// FILE BUG: hangs without printing error
61	Store(CH03(ts, z081, 0x200, arg6, arg6), Local0)
62	if (Local0) {
63		Concatenate("Operation: 0x", arg6, Local0)
64		Store(Local0, Debug)
65	}
66*/
67
68	Switch (ToInteger (Arg6)) {
69		Case (7) {
70			Store(Acquire(arg0, 100), Local7)
71		}
72		Default {
73			m480(arg0, arg1, arg2, arg3, arg4, arg5, arg6)
74		}
75	}
76
77	CH04(c080, 0, 0xff, z081, 0x201, arg6, arg6)
78
79/*
80	// FILE BUG: hangs without printing error
81	Store(CH04(c080, 0, 0xff, z081, 0x201, arg6, arg6), Local0)
82	if (Local0) {
83		Concatenate("Operation: 0x", arg6, Local0)
84		Store(Local0, Debug)
85	}
86*/
87
88	Store(0, FLG3)
89	Store(0, FLG4)
90}
91
92/*
93 * Switch
94 *
95 * This sub-test causes break of exc_ref due to the bug 248
96 * (lose path after exception or hang).
97 * So, it is blocked, and in order to show 'Test is blocked'
98 * it is run also additionally separately.
99 */
100Method(m167, 1, Serialized)
101{
102	CH03("m167", z081, 0x206, 56, 56)
103	Switch (ToInteger (arg0)) {
104		Case (0) {
105			Store(0, Local7)
106		}
107		Default {
108			Store(1, Local7)
109		}
110	}
111	CH04(c080, 0, 0xff, z081, 0x207, 56, 56)
112}
113
114// Check reaction on OPERAND-REFERENCE (exceptions are expected in most cases)
115// arg0 - reference to the value of arbitrary type
116// arg1 - absolute index of file initiating the checking
117// arg2 - index of checking (inside the file)
118Method(m1a8, 3, Serialized)
119{
120	Name(ts, "m1a8")
121
122	// Return
123	Method(m000, 1)
124	{
125		return (arg0)
126	}
127
128	// If
129	Method(m001, 1)
130	{
131		CH03(ts, z081, 0x202, 54, 54)
132		if (arg0) {
133			Store(0, Local7)
134		}
135		CH04(c080, 0, 0xff, z081, 0x203, 54, 54)
136	}
137
138	// ElseIf
139	Method(m002, 1)
140	{
141		CH03(ts, z081, 0x204, 55, 55)
142		if (0) {
143			Store(0, Local7)
144		} elseif (arg0) {
145			Store(1, Local7)
146		}
147		CH04(c080, 0, 0xff, z081, 0x205, 55, 55)
148	}
149
150	// While
151	Method(m004, 1)
152	{
153		CH03(ts, z081, 0x208, 58, 58)
154		While (arg0) {
155			Store(0, Local7)
156			Break
157		}
158		CH04(c080, 0, 0xff, z081, 0x209, 58, 58)
159	}
160
161	// Set parameters of current checking
162	if (arg1) {
163		SET0(arg1, 0, arg2)
164	}
165
166	// flag, run test till the first error
167	if (c086) {
168		// Get current indicator of errors
169		if (GET2()) {
170			return
171		}
172	}
173
174	// Split into groups for debugging: some of them
175	// were crashing the system.
176
177	Name(rn00, 1) // CondRefOf
178	Name(rn01, 0) // DerefOf
179	if (y506) {
180		// Crash
181		Store(1, rn01)
182	}
183	Name(rn02, 1) // ObjectType
184	Name(rn03, 1) // RefOf
185	Name(rn04, 1) // SizeOf
186	Name(rn05, 1) // CopyObject
187	Name(rn06, 1) // Return
188	Name(rn07, 1) // If,ElseIf,Switch,While
189	Name(rn08, 1) // All other operators
190
191	Name(b000, Buffer(10) {})
192	Name(s000, "qwertyuiopasdfghjklz")
193	Name(p000, Package() {1,2,3,4,5,6,7,8,9})
194
195	Store(1, FLG4)
196
197	if (rn00) {
198		// CondRefOf
199
200		CH03(ts, z081, 0x20a, 0, 0)
201		m480(arg0, 0, 0, 0, 0, 0, 5)
202		CH03(ts, z081, 0x20b, 0, 0)
203	}
204
205	if (rn01) {
206		// DerefOf
207
208		CH03(ts, z081, 0x20c, 0, 0)
209		m480(arg0, 0, 0, 0, 0, 0, 8)
210		CH03(ts, z081, 0x20d, 0, 0)
211	}
212
213	if (rn02) {
214		// ObjectType
215
216		CH03(ts, z081, 0x20e, 0, 0)
217		m480(arg0, 0, 0, 0, 0, 0, 32)
218		CH03(ts, z081, 0x20f, 0, 0)
219	}
220
221	if (rn03) {
222		// RefOf
223
224		CH03(ts, z081, 0x210, 0, 0)
225		m480(arg0, 0, 0, 0, 0, 0, 34)
226		CH03(ts, z081, 0x211, 0, 0)
227	}
228
229	if (rn04) {
230
231		// SizeOf
232
233		Store(0, Local0)
234		Store(ObjectType(arg0), Local1)
235
236		Switch (ToInteger (Local1)) {
237			Case (1) {	// Integer
238				Store(1, Local0)
239			}
240			Case (2) {	// String
241				Store(1, Local0)
242			}
243			Case (3) {	// Buffer
244				Store(1, Local0)
245			}
246			Case (4) {	// Package
247				Store(1, Local0)
248			}
249		}
250
251		if (y505) {
252
253			// Buffer Field and Field Unit types should allow SizeOf()
254
255			Switch (ToInteger (Local1)) {
256				Case (5) {	// Field Unit
257					Store(1, Local0)
258				}
259				Case (14) {	// Buffer Field
260					Store(1, Local0)
261				}
262			}
263		}
264
265		if (Local0) {
266			CH03(ts, z081, 0x212, 0, 0)
267			m480(arg0, 0, 0, 0, 0, 0, 41)
268			CH03(ts, z081, 0x213, 0, 0)
269		} else {
270			m1a7(arg0, 0, 0, 0, 0, 0, 41)
271		}
272
273	} /* if(rn04) */
274
275	if (rn05) {
276
277		// CopyObject
278
279		CH03(ts, z081, 0x214, 0, 0)
280		CopyObject(arg0, Local7)
281		CH03(ts, z081, 0x215, 0, 0)
282	}
283
284	if (rn06) {
285
286		// Return
287
288		CH03(ts, z081, 0x216, 0, 0)
289		m000(arg0)
290		CH03(ts, z081, 0x217, 0, 0)
291	}
292
293	if (rn07) {
294
295		// If
296
297		m001(arg0)
298
299		// ElseIf
300
301		m002(arg0)
302
303		// Switch
304
305		if (y248) {
306			m167(arg0)
307		} else {
308			Store("WARNING: test m1a8:m1a8 blocked due to the bug 248!", Debug)
309		}
310
311		// While
312
313		m004(arg0)
314
315	} /* if(rn07) */
316
317	if (rn08) {
318
319	// Acquire
320
321	m1a7(arg0, 0, 0, 0, 0, 0, 0)
322
323	// Add
324
325	m1a7(arg0, 0, 0, 0, 0, 0, 1)
326	m1a7(0, arg0, 0, 0, 0, 0, 1)
327
328	// And
329
330	m1a7(arg0, 0, 0, 0, 0, 0, 2)
331	m1a7(0, arg0, 0, 0, 0, 0, 2)
332
333	// Concatenate
334
335	m1a7(arg0, 0, 0, 0, 0, 0, 3)
336	m1a7(0, arg0, 0, 0, 0, 0, 3)
337
338	// ConcatenateResTemplate
339
340	m1a7(arg0, 0, 0, 0, 0, 0, 4)
341	m1a7(0, arg0, 0, 0, 0, 0, 4)
342
343	// Decrement
344
345	m1a7(arg0, 0, 0, 0, 0, 0, 7)
346
347	// Divide
348
349	m1a7(arg0, 1, 0, 0, 0, 0, 9)
350	m1a7(1, arg0, 0, 0, 0, 0, 9)
351
352	// Fatal
353
354	// FindSetLeftBit
355
356	m1a7(arg0, 0, 0, 0, 0, 0, 11)
357
358	// FindSetRightBit
359
360	m1a7(arg0, 0, 0, 0, 0, 0, 12)
361
362	// FromBCD
363
364	m1a7(arg0, 0, 0, 0, 0, 0, 13)
365
366	// Increment
367
368	m1a7(arg0, 0, 0, 0, 0, 0, 14)
369
370	// Index
371
372	m1a7(arg0, 0, 0, 0, 0, 0, 15)
373	m1a7(b000, arg0, 0, 0, 0, 0, 15)
374
375	// LAnd
376
377	m1a7(arg0, 0, 0, 0, 0, 0, 16)
378	m1a7(0, arg0, 0, 0, 0, 0, 16)
379
380	// LEqual
381
382	m1a7(arg0, 0, 0, 0, 0, 0, 17)
383	m1a7(0, arg0, 0, 0, 0, 0, 17)
384
385	// LGreater
386
387	m1a7(arg0, 0, 0, 0, 0, 0, 18)
388	m1a7(0, arg0, 0, 0, 0, 0, 18)
389
390	// LGreaterEqual
391
392	m1a7(arg0, 0, 0, 0, 0, 0, 19)
393	m1a7(0, arg0, 0, 0, 0, 0, 19)
394
395	// LLess
396
397	m1a7(arg0, 0, 0, 0, 0, 0, 20)
398	m1a7(0, arg0, 0, 0, 0, 0, 20)
399
400	// LLessEqual
401
402	m1a7(arg0, 0, 0, 0, 0, 0, 21)
403	m1a7(0, arg0, 0, 0, 0, 0, 21)
404
405	// LNot
406
407	m1a7(arg0, 0, 0, 0, 0, 0, 22)
408
409	// LNotEqual
410
411	m1a7(arg0, 0, 0, 0, 0, 0, 23)
412	m1a7(0, arg0, 0, 0, 0, 0, 23)
413
414	// LOr
415
416	m1a7(arg0, 0, 0, 0, 0, 0, 24)
417	m1a7(0, arg0, 0, 0, 0, 0, 24)
418
419	// Match
420
421	m1a7(arg0, 0,    1,    1,    1, 0, 25)
422	m1a7(p000, 0, arg0,    1,    1, 0, 25)
423	m1a7(p000, 0,    1, arg0,    1, 0, 25)
424	m1a7(p000, 0,    1,    1, arg0, 0, 25)
425
426	// Mid
427
428	m1a7(arg0,    0,    5, 0, 0, 0, 26)
429	m1a7(s000, arg0,    5, 0, 0, 0, 26)
430	m1a7(s000,    0, arg0, 0, 0, 0, 26)
431
432	// Mod
433
434	m1a7(arg0, 1, 0, 0, 0, 0, 27)
435	m1a7(1, arg0, 0, 0, 0, 0, 27)
436
437	// Multiply
438
439	m1a7(arg0, 1, 0, 0, 0, 0, 28)
440	m1a7(1, arg0, 0, 0, 0, 0, 28)
441
442	// NAnd
443
444	m1a7(arg0, 1, 0, 0, 0, 0, 29)
445	m1a7(1, arg0, 0, 0, 0, 0, 29)
446
447	// NOr
448
449	m1a7(arg0, 1, 0, 0, 0, 0, 30)
450	m1a7(1, arg0, 0, 0, 0, 0, 30)
451
452	// Not
453
454	m1a7(arg0, 1, 0, 0, 0, 0, 31)
455
456	// Or
457
458	m1a7(arg0, 1, 0, 0, 0, 0, 33)
459	m1a7(1, arg0, 0, 0, 0, 0, 33)
460
461	// Release
462
463	m1a7(arg0, 0, 0, 0, 0, 0, 35)
464
465	// Reset
466
467	m1a7(arg0, 0, 0, 0, 0, 0, 36)
468
469	// ShiftLeft
470
471	m1a7(arg0, 1, 0, 0, 0, 0, 38)
472	m1a7(1, arg0, 0, 0, 0, 0, 38)
473
474	// ShiftRight
475
476	m1a7(arg0, 1, 0, 0, 0, 0, 39)
477	m1a7(1, arg0, 0, 0, 0, 0, 39)
478
479	// Signal
480
481	m1a7(arg0, 0, 0, 0, 0, 0, 40)
482
483	// Sleep
484
485	m1a7(arg0, 0, 0, 0, 0, 0, 42)
486
487	// Stall
488
489	m1a7(arg0, 0, 0, 0, 0, 0, 43)
490
491	// Store
492
493	CH03(ts, z081, 0x218, 0, 0)
494	Store(arg0, Local7)
495	CH03(ts, z081, 0x219, 0, 0)
496
497	// Subtract
498
499	m1a7(arg0, 1, 0, 0, 0, 0, 45)
500	m1a7(1, arg0, 0, 0, 0, 0, 45)
501
502	// ToBCD
503
504	m1a7(arg0, 0, 0, 0, 0, 0, 46)
505
506	// ToBuffer
507
508	m1a7(arg0, 0, 0, 0, 0, 0, 47)
509
510	// ToDecimalString
511
512	m1a7(arg0, 0, 0, 0, 0, 0, 48)
513
514	// ToHexString
515
516	m1a7(arg0, 0, 0, 0, 0, 0, 49)
517
518	// ToInteger
519
520	m1a7(arg0, 0, 0, 0, 0, 0, 50)
521
522	// ToString
523
524	m1a7(arg0,    1, 0, 0, 0, 0, 51)
525	m1a7(b000, arg0, 0, 0, 0, 0, 51)
526
527	// Wait
528
529	m1a7(arg0,    1, 0, 0, 0, 0, 52)
530	m1a7(b000, arg0, 0, 0, 0, 0, 52)
531
532	// XOr
533
534	m1a7(arg0,    1, 0, 0, 0, 0, 53)
535	m1a7(b000, arg0, 0, 0, 0, 0, 53)
536
537	} // if(rn08)
538
539	Store(0, FLG4)
540
541	RST0()
542
543	return
544}
545
546// Simple test, only some particular ways of obtaining references
547Method(m1a9,, Serialized)
548{
549	// FILE BUG: CondRefOf doesnt cause exception but only under some conditions,
550	// namely for rn00 == 2.
551
552	Name(rn00, 2) // Simplest modes, for debugging
553	Name(rn01, 1) // Crash
554
555	if (LEqual(rn00, 0)) {
556
557		// Simplest mode, ONE-TWO operations of those below
558
559		Store(RefOf(i900), Local0)
560		m1a8(Local0, z081, 15)
561
562		Store(CondRefOf(i900, Local0), Local1)
563		if (m1a4(Local1, 34)) {
564			m1a8(Local0, z081, 35)
565		}
566
567	} elseif (LEqual(rn00, 1)) {
568
569
570		// Simplest mode, SOME of operations below
571
572		Store(Index(s900, 0), Local0)
573		m1a8(Local0, z081, 0)
574
575		Store(Index(b900, 3), Local0)
576		m1a8(Local0, z081, 1)
577
578		Store(Index(p901, 0), Local0)
579		m1a8(Local0, z081, 2)
580
581		Store(Index(p91e, 0), Local0)
582		m1a8(Local0, z081, 4)
583
584		Store(Index(p901, 0, Local1), Local0)
585		m1a8(Local1, z081, 10)
586
587		Store(Index(p91e, 0, Local1), Local0)
588		m1a8(Local1, z081, 14)
589
590		Store(RefOf(i900), Local0)
591		m1a8(Local0, z081, 15)
592
593		Store(RefOf(f900), Local0)
594		m1a8(Local0, z081, 18)
595
596		Store(RefOf(bn90), Local0)
597		m1a8(Local0, z081, 19)
598
599		Store(RefOf(if90), Local0)
600		m1a8(Local0, z081, 20)
601
602		Store(RefOf(bf90), Local0)
603		m1a8(Local0, z081, 21)
604
605		Store(CondRefOf(i900, Local0), Local1)
606		if (m1a4(Local1, 34)) {
607			m1a8(Local0, z081, 35)
608		}
609
610	} else {
611
612		// Index
613
614		Store(Index(s900, 0), Local0)
615		m1a8(Local0, z081, 0)
616
617		Store(Index(b900, 3), Local0)
618		m1a8(Local0, z081, 1)
619
620		Store(Index(p901, 0), Local0)
621		m1a8(Local0, z081, 2)
622
623		if (rn01) {
624			Store(Index(p916, 0), Local0)
625			m1a8(Local0, z081, 3)
626		}
627
628		Store(Index(p91e, 0), Local0)
629		m1a8(Local0, z081, 4)
630
631		Store(Index(s900, 0, Local1), Local0)
632		m1a8(Local0, z081, 5)
633		m1a8(Local1, z081, 6)
634
635		Store(Index(b900, 3, Local1), Local0)
636		m1a8(Local0, z081, 7)
637		m1a8(Local1, z081, 8)
638
639		Store(Index(p901, 0, Local1), Local0)
640		m1a8(Local0, z081, 9)
641		m1a8(Local1, z081, 10)
642
643		if (rn01) {
644			Store(Index(p916, 0, Local1), Local0)
645			m1a8(Local0, z081, 11)
646			m1a8(Local1, z081, 12)
647		}
648
649		Store(Index(p91e, 0, Local1), Local0)
650		m1a8(Local0, z081, 13)
651		m1a8(Local1, z081, 14)
652
653		// RefOf
654
655		Store(RefOf(i900), Local0)
656		m1a8(Local0, z081, 15)
657
658		Store(RefOf(s900), Local0)
659		m1a8(Local0, z081, 16)
660
661		Store(RefOf(b900), Local0)
662		m1a8(Local0, z081, 17)
663
664		Store(RefOf(f900), Local0)
665		m1a8(Local0, z081, 18)
666
667		Store(RefOf(bn90), Local0)
668		m1a8(Local0, z081, 19)
669
670		Store(RefOf(if90), Local0)
671		m1a8(Local0, z081, 20)
672
673		Store(RefOf(bf90), Local0)
674		m1a8(Local0, z081, 21)
675
676		Store(RefOf(e900), Local0)
677		m1a8(Local0, z081, 22)
678
679		Store(RefOf(mx90), Local0)
680		m1a8(Local0, z081, 23)
681
682		Store(RefOf(d900), Local0)
683		m1a8(Local0, z081, 24)
684
685		Store(RefOf(tz90), Local0)
686		m1a8(Local0, z081, 25)
687
688		Store(RefOf(pr90), Local0)
689		m1a8(Local0, z081, 26)
690
691		Store(RefOf(r900), Local0)
692		m1a8(Local0, z081, 27)
693
694		Store(RefOf(pw90), Local0)
695		m1a8(Local0, z081, 28)
696
697		Store(RefOf(p900), Local0)
698		m1a8(Local0, z081, 29)
699
700		Store(RefOf(p901), Local0)
701		m1a8(Local0, z081, 30)
702
703		Store(RefOf(p916), Local0)
704		m1a8(Local0, z081, 31)
705
706		Store(RefOf(p91d), Local0)
707		m1a8(Local0, z081, 32)
708
709		Store(RefOf(p91e), Local0)
710		m1a8(Local0, z081, 33)
711
712		// CondRefOf
713
714		Store(CondRefOf(i900, Local0), Local1)
715		if (m1a4(Local1, 34)) {
716			m1a8(Local0, z081, 35)
717		}
718
719		Store(CondRefOf(s900, Local0), Local1)
720		if (m1a4(Local1, 36)) {
721			m1a8(Local0, z081, 37)
722		}
723
724		Store(CondRefOf(b900, Local0), Local1)
725		if (m1a4(Local1, 38)) {
726			m1a8(Local0, z081, 39)
727		}
728
729		Store(CondRefOf(f900, Local0), Local1)
730		if (m1a4(Local1, 40)) {
731			m1a8(Local0, z081, 41)
732		}
733
734		Store(CondRefOf(bn90, Local0), Local1)
735		if (m1a4(Local1, 42)) {
736			m1a8(Local0, z081, 43)
737		}
738
739		Store(CondRefOf(if90, Local0), Local1)
740		if (m1a4(Local1, 44)) {
741			m1a8(Local0, z081, 45)
742		}
743
744		Store(CondRefOf(bf90, Local0), Local1)
745		if (m1a4(Local1, 46)) {
746			m1a8(Local0, z081, 47)
747		}
748
749		Store(CondRefOf(e900, Local0), Local1)
750		if (m1a4(Local1, 48)) {
751			m1a8(Local0, z081, 49)
752		}
753
754		Store(CondRefOf(mx90, Local0), Local1)
755		if (m1a4(Local1, 50)) {
756			m1a8(Local0, z081, 51)
757		}
758
759		Store(CondRefOf(d900, Local0), Local1)
760		if (m1a4(Local1, 52)) {
761			m1a8(Local0, z081, 53)
762		}
763
764		Store(CondRefOf(tz90, Local0), Local1)
765		if (m1a4(Local1, 54)) {
766			m1a8(Local0, z081, 55)
767		}
768
769		Store(CondRefOf(pr90, Local0), Local1)
770		if (m1a4(Local1, 56)) {
771			m1a8(Local0, z081, 57)
772		}
773
774		Store(CondRefOf(r900, Local0), Local1)
775		if (m1a4(Local1, 58)) {
776			m1a8(Local0, z081, 59)
777		}
778
779		Store(CondRefOf(pw90, Local0), Local1)
780		if (m1a4(Local1, 60)) {
781			m1a8(Local0, z081, 61)
782		}
783
784		Store(CondRefOf(p900, Local0), Local1)
785		if (m1a4(Local1, 62)) {
786			m1a8(Local0, z081, 63)
787		}
788
789		Store(CondRefOf(p901, Local0), Local1)
790		if (m1a4(Local1, 64)) {
791			m1a8(Local0, z081, 65)
792		}
793
794		Store(CondRefOf(p916, Local0), Local1)
795		if (m1a4(Local1, 66)) {
796			m1a8(Local0, z081, 67)
797		}
798
799		Store(CondRefOf(p91d, Local0), Local1)
800		if (m1a4(Local1, 68)) {
801			m1a8(Local0, z081, 69)
802		}
803
804		Store(CondRefOf(p91e, Local0), Local1)
805		if (m1a4(Local1, 70)) {
806			m1a8(Local0, z081, 71)
807		}
808
809	} // if(rn00)
810}
811
812Method(m106,, Serialized)
813{
814	Name(ts, "m106")
815
816	Name(i000, 0xabcd0000)
817
818	Method(m000, 1)
819	{
820		CH03(ts, z081, 72, 0, 0)
821
822		Store(DerefOf(RefOf(DerefOf(RefOf(arg0)))), Debug)
823
824		CH04(c080, 0, 0xff, z081, 73, 0, 0)
825	}
826
827	m000(i000)
828}
829
830
831// Run-method
832Method(REF5,, Serialized)
833{
834	Name(p91e, Package() {0xabcd0000})
835
836	Store("TEST: REF5, References, check exceptions", Debug)
837
838	Store("REF5", c080)	// name of test
839	Store(z081, c081)		// absolute index of file initiating the checking
840	Store(1, c082)		// flag of test of exceptions
841	Store(0, c083)		// run verification of references (write/read)
842	Store(0, c084)		// run verification of references (reading)
843	Store(0, c085)		// create the chain of references to LocalX, then dereference them
844	Store(0, c086)		// flag, run test till the first error
845	Store(1, c087)		// apply DeRefOf to ArgX-ObjectReference
846	Store(1, c089)		// flag of Reference, object otherwise
847
848	if (0) {
849
850		// This mode of test run takes much time, moreover,
851		// due to the bug 95 of ACPICA it fails to complete.
852		// So, if run it then do it with the flag c086 set up
853		// - run test till the first error.
854
855		Store(1, c086) // flag, run test till the first error
856
857		// For local data (methods of ref1.asl)
858
859		// Reset current indicator of errors
860		RST2()
861
862		Store(z077, c081) // absolute index of file initiating the checking
863
864		SRMT("m168")
865		m168()
866		SRMT("m169")
867		m169()
868		SRMT("m16a")
869		m16a(0)
870		SRMT("m16b")
871		m16b()
872		SRMT("m16c")
873		m16c(0)
874		SRMT("m16d")
875		m16d()
876		SRMT("m16e")
877		m16e()
878
879		// For global data (methods of ref4.asl)
880
881		Store(z080, c081) // absolute index of file initiating the checking
882
883		SRMT("m190")
884		m190()
885		SRMT("m191")
886		m191(0)
887		SRMT("m192")
888		m192()
889		SRMT("m193")
890		m193(0)
891		SRMT("m194")
892		m194()
893
894	} else {
895
896		// Run simple test only for some particular ways of
897		// obtaining references.
898
899		Store(0, c086) // dont break testing on error appearance
900
901		SRMT("m1a9")
902		m1a9()
903	}
904
905	// Particular tests
906
907	SRMT("m106")
908	m106()
909	SRMT("m167")
910	if (y248) {
911		/* This code here only to not forget to run m1a8:m167 */
912		Store(Index(p91e, 0, Local1), Local0)
913		m167(Local0)
914	} else {
915		BLCK()
916	}
917}
918
919
920