17c478bd9Sstevel@tonic-gate 27c478bd9Sstevel@tonic-gate /****************************************************************************** 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only) 5*27f7c583Smyers * $Revision: 1.139 $ 67c478bd9Sstevel@tonic-gate * 77c478bd9Sstevel@tonic-gate *****************************************************************************/ 87c478bd9Sstevel@tonic-gate 97c478bd9Sstevel@tonic-gate /****************************************************************************** 107c478bd9Sstevel@tonic-gate * 117c478bd9Sstevel@tonic-gate * 1. Copyright Notice 127c478bd9Sstevel@tonic-gate * 1330082d0cSmyers * Some or all of this work - Copyright (c) 1999 - 2006, Intel Corp. 147c478bd9Sstevel@tonic-gate * All rights reserved. 157c478bd9Sstevel@tonic-gate * 167c478bd9Sstevel@tonic-gate * 2. License 177c478bd9Sstevel@tonic-gate * 187c478bd9Sstevel@tonic-gate * 2.1. This is your license from Intel Corp. under its intellectual property 197c478bd9Sstevel@tonic-gate * rights. You may have additional license terms from the party that provided 207c478bd9Sstevel@tonic-gate * you this software, covering your right to use that party's intellectual 217c478bd9Sstevel@tonic-gate * property rights. 227c478bd9Sstevel@tonic-gate * 237c478bd9Sstevel@tonic-gate * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a 247c478bd9Sstevel@tonic-gate * copy of the source code appearing in this file ("Covered Code") an 257c478bd9Sstevel@tonic-gate * irrevocable, perpetual, worldwide license under Intel's copyrights in the 267c478bd9Sstevel@tonic-gate * base code distributed originally by Intel ("Original Intel Code") to copy, 277c478bd9Sstevel@tonic-gate * make derivatives, distribute, use and display any portion of the Covered 287c478bd9Sstevel@tonic-gate * Code in any form, with the right to sublicense such rights; and 297c478bd9Sstevel@tonic-gate * 307c478bd9Sstevel@tonic-gate * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent 317c478bd9Sstevel@tonic-gate * license (with the right to sublicense), under only those claims of Intel 327c478bd9Sstevel@tonic-gate * patents that are infringed by the Original Intel Code, to make, use, sell, 337c478bd9Sstevel@tonic-gate * offer to sell, and import the Covered Code and derivative works thereof 347c478bd9Sstevel@tonic-gate * solely to the minimum extent necessary to exercise the above copyright 357c478bd9Sstevel@tonic-gate * license, and in no event shall the patent license extend to any additions 367c478bd9Sstevel@tonic-gate * to or modifications of the Original Intel Code. No other license or right 377c478bd9Sstevel@tonic-gate * is granted directly or by implication, estoppel or otherwise; 387c478bd9Sstevel@tonic-gate * 397c478bd9Sstevel@tonic-gate * The above copyright and patent license is granted only if the following 407c478bd9Sstevel@tonic-gate * conditions are met: 417c478bd9Sstevel@tonic-gate * 427c478bd9Sstevel@tonic-gate * 3. Conditions 437c478bd9Sstevel@tonic-gate * 447c478bd9Sstevel@tonic-gate * 3.1. Redistribution of Source with Rights to Further Distribute Source. 457c478bd9Sstevel@tonic-gate * Redistribution of source code of any substantial portion of the Covered 467c478bd9Sstevel@tonic-gate * Code or modification with rights to further distribute source must include 477c478bd9Sstevel@tonic-gate * the above Copyright Notice, the above License, this list of Conditions, 487c478bd9Sstevel@tonic-gate * and the following Disclaimer and Export Compliance provision. In addition, 497c478bd9Sstevel@tonic-gate * Licensee must cause all Covered Code to which Licensee contributes to 507c478bd9Sstevel@tonic-gate * contain a file documenting the changes Licensee made to create that Covered 517c478bd9Sstevel@tonic-gate * Code and the date of any change. Licensee must include in that file the 527c478bd9Sstevel@tonic-gate * documentation of any changes made by any predecessor Licensee. Licensee 537c478bd9Sstevel@tonic-gate * must include a prominent statement that the modification is derived, 547c478bd9Sstevel@tonic-gate * directly or indirectly, from Original Intel Code. 557c478bd9Sstevel@tonic-gate * 567c478bd9Sstevel@tonic-gate * 3.2. Redistribution of Source with no Rights to Further Distribute Source. 577c478bd9Sstevel@tonic-gate * Redistribution of source code of any substantial portion of the Covered 587c478bd9Sstevel@tonic-gate * Code or modification without rights to further distribute source must 597c478bd9Sstevel@tonic-gate * include the following Disclaimer and Export Compliance provision in the 607c478bd9Sstevel@tonic-gate * documentation and/or other materials provided with distribution. In 617c478bd9Sstevel@tonic-gate * addition, Licensee may not authorize further sublicense of source of any 627c478bd9Sstevel@tonic-gate * portion of the Covered Code, and must include terms to the effect that the 637c478bd9Sstevel@tonic-gate * license from Licensee to its licensee is limited to the intellectual 647c478bd9Sstevel@tonic-gate * property embodied in the software Licensee provides to its licensee, and 657c478bd9Sstevel@tonic-gate * not to intellectual property embodied in modifications its licensee may 667c478bd9Sstevel@tonic-gate * make. 677c478bd9Sstevel@tonic-gate * 687c478bd9Sstevel@tonic-gate * 3.3. Redistribution of Executable. Redistribution in executable form of any 697c478bd9Sstevel@tonic-gate * substantial portion of the Covered Code or modification must reproduce the 707c478bd9Sstevel@tonic-gate * above Copyright Notice, and the following Disclaimer and Export Compliance 717c478bd9Sstevel@tonic-gate * provision in the documentation and/or other materials provided with the 727c478bd9Sstevel@tonic-gate * distribution. 737c478bd9Sstevel@tonic-gate * 747c478bd9Sstevel@tonic-gate * 3.4. Intel retains all right, title, and interest in and to the Original 757c478bd9Sstevel@tonic-gate * Intel Code. 767c478bd9Sstevel@tonic-gate * 777c478bd9Sstevel@tonic-gate * 3.5. Neither the name Intel nor any other trademark owned or controlled by 787c478bd9Sstevel@tonic-gate * Intel shall be used in advertising or otherwise to promote the sale, use or 797c478bd9Sstevel@tonic-gate * other dealings in products derived from or relating to the Covered Code 807c478bd9Sstevel@tonic-gate * without prior written authorization from Intel. 817c478bd9Sstevel@tonic-gate * 827c478bd9Sstevel@tonic-gate * 4. Disclaimer and Export Compliance 837c478bd9Sstevel@tonic-gate * 847c478bd9Sstevel@tonic-gate * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED 857c478bd9Sstevel@tonic-gate * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE 867c478bd9Sstevel@tonic-gate * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, 877c478bd9Sstevel@tonic-gate * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY 887c478bd9Sstevel@tonic-gate * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY 897c478bd9Sstevel@tonic-gate * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A 907c478bd9Sstevel@tonic-gate * PARTICULAR PURPOSE. 917c478bd9Sstevel@tonic-gate * 927c478bd9Sstevel@tonic-gate * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES 937c478bd9Sstevel@tonic-gate * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR 947c478bd9Sstevel@tonic-gate * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, 957c478bd9Sstevel@tonic-gate * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY 967c478bd9Sstevel@tonic-gate * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL 977c478bd9Sstevel@tonic-gate * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS 987c478bd9Sstevel@tonic-gate * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY 997c478bd9Sstevel@tonic-gate * LIMITED REMEDY. 1007c478bd9Sstevel@tonic-gate * 1017c478bd9Sstevel@tonic-gate * 4.3. Licensee shall not export, either directly or indirectly, any of this 1027c478bd9Sstevel@tonic-gate * software or system incorporating such software without first obtaining any 1037c478bd9Sstevel@tonic-gate * required license or other approval from the U. S. Department of Commerce or 1047c478bd9Sstevel@tonic-gate * any other agency or department of the United States Government. In the 1057c478bd9Sstevel@tonic-gate * event Licensee exports any such software from the United States or 1067c478bd9Sstevel@tonic-gate * re-exports any such software from a foreign destination, Licensee shall 1077c478bd9Sstevel@tonic-gate * ensure that the distribution and export/re-export of the software is in 1087c478bd9Sstevel@tonic-gate * compliance with all laws, regulations, orders, or other restrictions of the 1097c478bd9Sstevel@tonic-gate * U.S. Export Administration Regulations. Licensee agrees that neither it nor 1107c478bd9Sstevel@tonic-gate * any of its subsidiaries will export/re-export any technical data, process, 1117c478bd9Sstevel@tonic-gate * software, or service, directly or indirectly, to any country for which the 1127c478bd9Sstevel@tonic-gate * United States government or any agency thereof requires an export license, 1137c478bd9Sstevel@tonic-gate * other governmental approval, or letter of assurance, without first obtaining 1147c478bd9Sstevel@tonic-gate * such license, approval or letter. 1157c478bd9Sstevel@tonic-gate * 1167c478bd9Sstevel@tonic-gate *****************************************************************************/ 1177c478bd9Sstevel@tonic-gate 1187c478bd9Sstevel@tonic-gate #ifndef _ACOBJECT_H 1197c478bd9Sstevel@tonic-gate #define _ACOBJECT_H 1207c478bd9Sstevel@tonic-gate 121*27f7c583Smyers /* acpisrc:StructDefs -- for acpisrc conversion */ 122*27f7c583Smyers 1237c478bd9Sstevel@tonic-gate 1247c478bd9Sstevel@tonic-gate /* 125*27f7c583Smyers * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher 1267c478bd9Sstevel@tonic-gate * to the interpreter, and to keep track of the various handlers such as 127*27f7c583Smyers * address space handlers and notify handlers. The object is a constant 1287c478bd9Sstevel@tonic-gate * size in order to allow it to be cached and reused. 1297c478bd9Sstevel@tonic-gate */ 1307c478bd9Sstevel@tonic-gate 1317c478bd9Sstevel@tonic-gate /******************************************************************************* 1327c478bd9Sstevel@tonic-gate * 1337c478bd9Sstevel@tonic-gate * Common Descriptors 1347c478bd9Sstevel@tonic-gate * 1357c478bd9Sstevel@tonic-gate ******************************************************************************/ 1367c478bd9Sstevel@tonic-gate 1377c478bd9Sstevel@tonic-gate /* 1387c478bd9Sstevel@tonic-gate * Common area for all objects. 1397c478bd9Sstevel@tonic-gate * 140*27f7c583Smyers * DescriptorType is used to differentiate between internal descriptors, and 141*27f7c583Smyers * must be in the same place across all descriptors 142*27f7c583Smyers * 143*27f7c583Smyers * Note: The DescriptorType and Type fields must appear in the identical 144*27f7c583Smyers * position in both the ACPI_NAMESPACE_NODE and ACPI_OPERAND_OBJECT 145*27f7c583Smyers * structures. 1467c478bd9Sstevel@tonic-gate */ 147*27f7c583Smyers #define ACPI_OBJECT_COMMON_HEADER \ 148*27f7c583Smyers union acpi_operand_object *NextObject; /* Objects linked to parent NS node */\ 149*27f7c583Smyers UINT8 DescriptorType; /* To differentiate various internal objs */\ 1507c478bd9Sstevel@tonic-gate UINT8 Type; /* ACPI_OBJECT_TYPE */\ 1517c478bd9Sstevel@tonic-gate UINT16 ReferenceCount; /* For object deletion management */\ 15230082d0cSmyers UINT8 Flags; 153*27f7c583Smyers /* 154*27f7c583Smyers * Note: There are 3 bytes available here before the 155*27f7c583Smyers * next natural alignment boundary (for both 32/64 cases) 156*27f7c583Smyers */ 1577c478bd9Sstevel@tonic-gate 158*27f7c583Smyers /* Values for Flag byte above */ 1597c478bd9Sstevel@tonic-gate 1607c478bd9Sstevel@tonic-gate #define AOPOBJ_AML_CONSTANT 0x01 1617c478bd9Sstevel@tonic-gate #define AOPOBJ_STATIC_POINTER 0x02 1627c478bd9Sstevel@tonic-gate #define AOPOBJ_DATA_VALID 0x04 1637c478bd9Sstevel@tonic-gate #define AOPOBJ_OBJECT_INITIALIZED 0x08 1647c478bd9Sstevel@tonic-gate #define AOPOBJ_SETUP_COMPLETE 0x10 1657c478bd9Sstevel@tonic-gate #define AOPOBJ_SINGLE_DATUM 0x20 166*27f7c583Smyers #define AOPOBJ_INVALID 0x40 /* Used if host OS won't allow an OpRegion address */ 1677c478bd9Sstevel@tonic-gate 1687c478bd9Sstevel@tonic-gate 1697c478bd9Sstevel@tonic-gate /****************************************************************************** 1707c478bd9Sstevel@tonic-gate * 1717c478bd9Sstevel@tonic-gate * Basic data types 1727c478bd9Sstevel@tonic-gate * 1737c478bd9Sstevel@tonic-gate *****************************************************************************/ 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate typedef struct acpi_object_common 1767c478bd9Sstevel@tonic-gate { 1777c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 1787c478bd9Sstevel@tonic-gate 1797c478bd9Sstevel@tonic-gate } ACPI_OBJECT_COMMON; 1807c478bd9Sstevel@tonic-gate 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gate typedef struct acpi_object_integer 1837c478bd9Sstevel@tonic-gate { 1847c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 1857c478bd9Sstevel@tonic-gate ACPI_INTEGER Value; 1867c478bd9Sstevel@tonic-gate 1877c478bd9Sstevel@tonic-gate } ACPI_OBJECT_INTEGER; 1887c478bd9Sstevel@tonic-gate 1897c478bd9Sstevel@tonic-gate 1907c478bd9Sstevel@tonic-gate /* 1917c478bd9Sstevel@tonic-gate * Note: The String and Buffer object must be identical through the Pointer 192*27f7c583Smyers * and length elements. There is code that depends on this. 193*27f7c583Smyers * 194*27f7c583Smyers * Fields common to both Strings and Buffers 1957c478bd9Sstevel@tonic-gate */ 196*27f7c583Smyers #define ACPI_COMMON_BUFFER_INFO(_Type) \ 197*27f7c583Smyers _Type *Pointer; \ 198*27f7c583Smyers UINT32 Length; 199*27f7c583Smyers 200*27f7c583Smyers 2017c478bd9Sstevel@tonic-gate typedef struct acpi_object_string /* Null terminated, ASCII characters only */ 2027c478bd9Sstevel@tonic-gate { 2037c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 204*27f7c583Smyers ACPI_COMMON_BUFFER_INFO (char) /* String in AML stream or allocated string */ 2057c478bd9Sstevel@tonic-gate 2067c478bd9Sstevel@tonic-gate } ACPI_OBJECT_STRING; 2077c478bd9Sstevel@tonic-gate 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate typedef struct acpi_object_buffer 2107c478bd9Sstevel@tonic-gate { 2117c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 212*27f7c583Smyers ACPI_COMMON_BUFFER_INFO (UINT8) /* Buffer in AML stream or allocated buffer */ 2137c478bd9Sstevel@tonic-gate UINT32 AmlLength; 214*27f7c583Smyers UINT8 *AmlStart; 215*27f7c583Smyers ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 2167c478bd9Sstevel@tonic-gate 2177c478bd9Sstevel@tonic-gate } ACPI_OBJECT_BUFFER; 2187c478bd9Sstevel@tonic-gate 2197c478bd9Sstevel@tonic-gate 2207c478bd9Sstevel@tonic-gate typedef struct acpi_object_package 2217c478bd9Sstevel@tonic-gate { 2227c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2237c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 2247c478bd9Sstevel@tonic-gate union acpi_operand_object **Elements; /* Array of pointers to AcpiObjects */ 225*27f7c583Smyers UINT8 *AmlStart; 226*27f7c583Smyers UINT32 AmlLength; 227*27f7c583Smyers UINT32 Count; /* # of elements in package */ 2287c478bd9Sstevel@tonic-gate 2297c478bd9Sstevel@tonic-gate } ACPI_OBJECT_PACKAGE; 2307c478bd9Sstevel@tonic-gate 2317c478bd9Sstevel@tonic-gate 2327c478bd9Sstevel@tonic-gate /****************************************************************************** 2337c478bd9Sstevel@tonic-gate * 2347c478bd9Sstevel@tonic-gate * Complex data types 2357c478bd9Sstevel@tonic-gate * 2367c478bd9Sstevel@tonic-gate *****************************************************************************/ 2377c478bd9Sstevel@tonic-gate 2387c478bd9Sstevel@tonic-gate typedef struct acpi_object_event 2397c478bd9Sstevel@tonic-gate { 2407c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 241*27f7c583Smyers ACPI_SEMAPHORE OsSemaphore; /* Actual OS synchronization object */ 2427c478bd9Sstevel@tonic-gate 2437c478bd9Sstevel@tonic-gate } ACPI_OBJECT_EVENT; 2447c478bd9Sstevel@tonic-gate 2457c478bd9Sstevel@tonic-gate 2467c478bd9Sstevel@tonic-gate typedef struct acpi_object_mutex 2477c478bd9Sstevel@tonic-gate { 2487c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2497c478bd9Sstevel@tonic-gate UINT8 SyncLevel; /* 0-15, specified in Mutex() call */ 2507c478bd9Sstevel@tonic-gate UINT16 AcquisitionDepth; /* Allow multiple Acquires, same thread */ 2517c478bd9Sstevel@tonic-gate struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */ 252*27f7c583Smyers ACPI_MUTEX OsMutex; /* Actual OS synchronization object */ 2537c478bd9Sstevel@tonic-gate union acpi_operand_object *Prev; /* Link for list of acquired mutexes */ 2547c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; /* Link for list of acquired mutexes */ 2557c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 2567c478bd9Sstevel@tonic-gate UINT8 OriginalSyncLevel; /* Owner's original sync level (0-15) */ 2577c478bd9Sstevel@tonic-gate 2587c478bd9Sstevel@tonic-gate } ACPI_OBJECT_MUTEX; 2597c478bd9Sstevel@tonic-gate 2607c478bd9Sstevel@tonic-gate 2617c478bd9Sstevel@tonic-gate typedef struct acpi_object_region 2627c478bd9Sstevel@tonic-gate { 2637c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2647c478bd9Sstevel@tonic-gate UINT8 SpaceId; 2657c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 266*27f7c583Smyers union acpi_operand_object *Handler; /* Handler for region access */ 2677c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; 2687c478bd9Sstevel@tonic-gate ACPI_PHYSICAL_ADDRESS Address; 269*27f7c583Smyers UINT32 Length; 2707c478bd9Sstevel@tonic-gate 2717c478bd9Sstevel@tonic-gate } ACPI_OBJECT_REGION; 2727c478bd9Sstevel@tonic-gate 2737c478bd9Sstevel@tonic-gate 274*27f7c583Smyers typedef struct acpi_object_method 275*27f7c583Smyers { 276*27f7c583Smyers ACPI_OBJECT_COMMON_HEADER 277*27f7c583Smyers UINT8 MethodFlags; 278*27f7c583Smyers UINT8 ParamCount; 279*27f7c583Smyers UINT8 SyncLevel; 280*27f7c583Smyers union acpi_operand_object *Mutex; 281*27f7c583Smyers UINT8 *AmlStart; 282*27f7c583Smyers ACPI_INTERNAL_METHOD Implementation; 283*27f7c583Smyers UINT32 AmlLength; 284*27f7c583Smyers UINT8 ThreadCount; 285*27f7c583Smyers ACPI_OWNER_ID OwnerId; 286*27f7c583Smyers 287*27f7c583Smyers } ACPI_OBJECT_METHOD; 288*27f7c583Smyers 289*27f7c583Smyers 2907c478bd9Sstevel@tonic-gate /****************************************************************************** 2917c478bd9Sstevel@tonic-gate * 2927c478bd9Sstevel@tonic-gate * Objects that can be notified. All share a common NotifyInfo area. 2937c478bd9Sstevel@tonic-gate * 2947c478bd9Sstevel@tonic-gate *****************************************************************************/ 2957c478bd9Sstevel@tonic-gate 296*27f7c583Smyers /* 297*27f7c583Smyers * Common fields for objects that support ASL notifications 298*27f7c583Smyers */ 299*27f7c583Smyers #define ACPI_COMMON_NOTIFY_INFO \ 300*27f7c583Smyers union acpi_operand_object *SystemNotify; /* Handler for system notifies */\ 301*27f7c583Smyers union acpi_operand_object *DeviceNotify; /* Handler for driver notifies */\ 302*27f7c583Smyers union acpi_operand_object *Handler; /* Handler for Address space */ 303*27f7c583Smyers 304*27f7c583Smyers 3057c478bd9Sstevel@tonic-gate typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ 3067c478bd9Sstevel@tonic-gate { 3077c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3087c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3097c478bd9Sstevel@tonic-gate 3107c478bd9Sstevel@tonic-gate } ACPI_OBJECT_NOTIFY_COMMON; 3117c478bd9Sstevel@tonic-gate 3127c478bd9Sstevel@tonic-gate 3137c478bd9Sstevel@tonic-gate typedef struct acpi_object_device 3147c478bd9Sstevel@tonic-gate { 3157c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3167c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3177c478bd9Sstevel@tonic-gate ACPI_GPE_BLOCK_INFO *GpeBlock; 3187c478bd9Sstevel@tonic-gate 3197c478bd9Sstevel@tonic-gate } ACPI_OBJECT_DEVICE; 3207c478bd9Sstevel@tonic-gate 3217c478bd9Sstevel@tonic-gate 3227c478bd9Sstevel@tonic-gate typedef struct acpi_object_power_resource 3237c478bd9Sstevel@tonic-gate { 3247c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3257c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3267c478bd9Sstevel@tonic-gate UINT32 SystemLevel; 3277c478bd9Sstevel@tonic-gate UINT32 ResourceOrder; 3287c478bd9Sstevel@tonic-gate 3297c478bd9Sstevel@tonic-gate } ACPI_OBJECT_POWER_RESOURCE; 3307c478bd9Sstevel@tonic-gate 3317c478bd9Sstevel@tonic-gate 3327c478bd9Sstevel@tonic-gate typedef struct acpi_object_processor 3337c478bd9Sstevel@tonic-gate { 3347c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 335*27f7c583Smyers UINT8 ProcId; 336*27f7c583Smyers UINT8 Length; 3377c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3387c478bd9Sstevel@tonic-gate ACPI_IO_ADDRESS Address; 3397c478bd9Sstevel@tonic-gate 3407c478bd9Sstevel@tonic-gate } ACPI_OBJECT_PROCESSOR; 3417c478bd9Sstevel@tonic-gate 3427c478bd9Sstevel@tonic-gate 3437c478bd9Sstevel@tonic-gate typedef struct acpi_object_thermal_zone 3447c478bd9Sstevel@tonic-gate { 3457c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3467c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3477c478bd9Sstevel@tonic-gate 3487c478bd9Sstevel@tonic-gate } ACPI_OBJECT_THERMAL_ZONE; 3497c478bd9Sstevel@tonic-gate 3507c478bd9Sstevel@tonic-gate 3517c478bd9Sstevel@tonic-gate /****************************************************************************** 3527c478bd9Sstevel@tonic-gate * 3537c478bd9Sstevel@tonic-gate * Fields. All share a common header/info field. 3547c478bd9Sstevel@tonic-gate * 3557c478bd9Sstevel@tonic-gate *****************************************************************************/ 3567c478bd9Sstevel@tonic-gate 357*27f7c583Smyers /* 358*27f7c583Smyers * Common bitfield for the field objects 359*27f7c583Smyers * "Field Datum" -- a datum from the actual field object 360*27f7c583Smyers * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field 361*27f7c583Smyers */ 362*27f7c583Smyers #define ACPI_COMMON_FIELD_INFO \ 363*27f7c583Smyers UINT8 FieldFlags; /* Access, update, and lock bits */\ 364*27f7c583Smyers UINT8 Attribute; /* From AccessAs keyword */\ 365*27f7c583Smyers UINT8 AccessByteWidth; /* Read/Write size in bytes */\ 366*27f7c583Smyers ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */\ 367*27f7c583Smyers UINT32 BitLength; /* Length of field in bits */\ 368*27f7c583Smyers UINT32 BaseByteOffset; /* Byte offset within containing object */\ 369*27f7c583Smyers UINT32 Value; /* Value to store into the Bank or Index register */\ 370*27f7c583Smyers UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\ 371*27f7c583Smyers UINT8 AccessBitWidth; /* Read/Write size in bits (8-64) */ 372*27f7c583Smyers 373*27f7c583Smyers 3747c478bd9Sstevel@tonic-gate typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ 3757c478bd9Sstevel@tonic-gate { 3767c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3777c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 378*27f7c583Smyers union acpi_operand_object *RegionObj; /* Parent Operation Region object (REGION/BANK fields only) */ 379*27f7c583Smyers 3807c478bd9Sstevel@tonic-gate } ACPI_OBJECT_FIELD_COMMON; 3817c478bd9Sstevel@tonic-gate 3827c478bd9Sstevel@tonic-gate 3837c478bd9Sstevel@tonic-gate typedef struct acpi_object_region_field 3847c478bd9Sstevel@tonic-gate { 3857c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3867c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 3877c478bd9Sstevel@tonic-gate union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 3887c478bd9Sstevel@tonic-gate 3897c478bd9Sstevel@tonic-gate } ACPI_OBJECT_REGION_FIELD; 3907c478bd9Sstevel@tonic-gate 3917c478bd9Sstevel@tonic-gate 3927c478bd9Sstevel@tonic-gate typedef struct acpi_object_bank_field 3937c478bd9Sstevel@tonic-gate { 3947c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3957c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 3967c478bd9Sstevel@tonic-gate union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 3977c478bd9Sstevel@tonic-gate union acpi_operand_object *BankObj; /* BankSelect Register object */ 3987c478bd9Sstevel@tonic-gate 3997c478bd9Sstevel@tonic-gate } ACPI_OBJECT_BANK_FIELD; 4007c478bd9Sstevel@tonic-gate 4017c478bd9Sstevel@tonic-gate 4027c478bd9Sstevel@tonic-gate typedef struct acpi_object_index_field 4037c478bd9Sstevel@tonic-gate { 4047c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4057c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 4067c478bd9Sstevel@tonic-gate 4077c478bd9Sstevel@tonic-gate /* 4087c478bd9Sstevel@tonic-gate * No "RegionObj" pointer needed since the Index and Data registers 4097c478bd9Sstevel@tonic-gate * are each field definitions unto themselves. 4107c478bd9Sstevel@tonic-gate */ 4117c478bd9Sstevel@tonic-gate union acpi_operand_object *IndexObj; /* Index register */ 4127c478bd9Sstevel@tonic-gate union acpi_operand_object *DataObj; /* Data register */ 4137c478bd9Sstevel@tonic-gate 4147c478bd9Sstevel@tonic-gate } ACPI_OBJECT_INDEX_FIELD; 4157c478bd9Sstevel@tonic-gate 4167c478bd9Sstevel@tonic-gate 4177c478bd9Sstevel@tonic-gate /* The BufferField is different in that it is part of a Buffer, not an OpRegion */ 4187c478bd9Sstevel@tonic-gate 4197c478bd9Sstevel@tonic-gate typedef struct acpi_object_buffer_field 4207c478bd9Sstevel@tonic-gate { 4217c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4227c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 4237c478bd9Sstevel@tonic-gate union acpi_operand_object *BufferObj; /* Containing Buffer object */ 4247c478bd9Sstevel@tonic-gate 4257c478bd9Sstevel@tonic-gate } ACPI_OBJECT_BUFFER_FIELD; 4267c478bd9Sstevel@tonic-gate 4277c478bd9Sstevel@tonic-gate 4287c478bd9Sstevel@tonic-gate /****************************************************************************** 4297c478bd9Sstevel@tonic-gate * 4307c478bd9Sstevel@tonic-gate * Objects for handlers 4317c478bd9Sstevel@tonic-gate * 4327c478bd9Sstevel@tonic-gate *****************************************************************************/ 4337c478bd9Sstevel@tonic-gate 4347c478bd9Sstevel@tonic-gate typedef struct acpi_object_notify_handler 4357c478bd9Sstevel@tonic-gate { 4367c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4377c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Parent device */ 4387c478bd9Sstevel@tonic-gate ACPI_NOTIFY_HANDLER Handler; 4397c478bd9Sstevel@tonic-gate void *Context; 4407c478bd9Sstevel@tonic-gate 4417c478bd9Sstevel@tonic-gate } ACPI_OBJECT_NOTIFY_HANDLER; 4427c478bd9Sstevel@tonic-gate 4437c478bd9Sstevel@tonic-gate 4447c478bd9Sstevel@tonic-gate typedef struct acpi_object_addr_handler 4457c478bd9Sstevel@tonic-gate { 4467c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4477c478bd9Sstevel@tonic-gate UINT8 SpaceId; 448*27f7c583Smyers UINT8 HandlerFlags; 4497c478bd9Sstevel@tonic-gate ACPI_ADR_SPACE_HANDLER Handler; 4507c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Parent device */ 4517c478bd9Sstevel@tonic-gate void *Context; 4527c478bd9Sstevel@tonic-gate ACPI_ADR_SPACE_SETUP Setup; 4537c478bd9Sstevel@tonic-gate union acpi_operand_object *RegionList; /* regions using this handler */ 4547c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; 4557c478bd9Sstevel@tonic-gate 4567c478bd9Sstevel@tonic-gate } ACPI_OBJECT_ADDR_HANDLER; 4577c478bd9Sstevel@tonic-gate 458*27f7c583Smyers /* Flags for address handler (HandlerFlags) */ 459*27f7c583Smyers 460*27f7c583Smyers #define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x01 461*27f7c583Smyers 4627c478bd9Sstevel@tonic-gate 4637c478bd9Sstevel@tonic-gate /****************************************************************************** 4647c478bd9Sstevel@tonic-gate * 4657c478bd9Sstevel@tonic-gate * Special internal objects 4667c478bd9Sstevel@tonic-gate * 4677c478bd9Sstevel@tonic-gate *****************************************************************************/ 4687c478bd9Sstevel@tonic-gate 4697c478bd9Sstevel@tonic-gate /* 4707c478bd9Sstevel@tonic-gate * The Reference object type is used for these opcodes: 4717c478bd9Sstevel@tonic-gate * Arg[0-6], Local[0-7], IndexOp, NameOp, ZeroOp, OneOp, OnesOp, DebugOp 4727c478bd9Sstevel@tonic-gate */ 4737c478bd9Sstevel@tonic-gate typedef struct acpi_object_reference 4747c478bd9Sstevel@tonic-gate { 4757c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4767c478bd9Sstevel@tonic-gate UINT8 TargetType; /* Used for IndexOp */ 4777c478bd9Sstevel@tonic-gate UINT16 Opcode; 4787c478bd9Sstevel@tonic-gate void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */ 4797c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; 4807c478bd9Sstevel@tonic-gate union acpi_operand_object **Where; 481*27f7c583Smyers UINT32 Offset; /* Used for ArgOp, LocalOp, and IndexOp */ 4827c478bd9Sstevel@tonic-gate 4837c478bd9Sstevel@tonic-gate } ACPI_OBJECT_REFERENCE; 4847c478bd9Sstevel@tonic-gate 4857c478bd9Sstevel@tonic-gate 4867c478bd9Sstevel@tonic-gate /* 4877c478bd9Sstevel@tonic-gate * Extra object is used as additional storage for types that 4887c478bd9Sstevel@tonic-gate * have AML code in their declarations (TermArgs) that must be 4897c478bd9Sstevel@tonic-gate * evaluated at run time. 4907c478bd9Sstevel@tonic-gate * 4917c478bd9Sstevel@tonic-gate * Currently: Region and FieldUnit types 4927c478bd9Sstevel@tonic-gate */ 4937c478bd9Sstevel@tonic-gate typedef struct acpi_object_extra 4947c478bd9Sstevel@tonic-gate { 4957c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4967c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */ 4977c478bd9Sstevel@tonic-gate void *RegionContext; /* Region-specific data */ 498*27f7c583Smyers UINT8 *AmlStart; 499*27f7c583Smyers UINT32 AmlLength; 5007c478bd9Sstevel@tonic-gate 5017c478bd9Sstevel@tonic-gate } ACPI_OBJECT_EXTRA; 5027c478bd9Sstevel@tonic-gate 5037c478bd9Sstevel@tonic-gate 5047c478bd9Sstevel@tonic-gate /* Additional data that can be attached to namespace nodes */ 5057c478bd9Sstevel@tonic-gate 5067c478bd9Sstevel@tonic-gate typedef struct acpi_object_data 5077c478bd9Sstevel@tonic-gate { 5087c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 5097c478bd9Sstevel@tonic-gate ACPI_OBJECT_HANDLER Handler; 5107c478bd9Sstevel@tonic-gate void *Pointer; 5117c478bd9Sstevel@tonic-gate 5127c478bd9Sstevel@tonic-gate } ACPI_OBJECT_DATA; 5137c478bd9Sstevel@tonic-gate 5147c478bd9Sstevel@tonic-gate 5157c478bd9Sstevel@tonic-gate /* Structure used when objects are cached for reuse */ 5167c478bd9Sstevel@tonic-gate 5177c478bd9Sstevel@tonic-gate typedef struct acpi_object_cache_list 5187c478bd9Sstevel@tonic-gate { 5197c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 5207c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; /* Link for object cache and internal lists*/ 5217c478bd9Sstevel@tonic-gate 5227c478bd9Sstevel@tonic-gate } ACPI_OBJECT_CACHE_LIST; 5237c478bd9Sstevel@tonic-gate 5247c478bd9Sstevel@tonic-gate 5257c478bd9Sstevel@tonic-gate /****************************************************************************** 5267c478bd9Sstevel@tonic-gate * 5277c478bd9Sstevel@tonic-gate * ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above 5287c478bd9Sstevel@tonic-gate * 5297c478bd9Sstevel@tonic-gate *****************************************************************************/ 5307c478bd9Sstevel@tonic-gate 5317c478bd9Sstevel@tonic-gate typedef union acpi_operand_object 5327c478bd9Sstevel@tonic-gate { 533*27f7c583Smyers ACPI_OBJECT_COMMON Common; 534*27f7c583Smyers ACPI_OBJECT_INTEGER Integer; 535*27f7c583Smyers ACPI_OBJECT_STRING String; 536*27f7c583Smyers ACPI_OBJECT_BUFFER Buffer; 537*27f7c583Smyers ACPI_OBJECT_PACKAGE Package; 538*27f7c583Smyers ACPI_OBJECT_EVENT Event; 539*27f7c583Smyers ACPI_OBJECT_METHOD Method; 540*27f7c583Smyers ACPI_OBJECT_MUTEX Mutex; 541*27f7c583Smyers ACPI_OBJECT_REGION Region; 542*27f7c583Smyers ACPI_OBJECT_NOTIFY_COMMON CommonNotify; 543*27f7c583Smyers ACPI_OBJECT_DEVICE Device; 544*27f7c583Smyers ACPI_OBJECT_POWER_RESOURCE PowerResource; 545*27f7c583Smyers ACPI_OBJECT_PROCESSOR Processor; 546*27f7c583Smyers ACPI_OBJECT_THERMAL_ZONE ThermalZone; 547*27f7c583Smyers ACPI_OBJECT_FIELD_COMMON CommonField; 548*27f7c583Smyers ACPI_OBJECT_REGION_FIELD Field; 549*27f7c583Smyers ACPI_OBJECT_BUFFER_FIELD BufferField; 550*27f7c583Smyers ACPI_OBJECT_BANK_FIELD BankField; 551*27f7c583Smyers ACPI_OBJECT_INDEX_FIELD IndexField; 552*27f7c583Smyers ACPI_OBJECT_NOTIFY_HANDLER Notify; 553*27f7c583Smyers ACPI_OBJECT_ADDR_HANDLER AddressSpace; 554*27f7c583Smyers ACPI_OBJECT_REFERENCE Reference; 555*27f7c583Smyers ACPI_OBJECT_EXTRA Extra; 556*27f7c583Smyers ACPI_OBJECT_DATA Data; 557*27f7c583Smyers ACPI_OBJECT_CACHE_LIST Cache; 5587c478bd9Sstevel@tonic-gate 5597c478bd9Sstevel@tonic-gate } ACPI_OPERAND_OBJECT; 5607c478bd9Sstevel@tonic-gate 5617c478bd9Sstevel@tonic-gate 5627c478bd9Sstevel@tonic-gate /****************************************************************************** 5637c478bd9Sstevel@tonic-gate * 5647c478bd9Sstevel@tonic-gate * ACPI_DESCRIPTOR - objects that share a common descriptor identifier 5657c478bd9Sstevel@tonic-gate * 5667c478bd9Sstevel@tonic-gate *****************************************************************************/ 5677c478bd9Sstevel@tonic-gate 5687c478bd9Sstevel@tonic-gate /* Object descriptor types */ 5697c478bd9Sstevel@tonic-gate 5707c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ 5717c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE 0x02 5727c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_UPDATE 0x03 5737c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_PACKAGE 0x04 5747c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_CONTROL 0x05 5757c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06 5767c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_PSCOPE 0x07 5777c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_WSCOPE 0x08 5787c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_RESULT 0x09 5797c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A 5807c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_THREAD 0x0B 5817c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_WALK 0x0C 5827c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_PARSER 0x0D 5837c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_OPERAND 0x0E 5847c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_NAMED 0x0F 5857c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_MAX 0x0F 5867c478bd9Sstevel@tonic-gate 5877c478bd9Sstevel@tonic-gate 588*27f7c583Smyers typedef struct acpi_common_descriptor 589*27f7c583Smyers { 590*27f7c583Smyers void *CommonPointer; 591*27f7c583Smyers UINT8 DescriptorType; /* To differentiate various internal objs */ 592*27f7c583Smyers 593*27f7c583Smyers } ACPI_COMMON_DESCRIPTOR; 594*27f7c583Smyers 5957c478bd9Sstevel@tonic-gate typedef union acpi_descriptor 5967c478bd9Sstevel@tonic-gate { 597*27f7c583Smyers ACPI_COMMON_DESCRIPTOR Common; 5987c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT Object; 5997c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE Node; 6007c478bd9Sstevel@tonic-gate ACPI_PARSE_OBJECT Op; 6017c478bd9Sstevel@tonic-gate 6027c478bd9Sstevel@tonic-gate } ACPI_DESCRIPTOR; 6037c478bd9Sstevel@tonic-gate 6047c478bd9Sstevel@tonic-gate 6057c478bd9Sstevel@tonic-gate #endif /* _ACOBJECT_H */ 606