aclocal.h (27f7c583) | aclocal.h (db2bae30) |
---|---|
1/****************************************************************************** 2 * 3 * Name: aclocal.h - Internal data types used across the ACPI subsystem | 1/****************************************************************************** 2 * 3 * Name: aclocal.h - Internal data types used across the ACPI subsystem |
4 * $Revision: 1.237 $ | 4 * $Revision: 1.250 $ |
5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * | 5 * 6 *****************************************************************************/ 7 8/****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * |
12 * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp. | 12 * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp. |
13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. --- 98 unchanged lines hidden (view full) --- 119 120/* acpisrc:StructDefs -- for acpisrc conversion */ 121 122#define ACPI_WAIT_FOREVER 0xFFFF /* UINT16, as per ACPI spec */ 123#define ACPI_DO_NOT_WAIT 0 124#define ACPI_SERIALIZED 0xFF 125 126typedef UINT32 ACPI_MUTEX_HANDLE; | 13 * All rights reserved. 14 * 15 * 2. License 16 * 17 * 2.1. This is your license from Intel Corp. under its intellectual property 18 * rights. You may have additional license terms from the party that provided 19 * you this software, covering your right to use that party's intellectual 20 * property rights. --- 98 unchanged lines hidden (view full) --- 119 120/* acpisrc:StructDefs -- for acpisrc conversion */ 121 122#define ACPI_WAIT_FOREVER 0xFFFF /* UINT16, as per ACPI spec */ 123#define ACPI_DO_NOT_WAIT 0 124#define ACPI_SERIALIZED 0xFF 125 126typedef UINT32 ACPI_MUTEX_HANDLE; |
127#define ACPI_GLOBAL_LOCK (ACPI_SEMAPHORE) (-1) |
|
127 128/* Total number of aml opcodes defined */ 129 130#define AML_NUM_OPCODES 0x7F 131 132 133/* Forward declarations */ 134 --- 15 unchanged lines hidden (view full) --- 150 * 151 * The acquire/release ordering protocol is implied via this list. Mutexes 152 * with a lower value must be acquired before mutexes with a higher value. 153 * 154 * NOTE: any changes here must be reflected in the AcpiGbl_MutexNames 155 * table below also! 156 */ 157#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */ | 128 129/* Total number of aml opcodes defined */ 130 131#define AML_NUM_OPCODES 0x7F 132 133 134/* Forward declarations */ 135 --- 15 unchanged lines hidden (view full) --- 151 * 152 * The acquire/release ordering protocol is implied via this list. Mutexes 153 * with a lower value must be acquired before mutexes with a higher value. 154 * 155 * NOTE: any changes here must be reflected in the AcpiGbl_MutexNames 156 * table below also! 157 */ 158#define ACPI_MTX_INTERPRETER 0 /* AML Interpreter, main lock */ |
158#define ACPI_MTX_TABLES 1 /* Data for ACPI tables */ 159#define ACPI_MTX_NAMESPACE 2 /* ACPI Namespace */ | 159#define ACPI_MTX_NAMESPACE 1 /* ACPI Namespace */ 160#define ACPI_MTX_TABLES 2 /* Data for ACPI tables */ |
160#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */ 161#define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */ 162#define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */ 163#define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */ 164#define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */ 165 166#define ACPI_MAX_MUTEX 7 167#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1 168 169#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 170#ifdef DEFINE_ACPI_GLOBALS 171 172/* Debug names for the mutexes above */ 173 174static char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] = 175{ 176 "ACPI_MTX_Interpreter", | 161#define ACPI_MTX_EVENTS 3 /* Data for ACPI events */ 162#define ACPI_MTX_CACHES 4 /* Internal caches, general purposes */ 163#define ACPI_MTX_MEMORY 5 /* Debug memory tracking lists */ 164#define ACPI_MTX_DEBUG_CMD_COMPLETE 6 /* AML debugger */ 165#define ACPI_MTX_DEBUG_CMD_READY 7 /* AML debugger */ 166 167#define ACPI_MAX_MUTEX 7 168#define ACPI_NUM_MUTEX ACPI_MAX_MUTEX+1 169 170#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER) 171#ifdef DEFINE_ACPI_GLOBALS 172 173/* Debug names for the mutexes above */ 174 175static char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] = 176{ 177 "ACPI_MTX_Interpreter", |
177 "ACPI_MTX_Tables", | |
178 "ACPI_MTX_Namespace", | 178 "ACPI_MTX_Namespace", |
179 "ACPI_MTX_Tables", |
|
179 "ACPI_MTX_Events", 180 "ACPI_MTX_Caches", 181 "ACPI_MTX_Memory", 182 "ACPI_MTX_CommandComplete", 183 "ACPI_MTX_CommandReady" 184}; 185 186#endif --- 55 unchanged lines hidden (view full) --- 242 ****************************************************************************/ 243 244/* Operational modes of the AML interpreter/scanner */ 245 246typedef enum 247{ 248 ACPI_IMODE_LOAD_PASS1 = 0x01, 249 ACPI_IMODE_LOAD_PASS2 = 0x02, | 180 "ACPI_MTX_Events", 181 "ACPI_MTX_Caches", 182 "ACPI_MTX_Memory", 183 "ACPI_MTX_CommandComplete", 184 "ACPI_MTX_CommandReady" 185}; 186 187#endif --- 55 unchanged lines hidden (view full) --- 243 ****************************************************************************/ 244 245/* Operational modes of the AML interpreter/scanner */ 246 247typedef enum 248{ 249 ACPI_IMODE_LOAD_PASS1 = 0x01, 250 ACPI_IMODE_LOAD_PASS2 = 0x02, |
250 ACPI_IMODE_EXECUTE = 0x0E | 251 ACPI_IMODE_EXECUTE = 0x03 |
251 252} ACPI_INTERPRETER_MODE; 253 254typedef union acpi_name_union 255{ 256 UINT32 Integer; 257 char Ascii[4]; 258 --- 32 unchanged lines hidden (view full) --- 291#endif 292 293} ACPI_NAMESPACE_NODE; 294 295 296/* Namespace Node flags */ 297 298#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */ | 252 253} ACPI_INTERPRETER_MODE; 254 255typedef union acpi_name_union 256{ 257 UINT32 Integer; 258 char Ascii[4]; 259 --- 32 unchanged lines hidden (view full) --- 292#endif 293 294} ACPI_NAMESPACE_NODE; 295 296 297/* Namespace Node flags */ 298 299#define ANOBJ_END_OF_PEER_LIST 0x01 /* End-of-list, Peer field points to parent */ |
299#define ANOBJ_RESERVED 0x02 /* Available for future use */ | 300#define ANOBJ_TEMPORARY 0x02 /* Node is create by a method and is temporary */ |
300#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */ 301#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */ 302#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ 303 304#define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */ 305#define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */ 306#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */ 307#define ANOBJ_IS_BIT_OFFSET 0x40 /* iASL only: Reference is a bit offset */ 308#define ANOBJ_IS_REFERENCED 0x80 /* iASL only: Object was referenced */ 309 310/* 311 * ACPI Table Descriptor. One per ACPI table 312 */ 313typedef struct acpi_table_desc 314{ | 301#define ANOBJ_METHOD_ARG 0x04 /* Node is a method argument */ 302#define ANOBJ_METHOD_LOCAL 0x08 /* Node is a method local */ 303#define ANOBJ_SUBTREE_HAS_INI 0x10 /* Used to optimize device initialization */ 304 305#define ANOBJ_IS_EXTERNAL 0x08 /* iASL only: This object created via External() */ 306#define ANOBJ_METHOD_NO_RETVAL 0x10 /* iASL only: Method has no return value */ 307#define ANOBJ_METHOD_SOME_NO_RETVAL 0x20 /* iASL only: Method has at least one return value */ 308#define ANOBJ_IS_BIT_OFFSET 0x40 /* iASL only: Reference is a bit offset */ 309#define ANOBJ_IS_REFERENCED 0x80 /* iASL only: Object was referenced */ 310 311/* 312 * ACPI Table Descriptor. One per ACPI table 313 */ 314typedef struct acpi_table_desc 315{ |
315 struct acpi_table_desc *Prev; 316 struct acpi_table_desc *Next; 317 struct acpi_table_desc *InstalledDesc; | 316 ACPI_PHYSICAL_ADDRESS Address; |
318 ACPI_TABLE_HEADER *Pointer; | 317 ACPI_TABLE_HEADER *Pointer; |
319 UINT8 *AmlStart; 320 UINT64 PhysicalAddress; 321 ACPI_SIZE Length; 322 UINT32 AmlLength; | 318 UINT32 Length; /* Length fixed at 32 bits */ 319 ACPI_NAME_UNION Signature; |
323 ACPI_OWNER_ID OwnerId; | 320 ACPI_OWNER_ID OwnerId; |
324 UINT8 Type; 325 UINT8 Allocation; 326 BOOLEAN LoadedIntoNamespace; | 321 UINT8 Flags; |
327 328} ACPI_TABLE_DESC; 329 | 322 323} ACPI_TABLE_DESC; 324 |
330typedef struct acpi_table_list | 325/* Flags for above */ 326 327#define ACPI_TABLE_ORIGIN_UNKNOWN (0) 328#define ACPI_TABLE_ORIGIN_MAPPED (1) 329#define ACPI_TABLE_ORIGIN_ALLOCATED (2) 330#define ACPI_TABLE_ORIGIN_MASK (3) 331#define ACPI_TABLE_IS_LOADED (4) 332 333/* One internal RSDT for table management */ 334 335typedef struct acpi_internal_rsdt |
331{ | 336{ |
332 struct acpi_table_desc *Next; | 337 ACPI_TABLE_DESC *Tables; |
333 UINT32 Count; | 338 UINT32 Count; |
339 UINT32 Size; 340 UINT8 Flags; |
|
334 | 341 |
335} ACPI_TABLE_LIST; | 342} ACPI_INTERNAL_RSDT; |
336 | 343 |
344/* Flags for above */ |
|
337 | 345 |
346#define ACPI_ROOT_ORIGIN_UNKNOWN (0) /* ~ORIGIN_ALLOCATED */ 347#define ACPI_ROOT_ORIGIN_ALLOCATED (1) 348#define ACPI_ROOT_ALLOW_RESIZE (2) 349 350 351/* Predefined (fixed) table indexes */ 352 353#define ACPI_TABLE_INDEX_DSDT (0) 354#define ACPI_TABLE_INDEX_FACS (1) 355 356 |
|
338typedef struct acpi_find_context 339{ 340 char *SearchFor; 341 ACPI_HANDLE *List; 342 UINT32 *Count; 343 344} ACPI_FIND_CONTEXT; 345 --- 22 unchanged lines hidden (view full) --- 368#define ACPI_COPY_TYPE_SIMPLE 0 369#define ACPI_COPY_TYPE_PACKAGE 1 370 371 372/* Info structure used to convert external<->internal namestrings */ 373 374typedef struct acpi_namestring_info 375{ | 357typedef struct acpi_find_context 358{ 359 char *SearchFor; 360 ACPI_HANDLE *List; 361 UINT32 *Count; 362 363} ACPI_FIND_CONTEXT; 364 --- 22 unchanged lines hidden (view full) --- 387#define ACPI_COPY_TYPE_SIMPLE 0 388#define ACPI_COPY_TYPE_PACKAGE 1 389 390 391/* Info structure used to convert external<->internal namestrings */ 392 393typedef struct acpi_namestring_info 394{ |
376 char *ExternalName; 377 char *NextExternalChar; | 395 const char *ExternalName; 396 const char *NextExternalChar; |
378 char *InternalName; 379 UINT32 Length; 380 UINT32 NumSegments; 381 UINT32 NumCarats; 382 BOOLEAN FullyQualified; 383 384} ACPI_NAMESTRING_INFO; 385 --- 80 unchanged lines hidden (view full) --- 466 * Information about a GPE, one per each GPE in an array. 467 * NOTE: Important to keep this struct as small as possible. 468 */ 469typedef struct acpi_gpe_event_info 470{ 471 union acpi_gpe_dispatch_info Dispatch; /* Either Method or Handler */ 472 struct acpi_gpe_register_info *RegisterInfo; /* Backpointer to register info */ 473 UINT8 Flags; /* Misc info about this GPE */ | 397 char *InternalName; 398 UINT32 Length; 399 UINT32 NumSegments; 400 UINT32 NumCarats; 401 BOOLEAN FullyQualified; 402 403} ACPI_NAMESTRING_INFO; 404 --- 80 unchanged lines hidden (view full) --- 485 * Information about a GPE, one per each GPE in an array. 486 * NOTE: Important to keep this struct as small as possible. 487 */ 488typedef struct acpi_gpe_event_info 489{ 490 union acpi_gpe_dispatch_info Dispatch; /* Either Method or Handler */ 491 struct acpi_gpe_register_info *RegisterInfo; /* Backpointer to register info */ 492 UINT8 Flags; /* Misc info about this GPE */ |
474 UINT8 RegisterBit; /* This GPE bit within the register */ | 493 UINT8 GpeNumber; /* This GPE */ |
475 476} ACPI_GPE_EVENT_INFO; 477 478/* Information about a GPE register pair, one per each status/enable pair in an array */ 479 480typedef struct acpi_gpe_register_info 481{ 482 ACPI_GENERIC_ADDRESS StatusAddress; /* Address of status reg */ --- 186 unchanged lines hidden (view full) --- 669 670/* 671 * Result values - used to accumulate the results of nested 672 * AML arguments 673 */ 674typedef struct acpi_result_values 675{ 676 ACPI_STATE_COMMON | 494 495} ACPI_GPE_EVENT_INFO; 496 497/* Information about a GPE register pair, one per each status/enable pair in an array */ 498 499typedef struct acpi_gpe_register_info 500{ 501 ACPI_GENERIC_ADDRESS StatusAddress; /* Address of status reg */ --- 186 unchanged lines hidden (view full) --- 688 689/* 690 * Result values - used to accumulate the results of nested 691 * AML arguments 692 */ 693typedef struct acpi_result_values 694{ 695 ACPI_STATE_COMMON |
677 UINT8 NumResults; 678 UINT8 LastInsert; 679 union acpi_operand_object *ObjDesc [ACPI_OBJ_NUM_OPERANDS]; | 696 union acpi_operand_object *ObjDesc [ACPI_RESULTS_FRAME_OBJ_NUM]; |
680 681} ACPI_RESULT_VALUES; 682 683 684typedef 685ACPI_STATUS (*ACPI_PARSE_DOWNWARDS) ( 686 struct acpi_walk_state *WalkState, 687 union acpi_parse_object **OutOp); --- 83 unchanged lines hidden (view full) --- 771 union acpi_parse_object *Parent; /* Parent op */\ 772 UINT8 DescriptorType; /* To differentiate various internal objs */\ 773 UINT8 Flags; /* Type of Op */\ 774 UINT16 AmlOpcode; /* AML opcode */\ 775 UINT32 AmlOffset; /* Offset of declaration in AML */\ 776 union acpi_parse_object *Next; /* Next op */\ 777 ACPI_NAMESPACE_NODE *Node; /* For use by interpreter */\ 778 ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\ | 697 698} ACPI_RESULT_VALUES; 699 700 701typedef 702ACPI_STATUS (*ACPI_PARSE_DOWNWARDS) ( 703 struct acpi_walk_state *WalkState, 704 union acpi_parse_object **OutOp); --- 83 unchanged lines hidden (view full) --- 788 union acpi_parse_object *Parent; /* Parent op */\ 789 UINT8 DescriptorType; /* To differentiate various internal objs */\ 790 UINT8 Flags; /* Type of Op */\ 791 UINT16 AmlOpcode; /* AML opcode */\ 792 UINT32 AmlOffset; /* Offset of declaration in AML */\ 793 union acpi_parse_object *Next; /* Next op */\ 794 ACPI_NAMESPACE_NODE *Node; /* For use by interpreter */\ 795 ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\ |
796 UINT8 ArgListLength; /* Number of elements in the arg list */\ |
|
779 ACPI_DISASM_ONLY_MEMBERS (\ 780 UINT8 DisasmFlags; /* Used during AML disassembly */\ 781 UINT8 DisasmOpcode; /* Subtype used for disassembly */\ 782 char AmlOpName[16]) /* Op name (debug only) */ 783 784 785#define ACPI_DASM_BUFFER 0x00 786#define ACPI_DASM_RESOURCE 0x01 --- 93 unchanged lines hidden (view full) --- 880 881 882/* Parse object flags */ 883 884#define ACPI_PARSEOP_GENERIC 0x01 885#define ACPI_PARSEOP_NAMED 0x02 886#define ACPI_PARSEOP_DEFERRED 0x04 887#define ACPI_PARSEOP_BYTELIST 0x08 | 797 ACPI_DISASM_ONLY_MEMBERS (\ 798 UINT8 DisasmFlags; /* Used during AML disassembly */\ 799 UINT8 DisasmOpcode; /* Subtype used for disassembly */\ 800 char AmlOpName[16]) /* Op name (debug only) */ 801 802 803#define ACPI_DASM_BUFFER 0x00 804#define ACPI_DASM_RESOURCE 0x01 --- 93 unchanged lines hidden (view full) --- 898 899 900/* Parse object flags */ 901 902#define ACPI_PARSEOP_GENERIC 0x01 903#define ACPI_PARSEOP_NAMED 0x02 904#define ACPI_PARSEOP_DEFERRED 0x04 905#define ACPI_PARSEOP_BYTELIST 0x08 |
906#define ACPI_PARSEOP_IN_STACK 0x10 907#define ACPI_PARSEOP_TARGET 0x20 |
|
888#define ACPI_PARSEOP_IN_CACHE 0x80 889 890/* Parse object DisasmFlags */ 891 892#define ACPI_PARSEOP_IGNORE 0x01 893#define ACPI_PARSEOP_PARAMLIST 0x02 894#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 895#define ACPI_PARSEOP_SPECIAL 0x10 --- 172 unchanged lines hidden (view full) --- 1068/***************************************************************************** 1069 * 1070 * Debugger 1071 * 1072 ****************************************************************************/ 1073 1074typedef struct acpi_db_method_info 1075{ | 908#define ACPI_PARSEOP_IN_CACHE 0x80 909 910/* Parse object DisasmFlags */ 911 912#define ACPI_PARSEOP_IGNORE 0x01 913#define ACPI_PARSEOP_PARAMLIST 0x02 914#define ACPI_PARSEOP_EMPTY_TERMLIST 0x04 915#define ACPI_PARSEOP_SPECIAL 0x10 --- 172 unchanged lines hidden (view full) --- 1088/***************************************************************************** 1089 * 1090 * Debugger 1091 * 1092 ****************************************************************************/ 1093 1094typedef struct acpi_db_method_info 1095{ |
1076 ACPI_HANDLE ThreadGate; | 1096 ACPI_HANDLE MainThreadGate; 1097 ACPI_HANDLE ThreadCompleteGate; 1098 UINT32 *Threads; 1099 UINT32 NumThreads; 1100 UINT32 NumCreated; 1101 UINT32 NumCompleted; 1102 |
1077 char *Name; | 1103 char *Name; |
1078 char **Args; | |
1079 UINT32 Flags; 1080 UINT32 NumLoops; 1081 char Pathname[128]; | 1104 UINT32 Flags; 1105 UINT32 NumLoops; 1106 char Pathname[128]; |
1107 char **Args; |
|
1082 | 1108 |
1109 /* 1110 * Arguments to be passed to method for the command 1111 * Threads - 1112 * the Number of threads, ID of current thread and 1113 * Index of current thread inside all them created. 1114 */ 1115 char InitArgs; 1116 char *Arguments[4]; 1117 char NumThreadsStr[11]; 1118 char IdOfThreadStr[11]; 1119 char IndexOfThreadStr[11]; 1120 |
|
1083} ACPI_DB_METHOD_INFO; 1084 1085typedef struct acpi_integrity_info 1086{ 1087 UINT32 Nodes; 1088 UINT32 Objects; 1089 1090} ACPI_INTEGRITY_INFO; --- 55 unchanged lines hidden (view full) --- 1146 UINT16 LinkOffset; 1147 1148#ifdef ACPI_DBG_TRACK_ALLOCATIONS 1149 1150 /* Statistics for debug memory tracking only */ 1151 1152 UINT32 TotalAllocated; 1153 UINT32 TotalFreed; | 1121} ACPI_DB_METHOD_INFO; 1122 1123typedef struct acpi_integrity_info 1124{ 1125 UINT32 Nodes; 1126 UINT32 Objects; 1127 1128} ACPI_INTEGRITY_INFO; --- 55 unchanged lines hidden (view full) --- 1184 UINT16 LinkOffset; 1185 1186#ifdef ACPI_DBG_TRACK_ALLOCATIONS 1187 1188 /* Statistics for debug memory tracking only */ 1189 1190 UINT32 TotalAllocated; 1191 UINT32 TotalFreed; |
1192 UINT32 MaxOccupied; 1193 UINT32 TotalSize; |
|
1154 UINT32 CurrentTotalSize; 1155 UINT32 Requests; 1156 UINT32 Hits; 1157#endif 1158 1159} ACPI_MEMORY_LIST; 1160 1161 1162#endif /* __ACLOCAL_H__ */ | 1194 UINT32 CurrentTotalSize; 1195 UINT32 Requests; 1196 UINT32 Hits; 1197#endif 1198 1199} ACPI_MEMORY_LIST; 1200 1201 1202#endif /* __ACLOCAL_H__ */ |