Macro rename and cleanup

date	2001.11.21.17.06.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 19:44:43 +00:00
parent 5924bf53dd
commit 3d2c59693d
2 changed files with 35 additions and 26 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
* $Revision: 1.143 $
* $Revision: 1.146 $
*
*****************************************************************************/
@ -140,6 +140,7 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
#define ACPI_DESC_TYPE_STATE_WSCOPE 0x26
#define ACPI_DESC_TYPE_STATE_RESULT 0x27
#define ACPI_DESC_TYPE_STATE_NOTIFY 0x28
#define ACPI_DESC_TYPE_STATE_THREAD 0x29
#define ACPI_DESC_TYPE_WALK 0x44
#define ACPI_DESC_TYPE_PARSER 0x66
#define ACPI_DESC_TYPE_INTERNAL 0x88
@ -274,7 +275,7 @@ typedef enum
typedef struct acpi_node
{
UINT8 DataType;
UINT8 Descriptor; /* Used to differentiate object descriptor types */
UINT8 Type; /* Type associated with this name */
UINT16 OwnerId;
UINT32 Name; /* ACPI Name, always 4 chars per ACPI spec */
@ -388,19 +389,11 @@ typedef struct
UINT32 FieldBitPosition;
UINT32 FieldBitLength;
UINT8 FieldFlags;
UINT8 Attribute;
UINT8 FieldType;
} ACPI_CREATE_FIELD_INFO;
/*
* Field flags: Bits 00 - 03 : AccessType (AnyAcc, ByteAcc, etc.)
* 04 : LockRule (1 == Lock)
* 05 - 06 : UpdateRule
*/
#define FIELD_ACCESS_TYPE_MASK 0x0F
#define FIELD_LOCK_RULE_MASK 0x10
#define FIELD_UPDATE_RULE_MASK 0x60
/*****************************************************************************
@ -496,7 +489,6 @@ typedef struct
/* Forward declarations */
struct acpi_walk_state;
struct acpi_walk_list;
struct acpi_parse_obj;
struct acpi_obj_mutex;
@ -550,7 +542,7 @@ typedef struct acpi_control_state
{
ACPI_STATE_COMMON
struct acpi_parse_obj *PredicateOp;
UINT8 *AmlPredicateStart; /* Start of if/while predicate */
UINT8 *AmlPredicateStart; /* Start of if/while predicate */
} ACPI_CONTROL_STATE;
@ -569,15 +561,30 @@ typedef struct acpi_scope_state
typedef struct acpi_pscope_state
{
ACPI_STATE_COMMON
struct acpi_parse_obj *Op; /* current op being parsed */
UINT8 *ArgEnd; /* current argument end */
UINT8 *PkgEnd; /* current package end */
UINT32 ArgList; /* next argument to parse */
UINT32 ArgCount; /* Number of fixed arguments */
struct acpi_parse_obj *Op; /* current op being parsed */
UINT8 *ArgEnd; /* current argument end */
UINT8 *PkgEnd; /* current package end */
UINT32 ArgList; /* next argument to parse */
UINT32 ArgCount; /* Number of fixed arguments */
} ACPI_PSCOPE_STATE;
/*
* Thread state - one per thread across multiple walk states. Multiple walk
* states are created when there are nested control methods executing.
*/
typedef struct acpi_thread_state
{
ACPI_STATE_COMMON
struct acpi_walk_state *WalkStateList; /* Head of list of WalkStates for this thread */
union acpi_operand_obj *AcquiredMutexList; /* List of all currently acquired mutexes */
UINT32 ThreadId; /* Running thread ID */
UINT16 CurrentSyncLevel; /* Mutex Sync (nested acquire) level */
} ACPI_THREAD_STATE;
/*
* Result values - used to accumulate the results of nested
* AML arguments
@ -625,6 +632,7 @@ typedef union acpi_gen_state
ACPI_SCOPE_STATE Scope;
ACPI_PSCOPE_STATE ParseScope;
ACPI_PKG_STATE Pkg;
ACPI_THREAD_STATE Thread;
ACPI_RESULT_VALUES Results;
ACPI_NOTIFY_INFO Notify;

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
* $Revision: 1.98 $
* $Revision: 1.101 $
*
*****************************************************************************/
@ -321,8 +321,8 @@
* MASK_BITS_ABOVE creates a mask starting AT the position and above
* MASK_BITS_BELOW creates a mask starting one bit BELOW the position
*/
#define MASK_BITS_ABOVE(position) (~(((UINT32)(-1)) << ((UINT32) (position))))
#define MASK_BITS_BELOW(position) (((UINT32)(-1)) << ((UINT32) (position)))
#define MASK_BITS_ABOVE(position) (~(((ACPI_INTEGER)(-1)) << ((UINT32) (position))))
#define MASK_BITS_BELOW(position) (((ACPI_INTEGER)(-1)) << ((UINT32) (position)))
/* Macros for GAS addressing */
@ -348,18 +348,19 @@
#endif
/*
* An ACPI_HANDLE (which is actually an ACPI_NAMESPACE_NODE *) can appear in some contexts,
* such as on apObjStack, where a pointer to an ACPI_OPERAND_OBJECT can also
* An ACPI_NAMESPACE_NODE * can appear in some contexts,
* where a pointer to an ACPI_OPERAND_OBJECT can also
* appear. This macro is used to distinguish them.
*
* The DataType field is the first field in both structures.
* The "Descriptor" field is the first field in both structures.
*/
#define VALID_DESCRIPTOR_TYPE(d,t) (((ACPI_NAMESPACE_NODE *)d)->DataType == t)
#define ACPI_GET_DESCRIPTOR_TYPE(d) (((ACPI_NAMESPACE_NODE *)d)->Descriptor)
#define ACPI_SET_DESCRIPTOR_TYPE(d,t) (((ACPI_NAMESPACE_NODE *)d)->Descriptor = t)
/* Macro to test the object type */
#define IS_THIS_OBJECT_TYPE(d,t) (((ACPI_OPERAND_OBJECT *)d)->Common.Type == (UINT8)t)
#define ACPI_GET_OBJECT_TYPE(d) (((ACPI_OPERAND_OBJECT *)d)->Common.Type)
/* Macro to check the table flags for SINGLE or MULTIPLE tables are allowed */