17c478bd9Sstevel@tonic-gate 27c478bd9Sstevel@tonic-gate /****************************************************************************** 37c478bd9Sstevel@tonic-gate * 47c478bd9Sstevel@tonic-gate * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only) 5*30082d0cSmyers * $Revision: 1.133 $ 67c478bd9Sstevel@tonic-gate * 77c478bd9Sstevel@tonic-gate *****************************************************************************/ 87c478bd9Sstevel@tonic-gate 97c478bd9Sstevel@tonic-gate /****************************************************************************** 107c478bd9Sstevel@tonic-gate * 117c478bd9Sstevel@tonic-gate * 1. Copyright Notice 127c478bd9Sstevel@tonic-gate * 13*30082d0cSmyers * 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 1217c478bd9Sstevel@tonic-gate 1227c478bd9Sstevel@tonic-gate /* 1237c478bd9Sstevel@tonic-gate * The ACPI_OPERAND_OBJECT is used to pass AML operands from the dispatcher 1247c478bd9Sstevel@tonic-gate * to the interpreter, and to keep track of the various handlers such as 1257c478bd9Sstevel@tonic-gate * address space handlers and notify handlers. The object is a constant 1267c478bd9Sstevel@tonic-gate * size in order to allow it to be cached and reused. 1277c478bd9Sstevel@tonic-gate */ 1287c478bd9Sstevel@tonic-gate 1297c478bd9Sstevel@tonic-gate /******************************************************************************* 1307c478bd9Sstevel@tonic-gate * 1317c478bd9Sstevel@tonic-gate * Common Descriptors 1327c478bd9Sstevel@tonic-gate * 1337c478bd9Sstevel@tonic-gate ******************************************************************************/ 1347c478bd9Sstevel@tonic-gate 1357c478bd9Sstevel@tonic-gate /* 1367c478bd9Sstevel@tonic-gate * Common area for all objects. 1377c478bd9Sstevel@tonic-gate * 1387c478bd9Sstevel@tonic-gate * DataType is used to differentiate between internal descriptors, and MUST 1397c478bd9Sstevel@tonic-gate * be the first byte in this structure. 1407c478bd9Sstevel@tonic-gate */ 1417c478bd9Sstevel@tonic-gate #define ACPI_OBJECT_COMMON_HEADER /* SIZE/ALIGNMENT: 32 bits, one ptr plus trailing 8-bit flag */\ 1427c478bd9Sstevel@tonic-gate UINT8 Descriptor; /* To differentiate various internal objs */\ 1437c478bd9Sstevel@tonic-gate UINT8 Type; /* ACPI_OBJECT_TYPE */\ 1447c478bd9Sstevel@tonic-gate UINT16 ReferenceCount; /* For object deletion management */\ 1457c478bd9Sstevel@tonic-gate union acpi_operand_object *NextObject; /* Objects linked to parent NS node */\ 146*30082d0cSmyers UINT8 Flags; 1477c478bd9Sstevel@tonic-gate 1487c478bd9Sstevel@tonic-gate /* Values for flag byte above */ 1497c478bd9Sstevel@tonic-gate 1507c478bd9Sstevel@tonic-gate #define AOPOBJ_AML_CONSTANT 0x01 1517c478bd9Sstevel@tonic-gate #define AOPOBJ_STATIC_POINTER 0x02 1527c478bd9Sstevel@tonic-gate #define AOPOBJ_DATA_VALID 0x04 1537c478bd9Sstevel@tonic-gate #define AOPOBJ_OBJECT_INITIALIZED 0x08 1547c478bd9Sstevel@tonic-gate #define AOPOBJ_SETUP_COMPLETE 0x10 1557c478bd9Sstevel@tonic-gate #define AOPOBJ_SINGLE_DATUM 0x20 1567c478bd9Sstevel@tonic-gate 1577c478bd9Sstevel@tonic-gate 1587c478bd9Sstevel@tonic-gate /* 1597c478bd9Sstevel@tonic-gate * Common bitfield for the field objects 1607c478bd9Sstevel@tonic-gate * "Field Datum" -- a datum from the actual field object 1617c478bd9Sstevel@tonic-gate * "Buffer Datum" -- a datum from a user buffer, read from or to be written to the field 1627c478bd9Sstevel@tonic-gate */ 1637c478bd9Sstevel@tonic-gate #define ACPI_COMMON_FIELD_INFO /* SIZE/ALIGNMENT: 24 bits + three 32-bit values */\ 1647c478bd9Sstevel@tonic-gate UINT8 FieldFlags; /* Access, update, and lock bits */\ 1657c478bd9Sstevel@tonic-gate UINT8 Attribute; /* From AccessAs keyword */\ 1667c478bd9Sstevel@tonic-gate UINT8 AccessByteWidth; /* Read/Write size in bytes */\ 1677c478bd9Sstevel@tonic-gate UINT32 BitLength; /* Length of field in bits */\ 1687c478bd9Sstevel@tonic-gate UINT32 BaseByteOffset; /* Byte offset within containing object */\ 1697c478bd9Sstevel@tonic-gate UINT8 StartFieldBitOffset;/* Bit offset within first field datum (0-63) */\ 1707c478bd9Sstevel@tonic-gate UINT8 AccessBitWidth; /* Read/Write size in bits (8-64) */\ 1717c478bd9Sstevel@tonic-gate UINT32 Value; /* Value to store into the Bank or Index register */\ 1727c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 1737c478bd9Sstevel@tonic-gate 1747c478bd9Sstevel@tonic-gate 1757c478bd9Sstevel@tonic-gate /* 1767c478bd9Sstevel@tonic-gate * Fields common to both Strings and Buffers 1777c478bd9Sstevel@tonic-gate */ 1787c478bd9Sstevel@tonic-gate #define ACPI_COMMON_BUFFER_INFO \ 1797c478bd9Sstevel@tonic-gate UINT32 Length; 1807c478bd9Sstevel@tonic-gate 1817c478bd9Sstevel@tonic-gate 1827c478bd9Sstevel@tonic-gate /* 1837c478bd9Sstevel@tonic-gate * Common fields for objects that support ASL notifications 1847c478bd9Sstevel@tonic-gate */ 1857c478bd9Sstevel@tonic-gate #define ACPI_COMMON_NOTIFY_INFO \ 1867c478bd9Sstevel@tonic-gate union acpi_operand_object *SystemNotify; /* Handler for system notifies */\ 1877c478bd9Sstevel@tonic-gate union acpi_operand_object *DeviceNotify; /* Handler for driver notifies */\ 1887c478bd9Sstevel@tonic-gate union acpi_operand_object *Handler; /* Handler for Address space */ 1897c478bd9Sstevel@tonic-gate 1907c478bd9Sstevel@tonic-gate 1917c478bd9Sstevel@tonic-gate /****************************************************************************** 1927c478bd9Sstevel@tonic-gate * 1937c478bd9Sstevel@tonic-gate * Basic data types 1947c478bd9Sstevel@tonic-gate * 1957c478bd9Sstevel@tonic-gate *****************************************************************************/ 1967c478bd9Sstevel@tonic-gate 1977c478bd9Sstevel@tonic-gate typedef struct acpi_object_common 1987c478bd9Sstevel@tonic-gate { 1997c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2007c478bd9Sstevel@tonic-gate 2017c478bd9Sstevel@tonic-gate } ACPI_OBJECT_COMMON; 2027c478bd9Sstevel@tonic-gate 2037c478bd9Sstevel@tonic-gate 2047c478bd9Sstevel@tonic-gate typedef struct acpi_object_integer 2057c478bd9Sstevel@tonic-gate { 2067c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2077c478bd9Sstevel@tonic-gate ACPI_INTEGER Value; 2087c478bd9Sstevel@tonic-gate 2097c478bd9Sstevel@tonic-gate } ACPI_OBJECT_INTEGER; 2107c478bd9Sstevel@tonic-gate 2117c478bd9Sstevel@tonic-gate 2127c478bd9Sstevel@tonic-gate /* 2137c478bd9Sstevel@tonic-gate * Note: The String and Buffer object must be identical through the Pointer 2147c478bd9Sstevel@tonic-gate * element. There is code that depends on this. 2157c478bd9Sstevel@tonic-gate */ 2167c478bd9Sstevel@tonic-gate typedef struct acpi_object_string /* Null terminated, ASCII characters only */ 2177c478bd9Sstevel@tonic-gate { 2187c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2197c478bd9Sstevel@tonic-gate ACPI_COMMON_BUFFER_INFO 2207c478bd9Sstevel@tonic-gate char *Pointer; /* String in AML stream or allocated string */ 2217c478bd9Sstevel@tonic-gate 2227c478bd9Sstevel@tonic-gate } ACPI_OBJECT_STRING; 2237c478bd9Sstevel@tonic-gate 2247c478bd9Sstevel@tonic-gate 2257c478bd9Sstevel@tonic-gate typedef struct acpi_object_buffer 2267c478bd9Sstevel@tonic-gate { 2277c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2287c478bd9Sstevel@tonic-gate ACPI_COMMON_BUFFER_INFO 2297c478bd9Sstevel@tonic-gate UINT8 *Pointer; /* Buffer in AML stream or allocated buffer */ 2307c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 2317c478bd9Sstevel@tonic-gate UINT8 *AmlStart; 2327c478bd9Sstevel@tonic-gate UINT32 AmlLength; 2337c478bd9Sstevel@tonic-gate 2347c478bd9Sstevel@tonic-gate } ACPI_OBJECT_BUFFER; 2357c478bd9Sstevel@tonic-gate 2367c478bd9Sstevel@tonic-gate 2377c478bd9Sstevel@tonic-gate typedef struct acpi_object_package 2387c478bd9Sstevel@tonic-gate { 2397c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2407c478bd9Sstevel@tonic-gate 2417c478bd9Sstevel@tonic-gate UINT32 Count; /* # of elements in package */ 2427c478bd9Sstevel@tonic-gate UINT32 AmlLength; 2437c478bd9Sstevel@tonic-gate UINT8 *AmlStart; 2447c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Link back to parent node */ 2457c478bd9Sstevel@tonic-gate union acpi_operand_object **Elements; /* Array of pointers to AcpiObjects */ 2467c478bd9Sstevel@tonic-gate 2477c478bd9Sstevel@tonic-gate } ACPI_OBJECT_PACKAGE; 2487c478bd9Sstevel@tonic-gate 2497c478bd9Sstevel@tonic-gate 2507c478bd9Sstevel@tonic-gate /****************************************************************************** 2517c478bd9Sstevel@tonic-gate * 2527c478bd9Sstevel@tonic-gate * Complex data types 2537c478bd9Sstevel@tonic-gate * 2547c478bd9Sstevel@tonic-gate *****************************************************************************/ 2557c478bd9Sstevel@tonic-gate 2567c478bd9Sstevel@tonic-gate typedef struct acpi_object_event 2577c478bd9Sstevel@tonic-gate { 2587c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2597c478bd9Sstevel@tonic-gate void *Semaphore; 2607c478bd9Sstevel@tonic-gate 2617c478bd9Sstevel@tonic-gate } ACPI_OBJECT_EVENT; 2627c478bd9Sstevel@tonic-gate 2637c478bd9Sstevel@tonic-gate 2647c478bd9Sstevel@tonic-gate #define ACPI_INFINITE_CONCURRENCY 0xFF 2657c478bd9Sstevel@tonic-gate 2667c478bd9Sstevel@tonic-gate typedef 2677c478bd9Sstevel@tonic-gate ACPI_STATUS (*ACPI_INTERNAL_METHOD) ( 2687c478bd9Sstevel@tonic-gate struct acpi_walk_state *WalkState); 2697c478bd9Sstevel@tonic-gate 2707c478bd9Sstevel@tonic-gate typedef struct acpi_object_method 2717c478bd9Sstevel@tonic-gate { 2727c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2737c478bd9Sstevel@tonic-gate UINT8 MethodFlags; 2747c478bd9Sstevel@tonic-gate UINT8 ParamCount; 2757c478bd9Sstevel@tonic-gate UINT32 AmlLength; 2767c478bd9Sstevel@tonic-gate void *Semaphore; 2777c478bd9Sstevel@tonic-gate UINT8 *AmlStart; 2787c478bd9Sstevel@tonic-gate ACPI_INTERNAL_METHOD Implementation; 2797c478bd9Sstevel@tonic-gate UINT8 Concurrency; 2807c478bd9Sstevel@tonic-gate UINT8 ThreadCount; 281450d6964Smyers ACPI_OWNER_ID OwnerId; 2827c478bd9Sstevel@tonic-gate 2837c478bd9Sstevel@tonic-gate } ACPI_OBJECT_METHOD; 2847c478bd9Sstevel@tonic-gate 2857c478bd9Sstevel@tonic-gate 2867c478bd9Sstevel@tonic-gate typedef struct acpi_object_mutex 2877c478bd9Sstevel@tonic-gate { 2887c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 2897c478bd9Sstevel@tonic-gate UINT8 SyncLevel; /* 0-15, specified in Mutex() call */ 2907c478bd9Sstevel@tonic-gate UINT16 AcquisitionDepth; /* Allow multiple Acquires, same thread */ 2917c478bd9Sstevel@tonic-gate struct acpi_thread_state *OwnerThread; /* Current owner of the mutex */ 2927c478bd9Sstevel@tonic-gate void *Semaphore; /* Actual OS synchronization object */ 2937c478bd9Sstevel@tonic-gate union acpi_operand_object *Prev; /* Link for list of acquired mutexes */ 2947c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; /* Link for list of acquired mutexes */ 2957c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 2967c478bd9Sstevel@tonic-gate UINT8 OriginalSyncLevel; /* Owner's original sync level (0-15) */ 2977c478bd9Sstevel@tonic-gate 2987c478bd9Sstevel@tonic-gate } ACPI_OBJECT_MUTEX; 2997c478bd9Sstevel@tonic-gate 3007c478bd9Sstevel@tonic-gate 3017c478bd9Sstevel@tonic-gate typedef struct acpi_object_region 3027c478bd9Sstevel@tonic-gate { 3037c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3047c478bd9Sstevel@tonic-gate 3057c478bd9Sstevel@tonic-gate UINT8 SpaceId; 3067c478bd9Sstevel@tonic-gate union acpi_operand_object *Handler; /* Handler for region access */ 3077c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Containing namespace node */ 3087c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; 3097c478bd9Sstevel@tonic-gate UINT32 Length; 3107c478bd9Sstevel@tonic-gate ACPI_PHYSICAL_ADDRESS Address; 3117c478bd9Sstevel@tonic-gate 3127c478bd9Sstevel@tonic-gate } ACPI_OBJECT_REGION; 3137c478bd9Sstevel@tonic-gate 3147c478bd9Sstevel@tonic-gate 3157c478bd9Sstevel@tonic-gate /****************************************************************************** 3167c478bd9Sstevel@tonic-gate * 3177c478bd9Sstevel@tonic-gate * Objects that can be notified. All share a common NotifyInfo area. 3187c478bd9Sstevel@tonic-gate * 3197c478bd9Sstevel@tonic-gate *****************************************************************************/ 3207c478bd9Sstevel@tonic-gate 3217c478bd9Sstevel@tonic-gate typedef struct acpi_object_notify_common /* COMMON NOTIFY for POWER, PROCESSOR, DEVICE, and THERMAL */ 3227c478bd9Sstevel@tonic-gate { 3237c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3247c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3257c478bd9Sstevel@tonic-gate 3267c478bd9Sstevel@tonic-gate } ACPI_OBJECT_NOTIFY_COMMON; 3277c478bd9Sstevel@tonic-gate 3287c478bd9Sstevel@tonic-gate 3297c478bd9Sstevel@tonic-gate typedef struct acpi_object_device 3307c478bd9Sstevel@tonic-gate { 3317c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3327c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3337c478bd9Sstevel@tonic-gate ACPI_GPE_BLOCK_INFO *GpeBlock; 3347c478bd9Sstevel@tonic-gate 3357c478bd9Sstevel@tonic-gate } ACPI_OBJECT_DEVICE; 3367c478bd9Sstevel@tonic-gate 3377c478bd9Sstevel@tonic-gate 3387c478bd9Sstevel@tonic-gate typedef struct acpi_object_power_resource 3397c478bd9Sstevel@tonic-gate { 3407c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3417c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3427c478bd9Sstevel@tonic-gate UINT32 SystemLevel; 3437c478bd9Sstevel@tonic-gate UINT32 ResourceOrder; 3447c478bd9Sstevel@tonic-gate 3457c478bd9Sstevel@tonic-gate } ACPI_OBJECT_POWER_RESOURCE; 3467c478bd9Sstevel@tonic-gate 3477c478bd9Sstevel@tonic-gate 3487c478bd9Sstevel@tonic-gate typedef struct acpi_object_processor 3497c478bd9Sstevel@tonic-gate { 3507c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3517c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3527c478bd9Sstevel@tonic-gate UINT32 ProcId; 3537c478bd9Sstevel@tonic-gate UINT32 Length; 3547c478bd9Sstevel@tonic-gate ACPI_IO_ADDRESS Address; 3557c478bd9Sstevel@tonic-gate 3567c478bd9Sstevel@tonic-gate } ACPI_OBJECT_PROCESSOR; 3577c478bd9Sstevel@tonic-gate 3587c478bd9Sstevel@tonic-gate 3597c478bd9Sstevel@tonic-gate typedef struct acpi_object_thermal_zone 3607c478bd9Sstevel@tonic-gate { 3617c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3627c478bd9Sstevel@tonic-gate ACPI_COMMON_NOTIFY_INFO 3637c478bd9Sstevel@tonic-gate 3647c478bd9Sstevel@tonic-gate } ACPI_OBJECT_THERMAL_ZONE; 3657c478bd9Sstevel@tonic-gate 3667c478bd9Sstevel@tonic-gate 3677c478bd9Sstevel@tonic-gate /****************************************************************************** 3687c478bd9Sstevel@tonic-gate * 3697c478bd9Sstevel@tonic-gate * Fields. All share a common header/info field. 3707c478bd9Sstevel@tonic-gate * 3717c478bd9Sstevel@tonic-gate *****************************************************************************/ 3727c478bd9Sstevel@tonic-gate 3737c478bd9Sstevel@tonic-gate typedef struct acpi_object_field_common /* COMMON FIELD (for BUFFER, REGION, BANK, and INDEX fields) */ 3747c478bd9Sstevel@tonic-gate { 3757c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3767c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 3777c478bd9Sstevel@tonic-gate union acpi_operand_object *RegionObj; /* Containing Operation Region object */ 3787c478bd9Sstevel@tonic-gate /* (REGION/BANK fields only) */ 3797c478bd9Sstevel@tonic-gate } ACPI_OBJECT_FIELD_COMMON; 3807c478bd9Sstevel@tonic-gate 3817c478bd9Sstevel@tonic-gate 3827c478bd9Sstevel@tonic-gate typedef struct acpi_object_region_field 3837c478bd9Sstevel@tonic-gate { 3847c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3857c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 3867c478bd9Sstevel@tonic-gate union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 3877c478bd9Sstevel@tonic-gate 3887c478bd9Sstevel@tonic-gate } ACPI_OBJECT_REGION_FIELD; 3897c478bd9Sstevel@tonic-gate 3907c478bd9Sstevel@tonic-gate 3917c478bd9Sstevel@tonic-gate typedef struct acpi_object_bank_field 3927c478bd9Sstevel@tonic-gate { 3937c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 3947c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 3957c478bd9Sstevel@tonic-gate union acpi_operand_object *RegionObj; /* Containing OpRegion object */ 3967c478bd9Sstevel@tonic-gate union acpi_operand_object *BankObj; /* BankSelect Register object */ 3977c478bd9Sstevel@tonic-gate 3987c478bd9Sstevel@tonic-gate } ACPI_OBJECT_BANK_FIELD; 3997c478bd9Sstevel@tonic-gate 4007c478bd9Sstevel@tonic-gate 4017c478bd9Sstevel@tonic-gate typedef struct acpi_object_index_field 4027c478bd9Sstevel@tonic-gate { 4037c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4047c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 4057c478bd9Sstevel@tonic-gate 4067c478bd9Sstevel@tonic-gate /* 4077c478bd9Sstevel@tonic-gate * No "RegionObj" pointer needed since the Index and Data registers 4087c478bd9Sstevel@tonic-gate * are each field definitions unto themselves. 4097c478bd9Sstevel@tonic-gate */ 4107c478bd9Sstevel@tonic-gate union acpi_operand_object *IndexObj; /* Index register */ 4117c478bd9Sstevel@tonic-gate union acpi_operand_object *DataObj; /* Data register */ 4127c478bd9Sstevel@tonic-gate 4137c478bd9Sstevel@tonic-gate } ACPI_OBJECT_INDEX_FIELD; 4147c478bd9Sstevel@tonic-gate 4157c478bd9Sstevel@tonic-gate 4167c478bd9Sstevel@tonic-gate /* The BufferField is different in that it is part of a Buffer, not an OpRegion */ 4177c478bd9Sstevel@tonic-gate 4187c478bd9Sstevel@tonic-gate typedef struct acpi_object_buffer_field 4197c478bd9Sstevel@tonic-gate { 4207c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4217c478bd9Sstevel@tonic-gate ACPI_COMMON_FIELD_INFO 4227c478bd9Sstevel@tonic-gate union acpi_operand_object *BufferObj; /* Containing Buffer object */ 4237c478bd9Sstevel@tonic-gate 4247c478bd9Sstevel@tonic-gate } ACPI_OBJECT_BUFFER_FIELD; 4257c478bd9Sstevel@tonic-gate 4267c478bd9Sstevel@tonic-gate 4277c478bd9Sstevel@tonic-gate /****************************************************************************** 4287c478bd9Sstevel@tonic-gate * 4297c478bd9Sstevel@tonic-gate * Objects for handlers 4307c478bd9Sstevel@tonic-gate * 4317c478bd9Sstevel@tonic-gate *****************************************************************************/ 4327c478bd9Sstevel@tonic-gate 4337c478bd9Sstevel@tonic-gate typedef struct acpi_object_notify_handler 4347c478bd9Sstevel@tonic-gate { 4357c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4367c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Parent device */ 4377c478bd9Sstevel@tonic-gate ACPI_NOTIFY_HANDLER Handler; 4387c478bd9Sstevel@tonic-gate void *Context; 4397c478bd9Sstevel@tonic-gate 4407c478bd9Sstevel@tonic-gate } ACPI_OBJECT_NOTIFY_HANDLER; 4417c478bd9Sstevel@tonic-gate 4427c478bd9Sstevel@tonic-gate 4437c478bd9Sstevel@tonic-gate /* Flags for address handler */ 4447c478bd9Sstevel@tonic-gate 4457c478bd9Sstevel@tonic-gate #define ACPI_ADDR_HANDLER_DEFAULT_INSTALLED 0x1 4467c478bd9Sstevel@tonic-gate 4477c478bd9Sstevel@tonic-gate 4487c478bd9Sstevel@tonic-gate typedef struct acpi_object_addr_handler 4497c478bd9Sstevel@tonic-gate { 4507c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 4517c478bd9Sstevel@tonic-gate UINT8 SpaceId; 4527c478bd9Sstevel@tonic-gate UINT16 Hflags; 4537c478bd9Sstevel@tonic-gate ACPI_ADR_SPACE_HANDLER Handler; 4547c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; /* Parent device */ 4557c478bd9Sstevel@tonic-gate void *Context; 4567c478bd9Sstevel@tonic-gate ACPI_ADR_SPACE_SETUP Setup; 4577c478bd9Sstevel@tonic-gate union acpi_operand_object *RegionList; /* regions using this handler */ 4587c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; 4597c478bd9Sstevel@tonic-gate 4607c478bd9Sstevel@tonic-gate } ACPI_OBJECT_ADDR_HANDLER; 4617c478bd9Sstevel@tonic-gate 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 UINT32 Offset; /* Used for ArgOp, LocalOp, and IndexOp */ 4797c478bd9Sstevel@tonic-gate void *Object; /* NameOp=>HANDLE to obj, IndexOp=>ACPI_OPERAND_OBJECT */ 4807c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Node; 4817c478bd9Sstevel@tonic-gate union acpi_operand_object **Where; 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 UINT8 ByteFill1; 4977c478bd9Sstevel@tonic-gate UINT16 WordFill1; 4987c478bd9Sstevel@tonic-gate UINT32 AmlLength; 4997c478bd9Sstevel@tonic-gate UINT8 *AmlStart; 5007c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE *Method_REG; /* _REG method for this region (if any) */ 5017c478bd9Sstevel@tonic-gate void *RegionContext; /* Region-specific data */ 5027c478bd9Sstevel@tonic-gate 5037c478bd9Sstevel@tonic-gate } ACPI_OBJECT_EXTRA; 5047c478bd9Sstevel@tonic-gate 5057c478bd9Sstevel@tonic-gate 5067c478bd9Sstevel@tonic-gate /* Additional data that can be attached to namespace nodes */ 5077c478bd9Sstevel@tonic-gate 5087c478bd9Sstevel@tonic-gate typedef struct acpi_object_data 5097c478bd9Sstevel@tonic-gate { 5107c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 5117c478bd9Sstevel@tonic-gate ACPI_OBJECT_HANDLER Handler; 5127c478bd9Sstevel@tonic-gate void *Pointer; 5137c478bd9Sstevel@tonic-gate 5147c478bd9Sstevel@tonic-gate } ACPI_OBJECT_DATA; 5157c478bd9Sstevel@tonic-gate 5167c478bd9Sstevel@tonic-gate 5177c478bd9Sstevel@tonic-gate /* Structure used when objects are cached for reuse */ 5187c478bd9Sstevel@tonic-gate 5197c478bd9Sstevel@tonic-gate typedef struct acpi_object_cache_list 5207c478bd9Sstevel@tonic-gate { 5217c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON_HEADER 5227c478bd9Sstevel@tonic-gate union acpi_operand_object *Next; /* Link for object cache and internal lists*/ 5237c478bd9Sstevel@tonic-gate 5247c478bd9Sstevel@tonic-gate } ACPI_OBJECT_CACHE_LIST; 5257c478bd9Sstevel@tonic-gate 5267c478bd9Sstevel@tonic-gate 5277c478bd9Sstevel@tonic-gate /****************************************************************************** 5287c478bd9Sstevel@tonic-gate * 5297c478bd9Sstevel@tonic-gate * ACPI_OPERAND_OBJECT Descriptor - a giant union of all of the above 5307c478bd9Sstevel@tonic-gate * 5317c478bd9Sstevel@tonic-gate *****************************************************************************/ 5327c478bd9Sstevel@tonic-gate 5337c478bd9Sstevel@tonic-gate typedef union acpi_operand_object 5347c478bd9Sstevel@tonic-gate { 5357c478bd9Sstevel@tonic-gate ACPI_OBJECT_COMMON Common; 5367c478bd9Sstevel@tonic-gate ACPI_OBJECT_INTEGER Integer; 5377c478bd9Sstevel@tonic-gate ACPI_OBJECT_STRING String; 5387c478bd9Sstevel@tonic-gate ACPI_OBJECT_BUFFER Buffer; 5397c478bd9Sstevel@tonic-gate ACPI_OBJECT_PACKAGE Package; 5407c478bd9Sstevel@tonic-gate ACPI_OBJECT_EVENT Event; 5417c478bd9Sstevel@tonic-gate ACPI_OBJECT_METHOD Method; 5427c478bd9Sstevel@tonic-gate ACPI_OBJECT_MUTEX Mutex; 5437c478bd9Sstevel@tonic-gate ACPI_OBJECT_REGION Region; 5447c478bd9Sstevel@tonic-gate ACPI_OBJECT_NOTIFY_COMMON CommonNotify; 5457c478bd9Sstevel@tonic-gate ACPI_OBJECT_DEVICE Device; 5467c478bd9Sstevel@tonic-gate ACPI_OBJECT_POWER_RESOURCE PowerResource; 5477c478bd9Sstevel@tonic-gate ACPI_OBJECT_PROCESSOR Processor; 5487c478bd9Sstevel@tonic-gate ACPI_OBJECT_THERMAL_ZONE ThermalZone; 5497c478bd9Sstevel@tonic-gate ACPI_OBJECT_FIELD_COMMON CommonField; 5507c478bd9Sstevel@tonic-gate ACPI_OBJECT_REGION_FIELD Field; 5517c478bd9Sstevel@tonic-gate ACPI_OBJECT_BUFFER_FIELD BufferField; 5527c478bd9Sstevel@tonic-gate ACPI_OBJECT_BANK_FIELD BankField; 5537c478bd9Sstevel@tonic-gate ACPI_OBJECT_INDEX_FIELD IndexField; 5547c478bd9Sstevel@tonic-gate ACPI_OBJECT_NOTIFY_HANDLER Notify; 5557c478bd9Sstevel@tonic-gate ACPI_OBJECT_ADDR_HANDLER AddressSpace; 5567c478bd9Sstevel@tonic-gate ACPI_OBJECT_REFERENCE Reference; 5577c478bd9Sstevel@tonic-gate ACPI_OBJECT_EXTRA Extra; 5587c478bd9Sstevel@tonic-gate ACPI_OBJECT_DATA Data; 5597c478bd9Sstevel@tonic-gate ACPI_OBJECT_CACHE_LIST Cache; 5607c478bd9Sstevel@tonic-gate 5617c478bd9Sstevel@tonic-gate } ACPI_OPERAND_OBJECT; 5627c478bd9Sstevel@tonic-gate 5637c478bd9Sstevel@tonic-gate 5647c478bd9Sstevel@tonic-gate /****************************************************************************** 5657c478bd9Sstevel@tonic-gate * 5667c478bd9Sstevel@tonic-gate * ACPI_DESCRIPTOR - objects that share a common descriptor identifier 5677c478bd9Sstevel@tonic-gate * 5687c478bd9Sstevel@tonic-gate *****************************************************************************/ 5697c478bd9Sstevel@tonic-gate 5707c478bd9Sstevel@tonic-gate /* Object descriptor types */ 5717c478bd9Sstevel@tonic-gate 5727c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_CACHED 0x01 /* Used only when object is cached */ 5737c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE 0x02 5747c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_UPDATE 0x03 5757c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_PACKAGE 0x04 5767c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_CONTROL 0x05 5777c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_RPSCOPE 0x06 5787c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_PSCOPE 0x07 5797c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_WSCOPE 0x08 5807c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_RESULT 0x09 5817c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_NOTIFY 0x0A 5827c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_STATE_THREAD 0x0B 5837c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_WALK 0x0C 5847c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_PARSER 0x0D 5857c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_OPERAND 0x0E 5867c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_NAMED 0x0F 5877c478bd9Sstevel@tonic-gate #define ACPI_DESC_TYPE_MAX 0x0F 5887c478bd9Sstevel@tonic-gate 5897c478bd9Sstevel@tonic-gate 5907c478bd9Sstevel@tonic-gate typedef union acpi_descriptor 5917c478bd9Sstevel@tonic-gate { 592*30082d0cSmyers UINT8 DescriptorId; /* To differentiate various internal objs */ 5937c478bd9Sstevel@tonic-gate ACPI_OPERAND_OBJECT Object; 5947c478bd9Sstevel@tonic-gate ACPI_NAMESPACE_NODE Node; 5957c478bd9Sstevel@tonic-gate ACPI_PARSE_OBJECT Op; 5967c478bd9Sstevel@tonic-gate 5977c478bd9Sstevel@tonic-gate } ACPI_DESCRIPTOR; 5987c478bd9Sstevel@tonic-gate 5997c478bd9Sstevel@tonic-gate 6007c478bd9Sstevel@tonic-gate #endif /* _ACOBJECT_H */ 601