acpixf.h revision 7b1019a6d29ccb7999dc76cba3dde1c627e8e609
03831d35f7499c87d51205817c93e9a8d42c4baestevel/******************************************************************************
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Name: acpixf.h - External interfaces to the ACPI subsystem
03831d35f7499c87d51205817c93e9a8d42c4baestevel *****************************************************************************/
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Copyright (C) 2000 - 2016, Intel Corp.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * All rights reserved.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Redistribution and use in source and binary forms, with or without
03831d35f7499c87d51205817c93e9a8d42c4baestevel * modification, are permitted provided that the following conditions
03831d35f7499c87d51205817c93e9a8d42c4baestevel * 1. Redistributions of source code must retain the above copyright
03831d35f7499c87d51205817c93e9a8d42c4baestevel * notice, this list of conditions, and the following disclaimer,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * without modification.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * 2. Redistributions in binary form must reproduce at minimum a disclaimer
03831d35f7499c87d51205817c93e9a8d42c4baestevel * substantially similar to the "NO WARRANTY" disclaimer below
03831d35f7499c87d51205817c93e9a8d42c4baestevel * ("Disclaimer") and any redistribution must be conditioned upon
03831d35f7499c87d51205817c93e9a8d42c4baestevel * including a substantially similar Disclaimer requirement for further
03831d35f7499c87d51205817c93e9a8d42c4baestevel * binary redistribution.
087113e1a972d4b6246cf32a83c330968117b93emb * 3. Neither the names of the above-listed copyright holders nor the names
03831d35f7499c87d51205817c93e9a8d42c4baestevel * of any contributors may be used to endorse or promote products derived
03831d35f7499c87d51205817c93e9a8d42c4baestevel * from this software without specific prior written permission.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Alternatively, this software may be distributed under the terms of the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * GNU General Public License ("GPL") version 2 as published by the Free
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Software Foundation.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * NO WARRANTY
03831d35f7499c87d51205817c93e9a8d42c4baestevel * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
03831d35f7499c87d51205817c93e9a8d42c4baestevel * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
03831d35f7499c87d51205817c93e9a8d42c4baestevel * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
03831d35f7499c87d51205817c93e9a8d42c4baestevel * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
03831d35f7499c87d51205817c93e9a8d42c4baestevel * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
03831d35f7499c87d51205817c93e9a8d42c4baestevel * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
03831d35f7499c87d51205817c93e9a8d42c4baestevel * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
03831d35f7499c87d51205817c93e9a8d42c4baestevel * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
03831d35f7499c87d51205817c93e9a8d42c4baestevel * POSSIBILITY OF SUCH DAMAGES.
03831d35f7499c87d51205817c93e9a8d42c4baestevel/* Current ACPICA subsystem version in YYYYMMDD format */
9ef7884d729f1f09cb82e5c2f57d12cb9f4c1feeanovick/*****************************************************************************
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Macros used for ACPICA globals and configuration
03831d35f7499c87d51205817c93e9a8d42c4baestevel ****************************************************************************/
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Ensure that global variables are defined and initialized only once.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * The use of these macros allows for a single list of globals (here)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * in order to simplify maintenance of the code.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * These macros configure the various ACPICA interfaces. They are
e95892231f152151fa2f18b4dbadf9b76d952297mb * useful for generating stub inline functions for features that are
03831d35f7499c87d51205817c93e9a8d42c4baestevel * configured out of the current kernel or ACPICA application.
e95892231f152151fa2f18b4dbadf9b76d952297mb/*****************************************************************************
e95892231f152151fa2f18b4dbadf9b76d952297mb * Public globals and runtime configuration options
e95892231f152151fa2f18b4dbadf9b76d952297mb ****************************************************************************/
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Enable "slack mode" of the AML interpreter? Default is FALSE, and the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * interpreter strictly follows the ACPI specification. Setting to TRUE
03831d35f7499c87d51205817c93e9a8d42c4baestevel * allows the interpreter to ignore certain errors and/or bad AML constructs.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Currently, these features are enabled by this flag:
03831d35f7499c87d51205817c93e9a8d42c4baestevel * 1) Allow "implicit return" of last value in a control method
03831d35f7499c87d51205817c93e9a8d42c4baestevel * 2) Allow access beyond the end of an operation region
03831d35f7499c87d51205817c93e9a8d42c4baestevel * 3) Allow access to uninitialized locals/args (auto-init to integer 0)
03831d35f7499c87d51205817c93e9a8d42c4baestevel * 4) Allow ANY object type to be a source operand for the Store() operator
03831d35f7499c87d51205817c93e9a8d42c4baestevel * 5) Allow unresolved references (invalid target name) in package objects
03831d35f7499c87d51205817c93e9a8d42c4baestevel * 6) Enable warning messages for behavior that is not ACPI spec compliant
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableInterpreterSlack, FALSE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Automatically serialize all methods that create named objects? Default
03831d35f7499c87d51205817c93e9a8d42c4baestevel * is TRUE, meaning that all NonSerialized methods are scanned once at
03831d35f7499c87d51205817c93e9a8d42c4baestevel * table load time to determine those that create named objects. Methods
03831d35f7499c87d51205817c93e9a8d42c4baestevel * that create named objects are marked Serialized in order to prevent
03831d35f7499c87d51205817c93e9a8d42c4baestevel * possible run-time problems if they are entered by more than one thread.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_AutoSerializeMethods, TRUE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Create the predefined _OSI method in the namespace? Default is TRUE
03831d35f7499c87d51205817c93e9a8d42c4baestevel * because ACPICA is fully compatible with other ACPI implementations.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Optionally use default values for the ACPI register widths. Set this to
03831d35f7499c87d51205817c93e9a8d42c4baestevel * TRUE to use the defaults, if an FADT contains incorrect widths/lengths.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_UseDefaultRegisterWidths, TRUE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Whether or not to verify the table checksum before installation. Set
03831d35f7499c87d51205817c93e9a8d42c4baestevel * this to TRUE to verify the table checksum before install it to the table
03831d35f7499c87d51205817c93e9a8d42c4baestevel * manager. Note that enabling this option causes errors to happen in some
03831d35f7499c87d51205817c93e9a8d42c4baestevel * OSPMs during early initialization stages. Default behavior is to do such
03831d35f7499c87d51205817c93e9a8d42c4baestevel * verification.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_VerifyTableChecksum, TRUE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Optionally enable output from the AML Debug Object.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_EnableAmlDebugObject, FALSE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Optionally copy the entire DSDT to local memory (instead of simply
03831d35f7499c87d51205817c93e9a8d42c4baestevel * mapping it.) There are some BIOSs that corrupt or replace the original
03831d35f7499c87d51205817c93e9a8d42c4baestevel * DSDT, creating the need for this option. Default is FALSE, do not copy
e95892231f152151fa2f18b4dbadf9b76d952297mb * the DSDT.
e95892231f152151fa2f18b4dbadf9b76d952297mb * Optionally ignore an XSDT if present and use the RSDT instead.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Although the ACPI specification requires that an XSDT be used instead
03831d35f7499c87d51205817c93e9a8d42c4baestevel * of the RSDT, the XSDT has been found to be corrupt or ill-formed on
03831d35f7499c87d51205817c93e9a8d42c4baestevel * some machines. Default behavior is to use the XSDT if present.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_DoNotUseXsdt, FALSE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Optionally support group module level code.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_GroupModuleLevelCode, FALSE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Optionally use 32-bit FADT addresses if and when there is a conflict
03831d35f7499c87d51205817c93e9a8d42c4baestevel * (address mismatch) between the 32-bit and 64-bit versions of the
03831d35f7499c87d51205817c93e9a8d42c4baestevel * address. Although ACPICA adheres to the ACPI specification which
e95892231f152151fa2f18b4dbadf9b76d952297mb * requires the use of the corresponding 64-bit address if it is non-zero,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * some machines have been found to have a corrupted non-zero 64-bit
03831d35f7499c87d51205817c93e9a8d42c4baestevel * address. Default is FALSE, do not favor the 32-bit addresses.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFadtAddresses, FALSE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Optionally use 32-bit FACS table addresses.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * It is reported that some platforms fail to resume from system suspending
03831d35f7499c87d51205817c93e9a8d42c4baestevel * if 64-bit FACS table address is selected:
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Default is TRUE, favor the 32-bit addresses.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_Use32BitFacsAddresses, TRUE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Optionally truncate I/O addresses to 16 bits. Provides compatibility
03831d35f7499c87d51205817c93e9a8d42c4baestevel * with other ACPI implementations. NOTE: During ACPICA initialization,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * this value is set to TRUE if any Windows OSI strings have been
03831d35f7499c87d51205817c93e9a8d42c4baestevel * requested by the BIOS.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Disable runtime checking and repair of values returned by control methods.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Use only if the repair is causing a problem on a particular machine.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Optionally do not install any SSDTs from the RSDT/XSDT during initialization.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * This can be useful for debugging ACPI problems on some machines.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Optionally enable runtime namespace override.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_RuntimeNamespaceOverride, TRUE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * We keep track of the latest version of Windows that has been requested by
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the BIOS. ACPI 5.0.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * ACPI 5.0 introduces the concept of a "reduced hardware platform", meaning
03831d35f7499c87d51205817c93e9a8d42c4baestevel * that the ACPI hardware is no longer required. A flag in the FADT indicates
03831d35f7499c87d51205817c93e9a8d42c4baestevel * a reduced HW machine, and that flag is duplicated here for convenience.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_ReducedHardware, FALSE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * This mechanism is used to trace a specified AML method. The method is
03831d35f7499c87d51205817c93e9a8d42c4baestevel * traced each time it is executed.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (const char *, AcpiGbl_TraceMethodName, NULL);
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLevel, ACPI_TRACE_LEVEL_DEFAULT);
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT32, AcpiGbl_TraceDbgLayer, ACPI_TRACE_LAYER_DEFAULT);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Runtime configuration of debug output control masks. We want the debug
03831d35f7499c87d51205817c93e9a8d42c4baestevel * switches statically initialized so they are already set when the debugger
03831d35f7499c87d51205817c93e9a8d42c4baestevel * is entered.
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_DEBUG_DEFAULT);
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT32, AcpiDbgLevel, ACPI_NORMAL_DEFAULT);
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT32, AcpiDbgLayer, ACPI_COMPONENT_DEFAULT);
03831d35f7499c87d51205817c93e9a8d42c4baestevel/* Optionally enable timer output with Debug Object output */
03831d35f7499c87d51205817c93e9a8d42c4baestevelACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisplayDebugTimer, FALSE);
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Other miscellaneous globals
867ad6ccd534f8cc8a833f2a852036a33af5d522jesusm/*****************************************************************************
03831d35f7499c87d51205817c93e9a8d42c4baestevel * ACPICA public interface configuration.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Interfaces that are configured out of the ACPICA build are replaced
03831d35f7499c87d51205817c93e9a8d42c4baestevel * by inlined stubs by default.
03831d35f7499c87d51205817c93e9a8d42c4baestevel ****************************************************************************/
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Hardware-reduced prototypes (default: Not hardware reduced).
03831d35f7499c87d51205817c93e9a8d42c4baestevel * All ACPICA hardware-related interfaces that use these macros will be
03831d35f7499c87d51205817c93e9a8d42c4baestevel * configured out of the ACPICA build if the ACPI_REDUCED_HARDWARE flag
03831d35f7499c87d51205817c93e9a8d42c4baestevel * is set to TRUE.
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Note: This static build option for reduced hardware is intended to
03831d35f7499c87d51205817c93e9a8d42c4baestevel * reduce ACPICA code size if desired or necessary. However, even if this
867ad6ccd534f8cc8a833f2a852036a33af5d522jesusm * option is not specified, the runtime behavior of ACPICA is dependent
03831d35f7499c87d51205817c93e9a8d42c4baestevel * on the actual FADT reduced hardware flag (HW_REDUCED_ACPI). If set,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * the flag will enable similar behavior -- ACPICA will not attempt
03831d35f7499c87d51205817c93e9a8d42c4baestevel * to access any ACPI-relate hardware (SCI, GPEs, Fixed Events, etc.)
867ad6ccd534f8cc8a833f2a852036a33af5d522jesusm static ACPI_INLINE Prototype {return(AE_NOT_CONFIGURED);}
03831d35f7499c87d51205817c93e9a8d42c4baestevel#endif /* !ACPI_REDUCED_HARDWARE */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Error message prototypes (default: error messages enabled).
483dd6e55fa4bc3c78c87ed8c23cabd45fceceabarutz * All interfaces related to error and warning messages
077f2dab07dda71c691d93b8e183876d7eb912a8zx * will be configured out of the ACPICA build if the
483dd6e55fa4bc3c78c87ed8c23cabd45fceceabarutz * ACPI_NO_ERROR_MESSAGE flag is defined.
483dd6e55fa4bc3c78c87ed8c23cabd45fceceabarutz#endif /* ACPI_NO_ERROR_MESSAGES */
9ef7884d729f1f09cb82e5c2f57d12cb9f4c1feeanovick * Debugging output prototypes (default: no debug output).
483dd6e55fa4bc3c78c87ed8c23cabd45fceceabarutz * All interfaces related to debug output messages
483dd6e55fa4bc3c78c87ed8c23cabd45fceceabarutz * will be configured out of the ACPICA build unless the
87c478a5395a3af1176f469bdeaf2ce044e4ae1azx * ACPI_DEBUG_OUTPUT flag is defined.
03831d35f7499c87d51205817c93e9a8d42c4baestevel#endif /* ACPI_DEBUG_OUTPUT */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Application prototypes
03831d35f7499c87d51205817c93e9a8d42c4baestevel * All interfaces used by application will be configured
03831d35f7499c87d51205817c93e9a8d42c4baestevel * out of the ACPICA build unless the ACPI_APPLICATION
03831d35f7499c87d51205817c93e9a8d42c4baestevel * flag is defined.
03831d35f7499c87d51205817c93e9a8d42c4baestevel#endif /* ACPI_APPLICATION */
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Debugger prototypes
03831d35f7499c87d51205817c93e9a8d42c4baestevel * All interfaces used by debugger will be configured
03831d35f7499c87d51205817c93e9a8d42c4baestevel * out of the ACPICA build unless the ACPI_DEBUGGER
03831d35f7499c87d51205817c93e9a8d42c4baestevel * flag is defined.
03831d35f7499c87d51205817c93e9a8d42c4baestevel#endif /* ACPI_DEBUGGER */
03831d35f7499c87d51205817c93e9a8d42c4baestevel/*****************************************************************************
03831d35f7499c87d51205817c93e9a8d42c4baestevel * ACPICA public interface prototypes
03831d35f7499c87d51205817c93e9a8d42c4baestevel ****************************************************************************/
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Initialization
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Miscellaneous global interfaces
03831d35f7499c87d51205817c93e9a8d42c4baestevelconst char *
483dd6e55fa4bc3c78c87ed8c23cabd45fceceabarutz * ACPI table load/unload interfaces
03831d35f7499c87d51205817c93e9a8d42c4baestevel * ACPI table manipulation interfaces
483dd6e55fa4bc3c78c87ed8c23cabd45fceceabarutz * Namespace and name interfaces
483dd6e55fa4bc3c78c87ed8c23cabd45fceceabarutz const char *Name,
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Object manipulation and enumeration
03831d35f7499c87d51205817c93e9a8d42c4baestevel * Handler interfaces
void *Context))
void *Context))
void *Context))
void *Context))
void *Context))
void *Context))
void *Context))
void *Context);
char *Name,
void *Context))
char *Name,
void *Context))
AcpiRead (
const char *ModuleName,
const char *Format,
const char *ModuleName,
const char *Format,
const char *ModuleName,
const char *Format,
AcpiInfo (
const char *Format,
const char *ModuleName,
const char *Format,
const char *ModuleName,
const char *Format,
const char *FunctionName,
const char *ModuleName,
const char *Format,
const char *FunctionName,
const char *ModuleName,
const char *Format,
char *Pathname))
const char *Format,