Added timeout and Global Lock Handle to global lock Acquire/Release as

per the EPS.


date	2001.12.18.21.07.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 19:32:17 +00:00
parent b860bc14dc
commit d9ee356570
2 changed files with 53 additions and 126 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acevents.h - Event subcomponent prototypes and defines
* $Revision: 1.67 $
* $Revision: 1.68 $
*
*****************************************************************************/
@ -124,7 +124,7 @@ AcpiEvInitialize (
/*
* AcpiEvfixed - Fixed event handling
* Evfixed - Fixed event handling
*/
ACPI_STATUS
@ -141,12 +141,12 @@ AcpiEvFixedEventDispatch (
/*
* AcpiEvglock - Global Lock support
* Evglock - Global Lock support
*/
ACPI_STATUS
AcpiEvAcquireGlobalLock(
void);
UINT32 Timeout);
void
AcpiEvReleaseGlobalLock(
@ -158,7 +158,7 @@ AcpiEvInitGlobalLockHandler (
/*
* AcpiEvgpe - GPE handling and dispatch
* Evgpe - GPE handling and dispatch
*/
ACPI_STATUS
@ -179,7 +179,7 @@ AcpiEvGpeDetect (
/*
* AcpiEvnotify - Device Notify handling and dispatch
* Evnotify - Device Notify handling and dispatch
*/
ACPI_STATUS
@ -192,7 +192,7 @@ AcpiEvNotifyDispatch (
void *Context);
/*
* AcpiEvregion - Address Space handling
* Evregion - Address Space handling
*/
ACPI_STATUS
@ -227,7 +227,7 @@ AcpiEvAssociateRegionAndHandler (
/*
* AcpiEvregini - Region initialization and setup
* Evregini - Region initialization and setup
*/
ACPI_STATUS

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: globals.h - Declarations for global variables
* Name: acglobal.h - Declarations for global variables
* $Revision: 1.111 $
*
*****************************************************************************/
@ -9,8 +9,8 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999, Intel Corp. All rights
* reserved.
* Some or all of this work - Copyright (c) 1999, 2000, 2001, Intel Corp.
* All rights reserved.
*
* 2. License
*
@ -114,12 +114,15 @@
*
*****************************************************************************/
#ifndef __GLOBALS_H__
#define __GLOBALS_H__
#ifndef __ACGLOBAL_H__
#define __ACGLOBAL_H__
/*
* Ensure that the globals are actually defined only once
* Ensure that the globals are actually defined only once.
*
* The use of these defines allows a single list of globals (here) in order
* to simplify maintenance of the code.
*/
#ifdef DEFINE_ACPI_GLOBALS
#define ACPI_EXTERN
@ -128,8 +131,6 @@
#endif
extern char *MsgAcpiErrorBreak;
/*****************************************************************************
*
* Debug support
@ -141,7 +142,6 @@ extern char *MsgAcpiErrorBreak;
extern UINT32 AcpiDbgLevel;
extern UINT32 AcpiDbgLayer;
/* Procedure nesting level for debug output */
extern UINT32 AcpiGbl_NestingLevel;
@ -162,13 +162,12 @@ extern UINT32 AcpiGbl_NestingLevel;
* of each in the system. Each global points to the actual table.
*
*/
ACPI_EXTERN ROOT_SYSTEM_DESCRIPTOR_POINTER *AcpiGbl_RSDP;
ACPI_EXTERN ROOT_SYSTEM_DESCRIPTION_TABLE *AcpiGbl_RSDT;
ACPI_EXTERN FIRMWARE_ACPI_CONTROL_STRUCTURE *AcpiGbl_FACS;
ACPI_EXTERN FIXED_ACPI_DESCRIPTION_TABLE *AcpiGbl_FACP;
ACPI_EXTERN APIC_TABLE *AcpiGbl_APIC;
ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DSDT;
ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_SBST;
ACPI_EXTERN RSDP_DESCRIPTOR *AcpiGbl_RSDP;
ACPI_EXTERN XSDT_DESCRIPTOR *AcpiGbl_XSDT;
ACPI_EXTERN FADT_DESCRIPTOR *AcpiGbl_FADT;
ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DSDT;
ACPI_EXTERN ACPI_COMMON_FACS *AcpiGbl_FACS;
/*
* Since there may be multiple SSDTs and PSDTS, a single pointer is not
* sufficient; Therefore, there isn't one!
@ -187,7 +186,6 @@ extern ACPI_TABLE_SUPPORT AcpiGbl_AcpiTableData[NUM_ACPI_TABLES];
* (The table maps local handles to the real OS handles)
*/
ACPI_EXTERN ACPI_MUTEX_INFO AcpiGbl_AcpiMutexInfo [NUM_MTX];
extern ACPI_INIT_DATA AcpiGbl_AcpiInitData;
/*****************************************************************************
@ -197,57 +195,36 @@ extern ACPI_INIT_DATA AcpiGbl_AcpiInitData;
****************************************************************************/
ACPI_EXTERN ACPI_MEMORY_LIST AcpiGbl_MemoryLists[ACPI_NUM_MEM_LISTS];
ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_DrvNotify;
ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_SysNotify;
ACPI_EXTERN UINT8 *AcpiGbl_Gpe0EnableRegisterSave;
ACPI_EXTERN UINT8 *AcpiGbl_Gpe1EnableRegisterSave;
ACPI_EXTERN ACPI_WALK_STATE *AcpiGbl_BreakpointWalk;
ACPI_EXTERN ACPI_GENERIC_STATE *AcpiGbl_GenericStateCache;
ACPI_EXTERN ACPI_GENERIC_OP *AcpiGbl_ParseCache;
ACPI_EXTERN ACPI_OBJECT_INTERNAL *AcpiGbl_ObjectCache;
ACPI_EXTERN ACPI_WALK_STATE *AcpiGbl_WalkStateCache;
ACPI_EXTERN ACPI_HANDLE AcpiGbl_GlobalLockSemaphore;
ACPI_EXTERN UINT32 AcpiGbl_GlobalLockThreadCount;
ACPI_EXTERN UINT32 AcpiGbl_RestoreAcpiChipset;
ACPI_EXTERN UINT32 AcpiGbl_OriginalMode;
ACPI_EXTERN UINT32 AcpiGbl_EdgeLevelSave;
ACPI_EXTERN UINT32 AcpiGbl_IrqEnableSave;
ACPI_EXTERN UINT32 AcpiGbl_RsdpOriginalLocation;
ACPI_EXTERN UINT32 AcpiGbl_StateCacheRequests;
ACPI_EXTERN UINT32 AcpiGbl_StateCacheHits;
ACPI_EXTERN UINT32 AcpiGbl_ParseCacheRequests;
ACPI_EXTERN UINT32 AcpiGbl_ParseCacheHits;
ACPI_EXTERN UINT32 AcpiGbl_ObjectCacheRequests;
ACPI_EXTERN UINT32 AcpiGbl_ObjectCacheHits;
ACPI_EXTERN UINT32 AcpiGbl_WalkStateCacheRequests;
ACPI_EXTERN UINT32 AcpiGbl_WalkStateCacheHits;
ACPI_EXTERN UINT32 AcpiGbl_NsLookupCount;
ACPI_EXTERN UINT32 AcpiGbl_PsFindCount;
ACPI_EXTERN UINT16 AcpiGbl_GenericStateCacheDepth;
ACPI_EXTERN UINT16 AcpiGbl_ParseCacheDepth;
ACPI_EXTERN UINT16 AcpiGbl_ObjectCacheDepth;
ACPI_EXTERN UINT16 AcpiGbl_WalkStateCacheDepth;
ACPI_EXTERN UINT16 AcpiGbl_Pm1EnableRegisterSave;
ACPI_EXTERN UINT16 AcpiGbl_NextTableOwnerId;
ACPI_EXTERN UINT16 AcpiGbl_NextMethodOwnerId;
ACPI_EXTERN UINT16 AcpiGbl_GlobalLockHandle;
ACPI_EXTERN UINT8 AcpiGbl_DebuggerConfiguration;
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockAcquired;
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockSet; /* TBD: [Restructure] OBSOLETE?? */
ACPI_EXTERN BOOLEAN AcpiGbl_StepToNextCall;
ACPI_EXTERN BOOLEAN AcpiGbl_AcpiHardwarePresent;
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPresent;
ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_DrvNotify;
ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_SysNotify;
extern BOOLEAN AcpiGbl_Shutdown;
extern UINT32 AcpiGbl_SystemFlags;
extern UINT32 AcpiGbl_StartupFlags;
extern BOOLEAN AcpiGbl_Shutdown;
extern UINT32 AcpiGbl_StartupFlags;
extern const UINT8 AcpiGbl_DecodeTo8bit[8];
extern const NATIVE_CHAR *AcpiGbl_DbSleepStates[ACPI_NUM_SLEEP_STATES];
/*****************************************************************************
@ -260,21 +237,21 @@ extern UINT32 AcpiGbl_StartupFlags;
#define NUM_PREDEFINED_NAMES 9
ACPI_EXTERN NAME_TABLE_ENTRY AcpiGbl_RootObjStruct;
ACPI_EXTERN NAME_TABLE_ENTRY *AcpiGbl_RootObject;
ACPI_EXTERN ACPI_NAMESPACE_NODE AcpiGbl_RootNodeStruct;
ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_RootNode;
extern UINT8 AcpiGbl_NsProperties[NUM_NS_TYPES];
extern PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
/* Used to detect memory leaks (DEBUG ONLY) */
extern const UINT8 AcpiGbl_NsProperties[NUM_NS_TYPES];
extern const PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
#ifdef ACPI_DEBUG
ACPI_EXTERN ALLOCATION_INFO *AcpiGbl_HeadAllocPtr;
ACPI_EXTERN ALLOCATION_INFO *AcpiGbl_TailAllocPtr;
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeCount;
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeSize;
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentNodeCount;
ACPI_EXTERN ACPI_SIZE AcpiGbl_EntryStackPointer;
ACPI_EXTERN ACPI_SIZE AcpiGbl_LowestStackPointer;
ACPI_EXTERN UINT32 AcpiGbl_DeepestNesting;
#endif
/*****************************************************************************
*
* Interpreter globals
@ -282,34 +259,7 @@ ACPI_EXTERN ALLOCATION_INFO *AcpiGbl_TailAllocPtr;
****************************************************************************/
ACPI_EXTERN UINT32 AcpiGbl_WhenToParseMethods;
ACPI_EXTERN ACPI_WALK_LIST *AcpiGbl_CurrentWalkList;
/* Base of AML block, and pointer to current location in it */
ACPI_EXTERN UINT8 *AcpiGbl_PCodeBase;
ACPI_EXTERN UINT8 *AcpiGbl_PCode;
/*
* Length of AML block, and remaining length of current package.
*/
ACPI_EXTERN UINT32 AcpiGbl_PCodeBlockLen;
ACPI_EXTERN UINT32 AcpiGbl_PCodeLen;
ACPI_EXTERN UINT32 AcpiGbl_BufSeq; /* Counts allocated Buffer descriptors */
ACPI_EXTERN INT32 AcpiGbl_NamedObjectErr; /* Indicate if inc_error should be called */
/*
* Handle to the last method found - used during pass1 of load
*/
ACPI_EXTERN ACPI_HANDLE AcpiGbl_LastMethod;
/*
* Table of Address Space handlers
*/
ACPI_EXTERN ACPI_ADDRESS_SPACE_INFO AcpiGbl_AddressSpaces[ACPI_NUM_ADDRESS_SPACES];
ACPI_EXTERN ACPI_THREAD_STATE *AcpiGbl_CurrentWalkList;
/* Control method single step flag */
@ -322,25 +272,20 @@ ACPI_EXTERN UINT8 AcpiGbl_CmSingleStep;
*
****************************************************************************/
ACPI_EXTERN ACPI_GENERIC_OP *AcpiGbl_ParsedNamespaceRoot;
extern ACPI_OP_INFO AcpiGbl_AmlOpInfo[];
extern UINT8 AcpiGbl_AmlOpInfoIndex[256];
extern char *AcpiGbl_ParserId;
ACPI_EXTERN ACPI_PARSE_OBJECT *AcpiGbl_ParsedNamespaceRoot;
/*****************************************************************************
*
* AcpiEvent globals
* Event globals
*
****************************************************************************/
ACPI_EXTERN ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventHandlers[NUM_FIXED_EVENTS];
ACPI_EXTERN ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
ACPI_EXTERN ACPI_HANDLE AcpiGbl_GpeObjHandle;
ACPI_EXTERN UINT32 AcpiGbl_GpeRegisterCount;
ACPI_EXTERN ACPI_GPE_REGISTERS *AcpiGbl_GpeRegisters;
ACPI_EXTERN ACPI_GPE_LEVEL_INFO *AcpiGbl_GpeInfo;
ACPI_EXTERN ACPI_GPE_REGISTERS *AcpiGbl_GpeRegisters;
ACPI_EXTERN ACPI_GPE_LEVEL_INFO *AcpiGbl_GpeInfo;
/*
* Gpe validation and translation table
@ -350,12 +295,12 @@ ACPI_EXTERN ACPI_GPE_LEVEL_INFO *AcpiGbl_GpeInfo;
* This table is needed because the GPE numbers supported by block 1 do not
* have to be contiguous with the GPE numbers supported by block 0.
*/
ACPI_EXTERN UINT8 AcpiGbl_GpeValid [NUM_GPE];
ACPI_EXTERN UINT8 AcpiGbl_GpeValid [ACPI_NUM_GPE];
/* AcpiEvent counter for debug only */
#ifdef ACPI_DEBUG
ACPI_EXTERN UINT32 AcpiGbl_EventCount[NUM_FIXED_EVENTS];
ACPI_EXTERN UINT32 AcpiGbl_EventCount[ACPI_NUM_FIXED_EVENTS];
#endif
@ -365,28 +310,10 @@ ACPI_EXTERN UINT32 AcpiGbl_EventCount[NUM_FIXED_EVENTS];
*
****************************************************************************/
#ifdef ENABLE_DEBUGGER
ACPI_EXTERN BOOLEAN AcpiGbl_MethodExecuting;
ACPI_EXTERN BOOLEAN AcpiGbl_DbTerminateThreads;
/* Memory allocation metrics - Debug Only! */
#ifdef ACPI_DEBUG
ACPI_EXTERN UINT32 AcpiGbl_CurrentAllocSize;
ACPI_EXTERN UINT32 AcpiGbl_CurrentAllocCount;
ACPI_EXTERN UINT32 AcpiGbl_RunningAllocSize;
ACPI_EXTERN UINT32 AcpiGbl_RunningAllocCount;
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentAllocSize;
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentAllocCount;
ACPI_EXTERN UINT32 AcpiGbl_CurrentObjectCount;
ACPI_EXTERN UINT32 AcpiGbl_CurrentObjectSize;
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentObjectCount;
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentObjectSize;
ACPI_EXTERN UINT32 AcpiGbl_RunningObjectCount;
ACPI_EXTERN UINT32 AcpiGbl_RunningObjectSize;
#endif
#endif /* __GLOBALS_H__ */
#endif /* __ACGLOBAL_H__ */