1 /******************************************************************************
3 * Name: acpixf.h - External interfaces to the ACPI subsystem
5 *****************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2020, Intel Corp.
12 * All rights reserved.
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
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
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;
37 * The above copyright and patent license is granted only if the following
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.
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
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
72 * 3.4. Intel retains all right, title, and interest in and to the Original
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.
80 * 4. Disclaimer and Export Compliance
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
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
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.
114 *****************************************************************************
116 * Alternatively, you may choose to be licensed under the terms of the
119 * Redistribution and use in source and binary forms, with or without
120 * modification, are permitted provided that the following conditions
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.
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.
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.
150 *****************************************************************************/
152 #ifndef __ACXFACE_H__
153 #define __ACXFACE_H__
155 /* Current ACPICA subsystem version in YYYYMMDD format */
157 #define ACPI_CA_VERSION 0x20200214
159 #include <contrib/dev/acpica/include/acconfig.h>
160 #include <contrib/dev/acpica/include/actypes.h>
161 #include <contrib/dev/acpica/include/actbl.h>
162 #include <contrib/dev/acpica/include/acbuffer.h>
165 /*****************************************************************************
167 * Macros used for ACPICA globals and configuration
169 ****************************************************************************/
172 * Ensure that global variables are defined and initialized only once.
174 * The use of these macros allows for a single list of globals (here)
175 * in order to simplify maintenance of the code.
177 #ifdef DEFINE_ACPI_GLOBALS
178 #define ACPI_GLOBAL(type,name) \
182 #define ACPI_INIT_GLOBAL(type,name,value) \
187 #define ACPI_GLOBAL(type,name) \
191 #ifndef ACPI_INIT_GLOBAL
192 #define ACPI_INIT_GLOBAL(type,name,value) \
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.
202 #ifndef ACPI_EXTERNAL_RETURN_STATUS
203 #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \
207 #ifndef ACPI_EXTERNAL_RETURN_OK
208 #define ACPI_EXTERNAL_RETURN_OK(Prototype) \
212 #ifndef ACPI_EXTERNAL_RETURN_VOID
213 #define ACPI_EXTERNAL_RETURN_VOID(Prototype) \
217 #ifndef ACPI_EXTERNAL_RETURN_UINT32
218 #define ACPI_EXTERNAL_RETURN_UINT32(Prototype) \
222 #ifndef ACPI_EXTERNAL_RETURN_PTR
223 #define ACPI_EXTERNAL_RETURN_PTR(Prototype) \
228 /*****************************************************************************
230 * Public globals and runtime configuration options
232 ****************************************************************************/
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.
239 * Currently, these features are enabled by this flag:
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
248 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableInterpreterSlack, FALSE);
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.
257 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_AutoSerializeMethods, TRUE);
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.
264 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE);
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.
270 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE);
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
280 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableTableValidation, TRUE);
283 * Optionally enable output from the AML Debug Object.
285 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableAmlDebugObject, FALSE);
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
293 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE);
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.
301 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE);
304 * Optionally use 32-bit FADT addresses if and when there is a conflict
305 * (address mismatch) between the 32-bit and 64-bit versions of the
306 * address. Although ACPICA adheres to the ACPI specification which
307 * requires the use of the corresponding 64-bit address if it is non-zero,
308 * some machines have been found to have a corrupted non-zero 64-bit
309 * address. Default is FALSE, do not favor the 32-bit addresses.
311 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE);
314 * Optionally use 32-bit FACS table addresses.
315 * It is reported that some platforms fail to resume from system suspending
316 * if 64-bit FACS table address is selected:
317 * https://bugzilla.kernel.org/show_bug.cgi?id=74021
318 * Default is TRUE, favor the 32-bit addresses.
320 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFacsAddresses, TRUE);
323 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
324 * with other ACPI implementations. NOTE: During ACPICA initialization,
325 * this value is set to TRUE if any Windows OSI strings have been
326 * requested by the BIOS.
328 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE);
331 * Disable runtime checking and repair of values returned by control methods.
332 * Use only if the repair is causing a problem on a particular machine.
334 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE);
337 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
338 * This can be useful for debugging ACPI problems on some machines.
340 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE);
343 * Optionally enable runtime namespace override.
345 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_RuntimeNamespaceOverride, TRUE);
348 * We keep track of the latest version of Windows that has been requested by
349 * the BIOS. ACPI 5.0.
351 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0);
354 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
355 * that the ACPI hardware is no longer required. A flag in the FADT indicates
356 * a reduced HW machine, and that flag is duplicated here for convenience.
358 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE);
361 * Maximum timeout for While() loop iterations before forced method abort.
362 * This mechanism is intended to prevent infinite loops during interpreter
363 * execution within a host kernel.
365 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_MaxLoopIterations, ACPI_MAX_LOOP_TIMEOUT);
368 * Optionally ignore AE_NOT_FOUND errors from named reference package elements
369 * during DSDT/SSDT table loading. This reduces error "noise" in platforms
370 * whose firmware is carrying around a bunch of unused package objects that
371 * refer to non-existent named objects. However, If the AML actually tries to
372 * use such a package, the unresolved element(s) will be replaced with NULL
375 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_IgnorePackageResolutionErrors, FALSE);
378 * This mechanism is used to trace a specified AML method. The method is
379 * traced each time it is executed.
381 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceFlags, 0);
382 ACPI_INIT_GLOBAL (const char *, AcpiGbl_TraceMethodName, NULL);
383 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLevel, ACPI_TRACE_LEVEL_DEFAULT);
384 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLayer, ACPI_TRACE_LAYER_DEFAULT);
387 * Runtime configuration of debug output control masks. We want the debug
388 * switches statically initialized so they are already set when the debugger
391 #ifdef ACPI_DEBUG_OUTPUT
392 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_DEBUG_DEFAULT);
394 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_NORMAL_DEFAULT);
396 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT);
398 /* Optionally enable timer output with Debug Object output */
400 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisplayDebugTimer, FALSE);
403 * Debugger command handshake globals. Host OSes need to access these
404 * variables to implement their own command handshake mechanism.
407 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE);
408 ACPI_GLOBAL (char, AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE]);
412 * Other miscellaneous globals
414 ACPI_GLOBAL (ACPI_TABLE_FADT, AcpiGbl_FADT);
415 ACPI_GLOBAL (UINT32, AcpiCurrentGpeCount);
416 ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning);
419 /*****************************************************************************
421 * ACPICA public interface configuration.
423 * Interfaces that are configured out of the ACPICA build are replaced
424 * by inlined stubs by default.
426 ****************************************************************************/
429 * Hardware-reduced prototypes (default: Not hardware reduced).
431 * All ACPICA hardware-related interfaces that use these macros will be
432 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
435 * Note: This static build option for reduced hardware is intended to
436 * reduce ACPICA code size if desired or necessary. However, even if this
437 * option is not specified, the runtime behavior of ACPICA is dependent
438 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
439 * the flag will enable similar behavior -- ACPICA will not attempt
440 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
442 #if (!ACPI_REDUCED_HARDWARE)
443 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
444 ACPI_EXTERNAL_RETURN_STATUS(Prototype)
446 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
447 ACPI_EXTERNAL_RETURN_OK(Prototype)
449 #define ACPI_HW_DEPENDENT_RETURN_UINT32(prototype) \
450 ACPI_EXTERNAL_RETURN_UINT32(prototype)
452 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
453 ACPI_EXTERNAL_RETURN_VOID(Prototype)
456 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
457 static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
459 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
460 static ACPI_INLINE Prototype {return(AE_OK);}
462 #define ACPI_HW_DEPENDENT_RETURN_UINT32(prototype) \
463 static ACPI_INLINE prototype {return(0);}
465 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
466 static ACPI_INLINE Prototype {return;}
468 #endif /* !ACPI_REDUCED_HARDWARE */
472 * Error message prototypes (default: error messages enabled).
474 * All interfaces related to error and warning messages
475 * will be configured out of the ACPICA build if the
476 * ACPI_NO_ERROR_MESSAGE flag is defined.
478 #ifndef ACPI_NO_ERROR_MESSAGES
479 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
483 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
484 static ACPI_INLINE Prototype {return;}
486 #endif /* ACPI_NO_ERROR_MESSAGES */
490 * Debugging output prototypes (default: no debug output).
492 * All interfaces related to debug output messages
493 * will be configured out of the ACPICA build unless the
494 * ACPI_DEBUG_OUTPUT flag is defined.
496 #ifdef ACPI_DEBUG_OUTPUT
497 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
501 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
502 static ACPI_INLINE Prototype {return;}
504 #endif /* ACPI_DEBUG_OUTPUT */
508 * Application prototypes
510 * All interfaces used by application will be configured
511 * out of the ACPICA build unless the ACPI_APPLICATION
514 #ifdef ACPI_APPLICATION
515 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
519 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
520 static ACPI_INLINE Prototype {return;}
522 #endif /* ACPI_APPLICATION */
526 * Debugger prototypes
528 * All interfaces used by debugger will be configured
529 * out of the ACPICA build unless the ACPI_DEBUGGER
533 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
534 ACPI_EXTERNAL_RETURN_OK(Prototype)
536 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
537 ACPI_EXTERNAL_RETURN_VOID(Prototype)
540 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
541 static ACPI_INLINE Prototype {return(AE_OK);}
543 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
544 static ACPI_INLINE Prototype {return;}
546 #endif /* ACPI_DEBUGGER */
549 /*****************************************************************************
551 * ACPICA public interface prototypes
553 ****************************************************************************/
558 ACPI_EXTERNAL_RETURN_STATUS (
559 ACPI_STATUS ACPI_INIT_FUNCTION
560 AcpiInitializeTables (
561 ACPI_TABLE_DESC *InitialStorage,
562 UINT32 InitialTableCount,
563 BOOLEAN AllowResize))
565 ACPI_EXTERNAL_RETURN_STATUS (
566 ACPI_STATUS ACPI_INIT_FUNCTION
567 AcpiInitializeSubsystem (
570 ACPI_EXTERNAL_RETURN_STATUS (
571 ACPI_STATUS ACPI_INIT_FUNCTION
572 AcpiEnableSubsystem (
575 ACPI_EXTERNAL_RETURN_STATUS (
576 ACPI_STATUS ACPI_INIT_FUNCTION
577 AcpiInitializeObjects (
580 ACPI_EXTERNAL_RETURN_STATUS (
581 ACPI_STATUS ACPI_INIT_FUNCTION
587 * Miscellaneous global interfaces
589 ACPI_HW_DEPENDENT_RETURN_STATUS (
594 ACPI_HW_DEPENDENT_RETURN_STATUS (
599 ACPI_EXTERNAL_RETURN_STATUS (
601 AcpiSubsystemStatus (
604 ACPI_EXTERNAL_RETURN_STATUS (
607 ACPI_BUFFER *RetBuffer))
609 ACPI_EXTERNAL_RETURN_STATUS (
612 ACPI_STATISTICS *Stats))
614 ACPI_EXTERNAL_RETURN_PTR (
616 AcpiFormatException (
617 ACPI_STATUS Exception))
619 ACPI_EXTERNAL_RETURN_STATUS (
621 AcpiPurgeCachedObjects (
624 ACPI_EXTERNAL_RETURN_STATUS (
626 AcpiInstallInterface (
627 ACPI_STRING InterfaceName))
629 ACPI_EXTERNAL_RETURN_STATUS (
631 AcpiRemoveInterface (
632 ACPI_STRING InterfaceName))
634 ACPI_EXTERNAL_RETURN_STATUS (
636 AcpiUpdateInterfaces (
639 ACPI_EXTERNAL_RETURN_UINT32 (
641 AcpiCheckAddressRange (
642 ACPI_ADR_SPACE_TYPE SpaceId,
643 ACPI_PHYSICAL_ADDRESS Address,
647 ACPI_EXTERNAL_RETURN_STATUS (
649 AcpiDecodePldBuffer (
652 ACPI_PLD_INFO **ReturnBuffer))
656 * ACPI table load/unload interfaces
658 ACPI_EXTERNAL_RETURN_STATUS (
659 ACPI_STATUS ACPI_INIT_FUNCTION
661 ACPI_PHYSICAL_ADDRESS Address,
664 ACPI_EXTERNAL_RETURN_STATUS (
667 ACPI_TABLE_HEADER *Table,
670 ACPI_EXTERNAL_RETURN_STATUS (
675 ACPI_EXTERNAL_RETURN_STATUS (
677 AcpiUnloadParentTable (
680 ACPI_EXTERNAL_RETURN_STATUS (
681 ACPI_STATUS ACPI_INIT_FUNCTION
687 * ACPI table manipulation interfaces
689 ACPI_EXTERNAL_RETURN_STATUS (
690 ACPI_STATUS ACPI_INIT_FUNCTION
691 AcpiReallocateRootTable (
694 ACPI_EXTERNAL_RETURN_STATUS (
695 ACPI_STATUS ACPI_INIT_FUNCTION
696 AcpiFindRootPointer (
697 ACPI_PHYSICAL_ADDRESS *RsdpAddress))
699 ACPI_EXTERNAL_RETURN_STATUS (
702 ACPI_STRING Signature,
704 ACPI_TABLE_HEADER *OutTableHeader))
706 ACPI_EXTERNAL_RETURN_STATUS (
709 ACPI_STRING Signature,
711 ACPI_TABLE_HEADER **OutTable))
713 ACPI_EXTERNAL_RETURN_VOID (
716 ACPI_TABLE_HEADER *Table))
718 ACPI_EXTERNAL_RETURN_STATUS (
720 AcpiGetTableByIndex (
722 ACPI_TABLE_HEADER **OutTable))
724 ACPI_EXTERNAL_RETURN_STATUS (
726 AcpiInstallTableHandler (
727 ACPI_TABLE_HANDLER Handler,
730 ACPI_EXTERNAL_RETURN_STATUS (
732 AcpiRemoveTableHandler (
733 ACPI_TABLE_HANDLER Handler))
737 * Namespace and name interfaces
739 ACPI_EXTERNAL_RETURN_STATUS (
742 ACPI_OBJECT_TYPE Type,
743 ACPI_HANDLE StartObject,
745 ACPI_WALK_CALLBACK DescendingCallback,
746 ACPI_WALK_CALLBACK AscendingCallback,
750 ACPI_EXTERNAL_RETURN_STATUS (
754 ACPI_WALK_CALLBACK UserFunction,
758 ACPI_EXTERNAL_RETURN_STATUS (
763 ACPI_BUFFER *RetPathPtr))
765 ACPI_EXTERNAL_RETURN_STATUS (
769 ACPI_STRING Pathname,
770 ACPI_HANDLE *RetHandle))
772 ACPI_EXTERNAL_RETURN_STATUS (
776 ACPI_OBJECT_HANDLER Handler,
779 ACPI_EXTERNAL_RETURN_STATUS (
783 ACPI_OBJECT_HANDLER Handler))
785 ACPI_EXTERNAL_RETURN_STATUS (
789 ACPI_OBJECT_HANDLER Handler,
792 ACPI_EXTERNAL_RETURN_STATUS (
802 * Object manipulation and enumeration
804 ACPI_EXTERNAL_RETURN_STATUS (
808 ACPI_STRING Pathname,
809 ACPI_OBJECT_LIST *ParameterObjects,
810 ACPI_BUFFER *ReturnObjectBuffer))
812 ACPI_EXTERNAL_RETURN_STATUS (
814 AcpiEvaluateObjectTyped (
816 ACPI_STRING Pathname,
817 ACPI_OBJECT_LIST *ExternalParams,
818 ACPI_BUFFER *ReturnBuffer,
819 ACPI_OBJECT_TYPE ReturnType))
821 ACPI_EXTERNAL_RETURN_STATUS (
825 ACPI_DEVICE_INFO **ReturnBuffer))
827 ACPI_EXTERNAL_RETURN_STATUS (
832 ACPI_EXTERNAL_RETURN_STATUS (
835 ACPI_OBJECT_TYPE Type,
838 ACPI_HANDLE *OutHandle))
840 ACPI_EXTERNAL_RETURN_STATUS (
844 ACPI_OBJECT_TYPE *OutType))
846 ACPI_EXTERNAL_RETURN_STATUS (
850 ACPI_HANDLE *OutHandle))
856 ACPI_EXTERNAL_RETURN_STATUS (
858 AcpiInstallInitializationHandler (
859 ACPI_INIT_HANDLER Handler,
862 ACPI_HW_DEPENDENT_RETURN_STATUS (
864 AcpiInstallSciHandler (
865 ACPI_SCI_HANDLER Address,
868 ACPI_HW_DEPENDENT_RETURN_STATUS (
870 AcpiRemoveSciHandler (
871 ACPI_SCI_HANDLER Address))
873 ACPI_HW_DEPENDENT_RETURN_STATUS (
875 AcpiInstallGlobalEventHandler (
876 ACPI_GBL_EVENT_HANDLER Handler,
879 ACPI_HW_DEPENDENT_RETURN_STATUS (
881 AcpiInstallFixedEventHandler (
883 ACPI_EVENT_HANDLER Handler,
886 ACPI_HW_DEPENDENT_RETURN_STATUS (
888 AcpiRemoveFixedEventHandler (
890 ACPI_EVENT_HANDLER Handler))
892 ACPI_HW_DEPENDENT_RETURN_STATUS (
894 AcpiInstallGpeHandler (
895 ACPI_HANDLE GpeDevice,
898 ACPI_GPE_HANDLER Address,
901 ACPI_HW_DEPENDENT_RETURN_STATUS (
903 AcpiInstallGpeRawHandler (
904 ACPI_HANDLE GpeDevice,
907 ACPI_GPE_HANDLER Address,
910 ACPI_HW_DEPENDENT_RETURN_STATUS (
912 AcpiRemoveGpeHandler (
913 ACPI_HANDLE GpeDevice,
915 ACPI_GPE_HANDLER Address))
917 ACPI_EXTERNAL_RETURN_STATUS (
919 AcpiInstallNotifyHandler (
922 ACPI_NOTIFY_HANDLER Handler,
925 ACPI_EXTERNAL_RETURN_STATUS (
927 AcpiRemoveNotifyHandler (
930 ACPI_NOTIFY_HANDLER Handler))
932 ACPI_EXTERNAL_RETURN_STATUS (
934 AcpiInstallAddressSpaceHandler (
936 ACPI_ADR_SPACE_TYPE SpaceId,
937 ACPI_ADR_SPACE_HANDLER Handler,
938 ACPI_ADR_SPACE_SETUP Setup,
941 ACPI_EXTERNAL_RETURN_STATUS (
943 AcpiRemoveAddressSpaceHandler (
945 ACPI_ADR_SPACE_TYPE SpaceId,
946 ACPI_ADR_SPACE_HANDLER Handler))
948 ACPI_EXTERNAL_RETURN_STATUS (
950 AcpiInstallExceptionHandler (
951 ACPI_EXCEPTION_HANDLER Handler))
953 ACPI_EXTERNAL_RETURN_STATUS (
955 AcpiInstallInterfaceHandler (
956 ACPI_INTERFACE_HANDLER Handler))
960 * Global Lock interfaces
962 ACPI_HW_DEPENDENT_RETURN_STATUS (
964 AcpiAcquireGlobalLock (
968 ACPI_HW_DEPENDENT_RETURN_STATUS (
970 AcpiReleaseGlobalLock (
975 * Interfaces to AML mutex objects
977 ACPI_EXTERNAL_RETURN_STATUS (
981 ACPI_STRING Pathname,
984 ACPI_EXTERNAL_RETURN_STATUS (
988 ACPI_STRING Pathname))
992 * Fixed Event interfaces
994 ACPI_HW_DEPENDENT_RETURN_STATUS (
1000 ACPI_HW_DEPENDENT_RETURN_STATUS (
1006 ACPI_HW_DEPENDENT_RETURN_STATUS (
1011 ACPI_HW_DEPENDENT_RETURN_STATUS (
1013 AcpiGetEventStatus (
1015 ACPI_EVENT_STATUS *EventStatus))
1019 * General Purpose Event (GPE) Interfaces
1021 ACPI_HW_DEPENDENT_RETURN_STATUS (
1026 ACPI_HW_DEPENDENT_RETURN_STATUS (
1029 ACPI_HANDLE GpeDevice,
1032 ACPI_HW_DEPENDENT_RETURN_STATUS (
1035 ACPI_HANDLE GpeDevice,
1038 ACPI_HW_DEPENDENT_RETURN_STATUS (
1041 ACPI_HANDLE GpeDevice,
1044 ACPI_HW_DEPENDENT_RETURN_STATUS (
1047 ACPI_HANDLE GpeDevice,
1051 ACPI_HW_DEPENDENT_RETURN_STATUS (
1054 ACPI_HANDLE GpeDevice,
1057 ACPI_HW_DEPENDENT_RETURN_STATUS (
1060 ACPI_HANDLE GpeDevice,
1064 ACPI_HW_DEPENDENT_RETURN_STATUS (
1066 AcpiMarkGpeForWake (
1067 ACPI_HANDLE GpeDevice,
1070 ACPI_HW_DEPENDENT_RETURN_STATUS (
1072 AcpiSetupGpeForWake (
1073 ACPI_HANDLE ParentDevice,
1074 ACPI_HANDLE GpeDevice,
1077 ACPI_HW_DEPENDENT_RETURN_STATUS (
1079 AcpiSetGpeWakeMask (
1080 ACPI_HANDLE GpeDevice,
1084 ACPI_HW_DEPENDENT_RETURN_STATUS (
1087 ACPI_HANDLE GpeDevice,
1089 ACPI_EVENT_STATUS *EventStatus))
1091 ACPI_HW_DEPENDENT_RETURN_UINT32 (
1094 ACPI_HANDLE GpeDevice,
1097 ACPI_HW_DEPENDENT_RETURN_STATUS (
1099 AcpiDisableAllGpes (
1102 ACPI_HW_DEPENDENT_RETURN_STATUS (
1104 AcpiEnableAllRuntimeGpes (
1107 ACPI_HW_DEPENDENT_RETURN_STATUS (
1109 AcpiEnableAllWakeupGpes (
1112 ACPI_HW_DEPENDENT_RETURN_UINT32 (
1113 UINT32 AcpiAnyGpeStatusSet (
1116 ACPI_HW_DEPENDENT_RETURN_STATUS (
1120 ACPI_HANDLE *GpeDevice))
1122 ACPI_HW_DEPENDENT_RETURN_STATUS (
1124 AcpiInstallGpeBlock (
1125 ACPI_HANDLE GpeDevice,
1126 ACPI_GENERIC_ADDRESS *GpeBlockAddress,
1127 UINT32 RegisterCount,
1128 UINT32 InterruptNumber))
1130 ACPI_HW_DEPENDENT_RETURN_STATUS (
1132 AcpiRemoveGpeBlock (
1133 ACPI_HANDLE GpeDevice))
1137 * Resource interfaces
1140 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
1141 ACPI_RESOURCE *Resource,
1144 ACPI_EXTERNAL_RETURN_STATUS (
1146 AcpiGetVendorResource (
1149 ACPI_VENDOR_UUID *Uuid,
1150 ACPI_BUFFER *RetBuffer))
1152 ACPI_EXTERNAL_RETURN_STATUS (
1154 AcpiGetCurrentResources (
1156 ACPI_BUFFER *RetBuffer))
1158 ACPI_EXTERNAL_RETURN_STATUS (
1160 AcpiGetPossibleResources (
1162 ACPI_BUFFER *RetBuffer))
1164 ACPI_EXTERNAL_RETURN_STATUS (
1166 AcpiGetEventResources (
1167 ACPI_HANDLE DeviceHandle,
1168 ACPI_BUFFER *RetBuffer))
1170 ACPI_EXTERNAL_RETURN_STATUS (
1172 AcpiWalkResourceBuffer (
1173 ACPI_BUFFER *Buffer,
1174 ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1177 ACPI_EXTERNAL_RETURN_STATUS (
1182 ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1185 ACPI_EXTERNAL_RETURN_STATUS (
1187 AcpiSetCurrentResources (
1189 ACPI_BUFFER *InBuffer))
1191 ACPI_EXTERNAL_RETURN_STATUS (
1193 AcpiGetIrqRoutingTable (
1195 ACPI_BUFFER *RetBuffer))
1197 ACPI_EXTERNAL_RETURN_STATUS (
1199 AcpiResourceToAddress64 (
1200 ACPI_RESOURCE *Resource,
1201 ACPI_RESOURCE_ADDRESS64 *Out))
1203 ACPI_EXTERNAL_RETURN_STATUS (
1205 AcpiBufferToResource (
1207 UINT16 AmlBufferLength,
1208 ACPI_RESOURCE **ResourcePtr))
1212 * Hardware (ACPI device) interfaces
1214 ACPI_EXTERNAL_RETURN_STATUS (
1219 ACPI_EXTERNAL_RETURN_STATUS (
1223 ACPI_GENERIC_ADDRESS *Reg))
1225 ACPI_EXTERNAL_RETURN_STATUS (
1229 ACPI_GENERIC_ADDRESS *Reg))
1231 ACPI_HW_DEPENDENT_RETURN_STATUS (
1233 AcpiReadBitRegister (
1235 UINT32 *ReturnValue))
1237 ACPI_HW_DEPENDENT_RETURN_STATUS (
1239 AcpiWriteBitRegister (
1245 * Sleep/Wake interfaces
1247 ACPI_EXTERNAL_RETURN_STATUS (
1249 AcpiGetSleepTypeData (
1254 ACPI_EXTERNAL_RETURN_STATUS (
1256 AcpiEnterSleepStatePrep (
1259 ACPI_EXTERNAL_RETURN_STATUS (
1261 AcpiEnterSleepState (
1264 ACPI_HW_DEPENDENT_RETURN_STATUS (
1266 AcpiEnterSleepStateS4bios (
1269 ACPI_EXTERNAL_RETURN_STATUS (
1271 AcpiLeaveSleepStatePrep (
1274 ACPI_EXTERNAL_RETURN_STATUS (
1276 AcpiLeaveSleepState (
1279 ACPI_HW_DEPENDENT_RETURN_STATUS (
1281 AcpiSetFirmwareWakingVector (
1282 ACPI_PHYSICAL_ADDRESS PhysicalAddress,
1283 ACPI_PHYSICAL_ADDRESS PhysicalAddress64))
1287 * ACPI Timer interfaces
1289 ACPI_HW_DEPENDENT_RETURN_STATUS (
1291 AcpiGetTimerResolution (
1292 UINT32 *Resolution))
1294 ACPI_HW_DEPENDENT_RETURN_STATUS (
1299 ACPI_HW_DEPENDENT_RETURN_STATUS (
1301 AcpiGetTimerDuration (
1304 UINT32 *TimeElapsed))
1308 * Error/Warning output
1310 ACPI_MSG_DEPENDENT_RETURN_VOID (
1312 void ACPI_INTERNAL_VAR_XFACE
1314 const char *ModuleName,
1319 ACPI_MSG_DEPENDENT_RETURN_VOID (
1321 void ACPI_INTERNAL_VAR_XFACE
1323 const char *ModuleName,
1329 ACPI_MSG_DEPENDENT_RETURN_VOID (
1331 void ACPI_INTERNAL_VAR_XFACE
1333 const char *ModuleName,
1338 ACPI_MSG_DEPENDENT_RETURN_VOID (
1340 void ACPI_INTERNAL_VAR_XFACE
1345 ACPI_MSG_DEPENDENT_RETURN_VOID (
1347 void ACPI_INTERNAL_VAR_XFACE
1349 const char *ModuleName,
1354 ACPI_MSG_DEPENDENT_RETURN_VOID (
1356 void ACPI_INTERNAL_VAR_XFACE
1358 const char *ModuleName,
1364 ACPI_MSG_DEPENDENT_RETURN_VOID (
1366 void ACPI_INTERNAL_VAR_XFACE
1368 const char *ModuleName,
1377 ACPI_DBG_DEPENDENT_RETURN_VOID (
1379 void ACPI_INTERNAL_VAR_XFACE
1381 UINT32 RequestedDebugLevel,
1383 const char *FunctionName,
1384 const char *ModuleName,
1389 ACPI_DBG_DEPENDENT_RETURN_VOID (
1391 void ACPI_INTERNAL_VAR_XFACE
1393 UINT32 RequestedDebugLevel,
1395 const char *FunctionName,
1396 const char *ModuleName,
1401 ACPI_DBG_DEPENDENT_RETURN_VOID (
1404 ACPI_TRACE_EVENT_TYPE Type,
1410 AcpiInitializeDebugger (
1414 AcpiTerminateDebugger (
1422 AcpiSetDebuggerThreadId (
1423 ACPI_THREAD_ID ThreadId);
1425 #endif /* __ACXFACE_H__ */