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