1 /****************************************************************************** 2 * 3 * Name: aclocal.h - Internal data types used across the ACPI subsystem 4 * $Revision: 1.250 $ 5 * 6 *****************************************************************************/ 7 8 /****************************************************************************** 9 * 10 * 1. Copyright Notice 11 * 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. 21 * 22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 23 * copy of the source code appearing in this file ("Covered Code") an 24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 25 * base code distributed originally by Intel ("Original Intel Code") to copy, 26 * make derivatives, distribute, use and display any portion of the Covered 27 * Code in any form, with the right to sublicense such rights; and 28 * 29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 30 * license (with the right to sublicense), under only those claims of Intel 31 * patents that are infringed by the Original Intel Code, to make, use, sell, 32 * offer to sell, and import the Covered Code and derivative works thereof 33 * solely to the minimum extent necessary to exercise the above copyright 34 * license, and in no event shall the patent license extend to any additions 35 * to or modifications of the Original Intel Code. No other license or right 36 * is granted directly or by implication, estoppel or otherwise; 37 * 38 * The above copyright and patent license is granted only if the following 39 * conditions are met: 40 * 41 * 3. Conditions 42 * 43 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 44 * Redistribution of source code of any substantial portion of the Covered 45 * Code or modification with rights to further distribute source must include 46 * the above Copyright Notice, the above License, this list of Conditions, 47 * and the following Disclaimer and Export Compliance provision. In addition, 48 * Licensee must cause all Covered Code to which Licensee contributes to 49 * contain a file documenting the changes Licensee made to create that Covered 50 * Code and the date of any change. Licensee must include in that file the 51 * documentation of any changes made by any predecessor Licensee. Licensee 52 * must include a prominent statement that the modification is derived, 53 * directly or indirectly, from Original Intel Code. 54 * 55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 56 * Redistribution of source code of any substantial portion of the Covered 57 * Code or modification without rights to further distribute source must 58 * include the following Disclaimer and Export Compliance provision in the 59 * documentation and/or other materials provided with distribution. In 60 * addition, Licensee may not authorize further sublicense of source of any 61 * portion of the Covered Code, and must include terms to the effect that the 62 * license from Licensee to its licensee is limited to the intellectual 63 * property embodied in the software Licensee provides to its licensee, and 64 * not to intellectual property embodied in modifications its licensee may 65 * make. 66 * 67 * 3.3. Redistribution of Executable. Redistribution in executable form of any 68 * substantial portion of the Covered Code or modification must reproduce the 69 * above Copyright Notice, and the following Disclaimer and Export Compliance 70 * provision in the documentation and/or other materials provided with the 71 * distribution. 72 * 73 * 3.4. Intel retains all right, title, and interest in and to the Original 74 * Intel Code. 75 * 76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 77 * Intel shall be used in advertising or otherwise to promote the sale, use or 78 * other dealings in products derived from or relating to the Covered Code 79 * without prior written authorization from Intel. 80 * 81 * 4. Disclaimer and Export Compliance 82 * 83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 89 * PARTICULAR PURPOSE. 90 * 91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 98 * LIMITED REMEDY. 99 * 100 * 4.3. Licensee shall not export, either directly or indirectly, any of this 101 * software or system incorporating such software without first obtaining any 102 * required license or other approval from the U. S. Department of Commerce or 103 * any other agency or department of the United States Government. In the 104 * event Licensee exports any such software from the United States or 105 * re-exports any such software from a foreign destination, Licensee shall 106 * ensure that the distribution and export/re-export of the software is in 107 * compliance with all laws, regulations, orders, or other restrictions of the 108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 109 * any of its subsidiaries will export/re-export any technical data, process, 110 * software, or service, directly or indirectly, to any country for which the 111 * United States government or any agency thereof requires an export license, 112 * other governmental approval, or letter of assurance, without first obtaining 113 * such license, approval or letter. 114 * 115 *****************************************************************************/ 116 117 #ifndef __ACLOCAL_H__ 118 #define __ACLOCAL_H__ 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 126 typedef UINT32 ACPI_MUTEX_HANDLE; 127 #define ACPI_GLOBAL_LOCK (ACPI_SEMAPHORE) (-1) 128 129 /* Total number of aml opcodes defined */ 130 131 #define AML_NUM_OPCODES 0x7F 132 133 134 /* Forward declarations */ 135 136 struct acpi_walk_state; 137 struct acpi_obj_mutex; 138 union acpi_parse_object; 139 140 141 /***************************************************************************** 142 * 143 * Mutex typedefs and structs 144 * 145 ****************************************************************************/ 146 147 148 /* 149 * Predefined handles for the mutex objects used within the subsystem 150 * All mutex objects are automatically created by AcpiUtMutexInitialize. 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 */ 159 #define ACPI_MTX_NAMESPACE 1 /* ACPI Namespace */ 160 #define ACPI_MTX_TABLES 2 /* Data for ACPI tables */ 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 175 static char *AcpiGbl_MutexNames[ACPI_NUM_MUTEX] = 176 { 177 "ACPI_MTX_Interpreter", 178 "ACPI_MTX_Namespace", 179 "ACPI_MTX_Tables", 180 "ACPI_MTX_Events", 181 "ACPI_MTX_Caches", 182 "ACPI_MTX_Memory", 183 "ACPI_MTX_CommandComplete", 184 "ACPI_MTX_CommandReady" 185 }; 186 187 #endif 188 #endif 189 190 191 /* 192 * Predefined handles for spinlocks used within the subsystem. 193 * These spinlocks are created by AcpiUtMutexInitialize 194 */ 195 #define ACPI_LOCK_GPES 0 196 #define ACPI_LOCK_HARDWARE 1 197 198 #define ACPI_MAX_LOCK 1 199 #define ACPI_NUM_LOCK ACPI_MAX_LOCK+1 200 201 202 /* Owner IDs are used to track namespace nodes for selective deletion */ 203 204 typedef UINT8 ACPI_OWNER_ID; 205 #define ACPI_OWNER_ID_MAX 0xFF 206 207 /* This Thread ID means that the mutex is not in use (unlocked) */ 208 209 #define ACPI_MUTEX_NOT_ACQUIRED (UINT32) -1 210 211 /* Table for the global mutexes */ 212 213 typedef struct acpi_mutex_info 214 { 215 ACPI_MUTEX Mutex; 216 UINT32 UseCount; 217 ACPI_THREAD_ID ThreadId; 218 219 } ACPI_MUTEX_INFO; 220 221 222 /* Lock flag parameter for various interfaces */ 223 224 #define ACPI_MTX_DO_NOT_LOCK 0 225 #define ACPI_MTX_LOCK 1 226 227 228 /* Field access granularities */ 229 230 #define ACPI_FIELD_BYTE_GRANULARITY 1 231 #define ACPI_FIELD_WORD_GRANULARITY 2 232 #define ACPI_FIELD_DWORD_GRANULARITY 4 233 #define ACPI_FIELD_QWORD_GRANULARITY 8 234 235 236 #define ACPI_ENTRY_NOT_FOUND NULL 237 238 239 /***************************************************************************** 240 * 241 * Namespace typedefs and structs 242 * 243 ****************************************************************************/ 244 245 /* Operational modes of the AML interpreter/scanner */ 246 247 typedef enum 248 { 249 ACPI_IMODE_LOAD_PASS1 = 0x01, 250 ACPI_IMODE_LOAD_PASS2 = 0x02, 251 ACPI_IMODE_EXECUTE = 0x03 252 253 } ACPI_INTERPRETER_MODE; 254 255 typedef union acpi_name_union 256 { 257 UINT32 Integer; 258 char Ascii[4]; 259 260 } ACPI_NAME_UNION; 261 262 263 /* 264 * The Namespace Node describes a named object that appears in the AML. 265 * DescriptorType is used to differentiate between internal descriptors. 266 * 267 * The node is optimized for both 32-bit and 64-bit platforms: 268 * 20 bytes for the 32-bit case, 32 bytes for the 64-bit case. 269 * 270 * Note: The DescriptorType and Type fields must appear in the identical 271 * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT 272 * structures. 273 */ 274 typedef struct acpi_namespace_node 275 { 276 union acpi_operand_object *Object; /* Interpreter object */ 277 UINT8 DescriptorType; /* Differentiate object descriptor types */ 278 UINT8 Type; /* ACPI Type associated with this name */ 279 UINT8 Flags; /* Miscellaneous flags */ 280 ACPI_OWNER_ID OwnerId; /* Node creator */ 281 ACPI_NAME_UNION Name; /* ACPI Name, always 4 chars per ACPI spec */ 282 struct acpi_namespace_node *Child; /* First child */ 283 struct acpi_namespace_node *Peer; /* Peer. Parent if ANOBJ_END_OF_PEER_LIST set */ 284 285 /* 286 * The following fields are used by the ASL compiler and disassembler only 287 */ 288 #ifdef ACPI_LARGE_NAMESPACE_NODE 289 union acpi_parse_object *Op; 290 UINT32 Value; 291 UINT32 Length; 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 */ 300 #define ANOBJ_TEMPORARY 0x02 /* Node is create by a method and is temporary */ 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 */ 314 typedef struct acpi_table_desc 315 { 316 ACPI_PHYSICAL_ADDRESS Address; 317 ACPI_TABLE_HEADER *Pointer; 318 UINT32 Length; /* Length fixed at 32 bits */ 319 ACPI_NAME_UNION Signature; 320 ACPI_OWNER_ID OwnerId; 321 UINT8 Flags; 322 323 } ACPI_TABLE_DESC; 324 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 335 typedef struct acpi_internal_rsdt 336 { 337 ACPI_TABLE_DESC *Tables; 338 UINT32 Count; 339 UINT32 Size; 340 UINT8 Flags; 341 342 } ACPI_INTERNAL_RSDT; 343 344 /* Flags for above */ 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 357 typedef struct acpi_find_context 358 { 359 char *SearchFor; 360 ACPI_HANDLE *List; 361 UINT32 *Count; 362 363 } ACPI_FIND_CONTEXT; 364 365 366 typedef struct acpi_ns_search_data 367 { 368 ACPI_NAMESPACE_NODE *Node; 369 370 } ACPI_NS_SEARCH_DATA; 371 372 373 /* 374 * Predefined Namespace items 375 */ 376 typedef struct acpi_predefined_names 377 { 378 char *Name; 379 UINT8 Type; 380 char *Val; 381 382 } ACPI_PREDEFINED_NAMES; 383 384 385 /* Object types used during package copies */ 386 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 393 typedef struct acpi_namestring_info 394 { 395 const char *ExternalName; 396 const char *NextExternalChar; 397 char *InternalName; 398 UINT32 Length; 399 UINT32 NumSegments; 400 UINT32 NumCarats; 401 BOOLEAN FullyQualified; 402 403 } ACPI_NAMESTRING_INFO; 404 405 406 /* Field creation info */ 407 408 typedef struct acpi_create_field_info 409 { 410 ACPI_NAMESPACE_NODE *RegionNode; 411 ACPI_NAMESPACE_NODE *FieldNode; 412 ACPI_NAMESPACE_NODE *RegisterNode; 413 ACPI_NAMESPACE_NODE *DataRegisterNode; 414 UINT32 BankValue; 415 UINT32 FieldBitPosition; 416 UINT32 FieldBitLength; 417 UINT8 FieldFlags; 418 UINT8 Attribute; 419 UINT8 FieldType; 420 421 } ACPI_CREATE_FIELD_INFO; 422 423 424 typedef 425 ACPI_STATUS (*ACPI_INTERNAL_METHOD) ( 426 struct acpi_walk_state *WalkState); 427 428 429 /* 430 * Bitmapped ACPI types. Used internally only 431 */ 432 #define ACPI_BTYPE_ANY 0x00000000 433 #define ACPI_BTYPE_INTEGER 0x00000001 434 #define ACPI_BTYPE_STRING 0x00000002 435 #define ACPI_BTYPE_BUFFER 0x00000004 436 #define ACPI_BTYPE_PACKAGE 0x00000008 437 #define ACPI_BTYPE_FIELD_UNIT 0x00000010 438 #define ACPI_BTYPE_DEVICE 0x00000020 439 #define ACPI_BTYPE_EVENT 0x00000040 440 #define ACPI_BTYPE_METHOD 0x00000080 441 #define ACPI_BTYPE_MUTEX 0x00000100 442 #define ACPI_BTYPE_REGION 0x00000200 443 #define ACPI_BTYPE_POWER 0x00000400 444 #define ACPI_BTYPE_PROCESSOR 0x00000800 445 #define ACPI_BTYPE_THERMAL 0x00001000 446 #define ACPI_BTYPE_BUFFER_FIELD 0x00002000 447 #define ACPI_BTYPE_DDB_HANDLE 0x00004000 448 #define ACPI_BTYPE_DEBUG_OBJECT 0x00008000 449 #define ACPI_BTYPE_REFERENCE 0x00010000 450 #define ACPI_BTYPE_RESOURCE 0x00020000 451 452 #define ACPI_BTYPE_COMPUTE_DATA (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER) 453 454 #define ACPI_BTYPE_DATA (ACPI_BTYPE_COMPUTE_DATA | ACPI_BTYPE_PACKAGE) 455 #define ACPI_BTYPE_DATA_REFERENCE (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE) 456 #define ACPI_BTYPE_DEVICE_OBJECTS (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR) 457 #define ACPI_BTYPE_OBJECTS_AND_REFS 0x0001FFFF /* ARG or LOCAL */ 458 #define ACPI_BTYPE_ALL_OBJECTS 0x0000FFFF 459 460 461 /***************************************************************************** 462 * 463 * Event typedefs and structs 464 * 465 ****************************************************************************/ 466 467 /* Dispatch info for each GPE -- either a method or handler, cannot be both */ 468 469 typedef struct acpi_handler_info 470 { 471 ACPI_EVENT_HANDLER Address; /* Address of handler, if any */ 472 void *Context; /* Context to be passed to handler */ 473 ACPI_NAMESPACE_NODE *MethodNode; /* Method node for this GPE level (saved) */ 474 475 } ACPI_HANDLER_INFO; 476 477 typedef union acpi_gpe_dispatch_info 478 { 479 ACPI_NAMESPACE_NODE *MethodNode; /* Method node for this GPE level */ 480 struct acpi_handler_info *Handler; 481 482 } ACPI_GPE_DISPATCH_INFO; 483 484 /* 485 * Information about a GPE, one per each GPE in an array. 486 * NOTE: Important to keep this struct as small as possible. 487 */ 488 typedef 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 */ 493 UINT8 GpeNumber; /* This GPE */ 494 495 } ACPI_GPE_EVENT_INFO; 496 497 /* Information about a GPE register pair, one per each status/enable pair in an array */ 498 499 typedef struct acpi_gpe_register_info 500 { 501 ACPI_GENERIC_ADDRESS StatusAddress; /* Address of status reg */ 502 ACPI_GENERIC_ADDRESS EnableAddress; /* Address of enable reg */ 503 UINT8 EnableForWake; /* GPEs to keep enabled when sleeping */ 504 UINT8 EnableForRun; /* GPEs to keep enabled when running */ 505 UINT8 BaseGpeNumber; /* Base GPE number for this register */ 506 507 } ACPI_GPE_REGISTER_INFO; 508 509 /* 510 * Information about a GPE register block, one per each installed block -- 511 * GPE0, GPE1, and one per each installed GPE Block Device. 512 */ 513 typedef struct acpi_gpe_block_info 514 { 515 ACPI_NAMESPACE_NODE *Node; 516 struct acpi_gpe_block_info *Previous; 517 struct acpi_gpe_block_info *Next; 518 struct acpi_gpe_xrupt_info *XruptBlock; /* Backpointer to interrupt block */ 519 ACPI_GPE_REGISTER_INFO *RegisterInfo; /* One per GPE register pair */ 520 ACPI_GPE_EVENT_INFO *EventInfo; /* One for each GPE */ 521 ACPI_GENERIC_ADDRESS BlockAddress; /* Base address of the block */ 522 UINT32 RegisterCount; /* Number of register pairs in block */ 523 UINT8 BlockBaseNumber;/* Base GPE number for this block */ 524 525 } ACPI_GPE_BLOCK_INFO; 526 527 /* Information about GPE interrupt handlers, one per each interrupt level used for GPEs */ 528 529 typedef struct acpi_gpe_xrupt_info 530 { 531 struct acpi_gpe_xrupt_info *Previous; 532 struct acpi_gpe_xrupt_info *Next; 533 ACPI_GPE_BLOCK_INFO *GpeBlockListHead; /* List of GPE blocks for this xrupt */ 534 UINT32 InterruptNumber; /* System interrupt number */ 535 536 } ACPI_GPE_XRUPT_INFO; 537 538 539 typedef struct acpi_gpe_walk_info 540 { 541 ACPI_NAMESPACE_NODE *GpeDevice; 542 ACPI_GPE_BLOCK_INFO *GpeBlock; 543 544 } ACPI_GPE_WALK_INFO; 545 546 547 typedef ACPI_STATUS (*ACPI_GPE_CALLBACK) ( 548 ACPI_GPE_XRUPT_INFO *GpeXruptInfo, 549 ACPI_GPE_BLOCK_INFO *GpeBlock); 550 551 552 /* Information about each particular fixed event */ 553 554 typedef struct acpi_fixed_event_handler 555 { 556 ACPI_EVENT_HANDLER Handler; /* Address of handler. */ 557 void *Context; /* Context to be passed to handler */ 558 559 } ACPI_FIXED_EVENT_HANDLER; 560 561 typedef struct acpi_fixed_event_info 562 { 563 UINT8 StatusRegisterId; 564 UINT8 EnableRegisterId; 565 UINT16 StatusBitMask; 566 UINT16 EnableBitMask; 567 568 } ACPI_FIXED_EVENT_INFO; 569 570 /* Information used during field processing */ 571 572 typedef struct acpi_field_info 573 { 574 UINT8 SkipField; 575 UINT8 FieldFlag; 576 UINT32 PkgLength; 577 578 } ACPI_FIELD_INFO; 579 580 581 /***************************************************************************** 582 * 583 * Generic "state" object for stacks 584 * 585 ****************************************************************************/ 586 587 #define ACPI_CONTROL_NORMAL 0xC0 588 #define ACPI_CONTROL_CONDITIONAL_EXECUTING 0xC1 589 #define ACPI_CONTROL_PREDICATE_EXECUTING 0xC2 590 #define ACPI_CONTROL_PREDICATE_FALSE 0xC3 591 #define ACPI_CONTROL_PREDICATE_TRUE 0xC4 592 593 594 #define ACPI_STATE_COMMON \ 595 void *Next; \ 596 UINT8 DescriptorType; /* To differentiate various internal objs */\ 597 UINT8 Flags; \ 598 UINT16 Value; \ 599 UINT16 State; 600 601 /* There are 2 bytes available here until the next natural alignment boundary */ 602 603 typedef struct acpi_common_state 604 { 605 ACPI_STATE_COMMON 606 } ACPI_COMMON_STATE; 607 608 609 /* 610 * Update state - used to traverse complex objects such as packages 611 */ 612 typedef struct acpi_update_state 613 { 614 ACPI_STATE_COMMON 615 union acpi_operand_object *Object; 616 617 } ACPI_UPDATE_STATE; 618 619 620 /* 621 * Pkg state - used to traverse nested package structures 622 */ 623 typedef struct acpi_pkg_state 624 { 625 ACPI_STATE_COMMON 626 UINT16 Index; 627 union acpi_operand_object *SourceObject; 628 union acpi_operand_object *DestObject; 629 struct acpi_walk_state *WalkState; 630 void *ThisTargetObj; 631 UINT32 NumPackages; 632 633 } ACPI_PKG_STATE; 634 635 636 /* 637 * Control state - one per if/else and while constructs. 638 * Allows nesting of these constructs 639 */ 640 typedef struct acpi_control_state 641 { 642 ACPI_STATE_COMMON 643 UINT16 Opcode; 644 union acpi_parse_object *PredicateOp; 645 UINT8 *AmlPredicateStart; /* Start of if/while predicate */ 646 UINT8 *PackageEnd; /* End of if/while block */ 647 648 } ACPI_CONTROL_STATE; 649 650 651 /* 652 * Scope state - current scope during namespace lookups 653 */ 654 typedef struct acpi_scope_state 655 { 656 ACPI_STATE_COMMON 657 ACPI_NAMESPACE_NODE *Node; 658 659 } ACPI_SCOPE_STATE; 660 661 662 typedef struct acpi_pscope_state 663 { 664 ACPI_STATE_COMMON 665 UINT32 ArgCount; /* Number of fixed arguments */ 666 union acpi_parse_object *Op; /* Current op being parsed */ 667 UINT8 *ArgEnd; /* Current argument end */ 668 UINT8 *PkgEnd; /* Current package end */ 669 UINT32 ArgList; /* Next argument to parse */ 670 671 } ACPI_PSCOPE_STATE; 672 673 674 /* 675 * Thread state - one per thread across multiple walk states. Multiple walk 676 * states are created when there are nested control methods executing. 677 */ 678 typedef struct acpi_thread_state 679 { 680 ACPI_STATE_COMMON 681 UINT8 CurrentSyncLevel; /* Mutex Sync (nested acquire) level */ 682 struct acpi_walk_state *WalkStateList; /* Head of list of WalkStates for this thread */ 683 union acpi_operand_object *AcquiredMutexList; /* List of all currently acquired mutexes */ 684 ACPI_THREAD_ID ThreadId; /* Running thread ID */ 685 686 } ACPI_THREAD_STATE; 687 688 689 /* 690 * Result values - used to accumulate the results of nested 691 * AML arguments 692 */ 693 typedef struct acpi_result_values 694 { 695 ACPI_STATE_COMMON 696 union acpi_operand_object *ObjDesc [ACPI_RESULTS_FRAME_OBJ_NUM]; 697 698 } ACPI_RESULT_VALUES; 699 700 701 typedef 702 ACPI_STATUS (*ACPI_PARSE_DOWNWARDS) ( 703 struct acpi_walk_state *WalkState, 704 union acpi_parse_object **OutOp); 705 706 typedef 707 ACPI_STATUS (*ACPI_PARSE_UPWARDS) ( 708 struct acpi_walk_state *WalkState); 709 710 711 /* 712 * Notify info - used to pass info to the deferred notify 713 * handler/dispatcher. 714 */ 715 typedef struct acpi_notify_info 716 { 717 ACPI_STATE_COMMON 718 ACPI_NAMESPACE_NODE *Node; 719 union acpi_operand_object *HandlerObj; 720 721 } ACPI_NOTIFY_INFO; 722 723 724 /* Generic state is union of structs above */ 725 726 typedef union acpi_generic_state 727 { 728 ACPI_COMMON_STATE Common; 729 ACPI_CONTROL_STATE Control; 730 ACPI_UPDATE_STATE Update; 731 ACPI_SCOPE_STATE Scope; 732 ACPI_PSCOPE_STATE ParseScope; 733 ACPI_PKG_STATE Pkg; 734 ACPI_THREAD_STATE Thread; 735 ACPI_RESULT_VALUES Results; 736 ACPI_NOTIFY_INFO Notify; 737 738 } ACPI_GENERIC_STATE; 739 740 741 /***************************************************************************** 742 * 743 * Interpreter typedefs and structs 744 * 745 ****************************************************************************/ 746 747 typedef 748 ACPI_STATUS (*ACPI_EXECUTE_OP) ( 749 struct acpi_walk_state *WalkState); 750 751 752 /***************************************************************************** 753 * 754 * Parser typedefs and structs 755 * 756 ****************************************************************************/ 757 758 /* 759 * AML opcode, name, and argument layout 760 */ 761 typedef struct acpi_opcode_info 762 { 763 #if defined(ACPI_DISASSEMBLER) || defined(ACPI_DEBUG_OUTPUT) 764 char *Name; /* Opcode name (disassembler/debug only) */ 765 #endif 766 UINT32 ParseArgs; /* Grammar/Parse time arguments */ 767 UINT32 RuntimeArgs; /* Interpret time arguments */ 768 UINT16 Flags; /* Misc flags */ 769 UINT8 ObjectType; /* Corresponding internal object type */ 770 UINT8 Class; /* Opcode class */ 771 UINT8 Type; /* Opcode type */ 772 773 } ACPI_OPCODE_INFO; 774 775 typedef union acpi_parse_value 776 { 777 ACPI_INTEGER Integer; /* Integer constant (Up to 64 bits) */ 778 UINT64_STRUCT Integer64; /* Structure overlay for 2 32-bit Dwords */ 779 UINT32 Size; /* bytelist or field size */ 780 char *String; /* NULL terminated string */ 781 UINT8 *Buffer; /* buffer or string */ 782 char *Name; /* NULL terminated string */ 783 union acpi_parse_object *Arg; /* arguments and contained ops */ 784 785 } ACPI_PARSE_VALUE; 786 787 #define ACPI_PARSE_COMMON \ 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 */\ 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 805 #define ACPI_DASM_STRING 0x02 806 #define ACPI_DASM_UNICODE 0x03 807 #define ACPI_DASM_EISAID 0x04 808 #define ACPI_DASM_MATCHOP 0x05 809 #define ACPI_DASM_LNOT_PREFIX 0x06 810 #define ACPI_DASM_LNOT_SUFFIX 0x07 811 #define ACPI_DASM_IGNORE 0x08 812 813 /* 814 * Generic operation (for example: If, While, Store) 815 */ 816 typedef struct acpi_parse_obj_common 817 { 818 ACPI_PARSE_COMMON 819 } ACPI_PARSE_OBJ_COMMON; 820 821 822 /* 823 * Extended Op for named ops (Scope, Method, etc.), deferred ops (Methods and OpRegions), 824 * and bytelists. 825 */ 826 typedef struct acpi_parse_obj_named 827 { 828 ACPI_PARSE_COMMON 829 UINT8 *Path; 830 UINT8 *Data; /* AML body or bytelist data */ 831 UINT32 Length; /* AML length */ 832 UINT32 Name; /* 4-byte name or zero if no name */ 833 834 } ACPI_PARSE_OBJ_NAMED; 835 836 837 /* This version is used by the iASL compiler only */ 838 839 #define ACPI_MAX_PARSEOP_NAME 20 840 841 typedef struct acpi_parse_obj_asl 842 { 843 ACPI_PARSE_COMMON 844 union acpi_parse_object *Child; 845 union acpi_parse_object *ParentMethod; 846 char *Filename; 847 char *ExternalName; 848 char *Namepath; 849 char NameSeg[4]; 850 UINT32 ExtraValue; 851 UINT32 Column; 852 UINT32 LineNumber; 853 UINT32 LogicalLineNumber; 854 UINT32 LogicalByteOffset; 855 UINT32 EndLine; 856 UINT32 EndLogicalLine; 857 UINT32 AcpiBtype; 858 UINT32 AmlLength; 859 UINT32 AmlSubtreeLength; 860 UINT32 FinalAmlLength; 861 UINT32 FinalAmlOffset; 862 UINT32 CompileFlags; 863 UINT16 ParseOpcode; 864 UINT8 AmlOpcodeLength; 865 UINT8 AmlPkgLenBytes; 866 UINT8 Extra; 867 char ParseOpName[ACPI_MAX_PARSEOP_NAME]; 868 869 } ACPI_PARSE_OBJ_ASL; 870 871 typedef union acpi_parse_object 872 { 873 ACPI_PARSE_OBJ_COMMON Common; 874 ACPI_PARSE_OBJ_NAMED Named; 875 ACPI_PARSE_OBJ_ASL Asl; 876 877 } ACPI_PARSE_OBJECT; 878 879 880 /* 881 * Parse state - one state per parser invocation and each control 882 * method. 883 */ 884 typedef struct acpi_parse_state 885 { 886 UINT8 *AmlStart; /* First AML byte */ 887 UINT8 *Aml; /* Next AML byte */ 888 UINT8 *AmlEnd; /* (last + 1) AML byte */ 889 UINT8 *PkgStart; /* Current package begin */ 890 UINT8 *PkgEnd; /* Current package end */ 891 union acpi_parse_object *StartOp; /* Root of parse tree */ 892 struct acpi_namespace_node *StartNode; 893 union acpi_generic_state *Scope; /* Current scope */ 894 union acpi_parse_object *StartScope; 895 UINT32 AmlSize; 896 897 } ACPI_PARSE_STATE; 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 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 916 917 918 /***************************************************************************** 919 * 920 * Hardware (ACPI registers) and PNP 921 * 922 ****************************************************************************/ 923 924 #define PCI_ROOT_HID_STRING "PNP0A03" 925 #define PCI_EXPRESS_ROOT_HID_STRING "PNP0A08" 926 927 typedef struct acpi_bit_register_info 928 { 929 UINT8 ParentRegister; 930 UINT8 BitPosition; 931 UINT16 AccessBitMask; 932 933 } ACPI_BIT_REGISTER_INFO; 934 935 936 /* 937 * Some ACPI registers have bits that must be ignored -- meaning that they 938 * must be preserved. 939 */ 940 #define ACPI_PM1_STATUS_PRESERVED_BITS 0x0800 /* Bit 11 */ 941 #define ACPI_PM1_CONTROL_PRESERVED_BITS 0x0201 /* Bit 9, Bit 0 (SCI_EN) */ 942 943 944 /* 945 * Register IDs 946 * These are the full ACPI registers 947 */ 948 #define ACPI_REGISTER_PM1_STATUS 0x01 949 #define ACPI_REGISTER_PM1_ENABLE 0x02 950 #define ACPI_REGISTER_PM1_CONTROL 0x03 951 #define ACPI_REGISTER_PM1A_CONTROL 0x04 952 #define ACPI_REGISTER_PM1B_CONTROL 0x05 953 #define ACPI_REGISTER_PM2_CONTROL 0x06 954 #define ACPI_REGISTER_PM_TIMER 0x07 955 #define ACPI_REGISTER_PROCESSOR_BLOCK 0x08 956 #define ACPI_REGISTER_SMI_COMMAND_BLOCK 0x09 957 958 959 /* Masks used to access the BitRegisters */ 960 961 #define ACPI_BITMASK_TIMER_STATUS 0x0001 962 #define ACPI_BITMASK_BUS_MASTER_STATUS 0x0010 963 #define ACPI_BITMASK_GLOBAL_LOCK_STATUS 0x0020 964 #define ACPI_BITMASK_POWER_BUTTON_STATUS 0x0100 965 #define ACPI_BITMASK_SLEEP_BUTTON_STATUS 0x0200 966 #define ACPI_BITMASK_RT_CLOCK_STATUS 0x0400 967 #define ACPI_BITMASK_PCIEXP_WAKE_STATUS 0x4000 /* ACPI 3.0 */ 968 #define ACPI_BITMASK_WAKE_STATUS 0x8000 969 970 #define ACPI_BITMASK_ALL_FIXED_STATUS (\ 971 ACPI_BITMASK_TIMER_STATUS | \ 972 ACPI_BITMASK_BUS_MASTER_STATUS | \ 973 ACPI_BITMASK_GLOBAL_LOCK_STATUS | \ 974 ACPI_BITMASK_POWER_BUTTON_STATUS | \ 975 ACPI_BITMASK_SLEEP_BUTTON_STATUS | \ 976 ACPI_BITMASK_RT_CLOCK_STATUS | \ 977 ACPI_BITMASK_WAKE_STATUS) 978 979 #define ACPI_BITMASK_TIMER_ENABLE 0x0001 980 #define ACPI_BITMASK_GLOBAL_LOCK_ENABLE 0x0020 981 #define ACPI_BITMASK_POWER_BUTTON_ENABLE 0x0100 982 #define ACPI_BITMASK_SLEEP_BUTTON_ENABLE 0x0200 983 #define ACPI_BITMASK_RT_CLOCK_ENABLE 0x0400 984 #define ACPI_BITMASK_PCIEXP_WAKE_DISABLE 0x4000 /* ACPI 3.0 */ 985 986 #define ACPI_BITMASK_SCI_ENABLE 0x0001 987 #define ACPI_BITMASK_BUS_MASTER_RLD 0x0002 988 #define ACPI_BITMASK_GLOBAL_LOCK_RELEASE 0x0004 989 #define ACPI_BITMASK_SLEEP_TYPE_X 0x1C00 990 #define ACPI_BITMASK_SLEEP_ENABLE 0x2000 991 992 #define ACPI_BITMASK_ARB_DISABLE 0x0001 993 994 995 /* Raw bit position of each BitRegister */ 996 997 #define ACPI_BITPOSITION_TIMER_STATUS 0x00 998 #define ACPI_BITPOSITION_BUS_MASTER_STATUS 0x04 999 #define ACPI_BITPOSITION_GLOBAL_LOCK_STATUS 0x05 1000 #define ACPI_BITPOSITION_POWER_BUTTON_STATUS 0x08 1001 #define ACPI_BITPOSITION_SLEEP_BUTTON_STATUS 0x09 1002 #define ACPI_BITPOSITION_RT_CLOCK_STATUS 0x0A 1003 #define ACPI_BITPOSITION_PCIEXP_WAKE_STATUS 0x0E /* ACPI 3.0 */ 1004 #define ACPI_BITPOSITION_WAKE_STATUS 0x0F 1005 1006 #define ACPI_BITPOSITION_TIMER_ENABLE 0x00 1007 #define ACPI_BITPOSITION_GLOBAL_LOCK_ENABLE 0x05 1008 #define ACPI_BITPOSITION_POWER_BUTTON_ENABLE 0x08 1009 #define ACPI_BITPOSITION_SLEEP_BUTTON_ENABLE 0x09 1010 #define ACPI_BITPOSITION_RT_CLOCK_ENABLE 0x0A 1011 #define ACPI_BITPOSITION_PCIEXP_WAKE_DISABLE 0x0E /* ACPI 3.0 */ 1012 1013 #define ACPI_BITPOSITION_SCI_ENABLE 0x00 1014 #define ACPI_BITPOSITION_BUS_MASTER_RLD 0x01 1015 #define ACPI_BITPOSITION_GLOBAL_LOCK_RELEASE 0x02 1016 #define ACPI_BITPOSITION_SLEEP_TYPE_X 0x0A 1017 #define ACPI_BITPOSITION_SLEEP_ENABLE 0x0D 1018 1019 #define ACPI_BITPOSITION_ARB_DISABLE 0x00 1020 1021 1022 /***************************************************************************** 1023 * 1024 * Resource descriptors 1025 * 1026 ****************************************************************************/ 1027 1028 /* ResourceType values */ 1029 1030 #define ACPI_ADDRESS_TYPE_MEMORY_RANGE 0 1031 #define ACPI_ADDRESS_TYPE_IO_RANGE 1 1032 #define ACPI_ADDRESS_TYPE_BUS_NUMBER_RANGE 2 1033 1034 /* Resource descriptor types and masks */ 1035 1036 #define ACPI_RESOURCE_NAME_LARGE 0x80 1037 #define ACPI_RESOURCE_NAME_SMALL 0x00 1038 1039 #define ACPI_RESOURCE_NAME_SMALL_MASK 0x78 /* Bits 6:3 contain the type */ 1040 #define ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK 0x07 /* Bits 2:0 contain the length */ 1041 #define ACPI_RESOURCE_NAME_LARGE_MASK 0x7F /* Bits 6:0 contain the type */ 1042 1043 1044 /* 1045 * Small resource descriptor "names" as defined by the ACPI specification. 1046 * Note: Bits 2:0 are used for the descriptor length 1047 */ 1048 #define ACPI_RESOURCE_NAME_IRQ 0x20 1049 #define ACPI_RESOURCE_NAME_DMA 0x28 1050 #define ACPI_RESOURCE_NAME_START_DEPENDENT 0x30 1051 #define ACPI_RESOURCE_NAME_END_DEPENDENT 0x38 1052 #define ACPI_RESOURCE_NAME_IO 0x40 1053 #define ACPI_RESOURCE_NAME_FIXED_IO 0x48 1054 #define ACPI_RESOURCE_NAME_RESERVED_S1 0x50 1055 #define ACPI_RESOURCE_NAME_RESERVED_S2 0x58 1056 #define ACPI_RESOURCE_NAME_RESERVED_S3 0x60 1057 #define ACPI_RESOURCE_NAME_RESERVED_S4 0x68 1058 #define ACPI_RESOURCE_NAME_VENDOR_SMALL 0x70 1059 #define ACPI_RESOURCE_NAME_END_TAG 0x78 1060 1061 /* 1062 * Large resource descriptor "names" as defined by the ACPI specification. 1063 * Note: includes the Large Descriptor bit in bit[7] 1064 */ 1065 #define ACPI_RESOURCE_NAME_MEMORY24 0x81 1066 #define ACPI_RESOURCE_NAME_GENERIC_REGISTER 0x82 1067 #define ACPI_RESOURCE_NAME_RESERVED_L1 0x83 1068 #define ACPI_RESOURCE_NAME_VENDOR_LARGE 0x84 1069 #define ACPI_RESOURCE_NAME_MEMORY32 0x85 1070 #define ACPI_RESOURCE_NAME_FIXED_MEMORY32 0x86 1071 #define ACPI_RESOURCE_NAME_ADDRESS32 0x87 1072 #define ACPI_RESOURCE_NAME_ADDRESS16 0x88 1073 #define ACPI_RESOURCE_NAME_EXTENDED_IRQ 0x89 1074 #define ACPI_RESOURCE_NAME_ADDRESS64 0x8A 1075 #define ACPI_RESOURCE_NAME_EXTENDED_ADDRESS64 0x8B 1076 #define ACPI_RESOURCE_NAME_LARGE_MAX 0x8B 1077 1078 1079 /***************************************************************************** 1080 * 1081 * Miscellaneous 1082 * 1083 ****************************************************************************/ 1084 1085 #define ACPI_ASCII_ZERO 0x30 1086 1087 1088 /***************************************************************************** 1089 * 1090 * Debugger 1091 * 1092 ****************************************************************************/ 1093 1094 typedef struct acpi_db_method_info 1095 { 1096 ACPI_HANDLE MainThreadGate; 1097 ACPI_HANDLE ThreadCompleteGate; 1098 UINT32 *Threads; 1099 UINT32 NumThreads; 1100 UINT32 NumCreated; 1101 UINT32 NumCompleted; 1102 1103 char *Name; 1104 UINT32 Flags; 1105 UINT32 NumLoops; 1106 char Pathname[128]; 1107 char **Args; 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 1121 } ACPI_DB_METHOD_INFO; 1122 1123 typedef struct acpi_integrity_info 1124 { 1125 UINT32 Nodes; 1126 UINT32 Objects; 1127 1128 } ACPI_INTEGRITY_INFO; 1129 1130 1131 #define ACPI_DB_REDIRECTABLE_OUTPUT 0x01 1132 #define ACPI_DB_CONSOLE_OUTPUT 0x02 1133 #define ACPI_DB_DUPLICATE_OUTPUT 0x03 1134 1135 1136 /***************************************************************************** 1137 * 1138 * Debug 1139 * 1140 ****************************************************************************/ 1141 1142 /* Entry for a memory allocation (debug only) */ 1143 1144 #define ACPI_MEM_MALLOC 0 1145 #define ACPI_MEM_CALLOC 1 1146 #define ACPI_MAX_MODULE_NAME 16 1147 1148 #define ACPI_COMMON_DEBUG_MEM_HEADER \ 1149 struct acpi_debug_mem_block *Previous; \ 1150 struct acpi_debug_mem_block *Next; \ 1151 UINT32 Size; \ 1152 UINT32 Component; \ 1153 UINT32 Line; \ 1154 char Module[ACPI_MAX_MODULE_NAME]; \ 1155 UINT8 AllocType; 1156 1157 typedef struct acpi_debug_mem_header 1158 { 1159 ACPI_COMMON_DEBUG_MEM_HEADER 1160 1161 } ACPI_DEBUG_MEM_HEADER; 1162 1163 typedef struct acpi_debug_mem_block 1164 { 1165 ACPI_COMMON_DEBUG_MEM_HEADER 1166 UINT64 UserSpace; 1167 1168 } ACPI_DEBUG_MEM_BLOCK; 1169 1170 1171 #define ACPI_MEM_LIST_GLOBAL 0 1172 #define ACPI_MEM_LIST_NSNODE 1 1173 #define ACPI_MEM_LIST_MAX 1 1174 #define ACPI_NUM_MEM_LISTS 2 1175 1176 1177 typedef struct acpi_memory_list 1178 { 1179 char *ListName; 1180 void *ListHead; 1181 UINT16 ObjectSize; 1182 UINT16 MaxDepth; 1183 UINT16 CurrentDepth; 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; 1194 UINT32 CurrentTotalSize; 1195 UINT32 Requests; 1196 UINT32 Hits; 1197 #endif 1198 1199 } ACPI_MEMORY_LIST; 1200 1201 1202 #endif /* __ACLOCAL_H__ */ 1203