• Home
  • History
  • Annotate
  • Line#
  • Navigate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/acpica/tests/aslts/src/runtime/collections/functional/descriptor/
1/*
2 * Some or all of this work - Copyright (c) 2006 - 2016, 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 * Resource Descriptor macros
31 *
32 * Start/End Dependent Function Resource Descriptor Macro
33 */
34
35Name (p406, Package() {
36	ResourceTemplate () {
37		StartDependentFnNoPri () {}
38		EndDependentFn ()
39	},
40	ResourceTemplate () {
41		StartDependentFn (0, 0) {}
42		EndDependentFn ()
43	},
44	ResourceTemplate () {
45		StartDependentFn (0, 1) {}
46		EndDependentFn ()
47	},
48	ResourceTemplate () {
49		StartDependentFn (0, 2) {}
50		EndDependentFn ()
51	},
52	ResourceTemplate () {
53		StartDependentFn (1, 0) {}
54		EndDependentFn ()
55	},
56	ResourceTemplate () {
57		StartDependentFn (1, 1) {}
58		EndDependentFn ()
59	},
60	ResourceTemplate () {
61		StartDependentFn (1, 2) {}
62		EndDependentFn ()
63	},
64	ResourceTemplate () {
65		StartDependentFn (2, 0) {}
66		EndDependentFn ()
67	},
68	ResourceTemplate () {
69		StartDependentFn (2, 1) {}
70		EndDependentFn ()
71	},
72	ResourceTemplate () {
73		StartDependentFn (2, 2) {}
74		EndDependentFn ()
75	},
76	ResourceTemplate () {
77		StartDependentFnNoPri () {}
78		StartDependentFnNoPri () {}
79		StartDependentFnNoPri () {}
80		EndDependentFn ()
81	},
82	ResourceTemplate () {
83		StartDependentFn (1, 1) {}
84		StartDependentFn (1, 1) {}
85		StartDependentFn (1, 1) {}
86		EndDependentFn ()
87	},
88	ResourceTemplate () {
89		StartDependentFn (0, 0) {}
90		StartDependentFn (0, 1) {}
91		StartDependentFn (0, 2) {}
92		StartDependentFn (1, 0) {}
93		StartDependentFn (1, 1) {}
94		StartDependentFn (1, 2) {}
95		StartDependentFn (2, 0) {}
96		StartDependentFn (2, 1) {}
97		StartDependentFn (2, 2) {}
98		EndDependentFn ()
99	},
100
101	ResourceTemplate () {
102		StartDependentFn (0, 0) {}
103		EndDependentFn ()
104		StartDependentFn (0, 1) {}
105		StartDependentFn (0, 2) {}
106		EndDependentFn ()
107		StartDependentFn (1, 0) {}
108		StartDependentFn (1, 1) {}
109		StartDependentFn (1, 2) {}
110		EndDependentFn ()
111		StartDependentFn (2, 0) {}
112		EndDependentFn ()
113		StartDependentFn (2, 1) {}
114		EndDependentFn ()
115		StartDependentFn (2, 2) {}
116		EndDependentFn ()
117	},
118})
119
120/*
121ACPI Specification, Revision 3.0, September 2, 2004
1226.4.2.3   Start Dependent Functions Descriptor
123
124Start Dependent Functions Descriptor layout (length = 1):
125
126Byte 0 (Tag Bits): Value = 00110001B (0x31)(Type = 0, small item name = 0x6, length = 1)
127
128Byte 1 (Priority byte ):
129Bits[3:2]	Performance/robustness. Acceptable values are:
130	0	Good configuration: Highest Priority and preferred configuration
131	1	Acceptable configuration: Lower Priority but acceptable configuration
132	2	Sub-optimal configuration: Functional configuration but not optimal
133	3	Reserved
134Bits[1:0]	Compatibility priority. Acceptable values are:
135	0	Good configuration: Highest Priority and preferred configuration
136	1	Acceptable configuration: Lower Priority but acceptable configuration
137	2	Sub-optimal configuration: Functional configuration but not optimal
138	3	Reserved
139
140Start Dependent Functions Descriptor layout (length = 0):
141
142Byte 0 (Tag Bits): Value = 00110000B (0x30)(Type = 0, small item name = 0x6, length = 0)
143
1446.4.2.4   End Dependent Functions Descriptor
145
146End Dependent Functions Descriptor layout:
147
148Byte 0 (Tag Bits): Value = 00111000B (0x38)(Type = 0, small item name = 0x7 length =0)
149*/
150
151Name (p407, Package() {
152	Buffer () {0x30, 0x38, 0x79, 0x00},
153	Buffer () {0x31, 0x00, 0x38, 0x79, 0x00},
154	Buffer () {0x31, 0x04, 0x38, 0x79, 0x00},
155	Buffer () {0x31, 0x08, 0x38, 0x79, 0x00},
156	Buffer () {0x31, 0x01, 0x38, 0x79, 0x00},
157	Buffer () {0x31, 0x05, 0x38, 0x79, 0x00},
158	Buffer () {0x31, 0x09, 0x38, 0x79, 0x00},
159	Buffer () {0x31, 0x02, 0x38, 0x79, 0x00},
160	Buffer () {0x31, 0x06, 0x38, 0x79, 0x00},
161	Buffer () {0x31, 0x0a, 0x38, 0x79, 0x00},
162	Buffer () {0x30, 0x30, 0x30, 0x38, 0x79, 0x00},
163	Buffer () {0x31, 0x05, 0x31, 0x05, 0x31, 0x05, 0x38, 0x79, 0x00},
164	Buffer () {0x31, 0x00, 0x31, 0x04, 0x31, 0x08, 0x31, 0x01, 0x31, 0x05,
165		0x31, 0x09, 0x31, 0x02, 0x31, 0x06, 0x31, 0x0a, 0x38, 0x79, 0x00},
166	Buffer () {0x31, 0x00, 0x38, 0x31, 0x04, 0x31, 0x08, 0x38, 0x31, 0x01, 0x31, 0x05,
167		0x31, 0x09, 0x38, 0x31, 0x02, 0x38, 0x31, 0x06, 0x38, 0x31, 0x0a, 0x38, 0x79, 0x00},
168})
169
170Method(RT04,, Serialized)
171{
172	Name(ts, "RT04")
173
174	// Emit test header, set the filename
175
176	THDR (ts, "Start/End DependentFunction Resource Descriptor Macro", __FILE__)
177
178    // Main test case for packages above
179
180	m330(ts, 14, "p406", p406, p407)
181}
182