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