acpixf.h 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401
  1. /******************************************************************************
  2. *
  3. * Name: acpixf.h - External interfaces to the ACPI subsystem
  4. *
  5. *****************************************************************************/
  6. /******************************************************************************
  7. *
  8. * 1. Copyright Notice
  9. *
  10. * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp.
  11. * All rights reserved.
  12. *
  13. * 2. License
  14. *
  15. * 2.1. This is your license from Intel Corp. under its intellectual property
  16. * rights. You may have additional license terms from the party that provided
  17. * you this software, covering your right to use that party's intellectual
  18. * property rights.
  19. *
  20. * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
  21. * copy of the source code appearing in this file ("Covered Code") an
  22. * irrevocable, perpetual, worldwide license under Intel's copyrights in the
  23. * base code distributed originally by Intel ("Original Intel Code") to copy,
  24. * make derivatives, distribute, use and display any portion of the Covered
  25. * Code in any form, with the right to sublicense such rights; and
  26. *
  27. * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
  28. * license (with the right to sublicense), under only those claims of Intel
  29. * patents that are infringed by the Original Intel Code, to make, use, sell,
  30. * offer to sell, and import the Covered Code and derivative works thereof
  31. * solely to the minimum extent necessary to exercise the above copyright
  32. * license, and in no event shall the patent license extend to any additions
  33. * to or modifications of the Original Intel Code. No other license or right
  34. * is granted directly or by implication, estoppel or otherwise;
  35. *
  36. * The above copyright and patent license is granted only if the following
  37. * conditions are met:
  38. *
  39. * 3. Conditions
  40. *
  41. * 3.1. Redistribution of Source with Rights to Further Distribute Source.
  42. * Redistribution of source code of any substantial portion of the Covered
  43. * Code or modification with rights to further distribute source must include
  44. * the above Copyright Notice, the above License, this list of Conditions,
  45. * and the following Disclaimer and Export Compliance provision. In addition,
  46. * Licensee must cause all Covered Code to which Licensee contributes to
  47. * contain a file documenting the changes Licensee made to create that Covered
  48. * Code and the date of any change. Licensee must include in that file the
  49. * documentation of any changes made by any predecessor Licensee. Licensee
  50. * must include a prominent statement that the modification is derived,
  51. * directly or indirectly, from Original Intel Code.
  52. *
  53. * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
  54. * Redistribution of source code of any substantial portion of the Covered
  55. * Code or modification without rights to further distribute source must
  56. * include the following Disclaimer and Export Compliance provision in the
  57. * documentation and/or other materials provided with distribution. In
  58. * addition, Licensee may not authorize further sublicense of source of any
  59. * portion of the Covered Code, and must include terms to the effect that the
  60. * license from Licensee to its licensee is limited to the intellectual
  61. * property embodied in the software Licensee provides to its licensee, and
  62. * not to intellectual property embodied in modifications its licensee may
  63. * make.
  64. *
  65. * 3.3. Redistribution of Executable. Redistribution in executable form of any
  66. * substantial portion of the Covered Code or modification must reproduce the
  67. * above Copyright Notice, and the following Disclaimer and Export Compliance
  68. * provision in the documentation and/or other materials provided with the
  69. * distribution.
  70. *
  71. * 3.4. Intel retains all right, title, and interest in and to the Original
  72. * Intel Code.
  73. *
  74. * 3.5. Neither the name Intel nor any other trademark owned or controlled by
  75. * Intel shall be used in advertising or otherwise to promote the sale, use or
  76. * other dealings in products derived from or relating to the Covered Code
  77. * without prior written authorization from Intel.
  78. *
  79. * 4. Disclaimer and Export Compliance
  80. *
  81. * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
  82. * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
  83. * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
  84. * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
  85. * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
  86. * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
  87. * PARTICULAR PURPOSE.
  88. *
  89. * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
  90. * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
  91. * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
  92. * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
  93. * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
  94. * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
  95. * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
  96. * LIMITED REMEDY.
  97. *
  98. * 4.3. Licensee shall not export, either directly or indirectly, any of this
  99. * software or system incorporating such software without first obtaining any
  100. * required license or other approval from the U. S. Department of Commerce or
  101. * any other agency or department of the United States Government. In the
  102. * event Licensee exports any such software from the United States or
  103. * re-exports any such software from a foreign destination, Licensee shall
  104. * ensure that the distribution and export/re-export of the software is in
  105. * compliance with all laws, regulations, orders, or other restrictions of the
  106. * U.S. Export Administration Regulations. Licensee agrees that neither it nor
  107. * any of its subsidiaries will export/re-export any technical data, process,
  108. * software, or service, directly or indirectly, to any country for which the
  109. * United States government or any agency thereof requires an export license,
  110. * other governmental approval, or letter of assurance, without first obtaining
  111. * such license, approval or letter.
  112. *
  113. *****************************************************************************
  114. *
  115. * Alternatively, you may choose to be licensed under the terms of the
  116. * following license:
  117. *
  118. * Redistribution and use in source and binary forms, with or without
  119. * modification, are permitted provided that the following conditions
  120. * are met:
  121. * 1. Redistributions of source code must retain the above copyright
  122. * notice, this list of conditions, and the following disclaimer,
  123. * without modification.
  124. * 2. Redistributions in binary form must reproduce at minimum a disclaimer
  125. * substantially similar to the "NO WARRANTY" disclaimer below
  126. * ("Disclaimer") and any redistribution must be conditioned upon
  127. * including a substantially similar Disclaimer requirement for further
  128. * binary redistribution.
  129. * 3. Neither the names of the above-listed copyright holders nor the names
  130. * of any contributors may be used to endorse or promote products derived
  131. * from this software without specific prior written permission.
  132. *
  133. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  134. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  135. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  136. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  137. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  138. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  139. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  140. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  141. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  142. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  143. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  144. *
  145. * Alternatively, you may choose to be licensed under the terms of the
  146. * GNU General Public License ("GPL") version 2 as published by the Free
  147. * Software Foundation.
  148. *
  149. *****************************************************************************/
  150. #ifndef __ACXFACE_H__
  151. #define __ACXFACE_H__
  152. /* Current ACPICA subsystem version in YYYYMMDD format */
  153. #define ACPI_CA_VERSION 0x20181031
  154. #include "acconfig.h"
  155. #include "actypes.h"
  156. #include "actbl.h"
  157. #include "acbuffer.h"
  158. /*****************************************************************************
  159. *
  160. * Macros used for ACPICA globals and configuration
  161. *
  162. ****************************************************************************/
  163. /*
  164. * Ensure that global variables are defined and initialized only once.
  165. *
  166. * The use of these macros allows for a single list of globals (here)
  167. * in order to simplify maintenance of the code.
  168. */
  169. #ifdef DEFINE_ACPI_GLOBALS
  170. #define ACPI_GLOBAL(type,name) \
  171. extern type name; \
  172. type name
  173. #define ACPI_INIT_GLOBAL(type,name,value) \
  174. type name=value
  175. #else
  176. #ifndef ACPI_GLOBAL
  177. #define ACPI_GLOBAL(type,name) \
  178. extern type name
  179. #endif
  180. #ifndef ACPI_INIT_GLOBAL
  181. #define ACPI_INIT_GLOBAL(type,name,value) \
  182. extern type name
  183. #endif
  184. #endif
  185. /*
  186. * These macros configure the various ACPICA interfaces. They are
  187. * useful for generating stub inline functions for features that are
  188. * configured out of the current kernel or ACPICA application.
  189. */
  190. #ifndef ACPI_EXTERNAL_RETURN_STATUS
  191. #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \
  192. Prototype;
  193. #endif
  194. #ifndef ACPI_EXTERNAL_RETURN_OK
  195. #define ACPI_EXTERNAL_RETURN_OK(Prototype) \
  196. Prototype;
  197. #endif
  198. #ifndef ACPI_EXTERNAL_RETURN_VOID
  199. #define ACPI_EXTERNAL_RETURN_VOID(Prototype) \
  200. Prototype;
  201. #endif
  202. #ifndef ACPI_EXTERNAL_RETURN_UINT32
  203. #define ACPI_EXTERNAL_RETURN_UINT32(Prototype) \
  204. Prototype;
  205. #endif
  206. #ifndef ACPI_EXTERNAL_RETURN_PTR
  207. #define ACPI_EXTERNAL_RETURN_PTR(Prototype) \
  208. Prototype;
  209. #endif
  210. /*****************************************************************************
  211. *
  212. * Public globals and runtime configuration options
  213. *
  214. ****************************************************************************/
  215. /*
  216. * Enable "slack mode" of the AML interpreter? Default is FALSE, and the
  217. * interpreter strictly follows the ACPI specification. Setting to TRUE
  218. * allows the interpreter to ignore certain errors and/or bad AML constructs.
  219. *
  220. * Currently, these features are enabled by this flag:
  221. *
  222. * 1) Allow "implicit return" of last value in a control method
  223. * 2) Allow access beyond the end of an operation region
  224. * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
  225. * 4) Allow ANY object type to be a source operand for the Store() operator
  226. * 5) Allow unresolved references (invalid target name) in package objects
  227. * 6) Enable warning messages for behavior that is not ACPI spec compliant
  228. */
  229. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableInterpreterSlack, FALSE);
  230. /*
  231. * Automatically serialize all methods that create named objects? Default
  232. * is TRUE, meaning that all NonSerialized methods are scanned once at
  233. * table load time to determine those that create named objects. Methods
  234. * that create named objects are marked Serialized in order to prevent
  235. * possible run-time problems if they are entered by more than one thread.
  236. */
  237. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_AutoSerializeMethods, TRUE);
  238. /*
  239. * Create the predefined _OSI method in the namespace? Default is TRUE
  240. * because ACPICA is fully compatible with other ACPI implementations.
  241. * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
  242. */
  243. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE);
  244. /*
  245. * Optionally use default values for the ACPI register widths. Set this to
  246. * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
  247. */
  248. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE);
  249. /*
  250. * Whether or not to validate (map) an entire table to verify
  251. * checksum/duplication in early stage before install. Set this to TRUE to
  252. * allow early table validation before install it to the table manager.
  253. * Note that enabling this option causes errors to happen in some OSPMs
  254. * during early initialization stages. Default behavior is to allow such
  255. * validation.
  256. */
  257. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableTableValidation, TRUE);
  258. /*
  259. * Optionally enable output from the AML Debug Object.
  260. */
  261. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableAmlDebugObject, FALSE);
  262. /*
  263. * Optionally copy the entire DSDT to local memory (instead of simply
  264. * mapping it.) There are some BIOSs that corrupt or replace the original
  265. * DSDT, creating the need for this option. Default is FALSE, do not copy
  266. * the DSDT.
  267. */
  268. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE);
  269. /*
  270. * Optionally ignore an XSDT if present and use the RSDT instead.
  271. * Although the ACPI specification requires that an XSDT be used instead
  272. * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
  273. * some machines. Default behavior is to use the XSDT if present.
  274. */
  275. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE);
  276. /*
  277. * Optionally support module level code by parsing an entire table as
  278. * a method as it is loaded. Default is TRUE.
  279. * NOTE, this is essentially obsolete and will be removed soon
  280. * (01/2018).
  281. */
  282. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_ExecuteTablesAsMethods, TRUE);
  283. /*
  284. * Optionally use 32-bit FADT addresses if and when there is a conflict
  285. * (address mismatch) between the 32-bit and 64-bit versions of the
  286. * address. Although ACPICA adheres to the ACPI specification which
  287. * requires the use of the corresponding 64-bit address if it is non-zero,
  288. * some machines have been found to have a corrupted non-zero 64-bit
  289. * address. Default is FALSE, do not favor the 32-bit addresses.
  290. */
  291. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE);
  292. /*
  293. * Optionally use 32-bit FACS table addresses.
  294. * It is reported that some platforms fail to resume from system suspending
  295. * if 64-bit FACS table address is selected:
  296. * https://bugzilla.kernel.org/show_bug.cgi?id=74021
  297. * Default is TRUE, favor the 32-bit addresses.
  298. */
  299. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFacsAddresses, TRUE);
  300. /*
  301. * Optionally truncate I/O addresses to 16 bits. Provides compatibility
  302. * with other ACPI implementations. NOTE: During ACPICA initialization,
  303. * this value is set to TRUE if any Windows OSI strings have been
  304. * requested by the BIOS.
  305. */
  306. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE);
  307. /*
  308. * Disable runtime checking and repair of values returned by control methods.
  309. * Use only if the repair is causing a problem on a particular machine.
  310. */
  311. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE);
  312. /*
  313. * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
  314. * This can be useful for debugging ACPI problems on some machines.
  315. */
  316. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE);
  317. /*
  318. * Optionally enable runtime namespace override.
  319. */
  320. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_RuntimeNamespaceOverride, TRUE);
  321. /*
  322. * We keep track of the latest version of Windows that has been requested by
  323. * the BIOS. ACPI 5.0.
  324. */
  325. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0);
  326. /*
  327. * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
  328. * that the ACPI hardware is no longer required. A flag in the FADT indicates
  329. * a reduced HW machine, and that flag is duplicated here for convenience.
  330. */
  331. ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE);
  332. /*
  333. * Maximum timeout for While() loop iterations before forced method abort.
  334. * This mechanism is intended to prevent infinite loops during interpreter
  335. * execution within a host kernel.
  336. */
  337. ACPI_INIT_GLOBAL (UINT32, AcpiGbl_MaxLoopIterations, ACPI_MAX_LOOP_TIMEOUT);
  338. /*
  339. * Optionally ignore AE_NOT_FOUND errors from named reference package elements
  340. * during DSDT/SSDT table loading. This reduces error "noise" in platforms
  341. * whose firmware is carrying around a bunch of unused package objects that
  342. * refer to non-existent named objects. However, If the AML actually tries to
  343. * use such a package, the unresolved element(s) will be replaced with NULL
  344. * elements.
  345. */
  346. ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnorePackageResolutionErrors, FALSE);
  347. /*
  348. * This mechanism is used to trace a specified AML method. The method is
  349. * traced each time it is executed.
  350. */
  351. ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceFlags, 0);
  352. ACPI_INIT_GLOBAL (const char *, AcpiGbl_TraceMethodName, NULL);
  353. ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLevel, ACPI_TRACE_LEVEL_DEFAULT);
  354. ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLayer, ACPI_TRACE_LAYER_DEFAULT);
  355. /*
  356. * Runtime configuration of debug output control masks. We want the debug
  357. * switches statically initialized so they are already set when the debugger
  358. * is entered.
  359. */
  360. #ifdef ACPI_DEBUG_OUTPUT
  361. ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_DEBUG_DEFAULT);
  362. #else
  363. ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_NORMAL_DEFAULT);
  364. #endif
  365. ACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT);
  366. /* Optionally enable timer output with Debug Object output */
  367. ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisplayDebugTimer, FALSE);
  368. /*
  369. * Debugger command handshake globals. Host OSes need to access these
  370. * variables to implement their own command handshake mechanism.
  371. */
  372. #ifdef ACPI_DEBUGGER
  373. ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE);
  374. ACPI_GLOBAL (char, AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE]);
  375. #endif
  376. /*
  377. * Other miscellaneous globals
  378. */
  379. ACPI_GLOBAL (ACPI_TABLE_FADT, AcpiGbl_FADT);
  380. ACPI_GLOBAL (UINT32, AcpiCurrentGpeCount);
  381. ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning);
  382. /*****************************************************************************
  383. *
  384. * ACPICA public interface configuration.
  385. *
  386. * Interfaces that are configured out of the ACPICA build are replaced
  387. * by inlined stubs by default.
  388. *
  389. ****************************************************************************/
  390. /*
  391. * Hardware-reduced prototypes (default: Not hardware reduced).
  392. *
  393. * All ACPICA hardware-related interfaces that use these macros will be
  394. * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
  395. * is set to TRUE.
  396. *
  397. * Note: This static build option for reduced hardware is intended to
  398. * reduce ACPICA code size if desired or necessary. However, even if this
  399. * option is not specified, the runtime behavior of ACPICA is dependent
  400. * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
  401. * the flag will enable similar behavior -- ACPICA will not attempt
  402. * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
  403. */
  404. #if (!ACPI_REDUCED_HARDWARE)
  405. #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
  406. ACPI_EXTERNAL_RETURN_STATUS(Prototype)
  407. #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
  408. ACPI_EXTERNAL_RETURN_OK(Prototype)
  409. #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
  410. ACPI_EXTERNAL_RETURN_VOID(Prototype)
  411. #else
  412. #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
  413. static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
  414. #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
  415. static ACPI_INLINE Prototype {return(AE_OK);}
  416. #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
  417. static ACPI_INLINE Prototype {return;}
  418. #endif /* !ACPI_REDUCED_HARDWARE */
  419. /*
  420. * Error message prototypes (default: error messages enabled).
  421. *
  422. * All interfaces related to error and warning messages
  423. * will be configured out of the ACPICA build if the
  424. * ACPI_NO_ERROR_MESSAGE flag is defined.
  425. */
  426. #ifndef ACPI_NO_ERROR_MESSAGES
  427. #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
  428. Prototype;
  429. #else
  430. #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
  431. static ACPI_INLINE Prototype {return;}
  432. #endif /* ACPI_NO_ERROR_MESSAGES */
  433. /*
  434. * Debugging output prototypes (default: no debug output).
  435. *
  436. * All interfaces related to debug output messages
  437. * will be configured out of the ACPICA build unless the
  438. * ACPI_DEBUG_OUTPUT flag is defined.
  439. */
  440. #ifdef ACPI_DEBUG_OUTPUT
  441. #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
  442. Prototype;
  443. #else
  444. #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
  445. static ACPI_INLINE Prototype {return;}
  446. #endif /* ACPI_DEBUG_OUTPUT */
  447. /*
  448. * Application prototypes
  449. *
  450. * All interfaces used by application will be configured
  451. * out of the ACPICA build unless the ACPI_APPLICATION
  452. * flag is defined.
  453. */
  454. #ifdef ACPI_APPLICATION
  455. #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
  456. Prototype;
  457. #else
  458. #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
  459. static ACPI_INLINE Prototype {return;}
  460. #endif /* ACPI_APPLICATION */
  461. /*
  462. * Debugger prototypes
  463. *
  464. * All interfaces used by debugger will be configured
  465. * out of the ACPICA build unless the ACPI_DEBUGGER
  466. * flag is defined.
  467. */
  468. #ifdef ACPI_DEBUGGER
  469. #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
  470. ACPI_EXTERNAL_RETURN_OK(Prototype)
  471. #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
  472. ACPI_EXTERNAL_RETURN_VOID(Prototype)
  473. #else
  474. #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
  475. static ACPI_INLINE Prototype {return(AE_OK);}
  476. #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
  477. static ACPI_INLINE Prototype {return;}
  478. #endif /* ACPI_DEBUGGER */
  479. /*****************************************************************************
  480. *
  481. * ACPICA public interface prototypes
  482. *
  483. ****************************************************************************/
  484. /*
  485. * Initialization
  486. */
  487. ACPI_EXTERNAL_RETURN_STATUS (
  488. ACPI_STATUS ACPI_INIT_FUNCTION
  489. AcpiInitializeTables (
  490. ACPI_TABLE_DESC *InitialStorage,
  491. UINT32 InitialTableCount,
  492. BOOLEAN AllowResize))
  493. ACPI_EXTERNAL_RETURN_STATUS (
  494. ACPI_STATUS ACPI_INIT_FUNCTION
  495. AcpiInitializeSubsystem (
  496. void))
  497. ACPI_EXTERNAL_RETURN_STATUS (
  498. ACPI_STATUS ACPI_INIT_FUNCTION
  499. AcpiEnableSubsystem (
  500. UINT32 Flags))
  501. ACPI_EXTERNAL_RETURN_STATUS (
  502. ACPI_STATUS ACPI_INIT_FUNCTION
  503. AcpiInitializeObjects (
  504. UINT32 Flags))
  505. ACPI_EXTERNAL_RETURN_STATUS (
  506. ACPI_STATUS ACPI_INIT_FUNCTION
  507. AcpiTerminate (
  508. void))
  509. /*
  510. * Miscellaneous global interfaces
  511. */
  512. ACPI_HW_DEPENDENT_RETURN_STATUS (
  513. ACPI_STATUS
  514. AcpiEnable (
  515. void))
  516. ACPI_HW_DEPENDENT_RETURN_STATUS (
  517. ACPI_STATUS
  518. AcpiDisable (
  519. void))
  520. ACPI_EXTERNAL_RETURN_STATUS (
  521. ACPI_STATUS
  522. AcpiSubsystemStatus (
  523. void))
  524. ACPI_EXTERNAL_RETURN_STATUS (
  525. ACPI_STATUS
  526. AcpiGetSystemInfo (
  527. ACPI_BUFFER *RetBuffer))
  528. ACPI_EXTERNAL_RETURN_STATUS (
  529. ACPI_STATUS
  530. AcpiGetStatistics (
  531. ACPI_STATISTICS *Stats))
  532. ACPI_EXTERNAL_RETURN_PTR (
  533. const char *
  534. AcpiFormatException (
  535. ACPI_STATUS Exception))
  536. ACPI_EXTERNAL_RETURN_STATUS (
  537. ACPI_STATUS
  538. AcpiPurgeCachedObjects (
  539. void))
  540. ACPI_EXTERNAL_RETURN_STATUS (
  541. ACPI_STATUS
  542. AcpiInstallInterface (
  543. ACPI_STRING InterfaceName))
  544. ACPI_EXTERNAL_RETURN_STATUS (
  545. ACPI_STATUS
  546. AcpiRemoveInterface (
  547. ACPI_STRING InterfaceName))
  548. ACPI_EXTERNAL_RETURN_STATUS (
  549. ACPI_STATUS
  550. AcpiUpdateInterfaces (
  551. UINT8 Action))
  552. ACPI_EXTERNAL_RETURN_UINT32 (
  553. UINT32
  554. AcpiCheckAddressRange (
  555. ACPI_ADR_SPACE_TYPE SpaceId,
  556. ACPI_PHYSICAL_ADDRESS Address,
  557. ACPI_SIZE Length,
  558. BOOLEAN Warn))
  559. ACPI_EXTERNAL_RETURN_STATUS (
  560. ACPI_STATUS
  561. AcpiDecodePldBuffer (
  562. UINT8 *InBuffer,
  563. ACPI_SIZE Length,
  564. ACPI_PLD_INFO **ReturnBuffer))
  565. /*
  566. * ACPI table load/unload interfaces
  567. */
  568. ACPI_EXTERNAL_RETURN_STATUS (
  569. ACPI_STATUS ACPI_INIT_FUNCTION
  570. AcpiInstallTable (
  571. ACPI_PHYSICAL_ADDRESS Address,
  572. BOOLEAN Physical))
  573. ACPI_EXTERNAL_RETURN_STATUS (
  574. ACPI_STATUS
  575. AcpiLoadTable (
  576. ACPI_TABLE_HEADER *Table))
  577. ACPI_EXTERNAL_RETURN_STATUS (
  578. ACPI_STATUS
  579. AcpiUnloadParentTable (
  580. ACPI_HANDLE Object))
  581. ACPI_EXTERNAL_RETURN_STATUS (
  582. ACPI_STATUS ACPI_INIT_FUNCTION
  583. AcpiLoadTables (
  584. void))
  585. /*
  586. * ACPI table manipulation interfaces
  587. */
  588. ACPI_EXTERNAL_RETURN_STATUS (
  589. ACPI_STATUS ACPI_INIT_FUNCTION
  590. AcpiReallocateRootTable (
  591. void))
  592. ACPI_EXTERNAL_RETURN_STATUS (
  593. ACPI_STATUS ACPI_INIT_FUNCTION
  594. AcpiFindRootPointer (
  595. ACPI_PHYSICAL_ADDRESS *RsdpAddress))
  596. ACPI_EXTERNAL_RETURN_STATUS (
  597. ACPI_STATUS
  598. AcpiGetTableHeader (
  599. ACPI_STRING Signature,
  600. UINT32 Instance,
  601. ACPI_TABLE_HEADER *OutTableHeader))
  602. ACPI_EXTERNAL_RETURN_STATUS (
  603. ACPI_STATUS
  604. AcpiGetTable (
  605. ACPI_STRING Signature,
  606. UINT32 Instance,
  607. ACPI_TABLE_HEADER **OutTable))
  608. ACPI_EXTERNAL_RETURN_VOID (
  609. void
  610. AcpiPutTable (
  611. ACPI_TABLE_HEADER *Table))
  612. ACPI_EXTERNAL_RETURN_STATUS (
  613. ACPI_STATUS
  614. AcpiGetTableByIndex (
  615. UINT32 TableIndex,
  616. ACPI_TABLE_HEADER **OutTable))
  617. ACPI_EXTERNAL_RETURN_STATUS (
  618. ACPI_STATUS
  619. AcpiInstallTableHandler (
  620. ACPI_TABLE_HANDLER Handler,
  621. void *Context))
  622. ACPI_EXTERNAL_RETURN_STATUS (
  623. ACPI_STATUS
  624. AcpiRemoveTableHandler (
  625. ACPI_TABLE_HANDLER Handler))
  626. /*
  627. * Namespace and name interfaces
  628. */
  629. ACPI_EXTERNAL_RETURN_STATUS (
  630. ACPI_STATUS
  631. AcpiWalkNamespace (
  632. ACPI_OBJECT_TYPE Type,
  633. ACPI_HANDLE StartObject,
  634. UINT32 MaxDepth,
  635. ACPI_WALK_CALLBACK DescendingCallback,
  636. ACPI_WALK_CALLBACK AscendingCallback,
  637. void *Context,
  638. void **ReturnValue))
  639. ACPI_EXTERNAL_RETURN_STATUS (
  640. ACPI_STATUS
  641. AcpiGetDevices (
  642. char *HID,
  643. ACPI_WALK_CALLBACK UserFunction,
  644. void *Context,
  645. void **ReturnValue))
  646. ACPI_EXTERNAL_RETURN_STATUS (
  647. ACPI_STATUS
  648. AcpiGetName (
  649. ACPI_HANDLE Object,
  650. UINT32 NameType,
  651. ACPI_BUFFER *RetPathPtr))
  652. ACPI_EXTERNAL_RETURN_STATUS (
  653. ACPI_STATUS
  654. AcpiGetHandle (
  655. ACPI_HANDLE Parent,
  656. ACPI_STRING Pathname,
  657. ACPI_HANDLE *RetHandle))
  658. ACPI_EXTERNAL_RETURN_STATUS (
  659. ACPI_STATUS
  660. AcpiAttachData (
  661. ACPI_HANDLE Object,
  662. ACPI_OBJECT_HANDLER Handler,
  663. void *Data))
  664. ACPI_EXTERNAL_RETURN_STATUS (
  665. ACPI_STATUS
  666. AcpiDetachData (
  667. ACPI_HANDLE Object,
  668. ACPI_OBJECT_HANDLER Handler))
  669. ACPI_EXTERNAL_RETURN_STATUS (
  670. ACPI_STATUS
  671. AcpiGetData (
  672. ACPI_HANDLE Object,
  673. ACPI_OBJECT_HANDLER Handler,
  674. void **Data))
  675. ACPI_EXTERNAL_RETURN_STATUS (
  676. ACPI_STATUS
  677. AcpiDebugTrace (
  678. const char *Name,
  679. UINT32 DebugLevel,
  680. UINT32 DebugLayer,
  681. UINT32 Flags))
  682. /*
  683. * Object manipulation and enumeration
  684. */
  685. ACPI_EXTERNAL_RETURN_STATUS (
  686. ACPI_STATUS
  687. AcpiEvaluateObject (
  688. ACPI_HANDLE Object,
  689. ACPI_STRING Pathname,
  690. ACPI_OBJECT_LIST *ParameterObjects,
  691. ACPI_BUFFER *ReturnObjectBuffer))
  692. ACPI_EXTERNAL_RETURN_STATUS (
  693. ACPI_STATUS
  694. AcpiEvaluateObjectTyped (
  695. ACPI_HANDLE Object,
  696. ACPI_STRING Pathname,
  697. ACPI_OBJECT_LIST *ExternalParams,
  698. ACPI_BUFFER *ReturnBuffer,
  699. ACPI_OBJECT_TYPE ReturnType))
  700. ACPI_EXTERNAL_RETURN_STATUS (
  701. ACPI_STATUS
  702. AcpiGetObjectInfo (
  703. ACPI_HANDLE Object,
  704. ACPI_DEVICE_INFO **ReturnBuffer))
  705. ACPI_EXTERNAL_RETURN_STATUS (
  706. ACPI_STATUS
  707. AcpiInstallMethod (
  708. UINT8 *Buffer))
  709. ACPI_EXTERNAL_RETURN_STATUS (
  710. ACPI_STATUS
  711. AcpiGetNextObject (
  712. ACPI_OBJECT_TYPE Type,
  713. ACPI_HANDLE Parent,
  714. ACPI_HANDLE Child,
  715. ACPI_HANDLE *OutHandle))
  716. ACPI_EXTERNAL_RETURN_STATUS (
  717. ACPI_STATUS
  718. AcpiGetType (
  719. ACPI_HANDLE Object,
  720. ACPI_OBJECT_TYPE *OutType))
  721. ACPI_EXTERNAL_RETURN_STATUS (
  722. ACPI_STATUS
  723. AcpiGetParent (
  724. ACPI_HANDLE Object,
  725. ACPI_HANDLE *OutHandle))
  726. /*
  727. * Handler interfaces
  728. */
  729. ACPI_EXTERNAL_RETURN_STATUS (
  730. ACPI_STATUS
  731. AcpiInstallInitializationHandler (
  732. ACPI_INIT_HANDLER Handler,
  733. UINT32 Function))
  734. ACPI_HW_DEPENDENT_RETURN_STATUS (
  735. ACPI_STATUS
  736. AcpiInstallSciHandler (
  737. ACPI_SCI_HANDLER Address,
  738. void *Context))
  739. ACPI_HW_DEPENDENT_RETURN_STATUS (
  740. ACPI_STATUS
  741. AcpiRemoveSciHandler (
  742. ACPI_SCI_HANDLER Address))
  743. ACPI_HW_DEPENDENT_RETURN_STATUS (
  744. ACPI_STATUS
  745. AcpiInstallGlobalEventHandler (
  746. ACPI_GBL_EVENT_HANDLER Handler,
  747. void *Context))
  748. ACPI_HW_DEPENDENT_RETURN_STATUS (
  749. ACPI_STATUS
  750. AcpiInstallFixedEventHandler (
  751. UINT32 AcpiEvent,
  752. ACPI_EVENT_HANDLER Handler,
  753. void *Context))
  754. ACPI_HW_DEPENDENT_RETURN_STATUS (
  755. ACPI_STATUS
  756. AcpiRemoveFixedEventHandler (
  757. UINT32 AcpiEvent,
  758. ACPI_EVENT_HANDLER Handler))
  759. ACPI_HW_DEPENDENT_RETURN_STATUS (
  760. ACPI_STATUS
  761. AcpiInstallGpeHandler (
  762. ACPI_HANDLE GpeDevice,
  763. UINT32 GpeNumber,
  764. UINT32 Type,
  765. ACPI_GPE_HANDLER Address,
  766. void *Context))
  767. ACPI_HW_DEPENDENT_RETURN_STATUS (
  768. ACPI_STATUS
  769. AcpiInstallGpeRawHandler (
  770. ACPI_HANDLE GpeDevice,
  771. UINT32 GpeNumber,
  772. UINT32 Type,
  773. ACPI_GPE_HANDLER Address,
  774. void *Context))
  775. ACPI_HW_DEPENDENT_RETURN_STATUS (
  776. ACPI_STATUS
  777. AcpiRemoveGpeHandler (
  778. ACPI_HANDLE GpeDevice,
  779. UINT32 GpeNumber,
  780. ACPI_GPE_HANDLER Address))
  781. ACPI_EXTERNAL_RETURN_STATUS (
  782. ACPI_STATUS
  783. AcpiInstallNotifyHandler (
  784. ACPI_HANDLE Device,
  785. UINT32 HandlerType,
  786. ACPI_NOTIFY_HANDLER Handler,
  787. void *Context))
  788. ACPI_EXTERNAL_RETURN_STATUS (
  789. ACPI_STATUS
  790. AcpiRemoveNotifyHandler (
  791. ACPI_HANDLE Device,
  792. UINT32 HandlerType,
  793. ACPI_NOTIFY_HANDLER Handler))
  794. ACPI_EXTERNAL_RETURN_STATUS (
  795. ACPI_STATUS
  796. AcpiInstallAddressSpaceHandler (
  797. ACPI_HANDLE Device,
  798. ACPI_ADR_SPACE_TYPE SpaceId,
  799. ACPI_ADR_SPACE_HANDLER Handler,
  800. ACPI_ADR_SPACE_SETUP Setup,
  801. void *Context))
  802. ACPI_EXTERNAL_RETURN_STATUS (
  803. ACPI_STATUS
  804. AcpiRemoveAddressSpaceHandler (
  805. ACPI_HANDLE Device,
  806. ACPI_ADR_SPACE_TYPE SpaceId,
  807. ACPI_ADR_SPACE_HANDLER Handler))
  808. ACPI_EXTERNAL_RETURN_STATUS (
  809. ACPI_STATUS
  810. AcpiInstallExceptionHandler (
  811. ACPI_EXCEPTION_HANDLER Handler))
  812. ACPI_EXTERNAL_RETURN_STATUS (
  813. ACPI_STATUS
  814. AcpiInstallInterfaceHandler (
  815. ACPI_INTERFACE_HANDLER Handler))
  816. /*
  817. * Global Lock interfaces
  818. */
  819. ACPI_HW_DEPENDENT_RETURN_STATUS (
  820. ACPI_STATUS
  821. AcpiAcquireGlobalLock (
  822. UINT16 Timeout,
  823. UINT32 *Handle))
  824. ACPI_HW_DEPENDENT_RETURN_STATUS (
  825. ACPI_STATUS
  826. AcpiReleaseGlobalLock (
  827. UINT32 Handle))
  828. /*
  829. * Interfaces to AML mutex objects
  830. */
  831. ACPI_EXTERNAL_RETURN_STATUS (
  832. ACPI_STATUS
  833. AcpiAcquireMutex (
  834. ACPI_HANDLE Handle,
  835. ACPI_STRING Pathname,
  836. UINT16 Timeout))
  837. ACPI_EXTERNAL_RETURN_STATUS (
  838. ACPI_STATUS
  839. AcpiReleaseMutex (
  840. ACPI_HANDLE Handle,
  841. ACPI_STRING Pathname))
  842. /*
  843. * Fixed Event interfaces
  844. */
  845. ACPI_HW_DEPENDENT_RETURN_STATUS (
  846. ACPI_STATUS
  847. AcpiEnableEvent (
  848. UINT32 Event,
  849. UINT32 Flags))
  850. ACPI_HW_DEPENDENT_RETURN_STATUS (
  851. ACPI_STATUS
  852. AcpiDisableEvent (
  853. UINT32 Event,
  854. UINT32 Flags))
  855. ACPI_HW_DEPENDENT_RETURN_STATUS (
  856. ACPI_STATUS
  857. AcpiClearEvent (
  858. UINT32 Event))
  859. ACPI_HW_DEPENDENT_RETURN_STATUS (
  860. ACPI_STATUS
  861. AcpiGetEventStatus (
  862. UINT32 Event,
  863. ACPI_EVENT_STATUS *EventStatus))
  864. /*
  865. * General Purpose Event (GPE) Interfaces
  866. */
  867. ACPI_HW_DEPENDENT_RETURN_STATUS (
  868. ACPI_STATUS
  869. AcpiUpdateAllGpes (
  870. void))
  871. ACPI_HW_DEPENDENT_RETURN_STATUS (
  872. ACPI_STATUS
  873. AcpiEnableGpe (
  874. ACPI_HANDLE GpeDevice,
  875. UINT32 GpeNumber))
  876. ACPI_HW_DEPENDENT_RETURN_STATUS (
  877. ACPI_STATUS
  878. AcpiDisableGpe (
  879. ACPI_HANDLE GpeDevice,
  880. UINT32 GpeNumber))
  881. ACPI_HW_DEPENDENT_RETURN_STATUS (
  882. ACPI_STATUS
  883. AcpiClearGpe (
  884. ACPI_HANDLE GpeDevice,
  885. UINT32 GpeNumber))
  886. ACPI_HW_DEPENDENT_RETURN_STATUS (
  887. ACPI_STATUS
  888. AcpiSetGpe (
  889. ACPI_HANDLE GpeDevice,
  890. UINT32 GpeNumber,
  891. UINT8 Action))
  892. ACPI_HW_DEPENDENT_RETURN_STATUS (
  893. ACPI_STATUS
  894. AcpiFinishGpe (
  895. ACPI_HANDLE GpeDevice,
  896. UINT32 GpeNumber))
  897. ACPI_HW_DEPENDENT_RETURN_STATUS (
  898. ACPI_STATUS
  899. AcpiMaskGpe (
  900. ACPI_HANDLE GpeDevice,
  901. UINT32 GpeNumber,
  902. BOOLEAN IsMasked))
  903. ACPI_HW_DEPENDENT_RETURN_STATUS (
  904. ACPI_STATUS
  905. AcpiMarkGpeForWake (
  906. ACPI_HANDLE GpeDevice,
  907. UINT32 GpeNumber))
  908. ACPI_HW_DEPENDENT_RETURN_STATUS (
  909. ACPI_STATUS
  910. AcpiSetupGpeForWake (
  911. ACPI_HANDLE ParentDevice,
  912. ACPI_HANDLE GpeDevice,
  913. UINT32 GpeNumber))
  914. ACPI_HW_DEPENDENT_RETURN_STATUS (
  915. ACPI_STATUS
  916. AcpiSetGpeWakeMask (
  917. ACPI_HANDLE GpeDevice,
  918. UINT32 GpeNumber,
  919. UINT8 Action))
  920. ACPI_HW_DEPENDENT_RETURN_STATUS (
  921. ACPI_STATUS
  922. AcpiGetGpeStatus (
  923. ACPI_HANDLE GpeDevice,
  924. UINT32 GpeNumber,
  925. ACPI_EVENT_STATUS *EventStatus))
  926. ACPI_HW_DEPENDENT_RETURN_STATUS (
  927. ACPI_STATUS
  928. AcpiDisableAllGpes (
  929. void))
  930. ACPI_HW_DEPENDENT_RETURN_STATUS (
  931. ACPI_STATUS
  932. AcpiEnableAllRuntimeGpes (
  933. void))
  934. ACPI_HW_DEPENDENT_RETURN_STATUS (
  935. ACPI_STATUS
  936. AcpiEnableAllWakeupGpes (
  937. void))
  938. ACPI_HW_DEPENDENT_RETURN_STATUS (
  939. ACPI_STATUS
  940. AcpiGetGpeDevice (
  941. UINT32 GpeIndex,
  942. ACPI_HANDLE *GpeDevice))
  943. ACPI_HW_DEPENDENT_RETURN_STATUS (
  944. ACPI_STATUS
  945. AcpiInstallGpeBlock (
  946. ACPI_HANDLE GpeDevice,
  947. ACPI_GENERIC_ADDRESS *GpeBlockAddress,
  948. UINT32 RegisterCount,
  949. UINT32 InterruptNumber))
  950. ACPI_HW_DEPENDENT_RETURN_STATUS (
  951. ACPI_STATUS
  952. AcpiRemoveGpeBlock (
  953. ACPI_HANDLE GpeDevice))
  954. /*
  955. * Resource interfaces
  956. */
  957. typedef
  958. ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
  959. ACPI_RESOURCE *Resource,
  960. void *Context);
  961. ACPI_EXTERNAL_RETURN_STATUS (
  962. ACPI_STATUS
  963. AcpiGetVendorResource (
  964. ACPI_HANDLE Device,
  965. char *Name,
  966. ACPI_VENDOR_UUID *Uuid,
  967. ACPI_BUFFER *RetBuffer))
  968. ACPI_EXTERNAL_RETURN_STATUS (
  969. ACPI_STATUS
  970. AcpiGetCurrentResources (
  971. ACPI_HANDLE Device,
  972. ACPI_BUFFER *RetBuffer))
  973. ACPI_EXTERNAL_RETURN_STATUS (
  974. ACPI_STATUS
  975. AcpiGetPossibleResources (
  976. ACPI_HANDLE Device,
  977. ACPI_BUFFER *RetBuffer))
  978. ACPI_EXTERNAL_RETURN_STATUS (
  979. ACPI_STATUS
  980. AcpiGetEventResources (
  981. ACPI_HANDLE DeviceHandle,
  982. ACPI_BUFFER *RetBuffer))
  983. ACPI_EXTERNAL_RETURN_STATUS (
  984. ACPI_STATUS
  985. AcpiWalkResourceBuffer (
  986. ACPI_BUFFER *Buffer,
  987. ACPI_WALK_RESOURCE_CALLBACK UserFunction,
  988. void *Context))
  989. ACPI_EXTERNAL_RETURN_STATUS (
  990. ACPI_STATUS
  991. AcpiWalkResources (
  992. ACPI_HANDLE Device,
  993. char *Name,
  994. ACPI_WALK_RESOURCE_CALLBACK UserFunction,
  995. void *Context))
  996. ACPI_EXTERNAL_RETURN_STATUS (
  997. ACPI_STATUS
  998. AcpiSetCurrentResources (
  999. ACPI_HANDLE Device,
  1000. ACPI_BUFFER *InBuffer))
  1001. ACPI_EXTERNAL_RETURN_STATUS (
  1002. ACPI_STATUS
  1003. AcpiGetIrqRoutingTable (
  1004. ACPI_HANDLE Device,
  1005. ACPI_BUFFER *RetBuffer))
  1006. ACPI_EXTERNAL_RETURN_STATUS (
  1007. ACPI_STATUS
  1008. AcpiResourceToAddress64 (
  1009. ACPI_RESOURCE *Resource,
  1010. ACPI_RESOURCE_ADDRESS64 *Out))
  1011. ACPI_EXTERNAL_RETURN_STATUS (
  1012. ACPI_STATUS
  1013. AcpiBufferToResource (
  1014. UINT8 *AmlBuffer,
  1015. UINT16 AmlBufferLength,
  1016. ACPI_RESOURCE **ResourcePtr))
  1017. /*
  1018. * Hardware (ACPI device) interfaces
  1019. */
  1020. ACPI_EXTERNAL_RETURN_STATUS (
  1021. ACPI_STATUS
  1022. AcpiReset (
  1023. void))
  1024. ACPI_EXTERNAL_RETURN_STATUS (
  1025. ACPI_STATUS
  1026. AcpiRead (
  1027. UINT64 *Value,
  1028. ACPI_GENERIC_ADDRESS *Reg))
  1029. ACPI_EXTERNAL_RETURN_STATUS (
  1030. ACPI_STATUS
  1031. AcpiWrite (
  1032. UINT64 Value,
  1033. ACPI_GENERIC_ADDRESS *Reg))
  1034. ACPI_HW_DEPENDENT_RETURN_STATUS (
  1035. ACPI_STATUS
  1036. AcpiReadBitRegister (
  1037. UINT32 RegisterId,
  1038. UINT32 *ReturnValue))
  1039. ACPI_HW_DEPENDENT_RETURN_STATUS (
  1040. ACPI_STATUS
  1041. AcpiWriteBitRegister (
  1042. UINT32 RegisterId,
  1043. UINT32 Value))
  1044. /*
  1045. * Sleep/Wake interfaces
  1046. */
  1047. ACPI_EXTERNAL_RETURN_STATUS (
  1048. ACPI_STATUS
  1049. AcpiGetSleepTypeData (
  1050. UINT8 SleepState,
  1051. UINT8 *Slp_TypA,
  1052. UINT8 *Slp_TypB))
  1053. ACPI_EXTERNAL_RETURN_STATUS (
  1054. ACPI_STATUS
  1055. AcpiEnterSleepStatePrep (
  1056. UINT8 SleepState))
  1057. ACPI_EXTERNAL_RETURN_STATUS (
  1058. ACPI_STATUS
  1059. AcpiEnterSleepState (
  1060. UINT8 SleepState))
  1061. ACPI_HW_DEPENDENT_RETURN_STATUS (
  1062. ACPI_STATUS
  1063. AcpiEnterSleepStateS4bios (
  1064. void))
  1065. ACPI_EXTERNAL_RETURN_STATUS (
  1066. ACPI_STATUS
  1067. AcpiLeaveSleepStatePrep (
  1068. UINT8 SleepState))
  1069. ACPI_EXTERNAL_RETURN_STATUS (
  1070. ACPI_STATUS
  1071. AcpiLeaveSleepState (
  1072. UINT8 SleepState))
  1073. ACPI_HW_DEPENDENT_RETURN_STATUS (
  1074. ACPI_STATUS
  1075. AcpiSetFirmwareWakingVector (
  1076. ACPI_PHYSICAL_ADDRESS PhysicalAddress,
  1077. ACPI_PHYSICAL_ADDRESS PhysicalAddress64))
  1078. /*
  1079. * ACPI Timer interfaces
  1080. */
  1081. ACPI_HW_DEPENDENT_RETURN_STATUS (
  1082. ACPI_STATUS
  1083. AcpiGetTimerResolution (
  1084. UINT32 *Resolution))
  1085. ACPI_HW_DEPENDENT_RETURN_STATUS (
  1086. ACPI_STATUS
  1087. AcpiGetTimer (
  1088. UINT32 *Ticks))
  1089. ACPI_HW_DEPENDENT_RETURN_STATUS (
  1090. ACPI_STATUS
  1091. AcpiGetTimerDuration (
  1092. UINT32 StartTicks,
  1093. UINT32 EndTicks,
  1094. UINT32 *TimeElapsed))
  1095. /*
  1096. * Error/Warning output
  1097. */
  1098. ACPI_MSG_DEPENDENT_RETURN_VOID (
  1099. ACPI_PRINTF_LIKE(3)
  1100. void ACPI_INTERNAL_VAR_XFACE
  1101. AcpiError (
  1102. const char *ModuleName,
  1103. UINT32 LineNumber,
  1104. const char *Format,
  1105. ...))
  1106. ACPI_MSG_DEPENDENT_RETURN_VOID (
  1107. ACPI_PRINTF_LIKE(4)
  1108. void ACPI_INTERNAL_VAR_XFACE
  1109. AcpiException (
  1110. const char *ModuleName,
  1111. UINT32 LineNumber,
  1112. ACPI_STATUS Status,
  1113. const char *Format,
  1114. ...))
  1115. ACPI_MSG_DEPENDENT_RETURN_VOID (
  1116. ACPI_PRINTF_LIKE(3)
  1117. void ACPI_INTERNAL_VAR_XFACE
  1118. AcpiWarning (
  1119. const char *ModuleName,
  1120. UINT32 LineNumber,
  1121. const char *Format,
  1122. ...))
  1123. ACPI_MSG_DEPENDENT_RETURN_VOID (
  1124. ACPI_PRINTF_LIKE(1)
  1125. void ACPI_INTERNAL_VAR_XFACE
  1126. AcpiInfo (
  1127. const char *Format,
  1128. ...))
  1129. ACPI_MSG_DEPENDENT_RETURN_VOID (
  1130. ACPI_PRINTF_LIKE(3)
  1131. void ACPI_INTERNAL_VAR_XFACE
  1132. AcpiBiosError (
  1133. const char *ModuleName,
  1134. UINT32 LineNumber,
  1135. const char *Format,
  1136. ...))
  1137. ACPI_MSG_DEPENDENT_RETURN_VOID (
  1138. ACPI_PRINTF_LIKE(3)
  1139. void ACPI_INTERNAL_VAR_XFACE
  1140. AcpiBiosWarning (
  1141. const char *ModuleName,
  1142. UINT32 LineNumber,
  1143. const char *Format,
  1144. ...))
  1145. /*
  1146. * Debug output
  1147. */
  1148. ACPI_DBG_DEPENDENT_RETURN_VOID (
  1149. ACPI_PRINTF_LIKE(6)
  1150. void ACPI_INTERNAL_VAR_XFACE
  1151. AcpiDebugPrint (
  1152. UINT32 RequestedDebugLevel,
  1153. UINT32 LineNumber,
  1154. const char *FunctionName,
  1155. const char *ModuleName,
  1156. UINT32 ComponentId,
  1157. const char *Format,
  1158. ...))
  1159. ACPI_DBG_DEPENDENT_RETURN_VOID (
  1160. ACPI_PRINTF_LIKE(6)
  1161. void ACPI_INTERNAL_VAR_XFACE
  1162. AcpiDebugPrintRaw (
  1163. UINT32 RequestedDebugLevel,
  1164. UINT32 LineNumber,
  1165. const char *FunctionName,
  1166. const char *ModuleName,
  1167. UINT32 ComponentId,
  1168. const char *Format,
  1169. ...))
  1170. ACPI_DBG_DEPENDENT_RETURN_VOID (
  1171. void
  1172. AcpiTracePoint (
  1173. ACPI_TRACE_EVENT_TYPE Type,
  1174. BOOLEAN Begin,
  1175. UINT8 *Aml,
  1176. char *Pathname))
  1177. ACPI_STATUS
  1178. AcpiInitializeDebugger (
  1179. void);
  1180. void
  1181. AcpiTerminateDebugger (
  1182. void);
  1183. void
  1184. AcpiRunDebugger (
  1185. char *BatchBuffer);
  1186. void
  1187. AcpiSetDebuggerThreadId (
  1188. ACPI_THREAD_ID ThreadId);
  1189. #endif /* __ACXFACE_H__ */