xref: /openbmc/linux/drivers/acpi/acpica/acpredef.h (revision 8ffdff6a)
1 /* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0 */
2 /******************************************************************************
3  *
4  * Name: acpredef - Information table for ACPI predefined methods and objects
5  *
6  * Copyright (C) 2000 - 2021, Intel Corp.
7  *
8  *****************************************************************************/
9 
10 #ifndef __ACPREDEF_H__
11 #define __ACPREDEF_H__
12 
13 /******************************************************************************
14  *
15  * Return Package types
16  *
17  * 1) PTYPE1 packages do not contain subpackages.
18  *
19  * ACPI_PTYPE1_FIXED: Fixed-length length, 1 or 2 object types:
20  *      object type
21  *      count
22  *      object type
23  *      count
24  *
25  * ACPI_PTYPE1_VAR: Variable-length length. Zero-length package is allowed:
26  *      object type (Int/Buf/Ref)
27  *
28  * ACPI_PTYPE1_OPTION: Package has some required and some optional elements
29  *      (Used for _PRW)
30  *
31  *
32  * 2) PTYPE2 packages contain a Variable-length number of subpackages. Each
33  *    of the different types describe the contents of each of the subpackages.
34  *
35  * ACPI_PTYPE2: Each subpackage contains 1 or 2 object types. Zero-length
36  *      parent package is allowed:
37  *      object type
38  *      count
39  *      object type
40  *      count
41  *      (Used for _ALR,_MLS,_PSS,_TRT,_TSS)
42  *
43  * ACPI_PTYPE2_COUNT: Each subpackage has a count as first element.
44  *      Zero-length parent package is allowed:
45  *      object type
46  *      (Used for _CSD,_PSD,_TSD)
47  *
48  * ACPI_PTYPE2_PKG_COUNT: Count of subpackages at start, 1 or 2 object types:
49  *      object type
50  *      count
51  *      object type
52  *      count
53  *      (Used for _CST)
54  *
55  * ACPI_PTYPE2_FIXED: Each subpackage is of Fixed-length. Zero-length
56  *      parent package is allowed.
57  *      (Used for _PRT)
58  *
59  * ACPI_PTYPE2_MIN: Each subpackage has a Variable-length but minimum length.
60  *      Zero-length parent package is allowed:
61  *      (Used for _HPX)
62  *
63  * ACPI_PTYPE2_REV_FIXED: Revision at start, each subpackage is Fixed-length
64  *      (Used for _ART, _FPS)
65  *
66  * ACPI_PTYPE2_FIX_VAR: Each subpackage consists of some fixed-length elements
67  *      followed by an optional element. Zero-length parent package is allowed.
68  *      object type
69  *      count
70  *      object type
71  *      count = 0 (optional)
72  *      (Used for _DLM)
73  *
74  * ACPI_PTYPE2_VAR_VAR: Variable number of subpackages, each of either a
75  *      constant or variable length. The subpackages are preceded by a
76  *      constant number of objects.
77  *      (Used for _LPI, _RDI)
78  *
79  * ACPI_PTYPE2_UUID_PAIR: Each subpackage is preceded by a UUID Buffer. The UUID
80  *      defines the format of the package. Zero-length parent package is
81  *      allowed.
82  *      (Used for _DSD)
83  *
84  *****************************************************************************/
85 
86 enum acpi_return_package_types {
87 	ACPI_PTYPE1_FIXED = 1,
88 	ACPI_PTYPE1_VAR = 2,
89 	ACPI_PTYPE1_OPTION = 3,
90 	ACPI_PTYPE2 = 4,
91 	ACPI_PTYPE2_COUNT = 5,
92 	ACPI_PTYPE2_PKG_COUNT = 6,
93 	ACPI_PTYPE2_FIXED = 7,
94 	ACPI_PTYPE2_MIN = 8,
95 	ACPI_PTYPE2_REV_FIXED = 9,
96 	ACPI_PTYPE2_FIX_VAR = 10,
97 	ACPI_PTYPE2_VAR_VAR = 11,
98 	ACPI_PTYPE2_UUID_PAIR = 12,
99 	ACPI_PTYPE_CUSTOM = 13
100 };
101 
102 /* Support macros for users of the predefined info table */
103 
104 #define METHOD_PREDEF_ARGS_MAX          5
105 #define METHOD_ARG_BIT_WIDTH            3
106 #define METHOD_ARG_MASK                 0x0007
107 #define ARG_COUNT_IS_MINIMUM            0x8000
108 #define METHOD_MAX_ARG_TYPE             ACPI_TYPE_PACKAGE
109 
110 #define METHOD_GET_ARG_COUNT(arg_list)  ((arg_list) & METHOD_ARG_MASK)
111 #define METHOD_GET_NEXT_TYPE(arg_list)  (((arg_list) >>= METHOD_ARG_BIT_WIDTH) & METHOD_ARG_MASK)
112 
113 /* Macros used to build the predefined info table */
114 
115 #define METHOD_0ARGS                    0
116 #define METHOD_1ARGS(a1)                (1 | (a1 << 3))
117 #define METHOD_2ARGS(a1,a2)             (2 | (a1 << 3) | (a2 << 6))
118 #define METHOD_3ARGS(a1,a2,a3)          (3 | (a1 << 3) | (a2 << 6) | (a3 << 9))
119 #define METHOD_4ARGS(a1,a2,a3,a4)       (4 | (a1 << 3) | (a2 << 6) | (a3 << 9) | (a4 << 12))
120 #define METHOD_5ARGS(a1,a2,a3,a4,a5)    (5 | (a1 << 3) | (a2 << 6) | (a3 << 9) | (a4 << 12) | (a5 << 15))
121 
122 #define METHOD_RETURNS(type)            (type)
123 #define METHOD_NO_RETURN_VALUE          0
124 
125 #define PACKAGE_INFO(a,b,c,d,e,f)       {{{(a),(b),(c),(d)}, ((((u16)(f)) << 8) | (e)), 0}}
126 
127 /* Support macros for the resource descriptor info table */
128 
129 #define WIDTH_1                         0x0001
130 #define WIDTH_2                         0x0002
131 #define WIDTH_3                         0x0004
132 #define WIDTH_8                         0x0008
133 #define WIDTH_16                        0x0010
134 #define WIDTH_32                        0x0020
135 #define WIDTH_64                        0x0040
136 #define VARIABLE_DATA                   0x0080
137 #define NUM_RESOURCE_WIDTHS             8
138 
139 #define WIDTH_ADDRESS                   WIDTH_16 | WIDTH_32 | WIDTH_64
140 
141 #ifdef ACPI_CREATE_PREDEFINED_TABLE
142 /******************************************************************************
143  *
144  * Predefined method/object information table.
145  *
146  * These are the names that can actually be evaluated via acpi_evaluate_object.
147  * Not present in this table are the following:
148  *
149  *      1) Predefined/Reserved names that are not usually evaluated via
150  *         acpi_evaluate_object:
151  *              _Lxx and _Exx GPE methods
152  *              _Qxx EC methods
153  *              _T_x compiler temporary variables
154  *              _Wxx wake events
155  *
156  *      2) Predefined names that never actually exist within the AML code:
157  *              Predefined resource descriptor field names
158  *
159  *      3) Predefined names that are implemented within ACPICA:
160  *              _OSI
161  *
162  * The main entries in the table each contain the following items:
163  *
164  * name                 - The ACPI reserved name
165  * argument_list        - Contains (in 16 bits), the number of required
166  *                        arguments to the method (3 bits), and a 3-bit type
167  *                        field for each argument (up to 4 arguments). The
168  *                        METHOD_?ARGS macros generate the correct packed data.
169  * expected_btypes      - Allowed type(s) for the return value.
170  *                        0 means that no return value is expected.
171  *
172  * For methods that return packages, the next entry in the table contains
173  * information about the expected structure of the package. This information
174  * is saved here (rather than in a separate table) in order to minimize the
175  * overall size of the stored data.
176  *
177  * Note: The additional braces are intended to promote portability.
178  *
179  * Note2: Table is used by the kernel-resident subsystem, the iASL compiler,
180  * and the acpi_help utility.
181  *
182  * TBD: _PRT - currently ignore reversed entries. Attempt to fix in nsrepair.
183  * Possibly fixing package elements like _BIF, etc.
184  *
185  *****************************************************************************/
186 
187 const union acpi_predefined_info acpi_gbl_predefined_methods[] = {
188 	{{"_AC0", METHOD_0ARGS,
189 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
190 
191 	{{"_AC1", METHOD_0ARGS,
192 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
193 
194 	{{"_AC2", METHOD_0ARGS,
195 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
196 
197 	{{"_AC3", METHOD_0ARGS,
198 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
199 
200 	{{"_AC4", METHOD_0ARGS,
201 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
202 
203 	{{"_AC5", METHOD_0ARGS,
204 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
205 
206 	{{"_AC6", METHOD_0ARGS,
207 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
208 
209 	{{"_AC7", METHOD_0ARGS,
210 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
211 
212 	{{"_AC8", METHOD_0ARGS,
213 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
214 
215 	{{"_AC9", METHOD_0ARGS,
216 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
217 
218 	{{"_ADR", METHOD_0ARGS,
219 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
220 
221 	{{"_AEI", METHOD_0ARGS,
222 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
223 
224 	{{"_AL0", METHOD_0ARGS,
225 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
226 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
227 
228 	{{"_AL1", METHOD_0ARGS,
229 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
230 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
231 
232 	{{"_AL2", METHOD_0ARGS,
233 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
234 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
235 
236 	{{"_AL3", METHOD_0ARGS,
237 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
238 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
239 
240 	{{"_AL4", METHOD_0ARGS,
241 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
242 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
243 
244 	{{"_AL5", METHOD_0ARGS,
245 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
246 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
247 
248 	{{"_AL6", METHOD_0ARGS,
249 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
250 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
251 
252 	{{"_AL7", METHOD_0ARGS,
253 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
254 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
255 
256 	{{"_AL8", METHOD_0ARGS,
257 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
258 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
259 
260 	{{"_AL9", METHOD_0ARGS,
261 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
262 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
263 
264 	{{"_ALC", METHOD_0ARGS,
265 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
266 
267 	{{"_ALI", METHOD_0ARGS,
268 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
269 
270 	{{"_ALP", METHOD_0ARGS,
271 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
272 
273 	{{"_ALR", METHOD_0ARGS,
274 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each 2 (Ints) */
275 	PACKAGE_INFO(ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 2, 0, 0, 0),
276 
277 	{{"_ALT", METHOD_0ARGS,
278 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
279 
280 	{{"_ART", METHOD_0ARGS,
281 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (1 Int(rev), n Pkg (2 Ref/11 Int) */
282 	PACKAGE_INFO(ACPI_PTYPE2_REV_FIXED, ACPI_RTYPE_REFERENCE, 2,
283 		     ACPI_RTYPE_INTEGER, 11, 0),
284 
285 	{{"_BBN", METHOD_0ARGS,
286 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
287 
288 	{{"_BCL", METHOD_0ARGS,
289 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Ints) */
290 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0),
291 
292 	{{"_BCM", METHOD_1ARGS(ACPI_TYPE_INTEGER),
293 	  METHOD_NO_RETURN_VALUE}},
294 
295 	{{"_BCT", METHOD_1ARGS(ACPI_TYPE_INTEGER),
296 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
297 
298 	{{"_BDN", METHOD_0ARGS,
299 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
300 
301 	{{"_BFS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
302 	  METHOD_NO_RETURN_VALUE}},
303 
304 	{{"_BIF", METHOD_0ARGS,
305 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (9 Int),(4 Str) */
306 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 9,
307 		     ACPI_RTYPE_STRING, 4, 0),
308 
309 	{{"_BIX", METHOD_0ARGS,
310 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (16 Int),(4 Str) */
311 	PACKAGE_INFO(ACPI_PTYPE_CUSTOM, ACPI_RTYPE_INTEGER, 16,
312 		     ACPI_RTYPE_STRING, 4, 0),
313 
314 	{{"_BLT",
315 	  METHOD_3ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
316 	  METHOD_NO_RETURN_VALUE}},
317 
318 	{{"_BMA", METHOD_1ARGS(ACPI_TYPE_INTEGER),
319 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
320 
321 	{{"_BMC", METHOD_1ARGS(ACPI_TYPE_INTEGER),
322 	  METHOD_NO_RETURN_VALUE}},
323 
324 	{{"_BMD", METHOD_0ARGS,
325 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (5 Int) */
326 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 5, 0, 0, 0),
327 
328 	{{"_BMS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
329 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
330 
331 	{{"_BQC", METHOD_0ARGS,
332 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
333 
334 	{{"_BST", METHOD_0ARGS,
335 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (4 Int) */
336 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0),
337 
338 	{{"_BTH", METHOD_1ARGS(ACPI_TYPE_INTEGER),	/* ACPI 6.0 */
339 	  METHOD_NO_RETURN_VALUE}},
340 
341 	{{"_BTM", METHOD_1ARGS(ACPI_TYPE_INTEGER),
342 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
343 
344 	{{"_BTP", METHOD_1ARGS(ACPI_TYPE_INTEGER),
345 	  METHOD_NO_RETURN_VALUE}},
346 
347 	{{"_CBA", METHOD_0ARGS,
348 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* See PCI firmware spec 3.0 */
349 
350 	{{"_CCA", METHOD_0ARGS,
351 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 5.1 */
352 
353 	{{"_CDM", METHOD_0ARGS,
354 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
355 
356 	{{"_CID", METHOD_0ARGS,
357 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Ints/Strs) */
358 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING, 0,
359 		     0, 0, 0),
360 
361 	{{"_CLS", METHOD_0ARGS,
362 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (3 Int) */
363 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3, 0, 0, 0),
364 
365 	{{"_CPC", METHOD_0ARGS,
366 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Ints/Bufs) */
367 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER, 0,
368 		     0, 0, 0),
369 
370 	{{"_CR3", METHOD_0ARGS,	/* ACPI 6.0 */
371 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
372 
373 	{{"_CRS", METHOD_0ARGS,
374 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
375 
376 	{{"_CRT", METHOD_0ARGS,
377 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
378 
379 	{{"_CSD", METHOD_0ARGS,
380 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (1 Int(n), n-1 Int) */
381 	PACKAGE_INFO(ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 0, 0, 0, 0),
382 
383 	{{"_CST", METHOD_0ARGS,
384 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (1 Int(n), n Pkg (1 Buf/3 Int) */
385 	PACKAGE_INFO(ACPI_PTYPE2_PKG_COUNT, ACPI_RTYPE_BUFFER, 1,
386 		     ACPI_RTYPE_INTEGER, 3, 0),
387 
388 	{{"_CWS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
389 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
390 
391 	{{"_DCK", METHOD_1ARGS(ACPI_TYPE_INTEGER),
392 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
393 
394 	{{"_DCS", METHOD_0ARGS,
395 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
396 
397 	{{"_DDC", METHOD_1ARGS(ACPI_TYPE_INTEGER),
398 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER)}},
399 
400 	{{"_DDN", METHOD_0ARGS,
401 	  METHOD_RETURNS(ACPI_RTYPE_STRING)}},
402 
403 	{{"_DEP", METHOD_0ARGS,
404 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
405 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
406 
407 	{{"_DGS", METHOD_0ARGS,
408 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
409 
410 	{{"_DIS", METHOD_0ARGS,
411 	  METHOD_NO_RETURN_VALUE}},
412 
413 	{{"_DLM", METHOD_0ARGS,
414 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each (1 Ref, 0/1 Optional Buf/Ref) */
415 	PACKAGE_INFO(ACPI_PTYPE2_FIX_VAR, ACPI_RTYPE_REFERENCE, 1,
416 		     ACPI_RTYPE_REFERENCE | ACPI_RTYPE_BUFFER, 0, 0),
417 
418 	{{"_DMA", METHOD_0ARGS,
419 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
420 
421 	{{"_DOD", METHOD_0ARGS,
422 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Ints) */
423 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0),
424 
425 	{{"_DOS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
426 	  METHOD_NO_RETURN_VALUE}},
427 
428 	{{"_DSD", METHOD_0ARGS,	/* ACPI 6.0 */
429 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each: 1 Buf, 1 Pkg */
430 	PACKAGE_INFO(ACPI_PTYPE2_UUID_PAIR, ACPI_RTYPE_BUFFER, 1,
431 		     ACPI_RTYPE_PACKAGE, 1, 0),
432 
433 	{{"_DSM",
434 	  METHOD_4ARGS(ACPI_TYPE_BUFFER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
435 		       ACPI_TYPE_PACKAGE),
436 	  METHOD_RETURNS(ACPI_RTYPE_ALL)}},	/* Must return a value, but it can be of any type */
437 
438 	{{"_DSS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
439 	  METHOD_NO_RETURN_VALUE}},
440 
441 	{{"_DSW",
442 	  METHOD_3ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
443 	  METHOD_NO_RETURN_VALUE}},
444 
445 	{{"_DTI", METHOD_1ARGS(ACPI_TYPE_INTEGER),
446 	  METHOD_NO_RETURN_VALUE}},
447 
448 	{{"_EC_", METHOD_0ARGS,
449 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
450 
451 	{{"_EDL", METHOD_0ARGS,
452 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
453 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
454 
455 	{{"_EJ0", METHOD_1ARGS(ACPI_TYPE_INTEGER),
456 	  METHOD_NO_RETURN_VALUE}},
457 
458 	{{"_EJ1", METHOD_1ARGS(ACPI_TYPE_INTEGER),
459 	  METHOD_NO_RETURN_VALUE}},
460 
461 	{{"_EJ2", METHOD_1ARGS(ACPI_TYPE_INTEGER),
462 	  METHOD_NO_RETURN_VALUE}},
463 
464 	{{"_EJ3", METHOD_1ARGS(ACPI_TYPE_INTEGER),
465 	  METHOD_NO_RETURN_VALUE}},
466 
467 	{{"_EJ4", METHOD_1ARGS(ACPI_TYPE_INTEGER),
468 	  METHOD_NO_RETURN_VALUE}},
469 
470 	{{"_EJD", METHOD_0ARGS,
471 	  METHOD_RETURNS(ACPI_RTYPE_STRING)}},
472 
473 	{{"_ERR",
474 	  METHOD_3ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_STRING, ACPI_TYPE_INTEGER),
475 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* Internal use only, used by ACPICA test suites */
476 
477 	{{"_EVT", METHOD_1ARGS(ACPI_TYPE_INTEGER),
478 	  METHOD_NO_RETURN_VALUE}},
479 
480 	{{"_FDE", METHOD_0ARGS,
481 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
482 
483 	{{"_FDI", METHOD_0ARGS,
484 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (16 Int) */
485 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16, 0, 0, 0),
486 
487 	{{"_FDM", METHOD_1ARGS(ACPI_TYPE_INTEGER),
488 	  METHOD_NO_RETURN_VALUE}},
489 
490 	{{"_FIF", METHOD_0ARGS,
491 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (4 Int) */
492 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0),
493 
494 	{{"_FIT", METHOD_0ARGS,
495 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},	/* ACPI 6.0 */
496 
497 	{{"_FIX", METHOD_0ARGS,
498 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Ints) */
499 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0),
500 
501 	{{"_FPS", METHOD_0ARGS,
502 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (1 Int(rev), n Pkg (5 Int) */
503 	PACKAGE_INFO(ACPI_PTYPE2_REV_FIXED, ACPI_RTYPE_INTEGER, 5, 0, 0, 0),
504 
505 	{{"_FSL", METHOD_1ARGS(ACPI_TYPE_INTEGER),
506 	  METHOD_NO_RETURN_VALUE}},
507 
508 	{{"_FST", METHOD_0ARGS,
509 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (3 Int) */
510 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3, 0, 0, 0),
511 
512 	{{"_GAI", METHOD_0ARGS,
513 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
514 
515 	{{"_GCP", METHOD_0ARGS,
516 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
517 
518 	{{"_GHL", METHOD_0ARGS,
519 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
520 
521 	{{"_GLK", METHOD_0ARGS,
522 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
523 
524 	{{"_GPD", METHOD_0ARGS,
525 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
526 
527 	{{"_GPE", METHOD_0ARGS,
528 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* _GPE method, not _GPE scope */
529 
530 	{{"_GRT", METHOD_0ARGS,
531 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
532 
533 	{{"_GSB", METHOD_0ARGS,
534 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
535 
536 	{{"_GTF", METHOD_0ARGS,
537 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
538 
539 	{{"_GTM", METHOD_0ARGS,
540 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
541 
542 	{{"_GTS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
543 	  METHOD_NO_RETURN_VALUE}},
544 
545 	{{"_GWS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
546 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
547 
548 	{{"_HID", METHOD_0ARGS,
549 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING)}},
550 
551 	{{"_HMA", METHOD_0ARGS,
552 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
553 
554 	{{"_HOT", METHOD_0ARGS,
555 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
556 
557 	{{"_HPP", METHOD_0ARGS,
558 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (4 Int) */
559 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0),
560 
561 	/*
562 	 * For _HPX, a single package is returned, containing a variable-length number
563 	 * of subpackages. Each subpackage contains a PCI record setting.
564 	 * There are several different type of record settings, of different
565 	 * lengths, but all elements of all settings are Integers.
566 	 */
567 	{{"_HPX", METHOD_0ARGS,
568 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each (var Ints) */
569 	PACKAGE_INFO(ACPI_PTYPE2_MIN, ACPI_RTYPE_INTEGER, 5, 0, 0, 0),
570 
571 	{{"_HRV", METHOD_0ARGS,
572 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
573 
574 	{{"_IFT", METHOD_0ARGS,
575 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* See IPMI spec */
576 
577 	{{"_INI", METHOD_0ARGS,
578 	  METHOD_NO_RETURN_VALUE}},
579 
580 	{{"_IRC", METHOD_0ARGS,
581 	  METHOD_NO_RETURN_VALUE}},
582 
583 	{{"_LCK", METHOD_1ARGS(ACPI_TYPE_INTEGER),
584 	  METHOD_NO_RETURN_VALUE}},
585 
586 	{{"_LID", METHOD_0ARGS,
587 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
588 
589 	{{"_LPD", METHOD_0ARGS,
590 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (1 Int(rev), n Pkg (2 Int) */
591 	PACKAGE_INFO(ACPI_PTYPE2_REV_FIXED, ACPI_RTYPE_INTEGER, 2, 0, 0, 0),
592 
593 	{{"_LPI", METHOD_0ARGS,	/* ACPI 6.0 */
594 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (3 Int, n Pkg (10 Int/Buf) */
595 	PACKAGE_INFO(ACPI_PTYPE2_VAR_VAR, ACPI_RTYPE_INTEGER, 3,
596 		     ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER | ACPI_RTYPE_STRING,
597 		     10, 0),
598 
599 	{{"_LSI", METHOD_0ARGS,
600 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},
601 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3, 0, 0, 0),
602 
603 	{{"_LSR", METHOD_2ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
604 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},
605 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 1,
606 		     ACPI_RTYPE_BUFFER, 1, 0),
607 
608 	{{"_LSW",
609 	  METHOD_3ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_BUFFER),
610 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
611 
612 	{{"_MAT", METHOD_0ARGS,
613 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
614 
615 	{{"_MBM", METHOD_0ARGS,
616 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (8 Int) */
617 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 8, 0, 0, 0),
618 
619 	{{"_MLS", METHOD_0ARGS,
620 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each (1 Str/1 Buf) */
621 	PACKAGE_INFO(ACPI_PTYPE2, ACPI_RTYPE_STRING, 1, ACPI_RTYPE_BUFFER, 1,
622 		     0),
623 
624 	{{"_MSG", METHOD_1ARGS(ACPI_TYPE_INTEGER),
625 	  METHOD_NO_RETURN_VALUE}},
626 
627 	{{"_MSM",
628 	  METHOD_4ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
629 		       ACPI_TYPE_INTEGER),
630 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
631 
632 	{{"_MTL", METHOD_0ARGS,	/* ACPI 6.0 */
633 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
634 
635 	{{"_NBS", METHOD_0ARGS,	/* ACPI 6.3 */
636 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
637 
638 	{{"_NCH", METHOD_0ARGS,	/* ACPI 6.3 */
639 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
640 
641 	{{"_NIC", METHOD_0ARGS,	/* ACPI 6.3 */
642 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
643 
644 	{{"_NIG", METHOD_0ARGS, /* ACPI 6.3 */
645 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
646 
647 	{{"_NIH", METHOD_1ARGS(ACPI_TYPE_BUFFER), /* ACPI 6.3 */
648 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
649 
650 	{{"_NTT", METHOD_0ARGS,
651 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
652 
653 	{{"_OFF", METHOD_0ARGS,
654 	  METHOD_NO_RETURN_VALUE}},
655 
656 	{{"_ON_", METHOD_0ARGS,
657 	  METHOD_NO_RETURN_VALUE}},
658 
659 	{{"_OS_", METHOD_0ARGS,
660 	  METHOD_RETURNS(ACPI_RTYPE_STRING)}},
661 
662 	{{"_OSC",
663 	  METHOD_4ARGS(ACPI_TYPE_BUFFER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
664 		       ACPI_TYPE_BUFFER),
665 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
666 
667 	{{"_OST",
668 	  METHOD_3ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_BUFFER),
669 	  METHOD_NO_RETURN_VALUE}},
670 
671 	{{"_PAI", METHOD_1ARGS(ACPI_TYPE_INTEGER),
672 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
673 
674 	{{"_PCL", METHOD_0ARGS,
675 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
676 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
677 
678 	{{"_PCT", METHOD_0ARGS,
679 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (2 Buf) */
680 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER, 2, 0, 0, 0),
681 
682 	{{"_PDC", METHOD_1ARGS(ACPI_TYPE_BUFFER),
683 	  METHOD_NO_RETURN_VALUE}},
684 
685 	{{"_PDL", METHOD_0ARGS,
686 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
687 
688 	{{"_PIC", METHOD_1ARGS(ACPI_TYPE_INTEGER),
689 	  METHOD_NO_RETURN_VALUE}},
690 
691 	{{"_PIF", METHOD_0ARGS,
692 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (3 Int),(3 Str) */
693 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 3,
694 		     ACPI_RTYPE_STRING, 3, 0),
695 
696 	{{"_PLD", METHOD_0ARGS,
697 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Bufs) */
698 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_BUFFER, 0, 0, 0, 0),
699 
700 	{{"_PMC", METHOD_0ARGS,
701 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (11 Int),(3 Str) */
702 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 11,
703 		     ACPI_RTYPE_STRING, 3, 0),
704 
705 	{{"_PMD", METHOD_0ARGS,
706 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
707 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
708 
709 	{{"_PMM", METHOD_0ARGS,
710 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
711 
712 	{{"_PPC", METHOD_0ARGS,
713 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
714 
715 	{{"_PPE", METHOD_0ARGS,
716 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* See dig64 spec */
717 
718 	{{"_PR0", METHOD_0ARGS,
719 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
720 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
721 
722 	{{"_PR1", METHOD_0ARGS,
723 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
724 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
725 
726 	{{"_PR2", METHOD_0ARGS,
727 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
728 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
729 
730 	{{"_PR3", METHOD_0ARGS,
731 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
732 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
733 
734 	{{"_PRE", METHOD_0ARGS,
735 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
736 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
737 
738 	{{"_PRL", METHOD_0ARGS,
739 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
740 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
741 
742 	{{"_PRR", METHOD_0ARGS,	/* ACPI 6.0 */
743 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (1 Ref) */
744 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_REFERENCE, 1, 0, 0, 0),
745 
746 	{{"_PRS", METHOD_0ARGS,
747 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
748 
749 	/*
750 	 * For _PRT, many BIOSs reverse the 3rd and 4th Package elements (Source
751 	 * and source_index). This bug is so prevalent that there is code in the
752 	 * ACPICA Resource Manager to detect this and switch them back. For now,
753 	 * do not allow and issue a warning. To allow this and eliminate the
754 	 * warning, add the ACPI_RTYPE_REFERENCE type to the 4th element (index 3)
755 	 * in the statement below.
756 	 */
757 	{{"_PRT", METHOD_0ARGS,
758 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each (4): Int,Int,Int/Ref,Int */
759 	PACKAGE_INFO(ACPI_PTYPE2_FIXED, 4, ACPI_RTYPE_INTEGER,
760 		     ACPI_RTYPE_INTEGER,
761 		     ACPI_RTYPE_INTEGER | ACPI_RTYPE_REFERENCE,
762 		     ACPI_RTYPE_INTEGER),
763 
764 	{{"_PRW", METHOD_0ARGS,
765 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each: Pkg/Int,Int,[Variable-length Refs] (Pkg is Ref/Int) */
766 	PACKAGE_INFO(ACPI_PTYPE1_OPTION, 2,
767 		     ACPI_RTYPE_INTEGER | ACPI_RTYPE_PACKAGE,
768 		     ACPI_RTYPE_INTEGER, ACPI_RTYPE_REFERENCE, 0),
769 
770 	{{"_PS0", METHOD_0ARGS,
771 	  METHOD_NO_RETURN_VALUE}},
772 
773 	{{"_PS1", METHOD_0ARGS,
774 	  METHOD_NO_RETURN_VALUE}},
775 
776 	{{"_PS2", METHOD_0ARGS,
777 	  METHOD_NO_RETURN_VALUE}},
778 
779 	{{"_PS3", METHOD_0ARGS,
780 	  METHOD_NO_RETURN_VALUE}},
781 
782 	{{"_PSC", METHOD_0ARGS,
783 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
784 
785 	{{"_PSD", METHOD_0ARGS,
786 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each (5 Int) with count */
787 	PACKAGE_INFO(ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 0, 0, 0, 0),
788 
789 	{{"_PSE", METHOD_1ARGS(ACPI_TYPE_INTEGER),
790 	  METHOD_NO_RETURN_VALUE}},
791 
792 	{{"_PSL", METHOD_0ARGS,
793 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
794 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
795 
796 	{{"_PSR", METHOD_0ARGS,
797 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
798 
799 	{{"_PSS", METHOD_0ARGS,
800 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each (6 Int) */
801 	PACKAGE_INFO(ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 6, 0, 0, 0),
802 
803 	{{"_PSV", METHOD_0ARGS,
804 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
805 
806 	{{"_PSW", METHOD_1ARGS(ACPI_TYPE_INTEGER),
807 	  METHOD_NO_RETURN_VALUE}},
808 
809 	{{"_PTC", METHOD_0ARGS,
810 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (2 Buf) */
811 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER, 2, 0, 0, 0),
812 
813 	{{"_PTP", METHOD_2ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
814 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
815 
816 	{{"_PTS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
817 	  METHOD_NO_RETURN_VALUE}},
818 
819 	{{"_PUR", METHOD_0ARGS,
820 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (2 Int) */
821 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, 0, 0, 0),
822 
823 	{{"_PXM", METHOD_0ARGS,
824 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
825 
826 	{{"_RDI", METHOD_0ARGS,	/* ACPI 6.0 */
827 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (1 Int, n Pkg (m Ref)) */
828 	PACKAGE_INFO(ACPI_PTYPE2_VAR_VAR, ACPI_RTYPE_INTEGER, 1,
829 		     ACPI_RTYPE_REFERENCE, 0, 0),
830 
831 	{{"_REG", METHOD_2ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
832 	  METHOD_NO_RETURN_VALUE}},
833 
834 	{{"_REV", METHOD_0ARGS,
835 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
836 
837 	{{"_RMV", METHOD_0ARGS,
838 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
839 
840 	{{"_ROM", METHOD_2ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
841 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
842 
843 	{{"_RST", METHOD_0ARGS,	/* ACPI 6.0 */
844 	  METHOD_NO_RETURN_VALUE}},
845 
846 	{{"_RTV", METHOD_0ARGS,
847 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
848 
849 	/*
850 	 * For _S0_ through _S5_, the ACPI spec defines a return Package
851 	 * containing 1 Integer, but most DSDTs have it wrong - 2,3, or 4 integers.
852 	 * Allow this by making the objects "Variable-length length", but all elements
853 	 * must be Integers.
854 	 */
855 	{{"_S0_", METHOD_0ARGS,
856 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (1 Int) */
857 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0),
858 
859 	{{"_S1_", METHOD_0ARGS,
860 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (1 Int) */
861 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0),
862 
863 	{{"_S2_", METHOD_0ARGS,
864 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (1 Int) */
865 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0),
866 
867 	{{"_S3_", METHOD_0ARGS,
868 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (1 Int) */
869 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0),
870 
871 	{{"_S4_", METHOD_0ARGS,
872 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (1 Int) */
873 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0),
874 
875 	{{"_S5_", METHOD_0ARGS,
876 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (1 Int) */
877 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0),
878 
879 	{{"_S1D", METHOD_0ARGS,
880 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
881 
882 	{{"_S2D", METHOD_0ARGS,
883 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
884 
885 	{{"_S3D", METHOD_0ARGS,
886 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
887 
888 	{{"_S4D", METHOD_0ARGS,
889 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
890 
891 	{{"_S0W", METHOD_0ARGS,
892 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
893 
894 	{{"_S1W", METHOD_0ARGS,
895 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
896 
897 	{{"_S2W", METHOD_0ARGS,
898 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
899 
900 	{{"_S3W", METHOD_0ARGS,
901 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
902 
903 	{{"_S4W", METHOD_0ARGS,
904 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
905 
906 	{{"_SBA", METHOD_0ARGS,
907 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (4 Int) */
908 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0),
909 
910 	{{"_SBI", METHOD_0ARGS,
911 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (1 Int, 1 Buf) */
912 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 1,
913 		     ACPI_RTYPE_BUFFER, 1, 0),
914 
915 	{{"_SBR",
916 	  METHOD_3ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
917 			ACPI_TYPE_INTEGER),
918 	   METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (2 Int) */
919 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2,
920 		     ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER, 1, 0),
921 
922 	{{"_SBS", METHOD_0ARGS,
923 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
924 
925 	{{"_SBT",
926 	  METHOD_4ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
927 			ACPI_TYPE_ANY),
928 	   METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (2 Int, 1 Buf | Int) */
929 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2,
930 		     ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER, 1, 0),
931 
932 	{{"_SBW",
933 	  METHOD_5ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER,
934 			ACPI_TYPE_INTEGER, ACPI_TYPE_ANY),
935 	   METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},
936 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER | ACPI_RTYPE_INTEGER,
937 		     1, 0, 0, 0),
938 
939 	{{"_SCP", METHOD_1ARGS(ACPI_TYPE_INTEGER) | ARG_COUNT_IS_MINIMUM,
940 	  METHOD_NO_RETURN_VALUE}},	/* Acpi 1.0 allowed 1 integer arg. Acpi 3.0 expanded to 3 args. Allow both. */
941 
942 	{{"_SDD", METHOD_1ARGS(ACPI_TYPE_BUFFER),
943 	  METHOD_NO_RETURN_VALUE}},
944 
945 	{{"_SEG", METHOD_0ARGS,
946 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
947 
948 	{{"_SHL", METHOD_1ARGS(ACPI_TYPE_INTEGER),
949 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
950 
951 	{{"_SLI", METHOD_0ARGS,
952 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
953 
954 	{{"_SPD", METHOD_1ARGS(ACPI_TYPE_INTEGER),
955 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
956 
957 	{{"_SRS", METHOD_1ARGS(ACPI_TYPE_BUFFER),
958 	  METHOD_NO_RETURN_VALUE}},
959 
960 	{{"_SRT", METHOD_1ARGS(ACPI_TYPE_BUFFER),
961 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
962 
963 	{{"_SRV", METHOD_0ARGS,
964 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* See IPMI spec */
965 
966 	{{"_SST", METHOD_1ARGS(ACPI_TYPE_INTEGER),
967 	  METHOD_NO_RETURN_VALUE}},
968 
969 	{{"_STA", METHOD_0ARGS,
970 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
971 
972 	{{"_STM",
973 	  METHOD_3ARGS(ACPI_TYPE_BUFFER, ACPI_TYPE_BUFFER, ACPI_TYPE_BUFFER),
974 	  METHOD_NO_RETURN_VALUE}},
975 
976 	{{"_STP", METHOD_2ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
977 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
978 
979 	{{"_STR", METHOD_0ARGS,
980 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
981 
982 	{{"_STV", METHOD_2ARGS(ACPI_TYPE_INTEGER, ACPI_TYPE_INTEGER),
983 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
984 
985 	{{"_SUB", METHOD_0ARGS,
986 	  METHOD_RETURNS(ACPI_RTYPE_STRING)}},
987 
988 	{{"_SUN", METHOD_0ARGS,
989 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
990 
991 	{{"_SWS", METHOD_0ARGS,
992 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
993 
994 	{{"_TC1", METHOD_0ARGS,
995 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
996 
997 	{{"_TC2", METHOD_0ARGS,
998 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
999 
1000 	{{"_TDL", METHOD_0ARGS,
1001 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1002 
1003 	{{"_TFP", METHOD_0ARGS,	/* ACPI 6.0 */
1004 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1005 
1006 	{{"_TIP", METHOD_1ARGS(ACPI_TYPE_INTEGER),
1007 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1008 
1009 	{{"_TIV", METHOD_1ARGS(ACPI_TYPE_INTEGER),
1010 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1011 
1012 	{{"_TMP", METHOD_0ARGS,
1013 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1014 
1015 	{{"_TPC", METHOD_0ARGS,
1016 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1017 
1018 	{{"_TPT", METHOD_1ARGS(ACPI_TYPE_INTEGER),
1019 	  METHOD_NO_RETURN_VALUE}},
1020 
1021 	{{"_TRT", METHOD_0ARGS,
1022 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each 2 Ref/6 Int */
1023 	PACKAGE_INFO(ACPI_PTYPE2, ACPI_RTYPE_REFERENCE, 2, ACPI_RTYPE_INTEGER,
1024 		     6, 0),
1025 
1026 	{{"_TSD", METHOD_0ARGS,
1027 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each 5 Int with count */
1028 	PACKAGE_INFO(ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 5, 0, 0, 0),
1029 
1030 	{{"_TSN", METHOD_0ARGS,	/* ACPI 6.0 */
1031 	  METHOD_RETURNS(ACPI_RTYPE_REFERENCE)}},
1032 
1033 	{{"_TSP", METHOD_0ARGS,
1034 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1035 
1036 	{{"_TSS", METHOD_0ARGS,
1037 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Pkgs) each 5 Int */
1038 	PACKAGE_INFO(ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 5, 0, 0, 0),
1039 
1040 	{{"_TST", METHOD_0ARGS,
1041 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1042 
1043 	{{"_TTS", METHOD_1ARGS(ACPI_TYPE_INTEGER),
1044 	  METHOD_NO_RETURN_VALUE}},
1045 
1046 	{{"_TZD", METHOD_0ARGS,
1047 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Variable-length (Refs) */
1048 	PACKAGE_INFO(ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0),
1049 
1050 	{{"_TZM", METHOD_0ARGS,
1051 	  METHOD_RETURNS(ACPI_RTYPE_REFERENCE)}},
1052 
1053 	{{"_TZP", METHOD_0ARGS,
1054 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1055 
1056 	{{"_UID", METHOD_0ARGS,
1057 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING)}},
1058 
1059 	{{"_UPC", METHOD_0ARGS,
1060 	  METHOD_RETURNS(ACPI_RTYPE_PACKAGE)}},	/* Fixed-length (4 Int) */
1061 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0),
1062 
1063 	{{"_UPD", METHOD_0ARGS,
1064 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1065 
1066 	{{"_UPP", METHOD_0ARGS,
1067 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1068 
1069 	{{"_VPO", METHOD_0ARGS,
1070 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},
1071 
1072 	/* Acpi 1.0 defined _WAK with no return value. Later, it was changed to return a package */
1073 
1074 	{{"_WAK", METHOD_1ARGS(ACPI_TYPE_INTEGER),
1075 	  METHOD_RETURNS(ACPI_RTYPE_NONE | ACPI_RTYPE_INTEGER |
1076 			 ACPI_RTYPE_PACKAGE)}},
1077 	PACKAGE_INFO(ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, 0, 0, 0),	/* Fixed-length (2 Int), but is optional */
1078 
1079 	/* _WDG/_WED are MS extensions defined by "Windows Instrumentation" */
1080 
1081 	{{"_WDG", METHOD_0ARGS,
1082 	  METHOD_RETURNS(ACPI_RTYPE_BUFFER)}},
1083 
1084 	{{"_WED", METHOD_1ARGS(ACPI_TYPE_INTEGER),
1085 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING |
1086 			 ACPI_RTYPE_BUFFER)}},
1087 
1088 	{{"_WPC", METHOD_0ARGS,
1089 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 6.1 */
1090 
1091 	{{"_WPP", METHOD_0ARGS,
1092 	  METHOD_RETURNS(ACPI_RTYPE_INTEGER)}},	/* ACPI 6.1 */
1093 
1094 	PACKAGE_INFO(0, 0, 0, 0, 0, 0)	/* Table terminator */
1095 };
1096 #else
1097 extern const union acpi_predefined_info acpi_gbl_predefined_methods[];
1098 #endif
1099 
1100 #if (defined ACPI_CREATE_RESOURCE_TABLE && defined ACPI_APPLICATION)
1101 /******************************************************************************
1102  *
1103  * Predefined names for use in Resource Descriptors. These names do not
1104  * appear in the global Predefined Name table (since these names never
1105  * appear in actual AML byte code, only in the original ASL)
1106  *
1107  * Note: Used by iASL compiler and acpi_help utility only.
1108  *
1109  *****************************************************************************/
1110 
1111 const union acpi_predefined_info acpi_gbl_resource_names[] = {
1112 	{{"_ADR", WIDTH_16 | WIDTH_64, 0}},
1113 	{{"_ALN", WIDTH_8 | WIDTH_16 | WIDTH_32, 0}},
1114 	{{"_ASI", WIDTH_8, 0}},
1115 	{{"_ASZ", WIDTH_8, 0}},
1116 	{{"_ATT", WIDTH_64, 0}},
1117 	{{"_BAS", WIDTH_16 | WIDTH_32, 0}},
1118 	{{"_BM_", WIDTH_1, 0}},
1119 	{{"_DBT", WIDTH_16, 0}},	/* Acpi 5.0 */
1120 	{{"_DEC", WIDTH_1, 0}},
1121 	{{"_DMA", WIDTH_8, 0}},
1122 	{{"_DPL", WIDTH_1, 0}},	/* Acpi 5.0 */
1123 	{{"_DRS", WIDTH_16, 0}},	/* Acpi 5.0 */
1124 	{{"_END", WIDTH_1, 0}},	/* Acpi 5.0 */
1125 	{{"_FLC", WIDTH_2, 0}},	/* Acpi 5.0 */
1126 	{{"_GRA", WIDTH_ADDRESS, 0}},
1127 	{{"_HE_", WIDTH_1, 0}},
1128 	{{"_INT", WIDTH_16 | WIDTH_32, 0}},
1129 	{{"_IOR", WIDTH_2, 0}},	/* Acpi 5.0 */
1130 	{{"_LEN", WIDTH_8 | WIDTH_ADDRESS, 0}},
1131 	{{"_LIN", WIDTH_8, 0}},	/* Acpi 5.0 */
1132 	{{"_LL_", WIDTH_1, 0}},
1133 	{{"_MAF", WIDTH_1, 0}},
1134 	{{"_MAX", WIDTH_ADDRESS, 0}},
1135 	{{"_MEM", WIDTH_2, 0}},
1136 	{{"_MIF", WIDTH_1, 0}},
1137 	{{"_MIN", WIDTH_ADDRESS, 0}},
1138 	{{"_MOD", WIDTH_1, 0}},	/* Acpi 5.0 */
1139 	{{"_MTP", WIDTH_2, 0}},
1140 	{{"_PAR", WIDTH_8, 0}},	/* Acpi 5.0 */
1141 	{{"_PHA", WIDTH_1, 0}},	/* Acpi 5.0 */
1142 	{{"_PIN", WIDTH_16, 0}},	/* Acpi 5.0 */
1143 	{{"_PPI", WIDTH_8, 0}},	/* Acpi 5.0 */
1144 	{{"_POL", WIDTH_1 | WIDTH_2, 0}},	/* Acpi 5.0 */
1145 	{{"_RBO", WIDTH_8, 0}},
1146 	{{"_RBW", WIDTH_8, 0}},
1147 	{{"_RNG", WIDTH_1, 0}},
1148 	{{"_RT_", WIDTH_8, 0}},	/* Acpi 3.0 */
1149 	{{"_RW_", WIDTH_1, 0}},
1150 	{{"_RXL", WIDTH_16, 0}},	/* Acpi 5.0 */
1151 	{{"_SHR", WIDTH_2, 0}},
1152 	{{"_SIZ", WIDTH_2, 0}},
1153 	{{"_SLV", WIDTH_1, 0}},	/* Acpi 5.0 */
1154 	{{"_SPE", WIDTH_32, 0}},	/* Acpi 5.0 */
1155 	{{"_STB", WIDTH_2, 0}},	/* Acpi 5.0 */
1156 	{{"_TRA", WIDTH_ADDRESS, 0}},
1157 	{{"_TRS", WIDTH_1, 0}},
1158 	{{"_TSF", WIDTH_8, 0}},	/* Acpi 3.0 */
1159 	{{"_TTP", WIDTH_1, 0}},
1160 	{{"_TXL", WIDTH_16, 0}},	/* Acpi 5.0 */
1161 	{{"_TYP", WIDTH_2 | WIDTH_16, 0}},
1162 	{{"_VEN", VARIABLE_DATA, 0}},	/* Acpi 5.0 */
1163 	PACKAGE_INFO(0, 0, 0, 0, 0, 0)	/* Table terminator */
1164 };
1165 
1166 const union acpi_predefined_info acpi_gbl_scope_names[] = {
1167 	{{"_GPE", 0, 0}},
1168 	{{"_PR_", 0, 0}},
1169 	{{"_SB_", 0, 0}},
1170 	{{"_SI_", 0, 0}},
1171 	{{"_TZ_", 0, 0}},
1172 	PACKAGE_INFO(0, 0, 0, 0, 0, 0)	/* Table terminator */
1173 };
1174 #else
1175 extern const union acpi_predefined_info acpi_gbl_resource_names[];
1176 #endif
1177 
1178 #endif
1179