17c478bd9Sstevel@tonic-gate /****************************************************************************** 27c478bd9Sstevel@tonic-gate * 37c478bd9Sstevel@tonic-gate * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only) 47c478bd9Sstevel@tonic-gate * 57c478bd9Sstevel@tonic-gate *****************************************************************************/ 67c478bd9Sstevel@tonic-gate 7*35786f68SRobert Mustacchi /****************************************************************************** 8*35786f68SRobert Mustacchi * 9*35786f68SRobert Mustacchi * 1. Copyright Notice 10*35786f68SRobert Mustacchi * 11*35786f68SRobert Mustacchi * Some or all of this work - Copyright (c) 1999 - 2018, Intel Corp. 127c478bd9Sstevel@tonic-gate * All rights reserved. 137c478bd9Sstevel@tonic-gate * 14*35786f68SRobert Mustacchi * 2. License 15*35786f68SRobert Mustacchi * 16*35786f68SRobert Mustacchi * 2.1. This is your license from Intel Corp. under its intellectual property 17*35786f68SRobert Mustacchi * rights. You may have additional license terms from the party that provided 18*35786f68SRobert Mustacchi * you this software, covering your right to use that party's intellectual 19*35786f68SRobert Mustacchi * property rights. 20*35786f68SRobert Mustacchi * 21*35786f68SRobert Mustacchi * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 22*35786f68SRobert Mustacchi * copy of the source code appearing in this file ("Covered Code") an 23*35786f68SRobert Mustacchi * irrevocable, perpetual, worldwide license under Intel's copyrights in the 24*35786f68SRobert Mustacchi * base code distributed originally by Intel ("Original Intel Code") to copy, 25*35786f68SRobert Mustacchi * make derivatives, distribute, use and display any portion of the Covered 26*35786f68SRobert Mustacchi * Code in any form, with the right to sublicense such rights; and 27*35786f68SRobert Mustacchi * 28*35786f68SRobert Mustacchi * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 29*35786f68SRobert Mustacchi * license (with the right to sublicense), under only those claims of Intel 30*35786f68SRobert Mustacchi * patents that are infringed by the Original Intel Code, to make, use, sell, 31*35786f68SRobert Mustacchi * offer to sell, and import the Covered Code and derivative works thereof 32*35786f68SRobert Mustacchi * solely to the minimum extent necessary to exercise the above copyright 33*35786f68SRobert Mustacchi * license, and in no event shall the patent license extend to any additions 34*35786f68SRobert Mustacchi * to or modifications of the Original Intel Code. No other license or right 35*35786f68SRobert Mustacchi * is granted directly or by implication, estoppel or otherwise; 36*35786f68SRobert Mustacchi * 37*35786f68SRobert Mustacchi * The above copyright and patent license is granted only if the following 38*35786f68SRobert Mustacchi * conditions are met: 39*35786f68SRobert Mustacchi * 40*35786f68SRobert Mustacchi * 3. Conditions 41*35786f68SRobert Mustacchi * 42*35786f68SRobert Mustacchi * 3.1. Redistribution of Source with Rights to Further Distribute Source. 43*35786f68SRobert Mustacchi * Redistribution of source code of any substantial portion of the Covered 44*35786f68SRobert Mustacchi * Code or modification with rights to further distribute source must include 45*35786f68SRobert Mustacchi * the above Copyright Notice, the above License, this list of Conditions, 46*35786f68SRobert Mustacchi * and the following Disclaimer and Export Compliance provision. In addition, 47*35786f68SRobert Mustacchi * Licensee must cause all Covered Code to which Licensee contributes to 48*35786f68SRobert Mustacchi * contain a file documenting the changes Licensee made to create that Covered 49*35786f68SRobert Mustacchi * Code and the date of any change. Licensee must include in that file the 50*35786f68SRobert Mustacchi * documentation of any changes made by any predecessor Licensee. Licensee 51*35786f68SRobert Mustacchi * must include a prominent statement that the modification is derived, 52*35786f68SRobert Mustacchi * directly or indirectly, from Original Intel Code. 53*35786f68SRobert Mustacchi * 54*35786f68SRobert Mustacchi * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 55*35786f68SRobert Mustacchi * Redistribution of source code of any substantial portion of the Covered 56*35786f68SRobert Mustacchi * Code or modification without rights to further distribute source must 57*35786f68SRobert Mustacchi * include the following Disclaimer and Export Compliance provision in the 58*35786f68SRobert Mustacchi * documentation and/or other materials provided with distribution. In 59*35786f68SRobert Mustacchi * addition, Licensee may not authorize further sublicense of source of any 60*35786f68SRobert Mustacchi * portion of the Covered Code, and must include terms to the effect that the 61*35786f68SRobert Mustacchi * license from Licensee to its licensee is limited to the intellectual 62*35786f68SRobert Mustacchi * property embodied in the software Licensee provides to its licensee, and 63*35786f68SRobert Mustacchi * not to intellectual property embodied in modifications its licensee may 64*35786f68SRobert Mustacchi * make. 65*35786f68SRobert Mustacchi * 66*35786f68SRobert Mustacchi * 3.3. Redistribution of Executable. Redistribution in executable form of any 67*35786f68SRobert Mustacchi * substantial portion of the Covered Code or modification must reproduce the 68*35786f68SRobert Mustacchi * above Copyright Notice, and the following Disclaimer and Export Compliance 69*35786f68SRobert Mustacchi * provision in the documentation and/or other materials provided with the 70*35786f68SRobert Mustacchi * distribution. 71*35786f68SRobert Mustacchi * 72*35786f68SRobert Mustacchi * 3.4. Intel retains all right, title, and interest in and to the Original 73*35786f68SRobert Mustacchi * Intel Code. 74*35786f68SRobert Mustacchi * 75*35786f68SRobert Mustacchi * 3.5. Neither the name Intel nor any other trademark owned or controlled by 76*35786f68SRobert Mustacchi * Intel shall be used in advertising or otherwise to promote the sale, use or 77*35786f68SRobert Mustacchi * other dealings in products derived from or relating to the Covered Code 78*35786f68SRobert Mustacchi * without prior written authorization from Intel. 79*35786f68SRobert Mustacchi * 80*35786f68SRobert Mustacchi * 4. Disclaimer and Export Compliance 81*35786f68SRobert Mustacchi * 82*35786f68SRobert Mustacchi * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 83*35786f68SRobert Mustacchi * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 84*35786f68SRobert Mustacchi * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 85*35786f68SRobert Mustacchi * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 86*35786f68SRobert Mustacchi * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 87*35786f68SRobert Mustacchi * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 88*35786f68SRobert Mustacchi * PARTICULAR PURPOSE. 89*35786f68SRobert Mustacchi * 90*35786f68SRobert Mustacchi * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 91*35786f68SRobert Mustacchi * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 92*35786f68SRobert Mustacchi * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 93*35786f68SRobert Mustacchi * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 94*35786f68SRobert Mustacchi * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 95*35786f68SRobert Mustacchi * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 96*35786f68SRobert Mustacchi * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 97*35786f68SRobert Mustacchi * LIMITED REMEDY. 98*35786f68SRobert Mustacchi * 99*35786f68SRobert Mustacchi * 4.3. Licensee shall not export, either directly or indirectly, any of this 100*35786f68SRobert Mustacchi * software or system incorporating such software without first obtaining any 101*35786f68SRobert Mustacchi * required license or other approval from the U. S. Department of Commerce or 102*35786f68SRobert Mustacchi * any other agency or department of the United States Government. In the 103*35786f68SRobert Mustacchi * event Licensee exports any such software from the United States or 104*35786f68SRobert Mustacchi * re-exports any such software from a foreign destination, Licensee shall 105*35786f68SRobert Mustacchi * ensure that the distribution and export/re-export of the software is in 106*35786f68SRobert Mustacchi * compliance with all laws, regulations, orders, or other restrictions of the 107*35786f68SRobert Mustacchi * U.S. Export Administration Regulations. Licensee agrees that neither it nor 108*35786f68SRobert Mustacchi * any of its subsidiaries will export/re-export any technical data, process, 109*35786f68SRobert Mustacchi * software, or service, directly or indirectly, to any country for which the 110*35786f68SRobert Mustacchi * United States government or any agency thereof requires an export license, 111*35786f68SRobert Mustacchi * other governmental approval, or letter of assurance, without first obtaining 112*35786f68SRobert Mustacchi * such license, approval or letter. 113*35786f68SRobert Mustacchi * 114*35786f68SRobert Mustacchi ***************************************************************************** 115*35786f68SRobert Mustacchi * 116*35786f68SRobert Mustacchi * Alternatively, you may choose to be licensed under the terms of the 117*35786f68SRobert Mustacchi * following license: 118*35786f68SRobert Mustacchi * 11926f3cdf0SGordon Ross * Redistribution and use in source and binary forms, with or without 12026f3cdf0SGordon Ross * modification, are permitted provided that the following conditions 12126f3cdf0SGordon Ross * are met: 12226f3cdf0SGordon Ross * 1. Redistributions of source code must retain the above copyright 12326f3cdf0SGordon Ross * notice, this list of conditions, and the following disclaimer, 12426f3cdf0SGordon Ross * without modification. 12526f3cdf0SGordon Ross * 2. Redistributions in binary form must reproduce at minimum a disclaimer 12626f3cdf0SGordon Ross * substantially similar to the "NO WARRANTY" disclaimer below 12726f3cdf0SGordon Ross * ("Disclaimer") and any redistribution must be conditioned upon 12826f3cdf0SGordon Ross * including a substantially similar Disclaimer requirement for further 12926f3cdf0SGordon Ross * binary redistribution. 13026f3cdf0SGordon Ross * 3. Neither the names of the above-listed copyright holders nor the names 13126f3cdf0SGordon Ross * of any contributors may be used to endorse or promote products derived 13226f3cdf0SGordon Ross * from this software without specific prior written permission. 13326f3cdf0SGordon Ross * 13426f3cdf0SGordon Ross * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 13526f3cdf0SGordon Ross * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 136*35786f68SRobert Mustacchi * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 13726f3cdf0SGordon Ross * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 138*35786f68SRobert Mustacchi * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 139*35786f68SRobert Mustacchi * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 140*35786f68SRobert Mustacchi * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 141*35786f68SRobert Mustacchi * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 142*35786f68SRobert Mustacchi * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 143*35786f68SRobert Mustacchi * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 144*35786f68SRobert Mustacchi * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 145*35786f68SRobert Mustacchi * 146*35786f68SRobert Mustacchi * Alternatively, you may choose to be licensed under the terms of the 147*35786f68SRobert Mustacchi * GNU General Public License ("GPL") version 2 as published by the Free 148*35786f68SRobert Mustacchi * Software Foundation. 149*35786f68SRobert Mustacchi * 150*35786f68SRobert Mustacchi *****************************************************************************/ 1517c478bd9Sstevel@tonic-gate 1527c478bd9Sstevel@tonic-gate #ifndef _ACOBJECT_H 1537c478bd9Sstevel@tonic-gate #define _ACOBJECT_H 1547c478bd9Sstevel@tonic-gate 15527f7c583Smyers /* acpisrc:StructDefs -- for acpisrc conversion */ 15627f7c583Smyers 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gate /* 15927f7c583Smyers * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher 1607c478bd9Sstevel@tonic-gate * to the interpreter, and to keep track of the various handlers such as 16127f7c583Smyers * address space handlers and notify handlers. The object is a constant 1627c478bd9Sstevel@tonic-gate * size in order to allow it to be cached and reused. 163db2bae30SDana Myers * 164db2bae30SDana Myers * Note: The object is optimized to be aligned and will not work if it is 165db2bae30SDana Myers * byte-packed. 1667c478bd9Sstevel@tonic-gate */ 167db2bae30SDana Myers #if ACPI_MACHINE_WIDTH == 64 168db2bae30SDana Myers #pragma pack(8) 169db2bae30SDana Myers #else 170db2bae30SDana Myers #pragma pack(4) 171db2bae30SDana Myers #endif 1727c478bd9Sstevel@tonic-gate 1737c478bd9Sstevel@tonic-gate /******************************************************************************* 1747c478bd9Sstevel@tonic-gate * 1757c478bd9Sstevel@tonic-gate * Common Descriptors 1767c478bd9Sstevel@tonic-gate * 1777c478bd9Sstevel@tonic-gate ******************************************************************************/ 1787c478bd9Sstevel@tonic-gate 1797c478bd9Sstevel@tonic-gate /* 1807c478bd9Sstevel@tonic-gate * Common area for all objects. 1817c478bd9Sstevel@tonic-gate * 18227f7c583Smyers * DescriptorType is used to differentiate between internal descriptors, and 18327f7c583Smyers * must be in the same place across all descriptors 18427f7c583Smyers * 18527f7c583Smyers * Note: The DescriptorType and Type fields must appear in the identical 18627f7c583Smyers * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT 18727f7c583Smyers * structures. 1887c478bd9Sstevel@tonic-gate */ 18927f7c583Smyers #define ACPI_OBJECT_COMMON_HEADER \ 19027f7c583Smyers union acpi_operand_object *NextObject; /* Objects linked to parent NS node */\ 19127f7c583Smyers UINT8 DescriptorType; /* To differentiate various internal objs */\ 1927c478bd9Sstevel@tonic-gate UINT8 Type; /* ACPI_OBJECT_TYPE */\ 1937c478bd9Sstevel@tonic-gate UINT16 ReferenceCount; /* For object deletion management */\ 19430082d0cSmyers UINT8 Flags; 19527f7c583Smyers /* 19627f7c583Smyers * Note: There are 3 bytes available here before the 19727f7c583Smyers * next natural alignment boundary (for both 32/64 cases) 19827f7c583Smyers */ 1997c478bd9Sstevel@tonic-gate 20027f7c583Smyers /* Values for Flag byte above */ 2017c478bd9Sstevel@tonic-gate 20226f3cdf0SGordon Ross #define AOPOBJ_AML_CONSTANT 0x01 /* Integer is an AML constant */ 20326f3cdf0SGordon Ross #define AOPOBJ_STATIC_POINTER 0x02 /* Data is part of an ACPI table, don't delete */ 2047b1019a6SJerry Jelinek #define AOPOBJ_DATA_VALID 0x04 /* Object is initialized and data is valid */ 2057b1019a6SJerry Jelinek #define AOPOBJ_OBJECT_INITIALIZED 0x08 /* Region is initialized */ 2067b1019a6SJerry Jelinek #define AOPOBJ_REG_CONNECTED 0x10 /* _REG was run */ 2077b1019a6SJerry Jelinek #define AOPOBJ_SETUP_COMPLETE 0x20 /* Region setup is complete */ 2087b1019a6SJerry Jelinek #define AOPOBJ_INVALID 0x40 /* Host OS won't allow a Region address */ 2097c478bd9Sstevel@tonic-gate 2107c478bd9Sstevel@tonic-gate 2117c478bd9Sstevel@tonic-gate /****************************************************************************** 2127c478bd9Sstevel@tonic-gate * 2137c478bd9Sstevel@tonic-gate * Basic data types 2147c478bd9Sstevel@tonic-gate * 2157c478bd9Sstevel@tonic-gate *****************************************************************************/ 2167c478bd9Sstevel@tonic-gate 2177c478bd9Sstevel@tonic-gate typedef struct acpi_object_common 2187c478bd9Sstevel@tonic-gate { 2197c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2207c478bd9Sstevel@tonic-gate 2217c478bd9Sstevel@tonic-gate } ACPI_OBJECT_COMMON; 2227c478bd9Sstevel@tonic-gate 2237c478bd9Sstevel@tonic-gate 2247c478bd9Sstevel@tonic-gate typedef struct acpi_object_integer 2257c478bd9Sstevel@tonic-gate { 2267c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 227db2bae30SDana Myers UINT8 Fill[3]; /* Prevent warning on some compilers */ 22826f3cdf0SGordon Ross UINT64 Value; 2297c478bd9Sstevel@tonic-gate 2307c478bd9Sstevel@tonic-gate } ACPI_OBJECT_INTEGER; 2317c478bd9Sstevel@tonic-gate 2327c478bd9Sstevel@tonic-gate 2337c478bd9Sstevel@tonic-gate /* 2347b1019a6SJerry Jelinek * Note: The String and Buffer object must be identical through the 2357b1019a6SJerry Jelinek * pointer and length elements. There is code that depends on this. 23627f7c583Smyers * 23727f7c583Smyers * Fields common to both Strings and Buffers 2387c478bd9Sstevel@tonic-gate */ 23927f7c583Smyers #define ACPI_COMMON_BUFFER_INFO(_Type) \ 24027f7c583Smyers _Type *Pointer; \ 24127f7c583Smyers UINT32 Length; 24227f7c583Smyers 24327f7c583Smyers 244*35786f68SRobert Mustacchi /* Null terminated, ASCII characters only */ 245*35786f68SRobert Mustacchi 246*35786f68SRobert Mustacchi typedef struct acpi_object_string 2477c478bd9Sstevel@tonic-gate { 2487c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 24927f7c583Smyers ACPI_COMMON_BUFFER_INFO (char) /* String in AML stream or allocated string */ 2507c478bd9Sstevel@tonic-gate 2517c478bd9Sstevel@tonic-gate } ACPI_OBJECT_STRING; 2527c478bd9Sstevel@tonic-gate 2537c478bd9Sstevel@tonic-gate 2547c478bd9Sstevel@tonic-gate typedef struct acpi_object_buffer 2557c478bd9Sstevel@tonic-gate { 2567c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 25727f7c583Smyers ACPI_COMMON_BUFFER_INFO (UINT8) /* Buffer in AML stream or allocated buffer */ 2587c478bd9Sstevel@tonic-gate UINT32 AmlLength; 25927f7c583Smyers UINT8 *AmlStart; 26027f7c583Smyers ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 2617c478bd9Sstevel@tonic-gate 2627c478bd9Sstevel@tonic-gate } ACPI_OBJECT_BUFFER; 2637c478bd9Sstevel@tonic-gate 2647c478bd9Sstevel@tonic-gate 2657c478bd9Sstevel@tonic-gate typedef struct acpi_object_package 2667c478bd9Sstevel@tonic-gate { 2677c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2687c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 2697c478bd9Sstevel@tonic-gate union acpi_operand_object **Elements; /* Array of pointers to AcpiObjects */ 27027f7c583Smyers UINT8 *AmlStart; 27127f7c583Smyers UINT32 AmlLength; 27227f7c583Smyers UINT32 Count; /* # of elements in package */ 2737c478bd9Sstevel@tonic-gate 2747c478bd9Sstevel@tonic-gate } ACPI_OBJECT_PACKAGE; 2757c478bd9Sstevel@tonic-gate 2767c478bd9Sstevel@tonic-gate 2777c478bd9Sstevel@tonic-gate /****************************************************************************** 2787c478bd9Sstevel@tonic-gate * 2797c478bd9Sstevel@tonic-gate * Complex data types 2807c478bd9Sstevel@tonic-gate * 2817c478bd9Sstevel@tonic-gate *****************************************************************************/ 2827c478bd9Sstevel@tonic-gate 2837c478bd9Sstevel@tonic-gate typedef struct acpi_object_event 2847c478bd9Sstevel@tonic-gate { 2857c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 28627f7c583Smyers ACPI_SEMAPHORE OsSemaphore; /* Actual OS synchronization object */ 2877c478bd9Sstevel@tonic-gate 2887c478bd9Sstevel@tonic-gate } ACPI_OBJECT_EVENT; 2897c478bd9Sstevel@tonic-gate 2907c478bd9Sstevel@tonic-gate 2917c478bd9Sstevel@tonic-gate typedef struct acpi_object_mutex 2927c478bd9Sstevel@tonic-gate { 2937c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2947c478bd9Sstevel@tonic-gate UINT8 SyncLevel; /* 0-15, specified in Mutex() call */ 2957c478bd9Sstevel@tonic-gate UINT16 AcquisitionDepth; /* Allow multiple Acquires, same thread */ 29627f7c583Smyers ACPI_MUTEX OsMutex; /* Actual OS synchronization object */ 297db2bae30SDana Myers ACPI_THREAD_ID ThreadId; /* Current owner of the mutex */ 298db2bae30SDana Myers struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */ 2997c478bd9Sstevel@tonic-gate union acpi_operand_object *Prev; /* Link for list of acquired mutexes */ 3007c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; /* Link for list of acquired mutexes */ 3017c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 3027c478bd9Sstevel@tonic-gate UINT8 OriginalSyncLevel; /* Owner's original sync level (0-15) */ 3037c478bd9Sstevel@tonic-gate 3047c478bd9Sstevel@tonic-gate } ACPI_OBJECT_MUTEX; 3057c478bd9Sstevel@tonic-gate 3067c478bd9Sstevel@tonic-gate 3077c478bd9Sstevel@tonic-gate typedef struct acpi_object_region 3087c478bd9Sstevel@tonic-gate { 3097c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3107c478bd9Sstevel@tonic-gate UINT8 SpaceId; 3117c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 31227f7c583Smyers union acpi_operand_object *Handler; /* Handler for region access */ 3137c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; 3147c478bd9Sstevel@tonic-gate ACPI_PHYSICAL_ADDRESS Address; 31527f7c583Smyers UINT32 Length; 3167c478bd9Sstevel@tonic-gate 3177c478bd9Sstevel@tonic-gate } ACPI_OBJECT_REGION; 3187c478bd9Sstevel@tonic-gate 3197c478bd9Sstevel@tonic-gate 32027f7c583Smyers typedef struct acpi_object_method 32127f7c583Smyers { 32227f7c583Smyers ACPI_OBJECT_COMMON_HEADER 32326f3cdf0SGordon Ross UINT8 InfoFlags; 32427f7c583Smyers UINT8 ParamCount; 32527f7c583Smyers UINT8 SyncLevel; 32627f7c583Smyers union acpi_operand_object *Mutex; 3277b1019a6SJerry Jelinek union acpi_operand_object *Node; 32827f7c583Smyers UINT8 *AmlStart; 32926f3cdf0SGordon Ross union 33026f3cdf0SGordon Ross { 33126f3cdf0SGordon Ross ACPI_INTERNAL_METHOD Implementation; 33226f3cdf0SGordon Ross union acpi_operand_object *Handler; 33326f3cdf0SGordon Ross } Dispatch; 33426f3cdf0SGordon Ross 33527f7c583Smyers UINT32 AmlLength; 33627f7c583Smyers UINT8 ThreadCount; 33727f7c583Smyers ACPI_OWNER_ID OwnerId; 33827f7c583Smyers 33927f7c583Smyers } ACPI_OBJECT_METHOD; 34027f7c583Smyers 34126f3cdf0SGordon Ross /* Flags for InfoFlags field above */ 34226f3cdf0SGordon Ross 34326f3cdf0SGordon Ross #define ACPI_METHOD_MODULE_LEVEL 0x01 /* Method is actually module-level code */ 34426f3cdf0SGordon Ross #define ACPI_METHOD_INTERNAL_ONLY 0x02 /* Method is implemented internally (_OSI) */ 34526f3cdf0SGordon Ross #define ACPI_METHOD_SERIALIZED 0x04 /* Method is serialized */ 34626f3cdf0SGordon Ross #define ACPI_METHOD_SERIALIZED_PENDING 0x08 /* Method is to be marked serialized */ 3477b1019a6SJerry Jelinek #define ACPI_METHOD_IGNORE_SYNC_LEVEL 0x10 /* Method was auto-serialized at table load time */ 3487b1019a6SJerry Jelinek #define ACPI_METHOD_MODIFIED_NAMESPACE 0x20 /* Method modified the namespace */ 34926f3cdf0SGordon Ross 35027f7c583Smyers 3517c478bd9Sstevel@tonic-gate /****************************************************************************** 3527c478bd9Sstevel@tonic-gate * 3537b1019a6SJerry Jelinek * Objects that can be notified. All share a common NotifyInfo area. 3547c478bd9Sstevel@tonic-gate * 3557c478bd9Sstevel@tonic-gate *****************************************************************************/ 3567c478bd9Sstevel@tonic-gate 35727f7c583Smyers /* 35827f7c583Smyers * Common fields for objects that support ASL notifications 35927f7c583Smyers */ 36027f7c583Smyers #define ACPI_COMMON_NOTIFY_INFO \ 3617b1019a6SJerry Jelinek union acpi_operand_object *NotifyList[2]; /* Handlers for system/device notifies */\ 36227f7c583Smyers union acpi_operand_object *Handler; /* Handler for Address space */ 36327f7c583Smyers 364*35786f68SRobert Mustacchi /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ 36527f7c583Smyers 366*35786f68SRobert Mustacchi typedef struct acpi_object_notify_common 3677c478bd9Sstevel@tonic-gate { 3687c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3697c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3707c478bd9Sstevel@tonic-gate 3717c478bd9Sstevel@tonic-gate } ACPI_OBJECT_NOTIFY_COMMON; 3727c478bd9Sstevel@tonic-gate 3737c478bd9Sstevel@tonic-gate 3747c478bd9Sstevel@tonic-gate typedef struct acpi_object_device 3757c478bd9Sstevel@tonic-gate { 3767c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3777c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3787c478bd9Sstevel@tonic-gate ACPI_GPE_BLOCK_INFO *GpeBlock; 3797c478bd9Sstevel@tonic-gate 3807c478bd9Sstevel@tonic-gate } ACPI_OBJECT_DEVICE; 3817c478bd9Sstevel@tonic-gate 3827c478bd9Sstevel@tonic-gate 3837c478bd9Sstevel@tonic-gate typedef struct acpi_object_power_resource 3847c478bd9Sstevel@tonic-gate { 3857c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3867c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3877c478bd9Sstevel@tonic-gate UINT32 SystemLevel; 3887c478bd9Sstevel@tonic-gate UINT32 ResourceOrder; 3897c478bd9Sstevel@tonic-gate 3907c478bd9Sstevel@tonic-gate } ACPI_OBJECT_POWER_RESOURCE; 3917c478bd9Sstevel@tonic-gate 3927c478bd9Sstevel@tonic-gate 3937c478bd9Sstevel@tonic-gate typedef struct acpi_object_processor 3947c478bd9Sstevel@tonic-gate { 3957c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 396db2bae30SDana Myers 397db2bae30SDana Myers /* The next two fields take advantage of the 3-byte space before NOTIFY_INFO */ 398db2bae30SDana Myers 39927f7c583Smyers UINT8 ProcId; 40027f7c583Smyers UINT8 Length; 4017c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 4027c478bd9Sstevel@tonic-gate ACPI_IO_ADDRESS Address; 4037c478bd9Sstevel@tonic-gate 4047c478bd9Sstevel@tonic-gate } ACPI_OBJECT_PROCESSOR; 4057c478bd9Sstevel@tonic-gate 4067c478bd9Sstevel@tonic-gate 4077c478bd9Sstevel@tonic-gate typedef struct acpi_object_thermal_zone 4087c478bd9Sstevel@tonic-gate { 4097c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4107c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 4117c478bd9Sstevel@tonic-gate 4127c478bd9Sstevel@tonic-gate } ACPI_OBJECT_THERMAL_ZONE; 4137c478bd9Sstevel@tonic-gate 4147c478bd9Sstevel@tonic-gate 4157c478bd9Sstevel@tonic-gate /****************************************************************************** 4167c478bd9Sstevel@tonic-gate * 4177b1019a6SJerry Jelinek * Fields. All share a common header/info field. 4187c478bd9Sstevel@tonic-gate * 4197c478bd9Sstevel@tonic-gate *****************************************************************************/ 4207c478bd9Sstevel@tonic-gate 42127f7c583Smyers /* 42227f7c583Smyers * Common bitfield for the field objects 42327f7c583Smyers * "Field Datum" -- a datum from the actual field object 42427f7c583Smyers * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field 42527f7c583Smyers */ 42627f7c583Smyers #define ACPI_COMMON_FIELD_INFO \ 42727f7c583Smyers UINT8 FieldFlags; /* Access, update, and lock bits */\ 42827f7c583Smyers UINT8 Attribute; /* From AccessAs keyword */\ 42927f7c583Smyers UINT8 AccessByteWidth; /* Read/Write size in bytes */\ 43027f7c583Smyers ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */\ 43127f7c583Smyers UINT32 BitLength; /* Length of field in bits */\ 43227f7c583Smyers UINT32 BaseByteOffset; /* Byte offset within containing object */\ 43327f7c583Smyers UINT32 Value; /* Value to store into the Bank or Index register */\ 43427f7c583Smyers UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\ 4357b1019a6SJerry Jelinek UINT8 AccessLength; /* For serial regions/fields */ 43627f7c583Smyers 437*35786f68SRobert Mustacchi /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ 43827f7c583Smyers 439*35786f68SRobert Mustacchi typedef struct acpi_object_field_common 4407c478bd9Sstevel@tonic-gate { 4417c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4427c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 44327f7c583Smyers union acpi_operand_object *RegionObj; /* Parent Operation Region object (REGION/BANK fields only) */ 44427f7c583Smyers 4457c478bd9Sstevel@tonic-gate } ACPI_OBJECT_FIELD_COMMON; 4467c478bd9Sstevel@tonic-gate 4477c478bd9Sstevel@tonic-gate 4487c478bd9Sstevel@tonic-gate typedef struct acpi_object_region_field 4497c478bd9Sstevel@tonic-gate { 4507c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4517c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 4527b1019a6SJerry Jelinek UINT16 ResourceLength; 4537c478bd9Sstevel@tonic-gate union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 4547b1019a6SJerry Jelinek UINT8 *ResourceBuffer; /* ResourceTemplate for serial regions/fields */ 4557b1019a6SJerry Jelinek UINT16 PinNumberIndex; /* Index relative to previous Connection/Template */ 4567c478bd9Sstevel@tonic-gate 4577c478bd9Sstevel@tonic-gate } ACPI_OBJECT_REGION_FIELD; 4587c478bd9Sstevel@tonic-gate 4597c478bd9Sstevel@tonic-gate 4607c478bd9Sstevel@tonic-gate typedef struct acpi_object_bank_field 4617c478bd9Sstevel@tonic-gate { 4627c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4637c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 4647c478bd9Sstevel@tonic-gate union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 4657c478bd9Sstevel@tonic-gate union acpi_operand_object *BankObj; /* BankSelect Register object */ 4667c478bd9Sstevel@tonic-gate 4677c478bd9Sstevel@tonic-gate } ACPI_OBJECT_BANK_FIELD; 4687c478bd9Sstevel@tonic-gate 4697c478bd9Sstevel@tonic-gate 4707c478bd9Sstevel@tonic-gate typedef struct acpi_object_index_field 4717c478bd9Sstevel@tonic-gate { 4727c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4737c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 4747c478bd9Sstevel@tonic-gate 4757c478bd9Sstevel@tonic-gate /* 4767c478bd9Sstevel@tonic-gate * No "RegionObj" pointer needed since the Index and Data registers 4777c478bd9Sstevel@tonic-gate * are each field definitions unto themselves. 4787c478bd9Sstevel@tonic-gate */ 4797c478bd9Sstevel@tonic-gate union acpi_operand_object *IndexObj; /* Index register */ 4807c478bd9Sstevel@tonic-gate union acpi_operand_object *DataObj; /* Data register */ 4817c478bd9Sstevel@tonic-gate 4827c478bd9Sstevel@tonic-gate } ACPI_OBJECT_INDEX_FIELD; 4837c478bd9Sstevel@tonic-gate 4847c478bd9Sstevel@tonic-gate 4857c478bd9Sstevel@tonic-gate /* The BufferField is different in that it is part of a Buffer, not an OpRegion */ 4867c478bd9Sstevel@tonic-gate 4877c478bd9Sstevel@tonic-gate typedef struct acpi_object_buffer_field 4887c478bd9Sstevel@tonic-gate { 4897c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4907c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 4917c478bd9Sstevel@tonic-gate union acpi_operand_object *BufferObj; /* Containing Buffer object */ 4927c478bd9Sstevel@tonic-gate 4937c478bd9Sstevel@tonic-gate } ACPI_OBJECT_BUFFER_FIELD; 4947c478bd9Sstevel@tonic-gate 4957c478bd9Sstevel@tonic-gate 4967c478bd9Sstevel@tonic-gate /****************************************************************************** 4977c478bd9Sstevel@tonic-gate * 4987c478bd9Sstevel@tonic-gate * Objects for handlers 4997c478bd9Sstevel@tonic-gate * 5007c478bd9Sstevel@tonic-gate *****************************************************************************/ 5017c478bd9Sstevel@tonic-gate 5027c478bd9Sstevel@tonic-gate typedef struct acpi_object_notify_handler 5037c478bd9Sstevel@tonic-gate { 5047c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 5057c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Parent device */ 5067b1019a6SJerry Jelinek UINT32 HandlerType; /* Type: Device/System/Both */ 5077b1019a6SJerry Jelinek ACPI_NOTIFY_HANDLER Handler; /* Handler address */ 5087c478bd9Sstevel@tonic-gate void *Context; 5097b1019a6SJerry Jelinek union acpi_operand_object *Next[2]; /* Device and System handler lists */ 5107c478bd9Sstevel@tonic-gate 5117c478bd9Sstevel@tonic-gate } ACPI_OBJECT_NOTIFY_HANDLER; 5127c478bd9Sstevel@tonic-gate 5137c478bd9Sstevel@tonic-gate 5147c478bd9Sstevel@tonic-gate typedef struct acpi_object_addr_handler 5157c478bd9Sstevel@tonic-gate { 5167c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 5177c478bd9Sstevel@tonic-gate UINT8 SpaceId; 51827f7c583Smyers UINT8 HandlerFlags; 5197c478bd9Sstevel@tonic-gate ACPI_ADR_SPACE_HANDLER Handler; 5207c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Parent device */ 5217c478bd9Sstevel@tonic-gate void *Context; 5227c478bd9Sstevel@tonic-gate ACPI_ADR_SPACE_SETUP Setup; 5237b1019a6SJerry Jelinek union acpi_operand_object *RegionList; /* Regions using this handler */ 5247c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; 5257c478bd9Sstevel@tonic-gate 5267c478bd9Sstevel@tonic-gate } ACPI_OBJECT_ADDR_HANDLER; 5277c478bd9Sstevel@tonic-gate 52827f7c583Smyers /* Flags for address handler (HandlerFlags) */ 52927f7c583Smyers 53027f7c583Smyers #define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01 53127f7c583Smyers 5327c478bd9Sstevel@tonic-gate 5337c478bd9Sstevel@tonic-gate /****************************************************************************** 5347c478bd9Sstevel@tonic-gate * 5357c478bd9Sstevel@tonic-gate * Special internal objects 5367c478bd9Sstevel@tonic-gate * 5377c478bd9Sstevel@tonic-gate *****************************************************************************/ 5387c478bd9Sstevel@tonic-gate 5397c478bd9Sstevel@tonic-gate /* 540db2bae30SDana Myers * The Reference object is used for these opcodes: 541db2bae30SDana Myers * Arg[0-6], Local[0-7], IndexOp, NameOp, RefOfOp, LoadOp, LoadTableOp, DebugOp 542db2bae30SDana Myers * The Reference.Class differentiates these types. 5437c478bd9Sstevel@tonic-gate */ 5447c478bd9Sstevel@tonic-gate typedef struct acpi_object_reference 5457c478bd9Sstevel@tonic-gate { 5467c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 5477b1019a6SJerry Jelinek UINT8 Class; /* Reference Class */ 5487b1019a6SJerry Jelinek UINT8 TargetType; /* Used for Index Op */ 549*35786f68SRobert Mustacchi UINT8 Resolved; /* Reference has been resolved to a value */ 5507b1019a6SJerry Jelinek void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */ 5517b1019a6SJerry Jelinek ACPI_NAMESPACE_NODE *Node; /* RefOf or Namepath */ 5527b1019a6SJerry Jelinek union acpi_operand_object **Where; /* Target of Index */ 5537b1019a6SJerry Jelinek UINT8 *IndexPointer; /* Used for Buffers and Strings */ 554*35786f68SRobert Mustacchi UINT8 *Aml; /* Used for deferred resolution of the ref */ 5557b1019a6SJerry Jelinek UINT32 Value; /* Used for Local/Arg/Index/DdbHandle */ 5567c478bd9Sstevel@tonic-gate 5577c478bd9Sstevel@tonic-gate } ACPI_OBJECT_REFERENCE; 5587c478bd9Sstevel@tonic-gate 559db2bae30SDana Myers /* Values for Reference.Class above */ 560db2bae30SDana Myers 561db2bae30SDana Myers typedef enum 562db2bae30SDana Myers { 563db2bae30SDana Myers ACPI_REFCLASS_LOCAL = 0, /* Method local */ 564db2bae30SDana Myers ACPI_REFCLASS_ARG = 1, /* Method argument */ 565db2bae30SDana Myers ACPI_REFCLASS_REFOF = 2, /* Result of RefOf() TBD: Split to Ref/Node and Ref/OperandObj? */ 566db2bae30SDana Myers ACPI_REFCLASS_INDEX = 3, /* Result of Index() */ 567db2bae30SDana Myers ACPI_REFCLASS_TABLE = 4, /* DdbHandle - Load(), LoadTable() */ 568db2bae30SDana Myers ACPI_REFCLASS_NAME = 5, /* Reference to a named object */ 569db2bae30SDana Myers ACPI_REFCLASS_DEBUG = 6, /* Debug object */ 570db2bae30SDana Myers 571db2bae30SDana Myers ACPI_REFCLASS_MAX = 6 572db2bae30SDana Myers 573db2bae30SDana Myers } ACPI_REFERENCE_CLASSES; 574db2bae30SDana Myers 5757c478bd9Sstevel@tonic-gate /* 5767c478bd9Sstevel@tonic-gate * Extra object is used as additional storage for types that 5777c478bd9Sstevel@tonic-gate * have AML code in their declarations (TermArgs) that must be 5787c478bd9Sstevel@tonic-gate * evaluated at run time. 5797c478bd9Sstevel@tonic-gate * 5807c478bd9Sstevel@tonic-gate * Currently: Region and FieldUnit types 5817c478bd9Sstevel@tonic-gate */ 5827c478bd9Sstevel@tonic-gate typedef struct acpi_object_extra 5837c478bd9Sstevel@tonic-gate { 5847c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 5857c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */ 5867b1019a6SJerry Jelinek ACPI_NAMESPACE_NODE *ScopeNode; 5877c478bd9Sstevel@tonic-gate void *RegionContext; /* Region-specific data */ 58827f7c583Smyers UINT8 *AmlStart; 58927f7c583Smyers UINT32 AmlLength; 5907c478bd9Sstevel@tonic-gate 5917c478bd9Sstevel@tonic-gate } ACPI_OBJECT_EXTRA; 5927c478bd9Sstevel@tonic-gate 5937c478bd9Sstevel@tonic-gate 5947c478bd9Sstevel@tonic-gate /* Additional data that can be attached to namespace nodes */ 5957c478bd9Sstevel@tonic-gate 5967c478bd9Sstevel@tonic-gate typedef struct acpi_object_data 5977c478bd9Sstevel@tonic-gate { 5987c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 5997c478bd9Sstevel@tonic-gate ACPI_OBJECT_HANDLER Handler; 6007c478bd9Sstevel@tonic-gate void *Pointer; 6017c478bd9Sstevel@tonic-gate 6027c478bd9Sstevel@tonic-gate } ACPI_OBJECT_DATA; 6037c478bd9Sstevel@tonic-gate 6047c478bd9Sstevel@tonic-gate 6057c478bd9Sstevel@tonic-gate /* Structure used when objects are cached for reuse */ 6067c478bd9Sstevel@tonic-gate 6077c478bd9Sstevel@tonic-gate typedef struct acpi_object_cache_list 6087c478bd9Sstevel@tonic-gate { 6097c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 6107c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; /* Link for object cache and internal lists*/ 6117c478bd9Sstevel@tonic-gate 6127c478bd9Sstevel@tonic-gate } ACPI_OBJECT_CACHE_LIST; 6137c478bd9Sstevel@tonic-gate 6147c478bd9Sstevel@tonic-gate 6157c478bd9Sstevel@tonic-gate /****************************************************************************** 6167c478bd9Sstevel@tonic-gate * 6177c478bd9Sstevel@tonic-gate * ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above 6187c478bd9Sstevel@tonic-gate * 6197c478bd9Sstevel@tonic-gate *****************************************************************************/ 6207c478bd9Sstevel@tonic-gate 6217c478bd9Sstevel@tonic-gate typedef union acpi_operand_object 6227c478bd9Sstevel@tonic-gate { 62327f7c583Smyers ACPI_OBJECT_COMMON Common; 62427f7c583Smyers ACPI_OBJECT_INTEGER Integer; 62527f7c583Smyers ACPI_OBJECT_STRING String; 62627f7c583Smyers ACPI_OBJECT_BUFFER Buffer; 62727f7c583Smyers ACPI_OBJECT_PACKAGE Package; 62827f7c583Smyers ACPI_OBJECT_EVENT Event; 62927f7c583Smyers ACPI_OBJECT_METHOD Method; 63027f7c583Smyers ACPI_OBJECT_MUTEX Mutex; 63127f7c583Smyers ACPI_OBJECT_REGION Region; 63227f7c583Smyers ACPI_OBJECT_NOTIFY_COMMON CommonNotify; 63327f7c583Smyers ACPI_OBJECT_DEVICE Device; 63427f7c583Smyers ACPI_OBJECT_POWER_RESOURCE PowerResource; 63527f7c583Smyers ACPI_OBJECT_PROCESSOR Processor; 63627f7c583Smyers ACPI_OBJECT_THERMAL_ZONE ThermalZone; 63727f7c583Smyers ACPI_OBJECT_FIELD_COMMON CommonField; 63827f7c583Smyers ACPI_OBJECT_REGION_FIELD Field; 63927f7c583Smyers ACPI_OBJECT_BUFFER_FIELD BufferField; 64027f7c583Smyers ACPI_OBJECT_BANK_FIELD BankField; 64127f7c583Smyers ACPI_OBJECT_INDEX_FIELD IndexField; 64227f7c583Smyers ACPI_OBJECT_NOTIFY_HANDLER Notify; 64327f7c583Smyers ACPI_OBJECT_ADDR_HANDLER AddressSpace; 64427f7c583Smyers ACPI_OBJECT_REFERENCE Reference; 64527f7c583Smyers ACPI_OBJECT_EXTRA Extra; 64627f7c583Smyers ACPI_OBJECT_DATA Data; 64727f7c583Smyers ACPI_OBJECT_CACHE_LIST Cache; 6487c478bd9Sstevel@tonic-gate 649db2bae30SDana Myers /* 650db2bae30SDana Myers * Add namespace node to union in order to simplify code that accepts both 651db2bae30SDana Myers * ACPI_OPERAND_OBJECTs and ACPI_NAMESPACE_NODEs. The structures share 652db2bae30SDana Myers * a common DescriptorType field in order to differentiate them. 653db2bae30SDana Myers */ 654db2bae30SDana Myers ACPI_NAMESPACE_NODE Node; 655db2bae30SDana Myers 6567c478bd9Sstevel@tonic-gate } ACPI_OPERAND_OBJECT; 6577c478bd9Sstevel@tonic-gate 6587c478bd9Sstevel@tonic-gate 6597c478bd9Sstevel@tonic-gate /****************************************************************************** 6607c478bd9Sstevel@tonic-gate * 6617c478bd9Sstevel@tonic-gate * ACPI_DESCRIPTOR - objects that share a common descriptor identifier 6627c478bd9Sstevel@tonic-gate * 6637c478bd9Sstevel@tonic-gate *****************************************************************************/ 6647c478bd9Sstevel@tonic-gate 6657c478bd9Sstevel@tonic-gate /* Object descriptor types */ 6667c478bd9Sstevel@tonic-gate 6677c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ 6687c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE 0x02 6697c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_UPDATE 0x03 6707c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_PACKAGE 0x04 6717c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_CONTROL 0x05 6727c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06 6737c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_PSCOPE 0x07 6747c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_WSCOPE 0x08 6757c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_RESULT 0x09 6767c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A 6777c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_THREAD 0x0B 6787c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_WALK 0x0C 6797c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_PARSER 0x0D 6807c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_OPERAND 0x0E 6817c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_NAMED 0x0F 6827c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_MAX 0x0F 6837c478bd9Sstevel@tonic-gate 6847c478bd9Sstevel@tonic-gate 68527f7c583Smyers typedef struct acpi_common_descriptor 68627f7c583Smyers { 68727f7c583Smyers void *CommonPointer; 68827f7c583Smyers UINT8 DescriptorType; /* To differentiate various internal objs */ 68927f7c583Smyers 69027f7c583Smyers } ACPI_COMMON_DESCRIPTOR; 69127f7c583Smyers 6927c478bd9Sstevel@tonic-gate typedef union acpi_descriptor 6937c478bd9Sstevel@tonic-gate { 69427f7c583Smyers ACPI_COMMON_DESCRIPTOR Common; 6957c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT Object; 6967c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE Node; 6977c478bd9Sstevel@tonic-gate ACPI_PARSE_OBJECT Op; 6987c478bd9Sstevel@tonic-gate 6997c478bd9Sstevel@tonic-gate } ACPI_DESCRIPTOR; 7007c478bd9Sstevel@tonic-gate 701db2bae30SDana Myers #pragma pack() 7027c478bd9Sstevel@tonic-gate 7037c478bd9Sstevel@tonic-gate #endif /* _ACOBJECT_H */ 704