diff options
Diffstat (limited to 'sys/contrib/dev/acpica/aclocal.h')
-rw-r--r-- | sys/contrib/dev/acpica/aclocal.h | 166 |
1 files changed, 81 insertions, 85 deletions
diff --git a/sys/contrib/dev/acpica/aclocal.h b/sys/contrib/dev/acpica/aclocal.h index 87bfc4c..314d69b 100644 --- a/sys/contrib/dev/acpica/aclocal.h +++ b/sys/contrib/dev/acpica/aclocal.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: aclocal.h - Internal data types used across the ACPI subsystem - * $Revision: 202 $ + * $Revision: 1.215 $ * *****************************************************************************/ @@ -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 @@ -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 @@ -145,7 +152,6 @@ typedef UINT32 ACPI_MUTEX_HANDLE; * * NOTE: any changes here must be reflected in the AcpiGbl_MutexNames table also! */ - #define ACPI_MTX_EXECUTE 0 #define ACPI_MTX_INTERPRETER 1 #define ACPI_MTX_PARSER 2 @@ -190,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 */ @@ -211,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 @@ -225,13 +229,13 @@ typedef UINT16 ACPI_OWNER_ID; #define ACPI_FIELD_DWORD_GRANULARITY 4 #define ACPI_FIELD_QWORD_GRANULARITY 8 + /***************************************************************************** * * Namespace typedefs and structs * ****************************************************************************/ - /* Operational modes of the AML interpreter/scanner */ typedef enum @@ -250,7 +254,6 @@ typedef enum * DataType is used to differentiate between internal descriptors, and MUST * be the first byte in this structure. */ - typedef union acpi_name_union { UINT32 Integer; @@ -262,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; @@ -300,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; @@ -455,7 +465,7 @@ typedef struct acpi_gpe_xrupt_info struct acpi_gpe_xrupt_info *Previous; struct acpi_gpe_xrupt_info *Next; ACPI_GPE_BLOCK_INFO *GpeBlockListHead; /* List of GPE blocks for this xrupt */ - UINT32 InterruptLevel; /* System interrupt level */ + UINT32 InterruptNumber; /* System interrupt number */ } ACPI_GPE_XRUPT_INFO; @@ -508,7 +518,6 @@ typedef struct acpi_field_info * ****************************************************************************/ - #define ACPI_CONTROL_NORMAL 0xC0 #define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1 #define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2 @@ -516,12 +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; \ @@ -704,7 +707,6 @@ typedef struct acpi_opcode_info } ACPI_OPCODE_INFO; - typedef union acpi_parse_value { ACPI_INTEGER Integer; /* Integer constant (Up to 64 bits) */ @@ -717,7 +719,6 @@ typedef union acpi_parse_value } ACPI_PARSE_VALUE; - #define ACPI_PARSE_COMMON \ UINT8 DataType; /* To differentiate various internal objs */\ UINT8 Flags; /* Type of Op */\ @@ -797,7 +798,6 @@ typedef struct acpi_parse_obj_asl } ACPI_PARSE_OBJ_ASL; - typedef union acpi_parse_object { ACPI_PARSE_OBJ_COMMON Common; @@ -850,6 +850,7 @@ typedef struct acpi_parse_state ****************************************************************************/ #define PCI_ROOT_HID_STRING "PNP0A03" +#define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08" typedef struct acpi_bit_register_info { @@ -883,6 +884,7 @@ typedef struct acpi_bit_register_info #define ACPI_BITMASK_POWER_BUTTON_STATUS 0x0100 #define ACPI_BITMASK_SLEEP_BUTTON_STATUS 0x0200 #define ACPI_BITMASK_RT_CLOCK_STATUS 0x0400 +#define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000 /* ACPI 3.0 */ #define ACPI_BITMASK_WAKE_STATUS 0x8000 #define ACPI_BITMASK_ALL_FIXED_STATUS (ACPI_BITMASK_TIMER_STATUS | \ @@ -898,6 +900,7 @@ typedef struct acpi_bit_register_info #define ACPI_BITMASK_POWER_BUTTON_ENABLE 0x0100 #define ACPI_BITMASK_SLEEP_BUTTON_ENABLE 0x0200 #define ACPI_BITMASK_RT_CLOCK_ENABLE 0x0400 +#define ACPI_BITMASK_PCIEXP_WAKE_DISABLE 0x4000 /* ACPI 3.0 */ #define ACPI_BITMASK_SCI_ENABLE 0x0001 #define ACPI_BITMASK_BUS_MASTER_RLD 0x0002 @@ -916,6 +919,7 @@ typedef struct acpi_bit_register_info #define ACPI_BITPOSITION_POWER_BUTTON_STATUS 0x08 #define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS 0x09 #define ACPI_BITPOSITION_RT_CLOCK_STATUS 0x0A +#define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS 0x0E /* ACPI 3.0 */ #define ACPI_BITPOSITION_WAKE_STATUS 0x0F #define ACPI_BITPOSITION_TIMER_ENABLE 0x00 @@ -923,6 +927,7 @@ typedef struct acpi_bit_register_info #define ACPI_BITPOSITION_POWER_BUTTON_ENABLE 0x08 #define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE 0x09 #define ACPI_BITPOSITION_RT_CLOCK_ENABLE 0x0A +#define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE 0x0E /* ACPI 3.0 */ #define ACPI_BITPOSITION_SCI_ENABLE 0x00 #define ACPI_BITPOSITION_BUS_MASTER_RLD 0x01 @@ -939,48 +944,55 @@ typedef struct acpi_bit_register_info * ****************************************************************************/ - /* ResourceType values */ -#define ACPI_RESOURCE_TYPE_MEMORY_RANGE 0 -#define ACPI_RESOURCE_TYPE_IO_RANGE 1 -#define ACPI_RESOURCE_TYPE_BUS_NUMBER_RANGE 2 +#define ACPI_ADDRESS_TYPE_MEMORY_RANGE 0 +#define ACPI_ADDRESS_TYPE_IO_RANGE 1 +#define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2 /* Resource descriptor types and masks */ -#define ACPI_RDESC_TYPE_LARGE 0x80 -#define ACPI_RDESC_TYPE_SMALL 0x00 +#define ACPI_RESOURCE_NAME_LARGE 0x80 +#define ACPI_RESOURCE_NAME_SMALL 0x00 -#define ACPI_RDESC_TYPE_MASK 0x80 -#define ACPI_RDESC_SMALL_MASK 0x78 /* Only bits 6:3 contain the type */ +#define ACPI_RESOURCE_NAME_SMALL_MASK 0x78 /* Bits 6:3 contain the type */ +#define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 contain the length */ +#define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 contain the type */ /* - * Small resource descriptor types - * Note: The 3 length bits (2:0) must be zero + * Small resource descriptor "names" as defined by the ACPI specification. + * Note: Bits 2:0 are used for the descriptor length */ -#define ACPI_RDESC_TYPE_IRQ_FORMAT 0x20 -#define ACPI_RDESC_TYPE_DMA_FORMAT 0x28 -#define ACPI_RDESC_TYPE_START_DEPENDENT 0x30 -#define ACPI_RDESC_TYPE_END_DEPENDENT 0x38 -#define ACPI_RDESC_TYPE_IO_PORT 0x40 -#define ACPI_RDESC_TYPE_FIXED_IO_PORT 0x48 -#define ACPI_RDESC_TYPE_SMALL_VENDOR 0x70 -#define ACPI_RDESC_TYPE_END_TAG 0x78 +#define ACPI_RESOURCE_NAME_IRQ 0x20 +#define ACPI_RESOURCE_NAME_DMA 0x28 +#define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30 +#define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38 +#define ACPI_RESOURCE_NAME_IO 0x40 +#define ACPI_RESOURCE_NAME_FIXED_IO 0x48 +#define ACPI_RESOURCE_NAME_RESERVED_S1 0x50 +#define ACPI_RESOURCE_NAME_RESERVED_S2 0x58 +#define ACPI_RESOURCE_NAME_RESERVED_S3 0x60 +#define ACPI_RESOURCE_NAME_RESERVED_S4 0x68 +#define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70 +#define ACPI_RESOURCE_NAME_END_TAG 0x78 /* - * Large resource descriptor types + * Large resource descriptor "names" as defined by the ACPI specification. + * Note: includes the Large Descriptor bit in bit[7] */ - -#define ACPI_RDESC_TYPE_MEMORY_24 0x81 -#define ACPI_RDESC_TYPE_GENERAL_REGISTER 0x82 -#define ACPI_RDESC_TYPE_LARGE_VENDOR 0x84 -#define ACPI_RDESC_TYPE_MEMORY_32 0x85 -#define ACPI_RDESC_TYPE_FIXED_MEMORY_32 0x86 -#define ACPI_RDESC_TYPE_DWORD_ADDRESS_SPACE 0x87 -#define ACPI_RDESC_TYPE_WORD_ADDRESS_SPACE 0x88 -#define ACPI_RDESC_TYPE_EXTENDED_XRUPT 0x89 -#define ACPI_RDESC_TYPE_QWORD_ADDRESS_SPACE 0x8A +#define ACPI_RESOURCE_NAME_MEMORY24 0x81 +#define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82 +#define ACPI_RESOURCE_NAME_RESERVED_L1 0x83 +#define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84 +#define ACPI_RESOURCE_NAME_MEMORY32 0x85 +#define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86 +#define ACPI_RESOURCE_NAME_ADDRESS32 0x87 +#define ACPI_RESOURCE_NAME_ADDRESS16 0x88 +#define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89 +#define ACPI_RESOURCE_NAME_ADDRESS64 0x8A +#define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B +#define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B /***************************************************************************** @@ -989,7 +1001,7 @@ typedef struct acpi_bit_register_info * ****************************************************************************/ -#define ACPI_ASCII_ZERO 0x30 +#define ACPI_ASCII_ZERO 0x30 /***************************************************************************** @@ -1028,15 +1040,6 @@ typedef struct acpi_integrity_info * ****************************************************************************/ -typedef struct acpi_debug_print_info -{ - UINT32 ComponentId; - char *ProcName; - char *ModuleName; - -} ACPI_DEBUG_PRINT_INFO; - - /* Entry for a memory allocation (debug only) */ #define ACPI_MEM_MALLOC 0 @@ -1068,24 +1071,18 @@ typedef struct acpi_debug_mem_block #define ACPI_MEM_LIST_GLOBAL 0 #define ACPI_MEM_LIST_NSNODE 1 - -#define ACPI_MEM_LIST_FIRST_CACHE_LIST 2 -#define ACPI_MEM_LIST_STATE 2 -#define ACPI_MEM_LIST_PSNODE 3 -#define ACPI_MEM_LIST_PSNODE_EXT 4 -#define ACPI_MEM_LIST_OPERAND 5 -#define ACPI_MEM_LIST_WALK 6 -#define ACPI_MEM_LIST_MAX 6 -#define ACPI_NUM_MEM_LISTS 7 +#define ACPI_MEM_LIST_MAX 1 +#define ACPI_NUM_MEM_LISTS 2 typedef struct acpi_memory_list { + char *ListName; void *ListHead; - UINT16 LinkOffset; - UINT16 MaxCacheDepth; - UINT16 CacheDepth; UINT16 ObjectSize; + UINT16 MaxDepth; + UINT16 CurrentDepth; + UINT16 LinkOffset; #ifdef ACPI_DBG_TRACK_ALLOCATIONS @@ -1094,9 +1091,8 @@ typedef struct acpi_memory_list UINT32 TotalAllocated; UINT32 TotalFreed; UINT32 CurrentTotalSize; - UINT32 CacheRequests; - UINT32 CacheHits; - char *ListName; + UINT32 Requests; + UINT32 Hits; #endif } ACPI_MEMORY_LIST; |