Debian Codegraph @

tests/aslts/src/runtime/collections/Identity2MS/abbu/misc/ms1.asl

raw
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 /*
30 * Tests exercized during ACPICA to MS implementation comparison
31 */
32
33 Name(z179, 179)
34
35 /*
36 *
37 * Stuff not working under MS:
38 *
39 * 1) String to Integer Implicit operand conversion, ms10: a063, b063, c063 -
40 * a failure when a String in a position of an Integer; errors in e063,
41 * f063, g063, h063 are inverted by q004 flag (Implicit Operand conversion
42 * on MS contradicts ACPI Spec).
43 * 2) No exception on DerefOf of an arbitrary Source, ms11: b083, d083 -
44 * an expected failure on DerefOf of an Integer.
45 * 3) Access to FieldObject element of Package causes exception, ms16: f118 -
46 * a failure when an Integer is stored to a Named Package.
47 * 4) The Read access automatic dereference ... doesn't work, ms17: b126,
48 * c126 - a failure when a reference in ArgX is used in a position of Data.
49 * 5) CopyObject of immediately passed Index ... is not a reference, ms18:
50 * a127 - a failure due to the CopyObject operator in AML code.
51 * 6) Copying the RefOf reference to Named object ..., ms19: d128, e128 -
52 * a failure when a reference is stored to a Package element.
53 * 7) Store to the Index reference ... returned by Method ..., ms1a: a131,
54 * b131, c131 - a failure when a Method call is the Target of Store.
55 * 8) Read access automatic dereference for Index reference ..., ms1b: a132,
56 * b132 - a failure when the Index argument is used without Derefof.
57 * 9) Write access automatic dereference for Index reference ..., ms1c: b133 -
58 * a failure when a String element is to be changed.
59 * 10) Forward reference within a control method, ms20: cmfr - an expected
60 * failure when a Named Object is accessed before its declaration.
61 * 11) Recursive Serialized method execution, ms21: erec - an expected
62 * failure for the enough deep recursion.
63 * 12) Implicit return, ms23: emir?, fmir?, gmir - Break in the specifically
64 * declared while doesn't work.
65 * 13) Store(..., DeRefof(...)) behavior, ms25: a failure when a Refof or
66 * Derefof is the Target of Store.
67 * 14) IndexField implementation, my27: jife - a failure when the Access type
68 * of a Field is specified to be QWordAcc.
69 * 15) Acquire/Release, ms29: a hang when used with the Dynamic Mutex.
70 * 16) ToBuffer optional store, ms2a: it looks like ToBuffer does not work.
71 * 17) Package size calculation, ms2b: pac2 actually should be used with
72 * Package(3){1, 2, 3, 4, 5}) declaration, but iASL reports "Initializer
73 * list too long" error. Use it with -f iASL option.
74 * 18) Bug 246 issue, ms2f: c246 actually should be used without
75 * While(1){... Break) declaration, but iASL reports "No enclosing While
76 * statement" error. Use it with -f iASL option.
77 * 19) Storing of an improper specified Device object ..., ms33:
78 * a blue screen appears on the MS OS booting if that Device is global.
79 *
80 * 99)
81 */
82
83 // Useful for indirect storing
84
85 Method(RSTO, 2) {Store(arg0, arg1)}
86
87 Method(DSTO, 2) {Store(Derefof(arg0), arg1)}
88
89 /*
90 * Bug 63 issue:
91 *
92 * SUMMARY: String to Integer conversion contradicts new April 2005 Conversion Rules
93 */
94 Method(ms10, 1, Serialized)
95 {
96 Name(ts, "ms10")
97
98 Method(m063, 2)
99 {
100 OUTP("Bug 63: Add(\"0x1111\", 0, Local0) should return 0?")
101
102 OUTP("Addend1:")
103 OUTP(arg0)
104
105 Add(arg0, 0, Local0)
106
107 OUTP("Result (Local0):")
108 OUTP(Local0)
109
110 if (LNotEqual(arg1, Local0)) {
111 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
112 }
113 }
114
115 Method(n063, 3, Serialized)
116 {
117 Name (INT0, 0xffff)
118
119 OUTP("Bug 63upd: Implicit conversion \"0x1111\" to Integer should return 0?")
120
121 OUTP("String:")
122 OUTP(arg0)
123
124 Store(arg0, INT0)
125
126 OUTP("Result (INT0):")
127 OUTP(INT0)
128
129 if (LAnd(ABUU, LNot(q004))) {
130 // Implicit Operand conversion on MS contradicts ACPI Spec
131 if (LNotEqual(arg2, INT0)) {
132 err(ts, z179, __LINE__, 0, 0, INT0, arg2)
133 }
134 } else {
135 if (LNotEqual(arg1, INT0)) {
136 err(ts, z179, __LINE__, 0, 0, INT0, arg1)
137 }
138 }
139 }
140
141 Method(m000)
142 {
143 if (ABUU) {
144 } else {
145 m063("0", 0)
146 m063("0x", 0)
147 m063("0x1111", 0)
148 }
149 m063(1, 1)
150
151 n063("0", 0, 0x30)
152 n063("0x", 0, 0x7830)
153 n063("0x1111", 0, 0x31317830)
154 n063("0x111111111", 0, 0x31317830)
155 }
156
157 CH03(ts, z179, 0x002, __LINE__, 0)
158
159 switch (ToInteger (Arg0)) {
160 case (0) { m000() }
161 case (1) { m063("0", 0) }
162 case (2) { m063("0x", 0) }
163 case (3) { m063("0x1111", 0) }
164 case (4) { m063(1, 1) }
165
166 case (5) { n063("0", 0, 0x30) }
167 case (6) { n063("0x", 0, 0x7830) }
168 case (7) { n063("0x1111", 0, 0x31317830) }
169 case (8) { n063("0x111111111", 0, 0x31317830) }
170 }
171
172 CH03(ts, z179, 0x003, __LINE__, 0)
173 }
174
175 /* Methods to run manually (for ABBU only) */
176 Method(a063) { IIN0() ms10(1) Return(POUT) }
177 Method(b063) { IIN0() ms10(2) Return(POUT) }
178 Method(c063) { IIN0() ms10(3) Return(POUT) }
179 Method(d063) { IIN0() ms10(4) Return(POUT) }
180 Method(e063) { IIN0() ms10(5) Return(POUT) }
181 Method(f063) { IIN0() ms10(6) Return(POUT) }
182 Method(g063) { IIN0() ms10(7) Return(POUT) }
183 Method(h063) { IIN0() ms10(8) Return(POUT) }
184
185 /*
186 * Bug 83 issue:
187 *
188 * SUMMARY: No exception on DerefOf of an arbitrary Source
189 */
190 Method(ms11, 1, Serialized)
191 {
192 Name(ts, "ms11")
193
194 Method(m083, 1, Serialized)
195 {
196 Name(i000, 0x89abcdef)
197
198 OUTP("Bug 83: Derefof of non-Ref. (f.e. Integer) should produce exception")
199
200 OUTP("Name(i000, 0x89abcdef)")
201
202 if (arg0) {
203 Store(Derefof(i000), Local0)
204 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
205 } else {
206 Store(Derefof(Refof(i000)), Local0)
207 CH03(ts, z179, 0x005, __LINE__, 0)
208 }
209 }
210
211 Method(n083, 1, Serialized)
212 {
213 Name(i000, 0x89abcdef)
214
215 OUTP("Bug 83upd: Derefof of non-Ref. (f.e. Integer) should produce exception")
216
217 if (arg0) {
218 Store(0x89abcdef, Local0)
219 OUTP("Store(0x89abcdef, Local0)")
220 } else {
221 Store(Refof(i000), Local0)
222 OUTP("Store(Refof(i000), Local0)")
223 }
224 Store(Derefof(Local0), Local1)
225 if (arg0) {
226 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
227 } else {
228 CH03(ts, z179, 0x007, __LINE__, 0)
229 }
230 }
231
232 Method(m000)
233 {
234 m083(0)
235 if (ABUU) {
236 } else {
237 m083(1)
238 }
239 n083(0)
240 if (ABUU) {
241 } else {
242 n083(1)
243 }
244 }
245
246 CH03(ts, z179, 0x008, __LINE__, 0)
247
248 switch (ToInteger (Arg0)) {
249 case (0) { m000() }
250 case (1) { m083(0) }
251 case (2) { m083(1) }
252 case (3) { n083(0) }
253 case (4) { n083(1) }
254 }
255
256 CH03(ts, z179, 0x009, __LINE__, 0)
257 }
258
259 /* Methods to run manually (for ABBU only) */
260 Method(a083) { IIN0() ms11(1) Return(POUT) }
261 Method(b083) { IIN0() ms11(2) Return(POUT) }
262 Method(x083) { IIN0() ms11(3) Return(POUT) }
263 Method(d083) { IIN0() ms11(4) Return(POUT) }
264
265 /*
266 * Bug 100 issue:
267 *
268 * SUMMARY: The specific combination of operators aborts execution
269 */
270 Method(ms12,, Serialized)
271 {
272 Name(ts, "ms12")
273
274 Method(m100)
275 {
276 Method(m000)
277 {
278 return (0)
279 }
280
281 Method(m001,, Serialized)
282 {
283 m000()
284
285 Device(d000) {}
286
287 Name(i000, 0xabcdef)
288
289 OUTP("Finish of test")
290 }
291
292 OUTP("Bug 100 (fixed for 20050526): some combination of operators aborts execution")
293
294 m001()
295 }
296 CH03(ts, z179, 0x00a, __LINE__, 0)
297 m100()
298 CH03(ts, z179, 0x00b, __LINE__, 0)
299 }
300
301 /* Methods to run manually (for ABBU only) */
302 Method(a100) { IIN0() ms12() Return(POUT) }
303
304 /*
305 * Bug 113 issue:
306 *
307 * SUMMARY: Unexpected dereference of Index reference immediately passed to Method
308 */
309
310 Method(ms13, 1, Serialized)
311 {
312 Name(ts, "ms13")
313
314 Name(p001, Package(){0x10, 0x11, 0x12, 0x13, 0x14})
315 Name(p002, Package(){0x20, 0x21, 0x22, 0x23, 0x24})
316 Name(p003, Package(){0x30, 0x31, 0x32, 0x33, 0x34})
317 Name(p004, Package(){0x40, 0x41, 0x42, 0x43, 0x44})
318 Name(p005, Package(){0x50, 0x51, 0x52, 0x53, 0x54})
319
320 Method(a113)
321 {
322 Method(m000, 2)
323 {
324 Store(Derefof(arg0), Local0)
325 if (CH03(ts, z179, 0x00c, __LINE__, 0)) {
326 } elseif (LNotEqual(Local0, arg1)) {
327 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
328 }
329 }
330
331 OUTP("Bug 113: immediate Indexed Ref. as parameters of Methods are unexpectedly dereferenced 1")
332
333 m000(Index(p001, 0), 0x10)
334 }
335
336 Method(b113)
337 {
338 Method(m000, 2)
339 {
340 Store(Derefof(arg0), Local0)
341 if (CH03(ts, z179, 0x00e, __LINE__, 0)) {
342 } elseif (LNotEqual(Local0, arg1)) {
343 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
344 }
345 }
346
347 OUTP("Bug 113: immediate Indexed Ref. as parameters of Methods are unexpectedly dereferenced 2")
348
349 Store(Index(p001, 0), Local0)
350
351 m000(Local0, 0x10)
352 }
353
354 Method(s113)
355 {
356 Method(m000, 6)
357 {
358 OUTP(Derefof(arg0))
359 CH03(ts, z179, 0x012, __LINE__, 0)
360 OUTP(Derefof(arg1))
361 CH03(ts, z179, 0x013, __LINE__, 0)
362 OUTP(Derefof(arg2))
363 CH03(ts, z179, 0x014, __LINE__, 0)
364 OUTP(Derefof(arg3))
365 CH03(ts, z179, 0x015, __LINE__, 0)
366 OUTP(Derefof(arg4))
367 CH03(ts, z179, 0x016, __LINE__, 0)
368 OUTP(Derefof(arg5))
369 CH03(ts, z179, 0x017, __LINE__, 0)
370 }
371
372 OUTP("Bug 113 MS: immediate Indexed Ref. as parameters of Methods can be dereferenced 3")
373
374 Store(Index(p002, 1), Local0)
375
376 Index(p004, 3, Local1)
377
378 Store(Index(p005, 4, Local2), Local3)
379
380 m000(Index(p001, 0), Local0, Index(p003, 2, Local4), Local1, Local2, Local3)
381
382 OUTP(Derefof(Local4))
383 }
384
385 CH03(ts, z179, 0x018, __LINE__, 0)
386 switch (ToInteger (Arg0)) {
387 case (0) { a113() b113() s113()}
388 case (1) { a113() }
389 case (2) { b113() }
390 case (3) { s113() }
391 }
392 CH03(ts, z179, 0x019, __LINE__, 0)
393 }
394
395 /* Methods to run manually (for ABBU only) */
396 Method(a113) { IIN0() ms13(1) Return(POUT) }
397 Method(b113) { IIN0() ms13(2) Return(POUT) }
398 Method(c113) { IIN0() ms13(3) Return(POUT) }
399
400 /*
401 * Bug 114 issue:
402 *
403 * SUMMARY: Method object as a Source of Index operation is treated by iASL as a call to that Method
404 * Note: M001 will become a method call. No parens needed because it has no argument.
405 */
406 Method(ms14, 1, Serialized)
407 {
408 Name(ts, "ms14")
409
410 Method(m114, 1)
411 {
412 Method(m000, 1, Serialized)
413 {
414 Name(i001, 0)
415 Name(b001, Buffer(){10,2,3,4,5})
416
417 Method(m001)
418 {
419 Increment(i001)
420 return (Buffer(){10,2,3,4,5})
421 }
422
423 Method(m002)
424 {
425 Increment(i001)
426 return (Package(){10,2,3,4,5})
427 }
428
429 if (LEqual(arg0, 0)) {
430 OUTP("Start of test: Method returns (Buffer(){10,2,3,4,5})")
431 OUTP("Index(m001, 0, Local0)")
432 Index(m001, 0, Local0)
433 if (LAnd(ABUU, LNot(q005))) {
434 } elseif (LNot(i001)) {
435 err(ts, z179, __LINE__, 0, 0, i001, 0)
436 }
437 } elseif (LEqual(arg0, 1)) {
438 OUTP("Start of test: Method returns (Package(){10,2,3,4,5})")
439 OUTP("Index(m001, 0, Local0)")
440 Index(m001, 0, Local0)
441 if (LAnd(ABUU, LNot(q005))) {
442 } elseif (LNot(i001)) {
443 err(ts, z179, __LINE__, 0, 0, i001, 0)
444 }
445 } elseif (LEqual(arg0, 2)) {
446 OUTP("Start of test: Name(b001, Buffer(){10,2,3,4,5})")
447 OUTP("Index(b001, 0, Local0)")
448 Index(b001, 0, Local0)
449 OUTP(i001)
450 Store(DerefOf(Local0), Local1)
451 OUTP(Local1)
452 }
453
454 OUTP("Finish of test")
455 }
456
457 OUTP("Bug 114: Method object as a Source of Index operation")
458 m000(arg0)
459 }
460
461 Method(m000)
462 {
463 m114(0)
464 m114(1)
465 m114(2)
466 }
467
468 CH03(ts, z179, 0x01e, __LINE__, 0)
469 switch (ToInteger (Arg0)) {
470 case (0) { m000()}
471 case (1) { m114(0) }
472 case (2) { m114(1) }
473 case (3) { m114(2) }
474 }
475 CH03(ts, z179, 0x01f, __LINE__, 0)
476 }
477
478 /* Methods to run manually (for ABBU only) */
479 Method(a114) { IIN0() ms14(1) Return(POUT) }
480 Method(b114) { IIN0() ms14(2) Return(POUT) }
481 Method(c114) { IIN0() ms14(3) Return(POUT) }
482
483 /*
484 * Bug 115 issue:
485 *
486 * SUMMARY: Unexpected dereference of Index reference returned by Method and immediately passed to another Method
487 */
488 Method(ms15, 1, Serialized)
489 {
490 Name(ts, "ms15")
491
492 Name(p001, Package(){0x10})
493 Name(p002, Package(){0x20})
494 Name(p003, Package(){0x30})
495 Name(p004, Package(){0x40})
496 Name(p005, Package(){0x50})
497 Name(p006, Package(){0x60})
498
499 Method(m001) {Return(Index(p001, 0))}
500 Method(m002) {Store(Index(p002, 0), Local0)
501 Return(Local0)}
502 Method(m003) {Return(Index(p003, 0, Local0))}
503 Method(m004) {Index(p004, 0, Local0)
504 Return(Local0)}
505
506 Method(m005) {Store(Index(p005, 0, Local0), Local1)
507 Return(Local1)}
508 Method(m006) {Store(Index(p006, 0, Local0), Local1)
509 Return(Local0)}
510
511 Method(a115)
512 {
513
514 Method(m000, 2)
515 {
516 Store(Derefof(arg0), Local0)
517 if (CH03(ts, z179, 0x020, __LINE__, 0)) {
518 } elseif (LNotEqual(Local0, arg1)) {
519 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
520 }
521 }
522
523 OUTP("Bug 115: immediately returned Indexed Ref. as parameters of Methods are unexpectedly dereferenced 1")
524
525 m000(m001(), 0x10)
526 }
527
528 Method(b115)
529 {
530
531 Method(m000, 2)
532 {
533 Store(Derefof(arg0), Local0)
534 if (CH03(ts, z179, 0x022, __LINE__, 0)) {
535 } elseif (LNotEqual(Local0, arg1)) {
536 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
537 }
538 }
539
540 OUTP("Bug 115: immediately returned Indexed Ref. as parameters of Methods are unexpectedly dereferenced 2")
541
542 m000(m002(), 0x20)
543 }
544
545 Method(c115)
546 {
547
548 Method(m000, 2)
549 {
550 Store(Derefof(arg0), Local0)
551 if (CH03(ts, z179, 0x024, __LINE__, 0)) {
552 } elseif (LNotEqual(Local0, arg1)) {
553 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
554 }
555 }
556
557 OUTP("Bug 115: immediately returned Indexed Ref. as parameters of Methods are unexpectedly dereferenced 3")
558
559 m000(m003(), 0x30)
560 }
561
562 Method(d115)
563 {
564
565 Method(m000, 2)
566 {
567 Store(Derefof(arg0), Local0)
568 if (CH03(ts, z179, 0x026, __LINE__, 0)) {
569 } elseif (LNotEqual(Local0, arg1)) {
570 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
571 }
572 }
573
574 OUTP("Bug 115: immediately returned Indexed Ref. as parameters of Methods are unexpectedly dereferenced 4")
575
576 m000(m004(), 0x40)
577 }
578
579 Method(e115)
580 {
581
582 Method(m000, 2)
583 {
584 Store(Derefof(arg0), Local0)
585 if (CH03(ts, z179, 0x028, __LINE__, 0)) {
586 } elseif (LNotEqual(Local0, arg1)) {
587 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
588 }
589 }
590
591 OUTP("Bug 115: immediately returned Indexed Ref. as parameters of Methods are unexpectedly dereferenced 5")
592
593 m000(m005(), 0x50)
594 }
595
596 Method(f115)
597 {
598
599 Method(m000, 2)
600 {
601 Store(Derefof(arg0), Local0)
602 if (CH03(ts, z179, 0x02a, __LINE__, 0)) {
603 } elseif (LNotEqual(Local0, arg1)) {
604 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
605 }
606 }
607
608 OUTP("Bug 115: immediately returned Indexed Ref. as parameters of Methods are unexpectedly dereferenced 6")
609
610 m000(m006(), 0x60)
611 }
612
613 CH03(ts, z179, 0x02c, __LINE__, 0)
614 switch (ToInteger (Arg0)) {
615 case (0) { a115() b115() c115() d115() e115() f115()}
616 case (1) { a115() }
617 case (2) { b115() }
618 case (3) { c115() }
619 case (4) { d115() }
620 case (5) { e115() }
621 case (6) { f115() }
622 }
623 CH03(ts, z179, 0x02d, __LINE__, 0)
624 }
625
626 /* Methods to run manually (for ABBU only) */
627 Method(a115) { IIN0() ms15(1) Return(POUT) }
628 Method(b115) { IIN0() ms15(2) Return(POUT) }
629 Method(c115) { IIN0() ms15(3) Return(POUT) }
630 Method(d115) { IIN0() ms15(4) Return(POUT) }
631 Method(e115) { IIN0() ms15(5) Return(POUT) }
632 Method(f115) { IIN0() ms15(6) Return(POUT) }
633
634 /*
635 * Bug 118 issue:
636 *
637 * SUMMARY: Access to FieldObject element of Package causes exception
638 */
639 Method(ms16, 1, Serialized)
640 {
641 Name(ts, "ms16")
642
643 Method(a118,, Serialized)
644 {
645 Name(p90d, Package() {0xd650a284})
646
647 // Access to the Integer data as an element of Package
648 Method(m000)
649 {
650 OUTP("Test m000 started")
651
652 Store(Index(p90d, 0), Local0)
653 Store(DerefOf(Local0), Local1)
654 Store(ObjectType(Local1), Local2)
655
656 if (LNotEqual(Local2, 1)) {
657 err(ts, z179, __LINE__, 0, 0, Local2, 1)
658 if (LEqual(Local2, 2)) {
659 OUTP(Local1)
660 } else {
661 OUTP(Local2)
662 }
663 } else {
664 OUTP(Local1)
665 if (LNotEqual(Local1, 0xd650a284)) {
666 err(ts, z179, __LINE__, 0, 0, Local1, 0xd650a284)
667 } else {
668 OUTP("Ok")
669 }
670 }
671
672 OUTP("Test m000 finished")
673 }
674
675 OUTP("Bug 118: Integer data as an element of Package")
676
677 m000()
678 }
679
680 Method(b118,, Serialized)
681 {
682 Name(i900, 0xd650a284)
683
684 Name(p90d, Package() {i900})
685
686 // Access to the named Integer object as an element of Package
687 Method(m000)
688 {
689 OUTP("Test m000 started")
690
691 Store(Index(p90d, 0), Local0)
692 Store(DerefOf(Local0), Local1)
693 Store(ObjectType(Local1), Local2)
694
695 if (LAnd(ABUU, LNot(q006))) {
696 if (LNotEqual(Local2, 2)) {
697 err(ts, z179, __LINE__, 0, 0, Local2, 2)
698 }
699 } elseif (LNotEqual(Local2, 1)) {
700 err(ts, z179, __LINE__, 0, 0, Local2, 1)
701 } else {
702 OUTP(Local1)
703 if (LNotEqual(Local1, 0xd650a284)) {
704 err(ts, z179, __LINE__, 0, 0, Local1, 0xd650a284)
705 } else {
706 OUTP("Ok")
707 }
708 }
709
710 OUTP("Test m000 finished")
711 }
712
713 OUTP("Bug 118: Named Integer Object reference in Package")
714
715 m000()
716 }
717
718 Method(c118,, Serialized)
719 {
720 Name(b900, Buffer() {10,2,3,4,5,6,7,8,9})
721
722 CreateField(b900, 0, 8, bf90)
723
724 Name(p915, Package() {bf90})
725
726 // Access to the Buffer Field object as an element of Package
727 Method(m001)
728 {
729 OUTP("Test m001 started")
730
731 Store(Index(p915, 0), Local0)
732 Store(DerefOf(Local0), Local1)
733 Store(ObjectType(Local1), Local2)
734
735 if (LAnd(ABUU, LNot(q006))) {
736 if (LNotEqual(Local2, 2)) {
737 err(ts, z179, __LINE__, 0, 0, Local2, 2)
738 }
739 } elseif (LNotEqual(Local2, 0x3)) {
740 err(ts, z179, __LINE__, 0, 0, Local2, 0x3)
741 } elseif (y118) {
742 OUTP(Local1)
743 if (LNotEqual(Local1, 10)) {
744 err(ts, z179, __LINE__, 0, 0, Local1, 10)
745 } else {
746 OUTP("Ok")
747 }
748 }
749
750 OUTP("Test m001 finished")
751 }
752
753 OUTP("Bug 118: Named Buffer Field Object reference in Package")
754
755 m001()
756 }
757
758 Method(d118,, Serialized)
759 {
760 Name(b900, Buffer() {10,2,3,4,5,6,7,8,9})
761
762 CreateField(b900, 0, 8, bf90)
763
764 // Access to the Buffer Field object by Reference
765 Method(m001)
766 {
767 OUTP("Test m001 started: Store bf90 to Local1")
768
769 Store(bf90, Local1)
770 Store(ObjectType(Local1), Local2)
771
772 if (LAnd(ABUU, LNot(q007))) {
773 if (LNotEqual(Local2, 3)) {
774 err(ts, z179, __LINE__, 0, 0, Local2, 3)
775 }
776 } elseif (LNotEqual(Local2, 0x3)) {
777 err(ts, z179, __LINE__, 0, 0, Local2, 0x3)
778 } else {
779 OUTP(Local1)
780 if (LNotEqual(Local1, Buffer(){0xA})) {
781 err(ts, z179, __LINE__, 0, 0, Local1, Buffer(){0xA})
782 } else {
783 OUTP("Ok")
784 }
785 }
786
787 OUTP("Test m001 finished")
788 }
789
790 OUTP("Bug 118 issue: Fields are immediately resolved to integers/buffers.")
791
792 m001()
793 }
794
795 Method(e118,, Serialized)
796 {
797 Name(b900, Buffer() {10,2,3,4,5,6,7,8,9})
798
799 CreateField(b900, 0, 8, bf90)
800
801 // Access to the Buffer Field object by Reference
802 Method(m001)
803 {
804 OUTP("Test m001 started: Store DerefOf(Refof(bf90)) to Local1")
805
806 Store(Refof(bf90), Local0)
807 Store(DerefOf(Local0), Local1)
808 Store(ObjectType(Local1), Local2)
809
810 if (LAnd(ABUU, LNot(q007))) {
811 if (LNotEqual(Local2, 3)) {
812 err(ts, z179, __LINE__, 0, 0, Local2, 3)
813 }
814 } elseif (LNotEqual(Local2, 0x3)) {
815 err(ts, z179, __LINE__, 0, 0, Local2, 0x3)
816 } else {
817 OUTP(Local1)
818 if (LNotEqual(Local1, Buffer(){0xA})) {
819 err(ts, z179, __LINE__, 0, 0, Local1, Buffer(){0xA})
820 } else {
821 OUTP("Ok")
822 }
823 }
824
825 OUTP("Test m001 finished")
826 }
827
828 OUTP("Bug 118 issue: Fields are immediately resolved to integers/buffers.")
829
830 m001()
831 }
832
833 Method(f118,, Serialized)
834 {
835 Name(b900, Buffer() {10,2,3,4,5,6,7,8,9})
836
837 CreateField(b900, 0, 8, bf90)
838
839 Name(p915, Package(1) {})
840
841 // Access to the Buffer Field object by Reference
842 Method(m001)
843 {
844 Method(m000, 1) {return(arg0)}
845
846 OUTP("Test m001 started: Store DerefOf(Refof(bf90)) to Named Package")
847
848 Store(Refof(bf90), Local0)
849 Store(DerefOf(Local0), p915)
850 Store(ObjectType(p915), Local2)
851
852 if (LNotEqual(Local2, 1)) {
853 err(ts, z179, __LINE__, 0, 0, Local2, 1)
854 } else {
855 OUTP(p915)
856 if (LNotEqual(m000(p915), 10)) {
857 err(ts, z179, __LINE__, 0, 0, p915, 10)
858 } else {
859 OUTP("Ok")
860 }
861 }
862
863 OUTP("Test m001 finished")
864 }
865
866 OUTP("Bug 118 issue: Fields are immediately resolved to integers/buffers.")
867
868 m001()
869 }
870
871 Method(g118,, Serialized)
872 {
873 Name(i900, 0xd650a284)
874
875 Name(p90d, Package() {i900})
876
877 // Access to the named Integer object as an element of Package
878 Method(m000)
879 {
880 OUTP("Test m000 started")
881
882 Store(Index(p90d, 0), Local0)
883 Store(DerefOf(Local0), Local1)
884 Store(ObjectType(Local1), Local2)
885
886 if (LAnd(ABUU, LNot(q006))) {
887 if (LNotEqual(Local2, 2)) {
888 err(ts, z179, __LINE__, 0, 0, Local2, 2)
889 }
890 } elseif (LNotEqual(Local2, 1)) {
891 err(ts, z179, __LINE__, 0, 0, Local2, 1)
892 } else {
893 OUTP(Local1)
894 if (LNotEqual(Local1, 0xd650a284)) {
895 err(ts, z179, __LINE__, 0, 0, Local1, 0xd650a284)
896 } else {
897 OUTP("Ok")
898 }
899 }
900
901 OUTP("Test m000 finished")
902 }
903
904 OUTP("Bug 118: DerefOf Named Integer Object reference in Package")
905
906 m000()
907 }
908
909 Method(m000)
910 {
911 a118()
912 b118()
913 c118()
914 d118()
915 e118()
916 if (ABUU) {
917 } else {
918 f118()
919 }
920 g118()
921 }
922
923 CH03(ts, z179, 0x03c, __LINE__, 0)
924 switch (ToInteger (Arg0)) {
925 case (0) { m000() }
926 case (1) { a118() }
927 case (2) { b118() }
928 case (3) { c118() }
929 case (4) { d118() }
930 case (5) { e118() }
931 case (6) { f118() }
932 case (7) { g118() }
933 }
934 CH03(ts, z179, 0x03d, __LINE__, 0)
935 }
936
937 /* Methods to run manually (for ABBU only) */
938 Method(a118) { IIN0() ms16(1) Return(POUT) }
939 Method(b118) { IIN0() ms16(2) Return(POUT) }
940 Method(c118) { IIN0() ms16(3) Return(POUT) }
941 Method(d118) { IIN0() ms16(4) Return(POUT) }
942 Method(e118) { IIN0() ms16(5) Return(POUT) }
943 Method(f118) { IIN0() ms16(6) Return(POUT) }
944 Method(g118) { IIN0() ms16(7) Return(POUT) }
945
946 /*
947 * Bug 126 issue:
948 *
949 * SUMMARY: The Read access automatic dereference for RefOf reference doesn't work
950 */
951 Method(ms17, 1, Serialized)
952 {
953 Name(ts, "ms17")
954
955 Method(m126, 1, Serialized)
956 {
957 Method(m000, 1, Serialized)
958 {
959 Name(i001, 0)
960
961 OUTP("m000 started, apply DerefOf()")
962
963 Store(DerefOf(arg0), Local0)
964 Add(Local0, 1, Local6)
965 CH03(ts, z179, 0x03e, __LINE__, 0)
966 OUTP(Local6)
967
968 Store(DerefOf(arg0), i001)
969 OUTP(i001)
970 Add(i001, 1, Local7)
971 CH03(ts, z179, 0x03f, __LINE__, 0)
972 OUTP(Local7)
973
974 if (LNotEqual(Local6, Local7)) {
975 err(ts, z179, __LINE__, 0, 0, Local6, Local7)
976 }
977
978 OUTP("m000 finished")
979 }
980
981 Method(m001, 1, Serialized)
982 {
983
984 Name(i001, 0)
985
986 OUTP("m001 started, DON'T apply DerefOf()")
987
988 Store(arg0, Local0)
989 OUTP("Before Add")
990 Add(Local0, 1, Local6)
991 CH03(ts, z179, 0x041, __LINE__, 0)
992 OUTP("After Add")
993 OUTP(Local6)
994
995 OUTP("sit 1")
996
997 Store(arg0, i001)
998 CH03(ts, z179, 0x042, __LINE__, 0)
999 OUTP(i001)
1000 Add(i001, 1, Local7)
1001 CH03(ts, z179, 0x043, __LINE__, 0)
1002 if (LNotEqual(Local6, Local7)) {
1003 err(ts, z179, __LINE__, 0, 0, Local6, Local7)
1004 }
1005
1006 OUTP("m001 finished")
1007 }
1008
1009 Method(m002, 1)
1010 {
1011 OUTP("m002 started, immediate Arg")
1012
1013 OUTP("Before Add")
1014 Add(arg0, 1, Local7)
1015 CH03(ts, z179, 0x045, __LINE__, 0)
1016 OUTP("After Add")
1017 if (LNotEqual(8, Local7)) {
1018 err(ts, z179, __LINE__, 0, 0, Local7, 8)
1019 }
1020
1021 OUTP("m002 finished")
1022 }
1023
1024 Method(m003, 1)
1025 {
1026 OUTP("m003 started, apply DerefOf(Arg)")
1027
1028 OUTP("Before Add")
1029 Add(DerefOf(arg0), 1, Local7)
1030 CH03(ts, z179, 0x047, __LINE__, 0)
1031 OUTP("After Add")
1032 if (LNotEqual(8, Local7)) {
1033 err(ts, z179, __LINE__, 0, 0, Local7, 8)
1034 }
1035
1036 OUTP("m003 finished")
1037 }
1038
1039 Name(i000, 7)
1040 Name(i001, 7)
1041 Name(i002, 7)
1042 Name(i003, 7)
1043
1044
1045 OUTP("Bug 126: automatic dereference on reading issue")
1046 if (LEqual(arg0, 0)) {
1047 m000(RefOf(i000))
1048 } elseif (LEqual(arg0, 1)) {
1049 m001(RefOf(i001))
1050 } elseif (LEqual(arg0, 2)) {
1051 m002(RefOf(i002))
1052 } elseif (LEqual(arg0, 3)) {
1053 m003(RefOf(i003))
1054 }
1055 }
1056
1057 Method(m000)
1058 {
1059 m126(0)
1060 if (ABUU) {
1061 } else {
1062 m126(1)
1063 m126(2)
1064 }
1065 m126(3)
1066 }
1067
1068 CH03(ts, z179, 0x049, __LINE__, 0)
1069 switch (ToInteger (Arg0)) {
1070 case (0) { m000() }
1071 case (1) { m126(0) }
1072 case (2) { m126(1) }
1073 case (3) { m126(2) }
1074 case (4) { m126(3) }
1075 }
1076 CH03(ts, z179, 0x04a, __LINE__, 0)
1077 }
1078
1079 /* Methods to run manually (for ABBU only) */
1080 Method(a126) { IIN0() ms17(1) Return(POUT) }
1081 Method(b126) { IIN0() ms17(2) Return(POUT) }
1082 Method(c126) { IIN0() ms17(3) Return(POUT) }
1083 Method(d126) { IIN0() ms17(4) Return(POUT) }
1084
1085
1086 /*
1087 * Bug 127 issue:
1088 *
1089 * SUMMARY: Unexpectedly CopyObject of immediately passed Index reference is not reference
1090 */
1091 Method(ms18,, Serialized)
1092 {
1093 Name(ts, "ms18")
1094
1095 Method(m127,, Serialized)
1096 {
1097 Name (p000, Package(2) {1, 2})
1098
1099 OUTP("Bug 127: CopyObject unexpectedly performs dereference")
1100
1101 OUTP("Store(Index(p000, 0, Local0), Local1):")
1102
1103 Store(Index(p000, 0, Local0), Local1)
1104
1105 Store(Derefof(Local0), Local4)
1106 CH03(ts, z179, 0x04b, __LINE__, 0)
1107
1108 Store(Derefof(Local1), Local4)
1109 CH03(ts, z179, 0x04c, __LINE__, 0)
1110
1111 OUTP("CopyObject(Index(p000, 0, Local2), Local3):")
1112
1113 CopyObject(Index(p000, 0, Local2), Local3)
1114
1115 Store(Derefof(Local2), Local4)
1116 CH03(ts, z179, 0x04d, __LINE__, 0)
1117
1118 Store(Derefof(Local3), Local4)
1119 CH03(ts, z179, 0x04e, __LINE__, 0)
1120 }
1121
1122 CH03(ts, z179, 0x04f, __LINE__, 0)
1123 m127()
1124 CH03(ts, z179, 0x050, __LINE__, 0)
1125 }
1126
1127 /* Methods to run manually (for ABBU only) */
1128 Method(a127) { IIN0() ms18() Return(POUT) }
1129
1130 /*
1131 * Bug 128 issue:
1132 *
1133 * SUMMARY: Copying the RefOf reference to Named object spoils that reference
1134 */
1135 Method(ms19, 1, Serialized)
1136 {
1137 Name(ts, "ms19")
1138
1139 // Store Object_Reference to LocalX (No exception, Ok)
1140 Method(a128,, Serialized)
1141 {
1142 Name(i000, 0x1234)
1143
1144 OUTP("Bug 128:")
1145
1146 OUTP("a128 started: Store Object_Reference to LocalX (No exception, Ok)")
1147
1148 Store(RefOf(i000), Local0)
1149
1150 Store(DerefOf(Local0), Local1)
1151
1152 if (LNotEqual(Local1, 0x1234)) {
1153 err(ts, z179, __LINE__, 0, 0, Local1, 0x1234)
1154 }
1155
1156 OUTP("a128 finished")
1157 }
1158
1159 // Store Object_Reference to NamedX (Exception, Ok)
1160 Method(b128,, Serialized)
1161 {
1162 Name(i000, 0x1234)
1163 Name(ref0, 0)
1164
1165 OUTP("Bug 128:")
1166
1167 OUTP("b128 started: Store Object_Reference to NamedX (Exception, Ok)")
1168
1169 Store(RefOf(i000), ref0)
1170 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
1171
1172 OUTP("b128 finished")
1173 }
1174
1175 // CopyObject Object_Reference to NamedX (Exception, Bug)
1176 Method(c128,, Serialized)
1177 {
1178 Name(i000, 0x1234)
1179 Name(ref0, 0)
1180
1181 OUTP("Bug 128:")
1182
1183 OUTP("c128 started: CopyObject Object_Reference to NamedX (Exception, Bug)")
1184
1185 CopyObject(RefOf(i000), ref0)
1186 if (CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)) {
1187 return
1188 }
1189
1190 // When an invocation of a Method tries to return a Package,
1191 // where some reference was saved, the AE_TYPE exception occurs.
1192 //OUTP(ref0)
1193
1194 Store(DerefOf(ref0), Local1)
1195
1196 if (LNotEqual(Local1, 0x1234)) {
1197 err(ts, z179, __LINE__, 0, 0, Local1, 0x1234)
1198 }
1199
1200 OUTP("c128 finished")
1201 }
1202
1203 // Store Object_Reference to uninit Package element (No exception, Ok)
1204 Method(d128,, Serialized)
1205 {
1206 Name(i000, 0x1234)
1207 Name(p000, Package(1){})
1208
1209 OUTP("Bug 128:")
1210
1211 OUTP("d128 started: Store Object_Reference to uninit Package element (No exception, Ok)")
1212
1213 Store(RefOf(i000), Index(p000, 0))
1214
1215 Store(DerefOf(DerefOf(Index(p000, 0))), Local1)
1216
1217 if (LNotEqual(Local1, 0x1234)) {
1218 err(ts, z179, __LINE__, 0, 0, Local1, 0x1234)
1219 }
1220
1221 OUTP("d128 finished")
1222 }
1223
1224 // Store Object_Reference to init Package element (No exception, Ok)
1225 Method(e128,, Serialized)
1226 {
1227 Name(i000, 0x1234)
1228 Name(p000, Package(1){0x5678})
1229
1230 OUTP("Bug 128:")
1231
1232 OUTP("d128 started: Store Object_Reference to init Package element (No exception, Ok)")
1233
1234 Store(RefOf(i000), Index(p000, 0))
1235
1236 Store(DerefOf(DerefOf(Index(p000, 0))), Local1)
1237
1238 if (LNotEqual(Local1, 0x1234)) {
1239 err(ts, z179, __LINE__, 0, 0, Local1, 0x1234)
1240 }
1241
1242 OUTP("d128 finished")
1243 }
1244
1245 Method(m000)
1246 {
1247 a128()
1248
1249 // Causes exception
1250 if (ABUU) {
1251 } else {
1252 b128()
1253 }
1254
1255 // Causes exception
1256 if (ABUU) {
1257 } else {
1258 c128()
1259 }
1260
1261 if (ABUU) {
1262 } else {
1263 d128()
1264 }
1265
1266 if (ABUU) {
1267 } else {
1268 e128()
1269 }
1270 }
1271
1272 CH03(ts, z179, 0x057, __LINE__, 0)
1273 switch (ToInteger (Arg0)) {
1274 case (0) { m000() }
1275 case (1) { a128() }
1276 case (2) { b128() }
1277 case (3) { c128() }
1278 case (4) { d128() }
1279 case (5) { e128() }
1280 }
1281 CH03(ts, z179, 0x058, __LINE__, 0)
1282 }
1283
1284 /* Methods to run manually (for ABBU only) */
1285 Method(a128) { IIN0() ms19(1) Return(POUT) }
1286 Method(b128) { IIN0() ms19(2) Return(POUT) }
1287 Method(c128) { IIN0() ms19(3) Return(POUT) }
1288 Method(d128) { IIN0() ms19(4) Return(POUT) }
1289 Method(e128) { IIN0() ms19(5) Return(POUT) }
1290
1291 /*
1292 * Bug 131 issue:
1293 *
1294 * SUMMARY: Store to the Index reference immediately returned by Method doesn't work
1295 */
1296 Method(ms1a, 1, Serialized)
1297 {
1298 Name(ts, "ms1a")
1299
1300 Method(a131,, Serialized)
1301 {
1302 Name(i000, 0x77)
1303 Name(i001, 0)
1304
1305 Method(m000)
1306 {
1307 Increment(i001)
1308 return (RefOf(i000))
1309 }
1310
1311 Method(m001)
1312 {
1313 Increment(i001)
1314 Store(RefOf(i000), Local0)
1315 return (Local0)
1316 }
1317
1318 OUTP("Case return (RefOf(i000))")
1319
1320 /*
1321 // Removed 09/2015. iASL store to method invocation is not supported
1322 Store(5, m000())
1323 */
1324
1325 if (LEqual(i001, 0)) {
1326 err(ts, z179, __LINE__, 0, 0, i001, 0)
1327 } elseif (LNotEqual(i000, 5)) {
1328 err(ts, z179, __LINE__, 0, 0, i000, 5)
1329 } else {
1330 OUTP("Ok a131")
1331 }
1332 }
1333
1334 Method(b131,, Serialized)
1335 {
1336 Name(i000, 0x77)
1337 Name(i001, 0)
1338
1339 Method(m000)
1340 {
1341 Increment(i001)
1342 return (RefOf(i000))
1343 }
1344
1345 Method(m001)
1346 {
1347 Increment(i001)
1348 Store(RefOf(i000), Local0)
1349 return (Local0)
1350 }
1351
1352 OUTP("Case return (Local0) (= RefOf(i000))")
1353
1354 /*
1355 // Removed 09/2015. iASL store to method invocation not supported
1356
1357 Store(0x15, m001())
1358 */
1359
1360 if (LEqual(i001, 0)) {
1361 err(ts, z179, __LINE__, 0, 0, i001, 0)
1362 } elseif (LNotEqual(i000, 0x15)) {
1363 err(ts, z179, __LINE__, 0, 0, i000, 0x15)
1364 } else {
1365 OUTP("Ok b131")
1366 }
1367 }
1368
1369 Method(c131,, Serialized)
1370 {
1371 Name(i000, 0x77)
1372 Name(i001, 0)
1373
1374 Method(m000)
1375 {
1376 Increment(i001)
1377 return (RefOf(i000))
1378 }
1379
1380 Method(m001)
1381 {
1382 Increment(i001)
1383 Store(RefOf(i000), Local0)
1384 return (Local0)
1385 }
1386
1387 Store(Refof(Local0), Local1)
1388
1389 OUTP("Case Store(return (RefOf(i000)), Local0)")
1390
1391 Store(m000(), Local0)
1392
1393 Store(0x25, Derefof(Local1))
1394
1395 if (LEqual(i001, 0)) {
1396 err(ts, z179, __LINE__, 0, 0, i001, 0)
1397 } elseif (LNotEqual(i000, 0x25)) {
1398 err(ts, z179, __LINE__, 0, 0, i000, 0x25)
1399 } else {
1400 OUTP("Ok c131")
1401 }
1402 }
1403
1404 Method(d131,, Serialized)
1405 {
1406 Name(i000, 0x77)
1407 Name(i001, 0)
1408
1409 Method(m000)
1410 {
1411 Increment(i001)
1412 return (RefOf(i000))
1413 }
1414
1415 Method(m001)
1416 {
1417 Increment(i001)
1418 Store(RefOf(i000), Local0)
1419 return (Local0)
1420 }
1421
1422 OUTP("Case - test tools proper work indication")
1423
1424 RSTO(0x35, m000())
1425
1426 if (LEqual(i001, 0)) {
1427 err(ts, z179, __LINE__, 0, 0, i001, 0)
1428 } elseif (LNotEqual(i000, 0x35)) {
1429 err(ts, z179, __LINE__, 0, 0, i000, 0x35)
1430 } else {
1431 OUTP("Ok d131")
1432 }
1433 }
1434
1435 Method(e131,, Serialized)
1436 {
1437 Name(i000, 0x77)
1438 Name(i001, 0)
1439
1440 Method(m000)
1441 {
1442 Increment(i001)
1443 return (RefOf(i000))
1444 }
1445
1446 OUTP("Case Store(return (RefOf(i000)), Local0), step 1")
1447
1448 Store(m000(), Local0)
1449
1450 if (LEqual(i001, 0)) {
1451 err(ts, z179, __LINE__, 0, 0, i001, 0)
1452 } else {
1453 OUTP("Ok e131")
1454 }
1455 }
1456
1457 Method(m000)
1458 {
1459 if (ABUU) {
1460 } else {
1461 a131()
1462 }
1463
1464 if (ABUU) {
1465 } else {
1466 b131()
1467 }
1468
1469 if (ABUU) {
1470 } else {
1471 c131()
1472 }
1473
1474 d131()
1475 e131()
1476 }
1477
1478 OUTP("Bug 131: Writing to the reference immediately returned by Method")
1479
1480 CH03(ts, z179, 0x062, __LINE__, 0)
1481 switch (ToInteger (Arg0)) {
1482 case (0) { m000() }
1483 case (1) { a131() }
1484 case (2) { b131() }
1485 case (3) { c131() }
1486 case (4) { d131() }
1487 case (5) { e131() }
1488 }
1489 CH03(ts, z179, 0x063, __LINE__, 0)
1490 }
1491
1492 /* Methods to run manually (for ABBU only) */
1493 Method(a131) { IIN0() ms1a(1) Return(POUT) }
1494 Method(b131) { IIN0() ms1a(2) Return(POUT) }
1495 Method(c131) { IIN0() ms1a(3) Return(POUT) }
1496 Method(d131) { IIN0() ms1a(4) Return(POUT) }
1497 Method(e131) { IIN0() ms1a(4) Return(POUT) }
1498
1499 /*
1500 * Bug 132 issue:
1501 *
1502 * SUMMARY: The Read access automatic dereference for Index reference doesn't work
1503 */
1504 Method(ms1b, 1, Serialized)
1505 {
1506 Name(ts, "ms1b")
1507
1508 Method(m132, 2, Serialized)
1509 {
1510 Name(p000, Package(1) {0x77})
1511
1512 Method(m000, 2)
1513 {
1514
1515 OUTP("m000 started")
1516
1517 if (arg1) {
1518 Add(DerefOf(arg0), 1, Local7)
1519 } else {
1520 Add(arg0, 1, Local7)
1521 }
1522 CH03(ts, z179, 0x064, __LINE__, 0)
1523
1524 OUTP("After Add")
1525
1526 if (LNotEqual(Local7, 0x78)) {
1527 err(ts, z179, __LINE__, 0, 0, Local7, 0x78)
1528 } else {
1529 OUTP("Ok 0")
1530 }
1531 OUTP(Local7)
1532
1533 if (arg1) {
1534 OUTP("Accessed with DerefOf properly!")
1535 } else {
1536 OUTP("Accessed without DerefOf properly!")
1537 }
1538 }
1539
1540 OUTP("Bug 132: read access \"Automatic dereference\" for Index Reference")
1541
1542 if (arg0) {
1543 OUTP("Transfer Index reference by LocalX:")
1544 Index(p000, 0, Local0)
1545 m000(Local0, arg1)
1546 } else {
1547 OUTP("Specify Index reference immediately:")
1548 m000(Index(p000, 0), arg1)
1549 }
1550 }
1551
1552 Method(m000)
1553 {
1554 if (ABUU) {
1555 } else {
1556 m132(0, 0)
1557 }
1558
1559 if (ABUU) {
1560 } else {
1561 m132(1, 0)
1562 }
1563
1564 m132(0, 1)
1565 m132(1, 1)
1566 }
1567
1568 CH03(ts, z179, 0x066, __LINE__, 0)
1569 switch (ToInteger (Arg0)) {
1570 case (0) { m000() }
1571 case (1) { m132(0, 0) }
1572 case (2) { m132(1, 0) }
1573 case (3) { m132(0, 1) }
1574 case (4) { m132(1, 1) }
1575 }
1576 CH03(ts, z179, 0x067, __LINE__, 0)
1577 }
1578
1579 /* Methods to run manually (for ABBU only) */
1580 Method(a132) { IIN0() ms1b(1) Return(POUT) }
1581 Method(b132) { IIN0() ms1b(2) Return(POUT) }
1582 Method(c132) { IIN0() ms1b(3) Return(POUT) }
1583 Method(d132) { IIN0() ms1b(4) Return(POUT) }
1584
1585 /*
1586 * Bug 133 issue:
1587 *
1588 * SUMMARY: The Write access automatic dereference for Index reference doesn't work
1589 */
1590 Method(ms1c, 1, Serialized)
1591 {
1592 Name(ts, "ms1c")
1593
1594 Method(m133, 1, Serialized)
1595 {
1596 Name(i000, 0)
1597 Name(s000, "q_er0000")
1598 Name(b000, Buffer(4) {1,0,3,4})
1599 Name(p000, Package(3) {5,0,7})
1600
1601 Method(m000, 1)
1602 {
1603 Store(0x77, arg0)
1604 }
1605
1606 OUTP("Bug 133: WRITE access to the initial object by reference in ArgX")
1607
1608 if (LEqual(arg0, 0)) {
1609 OUTP("Writing by RefOf reference to Integer")
1610
1611 Store(RefOf(i000), Local0)
1612 m000(Local0)
1613 if (LNotEqual(i000, 0x77)) {
1614 err(ts, z179, __LINE__, 0, 0, i000, 0x77)
1615 } else {
1616 OUTP("Ok 0")
1617 }
1618 OUTP(i000)
1619
1620 } elseif (LEqual(arg0, 1)) {
1621 OUTP("Writing by Index to String")
1622
1623 Index(s000, 1, Local0)
1624 m000(Local0)
1625 Store(Derefof(Local0), Local1)
1626 if (LNotEqual(Local1, 0x77)) {
1627 err(ts, z179, __LINE__, 0, 0, Local1, 0x77)
1628 } else {
1629 OUTP("Ok 1")
1630 }
1631 OUTP(s000)
1632
1633 } elseif (LEqual(arg0, 2)) {
1634 OUTP("Writing by Index to Buffer")
1635
1636 Index(b000, 1, Local0)
1637 m000(Local0)
1638
1639 Store(Derefof(Local0), Local1)
1640 if (LNotEqual(Local1, 0x77)) {
1641 err(ts, z179, __LINE__, 0, 0, Local1, 0x77)
1642 } else {
1643 OUTP("Ok 2")
1644 }
1645 OUTP(b000)
1646
1647 } elseif (LEqual(arg0, 3)) {
1648 OUTP("Check Index of Package")
1649
1650 Index(p000, 1, Local0)
1651
1652 Store(DerefOf(Local0), Local1)
1653 if (LNotEqual(Local1, 0)) {
1654 err(ts, z179, __LINE__, 0, 0, Local1, 0)
1655 } else {
1656 OUTP("Ok 3")
1657 }
1658 OUTP(Local1)
1659
1660 } elseif (LEqual(arg0, 4)) {
1661 OUTP("Writing by Index to Package")
1662
1663 Index(p000, 1, Local0)
1664 m000(Local0)
1665
1666 Store(DerefOf(Local0), Local1)
1667
1668 if (LNotEqual(Local1, 0x77)) {
1669 err(ts, z179, __LINE__, 0, 0, Local1, 0x77)
1670 } else {
1671 OUTP("Ok 4")
1672 }
1673 OUTP(Local1)
1674 }
1675 }
1676
1677 Method(m000)
1678 {
1679 m133(0)
1680
1681 if (ABUU) {
1682 } else {
1683 m133(1)
1684 }
1685
1686 m133(2)
1687 m133(3)
1688 m133(4)
1689 }
1690
1691 CH03(ts, z179, 0x06d, __LINE__, 0)
1692 switch (ToInteger (Arg0)) {
1693 case (0) { m000() }
1694 case (1) { m133(0) }
1695 case (2) { m133(1) }
1696 case (3) { m133(2) }
1697 case (4) { m133(3) }
1698 case (5) { m133(4) }
1699 }
1700 CH03(ts, z179, 0x06e, __LINE__, 0)
1701 }
1702
1703 /* Methods to run manually (for ABBU only) */
1704 Method(a133) { IIN0() ms1c(1) Return(POUT) }
1705 Method(b133) { IIN0() ms1c(2) Return(POUT) }
1706 Method(c133) { IIN0() ms1c(3) Return(POUT) }
1707 Method(d133) { IIN0() ms1c(4) Return(POUT) }
1708 Method(e133) { IIN0() ms1c(5) Return(POUT) }
1709
1710 /*
1711 * Bug 134 issue:
1712 *
1713 * SUMMARY: Writing RefOf reference from inside Method breaks effectively local Arg
1714 */
1715 Method(ms1d, 1, Serialized)
1716 {
1717 Name(ts, "ms1d")
1718
1719 Method(m134, 1, Serialized)
1720 {
1721 Name(i000, 0x11)
1722 Name(i001, 0x22)
1723 Name(i002, 0x33)
1724 Name(i003, 0x44)
1725 Name(i004, 0x55)
1726 Name(i005, 0x66)
1727 Name(i006, 0x77)
1728
1729 Method(m000, 7)
1730 {
1731 OUTP("LocalX case of Method started:")
1732
1733 Store(RefOf(i000), Local0)
1734 Store(Local0, Local1)
1735 Store(Local1, Local2)
1736 Store(Local2, Local3)
1737 Store(Local3, Local4)
1738 Store(Local4, Local5)
1739 Store(Local5, Local6)
1740
1741 Store(0x88, Local6)
1742
1743 if (LAnd(ABUU, LNot(q008))) {
1744 if (LNotEqual(i000, 0x88)) {
1745 err(ts, z179, __LINE__, 0, 0, i000, 0x88)
1746 }
1747 } elseif (LNotEqual(i000, 0x11)) {
1748 err(ts, z179, __LINE__, 0, 0, i000, 0x11)
1749 } else {
1750 if (LNotEqual(Local6, 0x88)) {
1751 err(ts, z179, __LINE__, 0, 0, Local6, 0x88)
1752 } else {
1753 OUTP("Ok 0:")
1754 }
1755 OUTP(Local6)
1756 }
1757
1758 OUTP("LocalX case of Method finished")
1759 }
1760
1761 Method(m001, 7)
1762 {
1763 OUTP("ArgX case of Method started:")
1764
1765 Store(RefOf(i000), arg0)
1766 Store(arg0, arg1)
1767 Store(arg1, arg2)
1768 Store(arg2, arg3)
1769 Store(arg3, arg4)
1770 Store(arg4, arg5)
1771 Store(arg5, arg6)
1772
1773 Store(0x88, arg6)
1774
1775 if (LAnd(ABUU, LNot(q008))) {
1776 if (LNotEqual(i000, 0x88)) {
1777 err(ts, z179, __LINE__, 0, 0, i000, 0x88)
1778 }
1779 } elseif (LNotEqual(i000, 0x11)) {
1780 err(ts, z179, __LINE__, 0, 0, i000, 0x11)
1781 } else {
1782 if (LNotEqual(arg6, 0x88)) {
1783 err(ts, z179, __LINE__, 0, 0, arg6, 0x88)
1784 } else {
1785 OUTP("Ok 1:")
1786 }
1787 OUTP(arg6)
1788 }
1789
1790 OUTP("ArgX case of Method finished")
1791 }
1792
1793 Method(m002, 7)
1794 {
1795 OUTP("references in ArgX case of Method started:")
1796
1797 Store(RefOf(i000), arg0)
1798 Store(arg0, arg1)
1799 Store(arg1, arg2)
1800 Store(arg2, arg3)
1801 Store(arg3, arg4)
1802 Store(arg4, arg5)
1803 Store(arg5, arg6)
1804
1805 Store(0x88, arg6)
1806
1807 if (LAnd(ABUU, LNot(q008))) {
1808 if (LNotEqual(i000, 0x88)) {
1809 err(ts, z179, __LINE__, 0, 0, i000, 0x88)
1810 }
1811 } elseif (LNotEqual(i000, 0x11)) {
1812 err(ts, z179, __LINE__, 0, 0, i000, 0x11)
1813 OUTP(i000)
1814 } else {
1815 Store(DerefOf(arg6), Local1)
1816 if (LNotEqual(Local1, 0x88)) {
1817 err(ts, z179, __LINE__, 0, 0, Local1, 0x88)
1818 } else {
1819 OUTP("Ok 1:")
1820 }
1821 OUTP(arg6)
1822 }
1823
1824 OUTP("ArgX case of Method finished")
1825 }
1826
1827 OUTP("Bug 134: ArgX term effectively becomes a LocalX term")
1828
1829 if (LEqual(arg0, 0)) {
1830 m000(i000,i001,i002,i003,i004,i005,i006)
1831 } elseif (LEqual(arg0, 1)) {
1832 m001(i000,i001,i002,i003,i004,i005,i006)
1833 } elseif (LEqual(arg0, 2)) {
1834 m002(Refof(Local0),Refof(Local1),Refof(Local2),Refof(Local3),Refof(Local4),
1835 Refof(Local5),Refof(Local6))
1836 }
1837 }
1838
1839 Method(m000)
1840 {
1841 m134(0)
1842 m134(1)
1843 m134(2)
1844 }
1845
1846 CH03(ts, z179, 0x075, __LINE__, 0)
1847 switch (ToInteger (Arg0)) {
1848 case (0) { m000() }
1849 case (1) { m134(0) }
1850 case (2) { m134(1) }
1851 case (3) { m134(2) }
1852 }
1853 CH03(ts, z179, 0x076, __LINE__, 0)
1854 }
1855
1856 /* Methods to run manually (for ABBU only) */
1857 Method(a134) { IIN0() ms1d(1) Return(POUT) }
1858 Method(b134) { IIN0() ms1d(2) Return(POUT) }
1859 Method(c134) { IIN0() ms1d(3) Return(POUT) }
1860
1861 /*
1862 * Bug 136 issue:
1863 *
1864 * SUMMARY: CopyObject of named Buffer to the longer named Buffer works incorrectly
1865 */
1866 Method(ms1e,, Serialized)
1867 {
1868 Name(ts, "ms1e")
1869
1870 Method(m136,, Serialized)
1871 {
1872 Name(b000, Buffer(1){0x3c})
1873 Name(b001, Buffer(3){0x01, 0x02, 0x03})
1874
1875 OUTP("Bug 136: CopyObject does not perform an implicit store")
1876
1877 CopyObject(b000, b001)
1878
1879 if (LEqual(b000, b001)) {
1880 OUTP("Ok")
1881 } else {
1882 err(ts, z179, __LINE__, 0, 0, b000, b001)
1883 }
1884 OUTP(b000)
1885 OUTP(b001)
1886 }
1887
1888 CH03(ts, z179, 0x078, __LINE__, 0)
1889 m136()
1890 CH03(ts, z179, 0x079, __LINE__, 0)
1891 }
1892
1893 /* Methods to run manually (for ABBU only) */
1894 Method(a136) { IIN0() ms1e() Return(POUT) }
1895
1896 /*
1897 * Hot issue:
1898 *
1899 * Checks store of a Local Reference into the Package
1900 */
1901 Method(ms1f, 1, Serialized)
1902 {
1903 Name(ts, "ms1f")
1904
1905 Name(I999, 0)
1906 Name(PREF, Package(4) {0xa5a5a5a5, I999, I999})
1907
1908 Method(mlrp, 2)
1909 {
1910 Store(ObjectType(Arg0), Local0)
1911 Store(Arg0, Index(PREF, Arg1))
1912 CH03(ts, z179, 0x07a, __LINE__, 0)
1913 Store(ObjectType(Index(PREF, Arg1)), Local1)
1914 if (LNotEqual(Local0, Local1)) {
1915 err(ts, z179, __LINE__, 0, 0, Local1, Local0)
1916 }
1917 }
1918
1919 Method(mlr0)
1920 {
1921 OUTP("Store a Local Reference to Uninit Package element")
1922
1923 Store("Local0", Local0)
1924
1925 mlrp(Refof(Local0), 3)
1926 }
1927
1928 Method(mlr1)
1929 {
1930 OUTP("Store a Local Reference to Integer Package element")
1931
1932 Store("Local0", Local0)
1933
1934 mlrp(Refof(Local0), 0)
1935 }
1936
1937 Method(mlr2)
1938 {
1939 OUTP("Store a Local Reference to Reference Package element")
1940
1941 Store("Local0", Local0)
1942
1943 mlrp(Refof(Local0), 1)
1944 }
1945
1946 Method(mlr3)
1947 {
1948 OUTP("Store a Integer to Reference Package element")
1949
1950 Store("Local0", Local0)
1951
1952 mlrp(3, 2)
1953 }
1954
1955 Method(m000)
1956 {
1957 mlr0()
1958 mlr1()
1959 mlr2()
1960 mlr3()
1961 }
1962
1963 CH03(ts, z179, 0x07c, __LINE__, 0)
1964 switch (ToInteger (Arg0)) {
1965 case (0) { m000() }
1966 case (1) { mlr0() }
1967 case (2) { mlr1() }
1968 case (3) { mlr2() }
1969 case (4) { mlr3() }
1970 }
1971 CH03(ts, z179, 0x07d, __LINE__, 0)
1972 }
1973
1974 /* Methods to run manually (for ABBU only) */
1975 Method(alrp) { IIN0() ms1f(1) Return(POUT) }
1976 Method(blrp) { IIN0() ms1f(2) Return(POUT) }
1977 Method(clrp) { IIN0() ms1f(3) Return(POUT) }
1978 Method(dlrp) { IIN0() ms1f(4) Return(POUT) }
1979 Method(elrp) { IIN0() ms1f(0) Return(POUT) }
1980
1981 /*
1982 * Hot issue:
1983 *
1984 * Forward reference within a control method
1985 */
1986 Method(ms20, 1, Serialized)
1987 {
1988 Name(ts, "ms20")
1989
1990 Name (Y, 2)
1991
1992 Method(mfr0,, Serialized)
1993 {
1994 OUTP("Forward reference within a control method 0")
1995
1996 Store (Y, Local0)
1997 if (LNotEqual(Local0, 2)) {
1998 err(ts, z179, __LINE__, 0, 0, Local0, 2)
1999 }
2000
2001 Name (Y, 1)
2002
2003 Store (Y, Local0)
2004 if (LNotEqual(Local0, 1)) {
2005 err(ts, z179, __LINE__, 0, 0, Local0, 1)
2006 }
2007 }
2008 Method(mfr1,, Serialized)
2009 {
2010 OUTP("Natural reference within a control method")
2011
2012 Name (Y, 1)
2013
2014 Store (^Y, Local0)
2015
2016 if (LNotEqual(Local0, 2)) {
2017 err(ts, z179, __LINE__, 0, 0, Local0, 2)
2018 }
2019
2020 Store (Y, Local0)
2021 if (LNotEqual(Local0, 1)) {
2022 err(ts, z179, __LINE__, 0, 0, Local0, 1)
2023 }
2024 }
2025
2026 Method(mfr2,, Serialized)
2027 {
2028 OUTP("Forward reference within a control method 2")
2029
2030 Store (^mfr2.Y, Local0)
2031 CH04(ts, 0, 0xff, z179, __LINE__, "^mfr2.Y", Local0)
2032
2033 Name (Y, 1)
2034
2035 Store (^mfr2.Y, Local0)
2036 if (LNotEqual(Local0, 1)) {
2037 err(ts, z179, __LINE__, 0, 0, Local0, 1)
2038 }
2039 }
2040
2041 Method(mfr3,, Serialized)
2042 {
2043 OUTP("Forward reference within a control method 3")
2044
2045 Name (Y, 1)
2046
2047 Store (^mfr3.Y, Local0)
2048 if (LNotEqual(Local0, 1)) {
2049 err(ts, z179, __LINE__, 0, 0, Local0, 1)
2050 }
2051 }
2052
2053 Method(m000)
2054 {
2055 mfr0()
2056 mfr1()
2057
2058 if (ABUU) {
2059 } else {
2060 mfr2()
2061 }
2062
2063 mfr3()
2064 }
2065
2066 CH03(ts, z179, 0x085, __LINE__, 0)
2067 switch (ToInteger (Arg0)) {
2068 case (0) { m000() }
2069 case (1) { mfr0() }
2070 case (2) { mfr1() }
2071 case (3) { mfr2() }
2072 case (4) { mfr3() }
2073 }
2074 CH03(ts, z179, 0x086, __LINE__, 0)
2075 }
2076
2077 /* Methods to run manually (for ABBU only) */
2078 Method(amfr) { IIN0() ms20(1) Return(POUT) }
2079 Method(bmfr) { IIN0() ms20(2) Return(POUT) }
2080 Method(cmfr) { IIN0() ms20(3) Return(POUT) }
2081 Method(dmfr) { IIN0() ms20(4) Return(POUT) }
2082
2083 /*
2084 * Hot issue: AE_AML_METHOD_LIMIT
2085 *
2086 * Recursive Serialized method execution
2087 */
2088 Method(ms21, 1, Serialized)
2089 {
2090 Name(ts, "ms21")
2091
2092 Method(aact, 1, Serialized)
2093 {
2094 if (Arg0) {
2095 Return (Add(Arg0, aact(Subtract(Arg0, 1))))
2096 } else {
2097 Return (0)
2098 }
2099 }
2100
2101 Method(mac0)
2102 {
2103 OUTP("Recursive method execution aact(0)")
2104 OUTP(aact(0))
2105 }
2106
2107 Method(mac1)
2108 {
2109 OUTP("Recursive method execution aact(1)")
2110 OUTP(aact(1))
2111 }
2112
2113 Method(mac2)
2114 {
2115 OUTP("Recursive method execution aact(2)")
2116 OUTP(aact(2))
2117 }
2118
2119 Method(mac3)
2120 {
2121 OUTP("Recursive method execution aact(6)")
2122 OUTP(aact(6))
2123 }
2124
2125 Method(mac4)
2126 {
2127 OUTP("Recursive method execution aact(513)")
2128 OUTP(aact(513))
2129 CH04(ts, 0, 0xff, z179, __LINE__, "recursion", 513)
2130 }
2131
2132 Method(m000)
2133 {
2134 mac0()
2135 mac1()
2136 mac2()
2137 mac3()
2138
2139 if (ABUU) {
2140 } else {
2141 mac4()
2142 }
2143 }
2144
2145 CH03(ts, z179, 0x088, __LINE__, 0)
2146 switch (ToInteger (Arg0)) {
2147 case (0) { m000() }
2148 case (1) { mac0() }
2149 case (2) { mac1() }
2150 case (3) { mac2() }
2151 case (4) { mac3() }
2152 case (5) { mac4() }
2153 }
2154 CH03(ts, z179, 0x089, __LINE__, 0)
2155 }
2156
2157 /* Methods to run manually (for ABBU only) */
2158 Method(arec) { IIN0() ms21(1) Return(POUT) }
2159 Method(brec) { IIN0() ms21(2) Return(POUT) }
2160 Method(crec) { IIN0() ms21(3) Return(POUT) }
2161 Method(drec) { IIN0() ms21(4) Return(POUT) }
2162 Method(erec) { IIN0() ms21(5) Return(POUT) }
2163
2164 /*
2165 * Hot issue:
2166 *
2167 * Conditional reference within a control method
2168 */
2169 Method(ms22, 1, Serialized)
2170 {
2171 Name(ts, "ms22")
2172
2173 Name(iact, 0)
2174
2175 Method(cact, 1, Serialized)
2176 {
2177 if (Arg0) {
2178 Name(iact, 0xffffffff)
2179 }
2180 Return (iact)
2181 }
2182
2183 Method(m000)
2184 {
2185 OUTP("Conditional reference within a control method 0")
2186
2187 OUTP("expected iact 0:")
2188 Store(cact(0), Local0)
2189
2190 if (LNotEqual(Local0, 0)) {
2191 err(ts, z179, __LINE__, 0, 0, Local0, 0)
2192 }
2193 }
2194
2195 Method(m001)
2196 {
2197 OUTP("Conditional reference within a control method 1")
2198
2199 OUTP("expected iact 0xffffffff:")
2200 Store(cact(1), Local0)
2201
2202 if (LNotEqual(Local0, 0xffffffff)) {
2203 err(ts, z179, __LINE__, 0, 0, Local0, 0xffffffff)
2204 }
2205 }
2206
2207 CH03(ts, z179, 0x08c, __LINE__, 0)
2208 switch (ToInteger (Arg0)) {
2209 case (0) { m000() m001() }
2210 case (1) { m000() }
2211 case (2) { m001() }
2212 }
2213 CH03(ts, z179, 0x08d, __LINE__, 0)
2214 }
2215
2216 /* Methods to run manually (for ABBU only) */
2217 Method(amcr) { IIN0() ms22(1) Return(POUT) }
2218 Method(bmcr) { IIN0() ms22(2) Return(POUT) }
2219
2220 /*
2221 * Hot issue:
2222 *
2223 * Implicit return
2224 */
2225 Method(ms23, 1, Serialized)
2226 {
2227 Name(ts, "ms23")
2228
2229 Method(mir0,, Serialized)
2230 {
2231 Name(fl00, 0)
2232
2233 Method(m001)
2234 {
2235 if (fl00) {
2236 Store(Add (0xabcd, 0), Local1)
2237 } elseif (0) {
2238 return (1)
2239 }
2240
2241 }
2242
2243 OUTP("Implicit return no operator")
2244
2245 OUTP("An exception is expected: ...")
2246 Store(m001(), Local0)
2247 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
2248 }
2249
2250 Method(mir1,, Serialized)
2251 {
2252 Name(fl00, 1)
2253
2254 Method(m001)
2255 {
2256 if (fl00) {
2257 Store(Add (0xabcd, 0), Local1)
2258 } else {
2259 return (1)
2260 }
2261 }
2262
2263 OUTP("Implicit return after Add")
2264
2265 OUTP("0xabcd expected: ...")
2266 Store(m001(), Local0)
2267
2268 if (SLCK) {
2269 if (CH03(ts, z179, 0x08f, __LINE__, 0)) {return}
2270 if (LNotEqual(Local0, 0xabcd)) {
2271 err(ts, z179, __LINE__, 0, 0, Local0, 0xabcd)
2272 }
2273 } else {
2274 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
2275 }
2276 }
2277
2278 Method(mir2,, Serialized)
2279 {
2280 Name(fl00, 0)
2281
2282 Method(m001)
2283 {
2284 if (fl00) {
2285 Return (0xabce)
2286 } elseif (0) {
2287 return (1)
2288 }
2289 }
2290
2291 OUTP("Implicit return no operator 2")
2292
2293 OUTP("An exception is expected: ...")
2294 Store(m001(), Local0)
2295 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
2296 }
2297
2298 Method(mir3,, Serialized)
2299 {
2300 Name(fl00, 1)
2301
2302 Method(m001)
2303 {
2304 if (fl00) {
2305 Return (0xabce)
2306 } else {
2307 return (1)
2308 }
2309 }
2310
2311 OUTP("Explicit return conditionally")
2312
2313 OUTP("0xabce expected: ...")
2314 Store(m001(), Local0)
2315
2316 if (SLCK) {
2317 if (CH03(ts, z179, 0x093, __LINE__, 0)) {return}
2318 if (LNotEqual(Local0, 0xabce)) {
2319 err(ts, z179, __LINE__, 0, 0, Local0, 0xabce)
2320 }
2321 } else {
2322 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
2323 }
2324 }
2325
2326 Method(mir4,, Serialized)
2327 {
2328 Name(fl00, 0)
2329 Name(i000, 0xabcd0000)
2330 Name(i001, 0xabcd0001)
2331
2332 Method(m000, 0, Serialized)
2333 {
2334 Switch (ToInteger (Store(0xabcd000f, i001))) {
2335 Case (0) {
2336 if (fl00) {
2337 Return (0)
2338 }
2339 }
2340 }
2341 }
2342
2343 OUTP("Implicit return on Switch")
2344
2345 Store(0xdddd9000, i000)
2346
2347 Store(m000, i000)
2348
2349 if (SLCK) {
2350 if (CH03(ts, z179, 0x096, __LINE__, 0)) {return}
2351
2352 //y901: Predicate generates Implicit Return since ACPICA release 20080926
2353 if (y901) {
2354 Store(0, Local0)
2355 } else {
2356 Store(0xabcd000f, Local0)
2357 }
2358 if (LNotEqual(i000, Local0)) {
2359 err(ts, z179, __LINE__, 0, 0, i000, Local0)
2360 }
2361 } else {
2362 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
2363 }
2364 }
2365
2366 Method(mir5,, Serialized)
2367 {
2368 Name(fl00, 0)
2369 Name(i000, 0xabcd0000)
2370 Name(i001, 0xabcd0001)
2371
2372 Method(m000)
2373 {
2374 if (Store(0xabcd000d, i001)) {
2375 if (fl00) {
2376 Return (0)
2377 }
2378 }
2379 }
2380
2381 OUTP("Implicit return on If")
2382
2383 Store(0xdddd9000, i000)
2384
2385 Store(m000, i000)
2386
2387 if (SLCK) {
2388 if (CH03(ts, z179, 0x099, __LINE__, 0)) {return}
2389
2390 //y901: Predicate generates Implicit Return since ACPICA release 20080926
2391 if (y901) {
2392 Store(0, Local0)
2393 } else {
2394 Store(0xabcd000d, Local0)
2395 }
2396 if (LNotEqual(i000, Local0)) {
2397 err(ts, z179, __LINE__, 0, 0, i000, Local0)
2398 }
2399 } else {
2400 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
2401 }
2402 }
2403
2404 Method(mir6,, Serialized)
2405 {
2406 Name(fl00, 0)
2407 Name(i000, 0xabcd0000)
2408 Name(i001, 0xabcd0001)
2409
2410 Method(m000)
2411 {
2412 While (Store(0xabcd000e, i001)) {
2413 if (fl00) {
2414 Return (0)
2415 }
2416 Break
2417 }
2418 }
2419
2420 OUTP("Implicit return on While")
2421
2422 Store(0xdddd9000, i000)
2423
2424 Store(m000, i000)
2425
2426 if (SLCK) {
2427 if (CH03(ts, z179, 0x09c, __LINE__, 0)) {return}
2428
2429 //y901: Predicate generates Implicit Return since ACPICA release 20080926
2430 if (y901) {
2431 Store(0, Local0)
2432 } else {
2433 Store(0xabcd000e, Local0)
2434 }
2435 if (LNotEqual(i000, Local0)) {
2436 err(ts, z179, __LINE__, 0, 0, i000, Local0)
2437 }
2438 } else {
2439 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
2440 }
2441 }
2442
2443 Method(m000)
2444 {
2445 mir0()
2446 mir1()
2447 mir2()
2448 mir3()
2449
2450 if (ABUU) {
2451 } else {
2452 mir4()
2453 }
2454
2455 if (ABUU) {
2456 } else {
2457 mir5()
2458 }
2459
2460 if (ABUU) {
2461 } else {
2462 mir6()
2463 }
2464 }
2465
2466 CH03(ts, z179, 0x09f, __LINE__, 0)
2467 switch (ToInteger (Arg0)) {
2468 case (0) { m000() }
2469 case (1) { mir0() }
2470 case (2) { mir1() }
2471 case (3) { mir2() }
2472 case (4) { mir3() }
2473 case (5) { mir4() }
2474 case (6) { mir5() }
2475 case (7) { mir6() }
2476 }
2477 CH03(ts, z179, 0x0a0, __LINE__, 0)
2478 }
2479
2480 /* Methods to run manually (for ABBU only) */
2481 Method(amir) { IIN0() ms23(1) Return(POUT) }
2482 Method(bmir) { IIN0() ms23(2) Return(POUT) }
2483 Method(cmir) { IIN0() ms23(3) Return(POUT) }
2484 Method(dmir) { IIN0() ms23(4) Return(POUT) }
2485 Method(emir) { IIN0() ms23(5) Return(POUT) }
2486 Method(fmir) { IIN0() ms23(6) Return(POUT) }
2487 Method(gmir) { IIN0() ms23(7) Return(POUT) }
2488
2489 /*
2490 * Hot issue:
2491 *
2492 * Increment/Decrement with String/Buffer
2493 */
2494 Method(ms24,, Serialized)
2495 {
2496 Name(ts, "ms24")
2497
2498 Method(mmid,, Serialized)
2499 {
2500 Name(s000, "0321")
2501 Name(s001, "0321")
2502 Name(b000, Buffer(3){0x21, 0x03, 0x00})
2503 Name(b001, Buffer(3){0x21, 0x03, 0x00})
2504
2505 OUTP("Increment/Decrement with String/Buffer")
2506
2507 OUTP(s000)
2508 OUTP(s001)
2509 Subtract(s000, 1, s000)
2510 Decrement(s001)
2511
2512 Store(ObjectType(s000), Local0)
2513 Store(ObjectType(s001), Local1)
2514
2515 if (LNotEqual(Local0, Local1)) {
2516 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2517 } elseif (LNotEqual(s000, s001)) {
2518 err(ts, z179, __LINE__, 0, 0, s000, s001)
2519 } else {
2520 OUTP("Ok Subtract/Decrement for String")
2521 }
2522
2523 OUTP("======")
2524
2525 OUTP(b000)
2526 OUTP(b001)
2527 Add(b000, 1, b000)
2528 Increment(b001)
2529
2530 Store(ObjectType(b000), Local0)
2531 Store(ObjectType(b001), Local1)
2532
2533 if (LNotEqual(Local0, Local1)) {
2534 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2535 } elseif (LNotEqual(b000, b001)) {
2536 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2537 } else {
2538 OUTP("Ok Add/Increment for Buffer")
2539 }
2540 }
2541
2542 CH03(ts, z179, 0x0a5, __LINE__, 0)
2543 mmid()
2544 CH03(ts, z179, 0x0a6, __LINE__, 0)
2545 }
2546
2547 /* Methods to run manually (for ABBU only) */
2548 Method(amid) { IIN0() ms24() Return(POUT) }
2549
2550
2551 /*
2552 * Hot issue:
2553 *
2554 * Check Store(..., DeRefof(...)) behavior
2555 */
2556 Method(ms25, 1, Serialized)
2557 {
2558 Name(ts, "ms25")
2559
2560 Method(msd0,, Serialized)
2561 {
2562 Name(i000, 0xffffffff)
2563 Name(i001, 0x12345678)
2564
2565 OUTP("Check Store(..., DeRefof(...)) behavior: none DeRefof")
2566
2567 Store(i001, Refof(i000))
2568 CH03(ts, z179, 0x0a7, __LINE__, 0)
2569 if (LNotEqual(i000, 0x12345678)) {
2570 err(ts, z179, __LINE__, 0, 0, i000, 0x12345678)
2571 }
2572 }
2573
2574 Method(msd1,, Serialized)
2575 {
2576 Name(i000, 0xffffffff)
2577 Name(i001, 0x12345678)
2578
2579 OUTP("Check Store(..., DeRefof(...)) behavior: Refof(Named)")
2580
2581 Store(i001, DeRefof(Refof(i000)))
2582 CH03(ts, z179, 0x0a9, __LINE__, 0)
2583 if (LNotEqual(i000, 0x12345678)) {
2584 err(ts, z179, __LINE__, 0, 0, i000, 0x12345678)
2585 }
2586 }
2587
2588 Method(msd2,, Serialized)
2589 {
2590 Name(i000, 0xffffffff)
2591 Name(i001, 0x12345678)
2592
2593 OUTP("Check Store(..., DeRefof(...)) behavior: Refof in LocalX")
2594
2595 Store(Refof(i000), Local2)
2596
2597 Store(i001, DeRefof(Local2))
2598 CH03(ts, z179, 0x0ab, __LINE__, 0)
2599 if (LNotEqual(i000, 0x12345678)) {
2600 err(ts, z179, __LINE__, 0, 0, i000, 0x12345678)
2601 }
2602 }
2603
2604 Method(msd3,, Serialized)
2605 {
2606 Name(i000, 0xffffffff)
2607 Name(i001, 0x12345678)
2608
2609 OUTP("Check Store(..., DeRefof(...)) behavior: DeRefof(2xRefof)")
2610
2611 Store(Refof(i000), Local1)
2612 Store(Refof(Local1), Local2)
2613
2614 Store(i001, DeRefof(Local2))
2615 CH03(ts, z179, 0x0ad, __LINE__, 0)
2616
2617 if (LNotEqual(i000, 0xffffffff)) {
2618 err(ts, z179, __LINE__, 0, 0, i000, 0xffffffff)
2619 }
2620
2621 Store(Derefof(Local1), Local4)
2622 if (CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)) {
2623 } elseif (LNotEqual(Local1, 0x12345678)) {
2624 err(ts, z179, __LINE__, 0, 0, Local1, 0x12345678)
2625 }
2626 }
2627
2628 CH03(ts, z179, 0x0b1, __LINE__, 0)
2629 switch (ToInteger (Arg0)) {
2630 case (0) { msd0() msd1() msd2() msd3() }
2631 case (1) { msd0() }
2632 case (2) { msd1() }
2633 case (3) { msd2() }
2634 case (4) { msd3() }
2635 }
2636 CH03(ts, z179, 0x0b2, __LINE__, 0)
2637 }
2638
2639 /* Methods to run manually (for ABBU only) */
2640 Method(amsd) { IIN0() ms25(1) Return(POUT) }
2641 Method(bmsd) { IIN0() ms25(2) Return(POUT) }
2642 Method(cmsd) { IIN0() ms25(3) Return(POUT) }
2643 Method(dmsd) { IIN0() ms25(4) Return(POUT) }
2644
2645 // Video memory address to maintain SystemMemory OpRegions
2646 // Name(VMEM, 0xA0000) // VGA memory
2647 // Name(VMEM, 0xF0000000) // T22 Savage3
2648 // Name(VMEM, 0xD0000000) // IntelliStation Z Pro NVidia
2649 Name(VMEM, 0xA0000) // VGA memory
2650
2651 // SystemMemory OpRegions base address is maintained flag
2652 Name(SMBA, 1)
2653
2654 /*
2655 * Hot issue:
2656 *
2657 * Exceeding Field Unit
2658 */
2659 Method(ms26, 1, Serialized)
2660 {
2661 Name(ts, "ms26")
2662
2663 OperationRegion(OPR0, SystemMemory, VMEM, 256)
2664
2665 Method(rfu0,, Serialized)
2666 {
2667 Field(OPR0, ByteAcc, NoLock, Preserve) {
2668 g001, 0x80,
2669 }
2670
2671 Field(OPR0, ByteAcc, NoLock, Preserve) {
2672 Offset(0x8), FU01, 8,
2673 }
2674
2675 OUTP("Store Integer exceeding Field Unit")
2676
2677 Store(0, g001)
2678
2679 Store(FU01, Local0)
2680 Store(0, Local1)
2681 if (LNotEqual(Local0, Local1)) {
2682 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2683 }
2684
2685 Store(0x5a, FU01)
2686 Store(FU01, Local0)
2687 Store(0x5a, Local1)
2688 if (LNotEqual(Local0, Local1)) {
2689 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2690 }
2691
2692 Store(0x3c69, FU01)
2693 Store(FU01, Local0)
2694 Store(0x69, Local1)
2695 if (LNotEqual(Local0, Local1)) {
2696 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2697 }
2698 }
2699
2700 Method(rfu1,, Serialized)
2701 {
2702 Field(OPR0, ByteAcc, NoLock, Preserve) {
2703 g001, 0x80,
2704 }
2705
2706 Field(OPR0, ByteAcc, NoLock, Preserve) {
2707 Offset(0x8), FU01, 8,
2708 }
2709
2710 OUTP("Store Buffer exceeding Field Unit")
2711
2712 Store(0, g001)
2713
2714 Store(FU01, Local0)
2715 Store(0, Local1)
2716 if (LNotEqual(Local0, Local1)) {
2717 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2718 }
2719
2720 Store(0x5a, FU01)
2721 Store(FU01, Local0)
2722 Store(0x5a, Local1)
2723 if (LNotEqual(Local0, Local1)) {
2724 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2725 }
2726
2727 Store(Buffer(){0x3c, 0x69}, FU01)
2728 Store(FU01, Local0)
2729 Store(0x3c, Local1)
2730 if (LAnd(ABUU, LNot(q009))) {
2731 Store(0x69, Local1)
2732 if (LNotEqual(Local0, Local1)) {
2733 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2734 }
2735 } elseif (LNotEqual(Local0, Local1)) {
2736 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2737 }
2738 }
2739
2740 Method(rfu2,, Serialized)
2741 {
2742 Field(OPR0, ByteAcc, NoLock, Preserve) {
2743 g001, 0x80,
2744 }
2745
2746 Field(OPR0, ByteAcc, NoLock, Preserve) {
2747 Offset(0x8), FU01, 8,
2748 }
2749
2750 OUTP("Store String exceeding Field Unit")
2751
2752 Store(0, g001)
2753
2754 Store(FU01, Local0)
2755 Store(0, Local1)
2756 if (LNotEqual(Local0, Local1)) {
2757 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2758 }
2759
2760 Store(0x5a, FU01)
2761 Store(FU01, Local0)
2762 Store(0x5a, Local1)
2763 if (LNotEqual(Local0, Local1)) {
2764 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2765 }
2766
2767 Store("79", FU01)
2768 Store(FU01, Local0)
2769 Store(0x37, Local1)
2770 if (LAnd(ABUU, LNot(q009))) {
2771 Store(0x39, Local1)
2772 if (LNotEqual(Local0, Local1)) {
2773 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2774 }
2775 } elseif (LNotEqual(Local0, Local1)) {
2776 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2777 }
2778 }
2779
2780 Method(rfu3,, Serialized)
2781 {
2782 Field(OPR0, ByteAcc, NoLock, Preserve) {
2783 g001, 0x80,
2784 }
2785
2786 Field(OPR0, ByteAcc, NoLock, Preserve) {
2787 Offset(0x8), FU01, 6, FU02, 2
2788 }
2789
2790 OUTP("Store Buffer exceeding 6-bit Field Unit")
2791
2792 Store(0, g001)
2793
2794 Store(FU01, Local0)
2795 Store(0, Local1)
2796 if (LNotEqual(Local0, Local1)) {
2797 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2798 }
2799
2800 Store(0x5a, FU01)
2801 Store(FU01, Local0)
2802 Store(0x1a, Local1)
2803 if (LNotEqual(Local0, Local1)) {
2804 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2805 }
2806
2807 Store(Buffer(){0x7c, 0x69}, FU01)
2808 Store(FU01, Local0)
2809 Store(0x3c, Local1)
2810 if (LAnd(ABUU, LNot(q009))) {
2811 Store(0x29, Local1)
2812 if (LNotEqual(Local0, Local1)) {
2813 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2814 }
2815 } elseif (LNotEqual(Local0, Local1)) {
2816 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2817 }
2818
2819 Store(FU02, Local0)
2820 Store(0, Local1)
2821 if (LAnd(ABUU, LNot(q009))) {
2822 Store(0x01, Local1)
2823 if (LNotEqual(Local0, Local1)) {
2824 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2825 }
2826 } elseif (LNotEqual(Local0, Local1)) {
2827 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2828 }
2829 }
2830
2831 Method(rfu4,, Serialized)
2832 {
2833 Field(OPR0, ByteAcc, NoLock, Preserve) {
2834 g001, 0x80,
2835 }
2836
2837 Field(OPR0, ByteAcc, NoLock, Preserve) {
2838 Offset(0x8), FU01, 6, FU02, 2
2839 }
2840
2841 OUTP("Store String exceeding 6-bit Field Unit")
2842
2843 Store(0, g001)
2844
2845 Store(FU01, Local0)
2846 Store(0, Local1)
2847 if (LNotEqual(Local0, Local1)) {
2848 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2849 }
2850
2851 Store(0x5a, FU01)
2852 Store(FU01, Local0)
2853 Store(0x1a, Local1)
2854 if (LNotEqual(Local0, Local1)) {
2855 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2856 }
2857
2858 Store("79", FU01)
2859 Store(FU01, Local0)
2860 Store(0x37, Local1)
2861 if (LAnd(ABUU, LNot(q009))) {
2862 Store(0x39, Local1)
2863 if (LNotEqual(Local0, Local1)) {
2864 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2865 }
2866 } elseif (LNotEqual(Local0, Local1)) {
2867 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2868 }
2869
2870 Store(FU02, Local0)
2871 Store(0, Local1)
2872 if (LAnd(ABUU, LNot(q009))) {
2873 Store(0x01, Local1)
2874 if (LNotEqual(Local0, Local1)) {
2875 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2876 }
2877 } elseif (LNotEqual(Local0, Local1)) {
2878 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2879 }
2880 }
2881
2882 Method(rfu5,, Serialized)
2883 {
2884 Field(OPR0, ByteAcc, NoLock, Preserve) {
2885 g001, 0x80,
2886 }
2887
2888 Field(OPR0, ByteAcc, NoLock, Preserve) {
2889 Offset(0x8), FU01, 10, FU02, 6
2890 }
2891
2892 OUTP("Store Buffer exceeding 10-bit Field Unit")
2893
2894 Store(0, g001)
2895
2896 Store(FU01, Local0)
2897 Store(0, Local1)
2898 if (LNotEqual(Local0, Local1)) {
2899 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2900 }
2901
2902 Store(0x5a, FU01)
2903 Store(FU01, Local0)
2904 Store(0x5a, Local1)
2905 if (LNotEqual(Local0, Local1)) {
2906 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2907 }
2908
2909 Store(Buffer(){0x3c, 0x69}, FU01)
2910 Store(FU01, Local0)
2911 Store(0x13c, Local1)
2912 if (LNotEqual(Local0, Local1)) {
2913 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2914 }
2915
2916 Store(FU02, Local0)
2917 Store(0, Local1)
2918 if (LAnd(ABUU, LNot(q009))) {
2919 Store(0x1a, Local1)
2920 if (LNotEqual(Local0, Local1)) {
2921 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2922 }
2923 } elseif (LNotEqual(Local0, Local1)) {
2924 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2925 }
2926 }
2927
2928 Method(rfu6,, Serialized)
2929 {
2930 Field(OPR0, ByteAcc, NoLock, Preserve) {
2931 g001, 0x80,
2932 }
2933
2934 Field(OPR0, ByteAcc, NoLock, Preserve) {
2935 Offset(0x8), FU01, 10, FU02, 6
2936 }
2937
2938 OUTP("Store String exceeding 10-bit Field Unit")
2939
2940 Store(0, g001)
2941
2942 Store(FU01, Local0)
2943 Store(0, Local1)
2944 if (LNotEqual(Local0, Local1)) {
2945 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2946 }
2947
2948 Store(0x5a, FU01)
2949 Store(FU01, Local0)
2950 Store(0x5a, Local1)
2951 if (LNotEqual(Local0, Local1)) {
2952 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2953 }
2954
2955 Store("79", FU01)
2956 Store(FU01, Local0)
2957 Store(0x137, Local1)
2958 if (LNotEqual(Local0, Local1)) {
2959 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2960 }
2961
2962 Store(FU02, Local0)
2963 Store(0, Local1)
2964 if (LAnd(ABUU, LNot(q009))) {
2965 Store(0x0e, Local1)
2966 if (LNotEqual(Local0, Local1)) {
2967 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2968 }
2969 } elseif (LNotEqual(Local0, Local1)) {
2970 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2971 }
2972 }
2973
2974 Method(rfu7,, Serialized)
2975 {
2976 Field(OPR0, ByteAcc, NoLock, Preserve) {
2977 g001, 0x80,
2978 }
2979
2980 Field(OPR0, ByteAcc, NoLock, Preserve) {
2981 Offset(0x8), FU01, 10, FU02, 6
2982 }
2983
2984 OUTP("Store 3-byte Buffer exceeding 10-bit Field Unit")
2985
2986 Store(0, g001)
2987
2988 Store(FU01, Local0)
2989 Store(0, Local1)
2990 if (LNotEqual(Local0, Local1)) {
2991 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2992 }
2993
2994 Store(0x5a, FU01)
2995 Store(FU01, Local0)
2996 Store(0x5a, Local1)
2997 if (LNotEqual(Local0, Local1)) {
2998 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
2999 }
3000
3001 Store(Buffer(){0x3c, 0x69, 0xa5}, FU01)
3002 Store(FU01, Local0)
3003 Store(0x13c, Local1)
3004 if (LAnd(ABUU, LNot(q009))) {
3005 Store(0xa5, Local1)
3006 if (LNotEqual(Local0, Local1)) {
3007 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
3008 }
3009 } elseif (LNotEqual(Local0, Local1)) {
3010 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
3011 }
3012
3013 Store(FU02, Local0)
3014 Store(0, Local1)
3015 if (LAnd(ABUU, LNot(q009))) {
3016 Store(0x1a, Local1)
3017 if (LNotEqual(Local0, Local1)) {
3018 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
3019 }
3020 } elseif (LNotEqual(Local0, Local1)) {
3021 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
3022 }
3023 }
3024
3025 Method(rfu8,, Serialized)
3026 {
3027 Field(OPR0, ByteAcc, NoLock, Preserve) {
3028 g001, 0x80,
3029 }
3030
3031 Field(OPR0, ByteAcc, NoLock, Preserve) {
3032 Offset(0x8), FU01, 10, FU02, 6
3033 }
3034
3035 OUTP("Store 3-char String exceeding 10-bit Field Unit")
3036
3037 Store(0, g001)
3038
3039 Store(FU01, Local0)
3040 Store(0, Local1)
3041 if (LNotEqual(Local0, Local1)) {
3042 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
3043 }
3044
3045 Store(0x5a, FU01)
3046 Store(FU01, Local0)
3047 Store(0x5a, Local1)
3048 if (LNotEqual(Local0, Local1)) {
3049 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
3050 }
3051
3052 Store("795", FU01)
3053 Store(FU01, Local0)
3054 Store(0x137, Local1)
3055 if (LAnd(ABUU, LNot(q009))) {
3056 Store(0x35, Local1)
3057 if (LNotEqual(Local0, Local1)) {
3058 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
3059 }
3060 } elseif (LNotEqual(Local0, Local1)) {
3061 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
3062 }
3063
3064 Store(FU02, Local0)
3065 Store(0, Local1)
3066 if (LAnd(ABUU, LNot(q009))) {
3067 Store(0x0e, Local1)
3068 if (LNotEqual(Local0, Local1)) {
3069 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
3070 }
3071 } elseif (LNotEqual(Local0, Local1)) {
3072 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
3073 }
3074 }
3075
3076 Method(m000)
3077 {
3078 rfu0()
3079 rfu1()
3080 rfu2()
3081 rfu3()
3082 rfu4()
3083 rfu5()
3084 rfu6()
3085 rfu7()
3086 rfu8()
3087 }
3088
3089 CH03(ts, z179, 0x0d4, __LINE__, 0)
3090 switch (ToInteger (Arg0)) {
3091 case (0) { m000() }
3092 case (1) { rfu0() }
3093 case (2) { rfu1() }
3094 case (3) { rfu2() }
3095 case (4) { rfu3() }
3096 case (5) { rfu4() }
3097 case (6) { rfu5() }
3098 case (7) { rfu6() }
3099 case (8) { rfu7() }
3100 case (9) { rfu8() }
3101 }
3102 CH03(ts, z179, 0x0d5, __LINE__, 0)
3103 }
3104
3105 /* Methods to run manually (for ABBU only) */
3106 Method(arfu) { IIN0() ms26(1) Return(POUT) }
3107 Method(brfu) { IIN0() ms26(2) Return(POUT) }
3108 Method(crfu) { IIN0() ms26(3) Return(POUT) }
3109 Method(drfu) { IIN0() ms26(4) Return(POUT) }
3110 Method(erfu) { IIN0() ms26(5) Return(POUT) }
3111 Method(frfu) { IIN0() ms26(6) Return(POUT) }
3112 Method(grfu) { IIN0() ms26(7) Return(POUT) }
3113 Method(hrfu) { IIN0() ms26(8) Return(POUT) }
3114 Method(irfu) { IIN0() ms26(9) Return(POUT) }
3115
3116
3117 /*
3118 * Hot issue:
3119 *
3120 * Check IndexField implementation
3121 */
3122 Method(ms27, 1, Serialized)
3123 {
3124 Name(ts, "ms27")
3125
3126 OperationRegion(OPR0, SystemMemory, VMEM, 256)
3127
3128 Field(OPR0, ByteAcc, NoLock, Preserve) {
3129 tot0, 32,
3130 tot1, 32,
3131 }
3132
3133 Method(ifd0,, Serialized)
3134 {
3135 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
3136 idx1, 4,
3137 dta1, 3,
3138 }
3139
3140 IndexField(idx1, dta1, ByteAcc, NoLock, WriteAsZeros) {
3141 re10, 3,
3142 re11, 3,
3143 re12, 3,
3144 re13, 3,
3145 }
3146
3147 Method(TRY0, 3, Serialized)
3148 {
3149 Store(Zero, tot0)
3150 switch (ToInteger (Arg0)) {
3151 Case (0) {Store(Ones, ^re10)}
3152 Case (1) {Store(Ones, ^re11)}
3153 Case (2) {Store(Ones, ^re12)}
3154 Case (3) {Store(Ones, ^re13)}
3155 }
3156
3157 Store(idx1, Local0)
3158 Store(dta1, Local1)
3159
3160 Multiply(arg0, 2, Local2)
3161 if (LNotEqual(Local0, arg1)) {
3162 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3163 }
3164 if (LNotEqual(Local1, arg2)) {
3165 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3166 }
3167 }
3168
3169 OUTP("Check IndexField ByteAcc 4-3 Ones write 3-3-3-3")
3170
3171 TRY0(0, 0, 0x7)
3172 TRY0(1, 0, 0x0)
3173
3174 Store(0x1, Local0)
3175 if (LAnd(ABUU, LNot(q00a))) {
3176 Store(0x07, Local0)
3177 }
3178 TRY0(2, 0, Local0)
3179
3180 TRY0(3, 0, 0x06)
3181 }
3182
3183 Method(ifd1,, Serialized)
3184 {
3185 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
3186 idx1, 8,
3187 dta1, 8,
3188 }
3189
3190 IndexField(idx1, dta1, ByteAcc, NoLock, WriteAsZeros) {
3191 re10, 8,
3192 re11, 8,
3193 re12, 8,
3194 re13, 8,
3195 }
3196
3197 Method(TRY0, 3, Serialized)
3198 {
3199 Store(Zero, tot0)
3200 switch (ToInteger (Arg0)) {
3201 Case (0) {Store(0x12345678, ^re10)}
3202 Case (1) {Store(0x12345678, ^re11)}
3203 Case (2) {Store(0x12345678, ^re12)}
3204 Case (3) {Store(0x12345678, ^re13)}
3205 }
3206
3207 Store(idx1, Local0)
3208 Store(dta1, Local1)
3209
3210 Multiply(arg0, 2, Local2)
3211 if (LNotEqual(Local0, arg1)) {
3212 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3213 }
3214 if (LNotEqual(Local1, arg2)) {
3215 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3216 }
3217 }
3218
3219 OUTP("Check IndexField ByteAcc 0x12345678 write 8-8-8-8")
3220
3221 TRY0(0, 0, 0x78)
3222 TRY0(1, 1, 0x78)
3223 TRY0(2, 2, 0x78)
3224 TRY0(3, 3, 0x78)
3225 }
3226
3227 Method(ifd2,, Serialized)
3228 {
3229 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
3230 idx1, 8,
3231 dta1, 8,
3232 }
3233
3234 IndexField(idx1, dta1, ByteAcc, NoLock, WriteAsZeros) {
3235 , 7,
3236 re10, 1,
3237 re11, 1,
3238 Offset(2),
3239 re12, 4,
3240 re13, 4,
3241 }
3242
3243 Method(TRY0, 3, Serialized)
3244 {
3245 Store(Zero, tot0)
3246 switch (ToInteger (Arg0)) {
3247 Case (0) {Store(Ones, ^re10)}
3248 Case (1) {Store(Ones, ^re11)}
3249 Case (2) {Store(Ones, ^re12)}
3250 Case (3) {Store(Ones, ^re13)}
3251 }
3252
3253 Store(idx1, Local0)
3254 Store(dta1, Local1)
3255
3256 Multiply(arg0, 2, Local2)
3257 if (LNotEqual(Local0, arg1)) {
3258 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3259 }
3260 if (LNotEqual(Local1, arg2)) {
3261 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3262 }
3263 }
3264
3265 OUTP("Check IndexField ByteAcc Ones write Offset (0:7)1-(1:0)1-(2:0)4-4")
3266
3267 TRY0(0, 0, 0x80)
3268
3269 Store(0x01, Local0)
3270 if (LAnd(ABUU, LNot(q00a))) {
3271 Store(0xff, Local0)
3272 }
3273 TRY0(1, 1, Local0)
3274
3275 Store(0x0f, Local0)
3276 if (LAnd(ABUU, LNot(q00a))) {
3277 Store(0xff, Local0)
3278 }
3279 TRY0(2, 2, Local0)
3280
3281 TRY0(3, 2, 0xf0)
3282 }
3283
3284 Method(ifd3,, Serialized)
3285 {
3286 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
3287 idx1, 8,
3288 dta1, 8,
3289 }
3290
3291 IndexField(idx1, dta1, ByteAcc, NoLock, WriteAsZeros) {
3292 Offset(1),
3293 re10, 8,
3294 Offset(2),
3295 re11, 8,
3296 Offset(7),
3297 re12, 8,
3298 Offset(16),
3299 re13, 8,
3300 }
3301
3302 Method(TRY0, 3, Serialized)
3303 {
3304 Store(Zero, tot0)
3305 switch (ToInteger (Arg0)) {
3306 Case (0) {Store(0x12345678, ^re10)}
3307 Case (1) {Store(0x12345678, ^re11)}
3308 Case (2) {Store(0x12345678, ^re12)}
3309 Case (3) {Store(0x12345678, ^re13)}
3310 }
3311
3312 Store(idx1, Local0)
3313 Store(dta1, Local1)
3314
3315 Multiply(arg0, 2, Local2)
3316 if (LNotEqual(Local0, arg1)) {
3317 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3318 }
3319 if (LNotEqual(Local1, arg2)) {
3320 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3321 }
3322 }
3323
3324 OUTP("Check IndexField ByteAcc 0x12345678 write Offset (1:0)8-(2:0)8-(7:0)8-(16:0)8")
3325
3326 TRY0(0, 1, 0x78)
3327 TRY0(1, 2, 0x78)
3328 TRY0(2, 7, 0x78)
3329 TRY0(3, 16, 0x78)
3330 }
3331
3332 CH03(ts, z179, 0x0e6, __LINE__, 0)
3333 switch (ToInteger (Arg0)) {
3334 case (0) {
3335 ifd0()
3336 ifd1()
3337 ifd2()
3338 ifd3()
3339 }
3340 case (1) { ifd0() }
3341 case (2) { ifd1() }
3342 case (3) { ifd2() }
3343 case (4) { ifd3() }
3344 }
3345 CH03(ts, z179, 0x0e7, __LINE__, 0)
3346 }
3347
3348 Method(mt27, 1, Serialized)
3349 {
3350 Name(ts, "mt27")
3351
3352 OperationRegion(OPR0, SystemMemory, VMEM, 256)
3353
3354 Field(OPR0, ByteAcc, NoLock, Preserve) {
3355 tot0, 32,
3356 tot1, 32,
3357 }
3358
3359 Method(ifd4,, Serialized)
3360 {
3361 Field(OPR0, WordAcc, NoLock, WriteAsZeros) {
3362 idx1, 16,
3363 dta1, 16,
3364 }
3365
3366 IndexField(idx1, dta1, WordAcc, NoLock, WriteAsZeros) {
3367 re10, 8,
3368 re11, 8,
3369 re12, 8,
3370 re13, 8,
3371 }
3372
3373 Method(TRY0, 3, Serialized)
3374 {
3375 Store(Zero, tot0)
3376 switch (ToInteger (Arg0)) {
3377 Case (0) {Store(0x12345678, ^re10)}
3378 Case (1) {Store(0x12345678, ^re11)}
3379 Case (2) {Store(0x12345678, ^re12)}
3380 Case (3) {Store(0x12345678, ^re13)}
3381 }
3382
3383 Store(idx1, Local0)
3384 Store(dta1, Local1)
3385
3386 Multiply(arg0, 2, Local2)
3387 if (LNotEqual(Local0, arg1)) {
3388 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3389 }
3390 if (LNotEqual(Local1, arg2)) {
3391 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3392 }
3393 }
3394
3395 OUTP("Check IndexField WordAcc Ones write 8-8-8-8")
3396
3397 Store(0x0078, Local0)
3398 if (LAnd(ABUU, LNot(q00a))) {
3399 Store(0x5678, Local0)
3400 }
3401 TRY0(0, 0, Local0)
3402
3403 TRY0(1, 0, 0x7800)
3404
3405 Store(0x0078, Local0)
3406 if (LAnd(ABUU, LNot(q00a))) {
3407 Store(0x5678, Local0)
3408 }
3409 TRY0(2, 2, Local0)
3410
3411 TRY0(3, 2, 0x7800)
3412 }
3413
3414 Method(ifd5,, Serialized)
3415 {
3416 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
3417 idx1, 8,
3418 dta1, 8,
3419 }
3420
3421 IndexField(idx1, dta1, ByteAcc, NoLock, WriteAsZeros) {
3422 , 1,
3423 re10, 8,
3424 , 1,
3425 re11, 8,
3426 , 1,
3427 re12, 8,
3428 , 1,
3429 re13, 8,
3430 }
3431
3432 Method(TRY0, 3, Serialized)
3433 {
3434 Store(Zero, tot0)
3435 switch (ToInteger (Arg0)) {
3436 Case (0) {Store(Ones, ^re10)}
3437 Case (1) {Store(Ones, ^re11)}
3438 Case (2) {Store(Ones, ^re12)}
3439 Case (3) {Store(Ones, ^re13)}
3440 }
3441
3442 Store(idx1, Local0)
3443 Store(dta1, Local1)
3444
3445 Multiply(arg0, 2, Local2)
3446 if (LNotEqual(Local0, arg1)) {
3447 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3448 }
3449 if (LNotEqual(Local1, arg2)) {
3450 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3451 }
3452 }
3453
3454 OUTP("Check IndexField ByteAcc Ones write (:1)8-(:1)8-(:1)8-(:1)8")
3455
3456 TRY0(0, 1, 0x1)
3457 TRY0(1, 2, 0x3)
3458 TRY0(2, 3, 0x7)
3459 TRY0(3, 4, 0xf)
3460 }
3461
3462 Method(ifd6,, Serialized)
3463 {
3464 Field(OPR0, DWordAcc, NoLock, WriteAsZeros) {
3465 idx1, 32,
3466 dta1, 32,
3467 }
3468
3469 IndexField(idx1, dta1, DWordAcc, NoLock, WriteAsZeros) {
3470 re10, 8,
3471 re11, 8,
3472 re12, 8,
3473 re13, 8,
3474 }
3475
3476 Method(TRY0, 3, Serialized)
3477 {
3478 Store(Zero, tot0)
3479 Store(Zero, tot1)
3480 switch (ToInteger (Arg0)) {
3481 Case (0) {Store(Ones, ^re10)}
3482 Case (1) {Store(Ones, ^re11)}
3483 Case (2) {Store(Ones, ^re12)}
3484 Case (3) {Store(Ones, ^re13)}
3485 }
3486
3487 Store(idx1, Local0)
3488 Store(dta1, Local1)
3489
3490 Multiply(arg0, 2, Local2)
3491 if (LNotEqual(Local0, arg1)) {
3492 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3493 }
3494 if (LNotEqual(Local1, arg2)) {
3495 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3496 }
3497 }
3498
3499 OUTP("Check IndexField DWordAcc Ones write 8-8-8-8")
3500
3501 Store(0xff, Local0)
3502 if (LAnd(ABUU, LNot(q00a))) {
3503 Store(0xffffffff, Local0)
3504 }
3505 TRY0(0, 0, Local0)
3506
3507 Store(0xff00, Local0)
3508 if (LAnd(ABUU, LNot(q00a))) {
3509 Store(0xffffff00, Local0)
3510 }
3511 TRY0(1, 0, Local0)
3512
3513 Store(0xff0000, Local0)
3514 if (LAnd(ABUU, LNot(q00a))) {
3515 Store(0xffff0000, Local0)
3516 }
3517 TRY0(2, 0, Local0)
3518
3519 TRY0(3, 0, 0xff000000)
3520 }
3521
3522 Method(ifd7,, Serialized)
3523 {
3524 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
3525 idx1, 8,
3526 dta1, 8,
3527 }
3528
3529 IndexField(idx1, dta1, ByteAcc, NoLock, WriteAsZeros) {
3530 , 2,
3531 re10, 7,
3532 , 2,
3533 re11, 7,
3534 , 2,
3535 re12, 7,
3536 , 2,
3537 re13, 7,
3538 }
3539
3540 Method(TRY0, 3, Serialized)
3541 {
3542 Store(Zero, tot0)
3543 switch (ToInteger (Arg0)) {
3544 Case (0) {Store(Ones, ^re10)}
3545 Case (1) {Store(Ones, ^re11)}
3546 Case (2) {Store(Ones, ^re12)}
3547 Case (3) {Store(Ones, ^re13)}
3548 }
3549
3550 Store(idx1, Local0)
3551 Store(dta1, Local1)
3552
3553 Multiply(arg0, 2, Local2)
3554 if (LNotEqual(Local0, arg1)) {
3555 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3556 }
3557 if (LNotEqual(Local1, arg2)) {
3558 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3559 }
3560 }
3561
3562 OUTP("Check IndexField ByteAcc Ones write (:2)7-(:2)7-(:2)7-(:2)7")
3563
3564 Store(0x1, Local0)
3565 if (LAnd(ABUU, LNot(q00a))) {
3566 Store(0x3, Local0)
3567 }
3568 TRY0(0, 1, Local0)
3569
3570 Store(0x3, Local0)
3571 if (LAnd(ABUU, LNot(q00a))) {
3572 Store(0x7, Local0)
3573 }
3574 TRY0(1, 2, Local0)
3575
3576 Store(0x7, Local0)
3577 if (LAnd(ABUU, LNot(q00a))) {
3578 Store(0xf, Local0)
3579 }
3580 TRY0(2, 3, Local0)
3581
3582 Store(0xf, Local0)
3583 if (LAnd(ABUU, LNot(q00a))) {
3584 Store(0x1f, Local0)
3585 }
3586 TRY0(3, 4, Local0)
3587 }
3588
3589 CH03(ts, z179, 0x0e8, __LINE__, 0)
3590 switch (ToInteger (Arg0)) {
3591 case (0) {
3592 ifd4()
3593 ifd5()
3594 ifd6()
3595 ifd7()
3596 }
3597 case (5) { ifd4() }
3598 case (6) { ifd5() }
3599 case (7) { ifd6() }
3600 case (8) { ifd7() }
3601 }
3602 CH03(ts, z179, 0x0e9, __LINE__, 0)
3603 }
3604
3605 Method(mu27, 1, Serialized)
3606 {
3607 Name(ts, "mu27")
3608
3609 OperationRegion(OPR0, SystemMemory, VMEM, 256)
3610
3611 Field(OPR0, ByteAcc, NoLock, Preserve) {
3612 tot0, 32,
3613 tot1, 32,
3614 }
3615
3616 Method(ifd8,, Serialized)
3617 {
3618 Field(OPR0, DWordAcc, NoLock, WriteAsZeros) {
3619 idx1, 32,
3620 dta1, 32,
3621 }
3622
3623 IndexField(idx1, dta1, DWordAcc, NoLock, WriteAsZeros) {
3624 Offset(1),
3625 re10, 8,
3626 Offset(4),
3627 re11, 8,
3628 Offset(9),
3629 re12, 8,
3630 Offset(12),
3631 re13, 8,
3632 }
3633
3634 Method(TRY0, 3, Serialized)
3635 {
3636 Store(Zero, tot0)
3637 Store(Zero, tot1)
3638 switch (ToInteger (Arg0)) {
3639 Case (0) {Store(0x12345678, ^re10)}
3640 Case (1) {Store(0x12345678, ^re11)}
3641 Case (2) {Store(0x12345678, ^re12)}
3642 Case (3) {Store(0x12345678, ^re13)}
3643 }
3644
3645 Store(idx1, Local0)
3646 Store(dta1, Local1)
3647
3648 Multiply(arg0, 2, Local2)
3649 if (LNotEqual(Local0, arg1)) {
3650 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3651 }
3652 if (LNotEqual(Local1, arg2)) {
3653 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3654 }
3655 }
3656
3657 OUTP("Check IndexField DWordAcc 0x12345678 write Offset (1)8-(4)8-(9)8-(12)8")
3658
3659 Store(0x7800, Local0)
3660 if (LAnd(ABUU, LNot(q00a))) {
3661 Store(0x34567800, Local0)
3662 }
3663 TRY0(0, 0, Local0)
3664
3665 Store(0x78, Local0)
3666 if (LAnd(ABUU, LNot(q00a))) {
3667 Store(0x12345678, Local0)
3668 }
3669 TRY0(1, 4, Local0)
3670
3671 Store(0x7800, Local0)
3672 if (LAnd(ABUU, LNot(q00a))) {
3673 Store(0x34567800, Local0)
3674 }
3675 TRY0(2, 8, Local0)
3676
3677 Store(0x78, Local0)
3678 if (LAnd(ABUU, LNot(q00a))) {
3679 Store(0x12345678, Local0)
3680 }
3681 TRY0(3, 12, Local0)
3682 }
3683
3684 Method(ifd9,, Serialized)
3685 {
3686 Field(OPR0, WordAcc, NoLock, WriteAsZeros) {
3687 idx1, 16,
3688 dta1, 16,
3689 }
3690
3691 IndexField(idx1, dta1, WordAcc, NoLock, WriteAsZeros) {
3692 Offset(1),
3693 re10, 8,
3694 Offset(4),
3695 re11, 8,
3696 Offset(9),
3697 re12, 8,
3698 Offset(12),
3699 re13, 8,
3700 }
3701
3702 Method(TRY0, 3, Serialized)
3703 {
3704 Store(Zero, tot0)
3705 switch (ToInteger (Arg0)) {
3706 Case (0) {Store(0x12345678, ^re10)}
3707 Case (1) {Store(0x12345678, ^re11)}
3708 Case (2) {Store(0x12345678, ^re12)}
3709 Case (3) {Store(0x12345678, ^re13)}
3710 }
3711
3712 Store(idx1, Local0)
3713 Store(dta1, Local1)
3714
3715 Multiply(arg0, 2, Local2)
3716 if (LNotEqual(Local0, arg1)) {
3717 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3718 }
3719 if (LNotEqual(Local1, arg2)) {
3720 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3721 }
3722 }
3723
3724 OUTP("Check IndexField WordAcc 0x12345678 write Offset (1)8-(4)8-(9)8-(12)8")
3725
3726 TRY0(0, 0, 0x7800)
3727
3728 Store(0x78, Local0)
3729 if (LAnd(ABUU, LNot(q00a))) {
3730 Store(0x5678, Local0)
3731 }
3732 TRY0(1, 4, Local0)
3733
3734 TRY0(2, 8, 0x7800)
3735
3736 Store(0x78, Local0)
3737 if (LAnd(ABUU, LNot(q00a))) {
3738 Store(0x5678, Local0)
3739 }
3740 TRY0(3, 12, Local0)
3741 }
3742
3743 Method(ifda,, Serialized)
3744 {
3745 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
3746 idx1, 16,
3747 dta1, 16,
3748 }
3749
3750 IndexField(idx1, dta1, ByteAcc, NoLock, WriteAsZeros) {
3751 Offset(1),
3752 re10, 8,
3753 Offset(4),
3754 re11, 8,
3755 Offset(9),
3756 re12, 8,
3757 Offset(12),
3758 re13, 8,
3759 }
3760
3761 Method(TRY0, 3, Serialized)
3762 {
3763 Store(Zero, tot0)
3764 switch (ToInteger (Arg0)) {
3765 Case (0) {Store(0x12345678, ^re10)}
3766 Case (1) {Store(0x12345678, ^re11)}
3767 Case (2) {Store(0x12345678, ^re12)}
3768 Case (3) {Store(0x12345678, ^re13)}
3769 }
3770
3771 Store(idx1, Local0)
3772 Store(dta1, Local1)
3773
3774 Multiply(arg0, 2, Local2)
3775 if (LNotEqual(Local0, arg1)) {
3776 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3777 }
3778 if (LNotEqual(Local1, arg2)) {
3779 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3780 }
3781 }
3782
3783 OUTP("Check IndexField ByteAcc 0x12345678 write Offset (1)8-(4)8-(9)8-(12)8")
3784
3785 TRY0(0, 1, 0x78)
3786 TRY0(1, 4, 0x78)
3787 TRY0(2, 9, 0x78)
3788 TRY0(3, 12, 0x78)
3789 }
3790
3791 Method(ifdb,, Serialized)
3792 {
3793 Field(OPR0, AnyAcc, NoLock, WriteAsZeros) {
3794 idx1, 16,
3795 dta1, 16,
3796 }
3797
3798 IndexField(idx1, dta1, AnyAcc, NoLock, WriteAsZeros) {
3799 Offset(1),
3800 re10, 8,
3801 Offset(4),
3802 re11, 8,
3803 Offset(9),
3804 re12, 8,
3805 Offset(12),
3806 re13, 8,
3807 }
3808
3809 Method(TRY0, 3, Serialized)
3810 {
3811 Store(Zero, tot0)
3812 switch (ToInteger (Arg0)) {
3813 Case (0) {Store(0x12345678, ^re10)}
3814 Case (1) {Store(0x12345678, ^re11)}
3815 Case (2) {Store(0x12345678, ^re12)}
3816 Case (3) {Store(0x12345678, ^re13)}
3817 }
3818
3819 Store(idx1, Local0)
3820 Store(dta1, Local1)
3821
3822 Multiply(arg0, 2, Local2)
3823 if (LNotEqual(Local0, arg1)) {
3824 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3825 }
3826 if (LNotEqual(Local1, arg2)) {
3827 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3828 }
3829 }
3830
3831 OUTP("Check IndexField AnyAcc 0x12345678 write Offset (1)8-(4)8-(9)8-(12)8")
3832
3833 TRY0(0, 1, 0x78)
3834 TRY0(1, 4, 0x78)
3835 TRY0(2, 9, 0x78)
3836 TRY0(3, 12, 0x78)
3837 }
3838
3839 CH03(ts, z179, 0x0ea, __LINE__, 0)
3840 switch (ToInteger (Arg0)) {
3841 case (0) {
3842 ifd8()
3843 ifd9()
3844 ifda()
3845 ifdb()
3846 }
3847 case (9) { ifd8() }
3848 case (10) { ifd9() }
3849 case (11) { ifda() }
3850 case (12) { ifdb() }
3851 }
3852 CH03(ts, z179, 0x0eb, __LINE__, 0)
3853 }
3854
3855 Method(mv27, 1, Serialized)
3856 {
3857 Name(ts, "mv27")
3858
3859 OperationRegion(OPR0, SystemMemory, VMEM, 256)
3860
3861 Field(OPR0, ByteAcc, NoLock, Preserve) {
3862 tot0, 32,
3863 tot1, 32,
3864 }
3865
3866 Method(ifdc,, Serialized)
3867 {
3868 Field(OPR0, WordAcc, NoLock, WriteAsZeros) {
3869 idx0, 16,
3870 dta0, 16,
3871 }
3872 IndexField(idx0, dta0, WordAcc, NoLock, WriteAsZeros) {
3873 idf0, 8,
3874 Offset(3),
3875 idf1, 8,
3876 Offset(6),
3877 idf2, 8,
3878 Offset(11),
3879 idf3, 8,
3880 }
3881
3882 Method(TRY0, 4)
3883 {
3884 Store(idx0, Local0)
3885 Store(dta0, Local1)
3886
3887 Multiply(arg0, 2, Local2)
3888 if (LNotEqual(Local0, arg1)) {
3889 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
3890 }
3891 if (LNotEqual(Local1, arg2)) {
3892 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
3893 }
3894 }
3895
3896 OUTP("Check IndexField WordAcc read")
3897
3898 Store(0x1234ffff, tot0)
3899 TRY0(0, 0, 0x1234, idf0)
3900
3901 Store(0x5678ffff, tot0)
3902 TRY0(2, 2, 0x5678, idf1)
3903
3904 Store(0x9abcffff, tot0)
3905 TRY0(3, 6, 0x9abc, idf2)
3906
3907 Store(0xde01ffff, tot0)
3908 TRY0(4, 10, 0xde01, idf3)
3909 }
3910
3911 Method(TRY4, 5)
3912 {
3913 Method(TRY0, 3)
3914 {
3915 Store(arg0, tot0)
3916 Store(Derefof(arg1), Local0)
3917 Store(tot0, Local1)
3918 Store(DeRefof(Index(arg2, 0)), Local2)
3919 Store(DeRefof(Index(arg2, 1)), Local3)
3920 Store(DeRefof(Index(arg2, 2)), Local4)
3921
3922 Add(0x140, Multiply(Local2, 2), Local2)
3923 if (LNotEqual(Local0, Local3)) {
3924 err(ts, z179, __LINE__, 0, 0, Local0, Local3)
3925 }
3926 if (LNotEqual(Local1, Local4)) {
3927 err(ts, z179, __LINE__, 0, 0, Local1, Local4)
3928 }
3929 }
3930
3931 Store(DeRefof(Index(arg0, 0)), Local0)
3932 TRY0(Local0, arg1, DeRefof(Index(arg0, 1)))
3933 TRY0(Local0, arg2, DeRefof(Index(arg0, 2)))
3934 TRY0(Local0, arg3, DeRefof(Index(arg0, 3)))
3935 TRY0(Local0, arg4, DeRefof(Index(arg0, 4)))
3936 }
3937
3938 Method(ifdd,, Serialized)
3939 {
3940 Field(OPR0, ByteAcc, NoLock, Preserve) {
3941 idx1, 8,
3942 dta1, 8,
3943 }
3944
3945 IndexField(idx1, dta1, ByteAcc, NoLock, Preserve) {
3946 , 4,
3947 re10, 1,
3948 re11, 1,
3949 re12, 3,
3950 re13, 3,
3951 }
3952
3953 OUTP("Check IndexField implementation ByteAcc 4,1-1-3-3")
3954
3955 Store(Package(){0xa5a5a5a5,
3956 Package(){0, 0x0, 0xa5a5a500},
3957 Package(){1, 0x1, 0xa5a5a500},
3958 Package(){2, 0x6, 0xa5a5a501},
3959 Package(){3, 0x2, 0xa5a5a501},},
3960 Local0)
3961
3962 if (LAnd(ABUU, LNot(q00a))) {
3963 Store(0x96, Index(DeRefof(Index(Local0, 3)), 1))
3964 }
3965
3966 TRY4(Local0, Refof(re10), Refof(re11), Refof(re12), Refof(re13))
3967
3968
3969 Store(Package(){0x5a5a5a5a,
3970 Package(){4, 0x1, 0x5a5a5a00},
3971 Package(){5, 0x0, 0x5a5a5a00},
3972 Package(){6, 0x1, 0x5a5a5a01},
3973 Package(){7, 0x5, 0x5a5a5a01},},
3974 Local0)
3975
3976 if (LAnd(ABUU, LNot(q00a))) {
3977 Store(0x169, Index(DeRefof(Index(Local0, 3)), 1))
3978 }
3979
3980 TRY4(Local0, Refof(re10), Refof(re11), Refof(re12), Refof(re13))
3981 }
3982
3983 Method(ifde,, Serialized)
3984 {
3985 Field(OPR0, WordAcc, NoLock, Preserve) {
3986 idx1, 16,
3987 dta1, 16,
3988 }
3989
3990 IndexField(idx1, dta1, WordAcc, NoLock, Preserve) {
3991 , 4,
3992 re10, 1,
3993 re11, 1,
3994 re12, 3,
3995 re13, 3,
3996 }
3997
3998 OUTP("Check IndexField implementation WordAcc 4,1-1-3-3")
3999
4000 Store(Package(){0xa5a5a5a5,
4001 Package(){8, 0x0, 0xa5a50000},
4002 Package(){9, 0x1, 0xa5a50000},
4003 Package(){10, 0x6, 0xa5a50000},
4004 Package(){11, 0x2, 0xa5a50000},},
4005 Local0)
4006 TRY4(Local0, Refof(re10), Refof(re11), Refof(re12), Refof(re13))
4007
4008
4009 Store(Package(){0x5a5a5a5a,
4010 Package(){12, 0x1, 0x5a5a0000},
4011 Package(){13, 0x0, 0x5a5a0000},
4012 Package(){14, 0x1, 0x5a5a0000},
4013 Package(){15, 0x5, 0x5a5a0000},},
4014 Local0)
4015 TRY4(Local0, Refof(re10), Refof(re11), Refof(re12), Refof(re13))
4016 }
4017
4018 Method(ifdf,, Serialized)
4019 {
4020 Field(OPR0, ByteAcc, NoLock, Preserve) {
4021 idx1, 8,
4022 dta1, 8,
4023 }
4024
4025 IndexField(idx1, dta1, ByteAcc, NoLock, Preserve) {
4026 , 7,
4027 re10, 1,
4028 re11, 1,
4029 Offset(2),
4030 re12, 4,
4031 re13, 4,
4032 }
4033
4034 OUTP("Check IndexField implementation ByteAcc 7,1-1,O2,4-4")
4035
4036 Store(Package(){0xa5a5a5a5,
4037 Package(){16, 0x1, 0xa5a5a500},
4038 Package(){17, 0x1, 0xa5a5a501},
4039 Package(){18, 0x5, 0xa5a5a502},
4040 Package(){19, 0xa, 0xa5a5a502},},
4041 Local0)
4042 TRY4(Local0, Refof(re10), Refof(re11), Refof(re12), Refof(re13))
4043
4044
4045 Store(Package(){0x5a5a5a5a,
4046 Package(){20, 0x0, 0x5a5a5a00},
4047 Package(){21, 0x0, 0x5a5a5a01},
4048 Package(){22, 0xa, 0x5a5a5a02},
4049 Package(){23, 0x5, 0x5a5a5a02},},
4050 Local0)
4051 TRY4(Local0, Refof(re10), Refof(re11), Refof(re12), Refof(re13))
4052 }
4053
4054 CH03(ts, z179, 0x0ec, __LINE__, 0)
4055 switch (ToInteger (Arg0)) {
4056 case (0) {
4057 ifdc()
4058 ifdd()
4059 ifde()
4060 ifdf()
4061 }
4062 case (13) { ifdc() }
4063 case (14) { ifdd() }
4064 case (15) { ifde() }
4065 case (16) { ifdf() }
4066 }
4067 CH03(ts, z179, 0x0ed, __LINE__, 0)
4068 }
4069
4070 Method(mw27, 1, Serialized)
4071 {
4072 Name(ts, "mw27")
4073
4074 OperationRegion(OPR0, SystemMemory, VMEM, 256)
4075
4076 Field(OPR0, ByteAcc, NoLock, Preserve) {
4077 tot0, 32,
4078 tot1, 32,
4079 }
4080
4081 Method(ife0,, Serialized)
4082 {
4083 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4084 idx0, 16,
4085 dta0, 16,
4086 }
4087 IndexField(idx0, dta0, ByteAcc, NoLock, WriteAsZeros) {
4088 idf0, 1, , 6, idf1, 1,
4089 idf2, 1, , 6, idf3, 1,
4090 idf4, 1, , 6, idf5, 1,
4091 idf6, 1, , 6, idf7, 1,
4092 }
4093 Method(m000, 5)
4094 {
4095 Store(arg0, tot0)
4096 Store(Derefof(arg1), Local0)
4097 Store(tot0, Local1)
4098
4099 if (LNotEqual(Local0, arg3)) {
4100 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4101 }
4102 if (LNotEqual(Local1, arg4)) {
4103 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4104 }
4105 }
4106
4107 OUTP("Check IndexField implementation: ByteAcc2")
4108
4109 m000(0x0001ffff, Refof(idf0), 0x150, 0x1, 0x00010000)
4110 m000(0x0080ffff, Refof(idf1), 0x152, 0x1, 0x00800000)
4111 m000(0x0001ffff, Refof(idf2), 0x154, 0x1, 0x00010001)
4112 m000(0x0080ffff, Refof(idf3), 0x156, 0x1, 0x00800001)
4113 m000(0x0001ffff, Refof(idf4), 0x158, 0x1, 0x00010002)
4114 m000(0x0080ffff, Refof(idf5), 0x15a, 0x1, 0x00800002)
4115 m000(0x0001ffff, Refof(idf6), 0x15c, 0x1, 0x00010003)
4116 m000(0x0080ffff, Refof(idf7), 0x15e, 0x1, 0x00800003)
4117 }
4118
4119 Method(ife1,, Serialized)
4120 {
4121 Field(OPR0, WordAcc, NoLock, WriteAsZeros) {
4122 idx0, 16,
4123 dta0, 16,
4124 }
4125 IndexField(idx0, dta0, ByteAcc, NoLock, WriteAsZeros) {
4126 idf0, 1, , 6, idf1, 1,
4127 idf2, 1, , 6, idf3, 1,
4128 idf4, 1, , 6, idf5, 1,
4129 idf6, 1, , 6, idf7, 1,
4130 }
4131 Method(m000, 5)
4132 {
4133 Store(arg0, tot0)
4134 Store(Derefof(arg1), Local0)
4135 Store(tot0, Local1)
4136
4137 if (LNotEqual(Local0, arg3)) {
4138 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4139 }
4140 if (LNotEqual(Local1, arg4)) {
4141 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4142 }
4143 }
4144
4145 OUTP("Check IndexField implementation: WordAccByteAcc")
4146
4147 m000(0x0001ffff, Refof(idf0), 0x160, 0x1, 0x00010000)
4148 m000(0x0080ffff, Refof(idf1), 0x162, 0x1, 0x00800000)
4149 m000(0x0001ffff, Refof(idf2), 0x164, 0x1, 0x00010001)
4150 m000(0x0080ffff, Refof(idf3), 0x166, 0x1, 0x00800001)
4151 m000(0x0001ffff, Refof(idf4), 0x168, 0x1, 0x00010002)
4152 m000(0x0080ffff, Refof(idf5), 0x16a, 0x1, 0x00800002)
4153 m000(0x0001ffff, Refof(idf6), 0x16c, 0x1, 0x00010003)
4154 m000(0x0080ffff, Refof(idf7), 0x16e, 0x1, 0x00800003)
4155 }
4156
4157 Method(ife2,, Serialized)
4158 {
4159 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4160 idx0, 16,
4161 dta0, 16,
4162 }
4163 IndexField(idx0, dta0, WordAcc, NoLock, WriteAsZeros) {
4164 idf0, 1, , 6, idf1, 1,
4165 idf2, 1, , 6, idf3, 1,
4166 idf4, 1, , 6, idf5, 1,
4167 idf6, 1, , 6, idf7, 1,
4168 }
4169 Method(m000, 5)
4170 {
4171 Store(arg0, tot0)
4172 Store(Derefof(arg1), Local0)
4173 Store(tot0, Local1)
4174
4175 if (LNotEqual(Local0, arg3)) {
4176 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4177 }
4178 if (LNotEqual(Local1, arg4)) {
4179 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4180 }
4181 }
4182
4183 OUTP("Check IndexField implementation: ByteAccWordAcc")
4184
4185 m000(0x0001ffff, Refof(idf0), 0x170, 0x1, 0x00010000)
4186 m000(0x0080ffff, Refof(idf1), 0x172, 0x1, 0x00800000)
4187 m000(0x0001ffff, Refof(idf2), 0x174, 0x0, 0x00010000)
4188 m000(0x0080ffff, Refof(idf3), 0x176, 0x0, 0x00800000)
4189 m000(0x0001ffff, Refof(idf4), 0x178, 0x1, 0x00010002)
4190 m000(0x0080ffff, Refof(idf5), 0x17a, 0x1, 0x00800002)
4191 m000(0x0001ffff, Refof(idf6), 0x17c, 0x0, 0x00010002)
4192 m000(0x0080ffff, Refof(idf7), 0x17e, 0x0, 0x00800002)
4193 }
4194
4195 Method(ife3,, Serialized)
4196 {
4197 Field(OPR0, WordAcc, NoLock, WriteAsZeros) {
4198 idx0, 16,
4199 dta0, 16,
4200 }
4201 IndexField(idx0, dta0, WordAcc, NoLock, WriteAsZeros) {
4202 idf0, 1, , 6, idf1, 1,
4203 idf2, 1, , 6, idf3, 1,
4204 idf4, 1, , 6, idf5, 1,
4205 idf6, 1, , 6, idf7, 1,
4206 }
4207 Method(m000, 5)
4208 {
4209 Store(arg0, tot0)
4210 Store(Derefof(arg1), Local0)
4211 Store(tot0, Local1)
4212
4213 if (LNotEqual(Local0, arg3)) {
4214 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4215 }
4216 if (LNotEqual(Local1, arg4)) {
4217 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4218 }
4219 }
4220
4221 OUTP("Check IndexField implementation: WordAcc2")
4222
4223 m000(0x0001ffff, Refof(idf0), 0x180, 0x1, 0x00010000)
4224 m000(0x0080ffff, Refof(idf1), 0x182, 0x1, 0x00800000)
4225 m000(0x0001ffff, Refof(idf2), 0x184, 0x0, 0x00010000)
4226 m000(0x0080ffff, Refof(idf3), 0x186, 0x0, 0x00800000)
4227 m000(0x0001ffff, Refof(idf4), 0x188, 0x1, 0x00010002)
4228 m000(0x0080ffff, Refof(idf5), 0x18a, 0x1, 0x00800002)
4229 m000(0x0001ffff, Refof(idf6), 0x18c, 0x0, 0x00010002)
4230 m000(0x0080ffff, Refof(idf7), 0x18e, 0x0, 0x00800002)
4231 }
4232
4233
4234 CH03(ts, z179, 0x0ee, __LINE__, 0)
4235 switch (ToInteger (Arg0)) {
4236 case (0) {
4237 ife0()
4238 ife1()
4239 ife2()
4240 ife3()
4241 }
4242 case (17) { ife0() }
4243 case (18) { ife1() }
4244 case (19) { ife2() }
4245 case (20) { ife3() }
4246 }
4247 CH03(ts, z179, 0x0ef, __LINE__, 0)
4248 }
4249
4250 Method(mx27, 1, Serialized)
4251 {
4252 Name(ts, "mx27")
4253
4254 OperationRegion(OPR0, SystemMemory, VMEM, 256)
4255
4256 Field(OPR0, ByteAcc, NoLock, Preserve) {
4257 tot0, 32,
4258 tot1, 32,
4259 }
4260
4261 Method(ife4,, Serialized)
4262 {
4263 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4264 idx0, 16,
4265 dta0, 4,
4266 }
4267 IndexField(idx0, dta0, ByteAcc, NoLock, WriteAsZeros) {
4268 idf0, 1, , 6, idf1, 1,
4269 idf2, 1, , 6, idf3, 1,
4270 idf4, 1, , 6, idf5, 1,
4271 idf6, 1, , 6, idf7, 1,
4272 }
4273 Method(m000, 5)
4274 {
4275 Store(arg0, tot0)
4276 Store(Derefof(arg1), Local0)
4277 Store(tot0, Local1)
4278
4279 if (LNotEqual(Local0, arg3)) {
4280 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4281 }
4282 if (LNotEqual(Local1, arg4)) {
4283 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4284 }
4285 }
4286
4287 OUTP("Check IndexField implementation: ByteAcc2, dta0:4")
4288
4289 m000(0x0001ffff, Refof(idf0), 0x190, 0x1, 0x00010000)
4290 m000(0xffffffff, Refof(idf1), 0x192, 0x0, 0xffff0000)
4291 m000(0x0001ffff, Refof(idf2), 0x194, 0x1, 0x00010001)
4292 m000(0xffffffff, Refof(idf3), 0x196, 0x0, 0xffff0001)
4293 m000(0x0001ffff, Refof(idf4), 0x198, 0x1, 0x00010002)
4294 m000(0xffffffff, Refof(idf5), 0x19a, 0x0, 0xffff0002)
4295 m000(0x0001ffff, Refof(idf6), 0x19c, 0x1, 0x00010003)
4296 m000(0xffffffff, Refof(idf7), 0x19e, 0x0, 0xffff0003)
4297 }
4298
4299 Method(ife5,, Serialized)
4300 {
4301 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4302 idx0, 8,
4303 dta0, 8,
4304 }
4305 IndexField(idx0, dta0, WordAcc, NoLock, WriteAsZeros) {
4306 idf0, 1, , 6, idf1, 1,
4307 idf2, 1, , 6, idf3, 1,
4308 idf4, 1, , 6, idf5, 1,
4309 idf6, 1, , 6, idf7, 1,
4310 }
4311 Method(m000, 5)
4312 {
4313 Store(arg0, tot0)
4314 Store(Derefof(arg1), Local0)
4315 Store(tot0, Local1)
4316
4317 if (LNotEqual(Local0, arg3)) {
4318 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4319 }
4320 if (LNotEqual(Local1, arg4)) {
4321 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4322 }
4323 }
4324
4325 OUTP("Check IndexField implementation: ByteAccWordAcc, idx0, 8, dta0, 8")
4326
4327 m000(0x000001ff, Refof(idf0), 0x1a0, 0x1, 0x00000100)
4328 m000(0x000080ff, Refof(idf1), 0x1a2, 0x1, 0x00008000)
4329 m000(0xffffffff, Refof(idf2), 0x1a4, 0x0, 0xffffff00)
4330 m000(0xffffffff, Refof(idf3), 0x1a6, 0x0, 0xffffff00)
4331 m000(0x000001ff, Refof(idf4), 0x1a8, 0x1, 0x00000102)
4332 m000(0x000080ff, Refof(idf5), 0x1aa, 0x1, 0x00008002)
4333 m000(0xffffffff, Refof(idf6), 0x1ac, 0x0, 0xffffff02)
4334 m000(0xffffffff, Refof(idf7), 0x1ae, 0x0, 0xffffff02)
4335 }
4336
4337 Method(ife6,, Serialized)
4338 {
4339 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4340 idx0, 32,
4341 dta0, 32,
4342 }
4343 IndexField(idx0, dta0, WordAcc, NoLock, WriteAsZeros) {
4344 idf0, 1, , 6, idf1, 1,
4345 idf2, 1, , 6, idf3, 1,
4346 idf4, 1, , 6, idf5, 1,
4347 idf6, 1, , 6, idf7, 1,
4348 }
4349 Method(m000, 6)
4350 {
4351 Store(0xffffffff, tot0)
4352 Store(arg0, tot1)
4353 Store(Derefof(arg1), Local0)
4354 Store(tot1, Local1)
4355 Store(tot0, Local2)
4356
4357 if (LNotEqual(Local0, arg3)) {
4358 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4359 }
4360 if (LNotEqual(Local1, arg4)) {
4361 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4362 }
4363 if (LNotEqual(Local2, arg5)) {
4364 err(ts, z179, __LINE__, 0, 0, Local2, arg5)
4365 }
4366 }
4367
4368 OUTP("Check IndexField implementation: ByteAccWordAcc, idx0, 32, dta0, 32")
4369
4370 m000(0x00000001, Refof(idf0), 0x1b0, 0x1, 0x00000001, 0)
4371 m000(0x00000080, Refof(idf1), 0x1b3, 0x1, 0x00000080, 0)
4372 m000(0x00000100, Refof(idf2), 0x1b6, 0x1, 0x00000100, 0)
4373 m000(0x00008000, Refof(idf3), 0x1b9, 0x1, 0x00008000, 0)
4374 m000(0x00000001, Refof(idf4), 0x1bc, 0x1, 0x00000001, 2)
4375 m000(0x00000080, Refof(idf5), 0x1bf, 0x1, 0x00000080, 2)
4376 m000(0x00000100, Refof(idf6), 0x1c2, 0x1, 0x00000100, 2)
4377 m000(0x00008000, Refof(idf7), 0x1c5, 0x1, 0x00008000, 2)
4378 }
4379
4380 Method(ife7,, Serialized)
4381 {
4382 Field(OPR0, DWordAcc, NoLock, WriteAsZeros) {
4383 idx0, 32,
4384 dta0, 32,
4385 }
4386 IndexField(idx0, dta0, WordAcc, NoLock, WriteAsZeros) {
4387 idf0, 1, , 6, idf1, 1,
4388 idf2, 1, , 6, idf3, 1,
4389 idf4, 1, , 6, idf5, 1,
4390 idf6, 1, , 6, idf7, 1,
4391 }
4392 Method(m000, 6)
4393 {
4394 Store(0xffffffff, tot0)
4395 Store(arg0, tot1)
4396 Store(Derefof(arg1), Local0)
4397 Store(tot1, Local1)
4398 Store(tot0, Local2)
4399
4400 if (LNotEqual(Local0, arg3)) {
4401 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4402 }
4403 if (LNotEqual(Local1, arg4)) {
4404 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4405 }
4406 if (LNotEqual(Local2, arg5)) {
4407 err(ts, z179, __LINE__, 0, 0, Local2, arg5)
4408 }
4409 }
4410
4411 OUTP("Check IndexField implementation: DWordAccWordAcc, idx0, 32, dta0, 32")
4412
4413 m000(0x00000001, Refof(idf0), 0x1f0, 0x1, 0x00000001, 0)
4414 m000(0x00000080, Refof(idf1), 0x1f3, 0x1, 0x00000080, 0)
4415 m000(0x00000100, Refof(idf2), 0x1f6, 0x1, 0x00000100, 0)
4416 m000(0x00008000, Refof(idf3), 0x1f9, 0x1, 0x00008000, 0)
4417 m000(0x00000001, Refof(idf4), 0x1fc, 0x1, 0x00000001, 2)
4418 m000(0x00000080, Refof(idf5), 0x1ff, 0x1, 0x00000080, 2)
4419 m000(0x00000100, Refof(idf6), 0x202, 0x1, 0x00000100, 2)
4420 m000(0x00008000, Refof(idf7), 0x215, 0x1, 0x00008000, 2)
4421 }
4422
4423 CH03(ts, z179, 0x1c8, __LINE__, 0)
4424 switch (ToInteger (Arg0)) {
4425 case (0) {
4426 ife4()
4427 ife5()
4428 ife6()
4429 ife7()
4430 }
4431 case (21) { ife4() }
4432 case (22) { ife5() }
4433 case (23) { ife6() }
4434 case (24) { ife7() }
4435 }
4436 CH03(ts, z179, 0x1c9, __LINE__, 0)
4437 }
4438
4439 Method(my27, 1, Serialized)
4440 {
4441 Name(ts, "my27")
4442
4443 OperationRegion(OPR0, SystemMemory, VMEM, 256)
4444
4445 Field(OPR0, ByteAcc, NoLock, Preserve) {
4446 tot0, 32,
4447 tot1, 32,
4448 }
4449
4450 Method(ife8,, Serialized)
4451 {
4452 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4453 idx0, 32,
4454 dta0, 32,
4455 }
4456 IndexField(idx0, dta0, DWordAcc, NoLock, WriteAsZeros) {
4457 idf0, 1, , 14, idf1, 1,
4458 idf2, 1, , 14, idf3, 1,
4459 idf4, 1, , 14, idf5, 1,
4460 idf6, 1, , 14, idf7, 1,
4461 }
4462 Method(m000, 6)
4463 {
4464 Store(0xffffffff, tot0)
4465 Store(arg0, tot1)
4466 Store(Derefof(arg1), Local0)
4467 Store(tot1, Local1)
4468 Store(tot0, Local2)
4469
4470 if (LNotEqual(Local0, arg3)) {
4471 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4472 }
4473 if (LNotEqual(Local1, arg4)) {
4474 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4475 }
4476 if (LNotEqual(Local2, arg5)) {
4477 err(ts, z179, __LINE__, 0, 0, Local2, arg5)
4478 }
4479 }
4480
4481 OUTP("Check IndexField implementation: ByteAccDWordAcc, idx0, 32, dta0, 32")
4482
4483 m000(0x00000001, Refof(idf0), 0x200, 0x1, 0x00000001, 0)
4484 m000(0x00008000, Refof(idf1), 0x203, 0x1, 0x00008000, 0)
4485 m000(0x00010000, Refof(idf2), 0x206, 0x1, 0x00010000, 0)
4486 m000(0x80000000, Refof(idf3), 0x209, 0x1, 0x80000000, 0)
4487 m000(0x00000001, Refof(idf4), 0x20c, 0x1, 0x00000001, 4)
4488 m000(0x00008000, Refof(idf5), 0x20f, 0x1, 0x00008000, 4)
4489 m000(0x00010000, Refof(idf6), 0x212, 0x1, 0x00010000, 4)
4490 m000(0x80000000, Refof(idf7), 0x215, 0x1, 0x80000000, 4)
4491 }
4492
4493 Method(ife9,, Serialized)
4494 {
4495 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4496 idx0, 32,
4497 dta0, 32,
4498 }
4499 IndexField(idx0, dta0, QWordAcc, NoLock, WriteAsZeros) {
4500 idf0, 1, , 14, idf1, 1,
4501 idf2, 1, , 14, idf3, 1,
4502 idf4, 1, , 14, idf5, 1,
4503 idf6, 1, , 14, idf7, 1,
4504 }
4505 Method(m000, 6)
4506 {
4507 Store(0xffffffff, tot0)
4508 Store(arg0, tot1)
4509 Store(Derefof(arg1), Local0)
4510 Store(tot1, Local1)
4511 Store(tot0, Local2)
4512
4513 if (LNotEqual(Local0, arg3)) {
4514 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4515 }
4516 if (LNotEqual(Local1, arg4)) {
4517 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4518 }
4519 if (LNotEqual(Local2, arg5)) {
4520 err(ts, z179, __LINE__, 0, 0, Local2, arg5)
4521 }
4522 }
4523
4524 OUTP("Check IndexField implementation: ByteAccQWordAcc, idx0, 32, dta0, 32")
4525
4526 m000(0x00000001, Refof(idf0), 0x220, 0x1, 0x00000001, 0)
4527 m000(0x00008000, Refof(idf1), 0x223, 0x1, 0x00008000, 0)
4528 m000(0x00010000, Refof(idf2), 0x226, 0x1, 0x00010000, 0)
4529 m000(0x80000000, Refof(idf3), 0x229, 0x1, 0x80000000, 0)
4530 m000(0xffffffff, Refof(idf4), 0x22c, 0x0, 0xffffffff, 0)
4531 m000(0xffffffff, Refof(idf5), 0x22f, 0x0, 0xffffffff, 0)
4532 m000(0xffffffff, Refof(idf6), 0x232, 0x0, 0xffffffff, 0)
4533 m000(0xffffffff, Refof(idf7), 0x235, 0x0, 0xffffffff, 0)
4534 }
4535
4536 Method(ifea,, Serialized)
4537 {
4538 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4539 idx0, 16,
4540 dta0, 16,
4541 }
4542 IndexField(idx0, dta0, ByteAcc, NoLock, WriteAsZeros) {
4543 idf0, 1, , 6, idf1, 1,
4544 idf2, 1, , 6, idf3, 1,
4545 idf4, 1, , 6, idf5, 1,
4546 idf6, 1, , 6, idf7, 1,
4547 }
4548 Method(m000, 4, Serialized)
4549 {
4550 Store(arg0, tot0)
4551 switch (ToInteger (Arg1)) {
4552 case (0) {Store(1, idf0)}
4553 case (1) {Store(1, idf1)}
4554 case (2) {Store(1, idf2)}
4555 case (3) {Store(1, idf3)}
4556 case (4) {Store(1, idf4)}
4557 case (5) {Store(1, idf5)}
4558 case (6) {Store(1, idf6)}
4559 case (7) {Store(1, idf7)}
4560 }
4561 Store(tot0, Local0)
4562
4563 if (LNotEqual(Local0, arg3)) {
4564 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4565 }
4566 }
4567
4568 OUTP("Check IndexField implementation: ByteAcc2, Store")
4569
4570 m000(0xffffffff, 0, 0x240, 0x00010000)
4571 m000(0xffffffff, 1, 0x241, 0x00800000)
4572 m000(0xffffffff, 2, 0x242, 0x00010001)
4573 m000(0xffffffff, 3, 0x243, 0x00800001)
4574 m000(0xffffffff, 4, 0x244, 0x00010002)
4575 m000(0xffffffff, 5, 0x245, 0x00800002)
4576 m000(0xffffffff, 6, 0x246, 0x00010003)
4577 m000(0xffffffff, 7, 0x247, 0x00800003)
4578 }
4579
4580 Method(ifeb,, Serialized)
4581 {
4582 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4583 idx0, 16,
4584 dta0, 16,
4585 }
4586 IndexField(idx0, dta0, WordAcc, NoLock, WriteAsZeros) {
4587 idf0, 1, , 6, idf1, 1,
4588 idf2, 1, , 6, idf3, 1,
4589 idf4, 1, , 6, idf5, 1,
4590 idf6, 1, , 6, idf7, 1,
4591 }
4592 Method(m000, 4, Serialized)
4593 {
4594 Store(arg0, tot0)
4595 switch (ToInteger (Arg1)) {
4596 case (0) {Store(1, idf0)}
4597 case (1) {Store(1, idf1)}
4598 case (2) {Store(1, idf2)}
4599 case (3) {Store(1, idf3)}
4600 case (4) {Store(1, idf4)}
4601 case (5) {Store(1, idf5)}
4602 case (6) {Store(1, idf6)}
4603 case (7) {Store(1, idf7)}
4604 }
4605 Store(tot0, Local0)
4606
4607 if (LNotEqual(Local0, arg3)) {
4608 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4609 }
4610 }
4611
4612 OUTP("Check IndexField implementation: ByteAccWordAcc, Store")
4613
4614 m000(0xffffffff, 0, 0x248, 0x00010000)
4615 m000(0xffffffff, 1, 0x249, 0x00800000)
4616 m000(0xffffffff, 2, 0x24a, 0x01000000)
4617 m000(0xffffffff, 3, 0x24b, 0x80000000)
4618 m000(0xffffffff, 4, 0x24c, 0x00010002)
4619 m000(0xffffffff, 5, 0x24d, 0x00800002)
4620 m000(0xffffffff, 6, 0x24e, 0x01000002)
4621 m000(0xffffffff, 7, 0x24f, 0x80000002)
4622 }
4623
4624 CH03(ts, z179, 0x1ca, __LINE__, 0)
4625 switch (ToInteger (Arg0)) {
4626 case (0) {
4627 ife8()
4628
4629 if (ABUU) {
4630 } else {
4631 ife9()
4632 }
4633
4634 if (ABUU) {
4635 } else {
4636 ifea()
4637 }
4638
4639 if (ABUU) {
4640 } else {
4641 ifeb()
4642 }
4643 }
4644 case (25) { ife8() }
4645 case (26) { ife9() }
4646 case (27) { ifea() }
4647 case (28) { ifeb() }
4648 }
4649 CH03(ts, z179, 0x1cb, __LINE__, 0)
4650 }
4651
4652 Method(mz27, 1, Serialized)
4653 {
4654 Name(ts, "mz27")
4655
4656 OperationRegion(OPR0, SystemMemory, VMEM, 256)
4657
4658 Field(OPR0, ByteAcc, NoLock, Preserve) {
4659 tot0, 32,
4660 tot1, 32,
4661 }
4662
4663 Method(ifec,, Serialized)
4664 {
4665 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4666 idx0, 32,
4667 dta0, 32,
4668 }
4669 IndexField(idx0, dta0, DWordAcc, NoLock, WriteAsZeros) {
4670 idf0, 1, , 14, idf1, 1,
4671 idf2, 1, , 14, idf3, 1,
4672 idf4, 1, , 14, idf5, 1,
4673 idf6, 1, , 14, idf7, 1,
4674 }
4675 Method(m000, 5, Serialized)
4676 {
4677 Store(0xffffffff, tot0)
4678 Store(arg0, tot1)
4679 switch (ToInteger (Arg1)) {
4680 case (0) {Store(1, idf0)}
4681 case (1) {Store(1, idf1)}
4682 case (2) {Store(1, idf2)}
4683 case (3) {Store(1, idf3)}
4684 case (4) {Store(1, idf4)}
4685 case (5) {Store(1, idf5)}
4686 case (6) {Store(1, idf6)}
4687 case (7) {Store(1, idf7)}
4688 }
4689 Store(tot1, Local0)
4690 Store(tot0, Local1)
4691
4692 if (LNotEqual(Local0, arg3)) {
4693 err(ts, z179, __LINE__, 0, 0, Local0, arg3)
4694 }
4695 if (LNotEqual(Local1, arg4)) {
4696 err(ts, z179, __LINE__, 0, 0, Local1, arg4)
4697 }
4698 }
4699
4700 OUTP("Check IndexField implementation: ByteAccDWordAcc, Store")
4701
4702 m000(0xffffffff, 0, 0x250, 0x00000001, 0)
4703 m000(0xffffffff, 1, 0x252, 0x00008000, 0)
4704 m000(0xffffffff, 2, 0x254, 0x00010000, 0)
4705 m000(0xffffffff, 3, 0x256, 0x80000000, 0)
4706 m000(0xffffffff, 4, 0x258, 0x00000001, 4)
4707 m000(0xffffffff, 5, 0x25a, 0x00008000, 4)
4708 m000(0xffffffff, 6, 0x25c, 0x00010000, 4)
4709 m000(0xffffffff, 7, 0x25e, 0x80000000, 4)
4710 }
4711
4712 Method(ifed,, Serialized)
4713 {
4714 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4715 idx0, 8,
4716 dta0, 24,
4717 }
4718 IndexField(idx0, dta0, ByteAcc, NoLock, WriteAsZeros) {
4719 , 15,
4720 idf0, 1
4721 }
4722
4723 OUTP("Check IndexField implementation: dta wider than idf Access width")
4724
4725 Store(0x3FF, idf0)
4726
4727 Store(tot0, Local0)
4728 if (LNotEqual(Local0, 0x8001)) {
4729 err(ts, z179, __LINE__, 0, 0, Local0, 0x8001)
4730 }
4731 }
4732
4733 Method(ifee,, Serialized)
4734 {
4735 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4736 idx0, 8,
4737 dta0, 24,
4738 }
4739 IndexField(idx0, dta0, ByteAcc, NoLock, WriteAsZeros) {
4740 , 7,
4741 idf0, 1
4742 }
4743
4744 OUTP("Check IndexField implementation: dta wider than idf Access width 2")
4745
4746 Store(0xFF, idf0)
4747
4748 Store(tot0, Local0)
4749 if (LNotEqual(Local0, 0x8000)) {
4750 err(ts, z179, __LINE__, 0, 0, Local0, 0x8000)
4751 }
4752 }
4753
4754 Method(ifef,, Serialized)
4755 {
4756 Field(OPR0, ByteAcc, NoLock, WriteAsZeros) {
4757 idx1, 8,
4758 dta1, 8,
4759 }
4760
4761 IndexField(idx1, dta1, ByteAcc, NoLock, WriteAsZeros) {
4762 , 2,
4763 re10, 6,
4764 , 3,
4765 re11, 5,
4766 , 4,
4767 re12, 4,
4768 , 5,
4769 re13, 3,
4770 }
4771
4772 Method(TRY0, 3, Serialized)
4773 {
4774 Store(Zero, tot0)
4775 switch (ToInteger (Arg0)) {
4776 Case (0) {Store(Ones, ^re10)}
4777 Case (1) {Store(Ones, ^re11)}
4778 Case (2) {Store(Ones, ^re12)}
4779 Case (3) {Store(Ones, ^re13)}
4780 }
4781
4782 Store(idx1, Local0)
4783 Store(dta1, Local1)
4784
4785 Multiply(arg0, 2, Local2)
4786 if (LNotEqual(Local0, arg1)) {
4787 err(ts, z179, __LINE__, 0, 0, Local0, arg1)
4788 }
4789 if (LNotEqual(Local1, arg2)) {
4790 err(ts, z179, __LINE__, 0, 0, Local1, arg2)
4791 }
4792 }
4793
4794 OUTP("Check IndexField ByteAcc Ones write (:2)6-(:3)5-(:4)4-(:5)3")
4795
4796 TRY0(0, 0, 0xfc)
4797 TRY0(1, 1, 0xf8)
4798 TRY0(2, 2, 0xf0)
4799 TRY0(3, 3, 0xe0)
4800 }
4801
4802 CH03(ts, z179, 0x1cc, __LINE__, 0)
4803 switch (ToInteger (Arg0)) {
4804 case (0) {
4805 ifec()
4806 ifed()
4807 ifee()
4808 ifef()
4809 }
4810 case (29) { ifec() }
4811 case (30) { ifed() }
4812 case (31) { ifee() }
4813 case (32) { ifef() }
4814 }
4815 CH03(ts, z179, 0x1cd, __LINE__, 0)
4816 }
4817
4818 /* Methods to run manually (for ABBU only) */
4819 Method(aifd) { IIN0() ms27(1) Return(POUT) }
4820 Method(bifd) { IIN0() ms27(2) Return(POUT) }
4821 Method(cifd) { IIN0() ms27(3) Return(POUT) }
4822 Method(difd) { IIN0() ms27(4) Return(POUT) }
4823 Method(sifd) { IIN0() ms27(0) Return(POUT) }
4824 Method(eifd) { IIN0() mt27(5) Return(POUT) }
4825 Method(fifd) { IIN0() mt27(6) Return(POUT) }
4826 Method(gifd) { IIN0() mt27(7) Return(POUT) }
4827 Method(hifd) { IIN0() mt27(8) Return(POUT) }
4828 Method(tifd) { IIN0() mt27(0) Return(POUT) }
4829 Method(iifd) { IIN0() mu27(9) Return(POUT) }
4830 Method(jifd) { IIN0() mu27(10) Return(POUT) }
4831 Method(kifd) { IIN0() mu27(11) Return(POUT) }
4832 Method(lifd) { IIN0() mu27(12) Return(POUT) }
4833 Method(uifd) { IIN0() mu27(0) Return(POUT) }
4834 Method(mifd) { IIN0() mv27(13) Return(POUT) }
4835 Method(nifd) { IIN0() mv27(14) Return(POUT) }
4836 Method(oifd) { IIN0() mv27(15) Return(POUT) }
4837 Method(pifd) { IIN0() mv27(16) Return(POUT) }
4838 Method(vifd) { IIN0() mv27(0) Return(POUT) }
4839 Method(aife) { IIN0() mw27(17) Return(POUT) }
4840 Method(bife) { IIN0() mw27(18) Return(POUT) }
4841 Method(cife) { IIN0() mw27(19) Return(POUT) }
4842 Method(dife) { IIN0() mw27(20) Return(POUT) }
4843 Method(wife) { IIN0() mw27(0) Return(POUT) }
4844 Method(eife) { IIN0() mx27(21) Return(POUT) }
4845 Method(fife) { IIN0() mx27(22) Return(POUT) }
4846 Method(gife) { IIN0() mx27(23) Return(POUT) }
4847 Method(hife) { IIN0() mx27(24) Return(POUT) }
4848 Method(xife) { IIN0() mx27(0) Return(POUT) }
4849 Method(iife) { IIN0() my27(25) Return(POUT) }
4850 Method(jife) { IIN0() my27(26) Return(POUT) }
4851 Method(kife) { IIN0() my27(27) Return(POUT) }
4852 Method(life) { IIN0() my27(28) Return(POUT) }
4853 Method(yife) { IIN0() my27(0) Return(POUT) }
4854 Method(mife) { IIN0() mz27(29) Return(POUT) }
4855 Method(nife) { IIN0() mz27(30) Return(POUT) }
4856 Method(oife) { IIN0() mz27(31) Return(POUT) }
4857 Method(pife) { IIN0() mz27(32) Return(POUT) }
4858 Method(zife) { IIN0() mz27(0) Return(POUT) }
4859
4860 /*
4861 * Hot issue:
4862 *
4863 * Check BankField implementation
4864 */
4865 Method(ms28,, Serialized)
4866 {
4867 Name(ts, "ms28")
4868
4869 OperationRegion(OPR0, SystemMemory, 0, 256)
4870
4871 Field(OPR0, ByteAcc, NoLock, Preserve) {
4872 tot0, 32,
4873 tot1, 32,
4874 }
4875
4876 Method(bfd0,, Serialized)
4877 {
4878 Field (OPR0, ByteAcc, NoLock, Preserve) {
4879 bnk0, 8
4880 }
4881 Field (OPR0, ByteAcc, NoLock, Preserve) {
4882 tot0, 80
4883 }
4884
4885 BankField (OPR0, bnk0, 0, ByteAcc, NoLock, Preserve) {
4886 Offset(8),
4887 bf00, 8,
4888 }
4889
4890 BankField (OPR0, bnk0, 1, ByteAcc, NoLock, Preserve) {
4891 Offset(9),
4892 bf01, 8,
4893 }
4894
4895 OUTP("Check BankField implementation")
4896
4897 // Deal with 0-th bank layout:
4898
4899 Store(0, bnk0)
4900 if (LNotEqual(bnk0, 0)) {
4901 err(ts, z179, __LINE__, 0, 0, bnk0, 0)
4902 }
4903
4904 Store(0x87, bf00)
4905 if (LNotEqual(bnk0, 0)) {
4906 err(ts, z179, __LINE__, 0, 0, bnk0, 0)
4907 }
4908
4909 if (LNotEqual(bf00, 0x87)) {
4910 err(ts, z179, __LINE__, 0, 0, bf00, 0x87)
4911 }
4912
4913 // Deal with 1-th bank layout:
4914
4915 Store(1, bnk0)
4916 if (LNotEqual(bnk0, 1)) {
4917 err(ts, z179, __LINE__, 0, 0, bnk0, 1)
4918 }
4919
4920 Store(0x96, bf01)
4921
4922 if (LNotEqual(bnk0, 1)) {
4923 err(ts, z179, __LINE__, 0, 0, bnk0, 1)
4924 }
4925
4926 if (LNotEqual(bf01, 0x96)) {
4927 err(ts, z179, __LINE__, 0, 0, bf01, 0x96)
4928 }
4929 }
4930
4931 CH03(ts, z179, 0x276, __LINE__, 0)
4932 bfd0()
4933 CH03(ts, z179, 0x277, __LINE__, 0)
4934 }
4935
4936 /* Methods to run manually (for ABBU only) */
4937 Method(abfd) { IIN0() ms28() Return(POUT) }
4938
4939 Mutex (C152, 0)
4940 Mutex (C153, 0)
4941 Mutex (C154, 0)
4942 Mutex (C155, 0)
4943 Mutex (C156, 0)
4944 Mutex (C159, 0)
4945
4946 /*
4947 * Hot issue:
4948 *
4949 * Check Acquire/Release
4950 */
4951 Method(ms29, 1, Serialized)
4952 {
4953 Name(ts, "ms29")
4954
4955 Method (C157, 1, NotSerialized)
4956 {
4957 if (arg0) {
4958 Store(Acquire (C154, 0xFFFF), Local0)
4959 } else {
4960 Store(Acquire (C154, 0), Local0)
4961 }
4962 Return (Local0)
4963 }
4964
4965 Method (C158, 0, NotSerialized)
4966 {
4967 Release (C154)
4968 }
4969
4970 Method (C160, 0, NotSerialized)
4971 {
4972 Release (C152)
4973 }
4974
4975 Method(mut0)
4976 {
4977 OUTP("Check Release by different ASL Methods")
4978 C160()
4979 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
4980 }
4981
4982 Method(mut1)
4983 {
4984 OUTP("Check Acquire/Release by different ASL Methods")
4985
4986 OUTP("Acquire")
4987 Store(C157(1), Local0)
4988
4989 if (LNotEqual(Local0, 0)) {
4990 err(ts, z179, __LINE__, 0, 0, Local0, 0)
4991 }
4992
4993 OUTP("Release")
4994 C158()
4995 }
4996
4997 Method(mut2)
4998 {
4999 OUTP("Check Acquire/Acquire by the different Method's calls")
5000
5001 OUTP("Acquire 1")
5002 Store(C157(1), Local0)
5003
5004 if (LNotEqual(Local0, 0)) {
5005 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5006 }
5007
5008 OUTP("Acquire 2")
5009 Store(C157(1), Local0)
5010
5011 if (LNotEqual(Local0, 0)) {
5012 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5013 }
5014 }
5015
5016 Method(mut3)
5017 {
5018 OUTP("Check Acquire/Acquire in one Method")
5019
5020 OUTP("Acquire 1")
5021 Store(Acquire (C155, 0xFFFF), Local0)
5022
5023 if (LNotEqual(Local0, 0)) {
5024 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5025 }
5026
5027 OUTP("Acquire 2")
5028 Store(Acquire (C155, 0xFFFF), Local0)
5029
5030
5031 if (LNotEqual(Local0, 0)) {
5032 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5033 }
5034 }
5035
5036 Method(mut4)
5037 {
5038 OUTP("Check Acquire/Release/Release by different ASL Methods")
5039
5040 OUTP("Acquire")
5041 Store(C157(1), Local0)
5042
5043 if (LNotEqual(Local0, 0)) {
5044 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5045 }
5046
5047 OUTP("Release 1")
5048 C158()
5049
5050 OUTP("Release 2")
5051 C158()
5052
5053 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
5054 }
5055
5056 Method(mut5)
5057 {
5058 OUTP("Check Acquire(,0xFFFF)/Acquire(,0) in one Method")
5059
5060 OUTP("Acquire( , 0xFFFF) 1")
5061 Store(Acquire (C156, 0xFFFF), Local0)
5062
5063 if (LNotEqual(Local0, 0)) {
5064 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5065 }
5066
5067 OUTP("Acquire( , 0) 2")
5068 Store(Acquire (C156, 0), Local0)
5069
5070 if (LNotEqual(Local0, 0)) {
5071 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5072 }
5073 }
5074
5075 Method(mut6)
5076 {
5077 OUTP("Check Acquire2/Release2 in one Method")
5078
5079 OUTP("Acquire 1")
5080 Store(Acquire (C153, 0xFFFF), Local0)
5081
5082 if (LNotEqual(Local0, 0)) {
5083 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5084 }
5085
5086 OUTP("Acquire 2")
5087 Store(Acquire (C153, 0xFFFF), Local0)
5088
5089
5090 if (LNotEqual(Local0, 0)) {
5091 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5092 }
5093
5094 OUTP("Release 1")
5095 Release (C153)
5096
5097 OUTP("Release 2")
5098 Release (C153)
5099 }
5100
5101 Method(mut7)
5102 {
5103 OUTP("Check Acquire2/Release3 in one Method")
5104
5105 OUTP("Acquire 1")
5106 Store(Acquire (C159, 0xFFFF), Local0)
5107
5108 if (LNotEqual(Local0, 0)) {
5109 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5110 }
5111
5112 OUTP("Acquire 2")
5113 Store(Acquire (C159, 0xFFFF), Local0)
5114
5115
5116 if (LNotEqual(Local0, 0)) {
5117 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5118 }
5119
5120 OUTP("Release 1")
5121 Release (C159)
5122
5123 OUTP("Release 2")
5124 Release (C159)
5125
5126 OUTP("Release 3")
5127 Release (C159)
5128 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
5129 }
5130
5131 Method(mut8)
5132 {
5133 OUTP("Check Acquire2/Release2 in one Method")
5134
5135 OUTP("Acquire 1")
5136 Store(Acquire (C153, 0xFFFF), Local0)
5137
5138 if (LNotEqual(Local0, 0)) {
5139 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5140 }
5141
5142 OUTP("Acquire 2")
5143 Store(Acquire (C153, 0xFFFF), Local0)
5144
5145
5146 if (LNotEqual(Local0, 0)) {
5147 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5148 }
5149
5150 OUTP("Release 1")
5151 Release (C153)
5152
5153 OUTP("Release 2")
5154 Release (C153)
5155 }
5156
5157 Method(mut9,, Serialized)
5158 {
5159 Mutex (C159, 0)
5160
5161 OUTP("Check Acquire2/Release2 in one Method for dynamic Mutex")
5162
5163 OUTP("Acquire 1")
5164 Store(Acquire (C159, 0xFFFF), Local0)
5165
5166 if (LNotEqual(Local0, 0)) {
5167 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5168 }
5169
5170 OUTP("Acquire 2")
5171 Store(Acquire (C159, 0xFFFF), Local0)
5172
5173
5174 if (LNotEqual(Local0, 0)) {
5175 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5176 }
5177
5178 OUTP("Release 1")
5179 Release (C159)
5180
5181 OUTP("Release 2")
5182 Release (C159)
5183
5184 OUTP("Release 3")
5185 Release (C159)
5186 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
5187 }
5188
5189 Method(m000)
5190 {
5191 if (ABUU) {
5192 } else {
5193 mut0()
5194 }
5195
5196 mut1()
5197
5198 if (ABUU) {
5199 } else {
5200 mut3()
5201 }
5202
5203 if (ABUU) {
5204 } else {
5205 mut4()
5206 }
5207
5208 mut5()
5209 mut6()
5210
5211 if (ABUU) {
5212 } else {
5213 mut7()
5214 }
5215
5216 mut8()
5217
5218 if (ABUU) {
5219 } else {
5220 mut9()
5221 }
5222 }
5223
5224 CH03(ts, z179, 0x292, __LINE__, 0)
5225 switch (ToInteger (Arg0)) {
5226 case (0) { m000() }
5227 case (1) { mut0() }
5228 case (2) { mut1() }
5229 case (3) { mut2() }
5230 case (4) { mut3() }
5231 case (5) { mut4() }
5232 case (6) { mut5() }
5233 case (7) { mut6() }
5234 case (8) { mut7() }
5235 case (9) { mut8() }
5236 case (10) { mut9() }
5237 }
5238 CH03(ts, z179, 0x293, __LINE__, 0)
5239 }
5240
5241 /* Methods to run manually (for ABBU only) */
5242 Method(amut) { IIN0() ms29(1) Return(POUT) }
5243 Method(bmut) { IIN0() ms29(2) Return(POUT) }
5244 Method(cmut) { IIN0() ms29(3) Return(POUT) }
5245 Method(dmut) { IIN0() ms29(4) Return(POUT) }
5246 Method(emut) { IIN0() ms29(5) Return(POUT) }
5247 Method(fmut) { IIN0() ms29(6) Return(POUT) }
5248 Method(gmut) { IIN0() ms29(7) Return(POUT) }
5249 Method(hmut) { IIN0() ms29(8) Return(POUT) }
5250 Method(imut) { IIN0() ms29(9) Return(POUT) }
5251 Method(jmut) { IIN0() ms29(10) Return(POUT) }
5252 Method(kmut) { IIN0() ms29(0) Return(POUT) }
5253
5254 // LEqual implementation for Buffers to use on MS
5255 Method(BCMP, 2)
5256 {
5257 if (ABUU) {
5258 Store(Sizeof(Arg0), Local0)
5259
5260 if (LNotEqual(Local0, Sizeof(Arg1))) {
5261 return (0)
5262 }
5263
5264 Store(Sizeof(Arg0), Local0)
5265
5266 while(Local0) {
5267 Decrement(Local0)
5268 Store(Derefof(Index(Arg0, Local0)), Local1)
5269 Store(Derefof(Index(Arg1, Local0)), Local2)
5270 if (LNotEqual(Local1, Local2)) {
5271 return (0)
5272 }
5273 }
5274 return (1)
5275 } else {
5276 return (LEqual(arg0, arg1))
5277 }
5278 }
5279
5280 /*
5281 * Hot issue:
5282 *
5283 * Check ToBuffer optional store (Bug 194)
5284 */
5285 Method(ms2a, 1, Serialized)
5286 {
5287 Name(ts, "ms2a")
5288 Name(F64, 0)
5289
5290 Method(tob0)
5291 {
5292
5293 Method(m000, 1, Serialized)
5294 {
5295 Name(b000, Buffer(1){0x3c})
5296 Name(b001, Buffer(3){0x01, 0x02, 0x03})
5297
5298 if (arg0) {
5299 OUTP("ToBuffer(b001, b000)")
5300 ToBuffer(b001, b000)
5301 } else {
5302 OUTP("ToBuffer(b000, b001)")
5303 ToBuffer(b000, b001)
5304 }
5305
5306 if (LNot(BCMP(b000, b001))) {
5307 err(ts, z179, __LINE__, 0, 0, b000, b001)
5308 }
5309 }
5310
5311 OUTP("Check ToBuffer optional store behaves like CopyObject")
5312
5313 m000(0)
5314 m000(1)
5315 }
5316
5317 Method(tob1)
5318 {
5319 OUTP("Check ToBuffer(0x456789ab)")
5320 Store(ToBuffer(0x456789ab), Local0)
5321 if (F64) {
5322 Store(Buffer(8){0xab, 0x89, 0x67, 0x45}, Local1)
5323 } else {
5324 Store(Buffer(4){0xab, 0x89, 0x67, 0x45}, Local1)
5325 }
5326 if (LNot(BCMP(Local1, Local0))) {
5327 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
5328 }
5329 }
5330
5331 Method(tob2)
5332 {
5333 OUTP("Check ToBuffer(\"456789ab\")")
5334 Store(ToBuffer("456789ab"), Local0)
5335 Store(Buffer(){"456789ab"}, Local1)
5336 if (LNot(BCMP(Local1, Local0))) {
5337 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
5338 }
5339 }
5340
5341 Method(tob3)
5342 {
5343 OUTP("Check ToBuffer(Buffer(4){0x45, 0x67, 0x89, 0xab})")
5344 Store(ToBuffer(Buffer(4){0x45, 0x67, 0x89, 0xab}), Local0)
5345 Store(Buffer(4){0x45, 0x67, 0x89, 0xab}, Local1)
5346 if (LNot(BCMP(Local1, Local0))) {
5347 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
5348 }
5349 }
5350
5351 Method(tob4)
5352 {
5353 OUTP("Check ToBuffer(0x456789ab, Local0)")
5354 ToBuffer(0x456789ab, Local0)
5355 if (F64) {
5356 Store(Buffer(8){0xab, 0x89, 0x67, 0x45}, Local1)
5357 } else {
5358 Store(Buffer(4){0xab, 0x89, 0x67, 0x45}, Local1)
5359 }
5360 if (LNot(BCMP(Local1, Local0))) {
5361 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
5362 }
5363 }
5364
5365 Method(tob5)
5366 {
5367 OUTP("Check ToBuffer(\"456789ab\", Local0)")
5368 ToBuffer("456789ab", Local0)
5369 Store(Buffer(){"456789ab"}, Local1)
5370 if (LNot(BCMP(Local1, Local0))) {
5371 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
5372 }
5373 }
5374
5375 Method(tob6)
5376 {
5377 OUTP("Check ToBuffer(Buffer(4){0x45, 0x67, 0x89, 0xab}, Local0)")
5378 ToBuffer(Buffer(4){0x45, 0x67, 0x89, 0xab}, Local0)
5379 Store(Buffer(4){0x45, 0x67, 0x89, 0xab}, Local1)
5380 if (LNot(BCMP(Local1, Local0))) {
5381 err(ts, z179, __LINE__, 0, 0, Local0, Local1)
5382 }
5383 }
5384
5385 Method(tob7,, Serialized)
5386 {
5387 Name(i000, 0)
5388
5389 OUTP("Check ToBuffer(0x456789ab, i000)")
5390 ToBuffer(0x456789ab, i000)
5391 if (F64) {
5392 Store(Buffer(8){0xab, 0x89, 0x67, 0x45}, Local1)
5393 } else {
5394 Store(Buffer(4){0xab, 0x89, 0x67, 0x45}, Local1)
5395 }
5396 Store(ObjectType(i000), Local2)
5397 if (LNotEqual(Local2, 3)) {
5398 err(ts, z179, __LINE__, 0, 0, Local2, 3)
5399 } elseif (LNot(BCMP(Local1, i000))) {
5400 err(ts, z179, __LINE__, 0, 0, i000, Local1)
5401 }
5402 }
5403
5404 Method(tob8,, Serialized)
5405 {
5406 Name(s000, "s000")
5407
5408 OUTP("Check ToBuffer(\"456789ab\", s000)")
5409 ToBuffer("456789ab", s000)
5410 Store(Buffer(){"456789ab"}, Local1)
5411 Store(ObjectType(s000), Local2)
5412 if (LNotEqual(Local2, 3)) {
5413 err(ts, z179, __LINE__, 0, 0, Local2, 3)
5414 } elseif (LNot(BCMP(Local1, s000))) {
5415 err(ts, z179, __LINE__, 0, 0, s000, Local1)
5416 }
5417 }
5418
5419 Method(tob9,, Serialized)
5420 {
5421 Name(b000, Buffer(2){})
5422
5423 OUTP("Check ToBuffer(Buffer(4){0x45, 0x67, 0x89, 0xab}, b000)")
5424 ToBuffer(Buffer(4){0x45, 0x67, 0x89, 0xab}, b000)
5425 Store(Buffer(4){0x45, 0x67, 0x89, 0xab}, Local1)
5426 Store(ObjectType(b000), Local2)
5427 if (LNotEqual(Local2, 3)) {
5428 err(ts, z179, __LINE__, 0, 0, Local2, 3)
5429 } elseif (LNot(BCMP(Local1, b000))) {
5430 err(ts, z179, __LINE__, 0, 0, b000, Local1)
5431 }
5432 }
5433
5434 Method(toba)
5435 {
5436
5437 Method(m000, 1, Serialized)
5438 {
5439 Name(b000, Buffer(1){0x3c})
5440 Name(b001, Buffer(3){0x01, 0x02, 0x03})
5441
5442 if (arg0) {
5443 OUTP("Store(b001, b000)")
5444 Store(b001, b000)
5445
5446 Store(Buffer(1){0x01}, Local0)
5447 if (LNot(BCMP(b000, Local0))) {
5448 err(ts, z179, __LINE__, 0, 0, b000, Local0)
5449 }
5450 } else {
5451 OUTP("Store(b000, b001)")
5452 Store(b000, b001)
5453
5454 Store(Buffer(3){0x3c}, Local0)
5455 if (LNot(BCMP(b001, Local0))) {
5456 err(ts, z179, __LINE__, 0, 0, b001, Local0)
5457 }
5458 }
5459 }
5460
5461 OUTP("Check if Store fails the same way as ToBuffer optional store")
5462
5463 m000(0)
5464 m000(1)
5465 }
5466
5467 Method(m000)
5468 {
5469 if (ABUU) {
5470 } else {
5471 tob0()
5472 tob1()
5473 tob2()
5474 tob3()
5475 tob4()
5476 tob5()
5477 tob6()
5478 tob7()
5479 tob8()
5480 tob9()
5481 }
5482
5483 toba()
5484 }
5485
5486 if (ABUU) {
5487 } elseif (LEqual(SizeOf(F64), 8)) {
5488 Store (1, F64)
5489 }
5490
5491 CH03(ts, z179, 0x2a4, __LINE__, 0)
5492 switch (ToInteger (Arg0)) {
5493 case (0) { m000() }
5494 case (1) { tob0() }
5495 case (2) { tob1() }
5496 case (3) { tob2() }
5497 case (4) { tob3() }
5498 case (5) { tob4() }
5499 case (6) { tob5() }
5500 case (7) { tob6() }
5501 case (8) { tob7() }
5502 case (9) { tob8() }
5503 case (10) { tob9() }
5504 case (11) { toba() }
5505 }
5506 CH03(ts, z179, 0x2a5, __LINE__, 0)
5507 }
5508
5509 /* Methods to run manually (for ABBU only) */
5510 Method(atob) { IIN0() ms2a(1) Return(POUT) }
5511 Method(btob) { IIN0() ms2a(2) Return(POUT) }
5512 Method(ctob) { IIN0() ms2a(3) Return(POUT) }
5513 Method(dtob) { IIN0() ms2a(4) Return(POUT) }
5514 Method(etob) { IIN0() ms2a(5) Return(POUT) }
5515 Method(ftob) { IIN0() ms2a(6) Return(POUT) }
5516 Method(gtob) { IIN0() ms2a(7) Return(POUT) }
5517 Method(htob) { IIN0() ms2a(8) Return(POUT) }
5518 Method(itob) { IIN0() ms2a(9) Return(POUT) }
5519 Method(jtob) { IIN0() ms2a(10) Return(POUT) }
5520 Method(ktob) { IIN0() ms2a(11) Return(POUT) }
5521
5522 /*
5523 * Hot issue:
5524 *
5525 * Check Package size calculation
5526 */
5527 Method(ms2b, 1, Serialized)
5528 {
5529 Name(ts, "ms2b")
5530
5531 Method(pac0,, Serialized)
5532 {
5533 Name(p000, Package(5){1, 2, 3})
5534
5535 OUTP("Check if Package list < explicit size the last is in use")
5536
5537 Store(SizeOf(p000), Local0)
5538 if (LNotEqual(Local0, 5)) {
5539 err(ts, z179, __LINE__, 0, 0, Local0, 5)
5540 }
5541 }
5542
5543 Method(pac1,, Serialized)
5544 {
5545 Name(p000, Package(5){1, 2, 3})
5546
5547 OUTP("Check if Package list < explicit size there are undef elements")
5548
5549 Store(ObjectType(Index(p000, 2)), Local0)
5550 if (Local0) {
5551 } else {
5552 err(ts, z179, __LINE__, 0, 0, Local0, 1)
5553 }
5554
5555 Store(ObjectType(Index(p000, 3)), Local0)
5556 if (Local0) {
5557 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5558 }
5559 }
5560
5561 // This test actually should be used with Package(3){1, 2, 3, 4, 5})
5562 // declaration, but iASL reports "Initializer list too long" error.
5563 // Uncomment, set 'fopt' below to 1 and use it with -f iASL option
5564 Method(pac2,, Serialized)
5565 {
5566 Name(fopt, 0)
5567 // Name(p000, Package(3){1, 2, 3, 4, 5})
5568 Name(p000, Package(3){1, 2, 3})
5569
5570 OUTP("Check if Package list > explicit size the former is in use")
5571
5572 if (fopt) {
5573 Store(SizeOf(p000), Local0)
5574 } else {
5575 Store(5, Local0)
5576 }
5577 if (LNotEqual(Local0, 5)) {
5578 err(ts, z179, __LINE__, 0, 0, Local0, 5)
5579 }
5580 }
5581
5582 CH03(ts, z179, 0x2ab, __LINE__, 0)
5583 switch (ToInteger (Arg0)) {
5584 case (0) { pac0() pac1() pac2() }
5585 case (1) { pac0() }
5586 case (2) { pac1() }
5587 case (3) { pac2() }
5588 }
5589 CH03(ts, z179, 0x2ac, __LINE__, 0)
5590 }
5591
5592 /* Methods to run manually (for ABBU only) */
5593 Method(apac) { IIN0() ms2b(1) Return(POUT) }
5594 Method(bpac) { IIN0() ms2b(2) Return(POUT) }
5595 Method(cpac) { IIN0() ms2b(3) Return(POUT) }
5596
5597 /*
5598 * Hot issue:
5599 *
5600 * Check Switch implementation
5601 *
5602 * isw0 test should expectedly fail
5603 */
5604 Method(ms2c, 1, Serialized)
5605 {
5606 Name(ts, "ms2c")
5607
5608 Method(sw00, 0, Serialized)
5609 {
5610 Method(m000, 1, Serialized)
5611 {
5612 Store(0, Local1)
5613
5614 switch (ToInteger (Arg0)) {
5615 case (1) { Store(1, Local1) }
5616 case (2) { Store(2, Local1) }
5617 }
5618
5619 return (Local1)
5620 }
5621
5622 OUTP("Check Switch implementation 0: standalone")
5623
5624 Store(2, Local0)
5625 Store(0, Local1)
5626
5627 switch (ToInteger (Local0)) {
5628 case (1) { Store(1, Local1) }
5629 case (2) { Store(2, Local1) }
5630 }
5631
5632 if (LNotEqual(Local1, 2)) {
5633 err(ts, z179, __LINE__, 0, 0, Local1, 2)
5634 }
5635
5636 Store(m000(1), Local1)
5637
5638 if (LNotEqual(Local1, 1)) {
5639 err(ts, z179, __LINE__, 0, 0, Local1, 1)
5640 }
5641 }
5642
5643 Method(sw01)
5644 {
5645 OUTP("Check While implementation 1: standalone")
5646
5647 Store(2, Local0)
5648 Store(0, Local1)
5649
5650 while (Local0) {
5651 if (LEqual(Local0, 1)) {
5652 Increment(Local1)
5653 } else {
5654 Increment(Local1)
5655 }
5656 Decrement(Local0)
5657 }
5658 if (LNotEqual(Local1, 2)) {
5659 err(ts, z179, __LINE__, 0, 0, Local1, 2)
5660 }
5661 }
5662
5663 Method(sw02, 0, Serialized)
5664 {
5665 OUTP("Check Switch implementation 2: inside While (1 step)")
5666
5667 Store(1, Local0)
5668 Store(0, Local1)
5669 Store(0, Local2)
5670
5671 while (Local0) {
5672 switch (ToInteger (Local0)) {
5673 case (1) { Increment(Local1) }
5674 case (2) { Increment(Local2) }
5675 }
5676 Decrement(Local0)
5677 }
5678 if (LNotEqual(Local1, 1)) {
5679 err(ts, z179, __LINE__, 0, 0, Local1, 1)
5680 }
5681 if (LNotEqual(Local2, 0)) {
5682 err(ts, z179, __LINE__, 0, 0, Local2, 0)
5683 }
5684 }
5685
5686 Method(sw03, 0, Serialized)
5687 {
5688 OUTP("Check Switch implementation 3: inside While (2 steps)")
5689
5690 Store(2, Local0)
5691 Store(0, Local1)
5692 Store(0, Local2)
5693
5694 while (Local0) {
5695 switch (ToInteger (Local0)) {
5696 case (1) { Increment(Local1) }
5697 case (2) { Increment(Local2) }
5698 }
5699 Decrement(Local0)
5700 }
5701 if (LNotEqual(Local1, 1)) {
5702 err(ts, z179, __LINE__, 0, 0, Local1, 1)
5703 }
5704 if (LNotEqual(Local2, 1)) {
5705 err(ts, z179, __LINE__, 0, 0, Local2, 1)
5706 }
5707 }
5708
5709 Method(sw04, 0, Serialized)
5710 {
5711 OUTP("Check Switch implementation 4: inside While 2, 2 Breaks")
5712
5713 Store(2, Local0)
5714 Store(0, Local1)
5715 Store(0, Local2)
5716
5717 while (Local0) {
5718 switch (ToInteger (Local0)) {
5719 case (1) {
5720 Increment(Local1)
5721 Break
5722 }
5723 case (2) {
5724 Increment(Local2)
5725 Break
5726 }
5727 }
5728 Decrement(Local0)
5729 }
5730 if (LNotEqual(Local0, 0)) {
5731 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5732 }
5733 if (LNotEqual(Local1, 1)) {
5734 err(ts, z179, __LINE__, 0, 0, Local1, 1)
5735 }
5736 if (LNotEqual(Local2, 1)) {
5737 err(ts, z179, __LINE__, 0, 0, Local2, 1)
5738 }
5739 }
5740
5741 Method(sw05, 0, Serialized)
5742 {
5743 OUTP("Check Switch implementation 5: inside While 1, 2 Breaks")
5744
5745 Store(1, Local0)
5746 Store(0, Local1)
5747 Store(0, Local2)
5748
5749 while (Local0) {
5750 switch (ToInteger (Local0)) {
5751 case (1) {
5752 Increment(Local1)
5753 Break
5754 }
5755 case (2) {
5756 Increment(Local2)
5757 Break
5758 }
5759 }
5760 Decrement(Local0)
5761 }
5762 if (LNotEqual(Local0, 0)) {
5763 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5764 }
5765 if (LNotEqual(Local1, 1)) {
5766 err(ts, z179, __LINE__, 0, 0, Local1, 1)
5767 }
5768 if (LNotEqual(Local2, 0)) {
5769 err(ts, z179, __LINE__, 0, 0, Local2, 0)
5770 }
5771 }
5772
5773
5774 Method(sw06, 0, Serialized)
5775 {
5776 OUTP("Check Switch implementation 6: inside While 2, 1 Break")
5777
5778 Store(2, Local0)
5779 Store(0, Local1)
5780 Store(0, Local2)
5781
5782 while (Local0) {
5783 switch (ToInteger (Local0)) {
5784 case (1) {
5785 Increment(Local1)
5786 }
5787 case (2) {
5788 Increment(Local2)
5789 Break
5790 }
5791 }
5792 Decrement(Local0)
5793 }
5794 if (LNotEqual(Local0, 0)) {
5795 err(ts, z179, __LINE__, 0, 0, Local0, 0)
5796 }
5797 if (LNotEqual(Local1, 1)) {
5798 err(ts, z179, __LINE__, 0, 0, Local1, 1)
5799 }
5800 if (LNotEqual(Local2, 1)) {
5801 err(ts, z179, __LINE__, 0, 0, Local2, 1)
5802 }
5803 }
5804
5805 Method(sw07,, Serialized)
5806 {
5807 OUTP("Check While implementation 7: Name inside, 1 step")
5808
5809 Store(1, Local0)
5810 Store(0, Local1)
5811
5812 Name(WHIN, Ones)
5813
5814 while (Local0) {
5815 if (Local1) {
5816 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
5817 } else {
5818 CH03(ts, z179, 0x2be, __LINE__, 0)
5819 }
5820 Store(Local1, WHIN)
5821 Decrement(Local0)
5822 Increment(Local1)
5823 }
5824 }
5825
5826 Method(sw08,, Serialized)
5827 {
5828 OUTP("Check While implementation 8: Name inside, 2 steps")
5829
5830 Store(2, Local0)
5831 Store(0, Local1)
5832
5833 Name(WHIN, Ones)
5834
5835 while (Local0) {
5836 if (LGreater(Local1, 2)) {
5837 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
5838 } else {
5839 CH03(ts, z179, 0x2c0, __LINE__, 0)
5840 }
5841 Store(Local1, WHIN)
5842 Decrement(Local0)
5843 Increment(Local1)
5844 }
5845 }
5846
5847 Method(m000)
5848 {
5849 sw00()
5850 sw01()
5851 sw02()
5852 sw03()
5853
5854 if (LAnd(ABUU, LNot(q00a))) {
5855 } else {
5856 sw04()
5857 sw05()
5858 sw06()
5859 }
5860
5861 sw07()
5862
5863 if (ABUU) {
5864 } else {
5865 sw08()
5866 }
5867 }
5868
5869 CH03(ts, z179, 0x2c1, __LINE__, 0)
5870 switch (ToInteger (Arg0)) {
5871 case (0) { m000() }
5872 case (1) { sw00() }
5873 case (2) { sw01() }
5874 case (3) { sw02() }
5875 case (4) { sw03() }
5876 case (5) { sw04() }
5877 case (6) { sw05() }
5878 case (7) { sw06() }
5879 case (8) { sw07() }
5880 case (9) { sw08() }
5881 }
5882 CH03(ts, z179, 0x2c2, __LINE__, 0)
5883 }
5884
5885 /* Methods to run manually (for ABBU only) */
5886 Method(asw0) { IIN0() ms2c(1) Return(POUT) }
5887 Method(bsw0) { IIN0() ms2c(2) Return(POUT) }
5888 Method(csw0) { IIN0() ms2c(3) Return(POUT) }
5889 Method(dsw0) { IIN0() ms2c(4) Return(POUT) }
5890 Method(esw0) { IIN0() ms2c(5) Return(POUT) }
5891 Method(fsw0) { IIN0() ms2c(6) Return(POUT) }
5892 Method(gsw0) { IIN0() ms2c(7) Return(POUT) }
5893 Method(hsw0) { IIN0() ms2c(8) Return(POUT) }
5894 Method(isw0) { IIN0() ms2c(9) Return(POUT) }
5895
5896 /*
5897 * Hot issue:
5898 *
5899 * Recursive method with local named
5900 *
5901 * bwac & cwac tests should expectedly fail
5902 */
5903 Method(ms2d, 1, Serialized)
5904 {
5905 Name(ts, "ms2d")
5906 Name(Y, 0)
5907
5908 Method (M001, 1, NotSerialized)
5909 {
5910 Name (X, Zero)
5911
5912 If (Y) {
5913 If (y300) {
5914 CH03(ts, z179, 0x3c3, __LINE__, 0)
5915 } else {
5916 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
5917 }
5918 } else {
5919 CH03(ts, z179, 0x2c4, __LINE__, 0)
5920 }
5921
5922 Increment (Y)
5923 Increment (X)
5924
5925 Decrement (Arg0)
5926 If (LGreater (Arg0, Zero)) {
5927 M001 (Arg0)
5928 }
5929 }
5930
5931 Method(wac0)
5932 {
5933 OUTP("Recursive method with local named execution 1")
5934
5935 Store(0, Y)
5936 M001 (0x1)
5937 }
5938
5939 Method(wac1)
5940 {
5941 OUTP("Recursive method with local named execution 2")
5942
5943 Store(0, Y)
5944 M001 (0x2)
5945 }
5946
5947 Method(wac2)
5948 {
5949 OUTP("Recursive method with local named execution 4")
5950
5951 Store(0, Y)
5952 M001 (0x4)
5953 }
5954
5955 Method(m000)
5956 {
5957 wac0()
5958
5959 if (ABUU) {
5960 } else {
5961 wac1()
5962 }
5963
5964 if (ABUU) {
5965 } else {
5966 wac2()
5967 }
5968 }
5969
5970 CH03(ts, z179, 0x2c5, __LINE__, 0)
5971 switch (ToInteger (Arg0)) {
5972 case (0) { m000() }
5973 case (1) { wac0() }
5974 case (2) { wac1() }
5975 case (3) { wac2() }
5976 }
5977 CH03(ts, z179, 0x2c6, __LINE__, 0)
5978 }
5979
5980 /* Methods to run manually (for ABBU only) */
5981 Method(awac) { IIN0() ms2d(1) Return(POUT) }
5982 Method(bwac) { IIN0() ms2d(2) Return(POUT) }
5983 Method(cwac) { IIN0() ms2d(3) Return(POUT) }
5984 Method(dwac) { IIN0() ms2d(4) Return(POUT) }
5985
5986 /*
5987 * Hot issue:
5988 *
5989 * Recursive method with local named: handmade asynchronous test:
5990 * - bzac can be called many times
5991 * - after azac any bzac should fail, but then after czac succeed again
5992 * - 3 consecutive execution of dzac in the different instances of ABBU
5993 * should show actual behavior, on acpiexec run "thr 4 1 dzac"
5994 */
5995
5996 Event(EV00)
5997
5998 Method (MZAC, 1, NotSerialized)
5999 {
6000 Name (X, Zero)
6001 Increment (X)
6002 OUTP(X)
6003
6004 If (LGreater (Arg0, Zero))
6005 {
6006 // Block on event
6007 Wait(EV00, 0xFFFF)
6008 }
6009 }
6010
6011 Method(zac0)
6012 {
6013 OUTP("Method with local named execution 1: Block")
6014
6015 MZAC (0x1)
6016 }
6017
6018 Method(zac1)
6019 {
6020 OUTP("Method with local named execution 2: Pass")
6021
6022 MZAC (0x0)
6023 }
6024
6025 Method(zac2)
6026 {
6027 Sleep(5000)
6028
6029 OUTP("Method with local named execution 3: Signal")
6030
6031 Signal (EV00)
6032 }
6033
6034 Name(zacz, 5)
6035 Method(zac3)
6036 {
6037 Sleep(1000)
6038 Decrement(zacz)
6039
6040 if (LEqual(zacz, 4)) {zac0()}
6041 elseif (LEqual(zacz, 2)) {zac2()}
6042 else {zac1()}
6043
6044 Return (zacz)
6045 }
6046
6047 /* Methods to run manually (for ABBU only) */
6048 Method(azac) { IIN0() zac0() Return(POUT) }
6049 Method(bzac) { IIN0() zac1() Return(POUT) }
6050 Method(czac) { IIN0() zac2() Return(POUT) }
6051 Method(dzac) { IIN0() zac3() Return(POUT) }
6052
6053 /*
6054 * Hot issue:
6055 *
6056 * Example from Bob,
6057 * Buffer is not shortened on storing short string
6058 */
6059 Method(ms2e,, Serialized)
6060 {
6061 Name(ts, "ms2e")
6062
6063 Name (BUF0, Buffer (12) {})
6064
6065 OUTP("Buffer is not shortened on storing short string")
6066
6067 CH03(ts, z179, 0x2c7, __LINE__, 0)
6068
6069 Store ("ABCD", BUF0)
6070
6071 Store(SizeOf (BUF0), Local0)
6072
6073 if (LNotEqual(Local0, 12)) {
6074 err(ts, z179, __LINE__, 0, 0, Local0, 12)
6075 }
6076
6077 CH03(ts, z179, 0x2c9, __LINE__, 0)
6078 }
6079
6080 /* Methods to run manually (for ABBU only) */
6081 Method(abuf) { IIN0() ms2e() Return(POUT) }
6082
6083 /*
6084 * Bug 246 issue:
6085 *
6086 * SUMMARY: Switch implementation can cause AE_ALREADY_EXISTS exception
6087 * when Switch is within While
6088 */
6089 Method(ms2f, 1, Serialized)
6090 {
6091 Name(ts, "ms2f")
6092
6093 Method(B246, 0, Serialized)
6094 {
6095 Name(LN00, 2)
6096
6097 OUTP("Switch implementation can cause AE_ALREADY_EXISTS 1")
6098
6099 Store(0, Local1)
6100
6101 while (LN00) {
6102 switch (ToInteger (LN00)) {
6103 case (1) {
6104 Add(Local1, 1, Local1)
6105 }
6106 case (2) {
6107 Add(Local1, 2, Local1)
6108 }
6109 }
6110 Decrement(LN00)
6111 }
6112
6113 if (LNotEqual(Local1, 3)) {
6114 err(ts, z179, __LINE__, 0, 0, Local1, 3)
6115 }
6116 }
6117
6118 Method(U246, 0, Serialized)
6119 {
6120 Name(LN00, 1)
6121
6122 OUTP("Switch implementation can cause AE_ALREADY_EXISTS 2")
6123
6124 Store(0, Local1)
6125
6126 while (LN00) {
6127 switch (ToInteger (LN00)) {
6128 case (1) {
6129 Add(Local1, 1, Local1)
6130 }
6131 case (2) {
6132 Add(Local1, 2, Local1)
6133 }
6134 }
6135 Decrement(LN00)
6136 }
6137
6138 if (LNotEqual(Local1, 1)) {
6139 err(ts, z179, __LINE__, 0, 0, Local1, 1)
6140 }
6141 }
6142
6143 CH03(ts, z179, 0x2cc, __LINE__, 0)
6144 switch (ToInteger (Arg0)) {
6145 case (0) { b246() u246() }
6146 case (1) { b246() }
6147 case (2) { u246() }
6148 }
6149 CH03(ts, z179, 0x2cd, __LINE__, 0)
6150 }
6151
6152 /* Methods to run manually (for ABBU only) */
6153 Method(a246) { IIN0() ms2f(1) Return(POUT) }
6154 Method(b246) { IIN0() ms2f(2) Return(POUT) }
6155
6156 /*
6157 * Bug 247 issue:
6158 *
6159 * SUMMARY: ASL compiler incorrectly implements Break within Switch
6160 */
6161 Method(ms30,, Serialized)
6162 {
6163 Name(ts, "ms30")
6164
6165 // This test actually should be used without "while (1) { ... Break}"
6166 // wrapping, but iASL reports "Initializer list too long" error.
6167 // Comment the wrappers and compile with -f iASL option.
6168 Method(B247)
6169 {
6170 Method(m000, 4, Serialized)
6171 {
6172 Name(LN00, 2)
6173 Name(CH10, 0)
6174 Name(CH11, 0)
6175 Name(CH20, 0)
6176 Name(CH21, 0)
6177
6178 OUTP(arg0)
6179
6180 // Workaround for "No enclosing While statement" iASl error
6181 while (1) {
6182 switch (ToInteger (arg3)) {
6183 case (1) {
6184 if (Arg1) {
6185 Store(1, CH10)
6186 Break
6187 }
6188 Store(1, CH11)
6189 }
6190 case (2) {
6191 if (Arg2) {
6192 Store(1, CH20)
6193 Break
6194 }
6195 Store(1, CH21)
6196 }
6197 }
6198 Break }
6199
6200 if (LEqual(Arg3, 1)) {
6201 if (LNotEqual(CH10, Arg1)) {
6202 err(ts, z179, __LINE__, 0, 0, CH10, Arg1)
6203 }
6204 if (LEqual(CH11, Arg1)) {
6205 err(ts, z179, __LINE__, 0, 0, CH11, Arg1)
6206 }
6207 }
6208 if (LEqual(Arg3, 2)) {
6209 if (LNotEqual(CH20, Arg2)) {
6210 err(ts, z179, __LINE__, 0, 0, CH20, Arg2)
6211 }
6212 if (LEqual(CH21, Arg2)) {
6213 err(ts, z179, __LINE__, 0, 0, CH21, Arg2)
6214 }
6215 }
6216 }
6217
6218 OUTP("Switch implementation can cause AE_ALREADY_EXISTS 3")
6219
6220 m000("Break 100", 0, 0, 1)
6221 m000("Break 101", 0, 1, 1)
6222 m000("Break 110", 1, 0, 1)
6223 m000("Break 111", 1, 1, 1)
6224 m000("Break 200", 0, 0, 2)
6225 m000("Break 201", 0, 1, 2)
6226 m000("Break 210", 1, 0, 2)
6227 m000("Break 211", 1, 1, 2)
6228 }
6229
6230 CH03(ts, z179, 0x2d2, __LINE__, 0)
6231 b247()
6232 CH03(ts, z179, 0x2d3, __LINE__, 0)
6233 }
6234
6235 /* Methods to run manually (for ABBU only) */
6236 Method(a247) { IIN0() ms30() Return(POUT) }
6237
6238 /*
6239 * Hot issue:
6240 *
6241 * Load ASL operator
6242 */
6243 Method(ms31, 1, Serialized)
6244 {
6245 Name(ts, "ms31")
6246
6247 // Originated from table/ssdt0.asl: iasl -tc ssdt0.asl
6248 Name(BUF0, Buffer() {
6249 0x53,0x53,0x44,0x54,0x34,0x00,0x00,0x00, /* 00000000 "SSDT4..." */
6250 0x02,0xDE,0x49,0x6E,0x74,0x65,0x6C,0x00, /* 00000008 "..Intel." */
6251 0x4D,0x61,0x6E,0x79,0x00,0x00,0x00,0x00, /* 00000010 "Many...." */
6252 0x01,0x00,0x00,0x00,0x49,0x4E,0x54,0x4C, /* 00000018 "....INTL" */
6253 0x15,0x12,0x06,0x20,0x14,0x0F,0x5C,0x53, /* 00000020 "... ..\S" */
6254 0x53,0x30,0x30,0x00,0xA4,0x0D,0x5C,0x53, /* 00000028 "S00...\S" */
6255 0x53,0x30,0x30,0x00,
6256 })
6257
6258 OperationRegion (IST0, SystemMemory, VMEM, 0x34)
6259
6260 Field(IST0, ByteAcc, NoLock, Preserve) {
6261 RFU0, 0x1a0,
6262 }
6263
6264 Name(DDBH, 0)
6265
6266 External(\SS00)
6267
6268 Method(m000)
6269 {
6270 OUTP("ldt0: Simple Load/Unload(Field, LocalX) test")
6271
6272 Store(BUF0, RFU0)
6273
6274 Load(RFU0, Local0)
6275 CH03(ts, z179, 0x2d4, __LINE__, 0)
6276 OUTP("SSDT loaded")
6277
6278 UnLoad(Local0)
6279 CH03(ts, z179, 0x2d5, __LINE__, 0)
6280 OUTP("SSDT unloaded")
6281 }
6282
6283 // Manual test for ABBU
6284 Method(m001)
6285 {
6286 OUTP("ldt1: Simple Load(OpRegion, LocalX) test")
6287
6288 Store(BUF0, RFU0)
6289
6290 Load(IST0, Local0)
6291 CH03(ts, z179, 0x2d6, __LINE__, 0)
6292 OUTP("SSDT loaded")
6293 }
6294
6295 Method(m002)
6296 {
6297 OUTP("ldt2: Simple Load/Unload(OpRegion, LocalX) test")
6298
6299 Store(BUF0, RFU0)
6300
6301 Load(IST0, DDBH)
6302 CH03(ts, z179, 0x2d7, __LINE__, 0)
6303 OUTP("SSDT loaded")
6304
6305 Unload(DDBH)
6306 CH03(ts, z179, 0x2d8, __LINE__, 0)
6307 OUTP("SSDT unloaded")
6308 }
6309
6310 Method(m003)
6311 {
6312 OUTP("ldt3: Simple Load/ObjectType(DDBHandle) test")
6313
6314 Store(BUF0, RFU0)
6315
6316 Load(IST0, Local0)
6317 CH03(ts, z179, 0x2d9, __LINE__, 0)
6318 OUTP("SSDT loaded")
6319
6320 Store(ObjectType(Local0), Local1)
6321 if (LNotEqual(15, Local1)) {
6322 err(ts, z179, __LINE__, 0, 0, Local1, 15)
6323 }
6324
6325 Unload(DDBH)
6326 CH03(ts, z179, 0x2db, __LINE__, 0)
6327 OUTP("SSDT unloaded")
6328 }
6329
6330 // Manual test for ABBU: hangs on MS
6331 Method(m013)
6332 {
6333 OUTP("ldt13: Simple Load/ObjectType(DDBHandle) test")
6334
6335 Store(BUF0, RFU0)
6336
6337 Load(IST0, Local0)
6338 CH03(ts, z179, 0x2dc, __LINE__, 0)
6339 OUTP("SSDT loaded")
6340
6341 Store(ObjectType(Local0), Local1)
6342 if (LNotEqual(15, Local1)) {
6343 err(ts, z179, __LINE__, 0, 0, Local1, 15)
6344 }
6345 }
6346
6347 Method(m004,, Serialized)
6348 {
6349 Name(DDBH, 0)
6350
6351 OUTP("ldt4: Simple Load/ObjectType(Named DDBHandle) test")
6352
6353 Store(BUF0, RFU0)
6354
6355 Load(IST0, DDBH)
6356 CH03(ts, z179, 0x2de, __LINE__, 0)
6357 OUTP("SSDT loaded")
6358
6359 Store(ObjectType(DDBH), Local1)
6360 if (LNotEqual(15, Local1)) {
6361 err(ts, z179, __LINE__, 0, 0, Local1, 15)
6362 }
6363
6364 UnLoad(DDBH)
6365 CH03(ts, z179, 0x2e0, __LINE__, 0)
6366 OUTP("SSDT unloaded")
6367 }
6368
6369 // Manual test for ABBU: hangs on MS
6370 Method(m014,, Serialized)
6371 {
6372 Name(DDBH, 0)
6373
6374 OUTP("ldt14: Simple Load/ObjectType(Named DDBHandle) test")
6375
6376 Store(BUF0, RFU0)
6377
6378 Load(IST0, DDBH)
6379 CH03(ts, z179, 0x2e1, __LINE__, 0)
6380 OUTP("SSDT loaded")
6381
6382 Store(ObjectType(DDBH), Local1)
6383 if (LNotEqual(15, Local1)) {
6384 err(ts, z179, __LINE__, 0, 0, Local1, 15)
6385 }
6386 }
6387
6388 Method(m005,, Serialized)
6389 {
6390 Name(PAC0, Package(1){})
6391
6392 OUTP("ldt5: Simple Load(OpRegion, Indexed DDBHandle) test")
6393
6394 Store(BUF0, RFU0)
6395
6396 Load(IST0, Index(PAC0, 0))
6397 CH03(ts, z179, 0x2e3, __LINE__, 0)
6398 OUTP("SSDT loaded")
6399
6400 Store(Derefof(Index(PAC0, 0)), Local0)
6401
6402 UnLoad(Local0)
6403 CH03(ts, z179, 0x2e4, __LINE__, 0)
6404 OUTP("SSDT unloaded")
6405 }
6406
6407 // Manual test for ABBU
6408 Method(m015,, Serialized)
6409 {
6410 Name(PAC0, Package(1){})
6411
6412 OUTP("ldt15: Simple Load(OpRegion, Indexed DDBHandle) test")
6413
6414 Store(BUF0, RFU0)
6415
6416 Load(IST0, Index(PAC0, 0))
6417 CH03(ts, z179, 0x2e5, __LINE__, 0)
6418 OUTP("SSDT loaded")
6419 }
6420
6421 Method(m006)
6422 {
6423 OUTP("ldt6: Complex Load(OpRegion, LocalX) - CondRefof test")
6424
6425 Store(BUF0, RFU0)
6426
6427 Store(CondRefof(\SS00, Local1), Local2)
6428 OUTP("CondRefof before Load")
6429 if (Local2) {
6430 err(ts, z179, __LINE__, 0, 0, Local2, 0)
6431 }
6432
6433 Load(IST0, Local0)
6434 CH03(ts, z179, 0x2e7, __LINE__, 0)
6435
6436 Store(CondRefof(\SS00, Local3), Local4)
6437 OUTP("CondRefof after Load")
6438 if (Local4) {
6439 } else {
6440 err(ts, z179, __LINE__, 0, 0, Local4, 1)
6441 }
6442
6443 UnLoad(Local0)
6444 CH03(ts, z179, 0x2e9, __LINE__, 0)
6445
6446 Store(CondRefof(\SS00, Local5), Local6)
6447 OUTP("CondRefof after UnLoad")
6448 if (Local6) {
6449 err(ts, z179, __LINE__, 0, 0, Local6, 0)
6450 }
6451 }
6452
6453 // Manual test for ABBU
6454 Method(m016)
6455 {
6456 OUTP("ldt16: Complex Load(OpRegion, LocalX) - CondRefof test")
6457
6458 Store(BUF0, RFU0)
6459
6460 Store(CondRefof(\SS00, Local1), Local2)
6461 OUTP("CondRefof before Load")
6462 if (Local2) {
6463 err(ts, z179, __LINE__, 0, 0, Local2, 0)
6464 }
6465
6466 Load(IST0, Local0)
6467 CH03(ts, z179, 0x2ec, __LINE__, 0)
6468
6469 Store(CondRefof(\SS00, Local3), Local4)
6470 OUTP("CondRefof after Load")
6471 if (Local4) {
6472 } else {
6473 err(ts, z179, __LINE__, 0, 0, Local4, 1)
6474 }
6475 }
6476
6477 Method(m010)
6478 {
6479 m000()
6480
6481 if (y290) {
6482 m002()
6483 m003()
6484 m004()
6485 }
6486
6487 if (LAnd(y261, y290)) {
6488 m005()
6489 }
6490
6491 if (y290) {
6492 m006()
6493 }
6494 }
6495
6496 CH03(ts, z179, 0x2ee, __LINE__, 0)
6497 switch (ToInteger (Arg0)) {
6498 case (0) { m010() }
6499 case (1) { m000() }
6500 case (2) { m001() }
6501 case (3) { m002() }
6502 case (4) { m003() }
6503 case (5) { m004() }
6504 case (6) { m005() }
6505 case (7) { m006() }
6506 case (8) { m013() }
6507 case (9) { m014() }
6508 case (10) { m015() }
6509 case (11) { m016() }
6510 }
6511 CH03(ts, z179, 0x2ef, __LINE__, 0)
6512 }
6513
6514 /* Methods to run manually (for ABBU only) */
6515 Method(aldt) { IIN0() ms31(1) Return(POUT) }
6516 Method(bldt) { IIN0() ms31(2) Return(POUT) }
6517 Method(cldt) { IIN0() ms31(3) Return(POUT) }
6518 Method(dldt) { IIN0() ms31(4) Return(POUT) }
6519 Method(eldt) { IIN0() ms31(5) Return(POUT) }
6520 Method(fldt) { IIN0() ms31(6) Return(POUT) }
6521 Method(gldt) { IIN0() ms31(7) Return(POUT) }
6522 Method(hldt) { IIN0() ms31(8) Return(POUT) }
6523 Method(ildt) { IIN0() ms31(9) Return(POUT) }
6524 Method(jldt) { IIN0() ms31(10) Return(POUT) }
6525 Method(kldt) { IIN0() ms31(11) Return(POUT) }
6526
6527 /*
6528 * Hot issue:
6529 *
6530 * CondRefOf ASL operator
6531 */
6532 Method(ms32, 1, Serialized)
6533 {
6534 Name(ts, "ms32")
6535
6536 Method(m000)
6537 {
6538 OUTP("cnr0: Simple CondRefof() positive test")
6539
6540 Store(CondRefof(\_SB.ABBU.IMAX), Local0)
6541 CH03(ts, z179, 0x2f0, __LINE__, 0)
6542 }
6543
6544 Method(m001)
6545 {
6546 OUTP("cnr1: Simple CondRefof( , ) positive test 2")
6547
6548 Store(CondRefof(\_SB.ABBU._HID, Local1), Local0)
6549 CH03(ts, z179, 0x2f1, __LINE__, 0)
6550
6551 if (Local0) {
6552 } else {
6553 err(ts, z179, __LINE__, 0, 0, Local0, 1)
6554 }
6555 }
6556
6557 Method(m002,, Serialized)
6558 {
6559 Name(I000, 0x76543210)
6560
6561 OUTP("cnr2: Simple CondRefof( , ) positive test for dynamic object")
6562
6563 Store(CondRefof(^m002.I000, Local1), Local0)
6564 if (Local0) {
6565 Store(Derefof(Local1), Local2)
6566 if (LNotEqual(0x76543210, Local2)) {
6567 err(ts, z179, __LINE__, 0, 0, Local2, 0x76543210)
6568 }
6569 } else {
6570 err(ts, z179, __LINE__, 0, 0, Local0, 1)
6571 }
6572 }
6573
6574 Method(m003,, Serialized)
6575 {
6576 OUTP("cnr3: Simple CondRefof( , ) negative test for dynamic object")
6577
6578 Store(CondRefof(^M003.I000, Local1), Local0)
6579 if (Local0) {
6580 err(ts, z179, __LINE__, 0, 0, Local0, 1)
6581 }
6582
6583 Name(I000, 1)
6584
6585 Store(CondRefof(^M003.I000, Local1), Local0)
6586 if (Local0) {
6587 } else {
6588 err(ts, z179, __LINE__, 0, 0, Local0, 0)
6589 }
6590 }
6591
6592 Method(m004)
6593 {
6594 OUTP("cnr4: Simple CondRefof(_OSI, Local0) test")
6595
6596 OUTP("if (CondRefOf (_OSI, Local0))")
6597 if (CondRefOf (_OSI, Local0))
6598 {
6599 OUTP("True")
6600 OUTP("_OSI (\"Windows 2001\"):")
6601 if (\_OSI ("Windows 2001"))
6602 {
6603 OUTP("True")
6604 } else {
6605 OUTP("False")
6606 }
6607 } else {
6608 OUTP("False")
6609 }
6610 CH03(ts, z179, 0x2f7, __LINE__, 0)
6611 }
6612
6613 Method(m010)
6614 {
6615 m000()
6616 m001()
6617 m002()
6618 m003()
6619 m004()
6620 }
6621
6622 CH03(ts, z179, 0x2f8, __LINE__, 0)
6623 switch (ToInteger (Arg0)) {
6624 case (0) { m010() }
6625 case (1) { m000() }
6626 case (2) { m001() }
6627 case (3) { m002() }
6628 case (4) { m003() }
6629 case (5) { m004() }
6630 }
6631 CH03(ts, z179, 0x2f9, __LINE__, 0)
6632 }
6633
6634 /* Methods to run manually (for ABBU only) */
6635 Method(acnr) { IIN0() ms32(1) Return(POUT) }
6636 Method(bcnr) { IIN0() ms32(2) Return(POUT) }
6637 Method(ccnr) { IIN0() ms32(3) Return(POUT) }
6638 Method(dcnr) { IIN0() ms32(4) Return(POUT) }
6639 Method(ecnr) { IIN0() ms32(5) Return(POUT) }
6640
6641 /*
6642 * Hot issue:
6643 *
6644 * Check storing of a Device into LocalX
6645 */
6646 Method(ms33, 1, Serialized)
6647 {
6648 Name(ts, "ms33")
6649
6650 Method(asdl)
6651 {
6652 /*
6653 // Removed 09/2015. iASL now disallows these stores
6654
6655 OUTP("Store _SB.ABBU Device object into LocalX, don't check the type")
6656
6657 Store(\_SB.ABBU, Local0)
6658 */
6659
6660 if (LOr(ABUU, SLCK)) {
6661 CH03(ts, z179, 0x2fa, __LINE__, 0)
6662 } else {
6663 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
6664 }
6665 }
6666
6667 Method(bsdl)
6668 {
6669 /*
6670 // Removed 09/2015. iASL now disallows these stores
6671 OUTP("Store _SB.ABBU Device object into LocalX")
6672
6673 Store(\_SB.ABBU, Local0)
6674 */
6675
6676 if (LOr(ABUU, SLCK)) {
6677 Store(ObjectType(Local0), Local1)
6678 if (LNotEqual(6, Local1)) {
6679 err(ts, z179, __LINE__, 0, 0, Local1, 6)
6680 }
6681 } else {
6682 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
6683 }
6684 }
6685
6686 Method(csdl,, Serialized)
6687 {
6688 Device(DLOC) {}
6689
6690 /*
6691 // Removed 09/2015. iASL now disallows these stores
6692
6693 OUTP("Store an improper dynamic Device object into LocalX")
6694
6695 Store(DLOC, Local0)
6696 */
6697
6698 if (LOr(ABUU, SLCK)) {
6699 Store(ObjectType(Local0), Local1)
6700 if (LNotEqual(6, Local1)) {
6701 err(ts, z179, __LINE__, 0, 0, Local1, 6)
6702 } else {
6703 OUTP("Ok: ObjectType succeeded")
6704 }
6705 } else {
6706 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
6707 }
6708 }
6709
6710 Method(dsdl)
6711 {
6712 External(\_SB.LNKA)
6713
6714 OUTP("Store _SB.LNKA Device object into LocalX")
6715
6716 if (CondRefof(\_SB.LNKA, Local2)) {
6717 } else {
6718 OUTP("CondRefof for _SB.LNKA returns FALSE")
6719 return
6720 }
6721
6722 Store(\_SB.LNKA, Local0)
6723
6724 if (LOr(ABUU, SLCK)) {
6725 Store(ObjectType(Local0), Local1)
6726 if (LNotEqual(6, Local1)) {
6727 err(ts, z179, __LINE__, 0, 0, Local1, 6)
6728 }
6729 } else {
6730 CH04(ts, 0, 0xff, z179, __LINE__, 0, 0)
6731 }
6732 }
6733
6734 CH03(ts, z179, 0x2a2, __LINE__, 0)
6735 switch (ToInteger (Arg0)) {
6736 case (0) {
6737 asdl()
6738 bsdl()
6739 csdl()
6740 dsdl()
6741 }
6742 case (1) { asdl() }
6743 case (2) { bsdl() }
6744 case (3) { csdl() }
6745 case (4) { dsdl() }
6746 }
6747 CH03(ts, z179, 0x2a3, __LINE__, 0)
6748 }
6749
6750 /* Methods to run manually (for ABBU only) */
6751 Method(asdl) { IIN0() ms33(1) Return(POUT) }
6752 Method(bsdl) { IIN0() ms33(2) Return(POUT) }
6753 Method(csdl) { IIN0() ms33(3) Return(POUT) }
6754 Method(dsdl) { IIN0() ms33(4) Return(POUT) }
6755
6756 Method(msfe)
6757 {
6758 // Bug 63 issues
6759 SRMT("ms10")
6760 ms10(0)
6761
6762 // Bug 83 issues
6763 SRMT("ms11")
6764 ms11(0)
6765
6766 // Bug 100 issues
6767 SRMT("ms12")
6768 ms12()
6769
6770 // Bug 113 issues
6771 SRMT("ms13")
6772 ms13(0)
6773
6774 // Bug 114 issues
6775 SRMT("ms14")
6776 ms14(0)
6777
6778 // Bug 115 issues
6779 SRMT("ms15")
6780 ms15(0)
6781
6782 // Bug 118 issues
6783 SRMT("ms16")
6784 ms16(0)
6785
6786 // Bug 126 issues
6787 SRMT("ms17")
6788 ms17(0)
6789
6790 // Bug 127 issues
6791 SRMT("ms18")
6792 if (ABUU) {
6793 BLCK()
6794 } else {
6795 ms18()
6796 }
6797
6798 // Bug 128 issues
6799 SRMT("ms19")
6800 ms19(0)
6801
6802 // Bug 131 issues
6803 SRMT("ms1a")
6804 ms1a(0)
6805
6806 // Bug 132 issues
6807 SRMT("ms1b")
6808 ms1b(0)
6809
6810 // Bug 133 issues
6811 SRMT("ms1c")
6812 ms1c(0)
6813
6814 // Bug 134 issues
6815 SRMT("ms1d")
6816 ms1d(0)
6817
6818 // Bug 136 issues
6819 SRMT("ms1e")
6820 if (ABUU) {
6821 BLCK()
6822 } else {
6823 ms1e()
6824 }
6825
6826 // Local Reference into the Package issues
6827 SRMT("ms1f")
6828 ms1f(0)
6829
6830 // Forward reference within a control method
6831 SRMT("ms20")
6832 ms20(0)
6833
6834 // Recursive method execution
6835 SRMT("ms21")
6836 ms21(0)
6837
6838 // Conditional reference within a control method
6839 SRMT("ms22")
6840 ms22(0)
6841
6842 // Implicit return
6843 SRMT("ms23")
6844 ms23(0)
6845
6846 // Increment/Decrement with String/Buffer
6847 SRMT("ms24")
6848 if (ABUU) {
6849 BLCK()
6850 } else {
6851 ms24()
6852 }
6853
6854 // Check Store(..., DeRefof(...)) behavior
6855 SRMT("ms25")
6856 if (ABUU) {
6857 BLCK()
6858 } else {
6859 ms25(0)
6860 }
6861
6862 // Exceeding Field Unit
6863 SRMT("ms26")
6864 if (SMBA) {
6865 ms26(0)
6866 } else {
6867 BLCK()
6868 }
6869
6870 // Check IndexField implementation
6871 SRMT("ms27")
6872 if (SMBA) {
6873 ms27(0)
6874 } else {
6875 BLCK()
6876 }
6877
6878 SRMT("mt27")
6879 if (SMBA) {
6880 mt27(0)
6881 } else {
6882 BLCK()
6883 }
6884
6885 SRMT("mu27")
6886 if (SMBA) {
6887 mu27(0)
6888 } else {
6889 BLCK()
6890 }
6891
6892 SRMT("mv27")
6893 if (SMBA) {
6894 mv27(0)
6895 } else {
6896 BLCK()
6897 }
6898
6899 SRMT("mw27")
6900 if (SMBA) {
6901 mw27(0)
6902 } else {
6903 BLCK()
6904 }
6905
6906 SRMT("mx27")
6907 if (SMBA) {
6908 mx27(0)
6909 } else {
6910 BLCK()
6911 }
6912
6913 SRMT("my27")
6914 if (SMBA) {
6915 my27(0)
6916 } else {
6917 BLCK()
6918 }
6919
6920 SRMT("mz27")
6921 if (SMBA) {
6922 mz27(0)
6923 } else {
6924 BLCK()
6925 }
6926
6927 // Check BankField implementation
6928 SRMT("ms28")
6929 if (SMBA) {
6930 ms28()
6931 } else {
6932 BLCK()
6933 }
6934
6935 // Check Acquire/Release
6936 SRMT("ms29")
6937 ms29(0)
6938
6939 // Check ToBuffer optional store
6940 SRMT("ms2a")
6941 ms2a(0)
6942
6943 // Check Package size calculation
6944 SRMT("ms2b")
6945 ms2b(0)
6946
6947 // Check Switch implementation
6948 SRMT("ms2c")
6949 ms2c(0)
6950
6951 // Recursive method with local named
6952 SRMT("ms2d")
6953 ms2d(0)
6954
6955 // Buffer is not shortened on storing short string
6956 SRMT("ms2e")
6957 ms2e()
6958
6959 // Bug 246 issues
6960 SRMT("ms2f")
6961 ms2f(0)
6962
6963 // Bug 247 issues
6964 SRMT("ms30")
6965 if (ABUU) {
6966 BLCK()
6967 } else {
6968 ms30()
6969 }
6970
6971 // Load ASL operator
6972 SRMT("ms31")
6973 if (ABUU) {
6974 BLCK()
6975 } else {
6976 ms31(0)
6977 }
6978
6979 // CondRefOf ASL operator
6980 SRMT("ms32")
6981 ms32(0)
6982
6983 // Storing of a Device into LocalX
6984 SRMT("ms33")
6985 ms33(0)
6986 }