1*0Sstevel@tonic-gate 2*0Sstevel@tonic-gate /****************************************************************************** 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only) 5*0Sstevel@tonic-gate * $Revision: 129 $ 6*0Sstevel@tonic-gate * 7*0Sstevel@tonic-gate *****************************************************************************/ 8*0Sstevel@tonic-gate 9*0Sstevel@tonic-gate /****************************************************************************** 10*0Sstevel@tonic-gate * 11*0Sstevel@tonic-gate * 1. Copyright Notice 12*0Sstevel@tonic-gate * 13*0Sstevel@tonic-gate * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp. 14*0Sstevel@tonic-gate * All rights reserved. 15*0Sstevel@tonic-gate * 16*0Sstevel@tonic-gate * 2. License 17*0Sstevel@tonic-gate * 18*0Sstevel@tonic-gate * 2.1. This is your license from Intel Corp. under its intellectual property 19*0Sstevel@tonic-gate * rights. You may have additional license terms from the party that provided 20*0Sstevel@tonic-gate * you this software, covering your right to use that party's intellectual 21*0Sstevel@tonic-gate * property rights. 22*0Sstevel@tonic-gate * 23*0Sstevel@tonic-gate * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 24*0Sstevel@tonic-gate * copy of the source code appearing in this file ("Covered Code") an 25*0Sstevel@tonic-gate * irrevocable, perpetual, worldwide license under Intel's copyrights in the 26*0Sstevel@tonic-gate * base code distributed originally by Intel ("Original Intel Code") to copy, 27*0Sstevel@tonic-gate * make derivatives, distribute, use and display any portion of the Covered 28*0Sstevel@tonic-gate * Code in any form, with the right to sublicense such rights; and 29*0Sstevel@tonic-gate * 30*0Sstevel@tonic-gate * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 31*0Sstevel@tonic-gate * license (with the right to sublicense), under only those claims of Intel 32*0Sstevel@tonic-gate * patents that are infringed by the Original Intel Code, to make, use, sell, 33*0Sstevel@tonic-gate * offer to sell, and import the Covered Code and derivative works thereof 34*0Sstevel@tonic-gate * solely to the minimum extent necessary to exercise the above copyright 35*0Sstevel@tonic-gate * license, and in no event shall the patent license extend to any additions 36*0Sstevel@tonic-gate * to or modifications of the Original Intel Code. No other license or right 37*0Sstevel@tonic-gate * is granted directly or by implication, estoppel or otherwise; 38*0Sstevel@tonic-gate * 39*0Sstevel@tonic-gate * The above copyright and patent license is granted only if the following 40*0Sstevel@tonic-gate * conditions are met: 41*0Sstevel@tonic-gate * 42*0Sstevel@tonic-gate * 3. Conditions 43*0Sstevel@tonic-gate * 44*0Sstevel@tonic-gate * 3.1. Redistribution of Source with Rights to Further Distribute Source. 45*0Sstevel@tonic-gate * Redistribution of source code of any substantial portion of the Covered 46*0Sstevel@tonic-gate * Code or modification with rights to further distribute source must include 47*0Sstevel@tonic-gate * the above Copyright Notice, the above License, this list of Conditions, 48*0Sstevel@tonic-gate * and the following Disclaimer and Export Compliance provision. In addition, 49*0Sstevel@tonic-gate * Licensee must cause all Covered Code to which Licensee contributes to 50*0Sstevel@tonic-gate * contain a file documenting the changes Licensee made to create that Covered 51*0Sstevel@tonic-gate * Code and the date of any change. Licensee must include in that file the 52*0Sstevel@tonic-gate * documentation of any changes made by any predecessor Licensee. Licensee 53*0Sstevel@tonic-gate * must include a prominent statement that the modification is derived, 54*0Sstevel@tonic-gate * directly or indirectly, from Original Intel Code. 55*0Sstevel@tonic-gate * 56*0Sstevel@tonic-gate * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 57*0Sstevel@tonic-gate * Redistribution of source code of any substantial portion of the Covered 58*0Sstevel@tonic-gate * Code or modification without rights to further distribute source must 59*0Sstevel@tonic-gate * include the following Disclaimer and Export Compliance provision in the 60*0Sstevel@tonic-gate * documentation and/or other materials provided with distribution. In 61*0Sstevel@tonic-gate * addition, Licensee may not authorize further sublicense of source of any 62*0Sstevel@tonic-gate * portion of the Covered Code, and must include terms to the effect that the 63*0Sstevel@tonic-gate * license from Licensee to its licensee is limited to the intellectual 64*0Sstevel@tonic-gate * property embodied in the software Licensee provides to its licensee, and 65*0Sstevel@tonic-gate * not to intellectual property embodied in modifications its licensee may 66*0Sstevel@tonic-gate * make. 67*0Sstevel@tonic-gate * 68*0Sstevel@tonic-gate * 3.3. Redistribution of Executable. Redistribution in executable form of any 69*0Sstevel@tonic-gate * substantial portion of the Covered Code or modification must reproduce the 70*0Sstevel@tonic-gate * above Copyright Notice, and the following Disclaimer and Export Compliance 71*0Sstevel@tonic-gate * provision in the documentation and/or other materials provided with the 72*0Sstevel@tonic-gate * distribution. 73*0Sstevel@tonic-gate * 74*0Sstevel@tonic-gate * 3.4. Intel retains all right, title, and interest in and to the Original 75*0Sstevel@tonic-gate * Intel Code. 76*0Sstevel@tonic-gate * 77*0Sstevel@tonic-gate * 3.5. Neither the name Intel nor any other trademark owned or controlled by 78*0Sstevel@tonic-gate * Intel shall be used in advertising or otherwise to promote the sale, use or 79*0Sstevel@tonic-gate * other dealings in products derived from or relating to the Covered Code 80*0Sstevel@tonic-gate * without prior written authorization from Intel. 81*0Sstevel@tonic-gate * 82*0Sstevel@tonic-gate * 4. Disclaimer and Export Compliance 83*0Sstevel@tonic-gate * 84*0Sstevel@tonic-gate * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 85*0Sstevel@tonic-gate * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 86*0Sstevel@tonic-gate * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 87*0Sstevel@tonic-gate * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 88*0Sstevel@tonic-gate * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 89*0Sstevel@tonic-gate * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 90*0Sstevel@tonic-gate * PARTICULAR PURPOSE. 91*0Sstevel@tonic-gate * 92*0Sstevel@tonic-gate * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 93*0Sstevel@tonic-gate * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 94*0Sstevel@tonic-gate * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 95*0Sstevel@tonic-gate * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 96*0Sstevel@tonic-gate * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 97*0Sstevel@tonic-gate * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 98*0Sstevel@tonic-gate * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 99*0Sstevel@tonic-gate * LIMITED REMEDY. 100*0Sstevel@tonic-gate * 101*0Sstevel@tonic-gate * 4.3. Licensee shall not export, either directly or indirectly, any of this 102*0Sstevel@tonic-gate * software or system incorporating such software without first obtaining any 103*0Sstevel@tonic-gate * required license or other approval from the U. S. Department of Commerce or 104*0Sstevel@tonic-gate * any other agency or department of the United States Government. In the 105*0Sstevel@tonic-gate * event Licensee exports any such software from the United States or 106*0Sstevel@tonic-gate * re-exports any such software from a foreign destination, Licensee shall 107*0Sstevel@tonic-gate * ensure that the distribution and export/re-export of the software is in 108*0Sstevel@tonic-gate * compliance with all laws, regulations, orders, or other restrictions of the 109*0Sstevel@tonic-gate * U.S. Export Administration Regulations. Licensee agrees that neither it nor 110*0Sstevel@tonic-gate * any of its subsidiaries will export/re-export any technical data, process, 111*0Sstevel@tonic-gate * software, or service, directly or indirectly, to any country for which the 112*0Sstevel@tonic-gate * United States government or any agency thereof requires an export license, 113*0Sstevel@tonic-gate * other governmental approval, or letter of assurance, without first obtaining 114*0Sstevel@tonic-gate * such license, approval or letter. 115*0Sstevel@tonic-gate * 116*0Sstevel@tonic-gate *****************************************************************************/ 117*0Sstevel@tonic-gate 118*0Sstevel@tonic-gate #ifndef _ACOBJECT_H 119*0Sstevel@tonic-gate #define _ACOBJECT_H 120*0Sstevel@tonic-gate 121*0Sstevel@tonic-gate 122*0Sstevel@tonic-gate /* 123*0Sstevel@tonic-gate * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher 124*0Sstevel@tonic-gate * to the interpreter, and to keep track of the various handlers such as 125*0Sstevel@tonic-gate * address space handlers and notify handlers. The object is a constant 126*0Sstevel@tonic-gate * size in order to allow it to be cached and reused. 127*0Sstevel@tonic-gate */ 128*0Sstevel@tonic-gate 129*0Sstevel@tonic-gate /******************************************************************************* 130*0Sstevel@tonic-gate * 131*0Sstevel@tonic-gate * Common Descriptors 132*0Sstevel@tonic-gate * 133*0Sstevel@tonic-gate ******************************************************************************/ 134*0Sstevel@tonic-gate 135*0Sstevel@tonic-gate /* 136*0Sstevel@tonic-gate * Common area for all objects. 137*0Sstevel@tonic-gate * 138*0Sstevel@tonic-gate * DataType is used to differentiate between internal descriptors, and MUST 139*0Sstevel@tonic-gate * be the first byte in this structure. 140*0Sstevel@tonic-gate */ 141*0Sstevel@tonic-gate #define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\ 142*0Sstevel@tonic-gate UINT8 Descriptor; /* To differentiate various internal objs */\ 143*0Sstevel@tonic-gate UINT8 Type; /* ACPI_OBJECT_TYPE */\ 144*0Sstevel@tonic-gate UINT16 ReferenceCount; /* For object deletion management */\ 145*0Sstevel@tonic-gate union acpi_operand_object *NextObject; /* Objects linked to parent NS node */\ 146*0Sstevel@tonic-gate UINT8 Flags; \ 147*0Sstevel@tonic-gate 148*0Sstevel@tonic-gate /* Values for flag byte above */ 149*0Sstevel@tonic-gate 150*0Sstevel@tonic-gate #define AOPOBJ_AML_CONSTANT 0x01 151*0Sstevel@tonic-gate #define AOPOBJ_STATIC_POINTER 0x02 152*0Sstevel@tonic-gate #define AOPOBJ_DATA_VALID 0x04 153*0Sstevel@tonic-gate #define AOPOBJ_OBJECT_INITIALIZED 0x08 154*0Sstevel@tonic-gate #define AOPOBJ_SETUP_COMPLETE 0x10 155*0Sstevel@tonic-gate #define AOPOBJ_SINGLE_DATUM 0x20 156*0Sstevel@tonic-gate 157*0Sstevel@tonic-gate 158*0Sstevel@tonic-gate /* 159*0Sstevel@tonic-gate * Common bitfield for the field objects 160*0Sstevel@tonic-gate * "Field Datum" -- a datum from the actual field object 161*0Sstevel@tonic-gate * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field 162*0Sstevel@tonic-gate */ 163*0Sstevel@tonic-gate #define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\ 164*0Sstevel@tonic-gate UINT8 FieldFlags; /* Access, update, and lock bits */\ 165*0Sstevel@tonic-gate UINT8 Attribute; /* From AccessAs keyword */\ 166*0Sstevel@tonic-gate UINT8 AccessByteWidth; /* Read/Write size in bytes */\ 167*0Sstevel@tonic-gate UINT32 BitLength; /* Length of field in bits */\ 168*0Sstevel@tonic-gate UINT32 BaseByteOffset; /* Byte offset within containing object */\ 169*0Sstevel@tonic-gate UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\ 170*0Sstevel@tonic-gate UINT8 AccessBitWidth; /* Read/Write size in bits (8-64) */\ 171*0Sstevel@tonic-gate UINT32 Value; /* Value to store into the Bank or Index register */\ 172*0Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 173*0Sstevel@tonic-gate 174*0Sstevel@tonic-gate 175*0Sstevel@tonic-gate /* 176*0Sstevel@tonic-gate * Fields common to both Strings and Buffers 177*0Sstevel@tonic-gate */ 178*0Sstevel@tonic-gate #define ACPI_COMMON_BUFFER_INFO \ 179*0Sstevel@tonic-gate UINT32 Length; 180*0Sstevel@tonic-gate 181*0Sstevel@tonic-gate 182*0Sstevel@tonic-gate /* 183*0Sstevel@tonic-gate * Common fields for objects that support ASL notifications 184*0Sstevel@tonic-gate */ 185*0Sstevel@tonic-gate #define ACPI_COMMON_NOTIFY_INFO \ 186*0Sstevel@tonic-gate union acpi_operand_object *SystemNotify; /* Handler for system notifies */\ 187*0Sstevel@tonic-gate union acpi_operand_object *DeviceNotify; /* Handler for driver notifies */\ 188*0Sstevel@tonic-gate union acpi_operand_object *Handler; /* Handler for Address space */ 189*0Sstevel@tonic-gate 190*0Sstevel@tonic-gate 191*0Sstevel@tonic-gate /****************************************************************************** 192*0Sstevel@tonic-gate * 193*0Sstevel@tonic-gate * Basic data types 194*0Sstevel@tonic-gate * 195*0Sstevel@tonic-gate *****************************************************************************/ 196*0Sstevel@tonic-gate 197*0Sstevel@tonic-gate typedef struct acpi_object_common 198*0Sstevel@tonic-gate { 199*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 200*0Sstevel@tonic-gate 201*0Sstevel@tonic-gate } ACPI_OBJECT_COMMON; 202*0Sstevel@tonic-gate 203*0Sstevel@tonic-gate 204*0Sstevel@tonic-gate typedef struct acpi_object_integer 205*0Sstevel@tonic-gate { 206*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 207*0Sstevel@tonic-gate ACPI_INTEGER Value; 208*0Sstevel@tonic-gate 209*0Sstevel@tonic-gate } ACPI_OBJECT_INTEGER; 210*0Sstevel@tonic-gate 211*0Sstevel@tonic-gate 212*0Sstevel@tonic-gate /* 213*0Sstevel@tonic-gate * Note: The String and Buffer object must be identical through the Pointer 214*0Sstevel@tonic-gate * element. There is code that depends on this. 215*0Sstevel@tonic-gate */ 216*0Sstevel@tonic-gate typedef struct acpi_object_string /* Null terminated, ASCII characters only */ 217*0Sstevel@tonic-gate { 218*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 219*0Sstevel@tonic-gate ACPI_COMMON_BUFFER_INFO 220*0Sstevel@tonic-gate char *Pointer; /* String in AML stream or allocated string */ 221*0Sstevel@tonic-gate 222*0Sstevel@tonic-gate } ACPI_OBJECT_STRING; 223*0Sstevel@tonic-gate 224*0Sstevel@tonic-gate 225*0Sstevel@tonic-gate typedef struct acpi_object_buffer 226*0Sstevel@tonic-gate { 227*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 228*0Sstevel@tonic-gate ACPI_COMMON_BUFFER_INFO 229*0Sstevel@tonic-gate UINT8 *Pointer; /* Buffer in AML stream or allocated buffer */ 230*0Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 231*0Sstevel@tonic-gate UINT8 *AmlStart; 232*0Sstevel@tonic-gate UINT32 AmlLength; 233*0Sstevel@tonic-gate 234*0Sstevel@tonic-gate } ACPI_OBJECT_BUFFER; 235*0Sstevel@tonic-gate 236*0Sstevel@tonic-gate 237*0Sstevel@tonic-gate typedef struct acpi_object_package 238*0Sstevel@tonic-gate { 239*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 240*0Sstevel@tonic-gate 241*0Sstevel@tonic-gate UINT32 Count; /* # of elements in package */ 242*0Sstevel@tonic-gate UINT32 AmlLength; 243*0Sstevel@tonic-gate UINT8 *AmlStart; 244*0Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 245*0Sstevel@tonic-gate union acpi_operand_object **Elements; /* Array of pointers to AcpiObjects */ 246*0Sstevel@tonic-gate 247*0Sstevel@tonic-gate } ACPI_OBJECT_PACKAGE; 248*0Sstevel@tonic-gate 249*0Sstevel@tonic-gate 250*0Sstevel@tonic-gate /****************************************************************************** 251*0Sstevel@tonic-gate * 252*0Sstevel@tonic-gate * Complex data types 253*0Sstevel@tonic-gate * 254*0Sstevel@tonic-gate *****************************************************************************/ 255*0Sstevel@tonic-gate 256*0Sstevel@tonic-gate typedef struct acpi_object_event 257*0Sstevel@tonic-gate { 258*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 259*0Sstevel@tonic-gate void *Semaphore; 260*0Sstevel@tonic-gate 261*0Sstevel@tonic-gate } ACPI_OBJECT_EVENT; 262*0Sstevel@tonic-gate 263*0Sstevel@tonic-gate 264*0Sstevel@tonic-gate #define ACPI_INFINITE_CONCURRENCY 0xFF 265*0Sstevel@tonic-gate 266*0Sstevel@tonic-gate typedef 267*0Sstevel@tonic-gate ACPI_STATUS (*ACPI_INTERNAL_METHOD) ( 268*0Sstevel@tonic-gate struct acpi_walk_state *WalkState); 269*0Sstevel@tonic-gate 270*0Sstevel@tonic-gate typedef struct acpi_object_method 271*0Sstevel@tonic-gate { 272*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 273*0Sstevel@tonic-gate UINT8 MethodFlags; 274*0Sstevel@tonic-gate UINT8 ParamCount; 275*0Sstevel@tonic-gate UINT32 AmlLength; 276*0Sstevel@tonic-gate void *Semaphore; 277*0Sstevel@tonic-gate UINT8 *AmlStart; 278*0Sstevel@tonic-gate ACPI_INTERNAL_METHOD Implementation; 279*0Sstevel@tonic-gate UINT8 Concurrency; 280*0Sstevel@tonic-gate UINT8 ThreadCount; 281*0Sstevel@tonic-gate ACPI_OWNER_ID OwningId; 282*0Sstevel@tonic-gate 283*0Sstevel@tonic-gate } ACPI_OBJECT_METHOD; 284*0Sstevel@tonic-gate 285*0Sstevel@tonic-gate 286*0Sstevel@tonic-gate typedef struct acpi_object_mutex 287*0Sstevel@tonic-gate { 288*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 289*0Sstevel@tonic-gate UINT8 SyncLevel; /* 0-15, specified in Mutex() call */ 290*0Sstevel@tonic-gate UINT16 AcquisitionDepth; /* Allow multiple Acquires, same thread */ 291*0Sstevel@tonic-gate struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */ 292*0Sstevel@tonic-gate void *Semaphore; /* Actual OS synchronization object */ 293*0Sstevel@tonic-gate union acpi_operand_object *Prev; /* Link for list of acquired mutexes */ 294*0Sstevel@tonic-gate union acpi_operand_object *Next; /* Link for list of acquired mutexes */ 295*0Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 296*0Sstevel@tonic-gate UINT8 OriginalSyncLevel; /* Owner's original sync level (0-15) */ 297*0Sstevel@tonic-gate 298*0Sstevel@tonic-gate } ACPI_OBJECT_MUTEX; 299*0Sstevel@tonic-gate 300*0Sstevel@tonic-gate 301*0Sstevel@tonic-gate typedef struct acpi_object_region 302*0Sstevel@tonic-gate { 303*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 304*0Sstevel@tonic-gate 305*0Sstevel@tonic-gate UINT8 SpaceId; 306*0Sstevel@tonic-gate union acpi_operand_object *Handler; /* Handler for region access */ 307*0Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 308*0Sstevel@tonic-gate union acpi_operand_object *Next; 309*0Sstevel@tonic-gate UINT32 Length; 310*0Sstevel@tonic-gate ACPI_PHYSICAL_ADDRESS Address; 311*0Sstevel@tonic-gate 312*0Sstevel@tonic-gate } ACPI_OBJECT_REGION; 313*0Sstevel@tonic-gate 314*0Sstevel@tonic-gate 315*0Sstevel@tonic-gate /****************************************************************************** 316*0Sstevel@tonic-gate * 317*0Sstevel@tonic-gate * Objects that can be notified. All share a common NotifyInfo area. 318*0Sstevel@tonic-gate * 319*0Sstevel@tonic-gate *****************************************************************************/ 320*0Sstevel@tonic-gate 321*0Sstevel@tonic-gate typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ 322*0Sstevel@tonic-gate { 323*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 324*0Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 325*0Sstevel@tonic-gate 326*0Sstevel@tonic-gate } ACPI_OBJECT_NOTIFY_COMMON; 327*0Sstevel@tonic-gate 328*0Sstevel@tonic-gate 329*0Sstevel@tonic-gate typedef struct acpi_object_device 330*0Sstevel@tonic-gate { 331*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 332*0Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 333*0Sstevel@tonic-gate ACPI_GPE_BLOCK_INFO *GpeBlock; 334*0Sstevel@tonic-gate 335*0Sstevel@tonic-gate } ACPI_OBJECT_DEVICE; 336*0Sstevel@tonic-gate 337*0Sstevel@tonic-gate 338*0Sstevel@tonic-gate typedef struct acpi_object_power_resource 339*0Sstevel@tonic-gate { 340*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 341*0Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 342*0Sstevel@tonic-gate UINT32 SystemLevel; 343*0Sstevel@tonic-gate UINT32 ResourceOrder; 344*0Sstevel@tonic-gate 345*0Sstevel@tonic-gate } ACPI_OBJECT_POWER_RESOURCE; 346*0Sstevel@tonic-gate 347*0Sstevel@tonic-gate 348*0Sstevel@tonic-gate typedef struct acpi_object_processor 349*0Sstevel@tonic-gate { 350*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 351*0Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 352*0Sstevel@tonic-gate UINT32 ProcId; 353*0Sstevel@tonic-gate UINT32 Length; 354*0Sstevel@tonic-gate ACPI_IO_ADDRESS Address; 355*0Sstevel@tonic-gate 356*0Sstevel@tonic-gate } ACPI_OBJECT_PROCESSOR; 357*0Sstevel@tonic-gate 358*0Sstevel@tonic-gate 359*0Sstevel@tonic-gate typedef struct acpi_object_thermal_zone 360*0Sstevel@tonic-gate { 361*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 362*0Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 363*0Sstevel@tonic-gate 364*0Sstevel@tonic-gate } ACPI_OBJECT_THERMAL_ZONE; 365*0Sstevel@tonic-gate 366*0Sstevel@tonic-gate 367*0Sstevel@tonic-gate /****************************************************************************** 368*0Sstevel@tonic-gate * 369*0Sstevel@tonic-gate * Fields. All share a common header/info field. 370*0Sstevel@tonic-gate * 371*0Sstevel@tonic-gate *****************************************************************************/ 372*0Sstevel@tonic-gate 373*0Sstevel@tonic-gate typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ 374*0Sstevel@tonic-gate { 375*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 376*0Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 377*0Sstevel@tonic-gate union acpi_operand_object *RegionObj; /* Containing Operation Region object */ 378*0Sstevel@tonic-gate /* (REGION/BANK fields only) */ 379*0Sstevel@tonic-gate } ACPI_OBJECT_FIELD_COMMON; 380*0Sstevel@tonic-gate 381*0Sstevel@tonic-gate 382*0Sstevel@tonic-gate typedef struct acpi_object_region_field 383*0Sstevel@tonic-gate { 384*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 385*0Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 386*0Sstevel@tonic-gate union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 387*0Sstevel@tonic-gate 388*0Sstevel@tonic-gate } ACPI_OBJECT_REGION_FIELD; 389*0Sstevel@tonic-gate 390*0Sstevel@tonic-gate 391*0Sstevel@tonic-gate typedef struct acpi_object_bank_field 392*0Sstevel@tonic-gate { 393*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 394*0Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 395*0Sstevel@tonic-gate union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 396*0Sstevel@tonic-gate union acpi_operand_object *BankObj; /* BankSelect Register object */ 397*0Sstevel@tonic-gate 398*0Sstevel@tonic-gate } ACPI_OBJECT_BANK_FIELD; 399*0Sstevel@tonic-gate 400*0Sstevel@tonic-gate 401*0Sstevel@tonic-gate typedef struct acpi_object_index_field 402*0Sstevel@tonic-gate { 403*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 404*0Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 405*0Sstevel@tonic-gate 406*0Sstevel@tonic-gate /* 407*0Sstevel@tonic-gate * No "RegionObj" pointer needed since the Index and Data registers 408*0Sstevel@tonic-gate * are each field definitions unto themselves. 409*0Sstevel@tonic-gate */ 410*0Sstevel@tonic-gate union acpi_operand_object *IndexObj; /* Index register */ 411*0Sstevel@tonic-gate union acpi_operand_object *DataObj; /* Data register */ 412*0Sstevel@tonic-gate 413*0Sstevel@tonic-gate } ACPI_OBJECT_INDEX_FIELD; 414*0Sstevel@tonic-gate 415*0Sstevel@tonic-gate 416*0Sstevel@tonic-gate /* The BufferField is different in that it is part of a Buffer, not an OpRegion */ 417*0Sstevel@tonic-gate 418*0Sstevel@tonic-gate typedef struct acpi_object_buffer_field 419*0Sstevel@tonic-gate { 420*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 421*0Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 422*0Sstevel@tonic-gate union acpi_operand_object *BufferObj; /* Containing Buffer object */ 423*0Sstevel@tonic-gate 424*0Sstevel@tonic-gate } ACPI_OBJECT_BUFFER_FIELD; 425*0Sstevel@tonic-gate 426*0Sstevel@tonic-gate 427*0Sstevel@tonic-gate /****************************************************************************** 428*0Sstevel@tonic-gate * 429*0Sstevel@tonic-gate * Objects for handlers 430*0Sstevel@tonic-gate * 431*0Sstevel@tonic-gate *****************************************************************************/ 432*0Sstevel@tonic-gate 433*0Sstevel@tonic-gate typedef struct acpi_object_notify_handler 434*0Sstevel@tonic-gate { 435*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 436*0Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Parent device */ 437*0Sstevel@tonic-gate ACPI_NOTIFY_HANDLER Handler; 438*0Sstevel@tonic-gate void *Context; 439*0Sstevel@tonic-gate 440*0Sstevel@tonic-gate } ACPI_OBJECT_NOTIFY_HANDLER; 441*0Sstevel@tonic-gate 442*0Sstevel@tonic-gate 443*0Sstevel@tonic-gate /* Flags for address handler */ 444*0Sstevel@tonic-gate 445*0Sstevel@tonic-gate #define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1 446*0Sstevel@tonic-gate 447*0Sstevel@tonic-gate 448*0Sstevel@tonic-gate typedef struct acpi_object_addr_handler 449*0Sstevel@tonic-gate { 450*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 451*0Sstevel@tonic-gate UINT8 SpaceId; 452*0Sstevel@tonic-gate UINT16 Hflags; 453*0Sstevel@tonic-gate ACPI_ADR_SPACE_HANDLER Handler; 454*0Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Parent device */ 455*0Sstevel@tonic-gate void *Context; 456*0Sstevel@tonic-gate ACPI_ADR_SPACE_SETUP Setup; 457*0Sstevel@tonic-gate union acpi_operand_object *RegionList; /* regions using this handler */ 458*0Sstevel@tonic-gate union acpi_operand_object *Next; 459*0Sstevel@tonic-gate 460*0Sstevel@tonic-gate } ACPI_OBJECT_ADDR_HANDLER; 461*0Sstevel@tonic-gate 462*0Sstevel@tonic-gate 463*0Sstevel@tonic-gate /****************************************************************************** 464*0Sstevel@tonic-gate * 465*0Sstevel@tonic-gate * Special internal objects 466*0Sstevel@tonic-gate * 467*0Sstevel@tonic-gate *****************************************************************************/ 468*0Sstevel@tonic-gate 469*0Sstevel@tonic-gate /* 470*0Sstevel@tonic-gate * The Reference object type is used for these opcodes: 471*0Sstevel@tonic-gate * Arg[0-6], Local[0-7], IndexOp, NameOp, ZeroOp, OneOp, OnesOp, DebugOp 472*0Sstevel@tonic-gate */ 473*0Sstevel@tonic-gate typedef struct acpi_object_reference 474*0Sstevel@tonic-gate { 475*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 476*0Sstevel@tonic-gate UINT8 TargetType; /* Used for IndexOp */ 477*0Sstevel@tonic-gate UINT16 Opcode; 478*0Sstevel@tonic-gate UINT32 Offset; /* Used for ArgOp, LocalOp, and IndexOp */ 479*0Sstevel@tonic-gate void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */ 480*0Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; 481*0Sstevel@tonic-gate union acpi_operand_object **Where; 482*0Sstevel@tonic-gate 483*0Sstevel@tonic-gate } ACPI_OBJECT_REFERENCE; 484*0Sstevel@tonic-gate 485*0Sstevel@tonic-gate 486*0Sstevel@tonic-gate /* 487*0Sstevel@tonic-gate * Extra object is used as additional storage for types that 488*0Sstevel@tonic-gate * have AML code in their declarations (TermArgs) that must be 489*0Sstevel@tonic-gate * evaluated at run time. 490*0Sstevel@tonic-gate * 491*0Sstevel@tonic-gate * Currently: Region and FieldUnit types 492*0Sstevel@tonic-gate */ 493*0Sstevel@tonic-gate typedef struct acpi_object_extra 494*0Sstevel@tonic-gate { 495*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 496*0Sstevel@tonic-gate UINT8 ByteFill1; 497*0Sstevel@tonic-gate UINT16 WordFill1; 498*0Sstevel@tonic-gate UINT32 AmlLength; 499*0Sstevel@tonic-gate UINT8 *AmlStart; 500*0Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */ 501*0Sstevel@tonic-gate void *RegionContext; /* Region-specific data */ 502*0Sstevel@tonic-gate 503*0Sstevel@tonic-gate } ACPI_OBJECT_EXTRA; 504*0Sstevel@tonic-gate 505*0Sstevel@tonic-gate 506*0Sstevel@tonic-gate /* Additional data that can be attached to namespace nodes */ 507*0Sstevel@tonic-gate 508*0Sstevel@tonic-gate typedef struct acpi_object_data 509*0Sstevel@tonic-gate { 510*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 511*0Sstevel@tonic-gate ACPI_OBJECT_HANDLER Handler; 512*0Sstevel@tonic-gate void *Pointer; 513*0Sstevel@tonic-gate 514*0Sstevel@tonic-gate } ACPI_OBJECT_DATA; 515*0Sstevel@tonic-gate 516*0Sstevel@tonic-gate 517*0Sstevel@tonic-gate /* Structure used when objects are cached for reuse */ 518*0Sstevel@tonic-gate 519*0Sstevel@tonic-gate typedef struct acpi_object_cache_list 520*0Sstevel@tonic-gate { 521*0Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 522*0Sstevel@tonic-gate union acpi_operand_object *Next; /* Link for object cache and internal lists*/ 523*0Sstevel@tonic-gate 524*0Sstevel@tonic-gate } ACPI_OBJECT_CACHE_LIST; 525*0Sstevel@tonic-gate 526*0Sstevel@tonic-gate 527*0Sstevel@tonic-gate /****************************************************************************** 528*0Sstevel@tonic-gate * 529*0Sstevel@tonic-gate * ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above 530*0Sstevel@tonic-gate * 531*0Sstevel@tonic-gate *****************************************************************************/ 532*0Sstevel@tonic-gate 533*0Sstevel@tonic-gate typedef union acpi_operand_object 534*0Sstevel@tonic-gate { 535*0Sstevel@tonic-gate ACPI_OBJECT_COMMON Common; 536*0Sstevel@tonic-gate ACPI_OBJECT_INTEGER Integer; 537*0Sstevel@tonic-gate ACPI_OBJECT_STRING String; 538*0Sstevel@tonic-gate ACPI_OBJECT_BUFFER Buffer; 539*0Sstevel@tonic-gate ACPI_OBJECT_PACKAGE Package; 540*0Sstevel@tonic-gate ACPI_OBJECT_EVENT Event; 541*0Sstevel@tonic-gate ACPI_OBJECT_METHOD Method; 542*0Sstevel@tonic-gate ACPI_OBJECT_MUTEX Mutex; 543*0Sstevel@tonic-gate ACPI_OBJECT_REGION Region; 544*0Sstevel@tonic-gate ACPI_OBJECT_NOTIFY_COMMON CommonNotify; 545*0Sstevel@tonic-gate ACPI_OBJECT_DEVICE Device; 546*0Sstevel@tonic-gate ACPI_OBJECT_POWER_RESOURCE PowerResource; 547*0Sstevel@tonic-gate ACPI_OBJECT_PROCESSOR Processor; 548*0Sstevel@tonic-gate ACPI_OBJECT_THERMAL_ZONE ThermalZone; 549*0Sstevel@tonic-gate ACPI_OBJECT_FIELD_COMMON CommonField; 550*0Sstevel@tonic-gate ACPI_OBJECT_REGION_FIELD Field; 551*0Sstevel@tonic-gate ACPI_OBJECT_BUFFER_FIELD BufferField; 552*0Sstevel@tonic-gate ACPI_OBJECT_BANK_FIELD BankField; 553*0Sstevel@tonic-gate ACPI_OBJECT_INDEX_FIELD IndexField; 554*0Sstevel@tonic-gate ACPI_OBJECT_NOTIFY_HANDLER Notify; 555*0Sstevel@tonic-gate ACPI_OBJECT_ADDR_HANDLER AddressSpace; 556*0Sstevel@tonic-gate ACPI_OBJECT_REFERENCE Reference; 557*0Sstevel@tonic-gate ACPI_OBJECT_EXTRA Extra; 558*0Sstevel@tonic-gate ACPI_OBJECT_DATA Data; 559*0Sstevel@tonic-gate ACPI_OBJECT_CACHE_LIST Cache; 560*0Sstevel@tonic-gate 561*0Sstevel@tonic-gate } ACPI_OPERAND_OBJECT; 562*0Sstevel@tonic-gate 563*0Sstevel@tonic-gate 564*0Sstevel@tonic-gate /****************************************************************************** 565*0Sstevel@tonic-gate * 566*0Sstevel@tonic-gate * ACPI_DESCRIPTOR - objects that share a common descriptor identifier 567*0Sstevel@tonic-gate * 568*0Sstevel@tonic-gate *****************************************************************************/ 569*0Sstevel@tonic-gate 570*0Sstevel@tonic-gate /* Object descriptor types */ 571*0Sstevel@tonic-gate 572*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ 573*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE 0x02 574*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_UPDATE 0x03 575*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_PACKAGE 0x04 576*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_CONTROL 0x05 577*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06 578*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_PSCOPE 0x07 579*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_WSCOPE 0x08 580*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_RESULT 0x09 581*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A 582*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_THREAD 0x0B 583*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_WALK 0x0C 584*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_PARSER 0x0D 585*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_OPERAND 0x0E 586*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_NAMED 0x0F 587*0Sstevel@tonic-gate #define ACPI_DESC_TYPE_MAX 0x0F 588*0Sstevel@tonic-gate 589*0Sstevel@tonic-gate 590*0Sstevel@tonic-gate typedef union acpi_descriptor 591*0Sstevel@tonic-gate { 592*0Sstevel@tonic-gate UINT8 DescriptorId; /* To differentiate various internal objs */\ 593*0Sstevel@tonic-gate ACPI_OPERAND_OBJECT Object; 594*0Sstevel@tonic-gate ACPI_NAMESPACE_NODE Node; 595*0Sstevel@tonic-gate ACPI_PARSE_OBJECT Op; 596*0Sstevel@tonic-gate 597*0Sstevel@tonic-gate } ACPI_DESCRIPTOR; 598*0Sstevel@tonic-gate 599*0Sstevel@tonic-gate 600*0Sstevel@tonic-gate #endif /* _ACOBJECT_H */ 601