blob: 144b1f41663fc62d8cb348ed777218929b414d29 [file] [log] [blame]
Bob Mooree8707b32008-09-28 15:26:17 +08001/******************************************************************************
2 *
3 * Name: acpredef - Information table for ACPI predefined methods and objects
4 * $Revision: 1.1 $
5 *
6 *****************************************************************************/
7
8/*
9 * Copyright (C) 2000 - 2008, Intel Corp.
10 * All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright
16 * notice, this list of conditions, and the following disclaimer,
17 * without modification.
18 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 * substantially similar to the "NO WARRANTY" disclaimer below
20 * ("Disclaimer") and any redistribution must be conditioned upon
21 * including a substantially similar Disclaimer requirement for further
22 * binary redistribution.
23 * 3. Neither the names of the above-listed copyright holders nor the names
24 * of any contributors may be used to endorse or promote products derived
25 * from this software without specific prior written permission.
26 *
27 * Alternatively, this software may be distributed under the terms of the
28 * GNU General Public License ("GPL") version 2 as published by the Free
29 * Software Foundation.
30 *
31 * NO WARRANTY
32 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 * POSSIBILITY OF SUCH DAMAGES.
43 */
44
45#ifndef __ACPREDEF_H__
46#define __ACPREDEF_H__
47
48/******************************************************************************
49 *
50 * Return Package types
51 *
52 * 1) PTYPE1 packages do not contain sub-packages.
53 *
54 * ACPI_PTYPE1_FIXED: Fixed length, 1 or 2 object types:
Bob Moored3319d172009-02-18 14:07:58 +080055 * object type
56 * count
57 * object type
58 * count
Bob Mooree8707b32008-09-28 15:26:17 +080059 *
60 * ACPI_PTYPE1_VAR: Variable length:
Bob Moored3319d172009-02-18 14:07:58 +080061 * object type (Int/Buf/Ref)
Bob Mooree8707b32008-09-28 15:26:17 +080062 *
Bob Moored3319d172009-02-18 14:07:58 +080063 * ACPI_PTYPE1_OPTION: Package has some required and some optional elements
64 * (Used for _PRW)
Bob Mooree8707b32008-09-28 15:26:17 +080065 *
66 *
67 * 2) PTYPE2 packages contain a variable number of sub-packages. Each of the
68 * different types describe the contents of each of the sub-packages.
69 *
70 * ACPI_PTYPE2: Each subpackage contains 1 or 2 object types:
Bob Moored3319d172009-02-18 14:07:58 +080071 * object type
72 * count
73 * object type
74 * count
75 * (Used for _ALR,_MLS,_PSS,_TRT,_TSS)
Bob Mooree8707b32008-09-28 15:26:17 +080076 *
77 * ACPI_PTYPE2_COUNT: Each subpackage has a count as first element:
Bob Moored3319d172009-02-18 14:07:58 +080078 * object type
79 * (Used for _CSD,_PSD,_TSD)
Bob Mooree8707b32008-09-28 15:26:17 +080080 *
81 * ACPI_PTYPE2_PKG_COUNT: Count of subpackages at start, 1 or 2 object types:
Bob Moored3319d172009-02-18 14:07:58 +080082 * object type
83 * count
84 * object type
85 * count
86 * (Used for _CST)
Bob Mooree8707b32008-09-28 15:26:17 +080087 *
Bob Moored3319d172009-02-18 14:07:58 +080088 * ACPI_PTYPE2_FIXED: Each subpackage is of fixed length
89 * (Used for _PRT)
Bob Mooree8707b32008-09-28 15:26:17 +080090 *
91 * ACPI_PTYPE2_MIN: Each subpackage has a variable but minimum length
Bob Moored3319d172009-02-18 14:07:58 +080092 * (Used for _HPX)
Bob Mooree8707b32008-09-28 15:26:17 +080093 *
Bob Moore53e93872009-07-24 11:22:11 +080094 * ACPI_PTYPE2_REV_FIXED: Revision at start, each subpackage is Fixed-length
95 *
Bob Mooree8707b32008-09-28 15:26:17 +080096 *****************************************************************************/
97
98enum acpi_return_package_types {
99 ACPI_PTYPE1_FIXED = 1,
100 ACPI_PTYPE1_VAR = 2,
101 ACPI_PTYPE1_OPTION = 3,
102 ACPI_PTYPE2 = 4,
103 ACPI_PTYPE2_COUNT = 5,
104 ACPI_PTYPE2_PKG_COUNT = 6,
105 ACPI_PTYPE2_FIXED = 7,
Bob Moore53e93872009-07-24 11:22:11 +0800106 ACPI_PTYPE2_MIN = 8,
107 ACPI_PTYPE2_REV_FIXED = 9
Bob Mooree8707b32008-09-28 15:26:17 +0800108};
109
110/*
111 * Predefined method/object information table.
112 *
113 * These are the names that can actually be evaluated via acpi_evaluate_object.
114 * Not present in this table are the following:
115 *
116 * 1) Predefined/Reserved names that are never evaluated via acpi_evaluate_object:
117 * _Lxx and _Exx GPE methods
118 * _Qxx EC methods
119 * _T_x compiler temporary variables
120 *
121 * 2) Predefined names that never actually exist within the AML code:
122 * Predefined resource descriptor field names
123 *
124 * 3) Predefined names that are implemented within ACPICA:
125 * _OSI
126 *
127 * 4) Some predefined names that are not documented within the ACPI spec.
128 * _WDG, _WED
129 *
130 * The main entries in the table each contain the following items:
131 *
132 * Name - The ACPI reserved name
133 * param_count - Number of arguments to the method
134 * expected_btypes - Allowed type(s) for the return value.
135 * 0 means that no return value is expected.
136 *
137 * For methods that return packages, the next entry in the table contains
138 * information about the expected structure of the package. This information
139 * is saved here (rather than in a separate table) in order to minimize the
140 * overall size of the stored data.
141 */
142static const union acpi_predefined_info predefined_names[] = {
143 {.info = {"_AC0", 0, ACPI_RTYPE_INTEGER}},
144 {.info = {"_AC1", 0, ACPI_RTYPE_INTEGER}},
145 {.info = {"_AC2", 0, ACPI_RTYPE_INTEGER}},
146 {.info = {"_AC3", 0, ACPI_RTYPE_INTEGER}},
147 {.info = {"_AC4", 0, ACPI_RTYPE_INTEGER}},
148 {.info = {"_AC5", 0, ACPI_RTYPE_INTEGER}},
149 {.info = {"_AC6", 0, ACPI_RTYPE_INTEGER}},
150 {.info = {"_AC7", 0, ACPI_RTYPE_INTEGER}},
151 {.info = {"_AC8", 0, ACPI_RTYPE_INTEGER}},
152 {.info = {"_AC9", 0, ACPI_RTYPE_INTEGER}},
153 {.info = {"_ADR", 0, ACPI_RTYPE_INTEGER}},
154 {.info = {"_AL0", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
155 {.info = {"_AL1", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
156 {.info = {"_AL2", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
157 {.info = {"_AL3", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
158 {.info = {"_AL4", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
159 {.info = {"_AL5", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
160 {.info = {"_AL6", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
161 {.info = {"_AL7", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
162 {.info = {"_AL8", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
163 {.info = {"_AL9", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
164 {.info = {"_ALC", 0, ACPI_RTYPE_INTEGER}},
165 {.info = {"_ALI", 0, ACPI_RTYPE_INTEGER}},
166 {.info = {"_ALP", 0, ACPI_RTYPE_INTEGER}},
167 {.info = {"_ALR", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 2, 0, 0, 0}}, /* variable (Pkgs) each 2 (Ints) */
168 {.info = {"_ALT", 0, ACPI_RTYPE_INTEGER}},
169 {.info = {"_BBN", 0, ACPI_RTYPE_INTEGER}},
170 {.info = {"_BCL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Ints) */
171 {.info = {"_BCM", 1, 0}},
172 {.info = {"_BDN", 0, ACPI_RTYPE_INTEGER}},
173 {.info = {"_BFS", 1, 0}},
174 {.info = {"_BIF", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER,
175 9,
Lin Minge899b642008-11-27 14:42:30 +0800176 ACPI_RTYPE_STRING | ACPI_RTYPE_BUFFER, 4, 0}}, /* fixed (9 Int),(4 Str) */
Bob Mooree8707b32008-09-28 15:26:17 +0800177 {.info = {"_BLT", 3, 0}},
178 {.info = {"_BMC", 1, 0}},
179 {.info = {"_BMD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* fixed (5 Int) */
180 {.info = {"_BQC", 0, ACPI_RTYPE_INTEGER}},
181 {.info = {"_BST", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0}}, /* fixed (4 Int) */
182 {.info = {"_BTM", 1, ACPI_RTYPE_INTEGER}},
183 {.info = {"_BTP", 1, 0}},
184 {.info = {"_CBA", 0, ACPI_RTYPE_INTEGER}}, /* see PCI firmware spec 3.0 */
185 {.info = {"_CID", 0,
186 ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING | ACPI_RTYPE_PACKAGE}},
187 {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING, 0, 0, 0, 0}}, /* variable (Ints/Strs) */
188 {.info = {"_CRS", 0, ACPI_RTYPE_BUFFER}},
189 {.info = {"_CRT", 0, ACPI_RTYPE_INTEGER}},
190 {.info = {"_CSD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (1 Int(n), n-1 Int) */
191 {.info = {"_CST", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_PKG_COUNT,
192 ACPI_RTYPE_BUFFER, 1,
193 ACPI_RTYPE_INTEGER, 3, 0}}, /* variable (1 Int(n), n Pkg (1 Buf/3 Int) */
194 {.info = {"_DCK", 1, ACPI_RTYPE_INTEGER}},
195 {.info = {"_DCS", 0, ACPI_RTYPE_INTEGER}},
196 {.info = {"_DDC", 1, ACPI_RTYPE_INTEGER | ACPI_RTYPE_BUFFER}},
197 {.info = {"_DDN", 0, ACPI_RTYPE_STRING}},
198 {.info = {"_DGS", 0, ACPI_RTYPE_INTEGER}},
199 {.info = {"_DIS", 0, 0}},
200 {.info = {"_DMA", 0, ACPI_RTYPE_BUFFER}},
201 {.info = {"_DOD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Ints) */
202 {.info = {"_DOS", 1, 0}},
203 {.info = {"_DSM", 4, ACPI_RTYPE_ALL}}, /* Must return a type, but it can be of any type */
204 {.info = {"_DSS", 1, 0}},
205 {.info = {"_DSW", 3, 0}},
206 {.info = {"_EC_", 0, ACPI_RTYPE_INTEGER}},
207 {.info = {"_EDL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
208 {.info = {"_EJ0", 1, 0}},
209 {.info = {"_EJ1", 1, 0}},
210 {.info = {"_EJ2", 1, 0}},
211 {.info = {"_EJ3", 1, 0}},
212 {.info = {"_EJ4", 1, 0}},
213 {.info = {"_EJD", 0, ACPI_RTYPE_STRING}},
214 {.info = {"_FDE", 0, ACPI_RTYPE_BUFFER}},
215 {.info = {"_FDI", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 16, 0, 0, 0}}, /* fixed (16 Int) */
216 {.info = {"_FDM", 1, 0}},
217 {.info = {"_FIX", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Ints) */
218 {.info = {"_GLK", 0, ACPI_RTYPE_INTEGER}},
219 {.info = {"_GPD", 0, ACPI_RTYPE_INTEGER}},
220 {.info = {"_GPE", 0, ACPI_RTYPE_INTEGER}}, /* _GPE method, not _GPE scope */
221 {.info = {"_GSB", 0, ACPI_RTYPE_INTEGER}},
222 {.info = {"_GTF", 0, ACPI_RTYPE_BUFFER}},
223 {.info = {"_GTM", 0, ACPI_RTYPE_BUFFER}},
224 {.info = {"_GTS", 1, 0}},
225 {.info = {"_HID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING}},
226 {.info = {"_HOT", 0, ACPI_RTYPE_INTEGER}},
227 {.info = {"_HPP", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0}}, /* fixed (4 Int) */
228
229 /*
230 * For _HPX, a single package is returned, containing a variable number of sub-packages.
231 * Each sub-package contains a PCI record setting. There are several different type of
232 * record settings, of different lengths, but all elements of all settings are Integers.
233 */
234 {.info = {"_HPX", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_MIN, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* variable (Pkgs) each (var Ints) */
235 {.info = {"_IFT", 0, ACPI_RTYPE_INTEGER}}, /* see IPMI spec */
236 {.info = {"_INI", 0, 0}},
237 {.info = {"_IRC", 0, 0}},
238 {.info = {"_LCK", 1, 0}},
239 {.info = {"_LID", 0, ACPI_RTYPE_INTEGER}},
240 {.info = {"_MAT", 0, ACPI_RTYPE_BUFFER}},
241 {.info = {"_MLS", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_STRING, 2, 0, 0, 0}}, /* variable (Pkgs) each (2 Str) */
242 {.info = {"_MSG", 1, 0}},
243 {.info = {"_OFF", 0, 0}},
244 {.info = {"_ON_", 0, 0}},
245 {.info = {"_OS_", 0, ACPI_RTYPE_STRING}},
246 {.info = {"_OSC", 4, ACPI_RTYPE_BUFFER}},
247 {.info = {"_OST", 3, 0}},
248 {.info = {"_PCL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
249 {.info = {"_PCT", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER, 2, 0, 0, 0}}, /* fixed (2 Buf) */
250 {.info = {"_PDC", 1, 0}},
251 {.info = {"_PIC", 1, 0}},
252 {.info = {"_PLD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_BUFFER, 0, 0, 0, 0}}, /* variable (Bufs) */
253 {.info = {"_PPC", 0, ACPI_RTYPE_INTEGER}},
254 {.info = {"_PPE", 0, ACPI_RTYPE_INTEGER}}, /* see dig64 spec */
255 {.info = {"_PR0", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
256 {.info = {"_PR1", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
257 {.info = {"_PR2", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
258 {.info = {"_PRS", 0, ACPI_RTYPE_BUFFER}},
259
260 /*
261 * For _PRT, many BIOSs reverse the 2nd and 3rd Package elements. This bug is so prevalent that there
262 * is code in the ACPICA Resource Manager to detect this and switch them back. For now, do not allow
263 * and issue a warning. To allow this and eliminate the warning, add the ACPI_RTYPE_REFERENCE
264 * type to the 2nd element (index 1) in the statement below.
265 */
266 {.info = {"_PRT", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_FIXED, 4,
267 ACPI_RTYPE_INTEGER,
268 ACPI_RTYPE_INTEGER,
269 ACPI_RTYPE_INTEGER | ACPI_RTYPE_REFERENCE, ACPI_RTYPE_INTEGER}}, /* variable (Pkgs) each (4): Int,Int,Int/Ref,Int */
270
271 {.info = {"_PRW", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_OPTION, 2,
272 ACPI_RTYPE_INTEGER |
273 ACPI_RTYPE_PACKAGE,
274 ACPI_RTYPE_INTEGER, ACPI_RTYPE_REFERENCE, 0}}, /* variable (Pkgs) each: Pkg/Int,Int,[variable Refs] (Pkg is Ref/Int) */
275
276 {.info = {"_PS0", 0, 0}},
277 {.info = {"_PS1", 0, 0}},
278 {.info = {"_PS2", 0, 0}},
279 {.info = {"_PS3", 0, 0}},
280 {.info = {"_PSC", 0, ACPI_RTYPE_INTEGER}},
281 {.info = {"_PSD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 0, 0, 0, 0}}, /* variable (Pkgs) each (5 Int) with count */
282 {.info = {"_PSL", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
283 {.info = {"_PSR", 0, ACPI_RTYPE_INTEGER}},
284 {.info = {"_PSS", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 6, 0, 0, 0}}, /* variable (Pkgs) each (6 Int) */
285 {.info = {"_PSV", 0, ACPI_RTYPE_INTEGER}},
286 {.info = {"_PSW", 1, 0}},
287 {.info = {"_PTC", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_BUFFER, 2, 0, 0, 0}}, /* fixed (2 Buf) */
288 {.info = {"_PTS", 1, 0}},
289 {.info = {"_PXM", 0, ACPI_RTYPE_INTEGER}},
290 {.info = {"_REG", 2, 0}},
291 {.info = {"_REV", 0, ACPI_RTYPE_INTEGER}},
292 {.info = {"_RMV", 0, ACPI_RTYPE_INTEGER}},
293 {.info = {"_ROM", 2, ACPI_RTYPE_BUFFER}},
294 {.info = {"_RTV", 0, ACPI_RTYPE_INTEGER}},
295
296 /*
297 * For _S0_ through _S5_, the ACPI spec defines a return Package containing 1 Integer,
298 * but most DSDTs have it wrong - 2,3, or 4 integers. Allow this by making the objects "variable length",
299 * but all elements must be Integers.
300 */
301 {.info = {"_S0_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
302 {.info = {"_S1_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
303 {.info = {"_S2_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
304 {.info = {"_S3_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
305 {.info = {"_S4_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
306 {.info = {"_S5_", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_INTEGER, 1, 0, 0, 0}}, /* fixed (1 Int) */
307
308 {.info = {"_S1D", 0, ACPI_RTYPE_INTEGER}},
309 {.info = {"_S2D", 0, ACPI_RTYPE_INTEGER}},
310 {.info = {"_S3D", 0, ACPI_RTYPE_INTEGER}},
311 {.info = {"_S4D", 0, ACPI_RTYPE_INTEGER}},
312 {.info = {"_S0W", 0, ACPI_RTYPE_INTEGER}},
313 {.info = {"_S1W", 0, ACPI_RTYPE_INTEGER}},
314 {.info = {"_S2W", 0, ACPI_RTYPE_INTEGER}},
315 {.info = {"_S3W", 0, ACPI_RTYPE_INTEGER}},
316 {.info = {"_S4W", 0, ACPI_RTYPE_INTEGER}},
317 {.info = {"_SBS", 0, ACPI_RTYPE_INTEGER}},
318 {.info = {"_SCP", 0x13, 0}}, /* Acpi 1.0 allowed 1 arg. Acpi 3.0 expanded to 3 args. Allow both. */
319 /* Note: the 3-arg definition may be removed for ACPI 4.0 */
320 {.info = {"_SDD", 1, 0}},
321 {.info = {"_SEG", 0, ACPI_RTYPE_INTEGER}},
322 {.info = {"_SLI", 0, ACPI_RTYPE_BUFFER}},
323 {.info = {"_SPD", 1, ACPI_RTYPE_INTEGER}},
324 {.info = {"_SRS", 1, 0}},
325 {.info = {"_SRV", 0, ACPI_RTYPE_INTEGER}}, /* see IPMI spec */
326 {.info = {"_SST", 1, 0}},
327 {.info = {"_STA", 0, ACPI_RTYPE_INTEGER}},
328 {.info = {"_STM", 3, 0}},
329 {.info = {"_STR", 0, ACPI_RTYPE_BUFFER}},
330 {.info = {"_SUN", 0, ACPI_RTYPE_INTEGER}},
331 {.info = {"_SWS", 0, ACPI_RTYPE_INTEGER}},
332 {.info = {"_TC1", 0, ACPI_RTYPE_INTEGER}},
333 {.info = {"_TC2", 0, ACPI_RTYPE_INTEGER}},
334 {.info = {"_TMP", 0, ACPI_RTYPE_INTEGER}},
335 {.info = {"_TPC", 0, ACPI_RTYPE_INTEGER}},
336 {.info = {"_TPT", 1, 0}},
337 {.info = {"_TRT", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_REFERENCE, 2,
338 ACPI_RTYPE_INTEGER, 6, 0}}, /* variable (Pkgs) each 2_ref/6_int */
339 {.info = {"_TSD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2_COUNT, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* variable (Pkgs) each 5_int with count */
340 {.info = {"_TSP", 0, ACPI_RTYPE_INTEGER}},
341 {.info = {"_TSS", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE2, ACPI_RTYPE_INTEGER, 5, 0, 0, 0}}, /* variable (Pkgs) each 5_int */
342 {.info = {"_TST", 0, ACPI_RTYPE_INTEGER}},
343 {.info = {"_TTS", 1, 0}},
344 {.info = {"_TZD", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_VAR, ACPI_RTYPE_REFERENCE, 0, 0, 0, 0}}, /* variable (Refs) */
345 {.info = {"_TZM", 0, ACPI_RTYPE_REFERENCE}},
346 {.info = {"_TZP", 0, ACPI_RTYPE_INTEGER}},
347 {.info = {"_UID", 0, ACPI_RTYPE_INTEGER | ACPI_RTYPE_STRING}},
348 {.info = {"_UPC", 0, ACPI_RTYPE_PACKAGE}}, {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 4, 0, 0, 0}}, /* fixed (4 Int) */
349 {.info = {"_UPD", 0, ACPI_RTYPE_INTEGER}},
350 {.info = {"_UPP", 0, ACPI_RTYPE_INTEGER}},
351 {.info = {"_VPO", 0, ACPI_RTYPE_INTEGER}},
352
353 /* Acpi 1.0 defined _WAK with no return value. Later, it was changed to return a package */
354
Bob Moore95a28ed2008-11-13 11:01:34 +0800355 {.info = {"_WAK", 1, ACPI_RTYPE_NONE | ACPI_RTYPE_INTEGER | ACPI_RTYPE_PACKAGE}},
Bob Mooree8707b32008-09-28 15:26:17 +0800356 {.ret_info = {ACPI_PTYPE1_FIXED, ACPI_RTYPE_INTEGER, 2, 0, 0, 0}}, /* fixed (2 Int), but is optional */
357 {.ret_info = {0, 0, 0, 0, 0, 0}} /* Table terminator */
358};
359
360#if 0
361 /* Not implemented */
362
363{
364"_WDG", 0, ACPI_RTYPE_BUFFER}, /* MS Extension */
365
366{
367"_WED", 1, ACPI_RTYPE_PACKAGE}, /* MS Extension */
368
369 /* This is an internally implemented control method, no need to check */
370{
371"_OSI", 1, ACPI_RTYPE_INTEGER},
372
373 /* TBD: */
374 _PRT - currently ignore reversed entries.attempt to fix here ?
375 think about code that attempts to fix package elements like _BIF, etc.
376#endif
377#endif