Owner ID redesign and cleanup

date	2005.06.30.21.38.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-07-10 20:25:07 +00:00
parent efd83c339e
commit 2f119256f4
7 changed files with 57 additions and 47 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acexcep.h - Exception codes returned by the ACPI subsystem
* $Revision: 1.72 $
* $Revision: 1.75 $
*
*****************************************************************************/
@ -9,7 +9,7 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp.
* Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
* All rights reserved.
*
* 2. License
@ -121,7 +121,6 @@
/*
* Exceptions returned by external ACPI interfaces
*/
#define AE_CODE_ENVIRONMENTAL 0x0000
#define AE_CODE_PROGRAMMER 0x1000
#define AE_CODE_ACPI_TABLES 0x2000
@ -169,8 +168,10 @@
#define AE_ABORT_METHOD (ACPI_STATUS) (0x001C | AE_CODE_ENVIRONMENTAL)
#define AE_SAME_HANDLER (ACPI_STATUS) (0x001D | AE_CODE_ENVIRONMENTAL)
#define AE_WAKE_ONLY_GPE (ACPI_STATUS) (0x001E | AE_CODE_ENVIRONMENTAL)
#define AE_OWNER_ID_LIMIT (ACPI_STATUS) (0x001F | AE_CODE_ENVIRONMENTAL)
#define AE_CODE_ENV_MAX 0x001F
#define AE_CODE_ENV_MAX 0x001E
/*
* Programmer exceptions
@ -241,6 +242,7 @@
#define AE_CODE_AML_MAX 0x0021
/*
* Internal exceptions used for control
*/
@ -261,6 +263,7 @@
#ifdef DEFINE_ACPI_GLOBALS
/*
* String versions of the exception codes above
* These strings must match the corresponding defines exactly
@ -297,7 +300,8 @@ char const *AcpiGbl_ExceptionNames_Env[] =
"AE_LOGICAL_ADDRESS",
"AE_ABORT_METHOD",
"AE_SAME_HANDLER",
"AE_WAKE_ONLY_GPE"
"AE_WAKE_ONLY_GPE",
"AE_OWNER_ID_LIMIT"
};
char const *AcpiGbl_ExceptionNames_Pgm[] =
@ -377,5 +381,4 @@ char const *AcpiGbl_ExceptionNames_Ctrl[] =
#endif /* ACPI GLOBALS */
#endif /* __ACEXCEP_H__ */

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acglobal.h - Declarations for global variables
* $Revision: 1.166 $
* $Revision: 1.167 $
*
*****************************************************************************/
@ -291,9 +291,8 @@ ACPI_EXTERN UINT32 AcpiGbl_OriginalMode;
ACPI_EXTERN UINT32 AcpiGbl_RsdpOriginalLocation;
ACPI_EXTERN UINT32 AcpiGbl_NsLookupCount;
ACPI_EXTERN UINT32 AcpiGbl_PsFindCount;
ACPI_EXTERN UINT32 AcpiGbl_OwnerIdMask;
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;

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
* $Revision: 1.210 $
* $Revision: 1.211 $
*
*****************************************************************************/
@ -129,6 +129,13 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
#define AML_NUM_OPCODES 0x7F
/* Forward declarations */
struct acpi_walk_state;
struct acpi_obj_mutex;
union acpi_parse_object;
/*****************************************************************************
*
* Mutex typedefs and structs
@ -189,20 +196,25 @@ static char *AcpiGbl_MutexNames[] =
#endif
/* Owner IDs are used to track namespace nodes for selective deletion */
typedef UINT8 ACPI_OWNER_ID;
#define ACPI_OWNER_ID_MAX 0xFF
/* This Thread ID means that the mutex is not in use (unlocked) */
#define ACPI_MUTEX_NOT_ACQUIRED (UINT32) -1
/* Table for the global mutexes */
typedef struct acpi_mutex_info
{
ACPI_MUTEX Mutex;
UINT32 UseCount;
UINT32 OwnerId;
UINT32 ThreadId;
} ACPI_MUTEX_INFO;
/* This owner ID means that the mutex is not in use (unlocked) */
#define ACPI_MUTEX_NOT_ACQUIRED (UINT32) (-1)
/* Lock flag parameter for various interfaces */
@ -210,13 +222,6 @@ typedef struct acpi_mutex_info
#define ACPI_MTX_LOCK 1
typedef UINT16 ACPI_OWNER_ID;
#define ACPI_OWNER_TYPE_TABLE 0x0
#define ACPI_OWNER_TYPE_METHOD 0x1
#define ACPI_FIRST_METHOD_ID 0x0001
#define ACPI_FIRST_TABLE_ID 0xF000
/* Field access granularities */
#define ACPI_FIELD_BYTE_GRANULARITY 1
@ -260,14 +265,21 @@ typedef struct acpi_namespace_node
{
UINT8 Descriptor; /* Used to differentiate object descriptor types */
UINT8 Type; /* Type associated with this name */
UINT16 OwnerId;
UINT16 ReferenceCount; /* Current count of references and children */
ACPI_NAME_UNION Name; /* ACPI Name, always 4 chars per ACPI spec */
union acpi_operand_object *Object; /* Pointer to attached ACPI object (optional) */
struct acpi_namespace_node *Child; /* First child */
struct acpi_namespace_node *Peer; /* Next peer*/
UINT16 ReferenceCount; /* Current count of references and children */
UINT8 OwnerId; /* Who created this node */
UINT8 Flags;
/* Fields used by the ASL compiler only */
#ifdef ACPI_ASL_COMPILER
UINT32 Value;
union acpi_parse_object *Op;
#endif
} ACPI_NAMESPACE_NODE;
@ -298,7 +310,7 @@ typedef struct acpi_table_desc
UINT64 PhysicalAddress;
UINT32 AmlLength;
ACPI_SIZE Length;
ACPI_OWNER_ID TableId;
ACPI_OWNER_ID OwnerId;
UINT8 Type;
UINT8 Allocation;
BOOLEAN LoadedIntoNamespace;
@ -513,13 +525,6 @@ typedef struct acpi_field_info
#define ACPI_CONTROL_PREDICATE_TRUE 0xC4
/* Forward declarations */
struct acpi_walk_state;
struct acpi_obj_mutex;
union acpi_parse_object;
#define ACPI_STATE_COMMON /* Two 32-bit fields and a pointer */\
UINT8 DataType; /* To differentiate various internal objs */\
UINT8 Flags; \

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acnamesp.h - Namespace subcomponent prototypes and defines
* $Revision: 1.140 $
* $Revision: 1.141 $
*
*****************************************************************************/
@ -236,7 +236,7 @@ AcpiNsDeleteNamespaceSubtree (
void
AcpiNsDeleteNamespaceByOwner (
UINT16 TableId);
ACPI_OWNER_ID OwnerId);
void
AcpiNsDetachObject (
@ -289,7 +289,7 @@ AcpiNsDumpObjects (
ACPI_OBJECT_TYPE Type,
UINT8 DisplayType,
UINT32 MaxDepth,
UINT32 OwnderId,
ACPI_OWNER_ID OwnerId,
ACPI_HANDLE StartHandle);

View File

@ -2,7 +2,7 @@
/******************************************************************************
*
* Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only)
* $Revision: 1.127 $
* $Revision: 1.130 $
*
*****************************************************************************/
@ -10,7 +10,7 @@
*
* 1. Copyright Notice
*
* Some or all of this work - Copyright (c) 1999 - 2004, Intel Corp.
* Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
* All rights reserved.
*
* 2. License
@ -208,6 +208,7 @@ typedef struct acpi_object_integer
} ACPI_OBJECT_INTEGER;
/*
* Note: The String and Buffer object must be identical through the Pointer
* element. There is code that depends on this.
@ -277,7 +278,7 @@ typedef struct acpi_object_method
ACPI_INTERNAL_METHOD Implementation;
UINT8 Concurrency;
UINT8 ThreadCount;
ACPI_OWNER_ID OwningId;
ACPI_OWNER_ID OwnerId;
} ACPI_OBJECT_METHOD;
@ -566,7 +567,6 @@ typedef union acpi_operand_object
*
*****************************************************************************/
/* Object descriptor types */
#define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acstruct.h - Internal structs
* $Revision: 1.33 $
* $Revision: 1.34 $
*
*****************************************************************************/
@ -144,7 +144,6 @@ typedef struct acpi_walk_state
UINT8 WalkType;
ACPI_OWNER_ID OwnerId; /* Owner of objects created during the walk */
BOOLEAN LastPredicate; /* Result of last predicate */
UINT8 Reserved; /* For alignment */
UINT8 CurrentResult; /* */
UINT8 NextOpInfo; /* Info about NextOp */
UINT8 NumOperands; /* Stack pointer for Operands[] array */
@ -230,7 +229,7 @@ typedef struct acpi_device_walk_info
typedef struct acpi_walk_info
{
UINT32 DebugLevel;
UINT32 OwnerId;
ACPI_OWNER_ID OwnerId;
UINT8 DisplayType;
} ACPI_WALK_INFO;

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acutils.h -- prototypes for the common (subsystem-wide) procedures
* $Revision: 1.176 $
* $Revision: 1.177 $
*
*****************************************************************************/
@ -194,10 +194,6 @@ BOOLEAN
AcpiUtValidObjectType (
ACPI_OBJECT_TYPE Type);
ACPI_OWNER_ID
AcpiUtAllocateOwnerId (
UINT32 IdType);
/*
* utinit - miscellaneous initialization and shutdown
@ -671,6 +667,14 @@ AcpiUtShortDivide (
* utmisc
*/
ACPI_STATUS
AcpiUtAllocateOwnerId (
ACPI_OWNER_ID *OwnerId);
ACPI_STATUS
AcpiUtReleaseOwnerId (
ACPI_OWNER_ID OwnerId);
ACPI_STATUS
AcpiUtWalkPackageTree (
ACPI_OPERAND_OBJECT *SourceObject,
void *TargetObject,