Debian Codegraph @

tests/aslts/src/runtime/common/datastproc.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 * Methods applied to the Standard Data
30 */
31 Name (Z115, 0x73)
32 /* Check original values */
33 /* arg0 - test name */
34 /* arg1 - Integer, original object */
35 /* arg2 - absolute index of file initiating the checking */
36 /* arg3 - line number of checking (inside the file) */
37 Method (M380, 4, NotSerialized)
38 {
39 Local0 = ObjectType (Arg1)
40 If ((Local0 != C009))
41 {
42 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local0, C009)
43 }
44 ElseIf ((Arg1 != 0x77))
45 {
46 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Arg1, 0x77)
47 }
48 }
49
50 /* arg0 - test name */
51 /* arg1 - String, original object */
52 /* arg2 - absolute index of file initiating the checking */
53 /* arg3 - line number of checking (inside the file) */
54 Method (M381, 4, NotSerialized)
55 {
56 Local0 = ObjectType (Arg1)
57 If ((Local0 != C00A))
58 {
59 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local0, C00A)
60 }
61 ElseIf ((Arg1 != "qwer0000"))
62 {
63 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Arg1, "qwer0000")
64 }
65 }
66
67 /* arg0 - test name */
68 /* arg1 - Buffer, original object */
69 /* arg2 - absolute index of file initiating the checking */
70 /* arg3 - line number of checking (inside the file) */
71 Method (M382, 4, NotSerialized)
72 {
73 Local0 = ObjectType (Arg1)
74 If ((Local0 != C00B))
75 {
76 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local0, C00B)
77 }
78 ElseIf ((Arg1 != Buffer (0x04)
79 {
80 0x01, 0x77, 0x03, 0x04 // .w..
81 }))
82 {
83 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Arg1, Buffer (0x04)
84 {
85 0x01, 0x77, 0x03, 0x04 // .w..
86 })
87 }
88 }
89
90 /* arg0 - test name */
91 /* arg1 - Package, original object */
92 /* arg2 - absolute index of file initiating the checking */
93 /* arg3 - line number of checking (inside the file) */
94 Method (M383, 4, NotSerialized)
95 {
96 Local0 = ObjectType (Arg1)
97 If ((Local0 != C00C))
98 {
99 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local0, C00C)
100 }
101 Else
102 {
103 Local0 = Arg1 [0x00]
104 Local1 = DerefOf (Local0)
105 If ((Local1 != 0x05))
106 {
107 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local1, 0x05)
108 }
109
110 Local0 = Arg1 [0x01]
111 Local1 = DerefOf (Local0)
112 If ((Local1 != 0x77))
113 {
114 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local1, 0x77)
115 }
116
117 Local0 = Arg1 [0x02]
118 Local1 = DerefOf (Local0)
119 If ((Local1 != 0x07))
120 {
121 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local1, 0x07)
122 }
123 }
124 }
125
126 /* Check result of writing */
127 /* arg0 - test name */
128 /* arg1 - Integer, original object */
129 /* arg2 - absolute index of file initiating the checking */
130 /* arg3 - line number of checking (inside the file) */
131 Method (M384, 4, NotSerialized)
132 {
133 Local0 = ObjectType (Arg1)
134 If ((Local0 != C009))
135 {
136 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local0, C009)
137 }
138 ElseIf ((Arg1 != 0x2B))
139 {
140 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Arg1, 0x2B)
141 }
142 }
143
144 /* arg0 - test name */
145 /* arg1 - String, original object */
146 /* arg2 - absolute index of file initiating the checking */
147 /* arg3 - line number of checking (inside the file) */
148 Method (M385, 4, NotSerialized)
149 {
150 Local0 = ObjectType (Arg1)
151 If ((Local0 != C00A))
152 {
153 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local0, C00A)
154 }
155 ElseIf ((Arg1 != "q+er0000"))
156 {
157 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Arg1, "q+er0000")
158 }
159 }
160
161 /* arg0 - test name */
162 /* arg1 - Buffer, original object */
163 /* arg2 - absolute index of file initiating the checking */
164 /* arg3 - line number of checking (inside the file) */
165 Method (M386, 4, NotSerialized)
166 {
167 Local0 = ObjectType (Arg1)
168 If ((Local0 != C00B))
169 {
170 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local0, C00B)
171 }
172 ElseIf ((Arg1 != Buffer (0x04)
173 {
174 0x01, 0x2B, 0x03, 0x04 // .+..
175 }))
176 {
177 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Arg1, Buffer (0x04)
178 {
179 0x01, 0x2B, 0x03, 0x04 // .+..
180 })
181 }
182 }
183
184 /* arg0 - test name */
185 /* arg1 - Package, original object */
186 /* arg2 - absolute index of file initiating the checking */
187 /* arg3 - line number of checking (inside the file) */
188 Method (M387, 4, NotSerialized)
189 {
190 Local0 = ObjectType (Arg1)
191 If ((Local0 != C00C))
192 {
193 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local0, C00C)
194 }
195 Else
196 {
197 Local0 = Arg1 [0x00]
198 Local1 = DerefOf (Local0)
199 If ((Local1 != 0x05))
200 {
201 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local1, 0x05)
202 }
203
204 Local0 = Arg1 [0x01]
205 Local1 = DerefOf (Local0)
206 If ((Local1 != 0x2B))
207 {
208 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local1, 0x2B)
209 }
210
211 Local0 = Arg1 [0x02]
212 Local1 = DerefOf (Local0)
213 If ((Local1 != 0x07))
214 {
215 ERR (Arg0, Z115, __LINE__, Arg2, Arg3, Local1, 0x07)
216 }
217 }
218 }
219
220 /* arg0 - original object */
221 /* arg1 - type of it */
222 /* arg2 - absolute index of file initiating the checking */
223 /* arg3 - line number of checking (inside the file) */
224 Method (M390, 4, Serialized)
225 {
226 Name (TS, "m390")
227 If ((Arg1 == C009))
228 {
229 M380 (TS, Arg0, Arg2, __LINE__)
230 }
231 ElseIf ((Arg1 == C00A))
232 {
233 M381 (TS, Arg0, Arg2, __LINE__)
234 }
235 ElseIf ((Arg1 == C00B))
236 {
237 M382 (TS, Arg0, Arg2, __LINE__)
238 }
239 ElseIf ((Arg1 == C00C))
240 {
241 M383 (TS, Arg0, Arg2, __LINE__)
242 }
243 }
244
245 /* arg0 - original object */
246 /* arg1 - type of it */
247 /* arg2 - absolute index of file initiating the checking */
248 /* arg3 - line number of checking (inside the file) */
249 Method (M391, 4, Serialized)
250 {
251 Name (TS, "m391")
252 If ((Arg1 == C009))
253 {
254 M384 (TS, Arg0, Arg2, __LINE__)
255 }
256 ElseIf ((Arg1 == C00A))
257 {
258 M385 (TS, Arg0, Arg2, __LINE__)
259 }
260 ElseIf ((Arg1 == C00B))
261 {
262 M386 (TS, Arg0, Arg2, __LINE__)
263 }
264 ElseIf ((Arg1 == C00C))
265 {
266 M387 (TS, Arg0, Arg2, __LINE__)
267 }
268 }