mirror of
https://github.com/acpica/acpica/
synced 2025-01-09 11:02:02 +03:00
Major overhaul of GPE code to prepare for GPE Block Device support
date 2003.02.27.21.05.00; author rmoore1; state Exp;
This commit is contained in:
parent
dc75d9fa2e
commit
2e7eecfc34
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acevents.h - Event subcomponent prototypes and defines
|
||||
* $Revision: 1.82 $
|
||||
* $Revision: 1.83 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -164,14 +164,6 @@ ACPI_STATUS
|
||||
AcpiEvInitGlobalLockHandler (
|
||||
void);
|
||||
|
||||
ACPI_GPE_REGISTER_INFO *
|
||||
AcpiEvGetGpeRegisterInfo (
|
||||
UINT32 GpeNumber);
|
||||
|
||||
ACPI_GPE_NUMBER_INFO *
|
||||
AcpiEvGetGpeNumberInfo (
|
||||
UINT32 GpeNumber);
|
||||
|
||||
UINT32
|
||||
AcpiEvGetGpeNumberIndex (
|
||||
UINT32 GpeNumber);
|
||||
@ -190,17 +182,17 @@ AcpiEvNotifyDispatch (
|
||||
* Evgpe - GPE handling and dispatch
|
||||
*/
|
||||
|
||||
ACPI_GPE_EVENT_INFO *
|
||||
AcpiEvGetGpeEventInfo (
|
||||
UINT32 GpeNumber);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvGpeInitialize (
|
||||
void);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiEvInitGpeControlMethods (
|
||||
void);
|
||||
|
||||
UINT32
|
||||
AcpiEvGpeDispatch (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
UINT32
|
||||
AcpiEvGpeDetect (
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: acglobal.h - Declarations for global variables
|
||||
* $Revision: 1.115 $
|
||||
* $Revision: 1.137 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -162,11 +162,22 @@ extern UINT32 AcpiGbl_NestingLevel;
|
||||
* of each in the system. Each global points to the actual table.
|
||||
*
|
||||
*/
|
||||
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;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_TableFlags;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_RsdtTableCount;
|
||||
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 FACS_DESCRIPTOR *AcpiGbl_FACS;
|
||||
ACPI_EXTERN ACPI_COMMON_FACS AcpiGbl_CommonFACS;
|
||||
|
||||
/*
|
||||
* Handle both ACPI 1.0 and ACPI 2.0 Integer widths
|
||||
* If we are running a method that exists in a 32-bit ACPI table.
|
||||
* Use only 32 bits of the Integer for conversion.
|
||||
*/
|
||||
ACPI_EXTERN UINT8 AcpiGbl_IntegerBitWidth;
|
||||
ACPI_EXTERN UINT8 AcpiGbl_IntegerByteWidth;
|
||||
|
||||
/*
|
||||
* Since there may be multiple SSDTs and PSDTS, a single pointer is not
|
||||
@ -198,6 +209,7 @@ ACPI_EXTERN ACPI_MUTEX_INFO AcpiGbl_AcpiMutexInfo [NUM_MTX];
|
||||
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 ACPI_INIT_HANDLER AcpiGbl_InitHandler;
|
||||
ACPI_EXTERN ACPI_WALK_STATE *AcpiGbl_BreakpointWalk;
|
||||
ACPI_EXTERN ACPI_HANDLE AcpiGbl_GlobalLockSemaphore;
|
||||
|
||||
@ -215,11 +227,14 @@ ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockAcquired;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_StepToNextCall;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_AcpiHardwarePresent;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_GlobalLockPresent;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_EventsInitialized;
|
||||
|
||||
extern BOOLEAN AcpiGbl_Shutdown;
|
||||
extern UINT32 AcpiGbl_StartupFlags;
|
||||
extern const UINT8 AcpiGbl_DecodeTo8bit[8];
|
||||
extern const NATIVE_CHAR *AcpiGbl_DbSleepStates[ACPI_NUM_SLEEP_STATES];
|
||||
extern const char *AcpiGbl_DbSleepStates[ACPI_S_STATE_COUNT];
|
||||
extern const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES];
|
||||
extern const char *AcpiGbl_RegionTypes[ACPI_NUM_PREDEFINED_REGIONS];
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@ -228,17 +243,21 @@ extern const NATIVE_CHAR *AcpiGbl_DbSleepStates[ACPI_NUM_SLEEP_ST
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#define NUM_NS_TYPES INTERNAL_TYPE_INVALID+1
|
||||
#define NUM_PREDEFINED_NAMES 9
|
||||
#define NUM_NS_TYPES ACPI_TYPE_INVALID+1
|
||||
|
||||
#if defined (ACPI_NO_METHOD_EXECUTION) || defined (ACPI_CONSTANT_EVAL_ONLY)
|
||||
#define NUM_PREDEFINED_NAMES 10
|
||||
#else
|
||||
#define NUM_PREDEFINED_NAMES 9
|
||||
#endif
|
||||
|
||||
ACPI_EXTERN ACPI_NAMESPACE_NODE AcpiGbl_RootNodeStruct;
|
||||
ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_RootNode;
|
||||
|
||||
extern const UINT8 AcpiGbl_NsProperties[NUM_NS_TYPES];
|
||||
extern const PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
|
||||
extern const ACPI_PREDEFINED_NAMES AcpiGbl_PreDefinedNames [NUM_PREDEFINED_NAMES];
|
||||
|
||||
#ifdef ACPI_DEBUG
|
||||
#ifdef ACPI_DEBUG_OUTPUT
|
||||
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeCount;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_CurrentNodeSize;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_MaxConcurrentNodeCount;
|
||||
@ -275,7 +294,7 @@ ACPI_EXTERN ACPI_PARSE_OBJECT *AcpiGbl_ParsedNamespaceRoot;
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG];
|
||||
extern ACPI_BIT_REGISTER_INFO AcpiGbl_BitRegisterInfo[ACPI_NUM_BITREG];
|
||||
ACPI_EXTERN UINT8 AcpiGbl_SleepTypeA;
|
||||
ACPI_EXTERN UINT8 AcpiGbl_SleepTypeB;
|
||||
|
||||
@ -288,28 +307,7 @@ ACPI_EXTERN UINT8 AcpiGbl_SleepTypeB;
|
||||
|
||||
extern ACPI_FIXED_EVENT_INFO AcpiGbl_FixedEventInfo[ACPI_NUM_FIXED_EVENTS];
|
||||
ACPI_EXTERN ACPI_FIXED_EVENT_HANDLER AcpiGbl_FixedEventHandlers[ACPI_NUM_FIXED_EVENTS];
|
||||
|
||||
ACPI_EXTERN ACPI_HANDLE AcpiGbl_GpeObjHandle;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_GpeRegisterCount;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_GpeNumberMax;
|
||||
ACPI_EXTERN ACPI_GPE_REGISTER_INFO *AcpiGbl_GpeRegisterInfo;
|
||||
ACPI_EXTERN ACPI_GPE_NUMBER_INFO *AcpiGbl_GpeNumberInfo;
|
||||
ACPI_EXTERN ACPI_GPE_BLOCK_INFO AcpiGbl_GpeBlockInfo[ACPI_MAX_GPE_BLOCKS];
|
||||
|
||||
/*
|
||||
* GPE translation table
|
||||
* Indexed by the GPE number, returns a valid index into the global GPE tables.
|
||||
*
|
||||
* 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 ACPI_GPE_INDEX_INFO *AcpiGbl_GpeNumberToIndex;
|
||||
|
||||
/* AcpiEvent counter for debug only */
|
||||
|
||||
#ifdef ACPI_DEBUG
|
||||
ACPI_EXTERN UINT32 AcpiGbl_EventCount[ACPI_NUM_FIXED_EVENTS];
|
||||
#endif
|
||||
ACPI_EXTERN ACPI_GPE_BLOCK_INFO *AcpiGbl_GpeBlockListHead;
|
||||
|
||||
|
||||
/*****************************************************************************
|
||||
@ -318,10 +316,60 @@ ACPI_EXTERN UINT32 AcpiGbl_EventCount[ACPI_NUM_FIXED_EVENTS
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef ENABLE_DEBUGGER
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_MethodExecuting;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbTerminateThreads;
|
||||
|
||||
ACPI_EXTERN UINT8 AcpiGbl_DbOutputFlags;
|
||||
|
||||
#ifdef ACPI_DISASSEMBLER
|
||||
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_disasm;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_verbose;
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef ACPI_DEBUGGER
|
||||
|
||||
extern BOOLEAN AcpiGbl_MethodExecuting;
|
||||
extern BOOLEAN AcpiGbl_AbortMethod;
|
||||
extern BOOLEAN AcpiGbl_DbTerminateThreads;
|
||||
|
||||
ACPI_EXTERN int optind;
|
||||
ACPI_EXTERN char *optarg;
|
||||
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_tables;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_stats;
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbOpt_ini_methods;
|
||||
|
||||
|
||||
ACPI_EXTERN char *AcpiGbl_DbArgs[ACPI_DEBUGGER_MAX_ARGS];
|
||||
ACPI_EXTERN char AcpiGbl_DbLineBuf[80];
|
||||
ACPI_EXTERN char AcpiGbl_DbParsedBuf[80];
|
||||
ACPI_EXTERN char AcpiGbl_DbScopeBuf[40];
|
||||
ACPI_EXTERN char AcpiGbl_DbDebugFilename[40];
|
||||
ACPI_EXTERN BOOLEAN AcpiGbl_DbOutputToFile;
|
||||
ACPI_EXTERN char *AcpiGbl_DbBuffer;
|
||||
ACPI_EXTERN char *AcpiGbl_DbFilename;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_DbDebugLevel;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_DbConsoleDebugLevel;
|
||||
ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DbTablePtr;
|
||||
ACPI_EXTERN ACPI_NAMESPACE_NODE *AcpiGbl_DbScopeNode;
|
||||
|
||||
/*
|
||||
* Statistic globals
|
||||
*/
|
||||
ACPI_EXTERN UINT16 AcpiGbl_ObjTypeCount[ACPI_TYPE_NS_NODE_MAX+1];
|
||||
ACPI_EXTERN UINT16 AcpiGbl_NodeTypeCount[ACPI_TYPE_NS_NODE_MAX+1];
|
||||
ACPI_EXTERN UINT16 AcpiGbl_ObjTypeCountMisc;
|
||||
ACPI_EXTERN UINT16 AcpiGbl_NodeTypeCountMisc;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_NumNodes;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_NumObjects;
|
||||
|
||||
|
||||
ACPI_EXTERN UINT32 AcpiGbl_SizeOfParseTree;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_SizeOfMethodTrees;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_SizeOfNodeEntries;
|
||||
ACPI_EXTERN UINT32 AcpiGbl_SizeOfAcpiObjects;
|
||||
|
||||
#endif /* ACPI_DEBUGGER */
|
||||
|
||||
|
||||
#endif /* __ACGLOBAL_H__ */
|
||||
|
@ -1,7 +1,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Name: achware.h -- hardware specific interfaces
|
||||
* $Revision: 1.58 $
|
||||
* $Revision: 1.62 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
*
|
||||
* 1. Copyright Notice
|
||||
*
|
||||
* Some or all of this work - Copyright (c) 1999 - 2002, Intel Corp.
|
||||
* Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
|
||||
* All rights reserved.
|
||||
*
|
||||
* 2. License
|
||||
@ -155,91 +155,73 @@ ACPI_BIT_REGISTER_INFO *
|
||||
AcpiHwGetBitRegisterInfo (
|
||||
UINT32 RegisterId);
|
||||
|
||||
UINT32
|
||||
AcpiHwBitRegisterRead (
|
||||
UINT32 RegisterId,
|
||||
UINT32 Flags);
|
||||
|
||||
UINT32
|
||||
AcpiHwBitRegisterWrite (
|
||||
UINT32 RegisterId,
|
||||
UINT32 Value,
|
||||
UINT32 Flags);
|
||||
|
||||
UINT32
|
||||
ACPI_STATUS
|
||||
AcpiHwRegisterRead (
|
||||
BOOLEAN UseLock,
|
||||
UINT32 RegisterId);
|
||||
UINT32 RegisterId,
|
||||
UINT32 *ReturnValue);
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiHwRegisterWrite (
|
||||
BOOLEAN UseLock,
|
||||
UINT32 RegisterId,
|
||||
UINT32 Value);
|
||||
|
||||
UINT32
|
||||
ACPI_STATUS
|
||||
AcpiHwLowLevelRead (
|
||||
UINT32 Width,
|
||||
UINT32 *Value,
|
||||
ACPI_GENERIC_ADDRESS *Reg,
|
||||
UINT32 Offset);
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiHwLowLevelWrite (
|
||||
UINT32 Width,
|
||||
UINT32 Value,
|
||||
ACPI_GENERIC_ADDRESS *Reg,
|
||||
UINT32 Offset);
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiHwClearAcpiStatus (
|
||||
void);
|
||||
|
||||
|
||||
/* GPE support */
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiHwEnableGpe (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
void
|
||||
AcpiHwEnableGpeForWakeup (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiHwDisableGpe (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
void
|
||||
AcpiHwDisableGpeForWakeup (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiHwClearGpe (
|
||||
UINT32 GpeNumber);
|
||||
ACPI_GPE_EVENT_INFO *GpeEventInfo);
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiHwGetGpeStatus (
|
||||
UINT32 GpeNumber,
|
||||
ACPI_EVENT_STATUS *EventStatus);
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiHwDisableNonWakeupGpes (
|
||||
void);
|
||||
|
||||
void
|
||||
ACPI_STATUS
|
||||
AcpiHwEnableNonWakeupGpes (
|
||||
void);
|
||||
|
||||
|
||||
/* Sleep Prototypes */
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHwGetSleepTypeData (
|
||||
UINT8 SleepState,
|
||||
UINT8 *Slp_TypA,
|
||||
UINT8 *Slp_TypB);
|
||||
|
||||
|
||||
/* ACPI Timer prototypes */
|
||||
|
||||
ACPI_STATUS
|
||||
|
Loading…
Reference in New Issue
Block a user