Debian Codegraph @

tests/aslts/src/runtime/collections/functional/table/unload.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 * UnLoad ASL operator functionality
30 */
31 /*
32 * This sub-test is intended to comprehensively verify
33 * the Unload ASL operator functionality.
34 *
35 * Performs a run-time unload of a Definition Block that was
36 * loaded using a Load (and LoadTable) term.
37 *
38 * The overall functionality of the Unload Objects is indirectly
39 * verified by other Table management tests as far as Unload is
40 * needed to perform cleanup and check effectiveness of Load and
41 * LoadTable operators.
42 *
43 * 17.5.126 Unload (Unload Definition Block)
44 * Syntax
45 * Unload (Handle)
46 *
47 * On testing the following issues should be covered (actually in the tests
48 * of loading except for the exceptional conditions ones):
49 *
50 * - successful execution of the Unload operator for the specified DDBHandle
51 * obtained through loading of a SSDT from a proper location,
52 *
53 * - successful execution of the Unload operator for the specified DDBHandle
54 * obtained through LoadTable operator,
55 *
56 * - the Handle parameter of the Unload can be specified as Named Object,
57 * LocalX, ArgX, Derefof (to Index or RefOf reference), and Method call,
58 *
59 * - all namespace objects created as a result of the corresponding Load
60 * operation are removed from the namespace,
61 *
62 * - unloading a number of different SSDTs,
63 *
64 * - Load/UnLoad processing can be done with the same table many times,
65 *
66 * - exceptional conditions caused by inappropriate data:
67 * = the parameter of the UnLoad operator is not of DDBHandle type,
68 * = execute UnLoad operator with the same DDBHandle repeatedly,
69 * = the operand of UnLoad operator is absent.
70 *
71 * Can not be tested following issues:
72 * - unloading a SSDT to be a synchronous operation ("the control methods
73 * defined in the Definition Block are not executed during load time")
74 */
75 Name (Z175, 0xAF)
76 Device (DTM1)
77 {
78 /* Different Sources to specify DDBHandle for UnLoad. */
79 /* Most of them (Named Object, LocalX, ArgX, Derefof) */
80 /* are checked in load.asl */
81 /* DDBHandle returned by Method call */
82 Method (TST0, 1, Serialized)
83 {
84 Name (HI0, 0x00)
85 Method (M000, 0, NotSerialized)
86 {
87 Return (HI0) /* \DTM1.TST0.HI0_ */
88 }
89
90 Concatenate (Arg0, "-tst0", Arg0)
91 \DTM0.RFU0 = \DTM0.BUF0
92 If (CondRefOf (\SSS0, Local0))
93 {
94 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\SSS0", 0x01)
95 Return (Zero)
96 }
97
98 /* Modify Revision field of SSDT */
99
100 Store ((\DTM0.CREV + 0x01), \DTM0.CREV)
101 /* Recalculate and save CheckSum */
102
103 Local0 = \DTM0.RFU0
104 Store ((\DTM0.SUM + \DTM0.CHSM (Local0, SizeOf (Local0))), \DTM0.SUM)
105 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
106 {
107 Return (Zero)
108 }
109
110 Load (\DTM0.RFU0, HI0) /* \DTM1.TST0.HI0_ */
111 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
112 {
113 Return (Zero)
114 }
115
116 Debug = "Table Loaded"
117 Local1 = ObjectType (HI0)
118 If ((Local1 != C017))
119 {
120 /* DDB Handle */
121
122 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, Local1, C017)
123 }
124
125 /* Check the new Object appears */
126
127 If (CondRefOf (\SSS0, Local0)){}
128 Else
129 {
130 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\SSS0", 0x00)
131 }
132
133 Local1 = ObjectType (Local0)
134 If ((Local1 != C010))
135 {
136 /* Method */
137
138 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, Local1, C010)
139 }
140 Else
141 {
142 Local0 = \SSS0 ()
143 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x01))
144 {
145 Return (Zero)
146 }
147
148 If (("\\SSS0" != Local0))
149 {
150 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, Local0, "\\SSS0")
151 }
152 }
153
154 /* UnLoad operator execution */
155
156 Unload (M000 ())
157 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
158 {
159 Return (Zero)
160 }
161
162 Debug = "Table Unloaded"
163 If (CondRefOf (\SSS0, Local0))
164 {
165 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\SSS0", 0x01)
166 }
167
168 Return (Zero)
169 }
170
171 /* All namespace objects created as a result of the corresponding */
172 /* Load operation are absent in the namespace after UnLoad */
173 Method (TST1, 1, Serialized)
174 {
175 Name (DDB0, 0x00)
176 Name (DDB1, 0x00)
177 Method (M000, 4, NotSerialized)
178 {
179 Concatenate (Arg0, "-m000.", Arg0)
180 Concatenate (Arg0, Arg1, Arg0)
181 Local0 = ObjectType (Arg2)
182 If ((Arg3 != Local0))
183 {
184 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, Local0, Arg3)
185 Return (0x01)
186 }
187
188 Return (0x00)
189 }
190
191 Method (M001, 1, NotSerialized)
192 {
193 Concatenate (Arg0, "-m001", Arg0)
194 /* Integer */
195
196 If (CondRefOf (\AUXD.INT0, Local0))
197 {
198 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.INT0", 0x01)
199 Return (0x01)
200 }
201
202 /* String */
203
204 If (CondRefOf (\AUXD.STR0, Local0))
205 {
206 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.STR0", 0x01)
207 Return (0x01)
208 }
209
210 /* Buffer */
211
212 If (CondRefOf (\AUXD.BUF0, Local0))
213 {
214 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.BUF0", 0x01)
215 Return (0x01)
216 }
217
218 /* Package */
219
220 If (CondRefOf (\AUXD.PAC0, Local0))
221 {
222 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.PAC0", 0x01)
223 Return (0x01)
224 }
225
226 /* Field Unit */
227
228 If (CondRefOf (\AUXD.FLU0, Local0))
229 {
230 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.FLU0", 0x01)
231 Return (0x01)
232 }
233
234 /* Device */
235
236 If (CondRefOf (\AUXD.DEV0, Local0))
237 {
238 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.DEV0", 0x01)
239 Return (0x01)
240 }
241
242 /* Event */
243
244 If (CondRefOf (\AUXD.EVE0, Local0))
245 {
246 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.EVE0", 0x01)
247 Return (0x01)
248 }
249
250 /* Method */
251
252 If (CondRefOf (\AUXD.MMM0, Local0))
253 {
254 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.MMM0", 0x01)
255 Return (0x01)
256 }
257
258 /* Mutex */
259
260 If (CondRefOf (\AUXD.MTX0, Local0))
261 {
262 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.MTX0", 0x01)
263 Return (0x01)
264 }
265
266 /* OpRegion */
267
268 If (CondRefOf (\AUXD.OPR0, Local0))
269 {
270 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.OPR0", 0x01)
271 Return (0x01)
272 }
273
274 /* Power Resource */
275
276 If (CondRefOf (\AUXD.PWR0, Local0))
277 {
278 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.PWR0", 0x01)
279 Return (0x01)
280 }
281
282 /* Processor */
283
284 If (CondRefOf (\AUXD.CPU0, Local0))
285 {
286 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.CPU0", 0x01)
287 Return (0x01)
288 }
289
290 /* Thermal Zone */
291
292 If (CondRefOf (\AUXD.TZN0, Local0))
293 {
294 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.TZN0", 0x01)
295 Return (0x01)
296 }
297
298 /* Buffer Field */
299
300 If (CondRefOf (\AUXD.BFL0, Local0))
301 {
302 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.BFL0", 0x01)
303 Return (0x01)
304 }
305
306 Return (0x00)
307 }
308
309 Concatenate (Arg0, "-tst1", Arg0)
310 /* Check absence of the auxiliary table Objects before Load */
311
312 If (M001 (Concatenate (Arg0, ".before")))
313 {
314 Return (0x01)
315 }
316
317 /* Load auxiliary table */
318
319 \DTM0.RFU3 = \DTM0.BUF3
320 Load (\DTM0.RFU3, DDB0) /* \DTM1.TST1.DDB0 */
321 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
322 {
323 Return (0x01)
324 }
325
326 /* Integer */
327
328 If (CondRefOf (\AUXD.INT0, Local0))
329 {
330 M000 (Arg0, "int", Local0, C009)
331 }
332 Else
333 {
334 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.INT0", 0x00)
335 }
336
337 /* String */
338
339 If (CondRefOf (\AUXD.STR0, Local0))
340 {
341 M000 (Arg0, "str", Local0, C00A)
342 }
343 Else
344 {
345 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.STR0", 0x00)
346 }
347
348 /* Buffer */
349
350 If (CondRefOf (\AUXD.BUF0, Local0))
351 {
352 M000 (Arg0, "buf", Local0, C00B)
353 }
354 Else
355 {
356 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.BUF0", 0x00)
357 }
358
359 /* Package */
360
361 If (Y286)
362 {
363 If (CondRefOf (\AUXD.PAC0, Local0))
364 {
365 M000 (Arg0, "pac", Local0, C00C)
366 }
367 Else
368 {
369 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.PAC0", 0x00)
370 }
371 }
372
373 /* Field Unit */
374
375 If (CondRefOf (\AUXD.FLU0, Local0))
376 {
377 M000 (Arg0, "flu", Local0, C00D)
378 }
379 Else
380 {
381 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.FLU0", 0x00)
382 }
383
384 /* Device */
385
386 If (CondRefOf (\AUXD.DEV0, Local0))
387 {
388 M000 (Arg0, "dev", Local0, C00E)
389 }
390 Else
391 {
392 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.DEV0", 0x00)
393 }
394
395 /* Event */
396
397 If (CondRefOf (\AUXD.EVE0, Local0))
398 {
399 M000 (Arg0, "evt", Local0, C00F)
400 }
401 Else
402 {
403 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.EVE0", 0x00)
404 }
405
406 /* Method */
407
408 If (CondRefOf (\AUXD.MMM0, Local0))
409 {
410 M000 (Arg0, "met", Local0, C010)
411 }
412 Else
413 {
414 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.MMM0", 0x00)
415 }
416
417 /* Mutex */
418
419 If (CondRefOf (\AUXD.MTX0, Local0))
420 {
421 M000 (Arg0, "mtx", Local0, C011)
422 }
423 Else
424 {
425 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.MTX0", 0x00)
426 }
427
428 /* OpRegion */
429
430 If (CondRefOf (\AUXD.OPR0, Local0))
431 {
432 M000 (Arg0, "opr", Local0, C012)
433 }
434 Else
435 {
436 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.OPR0", 0x00)
437 }
438
439 /* Power Resource */
440
441 If (CondRefOf (\AUXD.PWR0, Local0))
442 {
443 M000 (Arg0, "pwr", Local0, C013)
444 }
445 Else
446 {
447 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.PWR0", 0x00)
448 }
449
450 /* Processor */
451
452 If (CondRefOf (\AUXD.CPU0, Local0))
453 {
454 M000 (Arg0, "cpu", Local0, C014)
455 }
456 Else
457 {
458 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.CPU0", 0x00)
459 }
460
461 /* Thermal Zone */
462
463 If (CondRefOf (\AUXD.TZN0, Local0))
464 {
465 M000 (Arg0, "cpu", Local0, C015)
466 }
467 Else
468 {
469 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.TZN0", 0x00)
470 }
471
472 /* Buffer Field */
473
474 If (CondRefOf (\AUXD.BFL0, Local0))
475 {
476 M000 (Arg0, "bfl", Local0, C016)
477 }
478 Else
479 {
480 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, "\\AUXD.BFL0", 0x00)
481 }
482
483 Unload (DDB0)
484 CH03 (Arg0, Z175, __LINE__, 0x00, 0x00)
485 /* Check absence of the auxiliary table Objects after UnLoad */
486
487 If (M001 (Concatenate (Arg0, ".after")))
488 {
489 Return (0x01)
490 }
491
492 Return (0x00)
493 }
494
495 /* Load/UnLoad processing can be done with the same table many times */
496
497 Method (TST2, 1, NotSerialized)
498 {
499 Concatenate (Arg0, "tst2.", Arg0)
500 Local0 = 0x05
501 While (Local0)
502 {
503 If (TST1 (Concatenate (Arg0, Mid ("0123456789", Local0, 0x01))))
504 {
505 Return (0x01)
506 }
507
508 Local0--
509 }
510
511 Return (0x00)
512 }
513
514 /* Exceptions when the parameter of the UnLoad operator */
515 /* is not of DDBHandle type */
516 Method (TST3, 1, Serialized)
517 {
518 Name (DDB0, 0x00)
519 Name (DDB1, 0x00)
520 Method (M000, 4, NotSerialized)
521 {
522 Concatenate (Arg0, "-m000.", Arg0)
523 Concatenate (Arg0, Arg1, Arg0)
524 Local0 = ObjectType (Arg2)
525 If ((Arg3 != Local0))
526 {
527 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, Local0, Arg3)
528 Return (0x01)
529 }
530
531 Unload (DerefOf (Arg2))
532 CH04 (Arg0, 0x00, 0x2F, Z175, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */
533 Return (0x00)
534 }
535
536 Concatenate (Arg0, "-tst3", Arg0)
537 /* Load auxiliary table */
538
539 \DTM0.RFU3 = \DTM0.BUF3
540 Load (\DTM0.RFU3, DDB0) /* \DTM1.TST3.DDB0 */
541 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
542 {
543 Return (0x01)
544 }
545
546 /* Uninitialized */
547
548 If (0x00)
549 {
550 Local1 = 0x00
551 }
552
553 Local0 = ObjectType (Local1)
554 If ((C008 != Local0))
555 {
556 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, Local0, C008)
557 }
558 Else
559 {
560 Unload (Local1)
561 If (SLCK)
562 {
563 CH04 (Arg0, 0x00, 0x2F, Z175, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */
564 }
565 Else
566 {
567 CH04 (Arg0, 0x00, 0x31, Z175, __LINE__, 0x00, 0x00) /* AE_AML_UNINITIALIZED_LOCAL */
568 }
569 }
570
571 /* Integer */
572
573 M000 (Arg0, "int", RefOf (\AUXD.INT0), C009)
574 /* String */
575
576 M000 (Arg0, "str", RefOf (\AUXD.STR0), C00A)
577 /* Buffer */
578
579 M000 (Arg0, "buf", RefOf (\AUXD.BUF0), C00B)
580 /* Package */
581
582 If (Y286)
583 {
584 M000 (Arg0, "pac", RefOf (\AUXD.PAC0), C00C)
585 }
586
587 Local0 = ObjectType (\AUXD.PAC0)
588 If ((C00C != Local0))
589 {
590 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, Local0, C00C)
591 }
592 Else
593 {
594 Unload (\AUXD.PAC0)
595 CH04 (Arg0, 0x00, 0x2F, Z175, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */
596 }
597
598 /* Field Unit */
599
600 M000 (Arg0, "flu", RefOf (\AUXD.FLU0), C00D)
601 /* Device */
602
603 Local0 = ObjectType (\AUXD.DEV0)
604 If ((C00E != Local0))
605 {
606 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, Local0, C00E)
607 }
608 Else
609 {
610 Unload (\AUXD.DEV0)
611 CH04 (Arg0, 0x00, 0x2F, Z175, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */
612 }
613
614 /* Event */
615
616 M000 (Arg0, "evt", RefOf (\AUXD.EVE0), C00F)
617 /* Method */
618
619 M000 (Arg0, "met", RefOf (\AUXD.MMM0), C010)
620 /* Mutex */
621
622 M000 (Arg0, "mtx", RefOf (\AUXD.MTX0), C011)
623 /* OpRegion */
624
625 M000 (Arg0, "opr", RefOf (\AUXD.OPR0), C012)
626 /* Power Resource */
627
628 M000 (Arg0, "pwr", RefOf (\AUXD.PWR0), C013)
629 /* Processor */
630
631 M000 (Arg0, "cpu", RefOf (\AUXD.CPU0), C014)
632 /* Thermal Zone */
633
634 Local0 = ObjectType (\AUXD.TZN0)
635 If ((C015 != Local0))
636 {
637 ERR (Arg0, Z175, __LINE__, 0x00, 0x00, Local0, C015)
638 }
639 Else
640 {
641 Unload (\AUXD.TZN0)
642 CH04 (Arg0, 0x00, 0x2F, Z175, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */
643 }
644
645 /* Buffer Field */
646
647 M000 (Arg0, "bfl", RefOf (\AUXD.BFL0), C016)
648 Unload (DDB0)
649 CH03 (Arg0, Z175, __LINE__, 0x00, 0x00)
650 Return (0x00)
651 }
652
653 /* Exceptions when UnLoad is executed with the same DDBHandle repeatedly */
654
655 Method (TST4, 1, Serialized)
656 {
657 Name (DDB0, 0x00)
658 Name (DDB1, 0x00)
659 Concatenate (Arg0, "-tst4", Arg0)
660 /* Load auxiliary table */
661
662 \DTM0.RFU3 = \DTM0.BUF3
663 Load (\DTM0.RFU3, DDB0) /* \DTM1.TST4.DDB0 */
664 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
665 {
666 Return (0x01)
667 }
668
669 /* First Unload */
670
671 Unload (DDB0)
672 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
673 {
674 Return (0x01)
675 }
676
677 Local0 = 0x05
678 While (Local0)
679 {
680 /* Any next */
681
682 Unload (DDB0)
683 CH04 (Arg0, 0x00, 0x1C, Z175, __LINE__, 0x05, Local0) /* AE_BAD_PARAMETER */
684 Local0--
685 }
686
687 /* Second DDBHandle */
688
689 \DTM0.RFU3 = \DTM0.BUF3
690 Load (\DTM0.RFU3, DDB1) /* \DTM1.TST4.DDB1 */
691 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
692 {
693 Return (0x01)
694 }
695
696 Local0 = 0x05
697 While (Local0)
698 {
699 /* Any next */
700
701 Unload (DDB0)
702 CH04 (Arg0, 0x00, 0x1C, Z175, __LINE__, 0x05, Local0) /* AE_BAD_PARAMETER */
703 Local0--
704 }
705
706 Unload (DDB1)
707 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
708 {
709 Return (0x01)
710 }
711
712 Return (0x00)
713 }
714
715 /* Exceptions when the operand of UnLoad operator is absent */
716
717 Method (TST5, 1, Serialized)
718 {
719 Name (DDB0, 0x00)
720 Method (M000, 0, NotSerialized)
721 {
722 Return (0x00)
723 }
724
725 Method (M001, 0, NotSerialized)
726 {
727 Return (DDB0) /* \DTM1.TST5.DDB0 */
728 }
729
730 Concatenate (Arg0, "-tst5", Arg0)
731 /* Load auxiliary table */
732
733 \DTM0.RFU3 = \DTM0.BUF3
734 Load (\DTM0.RFU3, DDB0) /* \DTM1.TST5.DDB0 */
735 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
736 {
737 Return (0x01)
738 }
739
740 /* Device */
741
742 Unload (DerefOf (RefOf (\AUXD.DEV0)))
743 CH04 (Arg0, 0x00, 0x3E, Z175, __LINE__, 0x00, 0x00) /* AE_AML_NO_RETURN_VALUE */
744 /* Thermal Zone */
745
746 Unload (DerefOf (RefOf (\AUXD.TZN0)))
747 CH04 (Arg0, 0x00, 0x3E, Z175, __LINE__, 0x00, 0x00) /* AE_AML_NO_RETURN_VALUE */
748 /* Method execution */
749
750 CopyObject (M000 (), M001) /* \DTM1.TST5.M001 */
751 Unload (M001 ())
752 If (SLCK)
753 {
754 CH04 (Arg0, 0x00, 0x2F, Z175, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */
755 }
756 Else
757 {
758 CH04 (Arg0, 0x00, 0x2F, Z175, __LINE__, 0x00, 0x00) /* AE_AML_OPERAND_TYPE */
759 }
760
761 Unload (DDB0)
762 If (CH03 (Arg0, Z175, __LINE__, 0x00, 0x00))
763 {
764 Return (0x01)
765 }
766
767 Return (0x00)
768 }
769 }
770
771 Method (TUL0, 0, Serialized)
772 {
773 CH03 (__METHOD__, Z175, __LINE__, 0x00, 0x00)
774 /* Different Sources to specify DDBHandle for UnLoad. */
775 /* Most of them (Named Object, LocalX, ArgX, Derefof) */
776 /* are checked in load.asl */
777 /* DDBHandle returned by Method call */
778 SRMT ("TUL0.tst0")
779 \DTM1.TST0 (__METHOD__)
780 CH03 (__METHOD__, Z175, __LINE__, 0x00, 0x00)
781 /* All namespace objects created as a result of the corresponding */
782 /* Load operation are absent in the namespace after UnLoad */
783 SRMT ("TUL0.tst1")
784 \DTM1.TST1 (__METHOD__)
785 CH03 (__METHOD__, Z175, __LINE__, 0x00, 0x00)
786 /* Load/UnLoad processing can be done with the same table many times */
787
788 SRMT ("TUL0.tst2")
789 \DTM1.TST2 (__METHOD__)
790 CH03 (__METHOD__, Z175, __LINE__, 0x00, 0x00)
791 }
792
793 /* Exceptional conditions */
794
795 Method (TUL1, 0, Serialized)
796 {
797 /* Exceptions when the parameter of the UnLoad operator */
798 /* is not of DDBHandle type */
799 SRMT ("TUL1.tst3")
800 \DTM1.TST3 (__METHOD__)
801 /* Exceptions when UnLoad is executed with the same DDBHandle repeatedly */
802
803 SRMT ("TUL1.tst4")
804 If (Y292)
805 {
806 \DTM1.TST4 (__METHOD__)
807 }
808 Else
809 {
810 BLCK ()
811 }
812
813 /* Exceptions when the operand of UnLoad operator is absent */
814
815 SRMT ("TUL1.tst5")
816 \DTM1.TST5 (__METHOD__)
817 }