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