![]() |
|
|||
File indexing completed on 2025-05-11 08:23:41
0001 /****************************************************************************** 0002 * 0003 * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only) 0004 * 0005 *****************************************************************************/ 0006 0007 /****************************************************************************** 0008 * 0009 * 1. Copyright Notice 0010 * 0011 * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp. 0012 * All rights reserved. 0013 * 0014 * 2. License 0015 * 0016 * 2.1. This is your license from Intel Corp. under its intellectual property 0017 * rights. You may have additional license terms from the party that provided 0018 * you this software, covering your right to use that party's intellectual 0019 * property rights. 0020 * 0021 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 0022 * copy of the source code appearing in this file ("Covered Code") an 0023 * irrevocable, perpetual, worldwide license under Intel's copyrights in the 0024 * base code distributed originally by Intel ("Original Intel Code") to copy, 0025 * make derivatives, distribute, use and display any portion of the Covered 0026 * Code in any form, with the right to sublicense such rights; and 0027 * 0028 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 0029 * license (with the right to sublicense), under only those claims of Intel 0030 * patents that are infringed by the Original Intel Code, to make, use, sell, 0031 * offer to sell, and import the Covered Code and derivative works thereof 0032 * solely to the minimum extent necessary to exercise the above copyright 0033 * license, and in no event shall the patent license extend to any additions 0034 * to or modifications of the Original Intel Code. No other license or right 0035 * is granted directly or by implication, estoppel or otherwise; 0036 * 0037 * The above copyright and patent license is granted only if the following 0038 * conditions are met: 0039 * 0040 * 3. Conditions 0041 * 0042 * 3.1. Redistribution of Source with Rights to Further Distribute Source. 0043 * Redistribution of source code of any substantial portion of the Covered 0044 * Code or modification with rights to further distribute source must include 0045 * the above Copyright Notice, the above License, this list of Conditions, 0046 * and the following Disclaimer and Export Compliance provision. In addition, 0047 * Licensee must cause all Covered Code to which Licensee contributes to 0048 * contain a file documenting the changes Licensee made to create that Covered 0049 * Code and the date of any change. Licensee must include in that file the 0050 * documentation of any changes made by any predecessor Licensee. Licensee 0051 * must include a prominent statement that the modification is derived, 0052 * directly or indirectly, from Original Intel Code. 0053 * 0054 * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 0055 * Redistribution of source code of any substantial portion of the Covered 0056 * Code or modification without rights to further distribute source must 0057 * include the following Disclaimer and Export Compliance provision in the 0058 * documentation and/or other materials provided with distribution. In 0059 * addition, Licensee may not authorize further sublicense of source of any 0060 * portion of the Covered Code, and must include terms to the effect that the 0061 * license from Licensee to its licensee is limited to the intellectual 0062 * property embodied in the software Licensee provides to its licensee, and 0063 * not to intellectual property embodied in modifications its licensee may 0064 * make. 0065 * 0066 * 3.3. Redistribution of Executable. Redistribution in executable form of any 0067 * substantial portion of the Covered Code or modification must reproduce the 0068 * above Copyright Notice, and the following Disclaimer and Export Compliance 0069 * provision in the documentation and/or other materials provided with the 0070 * distribution. 0071 * 0072 * 3.4. Intel retains all right, title, and interest in and to the Original 0073 * Intel Code. 0074 * 0075 * 3.5. Neither the name Intel nor any other trademark owned or controlled by 0076 * Intel shall be used in advertising or otherwise to promote the sale, use or 0077 * other dealings in products derived from or relating to the Covered Code 0078 * without prior written authorization from Intel. 0079 * 0080 * 4. Disclaimer and Export Compliance 0081 * 0082 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 0083 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 0084 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 0085 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 0086 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 0087 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 0088 * PARTICULAR PURPOSE. 0089 * 0090 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 0091 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 0092 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 0093 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 0094 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 0095 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 0096 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 0097 * LIMITED REMEDY. 0098 * 0099 * 4.3. Licensee shall not export, either directly or indirectly, any of this 0100 * software or system incorporating such software without first obtaining any 0101 * required license or other approval from the U. S. Department of Commerce or 0102 * any other agency or department of the United States Government. In the 0103 * event Licensee exports any such software from the United States or 0104 * re-exports any such software from a foreign destination, Licensee shall 0105 * ensure that the distribution and export/re-export of the software is in 0106 * compliance with all laws, regulations, orders, or other restrictions of the 0107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor 0108 * any of its subsidiaries will export/re-export any technical data, process, 0109 * software, or service, directly or indirectly, to any country for which the 0110 * United States government or any agency thereof requires an export license, 0111 * other governmental approval, or letter of assurance, without first obtaining 0112 * such license, approval or letter. 0113 * 0114 ***************************************************************************** 0115 * 0116 * Alternatively, you may choose to be licensed under the terms of the 0117 * following license: 0118 * 0119 * Redistribution and use in source and binary forms, with or without 0120 * modification, are permitted provided that the following conditions 0121 * are met: 0122 * 1. Redistributions of source code must retain the above copyright 0123 * notice, this list of conditions, and the following disclaimer, 0124 * without modification. 0125 * 2. Redistributions in binary form must reproduce at minimum a disclaimer 0126 * substantially similar to the "NO WARRANTY" disclaimer below 0127 * ("Disclaimer") and any redistribution must be conditioned upon 0128 * including a substantially similar Disclaimer requirement for further 0129 * binary redistribution. 0130 * 3. Neither the names of the above-listed copyright holders nor the names 0131 * of any contributors may be used to endorse or promote products derived 0132 * from this software without specific prior written permission. 0133 * 0134 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 0135 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 0136 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 0137 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 0138 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 0139 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 0140 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 0141 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 0142 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 0143 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 0144 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 0145 * 0146 * Alternatively, you may choose to be licensed under the terms of the 0147 * GNU General Public License ("GPL") version 2 as published by the Free 0148 * Software Foundation. 0149 * 0150 *****************************************************************************/ 0151 0152 #ifndef _ACOBJECT_H 0153 #define _ACOBJECT_H 0154 0155 /* acpisrc:StructDefs -- for acpisrc conversion */ 0156 0157 0158 /* 0159 * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher 0160 * to the interpreter, and to keep track of the various handlers such as 0161 * address space handlers and notify handlers. The object is a constant 0162 * size in order to allow it to be cached and reused. 0163 * 0164 * Note: The object is optimized to be aligned and will not work if it is 0165 * byte-packed. 0166 */ 0167 #if ACPI_MACHINE_WIDTH == 64 0168 #pragma pack(8) 0169 #else 0170 #pragma pack(4) 0171 #endif 0172 0173 /******************************************************************************* 0174 * 0175 * Common Descriptors 0176 * 0177 ******************************************************************************/ 0178 0179 /* 0180 * Common area for all objects. 0181 * 0182 * DescriptorType is used to differentiate between internal descriptors, and 0183 * must be in the same place across all descriptors 0184 * 0185 * Note: The DescriptorType and Type fields must appear in the identical 0186 * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT 0187 * structures. 0188 */ 0189 #define ACPI_OBJECT_COMMON_HEADER \ 0190 union acpi_operand_object *NextObject; /* Objects linked to parent NS node */\ 0191 UINT8 DescriptorType; /* To differentiate various internal objs */\ 0192 UINT8 Type; /* ACPI_OBJECT_TYPE */\ 0193 UINT16 ReferenceCount; /* For object deletion management */\ 0194 UINT8 Flags 0195 /* 0196 * Note: There are 3 bytes available here before the 0197 * next natural alignment boundary (for both 32/64 cases) 0198 */ 0199 0200 /* Values for Flag byte above */ 0201 0202 #define AOPOBJ_AML_CONSTANT 0x01 /* Integer is an AML constant */ 0203 #define AOPOBJ_STATIC_POINTER 0x02 /* Data is part of an ACPI table, don't delete */ 0204 #define AOPOBJ_DATA_VALID 0x04 /* Object is initialized and data is valid */ 0205 #define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized */ 0206 #define AOPOBJ_REG_CONNECTED 0x10 /* _REG was run */ 0207 #define AOPOBJ_SETUP_COMPLETE 0x20 /* Region setup is complete */ 0208 #define AOPOBJ_INVALID 0x40 /* Host OS won't allow a Region address */ 0209 0210 0211 /****************************************************************************** 0212 * 0213 * Basic data types 0214 * 0215 *****************************************************************************/ 0216 0217 typedef struct acpi_object_common 0218 { 0219 ACPI_OBJECT_COMMON_HEADER; 0220 0221 } ACPI_OBJECT_COMMON; 0222 0223 0224 typedef struct acpi_object_integer 0225 { 0226 ACPI_OBJECT_COMMON_HEADER; 0227 UINT8 Fill[3]; /* Prevent warning on some compilers */ 0228 UINT64 Value; 0229 0230 } ACPI_OBJECT_INTEGER; 0231 0232 0233 /* 0234 * Note: The String and Buffer object must be identical through the 0235 * pointer and length elements. There is code that depends on this. 0236 * 0237 * Fields common to both Strings and Buffers 0238 */ 0239 #define ACPI_COMMON_BUFFER_INFO(_Type) \ 0240 _Type *Pointer; \ 0241 UINT32 Length 0242 0243 0244 /* Null terminated, ASCII characters only */ 0245 0246 typedef struct acpi_object_string 0247 { 0248 ACPI_OBJECT_COMMON_HEADER; 0249 ACPI_COMMON_BUFFER_INFO(char); /* String in AML stream or allocated string */ 0250 0251 } ACPI_OBJECT_STRING; 0252 0253 0254 typedef struct acpi_object_buffer 0255 { 0256 ACPI_OBJECT_COMMON_HEADER; 0257 ACPI_COMMON_BUFFER_INFO(UINT8); /* Buffer in AML stream or allocated buffer */ 0258 UINT32 AmlLength; 0259 UINT8 *AmlStart; 0260 ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 0261 0262 } ACPI_OBJECT_BUFFER; 0263 0264 0265 typedef struct acpi_object_package 0266 { 0267 ACPI_OBJECT_COMMON_HEADER; 0268 ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 0269 union acpi_operand_object **Elements; /* Array of pointers to AcpiObjects */ 0270 UINT8 *AmlStart; 0271 UINT32 AmlLength; 0272 UINT32 Count; /* # of elements in package */ 0273 0274 } ACPI_OBJECT_PACKAGE; 0275 0276 0277 /****************************************************************************** 0278 * 0279 * Complex data types 0280 * 0281 *****************************************************************************/ 0282 0283 typedef struct acpi_object_event 0284 { 0285 ACPI_OBJECT_COMMON_HEADER; 0286 ACPI_SEMAPHORE OsSemaphore; /* Actual OS synchronization object */ 0287 0288 } ACPI_OBJECT_EVENT; 0289 0290 0291 typedef struct acpi_object_mutex 0292 { 0293 ACPI_OBJECT_COMMON_HEADER; 0294 UINT8 SyncLevel; /* 0-15, specified in Mutex() call */ 0295 UINT16 AcquisitionDepth; /* Allow multiple Acquires, same thread */ 0296 ACPI_MUTEX OsMutex; /* Actual OS synchronization object */ 0297 ACPI_THREAD_ID ThreadId; /* Current owner of the mutex */ 0298 struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */ 0299 union acpi_operand_object *Prev; /* Link for list of acquired mutexes */ 0300 union acpi_operand_object *Next; /* Link for list of acquired mutexes */ 0301 ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 0302 UINT8 OriginalSyncLevel; /* Owner's original sync level (0-15) */ 0303 0304 } ACPI_OBJECT_MUTEX; 0305 0306 0307 typedef struct acpi_object_region 0308 { 0309 ACPI_OBJECT_COMMON_HEADER; 0310 UINT8 SpaceId; 0311 ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 0312 union acpi_operand_object *Handler; /* Handler for region access */ 0313 union acpi_operand_object *Next; 0314 ACPI_PHYSICAL_ADDRESS Address; 0315 UINT32 Length; 0316 void *Pointer; /* Only for data table regions */ 0317 0318 } ACPI_OBJECT_REGION; 0319 0320 0321 typedef struct acpi_object_method 0322 { 0323 ACPI_OBJECT_COMMON_HEADER; 0324 UINT8 InfoFlags; 0325 UINT8 ParamCount; 0326 UINT8 SyncLevel; 0327 union acpi_operand_object *Mutex; 0328 union acpi_operand_object *Node; 0329 UINT8 *AmlStart; 0330 union 0331 { 0332 ACPI_INTERNAL_METHOD Implementation; 0333 union acpi_operand_object *Handler; 0334 } Dispatch; 0335 0336 UINT32 AmlLength; 0337 ACPI_OWNER_ID OwnerId; 0338 UINT8 ThreadCount; 0339 0340 } ACPI_OBJECT_METHOD; 0341 0342 /* Flags for InfoFlags field above */ 0343 0344 #define ACPI_METHOD_MODULE_LEVEL 0x01 /* Method is actually module-level code */ 0345 #define ACPI_METHOD_INTERNAL_ONLY 0x02 /* Method is implemented internally (_OSI) */ 0346 #define ACPI_METHOD_SERIALIZED 0x04 /* Method is serialized */ 0347 #define ACPI_METHOD_SERIALIZED_PENDING 0x08 /* Method is to be marked serialized */ 0348 #define ACPI_METHOD_IGNORE_SYNC_LEVEL 0x10 /* Method was auto-serialized at table load time */ 0349 #define ACPI_METHOD_MODIFIED_NAMESPACE 0x20 /* Method modified the namespace */ 0350 0351 0352 /****************************************************************************** 0353 * 0354 * Objects that can be notified. All share a common NotifyInfo area. 0355 * 0356 *****************************************************************************/ 0357 0358 /* 0359 * Common fields for objects that support ASL notifications 0360 */ 0361 #define ACPI_COMMON_NOTIFY_INFO \ 0362 union acpi_operand_object *NotifyList[2]; /* Handlers for system/device notifies */\ 0363 union acpi_operand_object *Handler /* Handler for Address space */ 0364 0365 /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ 0366 0367 typedef struct acpi_object_notify_common 0368 { 0369 ACPI_OBJECT_COMMON_HEADER; 0370 ACPI_COMMON_NOTIFY_INFO; 0371 0372 } ACPI_OBJECT_NOTIFY_COMMON; 0373 0374 0375 typedef struct acpi_object_device 0376 { 0377 ACPI_OBJECT_COMMON_HEADER; 0378 ACPI_COMMON_NOTIFY_INFO; 0379 ACPI_GPE_BLOCK_INFO *GpeBlock; 0380 0381 } ACPI_OBJECT_DEVICE; 0382 0383 0384 typedef struct acpi_object_power_resource 0385 { 0386 ACPI_OBJECT_COMMON_HEADER; 0387 ACPI_COMMON_NOTIFY_INFO; 0388 UINT32 SystemLevel; 0389 UINT32 ResourceOrder; 0390 0391 } ACPI_OBJECT_POWER_RESOURCE; 0392 0393 0394 typedef struct acpi_object_processor 0395 { 0396 ACPI_OBJECT_COMMON_HEADER; 0397 0398 /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */ 0399 0400 UINT8 ProcId; 0401 UINT8 Length; 0402 ACPI_COMMON_NOTIFY_INFO; 0403 ACPI_IO_ADDRESS Address; 0404 0405 } ACPI_OBJECT_PROCESSOR; 0406 0407 0408 typedef struct acpi_object_thermal_zone 0409 { 0410 ACPI_OBJECT_COMMON_HEADER; 0411 ACPI_COMMON_NOTIFY_INFO; 0412 0413 } ACPI_OBJECT_THERMAL_ZONE; 0414 0415 0416 /****************************************************************************** 0417 * 0418 * Fields. All share a common header/info field. 0419 * 0420 *****************************************************************************/ 0421 0422 /* 0423 * Common bitfield for the field objects 0424 * "Field Datum" -- a datum from the actual field object 0425 * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field 0426 */ 0427 #define ACPI_COMMON_FIELD_INFO \ 0428 UINT8 FieldFlags; /* Access, update, and lock bits */\ 0429 UINT8 Attribute; /* From AccessAs keyword */\ 0430 UINT8 AccessByteWidth; /* Read/Write size in bytes */\ 0431 ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */\ 0432 UINT32 BitLength; /* Length of field in bits */\ 0433 UINT32 BaseByteOffset; /* Byte offset within containing object */\ 0434 UINT32 Value; /* Value to store into the Bank or Index register */\ 0435 UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\ 0436 UINT8 AccessLength /* For serial regions/fields */ 0437 0438 /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ 0439 0440 typedef struct acpi_object_field_common 0441 { 0442 ACPI_OBJECT_COMMON_HEADER; 0443 ACPI_COMMON_FIELD_INFO; 0444 union acpi_operand_object *RegionObj; /* Parent Operation Region object (REGION/BANK fields only) */ 0445 0446 } ACPI_OBJECT_FIELD_COMMON; 0447 0448 0449 typedef struct acpi_object_region_field 0450 { 0451 ACPI_OBJECT_COMMON_HEADER; 0452 ACPI_COMMON_FIELD_INFO; 0453 UINT16 ResourceLength; 0454 union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 0455 UINT8 *ResourceBuffer; /* ResourceTemplate for serial regions/fields */ 0456 UINT16 PinNumberIndex; /* Index relative to previous Connection/Template */ 0457 UINT8 *InternalPccBuffer; /* Internal buffer for fields associated with PCC */ 0458 0459 } ACPI_OBJECT_REGION_FIELD; 0460 0461 0462 typedef struct acpi_object_bank_field 0463 { 0464 ACPI_OBJECT_COMMON_HEADER; 0465 ACPI_COMMON_FIELD_INFO; 0466 union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 0467 union acpi_operand_object *BankObj; /* BankSelect Register object */ 0468 0469 } ACPI_OBJECT_BANK_FIELD; 0470 0471 0472 typedef struct acpi_object_index_field 0473 { 0474 ACPI_OBJECT_COMMON_HEADER; 0475 ACPI_COMMON_FIELD_INFO; 0476 0477 /* 0478 * No "RegionObj" pointer needed since the Index and Data registers 0479 * are each field definitions unto themselves. 0480 */ 0481 union acpi_operand_object *IndexObj; /* Index register */ 0482 union acpi_operand_object *DataObj; /* Data register */ 0483 0484 } ACPI_OBJECT_INDEX_FIELD; 0485 0486 0487 /* The BufferField is different in that it is part of a Buffer, not an OpRegion */ 0488 0489 typedef struct acpi_object_buffer_field 0490 { 0491 ACPI_OBJECT_COMMON_HEADER; 0492 ACPI_COMMON_FIELD_INFO; 0493 BOOLEAN IsCreateField; /* Special case for objects created by CreateField() */ 0494 union acpi_operand_object *BufferObj; /* Containing Buffer object */ 0495 0496 } ACPI_OBJECT_BUFFER_FIELD; 0497 0498 0499 /****************************************************************************** 0500 * 0501 * Objects for handlers 0502 * 0503 *****************************************************************************/ 0504 0505 typedef struct acpi_object_notify_handler 0506 { 0507 ACPI_OBJECT_COMMON_HEADER; 0508 ACPI_NAMESPACE_NODE *Node; /* Parent device */ 0509 UINT32 HandlerType; /* Type: Device/System/Both */ 0510 ACPI_NOTIFY_HANDLER Handler; /* Handler address */ 0511 void *Context; 0512 union acpi_operand_object *Next[2]; /* Device and System handler lists */ 0513 0514 } ACPI_OBJECT_NOTIFY_HANDLER; 0515 0516 0517 typedef struct acpi_object_addr_handler 0518 { 0519 ACPI_OBJECT_COMMON_HEADER; 0520 UINT8 SpaceId; 0521 UINT8 HandlerFlags; 0522 ACPI_ADR_SPACE_HANDLER Handler; 0523 ACPI_NAMESPACE_NODE *Node; /* Parent device */ 0524 void *Context; 0525 ACPI_MUTEX ContextMutex; 0526 ACPI_ADR_SPACE_SETUP Setup; 0527 union acpi_operand_object *RegionList; /* Regions using this handler */ 0528 union acpi_operand_object *Next; 0529 0530 } ACPI_OBJECT_ADDR_HANDLER; 0531 0532 /* Flags for address handler (HandlerFlags) */ 0533 0534 #define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01 0535 0536 0537 /****************************************************************************** 0538 * 0539 * Special internal objects 0540 * 0541 *****************************************************************************/ 0542 0543 /* 0544 * The Reference object is used for these opcodes: 0545 * Arg[0-6], Local[0-7], IndexOp, NameOp, RefOfOp, LoadOp, LoadTableOp, DebugOp 0546 * The Reference.Class differentiates these types. 0547 */ 0548 typedef struct acpi_object_reference 0549 { 0550 ACPI_OBJECT_COMMON_HEADER; 0551 UINT8 Class; /* Reference Class */ 0552 UINT8 TargetType; /* Used for Index Op */ 0553 UINT8 Resolved; /* Reference has been resolved to a value */ 0554 void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */ 0555 ACPI_NAMESPACE_NODE *Node; /* RefOf or Namepath */ 0556 union acpi_operand_object **Where; /* Target of Index */ 0557 UINT8 *IndexPointer; /* Used for Buffers and Strings */ 0558 UINT8 *Aml; /* Used for deferred resolution of the ref */ 0559 UINT32 Value; /* Used for Local/Arg/Index/DdbHandle */ 0560 0561 } ACPI_OBJECT_REFERENCE; 0562 0563 /* Values for Reference.Class above */ 0564 0565 typedef enum 0566 { 0567 ACPI_REFCLASS_LOCAL = 0, /* Method local */ 0568 ACPI_REFCLASS_ARG = 1, /* Method argument */ 0569 ACPI_REFCLASS_REFOF = 2, /* Result of RefOf() TBD: Split to Ref/Node and Ref/OperandObj? */ 0570 ACPI_REFCLASS_INDEX = 3, /* Result of Index() */ 0571 ACPI_REFCLASS_TABLE = 4, /* DdbHandle - Load(), LoadTable() */ 0572 ACPI_REFCLASS_NAME = 5, /* Reference to a named object */ 0573 ACPI_REFCLASS_DEBUG = 6, /* Debug object */ 0574 0575 ACPI_REFCLASS_MAX = 6 0576 0577 } ACPI_REFERENCE_CLASSES; 0578 0579 /* 0580 * Extra object is used as additional storage for types that 0581 * have AML code in their declarations (TermArgs) that must be 0582 * evaluated at run time. 0583 * 0584 * Currently: Region and FieldUnit types 0585 */ 0586 typedef struct acpi_object_extra 0587 { 0588 ACPI_OBJECT_COMMON_HEADER; 0589 ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */ 0590 ACPI_NAMESPACE_NODE *ScopeNode; 0591 void *RegionContext; /* Region-specific data */ 0592 UINT8 *AmlStart; 0593 UINT32 AmlLength; 0594 0595 } ACPI_OBJECT_EXTRA; 0596 0597 0598 /* Additional data that can be attached to namespace nodes */ 0599 0600 typedef struct acpi_object_data 0601 { 0602 ACPI_OBJECT_COMMON_HEADER; 0603 ACPI_OBJECT_HANDLER Handler; 0604 void *Pointer; 0605 0606 } ACPI_OBJECT_DATA; 0607 0608 0609 /* Structure used when objects are cached for reuse */ 0610 0611 typedef struct acpi_object_cache_list 0612 { 0613 ACPI_OBJECT_COMMON_HEADER; 0614 union acpi_operand_object *Next; /* Link for object cache and internal lists*/ 0615 0616 } ACPI_OBJECT_CACHE_LIST; 0617 0618 0619 /****************************************************************************** 0620 * 0621 * ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above 0622 * 0623 *****************************************************************************/ 0624 0625 typedef union acpi_operand_object 0626 { 0627 ACPI_OBJECT_COMMON Common; 0628 ACPI_OBJECT_INTEGER Integer; 0629 ACPI_OBJECT_STRING String; 0630 ACPI_OBJECT_BUFFER Buffer; 0631 ACPI_OBJECT_PACKAGE Package; 0632 ACPI_OBJECT_EVENT Event; 0633 ACPI_OBJECT_METHOD Method; 0634 ACPI_OBJECT_MUTEX Mutex; 0635 ACPI_OBJECT_REGION Region; 0636 ACPI_OBJECT_NOTIFY_COMMON CommonNotify; 0637 ACPI_OBJECT_DEVICE Device; 0638 ACPI_OBJECT_POWER_RESOURCE PowerResource; 0639 ACPI_OBJECT_PROCESSOR Processor; 0640 ACPI_OBJECT_THERMAL_ZONE ThermalZone; 0641 ACPI_OBJECT_FIELD_COMMON CommonField; 0642 ACPI_OBJECT_REGION_FIELD Field; 0643 ACPI_OBJECT_BUFFER_FIELD BufferField; 0644 ACPI_OBJECT_BANK_FIELD BankField; 0645 ACPI_OBJECT_INDEX_FIELD IndexField; 0646 ACPI_OBJECT_NOTIFY_HANDLER Notify; 0647 ACPI_OBJECT_ADDR_HANDLER AddressSpace; 0648 ACPI_OBJECT_REFERENCE Reference; 0649 ACPI_OBJECT_EXTRA Extra; 0650 ACPI_OBJECT_DATA Data; 0651 ACPI_OBJECT_CACHE_LIST Cache; 0652 0653 /* 0654 * Add namespace node to union in order to simplify code that accepts both 0655 * ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs. The structures share 0656 * a common DescriptorType field in order to differentiate them. 0657 */ 0658 ACPI_NAMESPACE_NODE Node; 0659 0660 } ACPI_OPERAND_OBJECT; 0661 0662 0663 /****************************************************************************** 0664 * 0665 * ACPI_DESCRIPTOR - objects that share a common descriptor identifier 0666 * 0667 *****************************************************************************/ 0668 0669 /* Object descriptor types */ 0670 0671 #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ 0672 #define ACPI_DESC_TYPE_STATE 0x02 0673 #define ACPI_DESC_TYPE_STATE_UPDATE 0x03 0674 #define ACPI_DESC_TYPE_STATE_PACKAGE 0x04 0675 #define ACPI_DESC_TYPE_STATE_CONTROL 0x05 0676 #define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06 0677 #define ACPI_DESC_TYPE_STATE_PSCOPE 0x07 0678 #define ACPI_DESC_TYPE_STATE_WSCOPE 0x08 0679 #define ACPI_DESC_TYPE_STATE_RESULT 0x09 0680 #define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A 0681 #define ACPI_DESC_TYPE_STATE_THREAD 0x0B 0682 #define ACPI_DESC_TYPE_WALK 0x0C 0683 #define ACPI_DESC_TYPE_PARSER 0x0D 0684 #define ACPI_DESC_TYPE_OPERAND 0x0E 0685 #define ACPI_DESC_TYPE_NAMED 0x0F 0686 #define ACPI_DESC_TYPE_MAX 0x0F 0687 0688 0689 typedef struct acpi_common_descriptor 0690 { 0691 void *CommonPointer; 0692 UINT8 DescriptorType; /* To differentiate various internal objs */ 0693 0694 } ACPI_COMMON_DESCRIPTOR; 0695 0696 typedef union acpi_descriptor 0697 { 0698 ACPI_COMMON_DESCRIPTOR Common; 0699 ACPI_OPERAND_OBJECT Object; 0700 ACPI_NAMESPACE_NODE Node; 0701 ACPI_PARSE_OBJECT Op; 0702 0703 } ACPI_DESCRIPTOR; 0704 0705 #pragma pack() 0706 0707 #endif /* _ACOBJECT_H */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |