acobject.h (27f7c583) | acobject.h (db2bae30) |
---|---|
1 2/****************************************************************************** 3 * 4 * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only) | 1 2/****************************************************************************** 3 * 4 * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only) |
5 * $Revision: 1.139 $ | 5 * $Revision: 1.144 $ |
6 * 7 *****************************************************************************/ 8 9/****************************************************************************** 10 * 11 * 1. Copyright Notice 12 * | 6 * 7 *****************************************************************************/ 8 9/****************************************************************************** 10 * 11 * 1. Copyright Notice 12 * |
13 * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp. | 13 * Some or all of this work - Copyright (c) 1999 - 2008, Intel Corp. |
14 * All rights reserved. 15 * 16 * 2. License 17 * 18 * 2.1. This is your license from Intel Corp. under its intellectual property 19 * rights. You may have additional license terms from the party that provided 20 * you this software, covering your right to use that party's intellectual 21 * property rights. --- 99 unchanged lines hidden (view full) --- 121/* acpisrc:StructDefs -- for acpisrc conversion */ 122 123 124/* 125 * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher 126 * to the interpreter, and to keep track of the various handlers such as 127 * address space handlers and notify handlers. The object is a constant 128 * size in order to allow it to be cached and reused. | 14 * All rights reserved. 15 * 16 * 2. License 17 * 18 * 2.1. This is your license from Intel Corp. under its intellectual property 19 * rights. You may have additional license terms from the party that provided 20 * you this software, covering your right to use that party's intellectual 21 * property rights. --- 99 unchanged lines hidden (view full) --- 121/* acpisrc:StructDefs -- for acpisrc conversion */ 122 123 124/* 125 * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher 126 * to the interpreter, and to keep track of the various handlers such as 127 * address space handlers and notify handlers. The object is a constant 128 * size in order to allow it to be cached and reused. |
129 * 130 * Note: The object is optimized to be aligned and will not work if it is 131 * byte-packed. |
|
129 */ | 132 */ |
133#if ACPI_MACHINE_WIDTH == 64 134#pragma pack(8) 135#else 136#pragma pack(4) 137#endif |
|
130 131/******************************************************************************* 132 * 133 * Common Descriptors 134 * 135 ******************************************************************************/ 136 137/* --- 39 unchanged lines hidden (view full) --- 177 ACPI_OBJECT_COMMON_HEADER 178 179} ACPI_OBJECT_COMMON; 180 181 182typedef struct acpi_object_integer 183{ 184 ACPI_OBJECT_COMMON_HEADER | 138 139/******************************************************************************* 140 * 141 * Common Descriptors 142 * 143 ******************************************************************************/ 144 145/* --- 39 unchanged lines hidden (view full) --- 185 ACPI_OBJECT_COMMON_HEADER 186 187} ACPI_OBJECT_COMMON; 188 189 190typedef struct acpi_object_integer 191{ 192 ACPI_OBJECT_COMMON_HEADER |
193 UINT8 Fill[3]; /* Prevent warning on some compilers */ |
|
185 ACPI_INTEGER Value; 186 187} ACPI_OBJECT_INTEGER; 188 189 190/* 191 * Note: The String and Buffer object must be identical through the Pointer 192 * and length elements. There is code that depends on this. --- 50 unchanged lines hidden (view full) --- 243} ACPI_OBJECT_EVENT; 244 245 246typedef struct acpi_object_mutex 247{ 248 ACPI_OBJECT_COMMON_HEADER 249 UINT8 SyncLevel; /* 0-15, specified in Mutex() call */ 250 UINT16 AcquisitionDepth; /* Allow multiple Acquires, same thread */ | 194 ACPI_INTEGER Value; 195 196} ACPI_OBJECT_INTEGER; 197 198 199/* 200 * Note: The String and Buffer object must be identical through the Pointer 201 * and length elements. There is code that depends on this. --- 50 unchanged lines hidden (view full) --- 252} ACPI_OBJECT_EVENT; 253 254 255typedef struct acpi_object_mutex 256{ 257 ACPI_OBJECT_COMMON_HEADER 258 UINT8 SyncLevel; /* 0-15, specified in Mutex() call */ 259 UINT16 AcquisitionDepth; /* Allow multiple Acquires, same thread */ |
251 struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */ | |
252 ACPI_MUTEX OsMutex; /* Actual OS synchronization object */ | 260 ACPI_MUTEX OsMutex; /* Actual OS synchronization object */ |
261 ACPI_THREAD_ID ThreadId; /* Current owner of the mutex */ 262 struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */ |
|
253 union acpi_operand_object *Prev; /* Link for list of acquired mutexes */ 254 union acpi_operand_object *Next; /* Link for list of acquired mutexes */ 255 ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 256 UINT8 OriginalSyncLevel; /* Owner's original sync level (0-15) */ 257 258} ACPI_OBJECT_MUTEX; 259 260 --- 66 unchanged lines hidden (view full) --- 327 UINT32 ResourceOrder; 328 329} ACPI_OBJECT_POWER_RESOURCE; 330 331 332typedef struct acpi_object_processor 333{ 334 ACPI_OBJECT_COMMON_HEADER | 263 union acpi_operand_object *Prev; /* Link for list of acquired mutexes */ 264 union acpi_operand_object *Next; /* Link for list of acquired mutexes */ 265 ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 266 UINT8 OriginalSyncLevel; /* Owner's original sync level (0-15) */ 267 268} ACPI_OBJECT_MUTEX; 269 270 --- 66 unchanged lines hidden (view full) --- 337 UINT32 ResourceOrder; 338 339} ACPI_OBJECT_POWER_RESOURCE; 340 341 342typedef struct acpi_object_processor 343{ 344 ACPI_OBJECT_COMMON_HEADER |
345 346 /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */ 347 |
|
335 UINT8 ProcId; 336 UINT8 Length; 337 ACPI_COMMON_NOTIFY_INFO 338 ACPI_IO_ADDRESS Address; 339 340} ACPI_OBJECT_PROCESSOR; 341 342 --- 119 unchanged lines hidden (view full) --- 462 463/****************************************************************************** 464 * 465 * Special internal objects 466 * 467 *****************************************************************************/ 468 469/* | 348 UINT8 ProcId; 349 UINT8 Length; 350 ACPI_COMMON_NOTIFY_INFO 351 ACPI_IO_ADDRESS Address; 352 353} ACPI_OBJECT_PROCESSOR; 354 355 --- 119 unchanged lines hidden (view full) --- 475 476/****************************************************************************** 477 * 478 * Special internal objects 479 * 480 *****************************************************************************/ 481 482/* |
470 * The Reference object type is used for these opcodes: 471 * Arg[0-6], Local[0-7], IndexOp, NameOp, ZeroOp, OneOp, OnesOp, DebugOp | 483 * The Reference object is used for these opcodes: 484 * Arg[0-6], Local[0-7], IndexOp, NameOp, RefOfOp, LoadOp, LoadTableOp, DebugOp 485 * The Reference.Class differentiates these types. |
472 */ 473typedef struct acpi_object_reference 474{ 475 ACPI_OBJECT_COMMON_HEADER | 486 */ 487typedef struct acpi_object_reference 488{ 489 ACPI_OBJECT_COMMON_HEADER |
476 UINT8 TargetType; /* Used for IndexOp */ 477 UINT16 Opcode; 478 void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */ 479 ACPI_NAMESPACE_NODE *Node; 480 union acpi_operand_object **Where; 481 UINT32 Offset; /* Used for ArgOp, LocalOp, and IndexOp */ | 490 UINT8 Class; /* Reference Class */ 491 UINT8 TargetType; /* Used for Index Op */ 492 UINT8 Reserved; 493 void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */ 494 ACPI_NAMESPACE_NODE *Node; /* RefOf or Namepath */ 495 union acpi_operand_object **Where; /* Target of Index */ 496 UINT32 Value; /* Used for Local/Arg/Index/DdbHandle */ |
482 483} ACPI_OBJECT_REFERENCE; 484 | 497 498} ACPI_OBJECT_REFERENCE; 499 |
500/* Values for Reference.Class above */ |
|
485 | 501 |
502typedef enum 503{ 504 ACPI_REFCLASS_LOCAL = 0, /* Method local */ 505 ACPI_REFCLASS_ARG = 1, /* Method argument */ 506 ACPI_REFCLASS_REFOF = 2, /* Result of RefOf() TBD: Split to Ref/Node and Ref/OperandObj? */ 507 ACPI_REFCLASS_INDEX = 3, /* Result of Index() */ 508 ACPI_REFCLASS_TABLE = 4, /* DdbHandle - Load(), LoadTable() */ 509 ACPI_REFCLASS_NAME = 5, /* Reference to a named object */ 510 ACPI_REFCLASS_DEBUG = 6, /* Debug object */ 511 512 ACPI_REFCLASS_MAX = 6 513 514} ACPI_REFERENCE_CLASSES; 515 516 |
|
486/* 487 * Extra object is used as additional storage for types that 488 * have AML code in their declarations (TermArgs) that must be 489 * evaluated at run time. 490 * 491 * Currently: Region and FieldUnit types 492 */ 493typedef struct acpi_object_extra --- 57 unchanged lines hidden (view full) --- 551 ACPI_OBJECT_INDEX_FIELD IndexField; 552 ACPI_OBJECT_NOTIFY_HANDLER Notify; 553 ACPI_OBJECT_ADDR_HANDLER AddressSpace; 554 ACPI_OBJECT_REFERENCE Reference; 555 ACPI_OBJECT_EXTRA Extra; 556 ACPI_OBJECT_DATA Data; 557 ACPI_OBJECT_CACHE_LIST Cache; 558 | 517/* 518 * Extra object is used as additional storage for types that 519 * have AML code in their declarations (TermArgs) that must be 520 * evaluated at run time. 521 * 522 * Currently: Region and FieldUnit types 523 */ 524typedef struct acpi_object_extra --- 57 unchanged lines hidden (view full) --- 582 ACPI_OBJECT_INDEX_FIELD IndexField; 583 ACPI_OBJECT_NOTIFY_HANDLER Notify; 584 ACPI_OBJECT_ADDR_HANDLER AddressSpace; 585 ACPI_OBJECT_REFERENCE Reference; 586 ACPI_OBJECT_EXTRA Extra; 587 ACPI_OBJECT_DATA Data; 588 ACPI_OBJECT_CACHE_LIST Cache; 589 |
590 /* 591 * Add namespace node to union in order to simplify code that accepts both 592 * ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs. The structures share 593 * a common DescriptorType field in order to differentiate them. 594 */ 595 ACPI_NAMESPACE_NODE Node; 596 |
|
559} ACPI_OPERAND_OBJECT; 560 561 562/****************************************************************************** 563 * 564 * ACPI_DESCRIPTOR - objects that share a common descriptor identifier 565 * 566 *****************************************************************************/ --- 29 unchanged lines hidden (view full) --- 596{ 597 ACPI_COMMON_DESCRIPTOR Common; 598 ACPI_OPERAND_OBJECT Object; 599 ACPI_NAMESPACE_NODE Node; 600 ACPI_PARSE_OBJECT Op; 601 602} ACPI_DESCRIPTOR; 603 | 597} ACPI_OPERAND_OBJECT; 598 599 600/****************************************************************************** 601 * 602 * ACPI_DESCRIPTOR - objects that share a common descriptor identifier 603 * 604 *****************************************************************************/ --- 29 unchanged lines hidden (view full) --- 634{ 635 ACPI_COMMON_DESCRIPTOR Common; 636 ACPI_OPERAND_OBJECT Object; 637 ACPI_NAMESPACE_NODE Node; 638 ACPI_PARSE_OBJECT Op; 639 640} ACPI_DESCRIPTOR; 641 |
642#pragma pack() |
|
604 605#endif /* _ACOBJECT_H */ | 643 644#endif /* _ACOBJECT_H */ |