Debian Codegraph @

tests/aslts/src/runtime/collections/Identity2MS/abbu/device/device_aslts.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 * Aplicable for AcpiExec only
31 */
32
33 Name(z173, 173)
34
35 Method(dvf2,, Serialized)
36 {
37 Name(ts, "dvf2")
38 Device(d000) {
39 Name(i000, 0x00000001)
40 }
41
42 Method(m001)
43 {
44 Method(m002)
45 {
46 Method(m003)
47 {
48 Return (0xabcd0000)
49 }
50 Return (Add(\dvf2.d000.i000, m003()))
51 }
52 Return (Add(\dvf2.d000.i000, m002()))
53 }
54
55 Store(Add(\dvf2.d000.i000, m001()), Local0)
56 if (LNotEqual(Local0, 0xabcd0003)) {
57 err(ts, z173, __LINE__, 0, 0, Local0, 0xabcd0003)
58 }
59 }
60
61 /*
62 * Named object as element of Package
63 *
64 * Named element of Package, perhaps, is not implemented by MS,
65 * i000 in Package(){i000} is, on MS, the same as Package(){"i000"}.
66 */
67 Method(mf26,, Serialized)
68 {
69 Name(ts, "mf26")
70 Name(i000, 0xabcd0000)
71 Name(i001, 0xabcd0001)
72 Name(i002, 0xabcd0002)
73 Name(i003, 0xabcd0003)
74
75 Name(ii00, 0x11112222)
76
77 Name(p000, Package() {
78 i000,
79 i001,
80 i002,
81 "i000",
82 \mf26.i003,
83 0xabcd0004
84 })
85
86 Method(m001, 2)
87 {
88 Store(DerefOf(Index(arg0, 0)), Local0)
89 if (LNotEqual(Local0, 0xabcd0000)) {
90 err(ts, z164, __LINE__, 0, 0, Local0, 0xabcd0000)
91 }
92 Store(DerefOf(Index(arg0, 1)), Local0)
93 if (LNotEqual(Local0, 0xabcd0001)) {
94 err(ts, z164, __LINE__, 0, 0, Local0, 0xabcd0001)
95 }
96 Store(DerefOf(Index(arg0, 2)), Local0)
97 if (LNotEqual(Local0, 0xabcd0002)) {
98 err(ts, z164, __LINE__, 0, 0, Local0, 0xabcd0002)
99 }
100 Store(DerefOf(Index(arg0, 3)), Local0)
101 if (LNotEqual(Local0, "i000")) {
102 err(ts, z164, __LINE__, 0, 0, Local0, "i000")
103 }
104 Store(DerefOf(Index(arg0, 4)), Local0)
105 if (LNotEqual(Local0, 0xabcd0003)) {
106 err(ts, z164, __LINE__, 0, 0, Local0, 0xabcd0003)
107 }
108 Store(DerefOf(Index(arg0, 5)), Local0)
109 if (LNotEqual(Local0, 0xabcd0004)) {
110 err(ts, z164, __LINE__, 0, 0, Local0, 0xabcd0004)
111 }
112
113 Store(ii00, Index(arg0, 0))
114
115 Store(DerefOf(Index(arg0, 0)), Local0)
116 if (LNotEqual(Local0, 0x11112222)) {
117 err(ts, z164, __LINE__, 0, 0, Local0, 0x11112222)
118 }
119 }
120
121 m001(p000, RefOf(p000))
122
123 Store(DerefOf(Index(p000, 0)), Local0)
124 if (LNotEqual(Local0, 0x11112222)) {
125 err(ts, z164, __LINE__, 0, 0, Local0, 0x11112222)
126 }
127
128 Store(DerefOf(Index(p000, 1)), Local0)
129 if (LNotEqual(Local0, 0xabcd0001)) {
130 err(ts, z164, __LINE__, 0, 0, Local0, 0xabcd0001)
131 }
132
133 Store(DerefOf(Index(p000, 2)), Local0)
134 if (LNotEqual(Local0, 0xabcd0002)) {
135 err(ts, z164, __LINE__, 0, 0, Local0, 0xabcd0002)
136 }
137
138 Store(DerefOf(Index(p000, 3)), Local0)
139 if (LNotEqual(Local0, "i000")) {
140 err(ts, z164, __LINE__, 0, 0, Local0, "i000")
141 }
142
143 Store(DerefOf(Index(p000, 4)), Local0)
144 if (LNotEqual(Local0, 0xabcd0003)) {
145 err(ts, z164, __LINE__, 0, 0, Local0, 0xabcd0003)
146 }
147
148 Store(DerefOf(Index(p000, 5)), Local0)
149 if (LNotEqual(Local0, 0xabcd0004)) {
150 err(ts, z164, __LINE__, 0, 0, Local0, 0xabcd0004)
151 }
152 }