acpredef.h 44 KB

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