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