1 /******************************************************************************
3 * Name: acpixf.h - External interfaces to the ACPI subsystem
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2017, Intel Corp.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
47 /* Current ACPICA subsystem version in YYYYMMDD format */
49 #define ACPI_CA_VERSION 0x20170728
57 /*****************************************************************************
59 * Macros used for ACPICA globals and configuration
61 ****************************************************************************/
64 * Ensure that global variables are defined and initialized only once.
66 * The use of these macros allows for a single list of globals (here)
67 * in order to simplify maintenance of the code.
69 #ifdef DEFINE_ACPI_GLOBALS
70 #define ACPI_GLOBAL(type,name) \
74 #define ACPI_INIT_GLOBAL(type,name,value) \
79 #define ACPI_GLOBAL(type,name) \
83 #ifndef ACPI_INIT_GLOBAL
84 #define ACPI_INIT_GLOBAL(type,name,value) \
90 * These macros configure the various ACPICA interfaces. They are
91 * useful for generating stub inline functions for features that are
92 * configured out of the current kernel or ACPICA application.
94 #ifndef ACPI_EXTERNAL_RETURN_STATUS
95 #define ACPI_EXTERNAL_RETURN_STATUS(Prototype) \
99 #ifndef ACPI_EXTERNAL_RETURN_OK
100 #define ACPI_EXTERNAL_RETURN_OK(Prototype) \
104 #ifndef ACPI_EXTERNAL_RETURN_VOID
105 #define ACPI_EXTERNAL_RETURN_VOID(Prototype) \
109 #ifndef ACPI_EXTERNAL_RETURN_UINT32
110 #define ACPI_EXTERNAL_RETURN_UINT32(Prototype) \
114 #ifndef ACPI_EXTERNAL_RETURN_PTR
115 #define ACPI_EXTERNAL_RETURN_PTR(Prototype) \
120 /*****************************************************************************
122 * Public globals and runtime configuration options
124 ****************************************************************************/
127 * Enable "slack mode" of the AML interpreter? Default is FALSE, and the
128 * interpreter strictly follows the ACPI specification. Setting to TRUE
129 * allows the interpreter to ignore certain errors and/or bad AML constructs.
131 * Currently, these features are enabled by this flag:
133 * 1) Allow "implicit return" of last value in a control method
134 * 2) Allow access beyond the end of an operation region
135 * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
136 * 4) Allow ANY object type to be a source operand for the Store() operator
137 * 5) Allow unresolved references (invalid target name) in package objects
138 * 6) Enable warning messages for behavior that is not ACPI spec compliant
140 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_EnableInterpreterSlack
, FALSE
);
143 * Automatically serialize all methods that create named objects? Default
144 * is TRUE, meaning that all NonSerialized methods are scanned once at
145 * table load time to determine those that create named objects. Methods
146 * that create named objects are marked Serialized in order to prevent
147 * possible run-time problems if they are entered by more than one thread.
149 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_AutoSerializeMethods
, TRUE
);
152 * Create the predefined _OSI method in the namespace? Default is TRUE
153 * because ACPICA is fully compatible with other ACPI implementations.
154 * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
156 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_CreateOsiMethod
, TRUE
);
159 * Optionally use default values for the ACPI register widths. Set this to
160 * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
162 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_UseDefaultRegisterWidths
, TRUE
);
165 * Whether or not to validate (map) an entire table to verify
166 * checksum/duplication in early stage before install. Set this to TRUE to
167 * allow early table validation before install it to the table manager.
168 * Note that enabling this option causes errors to happen in some OSPMs
169 * during early initialization stages. Default behavior is to allow such
172 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_EnableTableValidation
, TRUE
);
175 * Optionally enable output from the AML Debug Object.
177 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_EnableAmlDebugObject
, FALSE
);
180 * Optionally copy the entire DSDT to local memory (instead of simply
181 * mapping it.) There are some BIOSs that corrupt or replace the original
182 * DSDT, creating the need for this option. Default is FALSE, do not copy
185 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_CopyDsdtLocally
, FALSE
);
188 * Optionally ignore an XSDT if present and use the RSDT instead.
189 * Although the ACPI specification requires that an XSDT be used instead
190 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
191 * some machines. Default behavior is to use the XSDT if present.
193 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_DoNotUseXsdt
, FALSE
);
196 * Optionally support group module level code.
198 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_GroupModuleLevelCode
, FALSE
);
201 * Optionally support module level code by parsing the entire table as
202 * a TermList. Default is FALSE, do not execute entire table until some
203 * lock order issues are fixed.
205 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_ParseTableAsTermList
, FALSE
);
208 * Optionally use 32-bit FADT addresses if and when there is a conflict
209 * (address mismatch) between the 32-bit and 64-bit versions of the
210 * address. Although ACPICA adheres to the ACPI specification which
211 * requires the use of the corresponding 64-bit address if it is non-zero,
212 * some machines have been found to have a corrupted non-zero 64-bit
213 * address. Default is FALSE, do not favor the 32-bit addresses.
215 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_Use32BitFadtAddresses
, FALSE
);
218 * Optionally use 32-bit FACS table addresses.
219 * It is reported that some platforms fail to resume from system suspending
220 * if 64-bit FACS table address is selected:
221 * https://bugzilla.kernel.org/show_bug.cgi?id=74021
222 * Default is TRUE, favor the 32-bit addresses.
224 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_Use32BitFacsAddresses
, TRUE
);
227 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
228 * with other ACPI implementations. NOTE: During ACPICA initialization,
229 * this value is set to TRUE if any Windows OSI strings have been
230 * requested by the BIOS.
232 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_TruncateIoAddresses
, FALSE
);
235 * Disable runtime checking and repair of values returned by control methods.
236 * Use only if the repair is causing a problem on a particular machine.
238 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_DisableAutoRepair
, FALSE
);
241 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
242 * This can be useful for debugging ACPI problems on some machines.
244 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_DisableSsdtTableInstall
, FALSE
);
247 * Optionally enable runtime namespace override.
249 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_RuntimeNamespaceOverride
, TRUE
);
252 * We keep track of the latest version of Windows that has been requested by
253 * the BIOS. ACPI 5.0.
255 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_OsiData
, 0);
258 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
259 * that the ACPI hardware is no longer required. A flag in the FADT indicates
260 * a reduced HW machine, and that flag is duplicated here for convenience.
262 ACPI_INIT_GLOBAL (BOOLEAN
, AcpiGbl_ReducedHardware
, FALSE
);
265 * Maximum number of While() loop iterations before forced method abort.
266 * This mechanism is intended to prevent infinite loops during interpreter
267 * execution within a host kernel.
269 ACPI_INIT_GLOBAL (UINT32
, AcpiGbl_MaxLoopIterations
, ACPI_MAX_LOOP_COUNT
);
272 * This mechanism is used to trace a specified AML method. The method is
273 * traced each time it is executed.
275 ACPI_INIT_GLOBAL (UINT32
, AcpiGbl_TraceFlags
, 0);
276 ACPI_INIT_GLOBAL (const char *, AcpiGbl_TraceMethodName
, NULL
);
277 ACPI_INIT_GLOBAL (UINT32
, AcpiGbl_TraceDbgLevel
, ACPI_TRACE_LEVEL_DEFAULT
);
278 ACPI_INIT_GLOBAL (UINT32
, AcpiGbl_TraceDbgLayer
, ACPI_TRACE_LAYER_DEFAULT
);
281 * Runtime configuration of debug output control masks. We want the debug
282 * switches statically initialized so they are already set when the debugger
285 #ifdef ACPI_DEBUG_OUTPUT
286 ACPI_INIT_GLOBAL (UINT32
, AcpiDbgLevel
, ACPI_DEBUG_DEFAULT
);
288 ACPI_INIT_GLOBAL (UINT32
, AcpiDbgLevel
, ACPI_NORMAL_DEFAULT
);
290 ACPI_INIT_GLOBAL (UINT32
, AcpiDbgLayer
, ACPI_COMPONENT_DEFAULT
);
292 /* Optionally enable timer output with Debug Object output */
294 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_DisplayDebugTimer
, FALSE
);
297 * Debugger command handshake globals. Host OSes need to access these
298 * variables to implement their own command handshake mechanism.
301 ACPI_INIT_GLOBAL (BOOLEAN
, AcpiGbl_MethodExecuting
, FALSE
);
302 ACPI_GLOBAL (char, AcpiGbl_DbLineBuf
[ACPI_DB_LINE_BUFFER_SIZE
]);
306 * Other miscellaneous globals
308 ACPI_GLOBAL (ACPI_TABLE_FADT
, AcpiGbl_FADT
);
309 ACPI_GLOBAL (UINT32
, AcpiCurrentGpeCount
);
310 ACPI_GLOBAL (BOOLEAN
, AcpiGbl_SystemAwakeAndRunning
);
313 /*****************************************************************************
315 * ACPICA public interface configuration.
317 * Interfaces that are configured out of the ACPICA build are replaced
318 * by inlined stubs by default.
320 ****************************************************************************/
323 * Hardware-reduced prototypes (default: Not hardware reduced).
325 * All ACPICA hardware-related interfaces that use these macros will be
326 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
329 * Note: This static build option for reduced hardware is intended to
330 * reduce ACPICA code size if desired or necessary. However, even if this
331 * option is not specified, the runtime behavior of ACPICA is dependent
332 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
333 * the flag will enable similar behavior -- ACPICA will not attempt
334 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
336 #if (!ACPI_REDUCED_HARDWARE)
337 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
338 ACPI_EXTERNAL_RETURN_STATUS(Prototype)
340 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
341 ACPI_EXTERNAL_RETURN_OK(Prototype)
343 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
344 ACPI_EXTERNAL_RETURN_VOID(Prototype)
347 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
348 static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
350 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
351 static ACPI_INLINE Prototype {return(AE_OK);}
353 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
354 static ACPI_INLINE Prototype {return;}
356 #endif /* !ACPI_REDUCED_HARDWARE */
360 * Error message prototypes (default: error messages enabled).
362 * All interfaces related to error and warning messages
363 * will be configured out of the ACPICA build if the
364 * ACPI_NO_ERROR_MESSAGE flag is defined.
366 #ifndef ACPI_NO_ERROR_MESSAGES
367 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
371 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
372 static ACPI_INLINE Prototype {return;}
374 #endif /* ACPI_NO_ERROR_MESSAGES */
378 * Debugging output prototypes (default: no debug output).
380 * All interfaces related to debug output messages
381 * will be configured out of the ACPICA build unless the
382 * ACPI_DEBUG_OUTPUT flag is defined.
384 #ifdef ACPI_DEBUG_OUTPUT
385 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
389 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
390 static ACPI_INLINE Prototype {return;}
392 #endif /* ACPI_DEBUG_OUTPUT */
396 * Application prototypes
398 * All interfaces used by application will be configured
399 * out of the ACPICA build unless the ACPI_APPLICATION
402 #ifdef ACPI_APPLICATION
403 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
407 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
408 static ACPI_INLINE Prototype {return;}
410 #endif /* ACPI_APPLICATION */
414 * Debugger prototypes
416 * All interfaces used by debugger will be configured
417 * out of the ACPICA build unless the ACPI_DEBUGGER
421 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
422 ACPI_EXTERNAL_RETURN_OK(Prototype)
424 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
425 ACPI_EXTERNAL_RETURN_VOID(Prototype)
428 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
429 static ACPI_INLINE Prototype {return(AE_OK);}
431 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
432 static ACPI_INLINE Prototype {return;}
434 #endif /* ACPI_DEBUGGER */
437 /*****************************************************************************
439 * ACPICA public interface prototypes
441 ****************************************************************************/
446 ACPI_EXTERNAL_RETURN_STATUS (
447 ACPI_STATUS ACPI_INIT_FUNCTION
448 AcpiInitializeTables (
449 ACPI_TABLE_DESC
*InitialStorage
,
450 UINT32 InitialTableCount
,
451 BOOLEAN AllowResize
))
453 ACPI_EXTERNAL_RETURN_STATUS (
454 ACPI_STATUS ACPI_INIT_FUNCTION
455 AcpiInitializeSubsystem (
458 ACPI_EXTERNAL_RETURN_STATUS (
459 ACPI_STATUS ACPI_INIT_FUNCTION
460 AcpiEnableSubsystem (
463 ACPI_EXTERNAL_RETURN_STATUS (
464 ACPI_STATUS ACPI_INIT_FUNCTION
465 AcpiInitializeObjects (
468 ACPI_EXTERNAL_RETURN_STATUS (
469 ACPI_STATUS ACPI_INIT_FUNCTION
475 * Miscellaneous global interfaces
477 ACPI_HW_DEPENDENT_RETURN_STATUS (
482 ACPI_HW_DEPENDENT_RETURN_STATUS (
487 ACPI_EXTERNAL_RETURN_STATUS (
489 AcpiSubsystemStatus (
492 ACPI_EXTERNAL_RETURN_STATUS (
495 ACPI_BUFFER
*RetBuffer
))
497 ACPI_EXTERNAL_RETURN_STATUS (
500 ACPI_STATISTICS
*Stats
))
502 ACPI_EXTERNAL_RETURN_PTR (
504 AcpiFormatException (
505 ACPI_STATUS Exception
))
507 ACPI_EXTERNAL_RETURN_STATUS (
509 AcpiPurgeCachedObjects (
512 ACPI_EXTERNAL_RETURN_STATUS (
514 AcpiInstallInterface (
515 ACPI_STRING InterfaceName
))
517 ACPI_EXTERNAL_RETURN_STATUS (
519 AcpiRemoveInterface (
520 ACPI_STRING InterfaceName
))
522 ACPI_EXTERNAL_RETURN_STATUS (
524 AcpiUpdateInterfaces (
527 ACPI_EXTERNAL_RETURN_UINT32 (
529 AcpiCheckAddressRange (
530 ACPI_ADR_SPACE_TYPE SpaceId
,
531 ACPI_PHYSICAL_ADDRESS Address
,
535 ACPI_EXTERNAL_RETURN_STATUS (
537 AcpiDecodePldBuffer (
540 ACPI_PLD_INFO
**ReturnBuffer
))
544 * ACPI table load/unload interfaces
546 ACPI_EXTERNAL_RETURN_STATUS (
547 ACPI_STATUS ACPI_INIT_FUNCTION
549 ACPI_PHYSICAL_ADDRESS Address
,
552 ACPI_EXTERNAL_RETURN_STATUS (
555 ACPI_TABLE_HEADER
*Table
))
557 ACPI_EXTERNAL_RETURN_STATUS (
559 AcpiUnloadParentTable (
562 ACPI_EXTERNAL_RETURN_STATUS (
563 ACPI_STATUS ACPI_INIT_FUNCTION
569 * ACPI table manipulation interfaces
571 ACPI_EXTERNAL_RETURN_STATUS (
572 ACPI_STATUS ACPI_INIT_FUNCTION
573 AcpiReallocateRootTable (
576 ACPI_EXTERNAL_RETURN_STATUS (
577 ACPI_STATUS ACPI_INIT_FUNCTION
578 AcpiFindRootPointer (
579 ACPI_PHYSICAL_ADDRESS
*RsdpAddress
))
581 ACPI_EXTERNAL_RETURN_STATUS (
584 ACPI_STRING Signature
,
586 ACPI_TABLE_HEADER
*OutTableHeader
))
588 ACPI_EXTERNAL_RETURN_STATUS (
591 ACPI_STRING Signature
,
593 ACPI_TABLE_HEADER
**OutTable
))
595 ACPI_EXTERNAL_RETURN_VOID (
598 ACPI_TABLE_HEADER
*Table
))
600 ACPI_EXTERNAL_RETURN_STATUS (
602 AcpiGetTableByIndex (
604 ACPI_TABLE_HEADER
**OutTable
))
606 ACPI_EXTERNAL_RETURN_STATUS (
608 AcpiInstallTableHandler (
609 ACPI_TABLE_HANDLER Handler
,
612 ACPI_EXTERNAL_RETURN_STATUS (
614 AcpiRemoveTableHandler (
615 ACPI_TABLE_HANDLER Handler
))
619 * Namespace and name interfaces
621 ACPI_EXTERNAL_RETURN_STATUS (
624 ACPI_OBJECT_TYPE Type
,
625 ACPI_HANDLE StartObject
,
627 ACPI_WALK_CALLBACK DescendingCallback
,
628 ACPI_WALK_CALLBACK AscendingCallback
,
632 ACPI_EXTERNAL_RETURN_STATUS (
636 ACPI_WALK_CALLBACK UserFunction
,
640 ACPI_EXTERNAL_RETURN_STATUS (
645 ACPI_BUFFER
*RetPathPtr
))
647 ACPI_EXTERNAL_RETURN_STATUS (
651 ACPI_STRING Pathname
,
652 ACPI_HANDLE
*RetHandle
))
654 ACPI_EXTERNAL_RETURN_STATUS (
658 ACPI_OBJECT_HANDLER Handler
,
661 ACPI_EXTERNAL_RETURN_STATUS (
665 ACPI_OBJECT_HANDLER Handler
))
667 ACPI_EXTERNAL_RETURN_STATUS (
671 ACPI_OBJECT_HANDLER Handler
,
674 ACPI_EXTERNAL_RETURN_STATUS (
684 * Object manipulation and enumeration
686 ACPI_EXTERNAL_RETURN_STATUS (
690 ACPI_STRING Pathname
,
691 ACPI_OBJECT_LIST
*ParameterObjects
,
692 ACPI_BUFFER
*ReturnObjectBuffer
))
694 ACPI_EXTERNAL_RETURN_STATUS (
696 AcpiEvaluateObjectTyped (
698 ACPI_STRING Pathname
,
699 ACPI_OBJECT_LIST
*ExternalParams
,
700 ACPI_BUFFER
*ReturnBuffer
,
701 ACPI_OBJECT_TYPE ReturnType
))
703 ACPI_EXTERNAL_RETURN_STATUS (
707 ACPI_DEVICE_INFO
**ReturnBuffer
))
709 ACPI_EXTERNAL_RETURN_STATUS (
714 ACPI_EXTERNAL_RETURN_STATUS (
717 ACPI_OBJECT_TYPE Type
,
720 ACPI_HANDLE
*OutHandle
))
722 ACPI_EXTERNAL_RETURN_STATUS (
726 ACPI_OBJECT_TYPE
*OutType
))
728 ACPI_EXTERNAL_RETURN_STATUS (
732 ACPI_HANDLE
*OutHandle
))
738 ACPI_EXTERNAL_RETURN_STATUS (
740 AcpiInstallInitializationHandler (
741 ACPI_INIT_HANDLER Handler
,
744 ACPI_HW_DEPENDENT_RETURN_STATUS (
746 AcpiInstallSciHandler (
747 ACPI_SCI_HANDLER Address
,
750 ACPI_HW_DEPENDENT_RETURN_STATUS (
752 AcpiRemoveSciHandler (
753 ACPI_SCI_HANDLER Address
))
755 ACPI_HW_DEPENDENT_RETURN_STATUS (
757 AcpiInstallGlobalEventHandler (
758 ACPI_GBL_EVENT_HANDLER Handler
,
761 ACPI_HW_DEPENDENT_RETURN_STATUS (
763 AcpiInstallFixedEventHandler (
765 ACPI_EVENT_HANDLER Handler
,
768 ACPI_HW_DEPENDENT_RETURN_STATUS (
770 AcpiRemoveFixedEventHandler (
772 ACPI_EVENT_HANDLER Handler
))
774 ACPI_HW_DEPENDENT_RETURN_STATUS (
776 AcpiInstallGpeHandler (
777 ACPI_HANDLE GpeDevice
,
780 ACPI_GPE_HANDLER Address
,
783 ACPI_HW_DEPENDENT_RETURN_STATUS (
785 AcpiInstallGpeRawHandler (
786 ACPI_HANDLE GpeDevice
,
789 ACPI_GPE_HANDLER Address
,
792 ACPI_HW_DEPENDENT_RETURN_STATUS (
794 AcpiRemoveGpeHandler (
795 ACPI_HANDLE GpeDevice
,
797 ACPI_GPE_HANDLER Address
))
799 ACPI_EXTERNAL_RETURN_STATUS (
801 AcpiInstallNotifyHandler (
804 ACPI_NOTIFY_HANDLER Handler
,
807 ACPI_EXTERNAL_RETURN_STATUS (
809 AcpiRemoveNotifyHandler (
812 ACPI_NOTIFY_HANDLER Handler
))
814 ACPI_EXTERNAL_RETURN_STATUS (
816 AcpiInstallAddressSpaceHandler (
818 ACPI_ADR_SPACE_TYPE SpaceId
,
819 ACPI_ADR_SPACE_HANDLER Handler
,
820 ACPI_ADR_SPACE_SETUP Setup
,
823 ACPI_EXTERNAL_RETURN_STATUS (
825 AcpiRemoveAddressSpaceHandler (
827 ACPI_ADR_SPACE_TYPE SpaceId
,
828 ACPI_ADR_SPACE_HANDLER Handler
))
830 ACPI_EXTERNAL_RETURN_STATUS (
832 AcpiInstallExceptionHandler (
833 ACPI_EXCEPTION_HANDLER Handler
))
835 ACPI_EXTERNAL_RETURN_STATUS (
837 AcpiInstallInterfaceHandler (
838 ACPI_INTERFACE_HANDLER Handler
))
842 * Global Lock interfaces
844 ACPI_HW_DEPENDENT_RETURN_STATUS (
846 AcpiAcquireGlobalLock (
850 ACPI_HW_DEPENDENT_RETURN_STATUS (
852 AcpiReleaseGlobalLock (
857 * Interfaces to AML mutex objects
859 ACPI_EXTERNAL_RETURN_STATUS (
863 ACPI_STRING Pathname
,
866 ACPI_EXTERNAL_RETURN_STATUS (
870 ACPI_STRING Pathname
))
874 * Fixed Event interfaces
876 ACPI_HW_DEPENDENT_RETURN_STATUS (
882 ACPI_HW_DEPENDENT_RETURN_STATUS (
888 ACPI_HW_DEPENDENT_RETURN_STATUS (
893 ACPI_HW_DEPENDENT_RETURN_STATUS (
897 ACPI_EVENT_STATUS
*EventStatus
))
901 * General Purpose Event (GPE) Interfaces
903 ACPI_HW_DEPENDENT_RETURN_STATUS (
908 ACPI_HW_DEPENDENT_RETURN_STATUS (
911 ACPI_HANDLE GpeDevice
,
914 ACPI_HW_DEPENDENT_RETURN_STATUS (
917 ACPI_HANDLE GpeDevice
,
920 ACPI_HW_DEPENDENT_RETURN_STATUS (
923 ACPI_HANDLE GpeDevice
,
926 ACPI_HW_DEPENDENT_RETURN_STATUS (
929 ACPI_HANDLE GpeDevice
,
933 ACPI_HW_DEPENDENT_RETURN_STATUS (
936 ACPI_HANDLE GpeDevice
,
939 ACPI_HW_DEPENDENT_RETURN_STATUS (
942 ACPI_HANDLE GpeDevice
,
946 ACPI_HW_DEPENDENT_RETURN_STATUS (
949 ACPI_HANDLE GpeDevice
,
952 ACPI_HW_DEPENDENT_RETURN_STATUS (
954 AcpiSetupGpeForWake (
955 ACPI_HANDLE ParentDevice
,
956 ACPI_HANDLE GpeDevice
,
959 ACPI_HW_DEPENDENT_RETURN_STATUS (
962 ACPI_HANDLE GpeDevice
,
966 ACPI_HW_DEPENDENT_RETURN_STATUS (
969 ACPI_HANDLE GpeDevice
,
971 ACPI_EVENT_STATUS
*EventStatus
))
973 ACPI_HW_DEPENDENT_RETURN_STATUS (
978 ACPI_HW_DEPENDENT_RETURN_STATUS (
980 AcpiEnableAllRuntimeGpes (
983 ACPI_HW_DEPENDENT_RETURN_STATUS (
985 AcpiEnableAllWakeupGpes (
988 ACPI_HW_DEPENDENT_RETURN_STATUS (
992 ACPI_HANDLE
*GpeDevice
))
994 ACPI_HW_DEPENDENT_RETURN_STATUS (
996 AcpiInstallGpeBlock (
997 ACPI_HANDLE GpeDevice
,
998 ACPI_GENERIC_ADDRESS
*GpeBlockAddress
,
999 UINT32 RegisterCount
,
1000 UINT32 InterruptNumber
))
1002 ACPI_HW_DEPENDENT_RETURN_STATUS (
1004 AcpiRemoveGpeBlock (
1005 ACPI_HANDLE GpeDevice
))
1009 * Resource interfaces
1012 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK
) (
1013 ACPI_RESOURCE
*Resource
,
1016 ACPI_EXTERNAL_RETURN_STATUS (
1018 AcpiGetVendorResource (
1021 ACPI_VENDOR_UUID
*Uuid
,
1022 ACPI_BUFFER
*RetBuffer
))
1024 ACPI_EXTERNAL_RETURN_STATUS (
1026 AcpiGetCurrentResources (
1028 ACPI_BUFFER
*RetBuffer
))
1030 ACPI_EXTERNAL_RETURN_STATUS (
1032 AcpiGetPossibleResources (
1034 ACPI_BUFFER
*RetBuffer
))
1036 ACPI_EXTERNAL_RETURN_STATUS (
1038 AcpiGetEventResources (
1039 ACPI_HANDLE DeviceHandle
,
1040 ACPI_BUFFER
*RetBuffer
))
1042 ACPI_EXTERNAL_RETURN_STATUS (
1044 AcpiWalkResourceBuffer (
1045 ACPI_BUFFER
*Buffer
,
1046 ACPI_WALK_RESOURCE_CALLBACK UserFunction
,
1049 ACPI_EXTERNAL_RETURN_STATUS (
1054 ACPI_WALK_RESOURCE_CALLBACK UserFunction
,
1057 ACPI_EXTERNAL_RETURN_STATUS (
1059 AcpiSetCurrentResources (
1061 ACPI_BUFFER
*InBuffer
))
1063 ACPI_EXTERNAL_RETURN_STATUS (
1065 AcpiGetIrqRoutingTable (
1067 ACPI_BUFFER
*RetBuffer
))
1069 ACPI_EXTERNAL_RETURN_STATUS (
1071 AcpiResourceToAddress64 (
1072 ACPI_RESOURCE
*Resource
,
1073 ACPI_RESOURCE_ADDRESS64
*Out
))
1075 ACPI_EXTERNAL_RETURN_STATUS (
1077 AcpiBufferToResource (
1079 UINT16 AmlBufferLength
,
1080 ACPI_RESOURCE
**ResourcePtr
))
1084 * Hardware (ACPI device) interfaces
1086 ACPI_EXTERNAL_RETURN_STATUS (
1091 ACPI_EXTERNAL_RETURN_STATUS (
1095 ACPI_GENERIC_ADDRESS
*Reg
))
1097 ACPI_EXTERNAL_RETURN_STATUS (
1101 ACPI_GENERIC_ADDRESS
*Reg
))
1103 ACPI_HW_DEPENDENT_RETURN_STATUS (
1105 AcpiReadBitRegister (
1107 UINT32
*ReturnValue
))
1109 ACPI_HW_DEPENDENT_RETURN_STATUS (
1111 AcpiWriteBitRegister (
1117 * Sleep/Wake interfaces
1119 ACPI_EXTERNAL_RETURN_STATUS (
1121 AcpiGetSleepTypeData (
1126 ACPI_EXTERNAL_RETURN_STATUS (
1128 AcpiEnterSleepStatePrep (
1131 ACPI_EXTERNAL_RETURN_STATUS (
1133 AcpiEnterSleepState (
1136 ACPI_HW_DEPENDENT_RETURN_STATUS (
1138 AcpiEnterSleepStateS4bios (
1141 ACPI_EXTERNAL_RETURN_STATUS (
1143 AcpiLeaveSleepStatePrep (
1146 ACPI_EXTERNAL_RETURN_STATUS (
1148 AcpiLeaveSleepState (
1151 ACPI_HW_DEPENDENT_RETURN_STATUS (
1153 AcpiSetFirmwareWakingVector (
1154 ACPI_PHYSICAL_ADDRESS PhysicalAddress
,
1155 ACPI_PHYSICAL_ADDRESS PhysicalAddress64
))
1159 * ACPI Timer interfaces
1161 ACPI_HW_DEPENDENT_RETURN_STATUS (
1163 AcpiGetTimerResolution (
1164 UINT32
*Resolution
))
1166 ACPI_HW_DEPENDENT_RETURN_STATUS (
1171 ACPI_HW_DEPENDENT_RETURN_STATUS (
1173 AcpiGetTimerDuration (
1176 UINT32
*TimeElapsed
))
1180 * Error/Warning output
1182 ACPI_MSG_DEPENDENT_RETURN_VOID (
1184 void ACPI_INTERNAL_VAR_XFACE
1186 const char *ModuleName
,
1191 ACPI_MSG_DEPENDENT_RETURN_VOID (
1193 void ACPI_INTERNAL_VAR_XFACE
1195 const char *ModuleName
,
1201 ACPI_MSG_DEPENDENT_RETURN_VOID (
1203 void ACPI_INTERNAL_VAR_XFACE
1205 const char *ModuleName
,
1210 ACPI_MSG_DEPENDENT_RETURN_VOID (
1212 void ACPI_INTERNAL_VAR_XFACE
1217 ACPI_MSG_DEPENDENT_RETURN_VOID (
1219 void ACPI_INTERNAL_VAR_XFACE
1221 const char *ModuleName
,
1226 ACPI_MSG_DEPENDENT_RETURN_VOID (
1228 void ACPI_INTERNAL_VAR_XFACE
1230 const char *ModuleName
,
1239 ACPI_DBG_DEPENDENT_RETURN_VOID (
1241 void ACPI_INTERNAL_VAR_XFACE
1243 UINT32 RequestedDebugLevel
,
1245 const char *FunctionName
,
1246 const char *ModuleName
,
1251 ACPI_DBG_DEPENDENT_RETURN_VOID (
1253 void ACPI_INTERNAL_VAR_XFACE
1255 UINT32 RequestedDebugLevel
,
1257 const char *FunctionName
,
1258 const char *ModuleName
,
1263 ACPI_DBG_DEPENDENT_RETURN_VOID (
1266 ACPI_TRACE_EVENT_TYPE Type
,
1272 AcpiInitializeDebugger (
1276 AcpiTerminateDebugger (
1284 AcpiSetDebuggerThreadId (
1285 ACPI_THREAD_ID ThreadId
);
1287 #endif /* __ACXFACE_H__ */