1 /******************************************************************************
3 * Name: acpixf.h - External interfaces to the ACPI subsystem
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2019, 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 0x20190329
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 use 32-bit FADT addresses if and when there is a conflict
197 * (address mismatch) between the 32-bit and 64-bit versions of the
198 * address. Although ACPICA adheres to the ACPI specification which
199 * requires the use of the corresponding 64-bit address if it is non-zero,
200 * some machines have been found to have a corrupted non-zero 64-bit
201 * address. Default is FALSE, do not favor the 32-bit addresses.
203 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_Use32BitFadtAddresses
, FALSE
);
206 * Optionally use 32-bit FACS table addresses.
207 * It is reported that some platforms fail to resume from system suspending
208 * if 64-bit FACS table address is selected:
209 * https://bugzilla.kernel.org/show_bug.cgi?id=74021
210 * Default is TRUE, favor the 32-bit addresses.
212 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_Use32BitFacsAddresses
, TRUE
);
215 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
216 * with other ACPI implementations. NOTE: During ACPICA initialization,
217 * this value is set to TRUE if any Windows OSI strings have been
218 * requested by the BIOS.
220 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_TruncateIoAddresses
, FALSE
);
223 * Disable runtime checking and repair of values returned by control methods.
224 * Use only if the repair is causing a problem on a particular machine.
226 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_DisableAutoRepair
, FALSE
);
229 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
230 * This can be useful for debugging ACPI problems on some machines.
232 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_DisableSsdtTableInstall
, FALSE
);
235 * Optionally enable runtime namespace override.
237 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_RuntimeNamespaceOverride
, TRUE
);
240 * We keep track of the latest version of Windows that has been requested by
241 * the BIOS. ACPI 5.0.
243 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_OsiData
, 0);
246 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
247 * that the ACPI hardware is no longer required. A flag in the FADT indicates
248 * a reduced HW machine, and that flag is duplicated here for convenience.
250 ACPI_INIT_GLOBAL (BOOLEAN
, AcpiGbl_ReducedHardware
, FALSE
);
253 * Maximum timeout for While() loop iterations before forced method abort.
254 * This mechanism is intended to prevent infinite loops during interpreter
255 * execution within a host kernel.
257 ACPI_INIT_GLOBAL (UINT32
, AcpiGbl_MaxLoopIterations
, ACPI_MAX_LOOP_TIMEOUT
);
260 * Optionally ignore AE_NOT_FOUND errors from named reference package elements
261 * during DSDT/SSDT table loading. This reduces error "noise" in platforms
262 * whose firmware is carrying around a bunch of unused package objects that
263 * refer to non-existent named objects. However, If the AML actually tries to
264 * use such a package, the unresolved element(s) will be replaced with NULL
267 ACPI_INIT_GLOBAL (BOOLEAN
, AcpiGbl_IgnorePackageResolutionErrors
, FALSE
);
270 * This mechanism is used to trace a specified AML method. The method is
271 * traced each time it is executed.
273 ACPI_INIT_GLOBAL (UINT32
, AcpiGbl_TraceFlags
, 0);
274 ACPI_INIT_GLOBAL (const char *, AcpiGbl_TraceMethodName
, NULL
);
275 ACPI_INIT_GLOBAL (UINT32
, AcpiGbl_TraceDbgLevel
, ACPI_TRACE_LEVEL_DEFAULT
);
276 ACPI_INIT_GLOBAL (UINT32
, AcpiGbl_TraceDbgLayer
, ACPI_TRACE_LAYER_DEFAULT
);
279 * Runtime configuration of debug output control masks. We want the debug
280 * switches statically initialized so they are already set when the debugger
283 #ifdef ACPI_DEBUG_OUTPUT
284 ACPI_INIT_GLOBAL (UINT32
, AcpiDbgLevel
, ACPI_DEBUG_DEFAULT
);
286 ACPI_INIT_GLOBAL (UINT32
, AcpiDbgLevel
, ACPI_NORMAL_DEFAULT
);
288 ACPI_INIT_GLOBAL (UINT32
, AcpiDbgLayer
, ACPI_COMPONENT_DEFAULT
);
290 /* Optionally enable timer output with Debug Object output */
292 ACPI_INIT_GLOBAL (UINT8
, AcpiGbl_DisplayDebugTimer
, FALSE
);
295 * Debugger command handshake globals. Host OSes need to access these
296 * variables to implement their own command handshake mechanism.
299 ACPI_INIT_GLOBAL (BOOLEAN
, AcpiGbl_MethodExecuting
, FALSE
);
300 ACPI_GLOBAL (char, AcpiGbl_DbLineBuf
[ACPI_DB_LINE_BUFFER_SIZE
]);
304 * Other miscellaneous globals
306 ACPI_GLOBAL (ACPI_TABLE_FADT
, AcpiGbl_FADT
);
307 ACPI_GLOBAL (UINT32
, AcpiCurrentGpeCount
);
308 ACPI_GLOBAL (BOOLEAN
, AcpiGbl_SystemAwakeAndRunning
);
311 /*****************************************************************************
313 * ACPICA public interface configuration.
315 * Interfaces that are configured out of the ACPICA build are replaced
316 * by inlined stubs by default.
318 ****************************************************************************/
321 * Hardware-reduced prototypes (default: Not hardware reduced).
323 * All ACPICA hardware-related interfaces that use these macros will be
324 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
327 * Note: This static build option for reduced hardware is intended to
328 * reduce ACPICA code size if desired or necessary. However, even if this
329 * option is not specified, the runtime behavior of ACPICA is dependent
330 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
331 * the flag will enable similar behavior -- ACPICA will not attempt
332 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
334 #if (!ACPI_REDUCED_HARDWARE)
335 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
336 ACPI_EXTERNAL_RETURN_STATUS(Prototype)
338 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
339 ACPI_EXTERNAL_RETURN_OK(Prototype)
341 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
342 ACPI_EXTERNAL_RETURN_VOID(Prototype)
345 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
346 static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
348 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
349 static ACPI_INLINE Prototype {return(AE_OK);}
351 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
352 static ACPI_INLINE Prototype {return;}
354 #endif /* !ACPI_REDUCED_HARDWARE */
358 * Error message prototypes (default: error messages enabled).
360 * All interfaces related to error and warning messages
361 * will be configured out of the ACPICA build if the
362 * ACPI_NO_ERROR_MESSAGE flag is defined.
364 #ifndef ACPI_NO_ERROR_MESSAGES
365 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
369 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
370 static ACPI_INLINE Prototype {return;}
372 #endif /* ACPI_NO_ERROR_MESSAGES */
376 * Debugging output prototypes (default: no debug output).
378 * All interfaces related to debug output messages
379 * will be configured out of the ACPICA build unless the
380 * ACPI_DEBUG_OUTPUT flag is defined.
382 #ifdef ACPI_DEBUG_OUTPUT
383 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
387 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
388 static ACPI_INLINE Prototype {return;}
390 #endif /* ACPI_DEBUG_OUTPUT */
394 * Application prototypes
396 * All interfaces used by application will be configured
397 * out of the ACPICA build unless the ACPI_APPLICATION
400 #ifdef ACPI_APPLICATION
401 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
405 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
406 static ACPI_INLINE Prototype {return;}
408 #endif /* ACPI_APPLICATION */
412 * Debugger prototypes
414 * All interfaces used by debugger will be configured
415 * out of the ACPICA build unless the ACPI_DEBUGGER
419 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
420 ACPI_EXTERNAL_RETURN_OK(Prototype)
422 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
423 ACPI_EXTERNAL_RETURN_VOID(Prototype)
426 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
427 static ACPI_INLINE Prototype {return(AE_OK);}
429 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
430 static ACPI_INLINE Prototype {return;}
432 #endif /* ACPI_DEBUGGER */
435 /*****************************************************************************
437 * ACPICA public interface prototypes
439 ****************************************************************************/
444 ACPI_EXTERNAL_RETURN_STATUS (
445 ACPI_STATUS ACPI_INIT_FUNCTION
446 AcpiInitializeTables (
447 ACPI_TABLE_DESC
*InitialStorage
,
448 UINT32 InitialTableCount
,
449 BOOLEAN AllowResize
))
451 ACPI_EXTERNAL_RETURN_STATUS (
452 ACPI_STATUS ACPI_INIT_FUNCTION
453 AcpiInitializeSubsystem (
456 ACPI_EXTERNAL_RETURN_STATUS (
457 ACPI_STATUS ACPI_INIT_FUNCTION
458 AcpiEnableSubsystem (
461 ACPI_EXTERNAL_RETURN_STATUS (
462 ACPI_STATUS ACPI_INIT_FUNCTION
463 AcpiInitializeObjects (
466 ACPI_EXTERNAL_RETURN_STATUS (
467 ACPI_STATUS ACPI_INIT_FUNCTION
473 * Miscellaneous global interfaces
475 ACPI_HW_DEPENDENT_RETURN_STATUS (
480 ACPI_HW_DEPENDENT_RETURN_STATUS (
485 ACPI_EXTERNAL_RETURN_STATUS (
487 AcpiSubsystemStatus (
490 ACPI_EXTERNAL_RETURN_STATUS (
493 ACPI_BUFFER
*RetBuffer
))
495 ACPI_EXTERNAL_RETURN_STATUS (
498 ACPI_STATISTICS
*Stats
))
500 ACPI_EXTERNAL_RETURN_PTR (
502 AcpiFormatException (
503 ACPI_STATUS Exception
))
505 ACPI_EXTERNAL_RETURN_STATUS (
507 AcpiPurgeCachedObjects (
510 ACPI_EXTERNAL_RETURN_STATUS (
512 AcpiInstallInterface (
513 ACPI_STRING InterfaceName
))
515 ACPI_EXTERNAL_RETURN_STATUS (
517 AcpiRemoveInterface (
518 ACPI_STRING InterfaceName
))
520 ACPI_EXTERNAL_RETURN_STATUS (
522 AcpiUpdateInterfaces (
525 ACPI_EXTERNAL_RETURN_UINT32 (
527 AcpiCheckAddressRange (
528 ACPI_ADR_SPACE_TYPE SpaceId
,
529 ACPI_PHYSICAL_ADDRESS Address
,
533 ACPI_EXTERNAL_RETURN_STATUS (
535 AcpiDecodePldBuffer (
538 ACPI_PLD_INFO
**ReturnBuffer
))
542 * ACPI table load/unload interfaces
544 ACPI_EXTERNAL_RETURN_STATUS (
545 ACPI_STATUS ACPI_INIT_FUNCTION
547 ACPI_PHYSICAL_ADDRESS Address
,
550 ACPI_EXTERNAL_RETURN_STATUS (
553 ACPI_TABLE_HEADER
*Table
))
555 ACPI_EXTERNAL_RETURN_STATUS (
557 AcpiUnloadParentTable (
560 ACPI_EXTERNAL_RETURN_STATUS (
561 ACPI_STATUS ACPI_INIT_FUNCTION
567 * ACPI table manipulation interfaces
569 ACPI_EXTERNAL_RETURN_STATUS (
570 ACPI_STATUS ACPI_INIT_FUNCTION
571 AcpiReallocateRootTable (
574 ACPI_EXTERNAL_RETURN_STATUS (
575 ACPI_STATUS ACPI_INIT_FUNCTION
576 AcpiFindRootPointer (
577 ACPI_PHYSICAL_ADDRESS
*RsdpAddress
))
579 ACPI_EXTERNAL_RETURN_STATUS (
582 ACPI_STRING Signature
,
584 ACPI_TABLE_HEADER
*OutTableHeader
))
586 ACPI_EXTERNAL_RETURN_STATUS (
589 ACPI_STRING Signature
,
591 ACPI_TABLE_HEADER
**OutTable
))
593 ACPI_EXTERNAL_RETURN_VOID (
596 ACPI_TABLE_HEADER
*Table
))
598 ACPI_EXTERNAL_RETURN_STATUS (
600 AcpiGetTableByIndex (
602 ACPI_TABLE_HEADER
**OutTable
))
604 ACPI_EXTERNAL_RETURN_STATUS (
606 AcpiInstallTableHandler (
607 ACPI_TABLE_HANDLER Handler
,
610 ACPI_EXTERNAL_RETURN_STATUS (
612 AcpiRemoveTableHandler (
613 ACPI_TABLE_HANDLER Handler
))
617 * Namespace and name interfaces
619 ACPI_EXTERNAL_RETURN_STATUS (
622 ACPI_OBJECT_TYPE Type
,
623 ACPI_HANDLE StartObject
,
625 ACPI_WALK_CALLBACK DescendingCallback
,
626 ACPI_WALK_CALLBACK AscendingCallback
,
630 ACPI_EXTERNAL_RETURN_STATUS (
634 ACPI_WALK_CALLBACK UserFunction
,
638 ACPI_EXTERNAL_RETURN_STATUS (
643 ACPI_BUFFER
*RetPathPtr
))
645 ACPI_EXTERNAL_RETURN_STATUS (
649 ACPI_STRING Pathname
,
650 ACPI_HANDLE
*RetHandle
))
652 ACPI_EXTERNAL_RETURN_STATUS (
656 ACPI_OBJECT_HANDLER Handler
,
659 ACPI_EXTERNAL_RETURN_STATUS (
663 ACPI_OBJECT_HANDLER Handler
))
665 ACPI_EXTERNAL_RETURN_STATUS (
669 ACPI_OBJECT_HANDLER Handler
,
672 ACPI_EXTERNAL_RETURN_STATUS (
682 * Object manipulation and enumeration
684 ACPI_EXTERNAL_RETURN_STATUS (
688 ACPI_STRING Pathname
,
689 ACPI_OBJECT_LIST
*ParameterObjects
,
690 ACPI_BUFFER
*ReturnObjectBuffer
))
692 ACPI_EXTERNAL_RETURN_STATUS (
694 AcpiEvaluateObjectTyped (
696 ACPI_STRING Pathname
,
697 ACPI_OBJECT_LIST
*ExternalParams
,
698 ACPI_BUFFER
*ReturnBuffer
,
699 ACPI_OBJECT_TYPE ReturnType
))
701 ACPI_EXTERNAL_RETURN_STATUS (
705 ACPI_DEVICE_INFO
**ReturnBuffer
))
707 ACPI_EXTERNAL_RETURN_STATUS (
712 ACPI_EXTERNAL_RETURN_STATUS (
715 ACPI_OBJECT_TYPE Type
,
718 ACPI_HANDLE
*OutHandle
))
720 ACPI_EXTERNAL_RETURN_STATUS (
724 ACPI_OBJECT_TYPE
*OutType
))
726 ACPI_EXTERNAL_RETURN_STATUS (
730 ACPI_HANDLE
*OutHandle
))
736 ACPI_EXTERNAL_RETURN_STATUS (
738 AcpiInstallInitializationHandler (
739 ACPI_INIT_HANDLER Handler
,
742 ACPI_HW_DEPENDENT_RETURN_STATUS (
744 AcpiInstallSciHandler (
745 ACPI_SCI_HANDLER Address
,
748 ACPI_HW_DEPENDENT_RETURN_STATUS (
750 AcpiRemoveSciHandler (
751 ACPI_SCI_HANDLER Address
))
753 ACPI_HW_DEPENDENT_RETURN_STATUS (
755 AcpiInstallGlobalEventHandler (
756 ACPI_GBL_EVENT_HANDLER Handler
,
759 ACPI_HW_DEPENDENT_RETURN_STATUS (
761 AcpiInstallFixedEventHandler (
763 ACPI_EVENT_HANDLER Handler
,
766 ACPI_HW_DEPENDENT_RETURN_STATUS (
768 AcpiRemoveFixedEventHandler (
770 ACPI_EVENT_HANDLER Handler
))
772 ACPI_HW_DEPENDENT_RETURN_STATUS (
774 AcpiInstallGpeHandler (
775 ACPI_HANDLE GpeDevice
,
778 ACPI_GPE_HANDLER Address
,
781 ACPI_HW_DEPENDENT_RETURN_STATUS (
783 AcpiInstallGpeRawHandler (
784 ACPI_HANDLE GpeDevice
,
787 ACPI_GPE_HANDLER Address
,
790 ACPI_HW_DEPENDENT_RETURN_STATUS (
792 AcpiRemoveGpeHandler (
793 ACPI_HANDLE GpeDevice
,
795 ACPI_GPE_HANDLER Address
))
797 ACPI_EXTERNAL_RETURN_STATUS (
799 AcpiInstallNotifyHandler (
802 ACPI_NOTIFY_HANDLER Handler
,
805 ACPI_EXTERNAL_RETURN_STATUS (
807 AcpiRemoveNotifyHandler (
810 ACPI_NOTIFY_HANDLER Handler
))
812 ACPI_EXTERNAL_RETURN_STATUS (
814 AcpiInstallAddressSpaceHandler (
816 ACPI_ADR_SPACE_TYPE SpaceId
,
817 ACPI_ADR_SPACE_HANDLER Handler
,
818 ACPI_ADR_SPACE_SETUP Setup
,
821 ACPI_EXTERNAL_RETURN_STATUS (
823 AcpiRemoveAddressSpaceHandler (
825 ACPI_ADR_SPACE_TYPE SpaceId
,
826 ACPI_ADR_SPACE_HANDLER Handler
))
828 ACPI_EXTERNAL_RETURN_STATUS (
830 AcpiInstallExceptionHandler (
831 ACPI_EXCEPTION_HANDLER Handler
))
833 ACPI_EXTERNAL_RETURN_STATUS (
835 AcpiInstallInterfaceHandler (
836 ACPI_INTERFACE_HANDLER Handler
))
840 * Global Lock interfaces
842 ACPI_HW_DEPENDENT_RETURN_STATUS (
844 AcpiAcquireGlobalLock (
848 ACPI_HW_DEPENDENT_RETURN_STATUS (
850 AcpiReleaseGlobalLock (
855 * Interfaces to AML mutex objects
857 ACPI_EXTERNAL_RETURN_STATUS (
861 ACPI_STRING Pathname
,
864 ACPI_EXTERNAL_RETURN_STATUS (
868 ACPI_STRING Pathname
))
872 * Fixed Event interfaces
874 ACPI_HW_DEPENDENT_RETURN_STATUS (
880 ACPI_HW_DEPENDENT_RETURN_STATUS (
886 ACPI_HW_DEPENDENT_RETURN_STATUS (
891 ACPI_HW_DEPENDENT_RETURN_STATUS (
895 ACPI_EVENT_STATUS
*EventStatus
))
899 * General Purpose Event (GPE) Interfaces
901 ACPI_HW_DEPENDENT_RETURN_STATUS (
906 ACPI_HW_DEPENDENT_RETURN_STATUS (
909 ACPI_HANDLE GpeDevice
,
912 ACPI_HW_DEPENDENT_RETURN_STATUS (
915 ACPI_HANDLE GpeDevice
,
918 ACPI_HW_DEPENDENT_RETURN_STATUS (
921 ACPI_HANDLE GpeDevice
,
924 ACPI_HW_DEPENDENT_RETURN_STATUS (
927 ACPI_HANDLE GpeDevice
,
931 ACPI_HW_DEPENDENT_RETURN_STATUS (
934 ACPI_HANDLE GpeDevice
,
937 ACPI_HW_DEPENDENT_RETURN_STATUS (
940 ACPI_HANDLE GpeDevice
,
944 ACPI_HW_DEPENDENT_RETURN_STATUS (
947 ACPI_HANDLE GpeDevice
,
950 ACPI_HW_DEPENDENT_RETURN_STATUS (
952 AcpiSetupGpeForWake (
953 ACPI_HANDLE ParentDevice
,
954 ACPI_HANDLE GpeDevice
,
957 ACPI_HW_DEPENDENT_RETURN_STATUS (
960 ACPI_HANDLE GpeDevice
,
964 ACPI_HW_DEPENDENT_RETURN_STATUS (
967 ACPI_HANDLE GpeDevice
,
969 ACPI_EVENT_STATUS
*EventStatus
))
971 ACPI_HW_DEPENDENT_RETURN_STATUS (
976 ACPI_HW_DEPENDENT_RETURN_STATUS (
978 AcpiEnableAllRuntimeGpes (
981 ACPI_HW_DEPENDENT_RETURN_STATUS (
983 AcpiEnableAllWakeupGpes (
986 ACPI_HW_DEPENDENT_RETURN_STATUS (
990 ACPI_HANDLE
*GpeDevice
))
992 ACPI_HW_DEPENDENT_RETURN_STATUS (
994 AcpiInstallGpeBlock (
995 ACPI_HANDLE GpeDevice
,
996 ACPI_GENERIC_ADDRESS
*GpeBlockAddress
,
997 UINT32 RegisterCount
,
998 UINT32 InterruptNumber
))
1000 ACPI_HW_DEPENDENT_RETURN_STATUS (
1002 AcpiRemoveGpeBlock (
1003 ACPI_HANDLE GpeDevice
))
1007 * Resource interfaces
1010 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK
) (
1011 ACPI_RESOURCE
*Resource
,
1014 ACPI_EXTERNAL_RETURN_STATUS (
1016 AcpiGetVendorResource (
1019 ACPI_VENDOR_UUID
*Uuid
,
1020 ACPI_BUFFER
*RetBuffer
))
1022 ACPI_EXTERNAL_RETURN_STATUS (
1024 AcpiGetCurrentResources (
1026 ACPI_BUFFER
*RetBuffer
))
1028 ACPI_EXTERNAL_RETURN_STATUS (
1030 AcpiGetPossibleResources (
1032 ACPI_BUFFER
*RetBuffer
))
1034 ACPI_EXTERNAL_RETURN_STATUS (
1036 AcpiGetEventResources (
1037 ACPI_HANDLE DeviceHandle
,
1038 ACPI_BUFFER
*RetBuffer
))
1040 ACPI_EXTERNAL_RETURN_STATUS (
1042 AcpiWalkResourceBuffer (
1043 ACPI_BUFFER
*Buffer
,
1044 ACPI_WALK_RESOURCE_CALLBACK UserFunction
,
1047 ACPI_EXTERNAL_RETURN_STATUS (
1052 ACPI_WALK_RESOURCE_CALLBACK UserFunction
,
1055 ACPI_EXTERNAL_RETURN_STATUS (
1057 AcpiSetCurrentResources (
1059 ACPI_BUFFER
*InBuffer
))
1061 ACPI_EXTERNAL_RETURN_STATUS (
1063 AcpiGetIrqRoutingTable (
1065 ACPI_BUFFER
*RetBuffer
))
1067 ACPI_EXTERNAL_RETURN_STATUS (
1069 AcpiResourceToAddress64 (
1070 ACPI_RESOURCE
*Resource
,
1071 ACPI_RESOURCE_ADDRESS64
*Out
))
1073 ACPI_EXTERNAL_RETURN_STATUS (
1075 AcpiBufferToResource (
1077 UINT16 AmlBufferLength
,
1078 ACPI_RESOURCE
**ResourcePtr
))
1082 * Hardware (ACPI device) interfaces
1084 ACPI_EXTERNAL_RETURN_STATUS (
1089 ACPI_EXTERNAL_RETURN_STATUS (
1093 ACPI_GENERIC_ADDRESS
*Reg
))
1095 ACPI_EXTERNAL_RETURN_STATUS (
1099 ACPI_GENERIC_ADDRESS
*Reg
))
1101 ACPI_HW_DEPENDENT_RETURN_STATUS (
1103 AcpiReadBitRegister (
1105 UINT32
*ReturnValue
))
1107 ACPI_HW_DEPENDENT_RETURN_STATUS (
1109 AcpiWriteBitRegister (
1115 * Sleep/Wake interfaces
1117 ACPI_EXTERNAL_RETURN_STATUS (
1119 AcpiGetSleepTypeData (
1124 ACPI_EXTERNAL_RETURN_STATUS (
1126 AcpiEnterSleepStatePrep (
1129 ACPI_EXTERNAL_RETURN_STATUS (
1131 AcpiEnterSleepState (
1134 ACPI_HW_DEPENDENT_RETURN_STATUS (
1136 AcpiEnterSleepStateS4bios (
1139 ACPI_EXTERNAL_RETURN_STATUS (
1141 AcpiLeaveSleepStatePrep (
1144 ACPI_EXTERNAL_RETURN_STATUS (
1146 AcpiLeaveSleepState (
1149 ACPI_HW_DEPENDENT_RETURN_STATUS (
1151 AcpiSetFirmwareWakingVector (
1152 ACPI_PHYSICAL_ADDRESS PhysicalAddress
,
1153 ACPI_PHYSICAL_ADDRESS PhysicalAddress64
))
1157 * ACPI Timer interfaces
1159 ACPI_HW_DEPENDENT_RETURN_STATUS (
1161 AcpiGetTimerResolution (
1162 UINT32
*Resolution
))
1164 ACPI_HW_DEPENDENT_RETURN_STATUS (
1169 ACPI_HW_DEPENDENT_RETURN_STATUS (
1171 AcpiGetTimerDuration (
1174 UINT32
*TimeElapsed
))
1178 * Error/Warning output
1180 ACPI_MSG_DEPENDENT_RETURN_VOID (
1182 void ACPI_INTERNAL_VAR_XFACE
1184 const char *ModuleName
,
1189 ACPI_MSG_DEPENDENT_RETURN_VOID (
1191 void ACPI_INTERNAL_VAR_XFACE
1193 const char *ModuleName
,
1199 ACPI_MSG_DEPENDENT_RETURN_VOID (
1201 void ACPI_INTERNAL_VAR_XFACE
1203 const char *ModuleName
,
1208 ACPI_MSG_DEPENDENT_RETURN_VOID (
1210 void ACPI_INTERNAL_VAR_XFACE
1215 ACPI_MSG_DEPENDENT_RETURN_VOID (
1217 void ACPI_INTERNAL_VAR_XFACE
1219 const char *ModuleName
,
1224 ACPI_MSG_DEPENDENT_RETURN_VOID (
1226 void ACPI_INTERNAL_VAR_XFACE
1228 const char *ModuleName
,
1234 ACPI_MSG_DEPENDENT_RETURN_VOID (
1236 void ACPI_INTERNAL_VAR_XFACE
1238 const char *ModuleName
,
1247 ACPI_DBG_DEPENDENT_RETURN_VOID (
1249 void ACPI_INTERNAL_VAR_XFACE
1251 UINT32 RequestedDebugLevel
,
1253 const char *FunctionName
,
1254 const char *ModuleName
,
1259 ACPI_DBG_DEPENDENT_RETURN_VOID (
1261 void ACPI_INTERNAL_VAR_XFACE
1263 UINT32 RequestedDebugLevel
,
1265 const char *FunctionName
,
1266 const char *ModuleName
,
1271 ACPI_DBG_DEPENDENT_RETURN_VOID (
1274 ACPI_TRACE_EVENT_TYPE Type
,
1280 AcpiInitializeDebugger (
1284 AcpiTerminateDebugger (
1292 AcpiSetDebuggerThreadId (
1293 ACPI_THREAD_ID ThreadId
);
1295 #endif /* __ACXFACE_H__ */