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 0x20170119
51 #include <contrib/dev/acpica/include/acconfig.h>
52 #include <contrib/dev/acpica/include/actypes.h>
53 #include <contrib/dev/acpica/include/actbl.h>
54 #include <contrib/dev/acpica/include/acbuffer.h>
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 verify the table checksum before installation. Set
166 * this to TRUE to verify the table checksum before install it to the table
167 * manager. Note that enabling this option causes errors to happen in some
168 * OSPMs during early initialization stages. Default behavior is to do such
171 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_VerifyTableChecksum, TRUE);
174 * Optionally enable output from the AML Debug Object.
176 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableAmlDebugObject, FALSE);
179 * Optionally copy the entire DSDT to local memory (instead of simply
180 * mapping it.) There are some BIOSs that corrupt or replace the original
181 * DSDT, creating the need for this option. Default is FALSE, do not copy
184 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CopyDsdtLocally, FALSE);
187 * Optionally ignore an XSDT if present and use the RSDT instead.
188 * Although the ACPI specification requires that an XSDT be used instead
189 * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
190 * some machines. Default behavior is to use the XSDT if present.
192 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE);
195 * Optionally support group module level code.
197 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_GroupModuleLevelCode, FALSE);
200 * Optionally support module level code by parsing the entire table as
201 * a TermList. Default is FALSE, do not execute entire table until some
202 * lock order issues are fixed.
204 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_ParseTableAsTermList, FALSE);
207 * Optionally use 32-bit FADT addresses if and when there is a conflict
208 * (address mismatch) between the 32-bit and 64-bit versions of the
209 * address. Although ACPICA adheres to the ACPI specification which
210 * requires the use of the corresponding 64-bit address if it is non-zero,
211 * some machines have been found to have a corrupted non-zero 64-bit
212 * address. Default is FALSE, do not favor the 32-bit addresses.
214 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE);
217 * Optionally use 32-bit FACS table addresses.
218 * It is reported that some platforms fail to resume from system suspending
219 * if 64-bit FACS table address is selected:
220 * https://bugzilla.kernel.org/show_bug.cgi?id=74021
221 * Default is TRUE, favor the 32-bit addresses.
223 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFacsAddresses, TRUE);
226 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
227 * with other ACPI implementations. NOTE: During ACPICA initialization,
228 * this value is set to TRUE if any Windows OSI strings have been
229 * requested by the BIOS.
231 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE);
234 * Disable runtime checking and repair of values returned by control methods.
235 * Use only if the repair is causing a problem on a particular machine.
237 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE);
240 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
241 * This can be useful for debugging ACPI problems on some machines.
243 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE);
246 * Optionally enable runtime namespace override.
248 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_RuntimeNamespaceOverride, TRUE);
251 * We keep track of the latest version of Windows that has been requested by
252 * the BIOS. ACPI 5.0.
254 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0);
257 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
258 * that the ACPI hardware is no longer required. A flag in the FADT indicates
259 * a reduced HW machine, and that flag is duplicated here for convenience.
261 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE);
264 * Maximum number of While() loop iterations before forced method abort.
265 * This mechanism is intended to prevent infinite loops during interpreter
266 * execution within a host kernel.
268 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_MaxLoopIterations, ACPI_MAX_LOOP_COUNT);
271 * This mechanism is used to trace a specified AML method. The method is
272 * traced each time it is executed.
274 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceFlags, 0);
275 ACPI_INIT_GLOBAL (const char *, AcpiGbl_TraceMethodName, NULL);
276 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLevel, ACPI_TRACE_LEVEL_DEFAULT);
277 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLayer, ACPI_TRACE_LAYER_DEFAULT);
280 * Runtime configuration of debug output control masks. We want the debug
281 * switches statically initialized so they are already set when the debugger
284 #ifdef ACPI_DEBUG_OUTPUT
285 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_DEBUG_DEFAULT);
287 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_NORMAL_DEFAULT);
289 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT);
291 /* Optionally enable timer output with Debug Object output */
293 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisplayDebugTimer, FALSE);
296 * Debugger command handshake globals. Host OSes need to access these
297 * variables to implement their own command handshake mechanism.
300 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_MethodExecuting, FALSE);
301 ACPI_GLOBAL (char, AcpiGbl_DbLineBuf[ACPI_DB_LINE_BUFFER_SIZE]);
305 * Other miscellaneous globals
307 ACPI_GLOBAL (ACPI_TABLE_FADT, AcpiGbl_FADT);
308 ACPI_GLOBAL (UINT32, AcpiCurrentGpeCount);
309 ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning);
312 /*****************************************************************************
314 * ACPICA public interface configuration.
316 * Interfaces that are configured out of the ACPICA build are replaced
317 * by inlined stubs by default.
319 ****************************************************************************/
322 * Hardware-reduced prototypes (default: Not hardware reduced).
324 * All ACPICA hardware-related interfaces that use these macros will be
325 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
328 * Note: This static build option for reduced hardware is intended to
329 * reduce ACPICA code size if desired or necessary. However, even if this
330 * option is not specified, the runtime behavior of ACPICA is dependent
331 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
332 * the flag will enable similar behavior -- ACPICA will not attempt
333 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
335 #if (!ACPI_REDUCED_HARDWARE)
336 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
337 ACPI_EXTERNAL_RETURN_STATUS(Prototype)
339 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
340 ACPI_EXTERNAL_RETURN_OK(Prototype)
342 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
343 ACPI_EXTERNAL_RETURN_VOID(Prototype)
346 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
347 static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
349 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
350 static ACPI_INLINE Prototype {return(AE_OK);}
352 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
353 static ACPI_INLINE Prototype {return;}
355 #endif /* !ACPI_REDUCED_HARDWARE */
359 * Error message prototypes (default: error messages enabled).
361 * All interfaces related to error and warning messages
362 * will be configured out of the ACPICA build if the
363 * ACPI_NO_ERROR_MESSAGE flag is defined.
365 #ifndef ACPI_NO_ERROR_MESSAGES
366 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
370 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
371 static ACPI_INLINE Prototype {return;}
373 #endif /* ACPI_NO_ERROR_MESSAGES */
377 * Debugging output prototypes (default: no debug output).
379 * All interfaces related to debug output messages
380 * will be configured out of the ACPICA build unless the
381 * ACPI_DEBUG_OUTPUT flag is defined.
383 #ifdef ACPI_DEBUG_OUTPUT
384 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
388 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
389 static ACPI_INLINE Prototype {return;}
391 #endif /* ACPI_DEBUG_OUTPUT */
395 * Application prototypes
397 * All interfaces used by application will be configured
398 * out of the ACPICA build unless the ACPI_APPLICATION
401 #ifdef ACPI_APPLICATION
402 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
406 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
407 static ACPI_INLINE Prototype {return;}
409 #endif /* ACPI_APPLICATION */
413 * Debugger prototypes
415 * All interfaces used by debugger will be configured
416 * out of the ACPICA build unless the ACPI_DEBUGGER
420 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
421 ACPI_EXTERNAL_RETURN_OK(Prototype)
423 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
424 ACPI_EXTERNAL_RETURN_VOID(Prototype)
427 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
428 static ACPI_INLINE Prototype {return(AE_OK);}
430 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
431 static ACPI_INLINE Prototype {return;}
433 #endif /* ACPI_DEBUGGER */
436 /*****************************************************************************
438 * ACPICA public interface prototypes
440 ****************************************************************************/
445 ACPI_EXTERNAL_RETURN_STATUS (
446 ACPI_STATUS ACPI_INIT_FUNCTION
447 AcpiInitializeTables (
448 ACPI_TABLE_DESC *InitialStorage,
449 UINT32 InitialTableCount,
450 BOOLEAN AllowResize))
452 ACPI_EXTERNAL_RETURN_STATUS (
453 ACPI_STATUS ACPI_INIT_FUNCTION
454 AcpiInitializeSubsystem (
457 ACPI_EXTERNAL_RETURN_STATUS (
458 ACPI_STATUS ACPI_INIT_FUNCTION
459 AcpiEnableSubsystem (
462 ACPI_EXTERNAL_RETURN_STATUS (
463 ACPI_STATUS ACPI_INIT_FUNCTION
464 AcpiInitializeObjects (
467 ACPI_EXTERNAL_RETURN_STATUS (
468 ACPI_STATUS ACPI_INIT_FUNCTION
474 * Miscellaneous global interfaces
476 ACPI_HW_DEPENDENT_RETURN_STATUS (
481 ACPI_HW_DEPENDENT_RETURN_STATUS (
486 ACPI_EXTERNAL_RETURN_STATUS (
488 AcpiSubsystemStatus (
491 ACPI_EXTERNAL_RETURN_STATUS (
494 ACPI_BUFFER *RetBuffer))
496 ACPI_EXTERNAL_RETURN_STATUS (
499 ACPI_STATISTICS *Stats))
501 ACPI_EXTERNAL_RETURN_PTR (
503 AcpiFormatException (
504 ACPI_STATUS Exception))
506 ACPI_EXTERNAL_RETURN_STATUS (
508 AcpiPurgeCachedObjects (
511 ACPI_EXTERNAL_RETURN_STATUS (
513 AcpiInstallInterface (
514 ACPI_STRING InterfaceName))
516 ACPI_EXTERNAL_RETURN_STATUS (
518 AcpiRemoveInterface (
519 ACPI_STRING InterfaceName))
521 ACPI_EXTERNAL_RETURN_STATUS (
523 AcpiUpdateInterfaces (
526 ACPI_EXTERNAL_RETURN_UINT32 (
528 AcpiCheckAddressRange (
529 ACPI_ADR_SPACE_TYPE SpaceId,
530 ACPI_PHYSICAL_ADDRESS Address,
534 ACPI_EXTERNAL_RETURN_STATUS (
536 AcpiDecodePldBuffer (
539 ACPI_PLD_INFO **ReturnBuffer))
543 * ACPI table load/unload interfaces
545 ACPI_EXTERNAL_RETURN_STATUS (
546 ACPI_STATUS ACPI_INIT_FUNCTION
548 ACPI_PHYSICAL_ADDRESS Address,
551 ACPI_EXTERNAL_RETURN_STATUS (
554 ACPI_TABLE_HEADER *Table))
556 ACPI_EXTERNAL_RETURN_STATUS (
558 AcpiUnloadParentTable (
561 ACPI_EXTERNAL_RETURN_STATUS (
562 ACPI_STATUS ACPI_INIT_FUNCTION
568 * ACPI table manipulation interfaces
570 ACPI_EXTERNAL_RETURN_STATUS (
571 ACPI_STATUS ACPI_INIT_FUNCTION
572 AcpiReallocateRootTable (
575 ACPI_EXTERNAL_RETURN_STATUS (
576 ACPI_STATUS ACPI_INIT_FUNCTION
577 AcpiFindRootPointer (
578 ACPI_PHYSICAL_ADDRESS *RsdpAddress))
580 ACPI_EXTERNAL_RETURN_STATUS (
583 ACPI_STRING Signature,
585 ACPI_TABLE_HEADER *OutTableHeader))
587 ACPI_EXTERNAL_RETURN_STATUS (
590 ACPI_STRING Signature,
592 ACPI_TABLE_HEADER **OutTable))
594 ACPI_EXTERNAL_RETURN_VOID (
597 ACPI_TABLE_HEADER *Table))
599 ACPI_EXTERNAL_RETURN_STATUS (
601 AcpiGetTableByIndex (
603 ACPI_TABLE_HEADER **OutTable))
605 ACPI_EXTERNAL_RETURN_STATUS (
607 AcpiInstallTableHandler (
608 ACPI_TABLE_HANDLER Handler,
611 ACPI_EXTERNAL_RETURN_STATUS (
613 AcpiRemoveTableHandler (
614 ACPI_TABLE_HANDLER Handler))
618 * Namespace and name interfaces
620 ACPI_EXTERNAL_RETURN_STATUS (
623 ACPI_OBJECT_TYPE Type,
624 ACPI_HANDLE StartObject,
626 ACPI_WALK_CALLBACK DescendingCallback,
627 ACPI_WALK_CALLBACK AscendingCallback,
631 ACPI_EXTERNAL_RETURN_STATUS (
635 ACPI_WALK_CALLBACK UserFunction,
639 ACPI_EXTERNAL_RETURN_STATUS (
644 ACPI_BUFFER *RetPathPtr))
646 ACPI_EXTERNAL_RETURN_STATUS (
650 ACPI_STRING Pathname,
651 ACPI_HANDLE *RetHandle))
653 ACPI_EXTERNAL_RETURN_STATUS (
657 ACPI_OBJECT_HANDLER Handler,
660 ACPI_EXTERNAL_RETURN_STATUS (
664 ACPI_OBJECT_HANDLER Handler))
666 ACPI_EXTERNAL_RETURN_STATUS (
670 ACPI_OBJECT_HANDLER Handler,
673 ACPI_EXTERNAL_RETURN_STATUS (
677 ACPI_OBJECT_HANDLER Handler,
679 void (*Callback)(void *)))
681 ACPI_EXTERNAL_RETURN_STATUS (
691 * Object manipulation and enumeration
693 ACPI_EXTERNAL_RETURN_STATUS (
697 ACPI_STRING Pathname,
698 ACPI_OBJECT_LIST *ParameterObjects,
699 ACPI_BUFFER *ReturnObjectBuffer))
701 ACPI_EXTERNAL_RETURN_STATUS (
703 AcpiEvaluateObjectTyped (
705 ACPI_STRING Pathname,
706 ACPI_OBJECT_LIST *ExternalParams,
707 ACPI_BUFFER *ReturnBuffer,
708 ACPI_OBJECT_TYPE ReturnType))
710 ACPI_EXTERNAL_RETURN_STATUS (
714 ACPI_DEVICE_INFO **ReturnBuffer))
716 ACPI_EXTERNAL_RETURN_STATUS (
721 ACPI_EXTERNAL_RETURN_STATUS (
724 ACPI_OBJECT_TYPE Type,
727 ACPI_HANDLE *OutHandle))
729 ACPI_EXTERNAL_RETURN_STATUS (
733 ACPI_OBJECT_TYPE *OutType))
735 ACPI_EXTERNAL_RETURN_STATUS (
739 ACPI_HANDLE *OutHandle))
745 ACPI_EXTERNAL_RETURN_STATUS (
747 AcpiInstallInitializationHandler (
748 ACPI_INIT_HANDLER Handler,
751 ACPI_HW_DEPENDENT_RETURN_STATUS (
753 AcpiInstallSciHandler (
754 ACPI_SCI_HANDLER Address,
757 ACPI_HW_DEPENDENT_RETURN_STATUS (
759 AcpiRemoveSciHandler (
760 ACPI_SCI_HANDLER Address))
762 ACPI_HW_DEPENDENT_RETURN_STATUS (
764 AcpiInstallGlobalEventHandler (
765 ACPI_GBL_EVENT_HANDLER Handler,
768 ACPI_HW_DEPENDENT_RETURN_STATUS (
770 AcpiInstallFixedEventHandler (
772 ACPI_EVENT_HANDLER Handler,
775 ACPI_HW_DEPENDENT_RETURN_STATUS (
777 AcpiRemoveFixedEventHandler (
779 ACPI_EVENT_HANDLER Handler))
781 ACPI_HW_DEPENDENT_RETURN_STATUS (
783 AcpiInstallGpeHandler (
784 ACPI_HANDLE GpeDevice,
787 ACPI_GPE_HANDLER Address,
790 ACPI_HW_DEPENDENT_RETURN_STATUS (
792 AcpiInstallGpeRawHandler (
793 ACPI_HANDLE GpeDevice,
796 ACPI_GPE_HANDLER Address,
799 ACPI_HW_DEPENDENT_RETURN_STATUS (
801 AcpiRemoveGpeHandler (
802 ACPI_HANDLE GpeDevice,
804 ACPI_GPE_HANDLER Address))
806 ACPI_EXTERNAL_RETURN_STATUS (
808 AcpiInstallNotifyHandler (
811 ACPI_NOTIFY_HANDLER Handler,
814 ACPI_EXTERNAL_RETURN_STATUS (
816 AcpiRemoveNotifyHandler (
819 ACPI_NOTIFY_HANDLER Handler))
821 ACPI_EXTERNAL_RETURN_STATUS (
823 AcpiInstallAddressSpaceHandler (
825 ACPI_ADR_SPACE_TYPE SpaceId,
826 ACPI_ADR_SPACE_HANDLER Handler,
827 ACPI_ADR_SPACE_SETUP Setup,
830 ACPI_EXTERNAL_RETURN_STATUS (
832 AcpiRemoveAddressSpaceHandler (
834 ACPI_ADR_SPACE_TYPE SpaceId,
835 ACPI_ADR_SPACE_HANDLER Handler))
837 ACPI_EXTERNAL_RETURN_STATUS (
839 AcpiInstallExceptionHandler (
840 ACPI_EXCEPTION_HANDLER Handler))
842 ACPI_EXTERNAL_RETURN_STATUS (
844 AcpiInstallInterfaceHandler (
845 ACPI_INTERFACE_HANDLER Handler))
849 * Global Lock interfaces
851 ACPI_HW_DEPENDENT_RETURN_STATUS (
853 AcpiAcquireGlobalLock (
857 ACPI_HW_DEPENDENT_RETURN_STATUS (
859 AcpiReleaseGlobalLock (
864 * Interfaces to AML mutex objects
866 ACPI_EXTERNAL_RETURN_STATUS (
870 ACPI_STRING Pathname,
873 ACPI_EXTERNAL_RETURN_STATUS (
877 ACPI_STRING Pathname))
881 * Fixed Event interfaces
883 ACPI_HW_DEPENDENT_RETURN_STATUS (
889 ACPI_HW_DEPENDENT_RETURN_STATUS (
895 ACPI_HW_DEPENDENT_RETURN_STATUS (
900 ACPI_HW_DEPENDENT_RETURN_STATUS (
904 ACPI_EVENT_STATUS *EventStatus))
908 * General Purpose Event (GPE) Interfaces
910 ACPI_HW_DEPENDENT_RETURN_STATUS (
915 ACPI_HW_DEPENDENT_RETURN_STATUS (
918 ACPI_HANDLE GpeDevice,
921 ACPI_HW_DEPENDENT_RETURN_STATUS (
924 ACPI_HANDLE GpeDevice,
927 ACPI_HW_DEPENDENT_RETURN_STATUS (
930 ACPI_HANDLE GpeDevice,
933 ACPI_HW_DEPENDENT_RETURN_STATUS (
936 ACPI_HANDLE GpeDevice,
940 ACPI_HW_DEPENDENT_RETURN_STATUS (
943 ACPI_HANDLE GpeDevice,
946 ACPI_HW_DEPENDENT_RETURN_STATUS (
949 ACPI_HANDLE GpeDevice,
953 ACPI_HW_DEPENDENT_RETURN_STATUS (
956 ACPI_HANDLE GpeDevice,
959 ACPI_HW_DEPENDENT_RETURN_STATUS (
961 AcpiSetupGpeForWake (
962 ACPI_HANDLE ParentDevice,
963 ACPI_HANDLE GpeDevice,
966 ACPI_HW_DEPENDENT_RETURN_STATUS (
969 ACPI_HANDLE GpeDevice,
973 ACPI_HW_DEPENDENT_RETURN_STATUS (
976 ACPI_HANDLE GpeDevice,
978 ACPI_EVENT_STATUS *EventStatus))
980 ACPI_HW_DEPENDENT_RETURN_STATUS (
985 ACPI_HW_DEPENDENT_RETURN_STATUS (
987 AcpiEnableAllRuntimeGpes (
990 ACPI_HW_DEPENDENT_RETURN_STATUS (
992 AcpiEnableAllWakeupGpes (
995 ACPI_HW_DEPENDENT_RETURN_STATUS (
999 ACPI_HANDLE *GpeDevice))
1001 ACPI_HW_DEPENDENT_RETURN_STATUS (
1003 AcpiInstallGpeBlock (
1004 ACPI_HANDLE GpeDevice,
1005 ACPI_GENERIC_ADDRESS *GpeBlockAddress,
1006 UINT32 RegisterCount,
1007 UINT32 InterruptNumber))
1009 ACPI_HW_DEPENDENT_RETURN_STATUS (
1011 AcpiRemoveGpeBlock (
1012 ACPI_HANDLE GpeDevice))
1016 * Resource interfaces
1019 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
1020 ACPI_RESOURCE *Resource,
1023 ACPI_EXTERNAL_RETURN_STATUS (
1025 AcpiGetVendorResource (
1028 ACPI_VENDOR_UUID *Uuid,
1029 ACPI_BUFFER *RetBuffer))
1031 ACPI_EXTERNAL_RETURN_STATUS (
1033 AcpiGetCurrentResources (
1035 ACPI_BUFFER *RetBuffer))
1037 ACPI_EXTERNAL_RETURN_STATUS (
1039 AcpiGetPossibleResources (
1041 ACPI_BUFFER *RetBuffer))
1043 ACPI_EXTERNAL_RETURN_STATUS (
1045 AcpiGetEventResources (
1046 ACPI_HANDLE DeviceHandle,
1047 ACPI_BUFFER *RetBuffer))
1049 ACPI_EXTERNAL_RETURN_STATUS (
1051 AcpiWalkResourceBuffer (
1052 ACPI_BUFFER *Buffer,
1053 ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1056 ACPI_EXTERNAL_RETURN_STATUS (
1061 ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1064 ACPI_EXTERNAL_RETURN_STATUS (
1066 AcpiSetCurrentResources (
1068 ACPI_BUFFER *InBuffer))
1070 ACPI_EXTERNAL_RETURN_STATUS (
1072 AcpiGetIrqRoutingTable (
1074 ACPI_BUFFER *RetBuffer))
1076 ACPI_EXTERNAL_RETURN_STATUS (
1078 AcpiResourceToAddress64 (
1079 ACPI_RESOURCE *Resource,
1080 ACPI_RESOURCE_ADDRESS64 *Out))
1082 ACPI_EXTERNAL_RETURN_STATUS (
1084 AcpiBufferToResource (
1086 UINT16 AmlBufferLength,
1087 ACPI_RESOURCE **ResourcePtr))
1091 * Hardware (ACPI device) interfaces
1093 ACPI_EXTERNAL_RETURN_STATUS (
1098 ACPI_EXTERNAL_RETURN_STATUS (
1102 ACPI_GENERIC_ADDRESS *Reg))
1104 ACPI_EXTERNAL_RETURN_STATUS (
1108 ACPI_GENERIC_ADDRESS *Reg))
1110 ACPI_HW_DEPENDENT_RETURN_STATUS (
1112 AcpiReadBitRegister (
1114 UINT32 *ReturnValue))
1116 ACPI_HW_DEPENDENT_RETURN_STATUS (
1118 AcpiWriteBitRegister (
1124 * Sleep/Wake interfaces
1126 ACPI_EXTERNAL_RETURN_STATUS (
1128 AcpiGetSleepTypeData (
1133 ACPI_EXTERNAL_RETURN_STATUS (
1135 AcpiEnterSleepStatePrep (
1138 ACPI_EXTERNAL_RETURN_STATUS (
1140 AcpiEnterSleepState (
1143 ACPI_HW_DEPENDENT_RETURN_STATUS (
1145 AcpiEnterSleepStateS4bios (
1148 ACPI_EXTERNAL_RETURN_STATUS (
1150 AcpiLeaveSleepStatePrep (
1153 ACPI_EXTERNAL_RETURN_STATUS (
1155 AcpiLeaveSleepState (
1158 ACPI_HW_DEPENDENT_RETURN_STATUS (
1160 AcpiSetFirmwareWakingVector (
1161 ACPI_PHYSICAL_ADDRESS PhysicalAddress,
1162 ACPI_PHYSICAL_ADDRESS PhysicalAddress64))
1166 * ACPI Timer interfaces
1168 ACPI_HW_DEPENDENT_RETURN_STATUS (
1170 AcpiGetTimerResolution (
1171 UINT32 *Resolution))
1173 ACPI_HW_DEPENDENT_RETURN_STATUS (
1178 ACPI_HW_DEPENDENT_RETURN_STATUS (
1180 AcpiGetTimerDuration (
1183 UINT32 *TimeElapsed))
1187 * Error/Warning output
1189 ACPI_MSG_DEPENDENT_RETURN_VOID (
1191 void ACPI_INTERNAL_VAR_XFACE
1193 const char *ModuleName,
1198 ACPI_MSG_DEPENDENT_RETURN_VOID (
1200 void ACPI_INTERNAL_VAR_XFACE
1202 const char *ModuleName,
1208 ACPI_MSG_DEPENDENT_RETURN_VOID (
1210 void ACPI_INTERNAL_VAR_XFACE
1212 const char *ModuleName,
1217 ACPI_MSG_DEPENDENT_RETURN_VOID (
1219 void ACPI_INTERNAL_VAR_XFACE
1224 ACPI_MSG_DEPENDENT_RETURN_VOID (
1226 void ACPI_INTERNAL_VAR_XFACE
1228 const char *ModuleName,
1233 ACPI_MSG_DEPENDENT_RETURN_VOID (
1235 void ACPI_INTERNAL_VAR_XFACE
1237 const char *ModuleName,
1246 ACPI_DBG_DEPENDENT_RETURN_VOID (
1248 void ACPI_INTERNAL_VAR_XFACE
1250 UINT32 RequestedDebugLevel,
1252 const char *FunctionName,
1253 const char *ModuleName,
1258 ACPI_DBG_DEPENDENT_RETURN_VOID (
1260 void ACPI_INTERNAL_VAR_XFACE
1262 UINT32 RequestedDebugLevel,
1264 const char *FunctionName,
1265 const char *ModuleName,
1270 ACPI_DBG_DEPENDENT_RETURN_VOID (
1273 ACPI_TRACE_EVENT_TYPE Type,
1279 AcpiInitializeDebugger (
1283 AcpiTerminateDebugger (
1291 AcpiSetDebuggerThreadId (
1292 ACPI_THREAD_ID ThreadId);
1294 #endif /* __ACXFACE_H__ */