Debian Codegraph @

tests/aslts/src/runtime/collections/bdemo/ACPICA/0230/DECL.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 * Bug 230:
30 *
31 * SUMMARY: ReturnType argument of Method declaration is not supported
32 */
33 Method (M127, 0, Serialized)
34 {
35 /* Data to be passed to Method */
36
37 Name (I000, 0xFE7CB391D65A0000)
38 Name (S000, "12340002")
39 Name (B000, Buffer (0x04)
40 {
41 0x01, 0x02, 0x03, 0x04 // ....
42 })
43 Name (B001, Buffer (0x05)
44 {
45 0xB0, 0xB1, 0xB2, 0xB3, 0xB4 // .....
46 })
47 Name (P000, Package (0x04)
48 {
49 0x01,
50 0x02,
51 0x03,
52 0x04
53 })
54 Event (E000)
55 Mutex (MX00, 0x00)
56 Device (D000)
57 {
58 Name (I000, 0xABCD0017)
59 }
60
61 ThermalZone (TZ00)
62 {
63 }
64
65 Processor (PR00, 0x00, 0xFFFFFFFF, 0x00){}
66 OperationRegion (R900, SystemMemory, 0x0100, 0x0100)
67 OperationRegion (R9Z0, SystemMemory, 0x0100, 0x0100)
68 PowerResource (PW90, 0x01, 0x0000)
69 {
70 Method (MMMM, 0, NotSerialized)
71 {
72 Return (0x00)
73 }
74 }
75
76 CreateField (B001, 0x00, 0x08, BF90)
77 Field (R9Z0, ByteAcc, NoLock, Preserve)
78 {
79 F900, 8,
80 F901, 8,
81 F902, 8,
82 F903, 8
83 }
84
85 BankField (R9Z0, F901, 0x00, ByteAcc, NoLock, Preserve)
86 {
87 BN90, 4
88 }
89
90 IndexField (F902, F903, ByteAcc, NoLock, Preserve)
91 {
92 IF90, 8,
93 IF91, 8
94 }
95
96 Method (MMM0, 0, NotSerialized)
97 {
98 Return ("mmm0")
99 }
100
101 /* Method */
102
103 Method (M000, 0, NotSerialized)
104 {
105 Return (I000) /* \M127.I000 */
106 }
107
108 Method (M001, 0, NotSerialized)
109 {
110 Return (S000) /* \M127.S000 */
111 }
112
113 Method (M002, 0, NotSerialized)
114 {
115 Return (B000) /* \M127.B000 */
116 }
117
118 Method (M003, 0, NotSerialized)
119 {
120 Return (P000) /* \M127.P000 */
121 }
122
123 Method (M004, 0, NotSerialized)
124 {
125 Return (E000) /* \M127.E000 */
126 }
127
128 Method (M005, 0, NotSerialized)
129 {
130 Return (MX00) /* \M127.MX00 */
131 }
132
133 Method (M006, 0, NotSerialized)
134 {
135 Return (D000) /* \M127.D000 */
136 }
137
138 Method (M007, 0, NotSerialized)
139 {
140 Return (TZ00) /* \M127.TZ00 */
141 }
142
143 Method (M008, 0, NotSerialized)
144 {
145 Return (PR00) /* \M127.PR00 */
146 }
147
148 Method (M009, 0, NotSerialized)
149 {
150 Return (R900) /* \M127.R900 */
151 }
152
153 Method (M00A, 0, NotSerialized)
154 {
155 Return (PW90) /* \M127.PW90 */
156 }
157
158 Method (M00B, 0, NotSerialized)
159 {
160 Return (BF90) /* \M127.BF90 */
161 }
162
163 Method (M00C, 0, NotSerialized)
164 {
165 Return (F900) /* \M127.F900 */
166 }
167
168 Method (M00D, 0, NotSerialized)
169 {
170 Return (BN90) /* \M127.BN90 */
171 }
172
173 Method (M00E, 0, NotSerialized)
174 {
175 Return (IF90) /* \M127.IF90 */
176 }
177
178 Method (M00F, 0, NotSerialized)
179 {
180 Return (MMM0 ())
181 }
182
183 Method (M010, 0, NotSerialized)
184 {
185 Return (0xFE7CB391D65A0000)
186 }
187
188 Method (M011, 0, NotSerialized)
189 {
190 Return ("12340002")
191 }
192
193 Method (M012, 0, NotSerialized)
194 {
195 Return (Buffer (0x04)
196 {
197 0x01, 0x02, 0x03, 0x04 // ....
198 })
199 }
200
201 Method (M013, 0, NotSerialized)
202 {
203 Return (Package (0x04)
204 {
205 0x01,
206 0x02,
207 0x03,
208 0x04
209 })
210 }
211
212 Method (M100, 0, NotSerialized)
213 {
214 Debug = "Start of test"
215 M000 ()
216 M001 ()
217 M002 ()
218 M003 ()
219 M004 ()
220 M005 ()
221 M006 ()
222 M007 ()
223 M008 ()
224 M009 ()
225 M00A ()
226 M00B ()
227 M00C ()
228 M00D ()
229 M00E ()
230 M00F ()
231 M010 ()
232 M011 ()
233 M012 ()
234 M013 ()
235 Debug = "Finish of test"
236 }
237
238 CH03 (__METHOD__, 0x00, __LINE__, 0x00, 0x00)
239 M100 ()
240 /* Expect either ASL compiler error or any AML interpreter exception */
241
242 CH04 (__METHOD__, 0x00, 0xFF, 0x00, __LINE__, 0x00, 0x00)
243 }