1a9f12690SJung-uk Kim /****************************************************************************** 2a9f12690SJung-uk Kim * 3a9f12690SJung-uk Kim * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only) 4a9f12690SJung-uk Kim * 5a9f12690SJung-uk Kim *****************************************************************************/ 6a9f12690SJung-uk Kim 70d84335fSJung-uk Kim /****************************************************************************** 80d84335fSJung-uk Kim * 90d84335fSJung-uk Kim * 1. Copyright Notice 100d84335fSJung-uk Kim * 11*58308fadSJung-uk Kim * Some or all of this work - Copyright (c) 1999 - 2025, Intel Corp. 12a9f12690SJung-uk Kim * All rights reserved. 13a9f12690SJung-uk Kim * 140d84335fSJung-uk Kim * 2. License 150d84335fSJung-uk Kim * 160d84335fSJung-uk Kim * 2.1. This is your license from Intel Corp. under its intellectual property 170d84335fSJung-uk Kim * rights. You may have additional license terms from the party that provided 180d84335fSJung-uk Kim * you this software, covering your right to use that party's intellectual 190d84335fSJung-uk Kim * property rights. 200d84335fSJung-uk Kim * 210d84335fSJung-uk Kim * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 220d84335fSJung-uk Kim * copy of the source code appearing in this file ("Covered Code") an 230d84335fSJung-uk Kim * irrevocable, perpetual, worldwide license under Intel's copyrights in the 240d84335fSJung-uk Kim * base code distributed originally by Intel ("Original Intel Code") to copy, 250d84335fSJung-uk Kim * make derivatives, distribute, use and display any portion of the Covered 260d84335fSJung-uk Kim * Code in any form, with the right to sublicense such rights; and 270d84335fSJung-uk Kim * 280d84335fSJung-uk Kim * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 290d84335fSJung-uk Kim * license (with the right to sublicense), under only those claims of Intel 300d84335fSJung-uk Kim * patents that are infringed by the Original Intel Code, to make, use, sell, 310d84335fSJung-uk Kim * offer to sell, and import the Covered Code and derivative works thereof 320d84335fSJung-uk Kim * solely to the minimum extent necessary to exercise the above copyright 330d84335fSJung-uk Kim * license, and in no event shall the patent license extend to any additions 340d84335fSJung-uk Kim * to or modifications of the Original Intel Code. No other license or right 350d84335fSJung-uk Kim * is granted directly or by implication, estoppel or otherwise; 360d84335fSJung-uk Kim * 370d84335fSJung-uk Kim * The above copyright and patent license is granted only if the following 380d84335fSJung-uk Kim * conditions are met: 390d84335fSJung-uk Kim * 400d84335fSJung-uk Kim * 3. Conditions 410d84335fSJung-uk Kim * 420d84335fSJung-uk Kim * 3.1. Redistribution of Source with Rights to Further Distribute Source. 430d84335fSJung-uk Kim * Redistribution of source code of any substantial portion of the Covered 440d84335fSJung-uk Kim * Code or modification with rights to further distribute source must include 450d84335fSJung-uk Kim * the above Copyright Notice, the above License, this list of Conditions, 460d84335fSJung-uk Kim * and the following Disclaimer and Export Compliance provision. In addition, 470d84335fSJung-uk Kim * Licensee must cause all Covered Code to which Licensee contributes to 480d84335fSJung-uk Kim * contain a file documenting the changes Licensee made to create that Covered 490d84335fSJung-uk Kim * Code and the date of any change. Licensee must include in that file the 500d84335fSJung-uk Kim * documentation of any changes made by any predecessor Licensee. Licensee 510d84335fSJung-uk Kim * must include a prominent statement that the modification is derived, 520d84335fSJung-uk Kim * directly or indirectly, from Original Intel Code. 530d84335fSJung-uk Kim * 540d84335fSJung-uk Kim * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 550d84335fSJung-uk Kim * Redistribution of source code of any substantial portion of the Covered 560d84335fSJung-uk Kim * Code or modification without rights to further distribute source must 570d84335fSJung-uk Kim * include the following Disclaimer and Export Compliance provision in the 580d84335fSJung-uk Kim * documentation and/or other materials provided with distribution. In 590d84335fSJung-uk Kim * addition, Licensee may not authorize further sublicense of source of any 600d84335fSJung-uk Kim * portion of the Covered Code, and must include terms to the effect that the 610d84335fSJung-uk Kim * license from Licensee to its licensee is limited to the intellectual 620d84335fSJung-uk Kim * property embodied in the software Licensee provides to its licensee, and 630d84335fSJung-uk Kim * not to intellectual property embodied in modifications its licensee may 640d84335fSJung-uk Kim * make. 650d84335fSJung-uk Kim * 660d84335fSJung-uk Kim * 3.3. Redistribution of Executable. Redistribution in executable form of any 670d84335fSJung-uk Kim * substantial portion of the Covered Code or modification must reproduce the 680d84335fSJung-uk Kim * above Copyright Notice, and the following Disclaimer and Export Compliance 690d84335fSJung-uk Kim * provision in the documentation and/or other materials provided with the 700d84335fSJung-uk Kim * distribution. 710d84335fSJung-uk Kim * 720d84335fSJung-uk Kim * 3.4. Intel retains all right, title, and interest in and to the Original 730d84335fSJung-uk Kim * Intel Code. 740d84335fSJung-uk Kim * 750d84335fSJung-uk Kim * 3.5. Neither the name Intel nor any other trademark owned or controlled by 760d84335fSJung-uk Kim * Intel shall be used in advertising or otherwise to promote the sale, use or 770d84335fSJung-uk Kim * other dealings in products derived from or relating to the Covered Code 780d84335fSJung-uk Kim * without prior written authorization from Intel. 790d84335fSJung-uk Kim * 800d84335fSJung-uk Kim * 4. Disclaimer and Export Compliance 810d84335fSJung-uk Kim * 820d84335fSJung-uk Kim * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 830d84335fSJung-uk Kim * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 840d84335fSJung-uk Kim * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 850d84335fSJung-uk Kim * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 860d84335fSJung-uk Kim * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 870d84335fSJung-uk Kim * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 880d84335fSJung-uk Kim * PARTICULAR PURPOSE. 890d84335fSJung-uk Kim * 900d84335fSJung-uk Kim * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 910d84335fSJung-uk Kim * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 920d84335fSJung-uk Kim * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 930d84335fSJung-uk Kim * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 940d84335fSJung-uk Kim * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 950d84335fSJung-uk Kim * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 960d84335fSJung-uk Kim * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 970d84335fSJung-uk Kim * LIMITED REMEDY. 980d84335fSJung-uk Kim * 990d84335fSJung-uk Kim * 4.3. Licensee shall not export, either directly or indirectly, any of this 1000d84335fSJung-uk Kim * software or system incorporating such software without first obtaining any 1010d84335fSJung-uk Kim * required license or other approval from the U. S. Department of Commerce or 1020d84335fSJung-uk Kim * any other agency or department of the United States Government. In the 1030d84335fSJung-uk Kim * event Licensee exports any such software from the United States or 1040d84335fSJung-uk Kim * re-exports any such software from a foreign destination, Licensee shall 1050d84335fSJung-uk Kim * ensure that the distribution and export/re-export of the software is in 1060d84335fSJung-uk Kim * compliance with all laws, regulations, orders, or other restrictions of the 1070d84335fSJung-uk Kim * U.S. Export Administration Regulations. Licensee agrees that neither it nor 1080d84335fSJung-uk Kim * any of its subsidiaries will export/re-export any technical data, process, 1090d84335fSJung-uk Kim * software, or service, directly or indirectly, to any country for which the 1100d84335fSJung-uk Kim * United States government or any agency thereof requires an export license, 1110d84335fSJung-uk Kim * other governmental approval, or letter of assurance, without first obtaining 1120d84335fSJung-uk Kim * such license, approval or letter. 1130d84335fSJung-uk Kim * 1140d84335fSJung-uk Kim ***************************************************************************** 1150d84335fSJung-uk Kim * 1160d84335fSJung-uk Kim * Alternatively, you may choose to be licensed under the terms of the 1170d84335fSJung-uk Kim * following license: 1180d84335fSJung-uk Kim * 119d244b227SJung-uk Kim * Redistribution and use in source and binary forms, with or without 120d244b227SJung-uk Kim * modification, are permitted provided that the following conditions 121d244b227SJung-uk Kim * are met: 122d244b227SJung-uk Kim * 1. Redistributions of source code must retain the above copyright 123d244b227SJung-uk Kim * notice, this list of conditions, and the following disclaimer, 124d244b227SJung-uk Kim * without modification. 125d244b227SJung-uk Kim * 2. Redistributions in binary form must reproduce at minimum a disclaimer 126d244b227SJung-uk Kim * substantially similar to the "NO WARRANTY" disclaimer below 127d244b227SJung-uk Kim * ("Disclaimer") and any redistribution must be conditioned upon 128d244b227SJung-uk Kim * including a substantially similar Disclaimer requirement for further 129d244b227SJung-uk Kim * binary redistribution. 130d244b227SJung-uk Kim * 3. Neither the names of the above-listed copyright holders nor the names 131d244b227SJung-uk Kim * of any contributors may be used to endorse or promote products derived 132d244b227SJung-uk Kim * from this software without specific prior written permission. 133a9f12690SJung-uk Kim * 1340d84335fSJung-uk Kim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1350d84335fSJung-uk Kim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1360d84335fSJung-uk Kim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 1370d84335fSJung-uk Kim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 1380d84335fSJung-uk Kim * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 1390d84335fSJung-uk Kim * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 1400d84335fSJung-uk Kim * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 1410d84335fSJung-uk Kim * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 1420d84335fSJung-uk Kim * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 1430d84335fSJung-uk Kim * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 1440d84335fSJung-uk Kim * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 1450d84335fSJung-uk Kim * 1460d84335fSJung-uk Kim * Alternatively, you may choose to be licensed under the terms of the 147d244b227SJung-uk Kim * GNU General Public License ("GPL") version 2 as published by the Free 148d244b227SJung-uk Kim * Software Foundation. 149a9f12690SJung-uk Kim * 1500d84335fSJung-uk Kim *****************************************************************************/ 151a9f12690SJung-uk Kim 152a9f12690SJung-uk Kim #ifndef _ACOBJECT_H 153a9f12690SJung-uk Kim #define _ACOBJECT_H 154a9f12690SJung-uk Kim 155a9f12690SJung-uk Kim /* acpisrc:StructDefs -- for acpisrc conversion */ 156a9f12690SJung-uk Kim 157a9f12690SJung-uk Kim 158a9f12690SJung-uk Kim /* 159a9f12690SJung-uk Kim * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher 160a9f12690SJung-uk Kim * to the interpreter, and to keep track of the various handlers such as 161a9f12690SJung-uk Kim * address space handlers and notify handlers. The object is a constant 162a9f12690SJung-uk Kim * size in order to allow it to be cached and reused. 163a9f12690SJung-uk Kim * 164a9f12690SJung-uk Kim * Note: The object is optimized to be aligned and will not work if it is 165a9f12690SJung-uk Kim * byte-packed. 166a9f12690SJung-uk Kim */ 167a9f12690SJung-uk Kim #if ACPI_MACHINE_WIDTH == 64 168a9f12690SJung-uk Kim #pragma pack(8) 169a9f12690SJung-uk Kim #else 170a9f12690SJung-uk Kim #pragma pack(4) 171a9f12690SJung-uk Kim #endif 172a9f12690SJung-uk Kim 173a9f12690SJung-uk Kim /******************************************************************************* 174a9f12690SJung-uk Kim * 175a9f12690SJung-uk Kim * Common Descriptors 176a9f12690SJung-uk Kim * 177a9f12690SJung-uk Kim ******************************************************************************/ 178a9f12690SJung-uk Kim 179a9f12690SJung-uk Kim /* 180a9f12690SJung-uk Kim * Common area for all objects. 181a9f12690SJung-uk Kim * 182a9f12690SJung-uk Kim * DescriptorType is used to differentiate between internal descriptors, and 183a9f12690SJung-uk Kim * must be in the same place across all descriptors 184a9f12690SJung-uk Kim * 185a9f12690SJung-uk Kim * Note: The DescriptorType and Type fields must appear in the identical 186a9f12690SJung-uk Kim * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT 187a9f12690SJung-uk Kim * structures. 188a9f12690SJung-uk Kim */ 189a9f12690SJung-uk Kim #define ACPI_OBJECT_COMMON_HEADER \ 190a9f12690SJung-uk Kim union acpi_operand_object *NextObject; /* Objects linked to parent NS node */\ 191a9f12690SJung-uk Kim UINT8 DescriptorType; /* To differentiate various internal objs */\ 192a9f12690SJung-uk Kim UINT8 Type; /* ACPI_OBJECT_TYPE */\ 193a9f12690SJung-uk Kim UINT16 ReferenceCount; /* For object deletion management */\ 194804fe266SJung-uk Kim UINT8 Flags 195a9f12690SJung-uk Kim /* 196a9f12690SJung-uk Kim * Note: There are 3 bytes available here before the 197a9f12690SJung-uk Kim * next natural alignment boundary (for both 32/64 cases) 198a9f12690SJung-uk Kim */ 199a9f12690SJung-uk Kim 200a9f12690SJung-uk Kim /* Values for Flag byte above */ 201a9f12690SJung-uk Kim 202a88e22b7SJung-uk Kim #define AOPOBJ_AML_CONSTANT 0x01 /* Integer is an AML constant */ 203a88e22b7SJung-uk Kim #define AOPOBJ_STATIC_POINTER 0x02 /* Data is part of an ACPI table, don't delete */ 204a7a3b383SJung-uk Kim #define AOPOBJ_DATA_VALID 0x04 /* Object is initialized and data is valid */ 205f8146b88SJung-uk Kim #define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized */ 206f8146b88SJung-uk Kim #define AOPOBJ_REG_CONNECTED 0x10 /* _REG was run */ 207f8146b88SJung-uk Kim #define AOPOBJ_SETUP_COMPLETE 0x20 /* Region setup is complete */ 208f8146b88SJung-uk Kim #define AOPOBJ_INVALID 0x40 /* Host OS won't allow a Region address */ 209a9f12690SJung-uk Kim 210a9f12690SJung-uk Kim 211a9f12690SJung-uk Kim /****************************************************************************** 212a9f12690SJung-uk Kim * 213a9f12690SJung-uk Kim * Basic data types 214a9f12690SJung-uk Kim * 215a9f12690SJung-uk Kim *****************************************************************************/ 216a9f12690SJung-uk Kim 217a9f12690SJung-uk Kim typedef struct acpi_object_common 218a9f12690SJung-uk Kim { 219804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 220a9f12690SJung-uk Kim 221a9f12690SJung-uk Kim } ACPI_OBJECT_COMMON; 222a9f12690SJung-uk Kim 223a9f12690SJung-uk Kim 224a9f12690SJung-uk Kim typedef struct acpi_object_integer 225a9f12690SJung-uk Kim { 226804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 227a9f12690SJung-uk Kim UINT8 Fill[3]; /* Prevent warning on some compilers */ 2289a179dd8SJung-uk Kim UINT64 Value; 229a9f12690SJung-uk Kim 230a9f12690SJung-uk Kim } ACPI_OBJECT_INTEGER; 231a9f12690SJung-uk Kim 232a9f12690SJung-uk Kim 233a9f12690SJung-uk Kim /* 234e8241eabSJung-uk Kim * Note: The String and Buffer object must be identical through the 235e8241eabSJung-uk Kim * pointer and length elements. There is code that depends on this. 236a9f12690SJung-uk Kim * 237a9f12690SJung-uk Kim * Fields common to both Strings and Buffers 238a9f12690SJung-uk Kim */ 239a9f12690SJung-uk Kim #define ACPI_COMMON_BUFFER_INFO(_Type) \ 240a9f12690SJung-uk Kim _Type *Pointer; \ 241804fe266SJung-uk Kim UINT32 Length 242a9f12690SJung-uk Kim 243a9f12690SJung-uk Kim 2445f9b24faSJung-uk Kim /* Null terminated, ASCII characters only */ 2455f9b24faSJung-uk Kim 2465f9b24faSJung-uk Kim typedef struct acpi_object_string 247a9f12690SJung-uk Kim { 248804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 249804fe266SJung-uk Kim ACPI_COMMON_BUFFER_INFO(char); /* String in AML stream or allocated string */ 250a9f12690SJung-uk Kim 251a9f12690SJung-uk Kim } ACPI_OBJECT_STRING; 252a9f12690SJung-uk Kim 253a9f12690SJung-uk Kim 254a9f12690SJung-uk Kim typedef struct acpi_object_buffer 255a9f12690SJung-uk Kim { 256804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 257804fe266SJung-uk Kim ACPI_COMMON_BUFFER_INFO(UINT8); /* Buffer in AML stream or allocated buffer */ 258a9f12690SJung-uk Kim UINT32 AmlLength; 259a9f12690SJung-uk Kim UINT8 *AmlStart; 260a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 261a9f12690SJung-uk Kim 262a9f12690SJung-uk Kim } ACPI_OBJECT_BUFFER; 263a9f12690SJung-uk Kim 264a9f12690SJung-uk Kim 265a9f12690SJung-uk Kim typedef struct acpi_object_package 266a9f12690SJung-uk Kim { 267804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 268a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 269a9f12690SJung-uk Kim union acpi_operand_object **Elements; /* Array of pointers to AcpiObjects */ 270a9f12690SJung-uk Kim UINT8 *AmlStart; 271a9f12690SJung-uk Kim UINT32 AmlLength; 272a9f12690SJung-uk Kim UINT32 Count; /* # of elements in package */ 273a9f12690SJung-uk Kim 274a9f12690SJung-uk Kim } ACPI_OBJECT_PACKAGE; 275a9f12690SJung-uk Kim 276a9f12690SJung-uk Kim 277a9f12690SJung-uk Kim /****************************************************************************** 278a9f12690SJung-uk Kim * 279a9f12690SJung-uk Kim * Complex data types 280a9f12690SJung-uk Kim * 281a9f12690SJung-uk Kim *****************************************************************************/ 282a9f12690SJung-uk Kim 283a9f12690SJung-uk Kim typedef struct acpi_object_event 284a9f12690SJung-uk Kim { 285804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 286a9f12690SJung-uk Kim ACPI_SEMAPHORE OsSemaphore; /* Actual OS synchronization object */ 287a9f12690SJung-uk Kim 288a9f12690SJung-uk Kim } ACPI_OBJECT_EVENT; 289a9f12690SJung-uk Kim 290a9f12690SJung-uk Kim 291a9f12690SJung-uk Kim typedef struct acpi_object_mutex 292a9f12690SJung-uk Kim { 293804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 294a9f12690SJung-uk Kim UINT8 SyncLevel; /* 0-15, specified in Mutex() call */ 295a9f12690SJung-uk Kim UINT16 AcquisitionDepth; /* Allow multiple Acquires, same thread */ 296a9f12690SJung-uk Kim ACPI_MUTEX OsMutex; /* Actual OS synchronization object */ 297a9f12690SJung-uk Kim ACPI_THREAD_ID ThreadId; /* Current owner of the mutex */ 298a9f12690SJung-uk Kim struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */ 299a9f12690SJung-uk Kim union acpi_operand_object *Prev; /* Link for list of acquired mutexes */ 300a9f12690SJung-uk Kim union acpi_operand_object *Next; /* Link for list of acquired mutexes */ 301a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 302a9f12690SJung-uk Kim UINT8 OriginalSyncLevel; /* Owner's original sync level (0-15) */ 303a9f12690SJung-uk Kim 304a9f12690SJung-uk Kim } ACPI_OBJECT_MUTEX; 305a9f12690SJung-uk Kim 306a9f12690SJung-uk Kim 307a9f12690SJung-uk Kim typedef struct acpi_object_region 308a9f12690SJung-uk Kim { 309804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 310a9f12690SJung-uk Kim UINT8 SpaceId; 311a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 312a9f12690SJung-uk Kim union acpi_operand_object *Handler; /* Handler for region access */ 313a9f12690SJung-uk Kim union acpi_operand_object *Next; 314a9f12690SJung-uk Kim ACPI_PHYSICAL_ADDRESS Address; 315a9f12690SJung-uk Kim UINT32 Length; 316ab71bbb7SJung-uk Kim void *Pointer; /* Only for data table regions */ 317a9f12690SJung-uk Kim 318a9f12690SJung-uk Kim } ACPI_OBJECT_REGION; 319a9f12690SJung-uk Kim 320a9f12690SJung-uk Kim 321a9f12690SJung-uk Kim typedef struct acpi_object_method 322a9f12690SJung-uk Kim { 323804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 324d244b227SJung-uk Kim UINT8 InfoFlags; 325a9f12690SJung-uk Kim UINT8 ParamCount; 326a9f12690SJung-uk Kim UINT8 SyncLevel; 327a9f12690SJung-uk Kim union acpi_operand_object *Mutex; 328fe0f0bbbSJung-uk Kim union acpi_operand_object *Node; 329a9f12690SJung-uk Kim UINT8 *AmlStart; 330572c8255SJung-uk Kim union 331572c8255SJung-uk Kim { 332a9f12690SJung-uk Kim ACPI_INTERNAL_METHOD Implementation; 333572c8255SJung-uk Kim union acpi_operand_object *Handler; 334d244b227SJung-uk Kim } Dispatch; 335572c8255SJung-uk Kim 336a9f12690SJung-uk Kim UINT32 AmlLength; 337a9f12690SJung-uk Kim ACPI_OWNER_ID OwnerId; 338a009b7dcSJung-uk Kim UINT8 ThreadCount; 339a9f12690SJung-uk Kim 340a9f12690SJung-uk Kim } ACPI_OBJECT_METHOD; 341a9f12690SJung-uk Kim 342d244b227SJung-uk Kim /* Flags for InfoFlags field above */ 343d244b227SJung-uk Kim 344d244b227SJung-uk Kim #define ACPI_METHOD_MODULE_LEVEL 0x01 /* Method is actually module-level code */ 345d244b227SJung-uk Kim #define ACPI_METHOD_INTERNAL_ONLY 0x02 /* Method is implemented internally (_OSI) */ 346d244b227SJung-uk Kim #define ACPI_METHOD_SERIALIZED 0x04 /* Method is serialized */ 347d244b227SJung-uk Kim #define ACPI_METHOD_SERIALIZED_PENDING 0x08 /* Method is to be marked serialized */ 348313a0c13SJung-uk Kim #define ACPI_METHOD_IGNORE_SYNC_LEVEL 0x10 /* Method was auto-serialized at table load time */ 349313a0c13SJung-uk Kim #define ACPI_METHOD_MODIFIED_NAMESPACE 0x20 /* Method modified the namespace */ 350d244b227SJung-uk Kim 351a9f12690SJung-uk Kim 352a9f12690SJung-uk Kim /****************************************************************************** 353a9f12690SJung-uk Kim * 354a9f12690SJung-uk Kim * Objects that can be notified. All share a common NotifyInfo area. 355a9f12690SJung-uk Kim * 356a9f12690SJung-uk Kim *****************************************************************************/ 357a9f12690SJung-uk Kim 358a9f12690SJung-uk Kim /* 359a9f12690SJung-uk Kim * Common fields for objects that support ASL notifications 360a9f12690SJung-uk Kim */ 361a9f12690SJung-uk Kim #define ACPI_COMMON_NOTIFY_INFO \ 362eef1b955SJung-uk Kim union acpi_operand_object *NotifyList[2]; /* Handlers for system/device notifies */\ 363804fe266SJung-uk Kim union acpi_operand_object *Handler /* Handler for Address space */ 364a9f12690SJung-uk Kim 3655f9b24faSJung-uk Kim /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ 366a9f12690SJung-uk Kim 3675f9b24faSJung-uk Kim typedef struct acpi_object_notify_common 368a9f12690SJung-uk Kim { 369804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 370804fe266SJung-uk Kim ACPI_COMMON_NOTIFY_INFO; 371a9f12690SJung-uk Kim 372a9f12690SJung-uk Kim } ACPI_OBJECT_NOTIFY_COMMON; 373a9f12690SJung-uk Kim 374a9f12690SJung-uk Kim 375a9f12690SJung-uk Kim typedef struct acpi_object_device 376a9f12690SJung-uk Kim { 377804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 378804fe266SJung-uk Kim ACPI_COMMON_NOTIFY_INFO; 379a9f12690SJung-uk Kim ACPI_GPE_BLOCK_INFO *GpeBlock; 380a9f12690SJung-uk Kim 381a9f12690SJung-uk Kim } ACPI_OBJECT_DEVICE; 382a9f12690SJung-uk Kim 383a9f12690SJung-uk Kim 384a9f12690SJung-uk Kim typedef struct acpi_object_power_resource 385a9f12690SJung-uk Kim { 386804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 387804fe266SJung-uk Kim ACPI_COMMON_NOTIFY_INFO; 388a9f12690SJung-uk Kim UINT32 SystemLevel; 389a9f12690SJung-uk Kim UINT32 ResourceOrder; 390a9f12690SJung-uk Kim 391a9f12690SJung-uk Kim } ACPI_OBJECT_POWER_RESOURCE; 392a9f12690SJung-uk Kim 393a9f12690SJung-uk Kim 394a9f12690SJung-uk Kim typedef struct acpi_object_processor 395a9f12690SJung-uk Kim { 396804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 397a9f12690SJung-uk Kim 398a9f12690SJung-uk Kim /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */ 399a9f12690SJung-uk Kim 400a9f12690SJung-uk Kim UINT8 ProcId; 401a9f12690SJung-uk Kim UINT8 Length; 402804fe266SJung-uk Kim ACPI_COMMON_NOTIFY_INFO; 403a9f12690SJung-uk Kim ACPI_IO_ADDRESS Address; 404a9f12690SJung-uk Kim 405a9f12690SJung-uk Kim } ACPI_OBJECT_PROCESSOR; 406a9f12690SJung-uk Kim 407a9f12690SJung-uk Kim 408a9f12690SJung-uk Kim typedef struct acpi_object_thermal_zone 409a9f12690SJung-uk Kim { 410804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 411804fe266SJung-uk Kim ACPI_COMMON_NOTIFY_INFO; 412a9f12690SJung-uk Kim 413a9f12690SJung-uk Kim } ACPI_OBJECT_THERMAL_ZONE; 414a9f12690SJung-uk Kim 415a9f12690SJung-uk Kim 416a9f12690SJung-uk Kim /****************************************************************************** 417a9f12690SJung-uk Kim * 418a9f12690SJung-uk Kim * Fields. All share a common header/info field. 419a9f12690SJung-uk Kim * 420a9f12690SJung-uk Kim *****************************************************************************/ 421a9f12690SJung-uk Kim 422a9f12690SJung-uk Kim /* 423a9f12690SJung-uk Kim * Common bitfield for the field objects 424a9f12690SJung-uk Kim * "Field Datum" -- a datum from the actual field object 425a9f12690SJung-uk Kim * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field 426a9f12690SJung-uk Kim */ 427a9f12690SJung-uk Kim #define ACPI_COMMON_FIELD_INFO \ 428a9f12690SJung-uk Kim UINT8 FieldFlags; /* Access, update, and lock bits */\ 429a9f12690SJung-uk Kim UINT8 Attribute; /* From AccessAs keyword */\ 430a9f12690SJung-uk Kim UINT8 AccessByteWidth; /* Read/Write size in bytes */\ 431a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */\ 432a9f12690SJung-uk Kim UINT32 BitLength; /* Length of field in bits */\ 433a9f12690SJung-uk Kim UINT32 BaseByteOffset; /* Byte offset within containing object */\ 434a9f12690SJung-uk Kim UINT32 Value; /* Value to store into the Bank or Index register */\ 435a9f12690SJung-uk Kim UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\ 436804fe266SJung-uk Kim UINT8 AccessLength /* For serial regions/fields */ 437a9f12690SJung-uk Kim 4385f9b24faSJung-uk Kim /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ 439a9f12690SJung-uk Kim 4405f9b24faSJung-uk Kim typedef struct acpi_object_field_common 441a9f12690SJung-uk Kim { 442804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 443804fe266SJung-uk Kim ACPI_COMMON_FIELD_INFO; 444a9f12690SJung-uk Kim union acpi_operand_object *RegionObj; /* Parent Operation Region object (REGION/BANK fields only) */ 445a9f12690SJung-uk Kim 446a9f12690SJung-uk Kim } ACPI_OBJECT_FIELD_COMMON; 447a9f12690SJung-uk Kim 448a9f12690SJung-uk Kim 449a9f12690SJung-uk Kim typedef struct acpi_object_region_field 450a9f12690SJung-uk Kim { 451804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 452804fe266SJung-uk Kim ACPI_COMMON_FIELD_INFO; 4533f0275a0SJung-uk Kim UINT16 ResourceLength; 454a9f12690SJung-uk Kim union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 4553f0275a0SJung-uk Kim UINT8 *ResourceBuffer; /* ResourceTemplate for serial regions/fields */ 456313a0c13SJung-uk Kim UINT16 PinNumberIndex; /* Index relative to previous Connection/Template */ 457cd6518c7SJung-uk Kim UINT8 *InternalPccBuffer; /* Internal buffer for fields associated with PCC */ 458a9f12690SJung-uk Kim 459a9f12690SJung-uk Kim } ACPI_OBJECT_REGION_FIELD; 460a9f12690SJung-uk Kim 461a9f12690SJung-uk Kim 462a9f12690SJung-uk Kim typedef struct acpi_object_bank_field 463a9f12690SJung-uk Kim { 464804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 465804fe266SJung-uk Kim ACPI_COMMON_FIELD_INFO; 466a9f12690SJung-uk Kim union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 467a9f12690SJung-uk Kim union acpi_operand_object *BankObj; /* BankSelect Register object */ 468a9f12690SJung-uk Kim 469a9f12690SJung-uk Kim } ACPI_OBJECT_BANK_FIELD; 470a9f12690SJung-uk Kim 471a9f12690SJung-uk Kim 472a9f12690SJung-uk Kim typedef struct acpi_object_index_field 473a9f12690SJung-uk Kim { 474804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 475804fe266SJung-uk Kim ACPI_COMMON_FIELD_INFO; 476a9f12690SJung-uk Kim 477a9f12690SJung-uk Kim /* 478a9f12690SJung-uk Kim * No "RegionObj" pointer needed since the Index and Data registers 479a9f12690SJung-uk Kim * are each field definitions unto themselves. 480a9f12690SJung-uk Kim */ 481a9f12690SJung-uk Kim union acpi_operand_object *IndexObj; /* Index register */ 482a9f12690SJung-uk Kim union acpi_operand_object *DataObj; /* Data register */ 483a9f12690SJung-uk Kim 484a9f12690SJung-uk Kim } ACPI_OBJECT_INDEX_FIELD; 485a9f12690SJung-uk Kim 486a9f12690SJung-uk Kim 487a9f12690SJung-uk Kim /* The BufferField is different in that it is part of a Buffer, not an OpRegion */ 488a9f12690SJung-uk Kim 489a9f12690SJung-uk Kim typedef struct acpi_object_buffer_field 490a9f12690SJung-uk Kim { 491804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 492804fe266SJung-uk Kim ACPI_COMMON_FIELD_INFO; 493f9a6772eSJung-uk Kim BOOLEAN IsCreateField; /* Special case for objects created by CreateField() */ 494a9f12690SJung-uk Kim union acpi_operand_object *BufferObj; /* Containing Buffer object */ 495a9f12690SJung-uk Kim 496a9f12690SJung-uk Kim } ACPI_OBJECT_BUFFER_FIELD; 497a9f12690SJung-uk Kim 498a9f12690SJung-uk Kim 499a9f12690SJung-uk Kim /****************************************************************************** 500a9f12690SJung-uk Kim * 501a9f12690SJung-uk Kim * Objects for handlers 502a9f12690SJung-uk Kim * 503a9f12690SJung-uk Kim *****************************************************************************/ 504a9f12690SJung-uk Kim 505a9f12690SJung-uk Kim typedef struct acpi_object_notify_handler 506a9f12690SJung-uk Kim { 507804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 508a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE *Node; /* Parent device */ 509eef1b955SJung-uk Kim UINT32 HandlerType; /* Type: Device/System/Both */ 510a7a3b383SJung-uk Kim ACPI_NOTIFY_HANDLER Handler; /* Handler address */ 511a9f12690SJung-uk Kim void *Context; 512eef1b955SJung-uk Kim union acpi_operand_object *Next[2]; /* Device and System handler lists */ 513a9f12690SJung-uk Kim 514a9f12690SJung-uk Kim } ACPI_OBJECT_NOTIFY_HANDLER; 515a9f12690SJung-uk Kim 516a9f12690SJung-uk Kim 517a9f12690SJung-uk Kim typedef struct acpi_object_addr_handler 518a9f12690SJung-uk Kim { 519804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 520a9f12690SJung-uk Kim UINT8 SpaceId; 521a9f12690SJung-uk Kim UINT8 HandlerFlags; 522a9f12690SJung-uk Kim ACPI_ADR_SPACE_HANDLER Handler; 523a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE *Node; /* Parent device */ 524a9f12690SJung-uk Kim void *Context; 525cfd1ed46SJung-uk Kim ACPI_MUTEX ContextMutex; 526a9f12690SJung-uk Kim ACPI_ADR_SPACE_SETUP Setup; 527a7a3b383SJung-uk Kim union acpi_operand_object *RegionList; /* Regions using this handler */ 528a9f12690SJung-uk Kim union acpi_operand_object *Next; 529a9f12690SJung-uk Kim 530a9f12690SJung-uk Kim } ACPI_OBJECT_ADDR_HANDLER; 531a9f12690SJung-uk Kim 532a9f12690SJung-uk Kim /* Flags for address handler (HandlerFlags) */ 533a9f12690SJung-uk Kim 534a9f12690SJung-uk Kim #define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01 535a9f12690SJung-uk Kim 536a9f12690SJung-uk Kim 537a9f12690SJung-uk Kim /****************************************************************************** 538a9f12690SJung-uk Kim * 539a9f12690SJung-uk Kim * Special internal objects 540a9f12690SJung-uk Kim * 541a9f12690SJung-uk Kim *****************************************************************************/ 542a9f12690SJung-uk Kim 543a9f12690SJung-uk Kim /* 544a9f12690SJung-uk Kim * The Reference object is used for these opcodes: 545a9f12690SJung-uk Kim * Arg[0-6], Local[0-7], IndexOp, NameOp, RefOfOp, LoadOp, LoadTableOp, DebugOp 546a9f12690SJung-uk Kim * The Reference.Class differentiates these types. 547a9f12690SJung-uk Kim */ 548a9f12690SJung-uk Kim typedef struct acpi_object_reference 549a9f12690SJung-uk Kim { 550804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 551a9f12690SJung-uk Kim UINT8 Class; /* Reference Class */ 552a9f12690SJung-uk Kim UINT8 TargetType; /* Used for Index Op */ 5535f9b24faSJung-uk Kim UINT8 Resolved; /* Reference has been resolved to a value */ 554a9f12690SJung-uk Kim void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */ 555a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE *Node; /* RefOf or Namepath */ 556a9f12690SJung-uk Kim union acpi_operand_object **Where; /* Target of Index */ 5575ef50723SJung-uk Kim UINT8 *IndexPointer; /* Used for Buffers and Strings */ 5585f9b24faSJung-uk Kim UINT8 *Aml; /* Used for deferred resolution of the ref */ 559a9f12690SJung-uk Kim UINT32 Value; /* Used for Local/Arg/Index/DdbHandle */ 560a9f12690SJung-uk Kim 561a9f12690SJung-uk Kim } ACPI_OBJECT_REFERENCE; 562a9f12690SJung-uk Kim 563a9f12690SJung-uk Kim /* Values for Reference.Class above */ 564a9f12690SJung-uk Kim 565a9f12690SJung-uk Kim typedef enum 566a9f12690SJung-uk Kim { 567a9f12690SJung-uk Kim ACPI_REFCLASS_LOCAL = 0, /* Method local */ 568a9f12690SJung-uk Kim ACPI_REFCLASS_ARG = 1, /* Method argument */ 569a9f12690SJung-uk Kim ACPI_REFCLASS_REFOF = 2, /* Result of RefOf() TBD: Split to Ref/Node and Ref/OperandObj? */ 570a9f12690SJung-uk Kim ACPI_REFCLASS_INDEX = 3, /* Result of Index() */ 571a9f12690SJung-uk Kim ACPI_REFCLASS_TABLE = 4, /* DdbHandle - Load(), LoadTable() */ 572a9f12690SJung-uk Kim ACPI_REFCLASS_NAME = 5, /* Reference to a named object */ 573a9f12690SJung-uk Kim ACPI_REFCLASS_DEBUG = 6, /* Debug object */ 574a9f12690SJung-uk Kim 575a9f12690SJung-uk Kim ACPI_REFCLASS_MAX = 6 576a9f12690SJung-uk Kim 577a9f12690SJung-uk Kim } ACPI_REFERENCE_CLASSES; 578a9f12690SJung-uk Kim 579a9f12690SJung-uk Kim /* 580a9f12690SJung-uk Kim * Extra object is used as additional storage for types that 581a9f12690SJung-uk Kim * have AML code in their declarations (TermArgs) that must be 582a9f12690SJung-uk Kim * evaluated at run time. 583a9f12690SJung-uk Kim * 584a9f12690SJung-uk Kim * Currently: Region and FieldUnit types 585a9f12690SJung-uk Kim */ 586a9f12690SJung-uk Kim typedef struct acpi_object_extra 587a9f12690SJung-uk Kim { 588804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 589a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */ 5903f0275a0SJung-uk Kim ACPI_NAMESPACE_NODE *ScopeNode; 591a9f12690SJung-uk Kim void *RegionContext; /* Region-specific data */ 592a9f12690SJung-uk Kim UINT8 *AmlStart; 593a9f12690SJung-uk Kim UINT32 AmlLength; 594a9f12690SJung-uk Kim 595a9f12690SJung-uk Kim } ACPI_OBJECT_EXTRA; 596a9f12690SJung-uk Kim 597a9f12690SJung-uk Kim 598a9f12690SJung-uk Kim /* Additional data that can be attached to namespace nodes */ 599a9f12690SJung-uk Kim 600a9f12690SJung-uk Kim typedef struct acpi_object_data 601a9f12690SJung-uk Kim { 602804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 603a9f12690SJung-uk Kim ACPI_OBJECT_HANDLER Handler; 604a9f12690SJung-uk Kim void *Pointer; 605a9f12690SJung-uk Kim 606a9f12690SJung-uk Kim } ACPI_OBJECT_DATA; 607a9f12690SJung-uk Kim 608a9f12690SJung-uk Kim 609a9f12690SJung-uk Kim /* Structure used when objects are cached for reuse */ 610a9f12690SJung-uk Kim 611a9f12690SJung-uk Kim typedef struct acpi_object_cache_list 612a9f12690SJung-uk Kim { 613804fe266SJung-uk Kim ACPI_OBJECT_COMMON_HEADER; 614a9f12690SJung-uk Kim union acpi_operand_object *Next; /* Link for object cache and internal lists*/ 615a9f12690SJung-uk Kim 616a9f12690SJung-uk Kim } ACPI_OBJECT_CACHE_LIST; 617a9f12690SJung-uk Kim 618a9f12690SJung-uk Kim 619a9f12690SJung-uk Kim /****************************************************************************** 620a9f12690SJung-uk Kim * 621a9f12690SJung-uk Kim * ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above 622a9f12690SJung-uk Kim * 623a9f12690SJung-uk Kim *****************************************************************************/ 624a9f12690SJung-uk Kim 625a9f12690SJung-uk Kim typedef union acpi_operand_object 626a9f12690SJung-uk Kim { 627a9f12690SJung-uk Kim ACPI_OBJECT_COMMON Common; 628a9f12690SJung-uk Kim ACPI_OBJECT_INTEGER Integer; 629a9f12690SJung-uk Kim ACPI_OBJECT_STRING String; 630a9f12690SJung-uk Kim ACPI_OBJECT_BUFFER Buffer; 631a9f12690SJung-uk Kim ACPI_OBJECT_PACKAGE Package; 632a9f12690SJung-uk Kim ACPI_OBJECT_EVENT Event; 633a9f12690SJung-uk Kim ACPI_OBJECT_METHOD Method; 634a9f12690SJung-uk Kim ACPI_OBJECT_MUTEX Mutex; 635a9f12690SJung-uk Kim ACPI_OBJECT_REGION Region; 636a9f12690SJung-uk Kim ACPI_OBJECT_NOTIFY_COMMON CommonNotify; 637a9f12690SJung-uk Kim ACPI_OBJECT_DEVICE Device; 638a9f12690SJung-uk Kim ACPI_OBJECT_POWER_RESOURCE PowerResource; 639a9f12690SJung-uk Kim ACPI_OBJECT_PROCESSOR Processor; 640a9f12690SJung-uk Kim ACPI_OBJECT_THERMAL_ZONE ThermalZone; 641a9f12690SJung-uk Kim ACPI_OBJECT_FIELD_COMMON CommonField; 642a9f12690SJung-uk Kim ACPI_OBJECT_REGION_FIELD Field; 643a9f12690SJung-uk Kim ACPI_OBJECT_BUFFER_FIELD BufferField; 644a9f12690SJung-uk Kim ACPI_OBJECT_BANK_FIELD BankField; 645a9f12690SJung-uk Kim ACPI_OBJECT_INDEX_FIELD IndexField; 646a9f12690SJung-uk Kim ACPI_OBJECT_NOTIFY_HANDLER Notify; 647a9f12690SJung-uk Kim ACPI_OBJECT_ADDR_HANDLER AddressSpace; 648a9f12690SJung-uk Kim ACPI_OBJECT_REFERENCE Reference; 649a9f12690SJung-uk Kim ACPI_OBJECT_EXTRA Extra; 650a9f12690SJung-uk Kim ACPI_OBJECT_DATA Data; 651a9f12690SJung-uk Kim ACPI_OBJECT_CACHE_LIST Cache; 652a9f12690SJung-uk Kim 653a9f12690SJung-uk Kim /* 654a9f12690SJung-uk Kim * Add namespace node to union in order to simplify code that accepts both 655a9f12690SJung-uk Kim * ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs. The structures share 656a9f12690SJung-uk Kim * a common DescriptorType field in order to differentiate them. 657a9f12690SJung-uk Kim */ 658a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE Node; 659a9f12690SJung-uk Kim 660a9f12690SJung-uk Kim } ACPI_OPERAND_OBJECT; 661a9f12690SJung-uk Kim 662a9f12690SJung-uk Kim 663a9f12690SJung-uk Kim /****************************************************************************** 664a9f12690SJung-uk Kim * 665a9f12690SJung-uk Kim * ACPI_DESCRIPTOR - objects that share a common descriptor identifier 666a9f12690SJung-uk Kim * 667a9f12690SJung-uk Kim *****************************************************************************/ 668a9f12690SJung-uk Kim 669a9f12690SJung-uk Kim /* Object descriptor types */ 670a9f12690SJung-uk Kim 671a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ 672a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_STATE 0x02 673a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_STATE_UPDATE 0x03 674a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_STATE_PACKAGE 0x04 675a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_STATE_CONTROL 0x05 676a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06 677a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_STATE_PSCOPE 0x07 678a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_STATE_WSCOPE 0x08 679a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_STATE_RESULT 0x09 680a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A 681a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_STATE_THREAD 0x0B 682a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_WALK 0x0C 683a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_PARSER 0x0D 684a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_OPERAND 0x0E 685a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_NAMED 0x0F 686a9f12690SJung-uk Kim #define ACPI_DESC_TYPE_MAX 0x0F 687a9f12690SJung-uk Kim 688a9f12690SJung-uk Kim 689a9f12690SJung-uk Kim typedef struct acpi_common_descriptor 690a9f12690SJung-uk Kim { 691a9f12690SJung-uk Kim void *CommonPointer; 692a9f12690SJung-uk Kim UINT8 DescriptorType; /* To differentiate various internal objs */ 693a9f12690SJung-uk Kim 694a9f12690SJung-uk Kim } ACPI_COMMON_DESCRIPTOR; 695a9f12690SJung-uk Kim 696a9f12690SJung-uk Kim typedef union acpi_descriptor 697a9f12690SJung-uk Kim { 698a9f12690SJung-uk Kim ACPI_COMMON_DESCRIPTOR Common; 699a9f12690SJung-uk Kim ACPI_OPERAND_OBJECT Object; 700a9f12690SJung-uk Kim ACPI_NAMESPACE_NODE Node; 701a9f12690SJung-uk Kim ACPI_PARSE_OBJECT Op; 702a9f12690SJung-uk Kim 703a9f12690SJung-uk Kim } ACPI_DESCRIPTOR; 704a9f12690SJung-uk Kim 705a9f12690SJung-uk Kim #pragma pack() 706a9f12690SJung-uk Kim 707a9f12690SJung-uk Kim #endif /* _ACOBJECT_H */ 708