acglobal.h revision 26f3cdf03f1adcc98f6d3d99843ee71e9229a8c0
/******************************************************************************
*
* Name: acglobal.h - Declarations for global variables
*
*****************************************************************************/
/*
* Copyright (C) 2000 - 2011, 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 __ACGLOBAL_H__
#define __ACGLOBAL_H__
/*
* Ensure that the globals are actually defined and initialized only once.
*
* The use of these macros allows a single list of globals (here) in order
* to simplify maintenance of the code.
*/
#ifdef DEFINE_ACPI_GLOBALS
#define ACPI_EXTERN
#define ACPI_INIT_GLOBAL(a,b) a=b
#else
#define ACPI_EXTERN extern
#define ACPI_INIT_GLOBAL(a,b) a
#endif
#ifdef DEFINE_ACPI_GLOBALS
/* Public globals, available from outside ACPICA subsystem */
/*****************************************************************************
*
* Runtime configuration (static defaults that can be overriden at runtime)
*
****************************************************************************/
/*
* Enable "slack" in 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 control methods? Default is FALSE, meaning
* to use the Serialized/NotSerialized method flags on a per method basis.
* Only change this if the ASL code is poorly written and cannot handle
* reentrancy even though methods are marked "NotSerialized".
*/
/*
* Create the predefined _OSI method in the namespace? Default is TRUE
* because ACPI CA is fully compatible with other ACPI implementations.
* Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior.
*/
/*
* Optionally use default values for the ACPI register widths. Set this to
*/
/*
* 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 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.
*/
/* AcpiGbl_FADT is a local copy of the FADT, converted to a common format. */
#endif
/*****************************************************************************
*
* ACPI Table globals
*
****************************************************************************/
/*
* AcpiGbl_RootTableList is the master list of ACPI tables that were
*/
/* These addresses are calculated from the FADT Event Block addresses */
/* DSDT information. Used to check for DSDT corruption */
/*
* Handle both ACPI 1.0 and ACPI 2.0 Integer widths. The integer width is
* determined by the revision of the DSDT: If the DSDT revision is less than
* 2, use only the lower 32 bits of the internal 64-bit Integer.
*/
/*****************************************************************************
*
* Mutual exlusion within ACPICA subsystem
*
****************************************************************************/
/*
* Predefined mutex objects. This array contains the
* actual OS mutex handles, indexed by the local ACPI_MUTEX_HANDLEs.
* (The table maps local handles to the real OS handles)
*/
/*
* Global lock mutex is an actual AML mutex object
* Global lock semaphore works in conjunction with the actual global lock
* Global lock spinlock is used for "pending" handshake
*/
/*
* Spinlocks are used for interfaces that can be possibly called at
* interrupt level
*/
/* Mutex for _OSI support */
/*****************************************************************************
*
* Miscellaneous globals
*
****************************************************************************/
/* Object caches */
/* Global handlers */
/* Owner ID support */
/* Initialization sequencing */
/* Misc */
#ifndef DEFINE_ACPI_GLOBALS
/* Exception codes */
extern char const *AcpiGbl_ExceptionNames_Env[];
extern char const *AcpiGbl_ExceptionNames_Pgm[];
extern char const *AcpiGbl_ExceptionNames_Tbl[];
extern char const *AcpiGbl_ExceptionNames_Aml[];
extern char const *AcpiGbl_ExceptionNames_Ctrl[];
/* Other miscellaneous */
extern BOOLEAN AcpiGbl_Shutdown;
extern UINT32 AcpiGbl_StartupFlags;
extern const char *AcpiGbl_SleepStateNames[ACPI_S_STATE_COUNT];
extern const char *AcpiGbl_LowestDstateNames[ACPI_NUM_SxW_METHODS];
extern const char *AcpiGbl_HighestDstateNames[ACPI_NUM_SxD_METHODS];
extern const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
#endif
#ifdef ACPI_DBG_TRACK_ALLOCATIONS
/* Lists for tracking memory allocations */
#endif
/*****************************************************************************
*
* Namespace globals
*
****************************************************************************/
#if !defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
#define NUM_PREDEFINED_NAMES 10
#else
#define NUM_PREDEFINED_NAMES 9
#endif
#ifdef ACPI_DEBUG_OUTPUT
#endif
/*****************************************************************************
*
* Interpreter globals
*
****************************************************************************/
/* Control method single step flag */
/*****************************************************************************
*
* Hardware globals
*
****************************************************************************/
/*****************************************************************************
*
* Event and GPE globals
*
****************************************************************************/
/*****************************************************************************
*
* Debug support
*
****************************************************************************/
/* Procedure nesting level for debug output */
extern UINT32 AcpiGbl_NestingLevel;
/* Event counters */
/* Support for dynamic control method tracing mechanism */
/*****************************************************************************
*
* Debugger globals
*
****************************************************************************/
#ifdef ACPI_DISASSEMBLER
#endif
#ifdef ACPI_DEBUGGER
extern BOOLEAN AcpiGbl_MethodExecuting;
extern BOOLEAN AcpiGbl_AbortMethod;
extern BOOLEAN AcpiGbl_DbTerminateThreads;
ACPI_EXTERN char *AcpiGbl_DbBuffer;
ACPI_EXTERN char *AcpiGbl_DbFilename;
/*
* Statistic globals
*/
#endif /* ACPI_DEBUGGER */
#endif /* __ACGLOBAL_H__ */