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     * Resource Descriptor macros
30     *
31     * Start/End Dependent Function Resource Descriptor Macro
32     */
33    Name (P406, Package (0x0E)
34    {
35        ResourceTemplate ()
36        {
37            StartDependentFnNoPri ()
38            {
39            }
40            EndDependentFn ()
41        },
42
43        ResourceTemplate ()
44        {
45            StartDependentFn (0x00, 0x00)
46            {
47            }
48            EndDependentFn ()
49        },
50
51        ResourceTemplate ()
52        {
53            StartDependentFn (0x00, 0x01)
54            {
55            }
56            EndDependentFn ()
57        },
58
59        ResourceTemplate ()
60        {
61            StartDependentFn (0x00, 0x02)
62            {
63            }
64            EndDependentFn ()
65        },
66
67        ResourceTemplate ()
68        {
69            StartDependentFn (0x01, 0x00)
70            {
71            }
72            EndDependentFn ()
73        },
74
75        ResourceTemplate ()
76        {
77            StartDependentFn (0x01, 0x01)
78            {
79            }
80            EndDependentFn ()
81        },
82
83        ResourceTemplate ()
84        {
85            StartDependentFn (0x01, 0x02)
86            {
87            }
88            EndDependentFn ()
89        },
90
91        ResourceTemplate ()
92        {
93            StartDependentFn (0x02, 0x00)
94            {
95            }
96            EndDependentFn ()
97        },
98
99        ResourceTemplate ()
100        {
101            StartDependentFn (0x02, 0x01)
102            {
103            }
104            EndDependentFn ()
105        },
106
107        ResourceTemplate ()
108        {
109            StartDependentFn (0x02, 0x02)
110            {
111            }
112            EndDependentFn ()
113        },
114
115        ResourceTemplate ()
116        {
117            StartDependentFnNoPri ()
118            {
119            }
120            StartDependentFnNoPri ()
121            {
122            }
123            StartDependentFnNoPri ()
124            {
125            }
126            EndDependentFn ()
127        },
128
129        ResourceTemplate ()
130        {
131            StartDependentFn (0x01, 0x01)
132            {
133            }
134            StartDependentFn (0x01, 0x01)
135            {
136            }
137            StartDependentFn (0x01, 0x01)
138            {
139            }
140            EndDependentFn ()
141        },
142
143        ResourceTemplate ()
144        {
145            StartDependentFn (0x00, 0x00)
146            {
147            }
148            StartDependentFn (0x00, 0x01)
149            {
150            }
151            StartDependentFn (0x00, 0x02)
152            {
153            }
154            StartDependentFn (0x01, 0x00)
155            {
156            }
157            StartDependentFn (0x01, 0x01)
158            {
159            }
160            StartDependentFn (0x01, 0x02)
161            {
162            }
163            StartDependentFn (0x02, 0x00)
164            {
165            }
166            StartDependentFn (0x02, 0x01)
167            {
168            }
169            StartDependentFn (0x02, 0x02)
170            {
171            }
172            EndDependentFn ()
173        },
174
175        ResourceTemplate ()
176        {
177            StartDependentFn (0x00, 0x00)
178            {
179            }
180            EndDependentFn ()
181            StartDependentFn (0x00, 0x01)
182            {
183            }
184            StartDependentFn (0x00, 0x02)
185            {
186            }
187            EndDependentFn ()
188            StartDependentFn (0x01, 0x00)
189            {
190            }
191            StartDependentFn (0x01, 0x01)
192            {
193            }
194            StartDependentFn (0x01, 0x02)
195            {
196            }
197            EndDependentFn ()
198            StartDependentFn (0x02, 0x00)
199            {
200            }
201            EndDependentFn ()
202            StartDependentFn (0x02, 0x01)
203            {
204            }
205            EndDependentFn ()
206            StartDependentFn (0x02, 0x02)
207            {
208            }
209            EndDependentFn ()
210        }
211    })
212    /*
213     ACPI Specification, Revision 3.0, September 2, 2004
214     6.4.2.3   Start Dependent Functions Descriptor
215     Start Dependent Functions Descriptor layout (length = 1):
216     Byte 0 (Tag Bits): Value = 00110001B (0x31)(Type = 0, small item name = 0x6, length = 1)
217     Byte 1 (Priority byte ):
218     Bits[3:2]	Performance/robustness. Acceptable values are:
219     0	Good configuration: Highest Priority and preferred configuration
220     1	Acceptable configuration: Lower Priority but acceptable configuration
221     2	Sub-optimal configuration: Functional configuration but not optimal
222     3	Reserved
223     Bits[1:0]	Compatibility priority. Acceptable values are:
224     0	Good configuration: Highest Priority and preferred configuration
225     1	Acceptable configuration: Lower Priority but acceptable configuration
226     2	Sub-optimal configuration: Functional configuration but not optimal
227     3	Reserved
228     Start Dependent Functions Descriptor layout (length = 0):
229     Byte 0 (Tag Bits): Value = 00110000B (0x30)(Type = 0, small item name = 0x6, length = 0)
230     6.4.2.4   End Dependent Functions Descriptor
231     End Dependent Functions Descriptor layout:
232     Byte 0 (Tag Bits): Value = 00111000B (0x38)(Type = 0, small item name = 0x7 length =0)
233     */
234    Name (P407, Package (0x0E)
235    {
236        ResourceTemplate ()
237        {
238            StartDependentFnNoPri ()
239            {
240            }
241            EndDependentFn ()
242        },
243
244        ResourceTemplate ()
245        {
246            StartDependentFn (0x00, 0x00)
247            {
248            }
249            EndDependentFn ()
250        },
251
252        ResourceTemplate ()
253        {
254            StartDependentFn (0x00, 0x01)
255            {
256            }
257            EndDependentFn ()
258        },
259
260        ResourceTemplate ()
261        {
262            StartDependentFn (0x00, 0x02)
263            {
264            }
265            EndDependentFn ()
266        },
267
268        ResourceTemplate ()
269        {
270            StartDependentFn (0x01, 0x00)
271            {
272            }
273            EndDependentFn ()
274        },
275
276        ResourceTemplate ()
277        {
278            StartDependentFn (0x01, 0x01)
279            {
280            }
281            EndDependentFn ()
282        },
283
284        ResourceTemplate ()
285        {
286            StartDependentFn (0x01, 0x02)
287            {
288            }
289            EndDependentFn ()
290        },
291
292        ResourceTemplate ()
293        {
294            StartDependentFn (0x02, 0x00)
295            {
296            }
297            EndDependentFn ()
298        },
299
300        ResourceTemplate ()
301        {
302            StartDependentFn (0x02, 0x01)
303            {
304            }
305            EndDependentFn ()
306        },
307
308        ResourceTemplate ()
309        {
310            StartDependentFn (0x02, 0x02)
311            {
312            }
313            EndDependentFn ()
314        },
315
316        ResourceTemplate ()
317        {
318            StartDependentFnNoPri ()
319            {
320            }
321            StartDependentFnNoPri ()
322            {
323            }
324            StartDependentFnNoPri ()
325            {
326            }
327            EndDependentFn ()
328        },
329
330        ResourceTemplate ()
331        {
332            StartDependentFn (0x01, 0x01)
333            {
334            }
335            StartDependentFn (0x01, 0x01)
336            {
337            }
338            StartDependentFn (0x01, 0x01)
339            {
340            }
341            EndDependentFn ()
342        },
343
344        ResourceTemplate ()
345        {
346            StartDependentFn (0x00, 0x00)
347            {
348            }
349            StartDependentFn (0x00, 0x01)
350            {
351            }
352            StartDependentFn (0x00, 0x02)
353            {
354            }
355            StartDependentFn (0x01, 0x00)
356            {
357            }
358            StartDependentFn (0x01, 0x01)
359            {
360            }
361            StartDependentFn (0x01, 0x02)
362            {
363            }
364            StartDependentFn (0x02, 0x00)
365            {
366            }
367            StartDependentFn (0x02, 0x01)
368            {
369            }
370            StartDependentFn (0x02, 0x02)
371            {
372            }
373            EndDependentFn ()
374        },
375
376        ResourceTemplate ()
377        {
378            StartDependentFn (0x00, 0x00)
379            {
380            }
381            EndDependentFn ()
382            StartDependentFn (0x00, 0x01)
383            {
384            }
385            StartDependentFn (0x00, 0x02)
386            {
387            }
388            EndDependentFn ()
389            StartDependentFn (0x01, 0x00)
390            {
391            }
392            StartDependentFn (0x01, 0x01)
393            {
394            }
395            StartDependentFn (0x01, 0x02)
396            {
397            }
398            EndDependentFn ()
399            StartDependentFn (0x02, 0x00)
400            {
401            }
402            EndDependentFn ()
403            StartDependentFn (0x02, 0x01)
404            {
405            }
406            EndDependentFn ()
407            StartDependentFn (0x02, 0x02)
408            {
409            }
410            EndDependentFn ()
411        }
412    })
413    Method (RT04, 0, Serialized)
414    {
415        /* Emit test header, set the filename */
416
417        THDR (__METHOD__, "Start/End DependentFunction Resource Descriptor Macro", "dependentfn.asl")
418        /* Main test case for packages above */
419
420        M330 (__METHOD__, 0x0E, "p406", P406, P407)
421    }
422