Cleanup prior to label

date	2001.04.26.23.09.00;	author rmoore1;	state Exp;
This commit is contained in:
aystarik 2005-06-29 19:44:01 +00:00
parent 1dd6649765
commit e9d758e9c1
2 changed files with 136 additions and 54 deletions

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: aclocal.h - Internal data types used across the ACPI subsystem
* $Revision: 1.115 $
* $Revision: 1.117 $
*
*****************************************************************************/
@ -134,7 +134,6 @@ typedef UINT32 ACPI_MUTEX_HANDLE;
#define ACPI_DESC_TYPE_NAMED 0xAA
/*****************************************************************************
*
* Mutex typedefs and structs
@ -207,7 +206,7 @@ typedef struct AcpiMutexInfo
} ACPI_MUTEX_INFO;
/* This owner ID means that the mutex is not in use (unlocked) */
#define ACPI_MUTEX_NOT_ACQUIRED (UINT32) (-1)
@ -228,7 +227,6 @@ typedef UINT16 ACPI_OWNER_ID;
#define TABLE_ID_DSDT (ACPI_OWNER_ID) 0x8000
/*****************************************************************************
*
* Namespace typedefs and structs
@ -327,14 +325,10 @@ typedef struct
/*
* Predefined Namespace items
*/
#define ACPI_MAX_ADDRESS_SPACE 255
#define ACPI_NUM_ADDRESS_SPACES 256
typedef struct
{
NATIVE_CHAR *Name;
ACPI_OBJECT_TYPE Type;
ACPI_OBJECT_TYPE8 Type;
NATIVE_CHAR *Val;
} PREDEFINED_NAMES;
@ -347,7 +341,6 @@ typedef struct
#define ACPI_COPY_TYPE_PACKAGE 1
/*****************************************************************************
*
* Event typedefs and structs
@ -378,10 +371,10 @@ typedef struct
typedef struct
{
ADDRESS_SPACE_HANDLER Handler;
ACPI_ADR_SPACE_HANDLER Handler;
void *Context;
} ACPI_ADDRESS_SPACE_INFO;
} ACPI_ADR_SPACE_INFO;
/* Values and addresses of the GPE registers (both banks) */
@ -408,7 +401,7 @@ typedef struct
UINT8 Type; /* Level or Edge */
ACPI_HANDLE MethodHandle; /* Method handle for direct (fast) execution */
GPE_HANDLER Handler; /* Address of handler, if any */
ACPI_GPE_HANDLER Handler; /* Address of handler, if any */
void *Context; /* Context to be passed to handler */
} ACPI_GPE_LEVEL_INFO;
@ -418,7 +411,7 @@ typedef struct
typedef struct
{
FIXED_EVENT_HANDLER Handler; /* Address of handler. */
ACPI_EVENT_HANDLER Handler; /* Address of handler. */
void *Context; /* Context to be passed to handler */
} ACPI_FIXED_EVENT_INFO;
@ -513,7 +506,6 @@ typedef struct acpi_control_state
/*
* Scope state - current scope during namespace lookups
*/
typedef struct acpi_scope_state
{
ACPI_STATE_COMMON
@ -552,7 +544,6 @@ typedef struct acpi_result_values
* Notify info - used to pass info to the deferred notify
* handler/dispatcher.
*/
typedef struct acpi_notify_info
{
ACPI_STATE_COMMON
@ -597,7 +588,6 @@ ACPI_STATUS (*ACPI_PARSE_UPWARDS) (
*
****************************************************************************/
#define ACPI_OP_CLASS_MASK 0x1F
#define ACPI_OP_ARGS_MASK 0x20
#define ACPI_OP_TYPE_MASK 0xC0
@ -849,54 +839,55 @@ typedef struct acpi_parse_state
#define ACPI_WRITE 2
/* Plug and play */
/*****************************************************************************
*
* Resource descriptors
*
****************************************************************************/
/* Pnp and ACPI data */
#define VERSION_NO 0x01
#define LOGICAL_DEVICE_ID 0x02
#define COMPATIBLE_DEVICE_ID 0x03
#define IRQ_FORMAT 0x04
#define DMA_FORMAT 0x05
#define START_DEPENDENT_TAG 0x06
#define END_DEPENDENT_TAG 0x07
#define IO_PORT_DESCRIPTOR 0x08
#define FIXED_LOCATION_IO_DESCRIPTOR 0x09
#define RESERVED_TYPE0 0x0A
#define RESERVED_TYPE1 0x0B
#define RESERVED_TYPE2 0x0C
#define RESERVED_TYPE3 0x0D
#define SMALL_VENDOR_DEFINED 0x0E
#define END_TAG 0x0F
/* ResourceType values */
/* Pnp and ACPI data */
#define RESOURCE_TYPE_MEMORY_RANGE 0
#define RESOURCE_TYPE_IO_RANGE 1
#define RESOURCE_TYPE_BUS_NUMBER_RANGE 2
#define MEMORY_RANGE_24 0x81
#define ISA_MEMORY_RANGE 0x81
#define LARGE_VENDOR_DEFINED 0x84
#define EISA_MEMORY_RANGE 0x85
#define MEMORY_RANGE_32 0x85
#define FIXED_EISA_MEMORY_RANGE 0x86
#define FIXED_MEMORY_RANGE_32 0x86
/*
* Small resource descriptors
*/
#define RESOURCE_DESC_SMALL_MASK 0x78
#define RESOURCE_DESC_IRQ_FORMAT 0x22
#define RESOURCE_DESC_DMA_FORMAT 0x2A
#define RESOURCE_DESC_START_DEPENDENT 0x30
#define RESOURCE_DESC_END_DEPENDENT 0x38
#define RESOURCE_DESC_IO_PORT 0x47
#define RESOURCE_DESC_FIXED_IO_PORT 0x4B
#define RESOURCE_DESC_SMALL_VENDOR 0x70
#define RESOURCE_DESC_END_TAG 0x79
/* ACPI only data */
/*
* Large resource descriptors
*/
#define RESOURCE_DESC_MEMORY_24 0x81
#define RESOURCE_DESC_GENERAL_REGISTER 0x82
#define RESOURCE_DESC_LARGE_VENDOR 0x84
#define RESOURCE_DESC_MEMORY_32 0x85
#define RESOURCE_DESC_FIXED_MEMORY_32 0x86
#define RESOURCE_DESC_DWORD_ADDRESS_SPACE 0x87
#define RESOURCE_DESC_WORD_ADDRESS_SPACE 0x88
#define RESOURCE_DESC_EXTENDED_XRUPT 0x89
#define RESOURCE_DESC_QWORD_ADDRESS_SPACE 0x8A
#define DWORD_ADDRESS_SPACE 0x87
#define WORD_ADDRESS_SPACE 0x88
#define EXTENDED_IRQ 0x89
#define QWORD_ADDRESS_SPACE 0x8A
/* MUST HAVES */
/* String version of device HIDs and UIDs */
#define DEVICE_ID_LENGTH 0x09
#define ACPI_DEVICE_ID_LENGTH 0x09
typedef struct
{
NATIVE_CHAR Buffer[DEVICE_ID_LENGTH];
} DEVICE_ID;
NATIVE_CHAR Buffer[ACPI_DEVICE_ID_LENGTH];
} ACPI_DEVICE_ID;
/*****************************************************************************

View File

@ -1,7 +1,7 @@
/******************************************************************************
*
* Name: acmacros.h - C macros for the entire subsystem.
* $Revision: 1.64 $
* $Revision: 1.67 $
*
*****************************************************************************/
@ -278,6 +278,8 @@
#define ROUND_PTR_UP_TO_4(a,b) ((b *)(((NATIVE_UINT)(a) + 3) & ~3))
#define ROUND_PTR_UP_TO_8(a,b) ((b *)(((NATIVE_UINT)(a) + 7) & ~7))
#define ROUND_BITS_UP_TO_BYTES(a) DIV_8((a) + 7)
#define ROUND_UP_TO_1K(a) (((a) + 1023) >> 10)
#ifdef DEBUG_ASSERT
@ -376,6 +378,26 @@
#define INCREMENT_ARG_LIST(List) (List >>= ((UINT32) ARG_TYPE_WIDTH))
/*
* Build a GAS structure from earlier ACPI table entries (V1.0 and 0.71 extensions)
*
* 1) Address space
* 2) Length in bytes -- convert to length in bits
* 3) Bit offset is zero
* 4) Reserved field is zero
* 5) Expand address to 64 bits
*/
#define ASL_BUILD_GAS_FROM_ENTRY(a,b,c,d) {a.AddressSpaceId = (UINT8) d;\
a.RegisterBitWidth = (UINT8) MUL_8 (b);\
a.RegisterBitOffset = 0;\
a.Reserved = 0;\
ACPI_STORE_ADDRESS (a.Address,c);}
/* ACPI V1.0 entries -- address space is always I/O */
#define ASL_BUILD_GAS_FROM_V1_ENTRY(a,b,c) ASL_BUILD_GAS_FROM_ENTRY(a,b,c,ACPI_ADR_SPACE_SYSTEM_IO)
/*
* Reporting macros that are never compiled out
*/
@ -599,4 +621,73 @@
#endif
/*
* Memory allocation tracking (DEBUG ONLY)
*/
#ifndef ACPI_DEBUG_TRACK_ALLOCATIONS
#define AcpiCmAddElementToAllocList(a,b,c,d,e,f)
#define AcpiCmDeleteElementFromAllocList(a,b,c,d)
#define AcpiCmDumpCurrentAllocations(a,b)
#define AcpiCmDumpAllocationInfo()
#define DECREMENT_OBJECT_METRICS(a)
#define INCREMENT_OBJECT_METRICS(a)
#define INITIALIZE_ALLOCATION_METRICS()
#define DECREMENT_NAME_TABLE_METRICS(a)
#define INCREMENT_NAME_TABLE_METRICS(a)
#else
#define INITIALIZE_ALLOCATION_METRICS() \
AcpiGbl_CurrentObjectCount = 0; \
AcpiGbl_CurrentObjectSize = 0; \
AcpiGbl_RunningObjectCount = 0; \
AcpiGbl_RunningObjectSize = 0; \
AcpiGbl_MaxConcurrentObjectCount = 0; \
AcpiGbl_MaxConcurrentObjectSize = 0; \
AcpiGbl_CurrentAllocSize = 0; \
AcpiGbl_CurrentAllocCount = 0; \
AcpiGbl_RunningAllocSize = 0; \
AcpiGbl_RunningAllocCount = 0; \
AcpiGbl_MaxConcurrentAllocSize = 0; \
AcpiGbl_MaxConcurrentAllocCount = 0; \
AcpiGbl_CurrentNodeCount = 0; \
AcpiGbl_CurrentNodeSize = 0; \
AcpiGbl_MaxConcurrentNodeCount = 0
#define DECREMENT_OBJECT_METRICS(a) \
AcpiGbl_CurrentObjectCount--; \
AcpiGbl_CurrentObjectSize -= a
#define INCREMENT_OBJECT_METRICS(a) \
AcpiGbl_CurrentObjectCount++; \
AcpiGbl_RunningObjectCount++; \
if (AcpiGbl_MaxConcurrentObjectCount < AcpiGbl_CurrentObjectCount) \
{ \
AcpiGbl_MaxConcurrentObjectCount = AcpiGbl_CurrentObjectCount; \
} \
AcpiGbl_RunningObjectSize += a; \
AcpiGbl_CurrentObjectSize += a; \
if (AcpiGbl_MaxConcurrentObjectSize < AcpiGbl_CurrentObjectSize) \
{ \
AcpiGbl_MaxConcurrentObjectSize = AcpiGbl_CurrentObjectSize; \
}
#define DECREMENT_NAME_TABLE_METRICS(a) \
AcpiGbl_CurrentNodeCount--; \
AcpiGbl_CurrentNodeSize -= (a)
#define INCREMENT_NAME_TABLE_METRICS(a) \
AcpiGbl_CurrentNodeCount++; \
AcpiGbl_CurrentNodeSize+= (a); \
if (AcpiGbl_MaxConcurrentNodeCount < AcpiGbl_CurrentNodeCount) \
{ \
AcpiGbl_MaxConcurrentNodeCount = AcpiGbl_CurrentNodeCount; \
}
#endif /* ACPI_DEBUG_TRACK_ALLOCATIONS */
#endif /* ACMACROS_H */