dmake: do not set MAKEFLAGS=k
[unleashed/tickless.git] / arch / x86 / include / sys / acpi / acpixf.h
blobe3382c655ffa7dcd3045fa8816d2764973728103
1 /******************************************************************************
3 * Name: acpixf.h - External interfaces to the ACPI subsystem
5 *****************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2016, Intel Corp.
9 * All rights reserved.
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
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.
30 * NO WARRANTY
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.
44 #ifndef __ACXFACE_H__
45 #define __ACXFACE_H__
47 /* Current ACPICA subsystem version in YYYYMMDD format */
49 #define ACPI_CA_VERSION 0x20160527
51 #include "acconfig.h"
52 #include "actypes.h"
53 #include "actbl.h"
54 #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) \
71 extern type name; \
72 type name
74 #define ACPI_INIT_GLOBAL(type,name,value) \
75 type name=value
77 #else
78 #ifndef ACPI_GLOBAL
79 #define ACPI_GLOBAL(type,name) \
80 extern type name
81 #endif
83 #ifndef ACPI_INIT_GLOBAL
84 #define ACPI_INIT_GLOBAL(type,name,value) \
85 extern type name
86 #endif
87 #endif
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) \
96 Prototype;
97 #endif
99 #ifndef ACPI_EXTERNAL_RETURN_OK
100 #define ACPI_EXTERNAL_RETURN_OK(Prototype) \
101 Prototype;
102 #endif
104 #ifndef ACPI_EXTERNAL_RETURN_VOID
105 #define ACPI_EXTERNAL_RETURN_VOID(Prototype) \
106 Prototype;
107 #endif
109 #ifndef ACPI_EXTERNAL_RETURN_UINT32
110 #define ACPI_EXTERNAL_RETURN_UINT32(Prototype) \
111 Prototype;
112 #endif
114 #ifndef ACPI_EXTERNAL_RETURN_PTR
115 #define ACPI_EXTERNAL_RETURN_PTR(Prototype) \
116 Prototype;
117 #endif
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
169 * verification.
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
182 * the DSDT.
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 use 32-bit FADT addresses if and when there is a conflict
201 * (address mismatch) between the 32-bit and 64-bit versions of the
202 * address. Although ACPICA adheres to the ACPI specification which
203 * requires the use of the corresponding 64-bit address if it is non-zero,
204 * some machines have been found to have a corrupted non-zero 64-bit
205 * address. Default is FALSE, do not favor the 32-bit addresses.
207 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE);
210 * Optionally use 32-bit FACS table addresses.
211 * It is reported that some platforms fail to resume from system suspending
212 * if 64-bit FACS table address is selected:
213 * https://bugzilla.kernel.org/show_bug.cgi?id=74021
214 * Default is TRUE, favor the 32-bit addresses.
216 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFacsAddresses, TRUE);
219 * Optionally truncate I/O addresses to 16 bits. Provides compatibility
220 * with other ACPI implementations. NOTE: During ACPICA initialization,
221 * this value is set to TRUE if any Windows OSI strings have been
222 * requested by the BIOS.
224 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE);
227 * Disable runtime checking and repair of values returned by control methods.
228 * Use only if the repair is causing a problem on a particular machine.
230 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE);
233 * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
234 * This can be useful for debugging ACPI problems on some machines.
236 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE);
239 * Optionally enable runtime namespace override.
241 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_RuntimeNamespaceOverride, TRUE);
244 * We keep track of the latest version of Windows that has been requested by
245 * the BIOS. ACPI 5.0.
247 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_OsiData, 0);
250 * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
251 * that the ACPI hardware is no longer required. A flag in the FADT indicates
252 * a reduced HW machine, and that flag is duplicated here for convenience.
254 ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE);
257 * This mechanism is used to trace a specified AML method. The method is
258 * traced each time it is executed.
260 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceFlags, 0);
261 ACPI_INIT_GLOBAL (const char *, AcpiGbl_TraceMethodName, NULL);
262 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLevel, ACPI_TRACE_LEVEL_DEFAULT);
263 ACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLayer, ACPI_TRACE_LAYER_DEFAULT);
266 * Runtime configuration of debug output control masks. We want the debug
267 * switches statically initialized so they are already set when the debugger
268 * is entered.
270 #ifdef ACPI_DEBUG_OUTPUT
271 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_DEBUG_DEFAULT);
272 #else
273 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_NORMAL_DEFAULT);
274 #endif
275 ACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT);
277 /* Optionally enable timer output with Debug Object output */
279 ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisplayDebugTimer, FALSE);
282 * Other miscellaneous globals
284 ACPI_GLOBAL (ACPI_TABLE_FADT, AcpiGbl_FADT);
285 ACPI_GLOBAL (UINT32, AcpiCurrentGpeCount);
286 ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning);
289 /*****************************************************************************
291 * ACPICA public interface configuration.
293 * Interfaces that are configured out of the ACPICA build are replaced
294 * by inlined stubs by default.
296 ****************************************************************************/
299 * Hardware-reduced prototypes (default: Not hardware reduced).
301 * All ACPICA hardware-related interfaces that use these macros will be
302 * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
303 * is set to TRUE.
305 * Note: This static build option for reduced hardware is intended to
306 * reduce ACPICA code size if desired or necessary. However, even if this
307 * option is not specified, the runtime behavior of ACPICA is dependent
308 * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
309 * the flag will enable similar behavior -- ACPICA will not attempt
310 * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
312 #if (!ACPI_REDUCED_HARDWARE)
313 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
314 ACPI_EXTERNAL_RETURN_STATUS(Prototype)
316 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
317 ACPI_EXTERNAL_RETURN_OK(Prototype)
319 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
320 ACPI_EXTERNAL_RETURN_VOID(Prototype)
322 #else
323 #define ACPI_HW_DEPENDENT_RETURN_STATUS(Prototype) \
324 static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
326 #define ACPI_HW_DEPENDENT_RETURN_OK(Prototype) \
327 static ACPI_INLINE Prototype {return(AE_OK);}
329 #define ACPI_HW_DEPENDENT_RETURN_VOID(Prototype) \
330 static ACPI_INLINE Prototype {return;}
332 #endif /* !ACPI_REDUCED_HARDWARE */
336 * Error message prototypes (default: error messages enabled).
338 * All interfaces related to error and warning messages
339 * will be configured out of the ACPICA build if the
340 * ACPI_NO_ERROR_MESSAGE flag is defined.
342 #ifndef ACPI_NO_ERROR_MESSAGES
343 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
344 Prototype;
346 #else
347 #define ACPI_MSG_DEPENDENT_RETURN_VOID(Prototype) \
348 static ACPI_INLINE Prototype {return;}
350 #endif /* ACPI_NO_ERROR_MESSAGES */
354 * Debugging output prototypes (default: no debug output).
356 * All interfaces related to debug output messages
357 * will be configured out of the ACPICA build unless the
358 * ACPI_DEBUG_OUTPUT flag is defined.
360 #ifdef ACPI_DEBUG_OUTPUT
361 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype) \
362 Prototype;
364 #else
365 #define ACPI_DBG_DEPENDENT_RETURN_VOID(Prototype)
366 #endif /* ACPI_DEBUG_OUTPUT */
370 * Application prototypes
372 * All interfaces used by application will be configured
373 * out of the ACPICA build unless the ACPI_APPLICATION
374 * flag is defined.
376 #ifdef ACPI_APPLICATION
377 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype) \
378 Prototype;
380 #else
381 #define ACPI_APP_DEPENDENT_RETURN_VOID(Prototype)
382 #endif /* ACPI_APPLICATION */
386 * Debugger prototypes
388 * All interfaces used by debugger will be configured
389 * out of the ACPICA build unless the ACPI_DEBUGGER
390 * flag is defined.
392 #ifdef ACPI_DEBUGGER
393 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
394 ACPI_EXTERNAL_RETURN_OK(Prototype)
396 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
397 ACPI_EXTERNAL_RETURN_VOID(Prototype)
399 #else
400 #define ACPI_DBR_DEPENDENT_RETURN_OK(Prototype) \
401 static ACPI_INLINE Prototype {return(AE_OK);}
403 #define ACPI_DBR_DEPENDENT_RETURN_VOID(Prototype) \
404 static ACPI_INLINE Prototype {return;}
406 #endif /* ACPI_DEBUGGER */
409 /*****************************************************************************
411 * ACPICA public interface prototypes
413 ****************************************************************************/
416 * Initialization
418 ACPI_EXTERNAL_RETURN_STATUS (
419 ACPI_STATUS
420 AcpiInitializeTables (
421 ACPI_TABLE_DESC *InitialStorage,
422 UINT32 InitialTableCount,
423 BOOLEAN AllowResize))
425 ACPI_EXTERNAL_RETURN_STATUS (
426 ACPI_STATUS
427 AcpiInitializeSubsystem (
428 void))
430 ACPI_EXTERNAL_RETURN_STATUS (
431 ACPI_STATUS
432 AcpiEnableSubsystem (
433 UINT32 Flags))
435 ACPI_EXTERNAL_RETURN_STATUS (
436 ACPI_STATUS
437 AcpiInitializeObjects (
438 UINT32 Flags))
440 ACPI_EXTERNAL_RETURN_STATUS (
441 ACPI_STATUS
442 AcpiTerminate (
443 void))
447 * Miscellaneous global interfaces
449 ACPI_HW_DEPENDENT_RETURN_STATUS (
450 ACPI_STATUS
451 AcpiEnable (
452 void))
454 ACPI_HW_DEPENDENT_RETURN_STATUS (
455 ACPI_STATUS
456 AcpiDisable (
457 void))
459 ACPI_EXTERNAL_RETURN_STATUS (
460 ACPI_STATUS
461 AcpiSubsystemStatus (
462 void))
464 ACPI_EXTERNAL_RETURN_STATUS (
465 ACPI_STATUS
466 AcpiGetSystemInfo (
467 ACPI_BUFFER *RetBuffer))
469 ACPI_EXTERNAL_RETURN_STATUS (
470 ACPI_STATUS
471 AcpiGetStatistics (
472 ACPI_STATISTICS *Stats))
474 ACPI_EXTERNAL_RETURN_PTR (
475 const char *
476 AcpiFormatException (
477 ACPI_STATUS Exception))
479 ACPI_EXTERNAL_RETURN_STATUS (
480 ACPI_STATUS
481 AcpiPurgeCachedObjects (
482 void))
484 ACPI_EXTERNAL_RETURN_STATUS (
485 ACPI_STATUS
486 AcpiInstallInterface (
487 ACPI_STRING InterfaceName))
489 ACPI_EXTERNAL_RETURN_STATUS (
490 ACPI_STATUS
491 AcpiRemoveInterface (
492 ACPI_STRING InterfaceName))
494 ACPI_EXTERNAL_RETURN_STATUS (
495 ACPI_STATUS
496 AcpiUpdateInterfaces (
497 UINT8 Action))
499 ACPI_EXTERNAL_RETURN_UINT32 (
500 UINT32
501 AcpiCheckAddressRange (
502 ACPI_ADR_SPACE_TYPE SpaceId,
503 ACPI_PHYSICAL_ADDRESS Address,
504 ACPI_SIZE Length,
505 BOOLEAN Warn))
507 ACPI_EXTERNAL_RETURN_STATUS (
508 ACPI_STATUS
509 AcpiDecodePldBuffer (
510 UINT8 *InBuffer,
511 ACPI_SIZE Length,
512 ACPI_PLD_INFO **ReturnBuffer))
516 * ACPI table load/unload interfaces
518 ACPI_EXTERNAL_RETURN_STATUS (
519 ACPI_STATUS
520 AcpiInstallTable (
521 ACPI_PHYSICAL_ADDRESS Address,
522 BOOLEAN Physical))
524 ACPI_EXTERNAL_RETURN_STATUS (
525 ACPI_STATUS
526 AcpiLoadTable (
527 ACPI_TABLE_HEADER *Table))
529 ACPI_EXTERNAL_RETURN_STATUS (
530 ACPI_STATUS
531 AcpiUnloadParentTable (
532 ACPI_HANDLE Object))
534 ACPI_EXTERNAL_RETURN_STATUS (
535 ACPI_STATUS
536 AcpiLoadTables (
537 void))
541 * ACPI table manipulation interfaces
543 ACPI_EXTERNAL_RETURN_STATUS (
544 ACPI_STATUS
545 AcpiReallocateRootTable (
546 void))
548 ACPI_EXTERNAL_RETURN_STATUS (
549 ACPI_STATUS
550 AcpiFindRootPointer (
551 ACPI_PHYSICAL_ADDRESS *RsdpAddress))
553 ACPI_EXTERNAL_RETURN_STATUS (
554 ACPI_STATUS
555 AcpiGetTableHeader (
556 ACPI_STRING Signature,
557 UINT32 Instance,
558 ACPI_TABLE_HEADER *OutTableHeader))
560 ACPI_EXTERNAL_RETURN_STATUS (
561 ACPI_STATUS
562 AcpiGetTable (
563 ACPI_STRING Signature,
564 UINT32 Instance,
565 ACPI_TABLE_HEADER **OutTable))
567 ACPI_EXTERNAL_RETURN_STATUS (
568 ACPI_STATUS
569 AcpiGetTableByIndex (
570 UINT32 TableIndex,
571 ACPI_TABLE_HEADER **OutTable))
573 ACPI_EXTERNAL_RETURN_STATUS (
574 ACPI_STATUS
575 AcpiInstallTableHandler (
576 ACPI_TABLE_HANDLER Handler,
577 void *Context))
579 ACPI_EXTERNAL_RETURN_STATUS (
580 ACPI_STATUS
581 AcpiRemoveTableHandler (
582 ACPI_TABLE_HANDLER Handler))
586 * Namespace and name interfaces
588 ACPI_EXTERNAL_RETURN_STATUS (
589 ACPI_STATUS
590 AcpiWalkNamespace (
591 ACPI_OBJECT_TYPE Type,
592 ACPI_HANDLE StartObject,
593 UINT32 MaxDepth,
594 ACPI_WALK_CALLBACK DescendingCallback,
595 ACPI_WALK_CALLBACK AscendingCallback,
596 void *Context,
597 void **ReturnValue))
599 ACPI_EXTERNAL_RETURN_STATUS (
600 ACPI_STATUS
601 AcpiGetDevices (
602 char *HID,
603 ACPI_WALK_CALLBACK UserFunction,
604 void *Context,
605 void **ReturnValue))
607 ACPI_EXTERNAL_RETURN_STATUS (
608 ACPI_STATUS
609 AcpiGetName (
610 ACPI_HANDLE Object,
611 UINT32 NameType,
612 ACPI_BUFFER *RetPathPtr))
614 ACPI_EXTERNAL_RETURN_STATUS (
615 ACPI_STATUS
616 AcpiGetHandle (
617 ACPI_HANDLE Parent,
618 ACPI_STRING Pathname,
619 ACPI_HANDLE *RetHandle))
621 ACPI_EXTERNAL_RETURN_STATUS (
622 ACPI_STATUS
623 AcpiAttachData (
624 ACPI_HANDLE Object,
625 ACPI_OBJECT_HANDLER Handler,
626 void *Data))
628 ACPI_EXTERNAL_RETURN_STATUS (
629 ACPI_STATUS
630 AcpiDetachData (
631 ACPI_HANDLE Object,
632 ACPI_OBJECT_HANDLER Handler))
634 ACPI_EXTERNAL_RETURN_STATUS (
635 ACPI_STATUS
636 AcpiGetData (
637 ACPI_HANDLE Object,
638 ACPI_OBJECT_HANDLER Handler,
639 void **Data))
641 ACPI_EXTERNAL_RETURN_STATUS (
642 ACPI_STATUS
643 AcpiDebugTrace (
644 const char *Name,
645 UINT32 DebugLevel,
646 UINT32 DebugLayer,
647 UINT32 Flags))
651 * Object manipulation and enumeration
653 ACPI_EXTERNAL_RETURN_STATUS (
654 ACPI_STATUS
655 AcpiEvaluateObject (
656 ACPI_HANDLE Object,
657 ACPI_STRING Pathname,
658 ACPI_OBJECT_LIST *ParameterObjects,
659 ACPI_BUFFER *ReturnObjectBuffer))
661 ACPI_EXTERNAL_RETURN_STATUS (
662 ACPI_STATUS
663 AcpiEvaluateObjectTyped (
664 ACPI_HANDLE Object,
665 ACPI_STRING Pathname,
666 ACPI_OBJECT_LIST *ExternalParams,
667 ACPI_BUFFER *ReturnBuffer,
668 ACPI_OBJECT_TYPE ReturnType))
670 ACPI_EXTERNAL_RETURN_STATUS (
671 ACPI_STATUS
672 AcpiGetObjectInfo (
673 ACPI_HANDLE Object,
674 ACPI_DEVICE_INFO **ReturnBuffer))
676 ACPI_EXTERNAL_RETURN_STATUS (
677 ACPI_STATUS
678 AcpiInstallMethod (
679 UINT8 *Buffer))
681 ACPI_EXTERNAL_RETURN_STATUS (
682 ACPI_STATUS
683 AcpiGetNextObject (
684 ACPI_OBJECT_TYPE Type,
685 ACPI_HANDLE Parent,
686 ACPI_HANDLE Child,
687 ACPI_HANDLE *OutHandle))
689 ACPI_EXTERNAL_RETURN_STATUS (
690 ACPI_STATUS
691 AcpiGetType (
692 ACPI_HANDLE Object,
693 ACPI_OBJECT_TYPE *OutType))
695 ACPI_EXTERNAL_RETURN_STATUS (
696 ACPI_STATUS
697 AcpiGetParent (
698 ACPI_HANDLE Object,
699 ACPI_HANDLE *OutHandle))
703 * Handler interfaces
705 ACPI_EXTERNAL_RETURN_STATUS (
706 ACPI_STATUS
707 AcpiInstallInitializationHandler (
708 ACPI_INIT_HANDLER Handler,
709 UINT32 Function))
711 ACPI_HW_DEPENDENT_RETURN_STATUS (
712 ACPI_STATUS
713 AcpiInstallSciHandler (
714 ACPI_SCI_HANDLER Address,
715 void *Context))
717 ACPI_HW_DEPENDENT_RETURN_STATUS (
718 ACPI_STATUS
719 AcpiRemoveSciHandler (
720 ACPI_SCI_HANDLER Address))
722 ACPI_HW_DEPENDENT_RETURN_STATUS (
723 ACPI_STATUS
724 AcpiInstallGlobalEventHandler (
725 ACPI_GBL_EVENT_HANDLER Handler,
726 void *Context))
728 ACPI_HW_DEPENDENT_RETURN_STATUS (
729 ACPI_STATUS
730 AcpiInstallFixedEventHandler (
731 UINT32 AcpiEvent,
732 ACPI_EVENT_HANDLER Handler,
733 void *Context))
735 ACPI_HW_DEPENDENT_RETURN_STATUS (
736 ACPI_STATUS
737 AcpiRemoveFixedEventHandler (
738 UINT32 AcpiEvent,
739 ACPI_EVENT_HANDLER Handler))
741 ACPI_HW_DEPENDENT_RETURN_STATUS (
742 ACPI_STATUS
743 AcpiInstallGpeHandler (
744 ACPI_HANDLE GpeDevice,
745 UINT32 GpeNumber,
746 UINT32 Type,
747 ACPI_GPE_HANDLER Address,
748 void *Context))
750 ACPI_HW_DEPENDENT_RETURN_STATUS (
751 ACPI_STATUS
752 AcpiInstallGpeRawHandler (
753 ACPI_HANDLE GpeDevice,
754 UINT32 GpeNumber,
755 UINT32 Type,
756 ACPI_GPE_HANDLER Address,
757 void *Context))
759 ACPI_HW_DEPENDENT_RETURN_STATUS (
760 ACPI_STATUS
761 AcpiRemoveGpeHandler (
762 ACPI_HANDLE GpeDevice,
763 UINT32 GpeNumber,
764 ACPI_GPE_HANDLER Address))
766 ACPI_EXTERNAL_RETURN_STATUS (
767 ACPI_STATUS
768 AcpiInstallNotifyHandler (
769 ACPI_HANDLE Device,
770 UINT32 HandlerType,
771 ACPI_NOTIFY_HANDLER Handler,
772 void *Context))
774 ACPI_EXTERNAL_RETURN_STATUS (
775 ACPI_STATUS
776 AcpiRemoveNotifyHandler (
777 ACPI_HANDLE Device,
778 UINT32 HandlerType,
779 ACPI_NOTIFY_HANDLER Handler))
781 ACPI_EXTERNAL_RETURN_STATUS (
782 ACPI_STATUS
783 AcpiInstallAddressSpaceHandler (
784 ACPI_HANDLE Device,
785 ACPI_ADR_SPACE_TYPE SpaceId,
786 ACPI_ADR_SPACE_HANDLER Handler,
787 ACPI_ADR_SPACE_SETUP Setup,
788 void *Context))
790 ACPI_EXTERNAL_RETURN_STATUS (
791 ACPI_STATUS
792 AcpiRemoveAddressSpaceHandler (
793 ACPI_HANDLE Device,
794 ACPI_ADR_SPACE_TYPE SpaceId,
795 ACPI_ADR_SPACE_HANDLER Handler))
797 ACPI_EXTERNAL_RETURN_STATUS (
798 ACPI_STATUS
799 AcpiInstallExceptionHandler (
800 ACPI_EXCEPTION_HANDLER Handler))
802 ACPI_EXTERNAL_RETURN_STATUS (
803 ACPI_STATUS
804 AcpiInstallInterfaceHandler (
805 ACPI_INTERFACE_HANDLER Handler))
809 * Global Lock interfaces
811 ACPI_HW_DEPENDENT_RETURN_STATUS (
812 ACPI_STATUS
813 AcpiAcquireGlobalLock (
814 UINT16 Timeout,
815 UINT32 *Handle))
817 ACPI_HW_DEPENDENT_RETURN_STATUS (
818 ACPI_STATUS
819 AcpiReleaseGlobalLock (
820 UINT32 Handle))
824 * Interfaces to AML mutex objects
826 ACPI_EXTERNAL_RETURN_STATUS (
827 ACPI_STATUS
828 AcpiAcquireMutex (
829 ACPI_HANDLE Handle,
830 ACPI_STRING Pathname,
831 UINT16 Timeout))
833 ACPI_EXTERNAL_RETURN_STATUS (
834 ACPI_STATUS
835 AcpiReleaseMutex (
836 ACPI_HANDLE Handle,
837 ACPI_STRING Pathname))
841 * Fixed Event interfaces
843 ACPI_HW_DEPENDENT_RETURN_STATUS (
844 ACPI_STATUS
845 AcpiEnableEvent (
846 UINT32 Event,
847 UINT32 Flags))
849 ACPI_HW_DEPENDENT_RETURN_STATUS (
850 ACPI_STATUS
851 AcpiDisableEvent (
852 UINT32 Event,
853 UINT32 Flags))
855 ACPI_HW_DEPENDENT_RETURN_STATUS (
856 ACPI_STATUS
857 AcpiClearEvent (
858 UINT32 Event))
860 ACPI_HW_DEPENDENT_RETURN_STATUS (
861 ACPI_STATUS
862 AcpiGetEventStatus (
863 UINT32 Event,
864 ACPI_EVENT_STATUS *EventStatus))
868 * General Purpose Event (GPE) Interfaces
870 ACPI_HW_DEPENDENT_RETURN_STATUS (
871 ACPI_STATUS
872 AcpiUpdateAllGpes (
873 void))
875 ACPI_HW_DEPENDENT_RETURN_STATUS (
876 ACPI_STATUS
877 AcpiEnableGpe (
878 ACPI_HANDLE GpeDevice,
879 UINT32 GpeNumber))
881 ACPI_HW_DEPENDENT_RETURN_STATUS (
882 ACPI_STATUS
883 AcpiDisableGpe (
884 ACPI_HANDLE GpeDevice,
885 UINT32 GpeNumber))
887 ACPI_HW_DEPENDENT_RETURN_STATUS (
888 ACPI_STATUS
889 AcpiClearGpe (
890 ACPI_HANDLE GpeDevice,
891 UINT32 GpeNumber))
893 ACPI_HW_DEPENDENT_RETURN_STATUS (
894 ACPI_STATUS
895 AcpiSetGpe (
896 ACPI_HANDLE GpeDevice,
897 UINT32 GpeNumber,
898 UINT8 Action))
900 ACPI_HW_DEPENDENT_RETURN_STATUS (
901 ACPI_STATUS
902 AcpiFinishGpe (
903 ACPI_HANDLE GpeDevice,
904 UINT32 GpeNumber))
906 ACPI_HW_DEPENDENT_RETURN_STATUS (
907 ACPI_STATUS
908 AcpiMarkGpeForWake (
909 ACPI_HANDLE GpeDevice,
910 UINT32 GpeNumber))
912 ACPI_HW_DEPENDENT_RETURN_STATUS (
913 ACPI_STATUS
914 AcpiSetupGpeForWake (
915 ACPI_HANDLE ParentDevice,
916 ACPI_HANDLE GpeDevice,
917 UINT32 GpeNumber))
919 ACPI_HW_DEPENDENT_RETURN_STATUS (
920 ACPI_STATUS
921 AcpiSetGpeWakeMask (
922 ACPI_HANDLE GpeDevice,
923 UINT32 GpeNumber,
924 UINT8 Action))
926 ACPI_HW_DEPENDENT_RETURN_STATUS (
927 ACPI_STATUS
928 AcpiGetGpeStatus (
929 ACPI_HANDLE GpeDevice,
930 UINT32 GpeNumber,
931 ACPI_EVENT_STATUS *EventStatus))
933 ACPI_HW_DEPENDENT_RETURN_STATUS (
934 ACPI_STATUS
935 AcpiDisableAllGpes (
936 void))
938 ACPI_HW_DEPENDENT_RETURN_STATUS (
939 ACPI_STATUS
940 AcpiEnableAllRuntimeGpes (
941 void))
943 ACPI_HW_DEPENDENT_RETURN_STATUS (
944 ACPI_STATUS
945 AcpiEnableAllWakeupGpes (
946 void))
948 ACPI_HW_DEPENDENT_RETURN_STATUS (
949 ACPI_STATUS
950 AcpiGetGpeDevice (
951 UINT32 GpeIndex,
952 ACPI_HANDLE *GpeDevice))
954 ACPI_HW_DEPENDENT_RETURN_STATUS (
955 ACPI_STATUS
956 AcpiInstallGpeBlock (
957 ACPI_HANDLE GpeDevice,
958 ACPI_GENERIC_ADDRESS *GpeBlockAddress,
959 UINT32 RegisterCount,
960 UINT32 InterruptNumber))
962 ACPI_HW_DEPENDENT_RETURN_STATUS (
963 ACPI_STATUS
964 AcpiRemoveGpeBlock (
965 ACPI_HANDLE GpeDevice))
969 * Resource interfaces
971 typedef
972 ACPI_STATUS (*ACPI_WALK_RESOURCE_CALLBACK) (
973 ACPI_RESOURCE *Resource,
974 void *Context);
976 ACPI_EXTERNAL_RETURN_STATUS (
977 ACPI_STATUS
978 AcpiGetVendorResource (
979 ACPI_HANDLE Device,
980 char *Name,
981 ACPI_VENDOR_UUID *Uuid,
982 ACPI_BUFFER *RetBuffer))
984 ACPI_EXTERNAL_RETURN_STATUS (
985 ACPI_STATUS
986 AcpiGetCurrentResources (
987 ACPI_HANDLE Device,
988 ACPI_BUFFER *RetBuffer))
990 ACPI_EXTERNAL_RETURN_STATUS (
991 ACPI_STATUS
992 AcpiGetPossibleResources (
993 ACPI_HANDLE Device,
994 ACPI_BUFFER *RetBuffer))
996 ACPI_EXTERNAL_RETURN_STATUS (
997 ACPI_STATUS
998 AcpiGetEventResources (
999 ACPI_HANDLE DeviceHandle,
1000 ACPI_BUFFER *RetBuffer))
1002 ACPI_EXTERNAL_RETURN_STATUS (
1003 ACPI_STATUS
1004 AcpiWalkResourceBuffer (
1005 ACPI_BUFFER *Buffer,
1006 ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1007 void *Context))
1009 ACPI_EXTERNAL_RETURN_STATUS (
1010 ACPI_STATUS
1011 AcpiWalkResources (
1012 ACPI_HANDLE Device,
1013 char *Name,
1014 ACPI_WALK_RESOURCE_CALLBACK UserFunction,
1015 void *Context))
1017 ACPI_EXTERNAL_RETURN_STATUS (
1018 ACPI_STATUS
1019 AcpiSetCurrentResources (
1020 ACPI_HANDLE Device,
1021 ACPI_BUFFER *InBuffer))
1023 ACPI_EXTERNAL_RETURN_STATUS (
1024 ACPI_STATUS
1025 AcpiGetIrqRoutingTable (
1026 ACPI_HANDLE Device,
1027 ACPI_BUFFER *RetBuffer))
1029 ACPI_EXTERNAL_RETURN_STATUS (
1030 ACPI_STATUS
1031 AcpiResourceToAddress64 (
1032 ACPI_RESOURCE *Resource,
1033 ACPI_RESOURCE_ADDRESS64 *Out))
1035 ACPI_EXTERNAL_RETURN_STATUS (
1036 ACPI_STATUS
1037 AcpiBufferToResource (
1038 UINT8 *AmlBuffer,
1039 UINT16 AmlBufferLength,
1040 ACPI_RESOURCE **ResourcePtr))
1044 * Hardware (ACPI device) interfaces
1046 ACPI_EXTERNAL_RETURN_STATUS (
1047 ACPI_STATUS
1048 AcpiReset (
1049 void))
1051 ACPI_EXTERNAL_RETURN_STATUS (
1052 ACPI_STATUS
1053 AcpiRead (
1054 UINT64 *Value,
1055 ACPI_GENERIC_ADDRESS *Reg))
1057 ACPI_EXTERNAL_RETURN_STATUS (
1058 ACPI_STATUS
1059 AcpiWrite (
1060 UINT64 Value,
1061 ACPI_GENERIC_ADDRESS *Reg))
1063 ACPI_HW_DEPENDENT_RETURN_STATUS (
1064 ACPI_STATUS
1065 AcpiReadBitRegister (
1066 UINT32 RegisterId,
1067 UINT32 *ReturnValue))
1069 ACPI_HW_DEPENDENT_RETURN_STATUS (
1070 ACPI_STATUS
1071 AcpiWriteBitRegister (
1072 UINT32 RegisterId,
1073 UINT32 Value))
1077 * Sleep/Wake interfaces
1079 ACPI_EXTERNAL_RETURN_STATUS (
1080 ACPI_STATUS
1081 AcpiGetSleepTypeData (
1082 UINT8 SleepState,
1083 UINT8 *Slp_TypA,
1084 UINT8 *Slp_TypB))
1086 ACPI_EXTERNAL_RETURN_STATUS (
1087 ACPI_STATUS
1088 AcpiEnterSleepStatePrep (
1089 UINT8 SleepState))
1091 ACPI_EXTERNAL_RETURN_STATUS (
1092 ACPI_STATUS
1093 AcpiEnterSleepState (
1094 UINT8 SleepState))
1096 ACPI_HW_DEPENDENT_RETURN_STATUS (
1097 ACPI_STATUS
1098 AcpiEnterSleepStateS4bios (
1099 void))
1101 ACPI_EXTERNAL_RETURN_STATUS (
1102 ACPI_STATUS
1103 AcpiLeaveSleepStatePrep (
1104 UINT8 SleepState))
1106 ACPI_EXTERNAL_RETURN_STATUS (
1107 ACPI_STATUS
1108 AcpiLeaveSleepState (
1109 UINT8 SleepState))
1111 ACPI_HW_DEPENDENT_RETURN_STATUS (
1112 ACPI_STATUS
1113 AcpiSetFirmwareWakingVector (
1114 ACPI_PHYSICAL_ADDRESS PhysicalAddress,
1115 ACPI_PHYSICAL_ADDRESS PhysicalAddress64))
1119 * ACPI Timer interfaces
1121 ACPI_HW_DEPENDENT_RETURN_STATUS (
1122 ACPI_STATUS
1123 AcpiGetTimerResolution (
1124 UINT32 *Resolution))
1126 ACPI_HW_DEPENDENT_RETURN_STATUS (
1127 ACPI_STATUS
1128 AcpiGetTimer (
1129 UINT32 *Ticks))
1131 ACPI_HW_DEPENDENT_RETURN_STATUS (
1132 ACPI_STATUS
1133 AcpiGetTimerDuration (
1134 UINT32 StartTicks,
1135 UINT32 EndTicks,
1136 UINT32 *TimeElapsed))
1140 * Error/Warning output
1142 ACPI_MSG_DEPENDENT_RETURN_VOID (
1143 ACPI_PRINTF_LIKE(3)
1144 void ACPI_INTERNAL_VAR_XFACE
1145 AcpiError (
1146 const char *ModuleName,
1147 UINT32 LineNumber,
1148 const char *Format,
1149 ...))
1151 ACPI_MSG_DEPENDENT_RETURN_VOID (
1152 ACPI_PRINTF_LIKE(4)
1153 void ACPI_INTERNAL_VAR_XFACE
1154 AcpiException (
1155 const char *ModuleName,
1156 UINT32 LineNumber,
1157 ACPI_STATUS Status,
1158 const char *Format,
1159 ...))
1161 ACPI_MSG_DEPENDENT_RETURN_VOID (
1162 ACPI_PRINTF_LIKE(3)
1163 void ACPI_INTERNAL_VAR_XFACE
1164 AcpiWarning (
1165 const char *ModuleName,
1166 UINT32 LineNumber,
1167 const char *Format,
1168 ...))
1170 ACPI_MSG_DEPENDENT_RETURN_VOID (
1171 ACPI_PRINTF_LIKE(1)
1172 void ACPI_INTERNAL_VAR_XFACE
1173 AcpiInfo (
1174 const char *Format,
1175 ...))
1177 ACPI_MSG_DEPENDENT_RETURN_VOID (
1178 ACPI_PRINTF_LIKE(3)
1179 void ACPI_INTERNAL_VAR_XFACE
1180 AcpiBiosError (
1181 const char *ModuleName,
1182 UINT32 LineNumber,
1183 const char *Format,
1184 ...))
1186 ACPI_MSG_DEPENDENT_RETURN_VOID (
1187 ACPI_PRINTF_LIKE(3)
1188 void ACPI_INTERNAL_VAR_XFACE
1189 AcpiBiosWarning (
1190 const char *ModuleName,
1191 UINT32 LineNumber,
1192 const char *Format,
1193 ...))
1197 * Debug output
1199 ACPI_DBG_DEPENDENT_RETURN_VOID (
1200 ACPI_PRINTF_LIKE(6)
1201 void ACPI_INTERNAL_VAR_XFACE
1202 AcpiDebugPrint (
1203 UINT32 RequestedDebugLevel,
1204 UINT32 LineNumber,
1205 const char *FunctionName,
1206 const char *ModuleName,
1207 UINT32 ComponentId,
1208 const char *Format,
1209 ...))
1211 ACPI_DBG_DEPENDENT_RETURN_VOID (
1212 ACPI_PRINTF_LIKE(6)
1213 void ACPI_INTERNAL_VAR_XFACE
1214 AcpiDebugPrintRaw (
1215 UINT32 RequestedDebugLevel,
1216 UINT32 LineNumber,
1217 const char *FunctionName,
1218 const char *ModuleName,
1219 UINT32 ComponentId,
1220 const char *Format,
1221 ...))
1223 ACPI_DBG_DEPENDENT_RETURN_VOID (
1224 void
1225 AcpiTracePoint (
1226 ACPI_TRACE_EVENT_TYPE Type,
1227 BOOLEAN Begin,
1228 UINT8 *Aml,
1229 char *Pathname))
1231 ACPI_APP_DEPENDENT_RETURN_VOID (
1232 ACPI_PRINTF_LIKE(1)
1233 void ACPI_INTERNAL_VAR_XFACE
1234 AcpiLogError (
1235 const char *Format,
1236 ...))
1238 ACPI_STATUS
1239 AcpiInitializeDebugger (
1240 void);
1242 void
1243 AcpiTerminateDebugger (
1244 void);
1246 void
1247 AcpiSetDebuggerThreadId (
1248 ACPI_THREAD_ID ThreadId);
1250 #endif /* __ACXFACE_H__ */