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 - 2017, 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                 0x20170303
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 verify the table checksum before installation. Set
274  * this to TRUE to verify the table checksum before install it to the table
275  * manager. Note that enabling this option causes errors to happen in some
276  * OSPMs during early initialization stages. Default behavior is to do such
277  * verification.
278  */
279 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_VerifyTableChecksum, TRUE);
280 
281 /*
282  * Optionally enable output from the AML Debug Object.
283  */
284 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_EnableAmlDebugObject, FALSE);
285 
286 /*
287  * Optionally copy the entire DSDT to local memory (instead of simply
288  * mapping it.) There are some BIOSs that corrupt or replace the original
289  * DSDT, creating the need for this option. Default is FALSE, do not copy
290  * the DSDT.
291  */
292 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_CopyDsdtLocally, FALSE);
293 
294 /*
295  * Optionally ignore an XSDT if present and use the RSDT instead.
296  * Although the ACPI specification requires that an XSDT be used instead
297  * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
298  * some machines. Default behavior is to use the XSDT if present.
299  */
300 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_DoNotUseXsdt, FALSE);
301 
302 /*
303  * Optionally support group module level code.
304  */
305 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_GroupModuleLevelCode, FALSE);
306 
307 /*
308  * Optionally support module level code by parsing the entire table as
309  * a TermList. Default is FALSE, do not execute entire table until some
310  * lock order issues are fixed.
311  */
312 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_ParseTableAsTermList, FALSE);
313 
314 /*
315  * Optionally use 32-bit FADT addresses if and when there is a conflict
316  * (address mismatch) between the 32-bit and 64-bit versions of the
317  * address. Although ACPICA adheres to the ACPI specification which
318  * requires the use of the corresponding 64-bit address if it is non-zero,
319  * some machines have been found to have a corrupted non-zero 64-bit
320  * address. Default is FALSE, do not favor the 32-bit addresses.
321  */
322 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_Use32BitFadtAddresses, FALSE);
323 
324 /*
325  * Optionally use 32-bit FACS table addresses.
326  * It is reported that some platforms fail to resume from system suspending
327  * if 64-bit FACS table address is selected:
328  * https://bugzilla.kernel.org/show_bug.cgi?id=74021
329  * Default is TRUE, favor the 32-bit addresses.
330  */
331 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_Use32BitFacsAddresses, TRUE);
332 
333 /*
334  * Optionally truncate I/O addresses to 16 bits. Provides compatibility
335  * with other ACPI implementations. NOTE: During ACPICA initialization,
336  * this value is set to TRUE if any Windows OSI strings have been
337  * requested by the BIOS.
338  */
339 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_TruncateIoAddresses, FALSE);
340 
341 /*
342  * Disable runtime checking and repair of values returned by control methods.
343  * Use only if the repair is causing a problem on a particular machine.
344  */
345 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_DisableAutoRepair, FALSE);
346 
347 /*
348  * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
349  * This can be useful for debugging ACPI problems on some machines.
350  */
351 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_DisableSsdtTableInstall, FALSE);
352 
353 /*
354  * Optionally enable runtime namespace override.
355  */
356 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_RuntimeNamespaceOverride, TRUE);
357 
358 /*
359  * We keep track of the latest version of Windows that has been requested by
360  * the BIOS. ACPI 5.0.
361  */
362 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_OsiData, 0);
363 
364 /*
365  * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
366  * that the ACPI hardware is no longer required. A flag in the FADT indicates
367  * a reduced HW machine, and that flag is duplicated here for convenience.
368  */
369 ACPI_INIT_GLOBAL (BOOLEAN,          AcpiGbl_ReducedHardware, FALSE);
370 
371 /*
372  * Maximum number of While() loop iterations before forced method abort.
373  * This mechanism is intended to prevent infinite loops during interpreter
374  * execution within a host kernel.
375  */
376 ACPI_INIT_GLOBAL (UINT32,           AcpiGbl_MaxLoopIterations, ACPI_MAX_LOOP_COUNT);
377 
378 /*
379  * This mechanism is used to trace a specified AML method. The method is
380  * traced each time it is executed.
381  */
382 ACPI_INIT_GLOBAL (UINT32,           AcpiGbl_TraceFlags, 0);
383 ACPI_INIT_GLOBAL (const char *,     AcpiGbl_TraceMethodName, NULL);
384 ACPI_INIT_GLOBAL (UINT32,           AcpiGbl_TraceDbgLevel, ACPI_TRACE_LEVEL_DEFAULT);
385 ACPI_INIT_GLOBAL (UINT32,           AcpiGbl_TraceDbgLayer, ACPI_TRACE_LAYER_DEFAULT);
386 
387 /*
388  * Runtime configuration of debug output control masks. We want the debug
389  * switches statically initialized so they are already set when the debugger
390  * is entered.
391  */
392 #ifdef ACPI_DEBUG_OUTPUT
393 ACPI_INIT_GLOBAL (UINT32,           AcpiDbgLevel, ACPI_DEBUG_DEFAULT);
394 #else
395 ACPI_INIT_GLOBAL (UINT32,           AcpiDbgLevel, ACPI_NORMAL_DEFAULT);
396 #endif
397 ACPI_INIT_GLOBAL (UINT32,           AcpiDbgLayer, ACPI_COMPONENT_DEFAULT);
398 
399 /* Optionally enable timer output with Debug Object output */
400 
401 ACPI_INIT_GLOBAL (UINT8,            AcpiGbl_DisplayDebugTimer, FALSE);
402 
403 /*
404  * Debugger command handshake globals. Host OSes need to access these
405  * variables to implement their own command handshake mechanism.
406  */
407 #ifdef ACPI_DEBUGGER
408 ACPI_INIT_GLOBAL (BOOLEAN,          AcpiGbl_MethodExecuting, FALSE);
409 ACPI_GLOBAL (char,                  AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE]);
410 #endif
411 
412 /*
413  * Other miscellaneous globals
414  */
415 ACPI_GLOBAL (ACPI_TABLE_FADT,       AcpiGbl_FADT);
416 ACPI_GLOBAL (UINT32,                AcpiCurrentGpeCount);
417 ACPI_GLOBAL (BOOLEAN,               AcpiGbl_SystemAwakeAndRunning);
418 
419 
420 /*****************************************************************************
421  *
422  * ACPICA public interface configuration.
423  *
424  * Interfaces that are configured out of the ACPICA build are replaced
425  * by inlined stubs by default.
426  *
427  ****************************************************************************/
428 
429 /*
430  * Hardware-reduced prototypes (default: Not hardware reduced).
431  *
432  * All ACPICA hardware-related interfaces that use these macros will be
433  * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
434  * is set to TRUE.
435  *
436  * Note: This static build option for reduced hardware is intended to
437  * reduce ACPICA code size if desired or necessary. However, even if this
438  * option is not specified, the runtime behavior of ACPICA is dependent
439  * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
440  * the flag will enable similar behavior -- ACPICA will not attempt
441  * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
442  */
443 #if (!ACPI_REDUCED_HARDWARE)
444 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
445     ACPI_EXTERNAL_RETURN_STATUS(Prototype)
446 
447 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
448     ACPI_EXTERNAL_RETURN_OK(Prototype)
449 
450 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
451     ACPI_EXTERNAL_RETURN_VOID(Prototype)
452 
453 #else
454 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
455     static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
456 
457 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
458     static ACPI_INLINE Prototype {return(AE_OK);}
459 
460 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
461     static ACPI_INLINE Prototype {return;}
462 
463 #endif /* !ACPI_REDUCED_HARDWARE */
464 
465 
466 /*
467  * Error message prototypes (default: error messages enabled).
468  *
469  * All interfaces related to error and warning messages
470  * will be configured out of the ACPICA build if the
471  * ACPI_NO_ERROR_MESSAGE flag is defined.
472  */
473 #ifndef ACPI_NO_ERROR_MESSAGES
474 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
475     Prototype;
476 
477 #else
478 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
479     static ACPI_INLINE Prototype {return;}
480 
481 #endif /* ACPI_NO_ERROR_MESSAGES */
482 
483 
484 /*
485  * Debugging output prototypes (default: no debug output).
486  *
487  * All interfaces related to debug output messages
488  * will be configured out of the ACPICA build unless the
489  * ACPI_DEBUG_OUTPUT flag is defined.
490  */
491 #ifdef ACPI_DEBUG_OUTPUT
492 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
493     Prototype;
494 
495 #else
496 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
497     static ACPI_INLINE Prototype {return;}
498 
499 #endif /* ACPI_DEBUG_OUTPUT */
500 
501 
502 /*
503  * Application prototypes
504  *
505  * All interfaces used by application will be configured
506  * out of the ACPICA build unless the ACPI_APPLICATION
507  * flag is defined.
508  */
509 #ifdef ACPI_APPLICATION
510 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
511     Prototype;
512 
513 #else
514 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
515     static ACPI_INLINE Prototype {return;}
516 
517 #endif /* ACPI_APPLICATION */
518 
519 
520 /*
521  * Debugger prototypes
522  *
523  * All interfaces used by debugger will be configured
524  * out of the ACPICA build unless the ACPI_DEBUGGER
525  * flag is defined.
526  */
527 #ifdef ACPI_DEBUGGER
528 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
529     ACPI_EXTERNAL_RETURN_OK(Prototype)
530 
531 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
532     ACPI_EXTERNAL_RETURN_VOID(Prototype)
533 
534 #else
535 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
536     static ACPI_INLINE Prototype {return(AE_OK);}
537 
538 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
539     static ACPI_INLINE Prototype {return;}
540 
541 #endif /* ACPI_DEBUGGER */
542 
543 
544 /*****************************************************************************
545  *
546  * ACPICA public interface prototypes
547  *
548  ****************************************************************************/
549 
550 /*
551  * Initialization
552  */
553 ACPI_EXTERNAL_RETURN_STATUS (
554 ACPI_STATUS ACPI_INIT_FUNCTION
555 AcpiInitializeTables (
556     ACPI_TABLE_DESC         *InitialStorage,
557     UINT32                  InitialTableCount,
558     BOOLEAN                 AllowResize))
559 
560 ACPI_EXTERNAL_RETURN_STATUS (
561 ACPI_STATUS ACPI_INIT_FUNCTION
562 AcpiInitializeSubsystem (
563     void))
564 
565 ACPI_EXTERNAL_RETURN_STATUS (
566 ACPI_STATUS ACPI_INIT_FUNCTION
567 AcpiEnableSubsystem (
568     UINT32                  Flags))
569 
570 ACPI_EXTERNAL_RETURN_STATUS (
571 ACPI_STATUS ACPI_INIT_FUNCTION
572 AcpiInitializeObjects (
573     UINT32                  Flags))
574 
575 ACPI_EXTERNAL_RETURN_STATUS (
576 ACPI_STATUS ACPI_INIT_FUNCTION
577 AcpiTerminate (
578     void))
579 
580 
581 /*
582  * Miscellaneous global interfaces
583  */
584 ACPI_HW_DEPENDENT_RETURN_STATUS (
585 ACPI_STATUS
586 AcpiEnable (
587     void))
588 
589 ACPI_HW_DEPENDENT_RETURN_STATUS (
590 ACPI_STATUS
591 AcpiDisable (
592     void))
593 
594 ACPI_EXTERNAL_RETURN_STATUS (
595 ACPI_STATUS
596 AcpiSubsystemStatus (
597     void))
598 
599 ACPI_EXTERNAL_RETURN_STATUS (
600 ACPI_STATUS
601 AcpiGetSystemInfo (
602     ACPI_BUFFER             *RetBuffer))
603 
604 ACPI_EXTERNAL_RETURN_STATUS (
605 ACPI_STATUS
606 AcpiGetStatistics (
607     ACPI_STATISTICS         *Stats))
608 
609 ACPI_EXTERNAL_RETURN_PTR (
610 const char *
611 AcpiFormatException (
612     ACPI_STATUS             Exception))
613 
614 ACPI_EXTERNAL_RETURN_STATUS (
615 ACPI_STATUS
616 AcpiPurgeCachedObjects (
617     void))
618 
619 ACPI_EXTERNAL_RETURN_STATUS (
620 ACPI_STATUS
621 AcpiInstallInterface (
622     ACPI_STRING             InterfaceName))
623 
624 ACPI_EXTERNAL_RETURN_STATUS (
625 ACPI_STATUS
626 AcpiRemoveInterface (
627     ACPI_STRING             InterfaceName))
628 
629 ACPI_EXTERNAL_RETURN_STATUS (
630 ACPI_STATUS
631 AcpiUpdateInterfaces (
632     UINT8                   Action))
633 
634 ACPI_EXTERNAL_RETURN_UINT32 (
635 UINT32
636 AcpiCheckAddressRange (
637     ACPI_ADR_SPACE_TYPE     SpaceId,
638     ACPI_PHYSICAL_ADDRESS   Address,
639     ACPI_SIZE               Length,
640     BOOLEAN                 Warn))
641 
642 ACPI_EXTERNAL_RETURN_STATUS (
643 ACPI_STATUS
644 AcpiDecodePldBuffer (
645     UINT8                   *InBuffer,
646     ACPI_SIZE               Length,
647     ACPI_PLD_INFO           **ReturnBuffer))
648 
649 
650 /*
651  * ACPI table load/unload interfaces
652  */
653 ACPI_EXTERNAL_RETURN_STATUS (
654 ACPI_STATUS ACPI_INIT_FUNCTION
655 AcpiInstallTable (
656     ACPI_PHYSICAL_ADDRESS   Address,
657     BOOLEAN                 Physical))
658 
659 ACPI_EXTERNAL_RETURN_STATUS (
660 ACPI_STATUS
661 AcpiLoadTable (
662     ACPI_TABLE_HEADER       *Table))
663 
664 ACPI_EXTERNAL_RETURN_STATUS (
665 ACPI_STATUS
666 AcpiUnloadParentTable (
667     ACPI_HANDLE             Object))
668 
669 ACPI_EXTERNAL_RETURN_STATUS (
670 ACPI_STATUS ACPI_INIT_FUNCTION
671 AcpiLoadTables (
672     void))
673 
674 
675 /*
676  * ACPI table manipulation interfaces
677  */
678 ACPI_EXTERNAL_RETURN_STATUS (
679 ACPI_STATUS ACPI_INIT_FUNCTION
680 AcpiReallocateRootTable (
681     void))
682 
683 ACPI_EXTERNAL_RETURN_STATUS (
684 ACPI_STATUS ACPI_INIT_FUNCTION
685 AcpiFindRootPointer (
686     ACPI_PHYSICAL_ADDRESS   *RsdpAddress))
687 
688 ACPI_EXTERNAL_RETURN_STATUS (
689 ACPI_STATUS
690 AcpiGetTableHeader (
691     ACPI_STRING             Signature,
692     UINT32                  Instance,
693     ACPI_TABLE_HEADER       *OutTableHeader))
694 
695 ACPI_EXTERNAL_RETURN_STATUS (
696 ACPI_STATUS
697 AcpiGetTable (
698     ACPI_STRING             Signature,
699     UINT32                  Instance,
700     ACPI_TABLE_HEADER       **OutTable))
701 
702 ACPI_EXTERNAL_RETURN_VOID (
703 void
704 AcpiPutTable (
705     ACPI_TABLE_HEADER       *Table))
706 
707 ACPI_EXTERNAL_RETURN_STATUS (
708 ACPI_STATUS
709 AcpiGetTableByIndex (
710     UINT32                  TableIndex,
711     ACPI_TABLE_HEADER       **OutTable))
712 
713 ACPI_EXTERNAL_RETURN_STATUS (
714 ACPI_STATUS
715 AcpiInstallTableHandler (
716     ACPI_TABLE_HANDLER      Handler,
717     void                    *Context))
718 
719 ACPI_EXTERNAL_RETURN_STATUS (
720 ACPI_STATUS
721 AcpiRemoveTableHandler (
722     ACPI_TABLE_HANDLER      Handler))
723 
724 
725 /*
726  * Namespace and name interfaces
727  */
728 ACPI_EXTERNAL_RETURN_STATUS (
729 ACPI_STATUS
730 AcpiWalkNamespace (
731     ACPI_OBJECT_TYPE        Type,
732     ACPI_HANDLE             StartObject,
733     UINT32                  MaxDepth,
734     ACPI_WALK_CALLBACK      DescendingCallback,
735     ACPI_WALK_CALLBACK      AscendingCallback,
736     void                    *Context,
737     void                    **ReturnValue))
738 
739 ACPI_EXTERNAL_RETURN_STATUS (
740 ACPI_STATUS
741 AcpiGetDevices (
742     char                    *HID,
743     ACPI_WALK_CALLBACK      UserFunction,
744     void                    *Context,
745     void                    **ReturnValue))
746 
747 ACPI_EXTERNAL_RETURN_STATUS (
748 ACPI_STATUS
749 AcpiGetName (
750     ACPI_HANDLE             Object,
751     UINT32                  NameType,
752     ACPI_BUFFER             *RetPathPtr))
753 
754 ACPI_EXTERNAL_RETURN_STATUS (
755 ACPI_STATUS
756 AcpiGetHandle (
757     ACPI_HANDLE             Parent,
758     ACPI_STRING             Pathname,
759     ACPI_HANDLE             *RetHandle))
760 
761 ACPI_EXTERNAL_RETURN_STATUS (
762 ACPI_STATUS
763 AcpiAttachData (
764     ACPI_HANDLE             Object,
765     ACPI_OBJECT_HANDLER     Handler,
766     void                    *Data))
767 
768 ACPI_EXTERNAL_RETURN_STATUS (
769 ACPI_STATUS
770 AcpiDetachData (
771     ACPI_HANDLE             Object,
772     ACPI_OBJECT_HANDLER     Handler))
773 
774 ACPI_EXTERNAL_RETURN_STATUS (
775 ACPI_STATUS
776 AcpiGetData (
777     ACPI_HANDLE             Object,
778     ACPI_OBJECT_HANDLER     Handler,
779     void                    **Data))
780 
781 ACPI_EXTERNAL_RETURN_STATUS (
782 ACPI_STATUS
783 AcpiDebugTrace (
784     const char              *Name,
785     UINT32                  DebugLevel,
786     UINT32                  DebugLayer,
787     UINT32                  Flags))
788 
789 
790 /*
791  * Object manipulation and enumeration
792  */
793 ACPI_EXTERNAL_RETURN_STATUS (
794 ACPI_STATUS
795 AcpiEvaluateObject (
796     ACPI_HANDLE             Object,
797     ACPI_STRING             Pathname,
798     ACPI_OBJECT_LIST        *ParameterObjects,
799     ACPI_BUFFER             *ReturnObjectBuffer))
800 
801 ACPI_EXTERNAL_RETURN_STATUS (
802 ACPI_STATUS
803 AcpiEvaluateObjectTyped (
804     ACPI_HANDLE             Object,
805     ACPI_STRING             Pathname,
806     ACPI_OBJECT_LIST        *ExternalParams,
807     ACPI_BUFFER             *ReturnBuffer,
808     ACPI_OBJECT_TYPE        ReturnType))
809 
810 ACPI_EXTERNAL_RETURN_STATUS (
811 ACPI_STATUS
812 AcpiGetObjectInfo (
813     ACPI_HANDLE             Object,
814     ACPI_DEVICE_INFO        **ReturnBuffer))
815 
816 ACPI_EXTERNAL_RETURN_STATUS (
817 ACPI_STATUS
818 AcpiInstallMethod (
819     UINT8                   *Buffer))
820 
821 ACPI_EXTERNAL_RETURN_STATUS (
822 ACPI_STATUS
823 AcpiGetNextObject (
824     ACPI_OBJECT_TYPE        Type,
825     ACPI_HANDLE             Parent,
826     ACPI_HANDLE             Child,
827     ACPI_HANDLE             *OutHandle))
828 
829 ACPI_EXTERNAL_RETURN_STATUS (
830 ACPI_STATUS
831 AcpiGetType (
832     ACPI_HANDLE             Object,
833     ACPI_OBJECT_TYPE        *OutType))
834 
835 ACPI_EXTERNAL_RETURN_STATUS (
836 ACPI_STATUS
837 AcpiGetParent (
838     ACPI_HANDLE             Object,
839     ACPI_HANDLE             *OutHandle))
840 
841 
842 /*
843  * Handler interfaces
844  */
845 ACPI_EXTERNAL_RETURN_STATUS (
846 ACPI_STATUS
847 AcpiInstallInitializationHandler (
848     ACPI_INIT_HANDLER       Handler,
849     UINT32                  Function))
850 
851 ACPI_HW_DEPENDENT_RETURN_STATUS (
852 ACPI_STATUS
853 AcpiInstallSciHandler (
854     ACPI_SCI_HANDLER        Address,
855     void                    *Context))
856 
857 ACPI_HW_DEPENDENT_RETURN_STATUS (
858 ACPI_STATUS
859 AcpiRemoveSciHandler (
860     ACPI_SCI_HANDLER        Address))
861 
862 ACPI_HW_DEPENDENT_RETURN_STATUS (
863 ACPI_STATUS
864 AcpiInstallGlobalEventHandler (
865     ACPI_GBL_EVENT_HANDLER  Handler,
866     void                    *Context))
867 
868 ACPI_HW_DEPENDENT_RETURN_STATUS (
869 ACPI_STATUS
870 AcpiInstallFixedEventHandler (
871     UINT32                  AcpiEvent,
872     ACPI_EVENT_HANDLER      Handler,
873     void                    *Context))
874 
875 ACPI_HW_DEPENDENT_RETURN_STATUS (
876 ACPI_STATUS
877 AcpiRemoveFixedEventHandler (
878     UINT32                  AcpiEvent,
879     ACPI_EVENT_HANDLER      Handler))
880 
881 ACPI_HW_DEPENDENT_RETURN_STATUS (
882 ACPI_STATUS
883 AcpiInstallGpeHandler (
884     ACPI_HANDLE             GpeDevice,
885     UINT32                  GpeNumber,
886     UINT32                  Type,
887     ACPI_GPE_HANDLER        Address,
888     void                    *Context))
889 
890 ACPI_HW_DEPENDENT_RETURN_STATUS (
891 ACPI_STATUS
892 AcpiInstallGpeRawHandler (
893     ACPI_HANDLE             GpeDevice,
894     UINT32                  GpeNumber,
895     UINT32                  Type,
896     ACPI_GPE_HANDLER        Address,
897     void                    *Context))
898 
899 ACPI_HW_DEPENDENT_RETURN_STATUS (
900 ACPI_STATUS
901 AcpiRemoveGpeHandler (
902     ACPI_HANDLE             GpeDevice,
903     UINT32                  GpeNumber,
904     ACPI_GPE_HANDLER        Address))
905 
906 ACPI_EXTERNAL_RETURN_STATUS (
907 ACPI_STATUS
908 AcpiInstallNotifyHandler (
909     ACPI_HANDLE             Device,
910     UINT32                  HandlerType,
911     ACPI_NOTIFY_HANDLER     Handler,
912     void                    *Context))
913 
914 ACPI_EXTERNAL_RETURN_STATUS (
915 ACPI_STATUS
916 AcpiRemoveNotifyHandler (
917     ACPI_HANDLE             Device,
918     UINT32                  HandlerType,
919     ACPI_NOTIFY_HANDLER     Handler))
920 
921 ACPI_EXTERNAL_RETURN_STATUS (
922 ACPI_STATUS
923 AcpiInstallAddressSpaceHandler (
924     ACPI_HANDLE             Device,
925     ACPI_ADR_SPACE_TYPE     SpaceId,
926     ACPI_ADR_SPACE_HANDLER  Handler,
927     ACPI_ADR_SPACE_SETUP    Setup,
928     void                    *Context))
929 
930 ACPI_EXTERNAL_RETURN_STATUS (
931 ACPI_STATUS
932 AcpiRemoveAddressSpaceHandler (
933     ACPI_HANDLE             Device,
934     ACPI_ADR_SPACE_TYPE     SpaceId,
935     ACPI_ADR_SPACE_HANDLER  Handler))
936 
937 ACPI_EXTERNAL_RETURN_STATUS (
938 ACPI_STATUS
939 AcpiInstallExceptionHandler (
940     ACPI_EXCEPTION_HANDLER  Handler))
941 
942 ACPI_EXTERNAL_RETURN_STATUS (
943 ACPI_STATUS
944 AcpiInstallInterfaceHandler (
945     ACPI_INTERFACE_HANDLER  Handler))
946 
947 
948 /*
949  * Global Lock interfaces
950  */
951 ACPI_HW_DEPENDENT_RETURN_STATUS (
952 ACPI_STATUS
953 AcpiAcquireGlobalLock (
954     UINT16                  Timeout,
955     UINT32                  *Handle))
956 
957 ACPI_HW_DEPENDENT_RETURN_STATUS (
958 ACPI_STATUS
959 AcpiReleaseGlobalLock (
960     UINT32                  Handle))
961 
962 
963 /*
964  * Interfaces to AML mutex objects
965  */
966 ACPI_EXTERNAL_RETURN_STATUS (
967 ACPI_STATUS
968 AcpiAcquireMutex (
969     ACPI_HANDLE             Handle,
970     ACPI_STRING             Pathname,
971     UINT16                  Timeout))
972 
973 ACPI_EXTERNAL_RETURN_STATUS (
974 ACPI_STATUS
975 AcpiReleaseMutex (
976     ACPI_HANDLE             Handle,
977     ACPI_STRING             Pathname))
978 
979 
980 /*
981  * Fixed Event interfaces
982  */
983 ACPI_HW_DEPENDENT_RETURN_STATUS (
984 ACPI_STATUS
985 AcpiEnableEvent (
986     UINT32                  Event,
987     UINT32                  Flags))
988 
989 ACPI_HW_DEPENDENT_RETURN_STATUS (
990 ACPI_STATUS
991 AcpiDisableEvent (
992     UINT32                  Event,
993     UINT32                  Flags))
994 
995 ACPI_HW_DEPENDENT_RETURN_STATUS (
996 ACPI_STATUS
997 AcpiClearEvent (
998     UINT32                  Event))
999 
1000 ACPI_HW_DEPENDENT_RETURN_STATUS (
1001 ACPI_STATUS
1002 AcpiGetEventStatus (
1003     UINT32                  Event,
1004     ACPI_EVENT_STATUS       *EventStatus))
1005 
1006 
1007 /*
1008  * General Purpose Event (GPE) Interfaces
1009  */
1010 ACPI_HW_DEPENDENT_RETURN_STATUS (
1011 ACPI_STATUS
1012 AcpiUpdateAllGpes (
1013     void))
1014 
1015 ACPI_HW_DEPENDENT_RETURN_STATUS (
1016 ACPI_STATUS
1017 AcpiEnableGpe (
1018     ACPI_HANDLE             GpeDevice,
1019     UINT32                  GpeNumber))
1020 
1021 ACPI_HW_DEPENDENT_RETURN_STATUS (
1022 ACPI_STATUS
1023 AcpiDisableGpe (
1024     ACPI_HANDLE             GpeDevice,
1025     UINT32                  GpeNumber))
1026 
1027 ACPI_HW_DEPENDENT_RETURN_STATUS (
1028 ACPI_STATUS
1029 AcpiClearGpe (
1030     ACPI_HANDLE             GpeDevice,
1031     UINT32                  GpeNumber))
1032 
1033 ACPI_HW_DEPENDENT_RETURN_STATUS (
1034 ACPI_STATUS
1035 AcpiSetGpe (
1036     ACPI_HANDLE             GpeDevice,
1037     UINT32                  GpeNumber,
1038     UINT8                   Action))
1039 
1040 ACPI_HW_DEPENDENT_RETURN_STATUS (
1041 ACPI_STATUS
1042 AcpiFinishGpe (
1043     ACPI_HANDLE             GpeDevice,
1044     UINT32                  GpeNumber))
1045 
1046 ACPI_HW_DEPENDENT_RETURN_STATUS (
1047 ACPI_STATUS
1048 AcpiMaskGpe (
1049     ACPI_HANDLE             GpeDevice,
1050     UINT32                  GpeNumber,
1051     BOOLEAN                 IsMasked))
1052 
1053 ACPI_HW_DEPENDENT_RETURN_STATUS (
1054 ACPI_STATUS
1055 AcpiMarkGpeForWake (
1056     ACPI_HANDLE             GpeDevice,
1057     UINT32                  GpeNumber))
1058 
1059 ACPI_HW_DEPENDENT_RETURN_STATUS (
1060 ACPI_STATUS
1061 AcpiSetupGpeForWake (
1062     ACPI_HANDLE             ParentDevice,
1063     ACPI_HANDLE             GpeDevice,
1064     UINT32                  GpeNumber))
1065 
1066 ACPI_HW_DEPENDENT_RETURN_STATUS (
1067 ACPI_STATUS
1068 AcpiSetGpeWakeMask (
1069     ACPI_HANDLE             GpeDevice,
1070     UINT32                  GpeNumber,
1071     UINT8                   Action))
1072 
1073 ACPI_HW_DEPENDENT_RETURN_STATUS (
1074 ACPI_STATUS
1075 AcpiGetGpeStatus (
1076     ACPI_HANDLE             GpeDevice,
1077     UINT32                  GpeNumber,
1078     ACPI_EVENT_STATUS       *EventStatus))
1079 
1080 ACPI_HW_DEPENDENT_RETURN_STATUS (
1081 ACPI_STATUS
1082 AcpiDisableAllGpes (
1083     void))
1084 
1085 ACPI_HW_DEPENDENT_RETURN_STATUS (
1086 ACPI_STATUS
1087 AcpiEnableAllRuntimeGpes (
1088     void))
1089 
1090 ACPI_HW_DEPENDENT_RETURN_STATUS (
1091 ACPI_STATUS
1092 AcpiEnableAllWakeupGpes (
1093     void))
1094 
1095 ACPI_HW_DEPENDENT_RETURN_STATUS (
1096 ACPI_STATUS
1097 AcpiGetGpeDevice (
1098     UINT32                  GpeIndex,
1099     ACPI_HANDLE             *GpeDevice))
1100 
1101 ACPI_HW_DEPENDENT_RETURN_STATUS (
1102 ACPI_STATUS
1103 AcpiInstallGpeBlock (
1104     ACPI_HANDLE             GpeDevice,
1105     ACPI_GENERIC_ADDRESS    *GpeBlockAddress,
1106     UINT32                  RegisterCount,
1107     UINT32                  InterruptNumber))
1108 
1109 ACPI_HW_DEPENDENT_RETURN_STATUS (
1110 ACPI_STATUS
1111 AcpiRemoveGpeBlock (
1112     ACPI_HANDLE             GpeDevice))
1113 
1114 
1115 /*
1116  * Resource interfaces
1117  */
1118 typedef
1119 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
1120     ACPI_RESOURCE           *Resource,
1121     void                    *Context);
1122 
1123 ACPI_EXTERNAL_RETURN_STATUS (
1124 ACPI_STATUS
1125 AcpiGetVendorResource (
1126     ACPI_HANDLE             Device,
1127     char                    *Name,
1128     ACPI_VENDOR_UUID        *Uuid,
1129     ACPI_BUFFER             *RetBuffer))
1130 
1131 ACPI_EXTERNAL_RETURN_STATUS (
1132 ACPI_STATUS
1133 AcpiGetCurrentResources (
1134     ACPI_HANDLE             Device,
1135     ACPI_BUFFER             *RetBuffer))
1136 
1137 ACPI_EXTERNAL_RETURN_STATUS (
1138 ACPI_STATUS
1139 AcpiGetPossibleResources (
1140     ACPI_HANDLE             Device,
1141     ACPI_BUFFER             *RetBuffer))
1142 
1143 ACPI_EXTERNAL_RETURN_STATUS (
1144 ACPI_STATUS
1145 AcpiGetEventResources (
1146     ACPI_HANDLE             DeviceHandle,
1147     ACPI_BUFFER             *RetBuffer))
1148 
1149 ACPI_EXTERNAL_RETURN_STATUS (
1150 ACPI_STATUS
1151 AcpiWalkResourceBuffer (
1152     ACPI_BUFFER                 *Buffer,
1153     ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1154     void                        *Context))
1155 
1156 ACPI_EXTERNAL_RETURN_STATUS (
1157 ACPI_STATUS
1158 AcpiWalkResources (
1159     ACPI_HANDLE                 Device,
1160     char                        *Name,
1161     ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1162     void                        *Context))
1163 
1164 ACPI_EXTERNAL_RETURN_STATUS (
1165 ACPI_STATUS
1166 AcpiSetCurrentResources (
1167     ACPI_HANDLE             Device,
1168     ACPI_BUFFER             *InBuffer))
1169 
1170 ACPI_EXTERNAL_RETURN_STATUS (
1171 ACPI_STATUS
1172 AcpiGetIrqRoutingTable (
1173     ACPI_HANDLE             Device,
1174     ACPI_BUFFER             *RetBuffer))
1175 
1176 ACPI_EXTERNAL_RETURN_STATUS (
1177 ACPI_STATUS
1178 AcpiResourceToAddress64 (
1179     ACPI_RESOURCE           *Resource,
1180     ACPI_RESOURCE_ADDRESS64 *Out))
1181 
1182 ACPI_EXTERNAL_RETURN_STATUS (
1183 ACPI_STATUS
1184 AcpiBufferToResource (
1185     UINT8                   *AmlBuffer,
1186     UINT16                  AmlBufferLength,
1187     ACPI_RESOURCE           **ResourcePtr))
1188 
1189 
1190 /*
1191  * Hardware (ACPI device) interfaces
1192  */
1193 ACPI_EXTERNAL_RETURN_STATUS (
1194 ACPI_STATUS
1195 AcpiReset (
1196     void))
1197 
1198 ACPI_EXTERNAL_RETURN_STATUS (
1199 ACPI_STATUS
1200 AcpiRead (
1201     UINT64                  *Value,
1202     ACPI_GENERIC_ADDRESS    *Reg))
1203 
1204 ACPI_EXTERNAL_RETURN_STATUS (
1205 ACPI_STATUS
1206 AcpiWrite (
1207     UINT64                  Value,
1208     ACPI_GENERIC_ADDRESS    *Reg))
1209 
1210 ACPI_HW_DEPENDENT_RETURN_STATUS (
1211 ACPI_STATUS
1212 AcpiReadBitRegister (
1213     UINT32                  RegisterId,
1214     UINT32                  *ReturnValue))
1215 
1216 ACPI_HW_DEPENDENT_RETURN_STATUS (
1217 ACPI_STATUS
1218 AcpiWriteBitRegister (
1219     UINT32                  RegisterId,
1220     UINT32                  Value))
1221 
1222 
1223 /*
1224  * Sleep/Wake interfaces
1225  */
1226 ACPI_EXTERNAL_RETURN_STATUS (
1227 ACPI_STATUS
1228 AcpiGetSleepTypeData (
1229     UINT8                   SleepState,
1230     UINT8                   *Slp_TypA,
1231     UINT8                   *Slp_TypB))
1232 
1233 ACPI_EXTERNAL_RETURN_STATUS (
1234 ACPI_STATUS
1235 AcpiEnterSleepStatePrep (
1236     UINT8                   SleepState))
1237 
1238 ACPI_EXTERNAL_RETURN_STATUS (
1239 ACPI_STATUS
1240 AcpiEnterSleepState (
1241     UINT8                   SleepState))
1242 
1243 ACPI_HW_DEPENDENT_RETURN_STATUS (
1244 ACPI_STATUS
1245 AcpiEnterSleepStateS4bios (
1246     void))
1247 
1248 ACPI_EXTERNAL_RETURN_STATUS (
1249 ACPI_STATUS
1250 AcpiLeaveSleepStatePrep (
1251     UINT8                   SleepState))
1252 
1253 ACPI_EXTERNAL_RETURN_STATUS (
1254 ACPI_STATUS
1255 AcpiLeaveSleepState (
1256     UINT8                   SleepState))
1257 
1258 ACPI_HW_DEPENDENT_RETURN_STATUS (
1259 ACPI_STATUS
1260 AcpiSetFirmwareWakingVector (
1261     ACPI_PHYSICAL_ADDRESS   PhysicalAddress,
1262     ACPI_PHYSICAL_ADDRESS   PhysicalAddress64))
1263 
1264 
1265 /*
1266  * ACPI Timer interfaces
1267  */
1268 ACPI_HW_DEPENDENT_RETURN_STATUS (
1269 ACPI_STATUS
1270 AcpiGetTimerResolution (
1271     UINT32                  *Resolution))
1272 
1273 ACPI_HW_DEPENDENT_RETURN_STATUS (
1274 ACPI_STATUS
1275 AcpiGetTimer (
1276     UINT32                  *Ticks))
1277 
1278 ACPI_HW_DEPENDENT_RETURN_STATUS (
1279 ACPI_STATUS
1280 AcpiGetTimerDuration (
1281     UINT32                  StartTicks,
1282     UINT32                  EndTicks,
1283     UINT32                  *TimeElapsed))
1284 
1285 
1286 /*
1287  * Error/Warning output
1288  */
1289 ACPI_MSG_DEPENDENT_RETURN_VOID (
1290 ACPI_PRINTF_LIKE(3)
1291 void ACPI_INTERNAL_VAR_XFACE
1292 AcpiError (
1293     const char              *ModuleName,
1294     UINT32                  LineNumber,
1295     const char              *Format,
1296     ...))
1297 
1298 ACPI_MSG_DEPENDENT_RETURN_VOID (
1299 ACPI_PRINTF_LIKE(4)
1300 void  ACPI_INTERNAL_VAR_XFACE
1301 AcpiException (
1302     const char              *ModuleName,
1303     UINT32                  LineNumber,
1304     ACPI_STATUS             Status,
1305     const char              *Format,
1306     ...))
1307 
1308 ACPI_MSG_DEPENDENT_RETURN_VOID (
1309 ACPI_PRINTF_LIKE(3)
1310 void ACPI_INTERNAL_VAR_XFACE
1311 AcpiWarning (
1312     const char              *ModuleName,
1313     UINT32                  LineNumber,
1314     const char              *Format,
1315     ...))
1316 
1317 ACPI_MSG_DEPENDENT_RETURN_VOID (
1318 ACPI_PRINTF_LIKE(1)
1319 void ACPI_INTERNAL_VAR_XFACE
1320 AcpiInfo (
1321     const char              *Format,
1322     ...))
1323 
1324 ACPI_MSG_DEPENDENT_RETURN_VOID (
1325 ACPI_PRINTF_LIKE(3)
1326 void ACPI_INTERNAL_VAR_XFACE
1327 AcpiBiosError (
1328     const char              *ModuleName,
1329     UINT32                  LineNumber,
1330     const char              *Format,
1331     ...))
1332 
1333 ACPI_MSG_DEPENDENT_RETURN_VOID (
1334 ACPI_PRINTF_LIKE(3)
1335 void ACPI_INTERNAL_VAR_XFACE
1336 AcpiBiosWarning (
1337     const char              *ModuleName,
1338     UINT32                  LineNumber,
1339     const char              *Format,
1340     ...))
1341 
1342 
1343 /*
1344  * Debug output
1345  */
1346 ACPI_DBG_DEPENDENT_RETURN_VOID (
1347 ACPI_PRINTF_LIKE(6)
1348 void ACPI_INTERNAL_VAR_XFACE
1349 AcpiDebugPrint (
1350     UINT32                  RequestedDebugLevel,
1351     UINT32                  LineNumber,
1352     const char              *FunctionName,
1353     const char              *ModuleName,
1354     UINT32                  ComponentId,
1355     const char              *Format,
1356     ...))
1357 
1358 ACPI_DBG_DEPENDENT_RETURN_VOID (
1359 ACPI_PRINTF_LIKE(6)
1360 void ACPI_INTERNAL_VAR_XFACE
1361 AcpiDebugPrintRaw (
1362     UINT32                  RequestedDebugLevel,
1363     UINT32                  LineNumber,
1364     const char              *FunctionName,
1365     const char              *ModuleName,
1366     UINT32                  ComponentId,
1367     const char              *Format,
1368     ...))
1369 
1370 ACPI_DBG_DEPENDENT_RETURN_VOID (
1371 void
1372 AcpiTracePoint (
1373     ACPI_TRACE_EVENT_TYPE   Type,
1374     BOOLEAN                 Begin,
1375     UINT8                   *Aml,
1376     char                    *Pathname))
1377 
1378 ACPI_STATUS
1379 AcpiInitializeDebugger (
1380     void);
1381 
1382 void
1383 AcpiTerminateDebugger (
1384     void);
1385 
1386 void
1387 AcpiRunDebugger (
1388     char                    *BatchBuffer);
1389 
1390 void
1391 AcpiSetDebuggerThreadId (
1392     ACPI_THREAD_ID          ThreadId);
1393 
1394 #endif /* __ACXFACE_H__ */
1395