xref: /illumos-gate/usr/src/uts/intel/sys/acpi/actypes.h (revision 7c478bd9)
1*7c478bd9Sstevel@tonic-gate /******************************************************************************
2*7c478bd9Sstevel@tonic-gate  *
3*7c478bd9Sstevel@tonic-gate  * Name: actypes.h - Common data types for the entire ACPI subsystem
4*7c478bd9Sstevel@tonic-gate  *       $Revision: 278 $
5*7c478bd9Sstevel@tonic-gate  *
6*7c478bd9Sstevel@tonic-gate  *****************************************************************************/
7*7c478bd9Sstevel@tonic-gate 
8*7c478bd9Sstevel@tonic-gate /******************************************************************************
9*7c478bd9Sstevel@tonic-gate  *
10*7c478bd9Sstevel@tonic-gate  * 1. Copyright Notice
11*7c478bd9Sstevel@tonic-gate  *
12*7c478bd9Sstevel@tonic-gate  * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
13*7c478bd9Sstevel@tonic-gate  * All rights reserved.
14*7c478bd9Sstevel@tonic-gate  *
15*7c478bd9Sstevel@tonic-gate  * 2. License
16*7c478bd9Sstevel@tonic-gate  *
17*7c478bd9Sstevel@tonic-gate  * 2.1. This is your license from Intel Corp. under its intellectual property
18*7c478bd9Sstevel@tonic-gate  * rights.  You may have additional license terms from the party that provided
19*7c478bd9Sstevel@tonic-gate  * you this software, covering your right to use that party's intellectual
20*7c478bd9Sstevel@tonic-gate  * property rights.
21*7c478bd9Sstevel@tonic-gate  *
22*7c478bd9Sstevel@tonic-gate  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23*7c478bd9Sstevel@tonic-gate  * copy of the source code appearing in this file ("Covered Code") an
24*7c478bd9Sstevel@tonic-gate  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25*7c478bd9Sstevel@tonic-gate  * base code distributed originally by Intel ("Original Intel Code") to copy,
26*7c478bd9Sstevel@tonic-gate  * make derivatives, distribute, use and display any portion of the Covered
27*7c478bd9Sstevel@tonic-gate  * Code in any form, with the right to sublicense such rights; and
28*7c478bd9Sstevel@tonic-gate  *
29*7c478bd9Sstevel@tonic-gate  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30*7c478bd9Sstevel@tonic-gate  * license (with the right to sublicense), under only those claims of Intel
31*7c478bd9Sstevel@tonic-gate  * patents that are infringed by the Original Intel Code, to make, use, sell,
32*7c478bd9Sstevel@tonic-gate  * offer to sell, and import the Covered Code and derivative works thereof
33*7c478bd9Sstevel@tonic-gate  * solely to the minimum extent necessary to exercise the above copyright
34*7c478bd9Sstevel@tonic-gate  * license, and in no event shall the patent license extend to any additions
35*7c478bd9Sstevel@tonic-gate  * to or modifications of the Original Intel Code.  No other license or right
36*7c478bd9Sstevel@tonic-gate  * is granted directly or by implication, estoppel or otherwise;
37*7c478bd9Sstevel@tonic-gate  *
38*7c478bd9Sstevel@tonic-gate  * The above copyright and patent license is granted only if the following
39*7c478bd9Sstevel@tonic-gate  * conditions are met:
40*7c478bd9Sstevel@tonic-gate  *
41*7c478bd9Sstevel@tonic-gate  * 3. Conditions
42*7c478bd9Sstevel@tonic-gate  *
43*7c478bd9Sstevel@tonic-gate  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44*7c478bd9Sstevel@tonic-gate  * Redistribution of source code of any substantial portion of the Covered
45*7c478bd9Sstevel@tonic-gate  * Code or modification with rights to further distribute source must include
46*7c478bd9Sstevel@tonic-gate  * the above Copyright Notice, the above License, this list of Conditions,
47*7c478bd9Sstevel@tonic-gate  * and the following Disclaimer and Export Compliance provision.  In addition,
48*7c478bd9Sstevel@tonic-gate  * Licensee must cause all Covered Code to which Licensee contributes to
49*7c478bd9Sstevel@tonic-gate  * contain a file documenting the changes Licensee made to create that Covered
50*7c478bd9Sstevel@tonic-gate  * Code and the date of any change.  Licensee must include in that file the
51*7c478bd9Sstevel@tonic-gate  * documentation of any changes made by any predecessor Licensee.  Licensee
52*7c478bd9Sstevel@tonic-gate  * must include a prominent statement that the modification is derived,
53*7c478bd9Sstevel@tonic-gate  * directly or indirectly, from Original Intel Code.
54*7c478bd9Sstevel@tonic-gate  *
55*7c478bd9Sstevel@tonic-gate  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56*7c478bd9Sstevel@tonic-gate  * Redistribution of source code of any substantial portion of the Covered
57*7c478bd9Sstevel@tonic-gate  * Code or modification without rights to further distribute source must
58*7c478bd9Sstevel@tonic-gate  * include the following Disclaimer and Export Compliance provision in the
59*7c478bd9Sstevel@tonic-gate  * documentation and/or other materials provided with distribution.  In
60*7c478bd9Sstevel@tonic-gate  * addition, Licensee may not authorize further sublicense of source of any
61*7c478bd9Sstevel@tonic-gate  * portion of the Covered Code, and must include terms to the effect that the
62*7c478bd9Sstevel@tonic-gate  * license from Licensee to its licensee is limited to the intellectual
63*7c478bd9Sstevel@tonic-gate  * property embodied in the software Licensee provides to its licensee, and
64*7c478bd9Sstevel@tonic-gate  * not to intellectual property embodied in modifications its licensee may
65*7c478bd9Sstevel@tonic-gate  * make.
66*7c478bd9Sstevel@tonic-gate  *
67*7c478bd9Sstevel@tonic-gate  * 3.3. Redistribution of Executable. Redistribution in executable form of any
68*7c478bd9Sstevel@tonic-gate  * substantial portion of the Covered Code or modification must reproduce the
69*7c478bd9Sstevel@tonic-gate  * above Copyright Notice, and the following Disclaimer and Export Compliance
70*7c478bd9Sstevel@tonic-gate  * provision in the documentation and/or other materials provided with the
71*7c478bd9Sstevel@tonic-gate  * distribution.
72*7c478bd9Sstevel@tonic-gate  *
73*7c478bd9Sstevel@tonic-gate  * 3.4. Intel retains all right, title, and interest in and to the Original
74*7c478bd9Sstevel@tonic-gate  * Intel Code.
75*7c478bd9Sstevel@tonic-gate  *
76*7c478bd9Sstevel@tonic-gate  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77*7c478bd9Sstevel@tonic-gate  * Intel shall be used in advertising or otherwise to promote the sale, use or
78*7c478bd9Sstevel@tonic-gate  * other dealings in products derived from or relating to the Covered Code
79*7c478bd9Sstevel@tonic-gate  * without prior written authorization from Intel.
80*7c478bd9Sstevel@tonic-gate  *
81*7c478bd9Sstevel@tonic-gate  * 4. Disclaimer and Export Compliance
82*7c478bd9Sstevel@tonic-gate  *
83*7c478bd9Sstevel@tonic-gate  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84*7c478bd9Sstevel@tonic-gate  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85*7c478bd9Sstevel@tonic-gate  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86*7c478bd9Sstevel@tonic-gate  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87*7c478bd9Sstevel@tonic-gate  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88*7c478bd9Sstevel@tonic-gate  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89*7c478bd9Sstevel@tonic-gate  * PARTICULAR PURPOSE.
90*7c478bd9Sstevel@tonic-gate  *
91*7c478bd9Sstevel@tonic-gate  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92*7c478bd9Sstevel@tonic-gate  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93*7c478bd9Sstevel@tonic-gate  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94*7c478bd9Sstevel@tonic-gate  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95*7c478bd9Sstevel@tonic-gate  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96*7c478bd9Sstevel@tonic-gate  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97*7c478bd9Sstevel@tonic-gate  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98*7c478bd9Sstevel@tonic-gate  * LIMITED REMEDY.
99*7c478bd9Sstevel@tonic-gate  *
100*7c478bd9Sstevel@tonic-gate  * 4.3. Licensee shall not export, either directly or indirectly, any of this
101*7c478bd9Sstevel@tonic-gate  * software or system incorporating such software without first obtaining any
102*7c478bd9Sstevel@tonic-gate  * required license or other approval from the U. S. Department of Commerce or
103*7c478bd9Sstevel@tonic-gate  * any other agency or department of the United States Government.  In the
104*7c478bd9Sstevel@tonic-gate  * event Licensee exports any such software from the United States or
105*7c478bd9Sstevel@tonic-gate  * re-exports any such software from a foreign destination, Licensee shall
106*7c478bd9Sstevel@tonic-gate  * ensure that the distribution and export/re-export of the software is in
107*7c478bd9Sstevel@tonic-gate  * compliance with all laws, regulations, orders, or other restrictions of the
108*7c478bd9Sstevel@tonic-gate  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109*7c478bd9Sstevel@tonic-gate  * any of its subsidiaries will export/re-export any technical data, process,
110*7c478bd9Sstevel@tonic-gate  * software, or service, directly or indirectly, to any country for which the
111*7c478bd9Sstevel@tonic-gate  * United States government or any agency thereof requires an export license,
112*7c478bd9Sstevel@tonic-gate  * other governmental approval, or letter of assurance, without first obtaining
113*7c478bd9Sstevel@tonic-gate  * such license, approval or letter.
114*7c478bd9Sstevel@tonic-gate  *
115*7c478bd9Sstevel@tonic-gate  *****************************************************************************/
116*7c478bd9Sstevel@tonic-gate 
117*7c478bd9Sstevel@tonic-gate #ifndef __ACTYPES_H__
118*7c478bd9Sstevel@tonic-gate #define __ACTYPES_H__
119*7c478bd9Sstevel@tonic-gate 
120*7c478bd9Sstevel@tonic-gate /*! [Begin] no source code translation (keep the typedefs) */
121*7c478bd9Sstevel@tonic-gate 
122*7c478bd9Sstevel@tonic-gate 
123*7c478bd9Sstevel@tonic-gate 
124*7c478bd9Sstevel@tonic-gate /*
125*7c478bd9Sstevel@tonic-gate  * Data type ranges
126*7c478bd9Sstevel@tonic-gate  * Note: These macros are designed to be compiler independent as well as
127*7c478bd9Sstevel@tonic-gate  * working around problems that some 32-bit compilers have with 64-bit
128*7c478bd9Sstevel@tonic-gate  * constants.
129*7c478bd9Sstevel@tonic-gate  */
130*7c478bd9Sstevel@tonic-gate #define ACPI_UINT8_MAX                  (UINT8) (~((UINT8)  0)) /* 0xFF               */
131*7c478bd9Sstevel@tonic-gate #define ACPI_UINT16_MAX                 (UINT16)(~((UINT16) 0)) /* 0xFFFF             */
132*7c478bd9Sstevel@tonic-gate #define ACPI_UINT32_MAX                 (UINT32)(~((UINT32) 0)) /* 0xFFFFFFFF         */
133*7c478bd9Sstevel@tonic-gate #define ACPI_UINT64_MAX                 (UINT64)(~((UINT64) 0)) /* 0xFFFFFFFFFFFFFFFF */
134*7c478bd9Sstevel@tonic-gate #define ACPI_ASCII_MAX                  0x7F
135*7c478bd9Sstevel@tonic-gate 
136*7c478bd9Sstevel@tonic-gate 
137*7c478bd9Sstevel@tonic-gate #ifdef DEFINE_ALTERNATE_TYPES
138*7c478bd9Sstevel@tonic-gate /*
139*7c478bd9Sstevel@tonic-gate  * Types used only in translated source, defined here to enable
140*7c478bd9Sstevel@tonic-gate  * cross-platform compilation only.
141*7c478bd9Sstevel@tonic-gate  */
142*7c478bd9Sstevel@tonic-gate typedef int                             s32;
143*7c478bd9Sstevel@tonic-gate typedef unsigned char                   u8;
144*7c478bd9Sstevel@tonic-gate typedef unsigned short                  u16;
145*7c478bd9Sstevel@tonic-gate typedef unsigned int                    u32;
146*7c478bd9Sstevel@tonic-gate typedef COMPILER_DEPENDENT_UINT64       u64;
147*7c478bd9Sstevel@tonic-gate 
148*7c478bd9Sstevel@tonic-gate #endif
149*7c478bd9Sstevel@tonic-gate 
150*7c478bd9Sstevel@tonic-gate 
151*7c478bd9Sstevel@tonic-gate /*
152*7c478bd9Sstevel@tonic-gate  * Data types - Fixed across all compilation models (16/32/64)
153*7c478bd9Sstevel@tonic-gate  *
154*7c478bd9Sstevel@tonic-gate  * BOOLEAN          Logical Boolean.
155*7c478bd9Sstevel@tonic-gate  * INT8             8-bit  (1 byte) signed value
156*7c478bd9Sstevel@tonic-gate  * UINT8            8-bit  (1 byte) unsigned value
157*7c478bd9Sstevel@tonic-gate  * INT16            16-bit (2 byte) signed value
158*7c478bd9Sstevel@tonic-gate  * UINT16           16-bit (2 byte) unsigned value
159*7c478bd9Sstevel@tonic-gate  * INT32            32-bit (4 byte) signed value
160*7c478bd9Sstevel@tonic-gate  * UINT32           32-bit (4 byte) unsigned value
161*7c478bd9Sstevel@tonic-gate  * INT64            64-bit (8 byte) signed value
162*7c478bd9Sstevel@tonic-gate  * UINT64           64-bit (8 byte) unsigned value
163*7c478bd9Sstevel@tonic-gate  * ACPI_NATIVE_INT  32-bit on IA-32, 64-bit on IA-64 signed value
164*7c478bd9Sstevel@tonic-gate  * ACPI_NATIVE_UINT 32-bit on IA-32, 64-bit on IA-64 unsigned value
165*7c478bd9Sstevel@tonic-gate  */
166*7c478bd9Sstevel@tonic-gate 
167*7c478bd9Sstevel@tonic-gate #ifndef ACPI_MACHINE_WIDTH
168*7c478bd9Sstevel@tonic-gate #error ACPI_MACHINE_WIDTH not defined
169*7c478bd9Sstevel@tonic-gate #endif
170*7c478bd9Sstevel@tonic-gate 
171*7c478bd9Sstevel@tonic-gate #if ACPI_MACHINE_WIDTH == 64
172*7c478bd9Sstevel@tonic-gate 
173*7c478bd9Sstevel@tonic-gate /*! [Begin] no source code translation (keep the typedefs) */
174*7c478bd9Sstevel@tonic-gate 
175*7c478bd9Sstevel@tonic-gate /*
176*7c478bd9Sstevel@tonic-gate  * 64-bit type definitions
177*7c478bd9Sstevel@tonic-gate  */
178*7c478bd9Sstevel@tonic-gate typedef unsigned char                   UINT8;
179*7c478bd9Sstevel@tonic-gate typedef unsigned char                   BOOLEAN;
180*7c478bd9Sstevel@tonic-gate typedef unsigned short                  UINT16;
181*7c478bd9Sstevel@tonic-gate typedef int                             INT32;
182*7c478bd9Sstevel@tonic-gate typedef unsigned int                    UINT32;
183*7c478bd9Sstevel@tonic-gate typedef COMPILER_DEPENDENT_INT64        INT64;
184*7c478bd9Sstevel@tonic-gate typedef COMPILER_DEPENDENT_UINT64       UINT64;
185*7c478bd9Sstevel@tonic-gate 
186*7c478bd9Sstevel@tonic-gate /*! [End] no source code translation !*/
187*7c478bd9Sstevel@tonic-gate 
188*7c478bd9Sstevel@tonic-gate typedef INT64                           ACPI_NATIVE_INT;
189*7c478bd9Sstevel@tonic-gate typedef UINT64                          ACPI_NATIVE_UINT;
190*7c478bd9Sstevel@tonic-gate 
191*7c478bd9Sstevel@tonic-gate typedef UINT64                          ACPI_TABLE_PTR;
192*7c478bd9Sstevel@tonic-gate typedef UINT64                          ACPI_IO_ADDRESS;
193*7c478bd9Sstevel@tonic-gate typedef UINT64                          ACPI_PHYSICAL_ADDRESS;
194*7c478bd9Sstevel@tonic-gate typedef UINT64                          ACPI_SIZE;
195*7c478bd9Sstevel@tonic-gate 
196*7c478bd9Sstevel@tonic-gate #define ALIGNED_ADDRESS_BOUNDARY        0x00000008      /* No hardware alignment support in IA64 */
197*7c478bd9Sstevel@tonic-gate #define ACPI_USE_NATIVE_DIVIDE                          /* Native 64-bit integer support */
198*7c478bd9Sstevel@tonic-gate #define ACPI_MAX_PTR                    ACPI_UINT64_MAX
199*7c478bd9Sstevel@tonic-gate #define ACPI_SIZE_MAX                   ACPI_UINT64_MAX
200*7c478bd9Sstevel@tonic-gate 
201*7c478bd9Sstevel@tonic-gate 
202*7c478bd9Sstevel@tonic-gate #elif ACPI_MACHINE_WIDTH == 16
203*7c478bd9Sstevel@tonic-gate 
204*7c478bd9Sstevel@tonic-gate /*! [Begin] no source code translation (keep the typedefs) */
205*7c478bd9Sstevel@tonic-gate 
206*7c478bd9Sstevel@tonic-gate /*
207*7c478bd9Sstevel@tonic-gate  * 16-bit type definitions
208*7c478bd9Sstevel@tonic-gate  */
209*7c478bd9Sstevel@tonic-gate typedef unsigned char                   UINT8;
210*7c478bd9Sstevel@tonic-gate typedef unsigned char                   BOOLEAN;
211*7c478bd9Sstevel@tonic-gate typedef unsigned int                    UINT16;
212*7c478bd9Sstevel@tonic-gate typedef long                            INT32;
213*7c478bd9Sstevel@tonic-gate typedef int                             INT16;
214*7c478bd9Sstevel@tonic-gate typedef unsigned long                   UINT32;
215*7c478bd9Sstevel@tonic-gate 
216*7c478bd9Sstevel@tonic-gate typedef struct
217*7c478bd9Sstevel@tonic-gate {
218*7c478bd9Sstevel@tonic-gate     UINT32                                  Lo;
219*7c478bd9Sstevel@tonic-gate     UINT32                                  Hi;
220*7c478bd9Sstevel@tonic-gate 
221*7c478bd9Sstevel@tonic-gate } UINT64;
222*7c478bd9Sstevel@tonic-gate 
223*7c478bd9Sstevel@tonic-gate /*! [End] no source code translation !*/
224*7c478bd9Sstevel@tonic-gate 
225*7c478bd9Sstevel@tonic-gate typedef UINT16                          ACPI_NATIVE_UINT;
226*7c478bd9Sstevel@tonic-gate typedef INT16                           ACPI_NATIVE_INT;
227*7c478bd9Sstevel@tonic-gate 
228*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_TABLE_PTR;
229*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_IO_ADDRESS;
230*7c478bd9Sstevel@tonic-gate typedef char                            *ACPI_PHYSICAL_ADDRESS;
231*7c478bd9Sstevel@tonic-gate typedef UINT16                          ACPI_SIZE;
232*7c478bd9Sstevel@tonic-gate 
233*7c478bd9Sstevel@tonic-gate #define ALIGNED_ADDRESS_BOUNDARY        0x00000002
234*7c478bd9Sstevel@tonic-gate #define ACPI_MISALIGNED_TRANSFERS
235*7c478bd9Sstevel@tonic-gate #define ACPI_USE_NATIVE_DIVIDE                          /* No 64-bit integers, ok to use native divide */
236*7c478bd9Sstevel@tonic-gate #define ACPI_MAX_PTR                    ACPI_UINT16_MAX
237*7c478bd9Sstevel@tonic-gate #define ACPI_SIZE_MAX                   ACPI_UINT16_MAX
238*7c478bd9Sstevel@tonic-gate 
239*7c478bd9Sstevel@tonic-gate /*
240*7c478bd9Sstevel@tonic-gate  * (16-bit only) internal integers must be 32-bits, so
241*7c478bd9Sstevel@tonic-gate  * 64-bit integers cannot be supported
242*7c478bd9Sstevel@tonic-gate  */
243*7c478bd9Sstevel@tonic-gate #define ACPI_NO_INTEGER64_SUPPORT
244*7c478bd9Sstevel@tonic-gate 
245*7c478bd9Sstevel@tonic-gate 
246*7c478bd9Sstevel@tonic-gate #elif ACPI_MACHINE_WIDTH == 32
247*7c478bd9Sstevel@tonic-gate 
248*7c478bd9Sstevel@tonic-gate /*! [Begin] no source code translation (keep the typedefs) */
249*7c478bd9Sstevel@tonic-gate 
250*7c478bd9Sstevel@tonic-gate /*
251*7c478bd9Sstevel@tonic-gate  * 32-bit type definitions (default)
252*7c478bd9Sstevel@tonic-gate  */
253*7c478bd9Sstevel@tonic-gate typedef unsigned char                   UINT8;
254*7c478bd9Sstevel@tonic-gate typedef unsigned char                   BOOLEAN;
255*7c478bd9Sstevel@tonic-gate typedef unsigned short                  UINT16;
256*7c478bd9Sstevel@tonic-gate typedef int                             INT32;
257*7c478bd9Sstevel@tonic-gate typedef unsigned int                    UINT32;
258*7c478bd9Sstevel@tonic-gate typedef COMPILER_DEPENDENT_INT64        INT64;
259*7c478bd9Sstevel@tonic-gate typedef COMPILER_DEPENDENT_UINT64       UINT64;
260*7c478bd9Sstevel@tonic-gate 
261*7c478bd9Sstevel@tonic-gate /*! [End] no source code translation !*/
262*7c478bd9Sstevel@tonic-gate 
263*7c478bd9Sstevel@tonic-gate typedef INT32                           ACPI_NATIVE_INT;
264*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_NATIVE_UINT;
265*7c478bd9Sstevel@tonic-gate 
266*7c478bd9Sstevel@tonic-gate typedef UINT64                          ACPI_TABLE_PTR;
267*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_IO_ADDRESS;
268*7c478bd9Sstevel@tonic-gate typedef UINT64                          ACPI_PHYSICAL_ADDRESS;
269*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_SIZE;
270*7c478bd9Sstevel@tonic-gate 
271*7c478bd9Sstevel@tonic-gate #define ALIGNED_ADDRESS_BOUNDARY        0x00000004
272*7c478bd9Sstevel@tonic-gate #define ACPI_MISALIGNED_TRANSFERS
273*7c478bd9Sstevel@tonic-gate #define ACPI_MAX_PTR                    ACPI_UINT32_MAX
274*7c478bd9Sstevel@tonic-gate #define ACPI_SIZE_MAX                   ACPI_UINT32_MAX
275*7c478bd9Sstevel@tonic-gate 
276*7c478bd9Sstevel@tonic-gate #else
277*7c478bd9Sstevel@tonic-gate #error unknown ACPI_MACHINE_WIDTH
278*7c478bd9Sstevel@tonic-gate #endif
279*7c478bd9Sstevel@tonic-gate 
280*7c478bd9Sstevel@tonic-gate 
281*7c478bd9Sstevel@tonic-gate /*
282*7c478bd9Sstevel@tonic-gate  * Miscellaneous common types
283*7c478bd9Sstevel@tonic-gate  */
284*7c478bd9Sstevel@tonic-gate typedef UINT16                          UINT16_BIT;
285*7c478bd9Sstevel@tonic-gate typedef UINT32                          UINT32_BIT;
286*7c478bd9Sstevel@tonic-gate typedef ACPI_NATIVE_UINT                ACPI_PTRDIFF;
287*7c478bd9Sstevel@tonic-gate 
288*7c478bd9Sstevel@tonic-gate /*
289*7c478bd9Sstevel@tonic-gate  * Pointer overlays to avoid lots of typecasting for
290*7c478bd9Sstevel@tonic-gate  * code that accepts both physical and logical pointers.
291*7c478bd9Sstevel@tonic-gate  */
292*7c478bd9Sstevel@tonic-gate typedef union acpi_pointers
293*7c478bd9Sstevel@tonic-gate {
294*7c478bd9Sstevel@tonic-gate     ACPI_PHYSICAL_ADDRESS       Physical;
295*7c478bd9Sstevel@tonic-gate     void                        *Logical;
296*7c478bd9Sstevel@tonic-gate     ACPI_TABLE_PTR              Value;
297*7c478bd9Sstevel@tonic-gate 
298*7c478bd9Sstevel@tonic-gate } ACPI_POINTERS;
299*7c478bd9Sstevel@tonic-gate 
300*7c478bd9Sstevel@tonic-gate typedef struct acpi_pointer
301*7c478bd9Sstevel@tonic-gate {
302*7c478bd9Sstevel@tonic-gate     UINT32                      PointerType;
303*7c478bd9Sstevel@tonic-gate     union acpi_pointers         Pointer;
304*7c478bd9Sstevel@tonic-gate 
305*7c478bd9Sstevel@tonic-gate } ACPI_POINTER;
306*7c478bd9Sstevel@tonic-gate 
307*7c478bd9Sstevel@tonic-gate /* PointerTypes for above */
308*7c478bd9Sstevel@tonic-gate 
309*7c478bd9Sstevel@tonic-gate #define ACPI_PHYSICAL_POINTER           0x01
310*7c478bd9Sstevel@tonic-gate #define ACPI_LOGICAL_POINTER            0x02
311*7c478bd9Sstevel@tonic-gate 
312*7c478bd9Sstevel@tonic-gate /* Processor mode */
313*7c478bd9Sstevel@tonic-gate 
314*7c478bd9Sstevel@tonic-gate #define ACPI_PHYSICAL_ADDRESSING        0x04
315*7c478bd9Sstevel@tonic-gate #define ACPI_LOGICAL_ADDRESSING         0x08
316*7c478bd9Sstevel@tonic-gate #define ACPI_MEMORY_MODE                0x0C
317*7c478bd9Sstevel@tonic-gate 
318*7c478bd9Sstevel@tonic-gate #define ACPI_PHYSMODE_PHYSPTR           ACPI_PHYSICAL_ADDRESSING | ACPI_PHYSICAL_POINTER
319*7c478bd9Sstevel@tonic-gate #define ACPI_LOGMODE_PHYSPTR            ACPI_LOGICAL_ADDRESSING  | ACPI_PHYSICAL_POINTER
320*7c478bd9Sstevel@tonic-gate #define ACPI_LOGMODE_LOGPTR             ACPI_LOGICAL_ADDRESSING  | ACPI_LOGICAL_POINTER
321*7c478bd9Sstevel@tonic-gate 
322*7c478bd9Sstevel@tonic-gate 
323*7c478bd9Sstevel@tonic-gate /*
324*7c478bd9Sstevel@tonic-gate  * Useful defines
325*7c478bd9Sstevel@tonic-gate  */
326*7c478bd9Sstevel@tonic-gate #ifdef FALSE
327*7c478bd9Sstevel@tonic-gate #undef FALSE
328*7c478bd9Sstevel@tonic-gate #endif
329*7c478bd9Sstevel@tonic-gate #define FALSE                           (1 == 0)
330*7c478bd9Sstevel@tonic-gate 
331*7c478bd9Sstevel@tonic-gate #ifdef TRUE
332*7c478bd9Sstevel@tonic-gate #undef TRUE
333*7c478bd9Sstevel@tonic-gate #endif
334*7c478bd9Sstevel@tonic-gate #define TRUE                            (1 == 1)
335*7c478bd9Sstevel@tonic-gate 
336*7c478bd9Sstevel@tonic-gate #ifndef NULL
337*7c478bd9Sstevel@tonic-gate #define NULL                            (void *) 0
338*7c478bd9Sstevel@tonic-gate #endif
339*7c478bd9Sstevel@tonic-gate 
340*7c478bd9Sstevel@tonic-gate 
341*7c478bd9Sstevel@tonic-gate /*
342*7c478bd9Sstevel@tonic-gate  * Local datatypes
343*7c478bd9Sstevel@tonic-gate  */
344*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_STATUS;    /* All ACPI Exceptions */
345*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_NAME;      /* 4-byte ACPI name */
346*7c478bd9Sstevel@tonic-gate typedef char *                          ACPI_STRING;    /* Null terminated ASCII string */
347*7c478bd9Sstevel@tonic-gate typedef void *                          ACPI_HANDLE;    /* Actually a ptr to an Node */
348*7c478bd9Sstevel@tonic-gate 
349*7c478bd9Sstevel@tonic-gate typedef struct uint64_struct
350*7c478bd9Sstevel@tonic-gate {
351*7c478bd9Sstevel@tonic-gate     UINT32                      Lo;
352*7c478bd9Sstevel@tonic-gate     UINT32                      Hi;
353*7c478bd9Sstevel@tonic-gate 
354*7c478bd9Sstevel@tonic-gate } UINT64_STRUCT;
355*7c478bd9Sstevel@tonic-gate 
356*7c478bd9Sstevel@tonic-gate typedef union uint64_overlay
357*7c478bd9Sstevel@tonic-gate {
358*7c478bd9Sstevel@tonic-gate     UINT64                      Full;
359*7c478bd9Sstevel@tonic-gate     UINT64_STRUCT               Part;
360*7c478bd9Sstevel@tonic-gate 
361*7c478bd9Sstevel@tonic-gate } UINT64_OVERLAY;
362*7c478bd9Sstevel@tonic-gate 
363*7c478bd9Sstevel@tonic-gate typedef struct uint32_struct
364*7c478bd9Sstevel@tonic-gate {
365*7c478bd9Sstevel@tonic-gate     UINT32                      Lo;
366*7c478bd9Sstevel@tonic-gate     UINT32                      Hi;
367*7c478bd9Sstevel@tonic-gate 
368*7c478bd9Sstevel@tonic-gate } UINT32_STRUCT;
369*7c478bd9Sstevel@tonic-gate 
370*7c478bd9Sstevel@tonic-gate 
371*7c478bd9Sstevel@tonic-gate /*
372*7c478bd9Sstevel@tonic-gate  * Acpi integer width. In ACPI version 1, integers are
373*7c478bd9Sstevel@tonic-gate  * 32 bits.  In ACPI version 2, integers are 64 bits.
374*7c478bd9Sstevel@tonic-gate  * Note that this pertains to the ACPI integer type only, not
375*7c478bd9Sstevel@tonic-gate  * other integers used in the implementation of the ACPI CA
376*7c478bd9Sstevel@tonic-gate  * subsystem.
377*7c478bd9Sstevel@tonic-gate  */
378*7c478bd9Sstevel@tonic-gate #ifdef ACPI_NO_INTEGER64_SUPPORT
379*7c478bd9Sstevel@tonic-gate 
380*7c478bd9Sstevel@tonic-gate /* 32-bit integers only, no 64-bit support */
381*7c478bd9Sstevel@tonic-gate 
382*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_INTEGER;
383*7c478bd9Sstevel@tonic-gate #define ACPI_INTEGER_MAX                ACPI_UINT32_MAX
384*7c478bd9Sstevel@tonic-gate #define ACPI_INTEGER_BIT_SIZE           32
385*7c478bd9Sstevel@tonic-gate #define ACPI_MAX_DECIMAL_DIGITS         10  /* 2^32 = 4,294,967,296 */
386*7c478bd9Sstevel@tonic-gate 
387*7c478bd9Sstevel@tonic-gate #define ACPI_USE_NATIVE_DIVIDE          /* Use compiler native 32-bit divide */
388*7c478bd9Sstevel@tonic-gate 
389*7c478bd9Sstevel@tonic-gate 
390*7c478bd9Sstevel@tonic-gate #else
391*7c478bd9Sstevel@tonic-gate 
392*7c478bd9Sstevel@tonic-gate /* 64-bit integers */
393*7c478bd9Sstevel@tonic-gate 
394*7c478bd9Sstevel@tonic-gate typedef UINT64                          ACPI_INTEGER;
395*7c478bd9Sstevel@tonic-gate #define ACPI_INTEGER_MAX                ACPI_UINT64_MAX
396*7c478bd9Sstevel@tonic-gate #define ACPI_INTEGER_BIT_SIZE           64
397*7c478bd9Sstevel@tonic-gate #define ACPI_MAX_DECIMAL_DIGITS         20  /* 2^64 = 18,446,744,073,709,551,616 */
398*7c478bd9Sstevel@tonic-gate 
399*7c478bd9Sstevel@tonic-gate 
400*7c478bd9Sstevel@tonic-gate #if ACPI_MACHINE_WIDTH == 64
401*7c478bd9Sstevel@tonic-gate #define ACPI_USE_NATIVE_DIVIDE          /* Use compiler native 64-bit divide */
402*7c478bd9Sstevel@tonic-gate #endif
403*7c478bd9Sstevel@tonic-gate #endif
404*7c478bd9Sstevel@tonic-gate 
405*7c478bd9Sstevel@tonic-gate #define ACPI_MAX64_DECIMAL_DIGITS       20
406*7c478bd9Sstevel@tonic-gate #define ACPI_MAX32_DECIMAL_DIGITS       10
407*7c478bd9Sstevel@tonic-gate #define ACPI_MAX16_DECIMAL_DIGITS        5
408*7c478bd9Sstevel@tonic-gate #define ACPI_MAX8_DECIMAL_DIGITS         3
409*7c478bd9Sstevel@tonic-gate 
410*7c478bd9Sstevel@tonic-gate /*
411*7c478bd9Sstevel@tonic-gate  * Constants with special meanings
412*7c478bd9Sstevel@tonic-gate  */
413*7c478bd9Sstevel@tonic-gate #define ACPI_ROOT_OBJECT                (ACPI_HANDLE) ACPI_PTR_ADD (char, NULL, ACPI_MAX_PTR)
414*7c478bd9Sstevel@tonic-gate 
415*7c478bd9Sstevel@tonic-gate 
416*7c478bd9Sstevel@tonic-gate /*
417*7c478bd9Sstevel@tonic-gate  * Initialization sequence
418*7c478bd9Sstevel@tonic-gate  */
419*7c478bd9Sstevel@tonic-gate #define ACPI_FULL_INITIALIZATION        0x00
420*7c478bd9Sstevel@tonic-gate #define ACPI_NO_ADDRESS_SPACE_INIT      0x01
421*7c478bd9Sstevel@tonic-gate #define ACPI_NO_HARDWARE_INIT           0x02
422*7c478bd9Sstevel@tonic-gate #define ACPI_NO_EVENT_INIT              0x04
423*7c478bd9Sstevel@tonic-gate #define ACPI_NO_HANDLER_INIT            0x08
424*7c478bd9Sstevel@tonic-gate #define ACPI_NO_ACPI_ENABLE             0x10
425*7c478bd9Sstevel@tonic-gate #define ACPI_NO_DEVICE_INIT             0x20
426*7c478bd9Sstevel@tonic-gate #define ACPI_NO_OBJECT_INIT             0x40
427*7c478bd9Sstevel@tonic-gate 
428*7c478bd9Sstevel@tonic-gate /*
429*7c478bd9Sstevel@tonic-gate  * Initialization state
430*7c478bd9Sstevel@tonic-gate  */
431*7c478bd9Sstevel@tonic-gate #define ACPI_INITIALIZED_OK             0x01
432*7c478bd9Sstevel@tonic-gate 
433*7c478bd9Sstevel@tonic-gate /*
434*7c478bd9Sstevel@tonic-gate  * Power state values
435*7c478bd9Sstevel@tonic-gate  */
436*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_UNKNOWN              (UINT8) 0xFF
437*7c478bd9Sstevel@tonic-gate 
438*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_S0                   (UINT8) 0
439*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_S1                   (UINT8) 1
440*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_S2                   (UINT8) 2
441*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_S3                   (UINT8) 3
442*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_S4                   (UINT8) 4
443*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_S5                   (UINT8) 5
444*7c478bd9Sstevel@tonic-gate #define ACPI_S_STATES_MAX               ACPI_STATE_S5
445*7c478bd9Sstevel@tonic-gate #define ACPI_S_STATE_COUNT              6
446*7c478bd9Sstevel@tonic-gate 
447*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_D0                   (UINT8) 0
448*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_D1                   (UINT8) 1
449*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_D2                   (UINT8) 2
450*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_D3                   (UINT8) 3
451*7c478bd9Sstevel@tonic-gate #define ACPI_D_STATES_MAX               ACPI_STATE_D3
452*7c478bd9Sstevel@tonic-gate #define ACPI_D_STATE_COUNT              4
453*7c478bd9Sstevel@tonic-gate 
454*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_C0                   (UINT8) 0
455*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_C1                   (UINT8) 1
456*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_C2                   (UINT8) 2
457*7c478bd9Sstevel@tonic-gate #define ACPI_STATE_C3                   (UINT8) 3
458*7c478bd9Sstevel@tonic-gate #define ACPI_C_STATES_MAX               ACPI_STATE_C3
459*7c478bd9Sstevel@tonic-gate #define ACPI_C_STATE_COUNT              4
460*7c478bd9Sstevel@tonic-gate 
461*7c478bd9Sstevel@tonic-gate /*
462*7c478bd9Sstevel@tonic-gate  * Sleep type invalid value
463*7c478bd9Sstevel@tonic-gate  */
464*7c478bd9Sstevel@tonic-gate #define ACPI_SLEEP_TYPE_MAX             0x7
465*7c478bd9Sstevel@tonic-gate #define ACPI_SLEEP_TYPE_INVALID         0xFF
466*7c478bd9Sstevel@tonic-gate 
467*7c478bd9Sstevel@tonic-gate /*
468*7c478bd9Sstevel@tonic-gate  * Standard notify values
469*7c478bd9Sstevel@tonic-gate  */
470*7c478bd9Sstevel@tonic-gate #define ACPI_NOTIFY_BUS_CHECK           (UINT8) 0
471*7c478bd9Sstevel@tonic-gate #define ACPI_NOTIFY_DEVICE_CHECK        (UINT8) 1
472*7c478bd9Sstevel@tonic-gate #define ACPI_NOTIFY_DEVICE_WAKE         (UINT8) 2
473*7c478bd9Sstevel@tonic-gate #define ACPI_NOTIFY_EJECT_REQUEST       (UINT8) 3
474*7c478bd9Sstevel@tonic-gate #define ACPI_NOTIFY_DEVICE_CHECK_LIGHT  (UINT8) 4
475*7c478bd9Sstevel@tonic-gate #define ACPI_NOTIFY_FREQUENCY_MISMATCH  (UINT8) 5
476*7c478bd9Sstevel@tonic-gate #define ACPI_NOTIFY_BUS_MODE_MISMATCH   (UINT8) 6
477*7c478bd9Sstevel@tonic-gate #define ACPI_NOTIFY_POWER_FAULT         (UINT8) 7
478*7c478bd9Sstevel@tonic-gate 
479*7c478bd9Sstevel@tonic-gate /*
480*7c478bd9Sstevel@tonic-gate  *  Table types.  These values are passed to the table related APIs
481*7c478bd9Sstevel@tonic-gate  */
482*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_TABLE_TYPE;
483*7c478bd9Sstevel@tonic-gate 
484*7c478bd9Sstevel@tonic-gate #define ACPI_TABLE_RSDP                 (ACPI_TABLE_TYPE) 0
485*7c478bd9Sstevel@tonic-gate #define ACPI_TABLE_DSDT                 (ACPI_TABLE_TYPE) 1
486*7c478bd9Sstevel@tonic-gate #define ACPI_TABLE_FADT                 (ACPI_TABLE_TYPE) 2
487*7c478bd9Sstevel@tonic-gate #define ACPI_TABLE_FACS                 (ACPI_TABLE_TYPE) 3
488*7c478bd9Sstevel@tonic-gate #define ACPI_TABLE_PSDT                 (ACPI_TABLE_TYPE) 4
489*7c478bd9Sstevel@tonic-gate #define ACPI_TABLE_SSDT                 (ACPI_TABLE_TYPE) 5
490*7c478bd9Sstevel@tonic-gate #define ACPI_TABLE_XSDT                 (ACPI_TABLE_TYPE) 6
491*7c478bd9Sstevel@tonic-gate #define ACPI_TABLE_MAX                  6
492*7c478bd9Sstevel@tonic-gate #define NUM_ACPI_TABLE_TYPES            (ACPI_TABLE_MAX+1)
493*7c478bd9Sstevel@tonic-gate 
494*7c478bd9Sstevel@tonic-gate /*
495*7c478bd9Sstevel@tonic-gate  * Types associated with ACPI names and objects.  The first group of
496*7c478bd9Sstevel@tonic-gate  * values (up to ACPI_TYPE_EXTERNAL_MAX) correspond to the definition
497*7c478bd9Sstevel@tonic-gate  * of the ACPI ObjectType() operator (See the ACPI Spec).  Therefore,
498*7c478bd9Sstevel@tonic-gate  * only add to the first group if the spec changes.
499*7c478bd9Sstevel@tonic-gate  *
500*7c478bd9Sstevel@tonic-gate  * NOTE: Types must be kept in sync with the global AcpiNsProperties
501*7c478bd9Sstevel@tonic-gate  * and AcpiNsTypeNames arrays.
502*7c478bd9Sstevel@tonic-gate  */
503*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_OBJECT_TYPE;
504*7c478bd9Sstevel@tonic-gate 
505*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_ANY                   0x00
506*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_INTEGER               0x01  /* Byte/Word/Dword/Zero/One/Ones */
507*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_STRING                0x02
508*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_BUFFER                0x03
509*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_PACKAGE               0x04  /* ByteConst, multiple DataTerm/Constant/SuperName */
510*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_FIELD_UNIT            0x05
511*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_DEVICE                0x06  /* Name, multiple Node */
512*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_EVENT                 0x07
513*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_METHOD                0x08  /* Name, ByteConst, multiple Code */
514*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_MUTEX                 0x09
515*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_REGION                0x0A
516*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_POWER                 0x0B  /* Name,ByteConst,WordConst,multi Node */
517*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_PROCESSOR             0x0C  /* Name,ByteConst,DWordConst,ByteConst,multi NmO */
518*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_THERMAL               0x0D  /* Name, multiple Node */
519*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_BUFFER_FIELD          0x0E
520*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_DDB_HANDLE            0x0F
521*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_DEBUG_OBJECT          0x10
522*7c478bd9Sstevel@tonic-gate 
523*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_EXTERNAL_MAX          0x10
524*7c478bd9Sstevel@tonic-gate 
525*7c478bd9Sstevel@tonic-gate /*
526*7c478bd9Sstevel@tonic-gate  * These are object types that do not map directly to the ACPI
527*7c478bd9Sstevel@tonic-gate  * ObjectType() operator. They are used for various internal purposes only.
528*7c478bd9Sstevel@tonic-gate  * If new predefined ACPI_TYPEs are added (via the ACPI specification), these
529*7c478bd9Sstevel@tonic-gate  * internal types must move upwards. (There is code that depends on these
530*7c478bd9Sstevel@tonic-gate  * values being contiguous with the external types above.)
531*7c478bd9Sstevel@tonic-gate  */
532*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_REGION_FIELD    0x11
533*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_BANK_FIELD      0x12
534*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_INDEX_FIELD     0x13
535*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_REFERENCE       0x14  /* Arg#, Local#, Name, Debug, RefOf, Index */
536*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_ALIAS           0x15
537*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_METHOD_ALIAS    0x16
538*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_NOTIFY          0x17
539*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_ADDRESS_HANDLER 0x18
540*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_RESOURCE        0x19
541*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_RESOURCE_FIELD  0x1A
542*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_SCOPE           0x1B  /* 1 Name, multiple ObjectList Nodes */
543*7c478bd9Sstevel@tonic-gate 
544*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_NS_NODE_MAX           0x1B  /* Last typecode used within a NS Node */
545*7c478bd9Sstevel@tonic-gate 
546*7c478bd9Sstevel@tonic-gate /*
547*7c478bd9Sstevel@tonic-gate  * These are special object types that never appear in
548*7c478bd9Sstevel@tonic-gate  * a Namespace node, only in an ACPI_OPERAND_OBJECT
549*7c478bd9Sstevel@tonic-gate  */
550*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_EXTRA           0x1C
551*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_DATA            0x1D
552*7c478bd9Sstevel@tonic-gate 
553*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_LOCAL_MAX             0x1D
554*7c478bd9Sstevel@tonic-gate 
555*7c478bd9Sstevel@tonic-gate /* All types above here are invalid */
556*7c478bd9Sstevel@tonic-gate 
557*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_INVALID               0x1E
558*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_NOT_FOUND             0xFF
559*7c478bd9Sstevel@tonic-gate 
560*7c478bd9Sstevel@tonic-gate /*
561*7c478bd9Sstevel@tonic-gate  * Bitmapped ACPI types.  Used internally only
562*7c478bd9Sstevel@tonic-gate  */
563*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_ANY                  0x00000000
564*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_INTEGER              0x00000001
565*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_STRING               0x00000002
566*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_BUFFER               0x00000004
567*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_PACKAGE              0x00000008
568*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_FIELD_UNIT           0x00000010
569*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_DEVICE               0x00000020
570*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_EVENT                0x00000040
571*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_METHOD               0x00000080
572*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_MUTEX                0x00000100
573*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_REGION               0x00000200
574*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_POWER                0x00000400
575*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_PROCESSOR            0x00000800
576*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_THERMAL              0x00001000
577*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_BUFFER_FIELD         0x00002000
578*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_DDB_HANDLE           0x00004000
579*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_DEBUG_OBJECT         0x00008000
580*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_REFERENCE            0x00010000
581*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_RESOURCE             0x00020000
582*7c478bd9Sstevel@tonic-gate 
583*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_COMPUTE_DATA         (ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING | ACPI_BTYPE_BUFFER)
584*7c478bd9Sstevel@tonic-gate 
585*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_DATA                 (ACPI_BTYPE_COMPUTE_DATA  | ACPI_BTYPE_PACKAGE)
586*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_DATA_REFERENCE       (ACPI_BTYPE_DATA | ACPI_BTYPE_REFERENCE | ACPI_BTYPE_DDB_HANDLE)
587*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_DEVICE_OBJECTS       (ACPI_BTYPE_DEVICE | ACPI_BTYPE_THERMAL | ACPI_BTYPE_PROCESSOR)
588*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_OBJECTS_AND_REFS     0x0001FFFF  /* ARG or LOCAL */
589*7c478bd9Sstevel@tonic-gate #define ACPI_BTYPE_ALL_OBJECTS          0x0000FFFF
590*7c478bd9Sstevel@tonic-gate 
591*7c478bd9Sstevel@tonic-gate /*
592*7c478bd9Sstevel@tonic-gate  * All I/O
593*7c478bd9Sstevel@tonic-gate  */
594*7c478bd9Sstevel@tonic-gate #define ACPI_READ                       0
595*7c478bd9Sstevel@tonic-gate #define ACPI_WRITE                      1
596*7c478bd9Sstevel@tonic-gate #define ACPI_IO_MASK                    1
597*7c478bd9Sstevel@tonic-gate 
598*7c478bd9Sstevel@tonic-gate /*
599*7c478bd9Sstevel@tonic-gate  * Event Types: Fixed & General Purpose
600*7c478bd9Sstevel@tonic-gate  */
601*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_EVENT_TYPE;
602*7c478bd9Sstevel@tonic-gate 
603*7c478bd9Sstevel@tonic-gate /*
604*7c478bd9Sstevel@tonic-gate  * Fixed events
605*7c478bd9Sstevel@tonic-gate  */
606*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_PMTIMER              0
607*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_GLOBAL               1
608*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_POWER_BUTTON         2
609*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_SLEEP_BUTTON         3
610*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_RTC                  4
611*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_MAX                  4
612*7c478bd9Sstevel@tonic-gate #define ACPI_NUM_FIXED_EVENTS           ACPI_EVENT_MAX + 1
613*7c478bd9Sstevel@tonic-gate 
614*7c478bd9Sstevel@tonic-gate /*
615*7c478bd9Sstevel@tonic-gate  * Event Status - Per event
616*7c478bd9Sstevel@tonic-gate  * -------------
617*7c478bd9Sstevel@tonic-gate  * The encoding of ACPI_EVENT_STATUS is illustrated below.
618*7c478bd9Sstevel@tonic-gate  * Note that a set bit (1) indicates the property is TRUE
619*7c478bd9Sstevel@tonic-gate  * (e.g. if bit 0 is set then the event is enabled).
620*7c478bd9Sstevel@tonic-gate  * +-------------+-+-+-+
621*7c478bd9Sstevel@tonic-gate  * |   Bits 31:3 |2|1|0|
622*7c478bd9Sstevel@tonic-gate  * +-------------+-+-+-+
623*7c478bd9Sstevel@tonic-gate  *          |     | | |
624*7c478bd9Sstevel@tonic-gate  *          |     | | +- Enabled?
625*7c478bd9Sstevel@tonic-gate  *          |     | +--- Enabled for wake?
626*7c478bd9Sstevel@tonic-gate  *          |     +----- Set?
627*7c478bd9Sstevel@tonic-gate  *          +----------- <Reserved>
628*7c478bd9Sstevel@tonic-gate  */
629*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_EVENT_STATUS;
630*7c478bd9Sstevel@tonic-gate 
631*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_FLAG_DISABLED        (ACPI_EVENT_STATUS) 0x00
632*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_FLAG_ENABLED         (ACPI_EVENT_STATUS) 0x01
633*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_FLAG_WAKE_ENABLED    (ACPI_EVENT_STATUS) 0x02
634*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_FLAG_SET             (ACPI_EVENT_STATUS) 0x04
635*7c478bd9Sstevel@tonic-gate 
636*7c478bd9Sstevel@tonic-gate /*
637*7c478bd9Sstevel@tonic-gate  * General Purpose Events (GPE)
638*7c478bd9Sstevel@tonic-gate  */
639*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_INVALID                0xFF
640*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_MAX                    0xFF
641*7c478bd9Sstevel@tonic-gate #define ACPI_NUM_GPE                    256
642*7c478bd9Sstevel@tonic-gate 
643*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_ENABLE                 0
644*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_DISABLE                1
645*7c478bd9Sstevel@tonic-gate 
646*7c478bd9Sstevel@tonic-gate 
647*7c478bd9Sstevel@tonic-gate /*
648*7c478bd9Sstevel@tonic-gate  * GPE info flags - Per GPE
649*7c478bd9Sstevel@tonic-gate  * +-+-+-+---+---+-+
650*7c478bd9Sstevel@tonic-gate  * |7|6|5|4:3|2:1|0|
651*7c478bd9Sstevel@tonic-gate  * +-+-+-+---+---+-+
652*7c478bd9Sstevel@tonic-gate  *  | | |  |   |  |
653*7c478bd9Sstevel@tonic-gate  *  | | |  |   |  +--- Interrupt type: Edge or Level Triggered
654*7c478bd9Sstevel@tonic-gate  *  | | |  |   +--- Type: Wake-only, Runtime-only, or wake/runtime
655*7c478bd9Sstevel@tonic-gate  *  | | |  +--- Type of dispatch -- to method, handler, or none
656*7c478bd9Sstevel@tonic-gate  *  | | +--- Enabled for runtime?
657*7c478bd9Sstevel@tonic-gate  *  | +--- Enabled for wake?
658*7c478bd9Sstevel@tonic-gate  *  +--- System state when GPE ocurred (running/waking)
659*7c478bd9Sstevel@tonic-gate  */
660*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_XRUPT_TYPE_MASK        (UINT8) 0x01
661*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_LEVEL_TRIGGERED        (UINT8) 0x01
662*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_EDGE_TRIGGERED         (UINT8) 0x00
663*7c478bd9Sstevel@tonic-gate 
664*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_TYPE_MASK              (UINT8) 0x06
665*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_TYPE_WAKE_RUN          (UINT8) 0x06
666*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_TYPE_WAKE              (UINT8) 0x02
667*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_TYPE_RUNTIME           (UINT8) 0x04    /* Default */
668*7c478bd9Sstevel@tonic-gate 
669*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_DISPATCH_MASK          (UINT8) 0x18
670*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_DISPATCH_HANDLER       (UINT8) 0x08
671*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_DISPATCH_METHOD        (UINT8) 0x10
672*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_DISPATCH_NOT_USED      (UINT8) 0x00    /* Default */
673*7c478bd9Sstevel@tonic-gate 
674*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_RUN_ENABLE_MASK        (UINT8) 0x20
675*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_RUN_ENABLED            (UINT8) 0x20
676*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_RUN_DISABLED           (UINT8) 0x00    /* Default */
677*7c478bd9Sstevel@tonic-gate 
678*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_WAKE_ENABLE_MASK       (UINT8) 0x40
679*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_WAKE_ENABLED           (UINT8) 0x40
680*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_WAKE_DISABLED          (UINT8) 0x00    /* Default */
681*7c478bd9Sstevel@tonic-gate 
682*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_ENABLE_MASK            (UINT8) 0x60    /* Both run/wake */
683*7c478bd9Sstevel@tonic-gate 
684*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_SYSTEM_MASK            (UINT8) 0x80
685*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_SYSTEM_RUNNING         (UINT8) 0x80
686*7c478bd9Sstevel@tonic-gate #define ACPI_GPE_SYSTEM_WAKING          (UINT8) 0x00
687*7c478bd9Sstevel@tonic-gate 
688*7c478bd9Sstevel@tonic-gate /*
689*7c478bd9Sstevel@tonic-gate  * Flags for GPE and Lock interfaces
690*7c478bd9Sstevel@tonic-gate  */
691*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_WAKE_ENABLE          0x2             /* AcpiGpeEnable */
692*7c478bd9Sstevel@tonic-gate #define ACPI_EVENT_WAKE_DISABLE         0x2             /* AcpiGpeDisable */
693*7c478bd9Sstevel@tonic-gate 
694*7c478bd9Sstevel@tonic-gate #define ACPI_NOT_ISR                    0x1
695*7c478bd9Sstevel@tonic-gate #define ACPI_ISR                        0x0
696*7c478bd9Sstevel@tonic-gate 
697*7c478bd9Sstevel@tonic-gate 
698*7c478bd9Sstevel@tonic-gate /* Notify types */
699*7c478bd9Sstevel@tonic-gate 
700*7c478bd9Sstevel@tonic-gate #define ACPI_SYSTEM_NOTIFY              0x1
701*7c478bd9Sstevel@tonic-gate #define ACPI_DEVICE_NOTIFY              0x2
702*7c478bd9Sstevel@tonic-gate #define ACPI_ALL_NOTIFY                 0x3
703*7c478bd9Sstevel@tonic-gate #define ACPI_MAX_NOTIFY_HANDLER_TYPE    0x3
704*7c478bd9Sstevel@tonic-gate 
705*7c478bd9Sstevel@tonic-gate #define ACPI_MAX_SYS_NOTIFY             0x7f
706*7c478bd9Sstevel@tonic-gate 
707*7c478bd9Sstevel@tonic-gate 
708*7c478bd9Sstevel@tonic-gate /* Address Space (Operation Region) Types */
709*7c478bd9Sstevel@tonic-gate 
710*7c478bd9Sstevel@tonic-gate typedef UINT8                           ACPI_ADR_SPACE_TYPE;
711*7c478bd9Sstevel@tonic-gate 
712*7c478bd9Sstevel@tonic-gate #define ACPI_ADR_SPACE_SYSTEM_MEMORY    (ACPI_ADR_SPACE_TYPE) 0
713*7c478bd9Sstevel@tonic-gate #define ACPI_ADR_SPACE_SYSTEM_IO        (ACPI_ADR_SPACE_TYPE) 1
714*7c478bd9Sstevel@tonic-gate #define ACPI_ADR_SPACE_PCI_CONFIG       (ACPI_ADR_SPACE_TYPE) 2
715*7c478bd9Sstevel@tonic-gate #define ACPI_ADR_SPACE_EC               (ACPI_ADR_SPACE_TYPE) 3
716*7c478bd9Sstevel@tonic-gate #define ACPI_ADR_SPACE_SMBUS            (ACPI_ADR_SPACE_TYPE) 4
717*7c478bd9Sstevel@tonic-gate #define ACPI_ADR_SPACE_CMOS             (ACPI_ADR_SPACE_TYPE) 5
718*7c478bd9Sstevel@tonic-gate #define ACPI_ADR_SPACE_PCI_BAR_TARGET   (ACPI_ADR_SPACE_TYPE) 6
719*7c478bd9Sstevel@tonic-gate #define ACPI_ADR_SPACE_DATA_TABLE       (ACPI_ADR_SPACE_TYPE) 7
720*7c478bd9Sstevel@tonic-gate #define ACPI_ADR_SPACE_FIXED_HARDWARE   (ACPI_ADR_SPACE_TYPE) 127
721*7c478bd9Sstevel@tonic-gate 
722*7c478bd9Sstevel@tonic-gate 
723*7c478bd9Sstevel@tonic-gate /*
724*7c478bd9Sstevel@tonic-gate  * BitRegister IDs
725*7c478bd9Sstevel@tonic-gate  * These are bitfields defined within the full ACPI registers
726*7c478bd9Sstevel@tonic-gate  */
727*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_TIMER_STATUS                0x00
728*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_BUS_MASTER_STATUS           0x01
729*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_GLOBAL_LOCK_STATUS          0x02
730*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_POWER_BUTTON_STATUS         0x03
731*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_SLEEP_BUTTON_STATUS         0x04
732*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_RT_CLOCK_STATUS             0x05
733*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_WAKE_STATUS                 0x06
734*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_PCIEXP_WAKE_STATUS          0x07
735*7c478bd9Sstevel@tonic-gate 
736*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_TIMER_ENABLE                0x08
737*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_GLOBAL_LOCK_ENABLE          0x09
738*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_POWER_BUTTON_ENABLE         0x0A
739*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_SLEEP_BUTTON_ENABLE         0x0B
740*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_RT_CLOCK_ENABLE             0x0C
741*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_WAKE_ENABLE                 0x0D
742*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_PCIEXP_WAKE_DISABLE         0x0E
743*7c478bd9Sstevel@tonic-gate 
744*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_SCI_ENABLE                  0x0F
745*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_BUS_MASTER_RLD              0x10
746*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_GLOBAL_LOCK_RELEASE         0x11
747*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_SLEEP_TYPE_A                0x12
748*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_SLEEP_TYPE_B                0x13
749*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_SLEEP_ENABLE                0x14
750*7c478bd9Sstevel@tonic-gate 
751*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_ARB_DISABLE                 0x15
752*7c478bd9Sstevel@tonic-gate 
753*7c478bd9Sstevel@tonic-gate #define ACPI_BITREG_MAX                         0x15
754*7c478bd9Sstevel@tonic-gate #define ACPI_NUM_BITREG                         ACPI_BITREG_MAX + 1
755*7c478bd9Sstevel@tonic-gate 
756*7c478bd9Sstevel@tonic-gate 
757*7c478bd9Sstevel@tonic-gate /*
758*7c478bd9Sstevel@tonic-gate  * External ACPI object definition
759*7c478bd9Sstevel@tonic-gate  */
760*7c478bd9Sstevel@tonic-gate typedef union acpi_object
761*7c478bd9Sstevel@tonic-gate {
762*7c478bd9Sstevel@tonic-gate     ACPI_OBJECT_TYPE            Type;   /* See definition of AcpiNsType for values */
763*7c478bd9Sstevel@tonic-gate     struct
764*7c478bd9Sstevel@tonic-gate     {
765*7c478bd9Sstevel@tonic-gate         ACPI_OBJECT_TYPE            Type;
766*7c478bd9Sstevel@tonic-gate         ACPI_INTEGER                Value;      /* The actual number */
767*7c478bd9Sstevel@tonic-gate     } Integer;
768*7c478bd9Sstevel@tonic-gate 
769*7c478bd9Sstevel@tonic-gate     struct
770*7c478bd9Sstevel@tonic-gate     {
771*7c478bd9Sstevel@tonic-gate         ACPI_OBJECT_TYPE            Type;
772*7c478bd9Sstevel@tonic-gate         UINT32                      Length;     /* # of bytes in string, excluding trailing null */
773*7c478bd9Sstevel@tonic-gate         char                        *Pointer;   /* points to the string value */
774*7c478bd9Sstevel@tonic-gate     } String;
775*7c478bd9Sstevel@tonic-gate 
776*7c478bd9Sstevel@tonic-gate     struct
777*7c478bd9Sstevel@tonic-gate     {
778*7c478bd9Sstevel@tonic-gate         ACPI_OBJECT_TYPE            Type;
779*7c478bd9Sstevel@tonic-gate         UINT32                      Length;     /* # of bytes in buffer */
780*7c478bd9Sstevel@tonic-gate         UINT8                       *Pointer;   /* points to the buffer */
781*7c478bd9Sstevel@tonic-gate     } Buffer;
782*7c478bd9Sstevel@tonic-gate 
783*7c478bd9Sstevel@tonic-gate     struct
784*7c478bd9Sstevel@tonic-gate     {
785*7c478bd9Sstevel@tonic-gate         ACPI_OBJECT_TYPE            Type;
786*7c478bd9Sstevel@tonic-gate         UINT32                      Fill1;
787*7c478bd9Sstevel@tonic-gate         ACPI_HANDLE                 Handle;     /* object reference */
788*7c478bd9Sstevel@tonic-gate     } Reference;
789*7c478bd9Sstevel@tonic-gate 
790*7c478bd9Sstevel@tonic-gate     struct
791*7c478bd9Sstevel@tonic-gate     {
792*7c478bd9Sstevel@tonic-gate         ACPI_OBJECT_TYPE            Type;
793*7c478bd9Sstevel@tonic-gate         UINT32                      Count;      /* # of elements in package */
794*7c478bd9Sstevel@tonic-gate         union acpi_object           *Elements;  /* Pointer to an array of ACPI_OBJECTs */
795*7c478bd9Sstevel@tonic-gate     } Package;
796*7c478bd9Sstevel@tonic-gate 
797*7c478bd9Sstevel@tonic-gate     struct
798*7c478bd9Sstevel@tonic-gate     {
799*7c478bd9Sstevel@tonic-gate         ACPI_OBJECT_TYPE            Type;
800*7c478bd9Sstevel@tonic-gate         UINT32                      ProcId;
801*7c478bd9Sstevel@tonic-gate         ACPI_IO_ADDRESS             PblkAddress;
802*7c478bd9Sstevel@tonic-gate         UINT32                      PblkLength;
803*7c478bd9Sstevel@tonic-gate     } Processor;
804*7c478bd9Sstevel@tonic-gate 
805*7c478bd9Sstevel@tonic-gate     struct
806*7c478bd9Sstevel@tonic-gate     {
807*7c478bd9Sstevel@tonic-gate         ACPI_OBJECT_TYPE            Type;
808*7c478bd9Sstevel@tonic-gate         UINT32                      SystemLevel;
809*7c478bd9Sstevel@tonic-gate         UINT32                      ResourceOrder;
810*7c478bd9Sstevel@tonic-gate     } PowerResource;
811*7c478bd9Sstevel@tonic-gate 
812*7c478bd9Sstevel@tonic-gate } ACPI_OBJECT;
813*7c478bd9Sstevel@tonic-gate 
814*7c478bd9Sstevel@tonic-gate 
815*7c478bd9Sstevel@tonic-gate /*
816*7c478bd9Sstevel@tonic-gate  * List of objects, used as a parameter list for control method evaluation
817*7c478bd9Sstevel@tonic-gate  */
818*7c478bd9Sstevel@tonic-gate typedef struct acpi_object_list
819*7c478bd9Sstevel@tonic-gate {
820*7c478bd9Sstevel@tonic-gate     UINT32                      Count;
821*7c478bd9Sstevel@tonic-gate     ACPI_OBJECT                 *Pointer;
822*7c478bd9Sstevel@tonic-gate 
823*7c478bd9Sstevel@tonic-gate } ACPI_OBJECT_LIST;
824*7c478bd9Sstevel@tonic-gate 
825*7c478bd9Sstevel@tonic-gate 
826*7c478bd9Sstevel@tonic-gate /*
827*7c478bd9Sstevel@tonic-gate  * Miscellaneous common Data Structures used by the interfaces
828*7c478bd9Sstevel@tonic-gate  */
829*7c478bd9Sstevel@tonic-gate #define ACPI_NO_BUFFER              0
830*7c478bd9Sstevel@tonic-gate #define ACPI_ALLOCATE_BUFFER        (ACPI_SIZE) (-1)
831*7c478bd9Sstevel@tonic-gate #define ACPI_ALLOCATE_LOCAL_BUFFER  (ACPI_SIZE) (-2)
832*7c478bd9Sstevel@tonic-gate 
833*7c478bd9Sstevel@tonic-gate typedef struct acpi_buffer
834*7c478bd9Sstevel@tonic-gate {
835*7c478bd9Sstevel@tonic-gate     ACPI_SIZE                   Length;         /* Length in bytes of the buffer */
836*7c478bd9Sstevel@tonic-gate     void                        *Pointer;       /* pointer to buffer */
837*7c478bd9Sstevel@tonic-gate 
838*7c478bd9Sstevel@tonic-gate } ACPI_BUFFER;
839*7c478bd9Sstevel@tonic-gate 
840*7c478bd9Sstevel@tonic-gate 
841*7c478bd9Sstevel@tonic-gate /*
842*7c478bd9Sstevel@tonic-gate  * NameType for AcpiGetName
843*7c478bd9Sstevel@tonic-gate  */
844*7c478bd9Sstevel@tonic-gate #define ACPI_FULL_PATHNAME              0
845*7c478bd9Sstevel@tonic-gate #define ACPI_SINGLE_NAME                1
846*7c478bd9Sstevel@tonic-gate #define ACPI_NAME_TYPE_MAX              1
847*7c478bd9Sstevel@tonic-gate 
848*7c478bd9Sstevel@tonic-gate 
849*7c478bd9Sstevel@tonic-gate /*
850*7c478bd9Sstevel@tonic-gate  * Structure and flags for AcpiGetSystemInfo
851*7c478bd9Sstevel@tonic-gate  */
852*7c478bd9Sstevel@tonic-gate #define ACPI_SYS_MODE_UNKNOWN           0x0000
853*7c478bd9Sstevel@tonic-gate #define ACPI_SYS_MODE_ACPI              0x0001
854*7c478bd9Sstevel@tonic-gate #define ACPI_SYS_MODE_LEGACY            0x0002
855*7c478bd9Sstevel@tonic-gate #define ACPI_SYS_MODES_MASK             0x0003
856*7c478bd9Sstevel@tonic-gate 
857*7c478bd9Sstevel@tonic-gate 
858*7c478bd9Sstevel@tonic-gate /*
859*7c478bd9Sstevel@tonic-gate  * ACPI Table Info.  One per ACPI table _type_
860*7c478bd9Sstevel@tonic-gate  */
861*7c478bd9Sstevel@tonic-gate typedef struct acpi_table_info
862*7c478bd9Sstevel@tonic-gate {
863*7c478bd9Sstevel@tonic-gate     UINT32                      Count;
864*7c478bd9Sstevel@tonic-gate 
865*7c478bd9Sstevel@tonic-gate } ACPI_TABLE_INFO;
866*7c478bd9Sstevel@tonic-gate 
867*7c478bd9Sstevel@tonic-gate 
868*7c478bd9Sstevel@tonic-gate /*
869*7c478bd9Sstevel@tonic-gate  * System info returned by AcpiGetSystemInfo()
870*7c478bd9Sstevel@tonic-gate  */
871*7c478bd9Sstevel@tonic-gate typedef struct acpi_system_info
872*7c478bd9Sstevel@tonic-gate {
873*7c478bd9Sstevel@tonic-gate     UINT32                      AcpiCaVersion;
874*7c478bd9Sstevel@tonic-gate     UINT32                      Flags;
875*7c478bd9Sstevel@tonic-gate     UINT32                      TimerResolution;
876*7c478bd9Sstevel@tonic-gate     UINT32                      Reserved1;
877*7c478bd9Sstevel@tonic-gate     UINT32                      Reserved2;
878*7c478bd9Sstevel@tonic-gate     UINT32                      DebugLevel;
879*7c478bd9Sstevel@tonic-gate     UINT32                      DebugLayer;
880*7c478bd9Sstevel@tonic-gate     UINT32                      NumTableTypes;
881*7c478bd9Sstevel@tonic-gate     ACPI_TABLE_INFO             TableInfo [NUM_ACPI_TABLE_TYPES];
882*7c478bd9Sstevel@tonic-gate 
883*7c478bd9Sstevel@tonic-gate } ACPI_SYSTEM_INFO;
884*7c478bd9Sstevel@tonic-gate 
885*7c478bd9Sstevel@tonic-gate 
886*7c478bd9Sstevel@tonic-gate /*
887*7c478bd9Sstevel@tonic-gate  * Types specific to the OS service interfaces
888*7c478bd9Sstevel@tonic-gate  */
889*7c478bd9Sstevel@tonic-gate typedef UINT32
890*7c478bd9Sstevel@tonic-gate (ACPI_SYSTEM_XFACE *ACPI_OSD_HANDLER) (
891*7c478bd9Sstevel@tonic-gate     void                    *Context);
892*7c478bd9Sstevel@tonic-gate 
893*7c478bd9Sstevel@tonic-gate typedef void
894*7c478bd9Sstevel@tonic-gate (ACPI_SYSTEM_XFACE *ACPI_OSD_EXEC_CALLBACK) (
895*7c478bd9Sstevel@tonic-gate     void                    *Context);
896*7c478bd9Sstevel@tonic-gate 
897*7c478bd9Sstevel@tonic-gate /*
898*7c478bd9Sstevel@tonic-gate  * Various handlers and callback procedures
899*7c478bd9Sstevel@tonic-gate  */
900*7c478bd9Sstevel@tonic-gate typedef
901*7c478bd9Sstevel@tonic-gate UINT32 (*ACPI_EVENT_HANDLER) (
902*7c478bd9Sstevel@tonic-gate     void                        *Context);
903*7c478bd9Sstevel@tonic-gate 
904*7c478bd9Sstevel@tonic-gate typedef
905*7c478bd9Sstevel@tonic-gate void (*ACPI_NOTIFY_HANDLER) (
906*7c478bd9Sstevel@tonic-gate     ACPI_HANDLE                 Device,
907*7c478bd9Sstevel@tonic-gate     UINT32                      Value,
908*7c478bd9Sstevel@tonic-gate     void                        *Context);
909*7c478bd9Sstevel@tonic-gate 
910*7c478bd9Sstevel@tonic-gate typedef
911*7c478bd9Sstevel@tonic-gate void (*ACPI_OBJECT_HANDLER) (
912*7c478bd9Sstevel@tonic-gate     ACPI_HANDLE                 Object,
913*7c478bd9Sstevel@tonic-gate     UINT32                      Function,
914*7c478bd9Sstevel@tonic-gate     void                        *Data);
915*7c478bd9Sstevel@tonic-gate 
916*7c478bd9Sstevel@tonic-gate typedef
917*7c478bd9Sstevel@tonic-gate ACPI_STATUS (*ACPI_INIT_HANDLER) (
918*7c478bd9Sstevel@tonic-gate     ACPI_HANDLE                 Object,
919*7c478bd9Sstevel@tonic-gate     UINT32                      Function);
920*7c478bd9Sstevel@tonic-gate 
921*7c478bd9Sstevel@tonic-gate #define ACPI_INIT_DEVICE_INI        1
922*7c478bd9Sstevel@tonic-gate 
923*7c478bd9Sstevel@tonic-gate typedef
924*7c478bd9Sstevel@tonic-gate ACPI_STATUS (*ACPI_EXCEPTION_HANDLER) (
925*7c478bd9Sstevel@tonic-gate     ACPI_STATUS             AmlStatus,
926*7c478bd9Sstevel@tonic-gate     ACPI_NAME               Name,
927*7c478bd9Sstevel@tonic-gate     UINT16                  Opcode,
928*7c478bd9Sstevel@tonic-gate     UINT32                  AmlOffset,
929*7c478bd9Sstevel@tonic-gate     void                    *Context);
930*7c478bd9Sstevel@tonic-gate 
931*7c478bd9Sstevel@tonic-gate 
932*7c478bd9Sstevel@tonic-gate /* Address Spaces (For Operation Regions) */
933*7c478bd9Sstevel@tonic-gate 
934*7c478bd9Sstevel@tonic-gate typedef
935*7c478bd9Sstevel@tonic-gate ACPI_STATUS (*ACPI_ADR_SPACE_HANDLER) (
936*7c478bd9Sstevel@tonic-gate     UINT32                      Function,
937*7c478bd9Sstevel@tonic-gate     ACPI_PHYSICAL_ADDRESS       Address,
938*7c478bd9Sstevel@tonic-gate     UINT32                      BitWidth,
939*7c478bd9Sstevel@tonic-gate     ACPI_INTEGER                *Value,
940*7c478bd9Sstevel@tonic-gate     void                        *HandlerContext,
941*7c478bd9Sstevel@tonic-gate     void                        *RegionContext);
942*7c478bd9Sstevel@tonic-gate 
943*7c478bd9Sstevel@tonic-gate #define ACPI_DEFAULT_HANDLER        NULL
944*7c478bd9Sstevel@tonic-gate 
945*7c478bd9Sstevel@tonic-gate 
946*7c478bd9Sstevel@tonic-gate typedef
947*7c478bd9Sstevel@tonic-gate ACPI_STATUS (*ACPI_ADR_SPACE_SETUP) (
948*7c478bd9Sstevel@tonic-gate     ACPI_HANDLE                 RegionHandle,
949*7c478bd9Sstevel@tonic-gate     UINT32                      Function,
950*7c478bd9Sstevel@tonic-gate     void                        *HandlerContext,
951*7c478bd9Sstevel@tonic-gate     void                        **RegionContext);
952*7c478bd9Sstevel@tonic-gate 
953*7c478bd9Sstevel@tonic-gate #define ACPI_REGION_ACTIVATE    0
954*7c478bd9Sstevel@tonic-gate #define ACPI_REGION_DEACTIVATE  1
955*7c478bd9Sstevel@tonic-gate 
956*7c478bd9Sstevel@tonic-gate typedef
957*7c478bd9Sstevel@tonic-gate ACPI_STATUS (*ACPI_WALK_CALLBACK) (
958*7c478bd9Sstevel@tonic-gate     ACPI_HANDLE                 ObjHandle,
959*7c478bd9Sstevel@tonic-gate     UINT32                      NestingLevel,
960*7c478bd9Sstevel@tonic-gate     void                        *Context,
961*7c478bd9Sstevel@tonic-gate     void                        **ReturnValue);
962*7c478bd9Sstevel@tonic-gate 
963*7c478bd9Sstevel@tonic-gate 
964*7c478bd9Sstevel@tonic-gate /* Interrupt handler return values */
965*7c478bd9Sstevel@tonic-gate 
966*7c478bd9Sstevel@tonic-gate #define ACPI_INTERRUPT_NOT_HANDLED      0x00
967*7c478bd9Sstevel@tonic-gate #define ACPI_INTERRUPT_HANDLED          0x01
968*7c478bd9Sstevel@tonic-gate 
969*7c478bd9Sstevel@tonic-gate 
970*7c478bd9Sstevel@tonic-gate /* Common string version of device HIDs and UIDs */
971*7c478bd9Sstevel@tonic-gate 
972*7c478bd9Sstevel@tonic-gate typedef struct acpi_device_id
973*7c478bd9Sstevel@tonic-gate {
974*7c478bd9Sstevel@tonic-gate     char                    Value[ACPI_DEVICE_ID_LENGTH];
975*7c478bd9Sstevel@tonic-gate 
976*7c478bd9Sstevel@tonic-gate } ACPI_DEVICE_ID;
977*7c478bd9Sstevel@tonic-gate 
978*7c478bd9Sstevel@tonic-gate /* Common string version of device CIDs */
979*7c478bd9Sstevel@tonic-gate 
980*7c478bd9Sstevel@tonic-gate typedef struct acpi_compatible_id
981*7c478bd9Sstevel@tonic-gate {
982*7c478bd9Sstevel@tonic-gate     char                    Value[ACPI_MAX_CID_LENGTH];
983*7c478bd9Sstevel@tonic-gate 
984*7c478bd9Sstevel@tonic-gate } ACPI_COMPATIBLE_ID;
985*7c478bd9Sstevel@tonic-gate 
986*7c478bd9Sstevel@tonic-gate typedef struct acpi_compatible_id_list
987*7c478bd9Sstevel@tonic-gate {
988*7c478bd9Sstevel@tonic-gate     UINT32                  Count;
989*7c478bd9Sstevel@tonic-gate     UINT32                  Size;
990*7c478bd9Sstevel@tonic-gate     ACPI_COMPATIBLE_ID      Id[1];
991*7c478bd9Sstevel@tonic-gate 
992*7c478bd9Sstevel@tonic-gate } ACPI_COMPATIBLE_ID_LIST;
993*7c478bd9Sstevel@tonic-gate 
994*7c478bd9Sstevel@tonic-gate 
995*7c478bd9Sstevel@tonic-gate /* Structure and flags for AcpiGetObjectInfo */
996*7c478bd9Sstevel@tonic-gate 
997*7c478bd9Sstevel@tonic-gate #define ACPI_VALID_STA                  0x0001
998*7c478bd9Sstevel@tonic-gate #define ACPI_VALID_ADR                  0x0002
999*7c478bd9Sstevel@tonic-gate #define ACPI_VALID_HID                  0x0004
1000*7c478bd9Sstevel@tonic-gate #define ACPI_VALID_UID                  0x0008
1001*7c478bd9Sstevel@tonic-gate #define ACPI_VALID_CID                  0x0010
1002*7c478bd9Sstevel@tonic-gate #define ACPI_VALID_SXDS                 0x0020
1003*7c478bd9Sstevel@tonic-gate 
1004*7c478bd9Sstevel@tonic-gate 
1005*7c478bd9Sstevel@tonic-gate #define ACPI_COMMON_OBJ_INFO \
1006*7c478bd9Sstevel@tonic-gate     ACPI_OBJECT_TYPE            Type;           /* ACPI object type */ \
1007*7c478bd9Sstevel@tonic-gate     ACPI_NAME                   Name            /* ACPI object Name */
1008*7c478bd9Sstevel@tonic-gate 
1009*7c478bd9Sstevel@tonic-gate 
1010*7c478bd9Sstevel@tonic-gate typedef struct acpi_obj_info_header
1011*7c478bd9Sstevel@tonic-gate {
1012*7c478bd9Sstevel@tonic-gate     ACPI_COMMON_OBJ_INFO;
1013*7c478bd9Sstevel@tonic-gate 
1014*7c478bd9Sstevel@tonic-gate } ACPI_OBJ_INFO_HEADER;
1015*7c478bd9Sstevel@tonic-gate 
1016*7c478bd9Sstevel@tonic-gate 
1017*7c478bd9Sstevel@tonic-gate /* Structure returned from Get Object Info */
1018*7c478bd9Sstevel@tonic-gate 
1019*7c478bd9Sstevel@tonic-gate typedef struct acpi_device_info
1020*7c478bd9Sstevel@tonic-gate {
1021*7c478bd9Sstevel@tonic-gate     ACPI_COMMON_OBJ_INFO;
1022*7c478bd9Sstevel@tonic-gate 
1023*7c478bd9Sstevel@tonic-gate     UINT32                      Valid;              /* Indicates which fields below are valid */
1024*7c478bd9Sstevel@tonic-gate     UINT32                      CurrentStatus;      /* _STA value */
1025*7c478bd9Sstevel@tonic-gate     ACPI_INTEGER                Address;            /* _ADR value if any */
1026*7c478bd9Sstevel@tonic-gate     ACPI_DEVICE_ID              HardwareId;         /* _HID value if any */
1027*7c478bd9Sstevel@tonic-gate     ACPI_DEVICE_ID              UniqueId;           /* _UID value if any */
1028*7c478bd9Sstevel@tonic-gate     UINT8                       HighestDstates[4];  /* _SxD values: 0xFF indicates not valid */
1029*7c478bd9Sstevel@tonic-gate     ACPI_COMPATIBLE_ID_LIST     CompatibilityId;    /* List of _CIDs if any */
1030*7c478bd9Sstevel@tonic-gate 
1031*7c478bd9Sstevel@tonic-gate } ACPI_DEVICE_INFO;
1032*7c478bd9Sstevel@tonic-gate 
1033*7c478bd9Sstevel@tonic-gate 
1034*7c478bd9Sstevel@tonic-gate /* Context structs for address space handlers */
1035*7c478bd9Sstevel@tonic-gate 
1036*7c478bd9Sstevel@tonic-gate typedef struct acpi_pci_id
1037*7c478bd9Sstevel@tonic-gate {
1038*7c478bd9Sstevel@tonic-gate     UINT16                      Segment;
1039*7c478bd9Sstevel@tonic-gate     UINT16                      Bus;
1040*7c478bd9Sstevel@tonic-gate     UINT16                      Device;
1041*7c478bd9Sstevel@tonic-gate     UINT16                      Function;
1042*7c478bd9Sstevel@tonic-gate 
1043*7c478bd9Sstevel@tonic-gate } ACPI_PCI_ID;
1044*7c478bd9Sstevel@tonic-gate 
1045*7c478bd9Sstevel@tonic-gate 
1046*7c478bd9Sstevel@tonic-gate typedef struct acpi_mem_space_context
1047*7c478bd9Sstevel@tonic-gate {
1048*7c478bd9Sstevel@tonic-gate     UINT32                      Length;
1049*7c478bd9Sstevel@tonic-gate     ACPI_PHYSICAL_ADDRESS       Address;
1050*7c478bd9Sstevel@tonic-gate     ACPI_PHYSICAL_ADDRESS       MappedPhysicalAddress;
1051*7c478bd9Sstevel@tonic-gate     UINT8                       *MappedLogicalAddress;
1052*7c478bd9Sstevel@tonic-gate     ACPI_SIZE                   MappedLength;
1053*7c478bd9Sstevel@tonic-gate 
1054*7c478bd9Sstevel@tonic-gate } ACPI_MEM_SPACE_CONTEXT;
1055*7c478bd9Sstevel@tonic-gate 
1056*7c478bd9Sstevel@tonic-gate 
1057*7c478bd9Sstevel@tonic-gate /*
1058*7c478bd9Sstevel@tonic-gate  * Definitions for Resource Attributes
1059*7c478bd9Sstevel@tonic-gate  */
1060*7c478bd9Sstevel@tonic-gate 
1061*7c478bd9Sstevel@tonic-gate /*
1062*7c478bd9Sstevel@tonic-gate  *  Memory Attributes
1063*7c478bd9Sstevel@tonic-gate  */
1064*7c478bd9Sstevel@tonic-gate #define ACPI_READ_ONLY_MEMORY           (UINT8) 0x00
1065*7c478bd9Sstevel@tonic-gate #define ACPI_READ_WRITE_MEMORY          (UINT8) 0x01
1066*7c478bd9Sstevel@tonic-gate 
1067*7c478bd9Sstevel@tonic-gate #define ACPI_NON_CACHEABLE_MEMORY       (UINT8) 0x00
1068*7c478bd9Sstevel@tonic-gate #define ACPI_CACHABLE_MEMORY            (UINT8) 0x01
1069*7c478bd9Sstevel@tonic-gate #define ACPI_WRITE_COMBINING_MEMORY     (UINT8) 0x02
1070*7c478bd9Sstevel@tonic-gate #define ACPI_PREFETCHABLE_MEMORY        (UINT8) 0x03
1071*7c478bd9Sstevel@tonic-gate 
1072*7c478bd9Sstevel@tonic-gate /*
1073*7c478bd9Sstevel@tonic-gate  *  IO Attributes
1074*7c478bd9Sstevel@tonic-gate  *  The ISA IO ranges are:     n000-n0FFh,  n400-n4FFh, n800-n8FFh, nC00-nCFFh.
1075*7c478bd9Sstevel@tonic-gate  *  The non-ISA IO ranges are: n100-n3FFh,  n500-n7FFh, n900-nBFFh, nCD0-nFFFh.
1076*7c478bd9Sstevel@tonic-gate  */
1077*7c478bd9Sstevel@tonic-gate #define ACPI_NON_ISA_ONLY_RANGES        (UINT8) 0x01
1078*7c478bd9Sstevel@tonic-gate #define ACPI_ISA_ONLY_RANGES            (UINT8) 0x02
1079*7c478bd9Sstevel@tonic-gate #define ACPI_ENTIRE_RANGE               (ACPI_NON_ISA_ONLY_RANGES | ACPI_ISA_ONLY_RANGES)
1080*7c478bd9Sstevel@tonic-gate 
1081*7c478bd9Sstevel@tonic-gate #define ACPI_SPARSE_TRANSLATION         (UINT8) 0x03
1082*7c478bd9Sstevel@tonic-gate 
1083*7c478bd9Sstevel@tonic-gate /*
1084*7c478bd9Sstevel@tonic-gate  *  IO Port Descriptor Decode
1085*7c478bd9Sstevel@tonic-gate  */
1086*7c478bd9Sstevel@tonic-gate #define ACPI_DECODE_10                  (UINT8) 0x00    /* 10-bit IO address decode */
1087*7c478bd9Sstevel@tonic-gate #define ACPI_DECODE_16                  (UINT8) 0x01    /* 16-bit IO address decode */
1088*7c478bd9Sstevel@tonic-gate 
1089*7c478bd9Sstevel@tonic-gate /*
1090*7c478bd9Sstevel@tonic-gate  *  IRQ Attributes
1091*7c478bd9Sstevel@tonic-gate  */
1092*7c478bd9Sstevel@tonic-gate #define ACPI_EDGE_SENSITIVE             (UINT8) 0x00
1093*7c478bd9Sstevel@tonic-gate #define ACPI_LEVEL_SENSITIVE            (UINT8) 0x01
1094*7c478bd9Sstevel@tonic-gate 
1095*7c478bd9Sstevel@tonic-gate #define ACPI_ACTIVE_HIGH                (UINT8) 0x00
1096*7c478bd9Sstevel@tonic-gate #define ACPI_ACTIVE_LOW                 (UINT8) 0x01
1097*7c478bd9Sstevel@tonic-gate 
1098*7c478bd9Sstevel@tonic-gate #define ACPI_EXCLUSIVE                  (UINT8) 0x00
1099*7c478bd9Sstevel@tonic-gate #define ACPI_SHARED                     (UINT8) 0x01
1100*7c478bd9Sstevel@tonic-gate 
1101*7c478bd9Sstevel@tonic-gate /*
1102*7c478bd9Sstevel@tonic-gate  *  DMA Attributes
1103*7c478bd9Sstevel@tonic-gate  */
1104*7c478bd9Sstevel@tonic-gate #define ACPI_COMPATIBILITY              (UINT8) 0x00
1105*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_A                     (UINT8) 0x01
1106*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_B                     (UINT8) 0x02
1107*7c478bd9Sstevel@tonic-gate #define ACPI_TYPE_F                     (UINT8) 0x03
1108*7c478bd9Sstevel@tonic-gate 
1109*7c478bd9Sstevel@tonic-gate #define ACPI_NOT_BUS_MASTER             (UINT8) 0x00
1110*7c478bd9Sstevel@tonic-gate #define ACPI_BUS_MASTER                 (UINT8) 0x01
1111*7c478bd9Sstevel@tonic-gate 
1112*7c478bd9Sstevel@tonic-gate #define ACPI_TRANSFER_8                 (UINT8) 0x00
1113*7c478bd9Sstevel@tonic-gate #define ACPI_TRANSFER_8_16              (UINT8) 0x01
1114*7c478bd9Sstevel@tonic-gate #define ACPI_TRANSFER_16                (UINT8) 0x02
1115*7c478bd9Sstevel@tonic-gate 
1116*7c478bd9Sstevel@tonic-gate /*
1117*7c478bd9Sstevel@tonic-gate  * Start Dependent Functions Priority definitions
1118*7c478bd9Sstevel@tonic-gate  */
1119*7c478bd9Sstevel@tonic-gate #define ACPI_GOOD_CONFIGURATION         (UINT8) 0x00
1120*7c478bd9Sstevel@tonic-gate #define ACPI_ACCEPTABLE_CONFIGURATION   (UINT8) 0x01
1121*7c478bd9Sstevel@tonic-gate #define ACPI_SUB_OPTIMAL_CONFIGURATION  (UINT8) 0x02
1122*7c478bd9Sstevel@tonic-gate 
1123*7c478bd9Sstevel@tonic-gate /*
1124*7c478bd9Sstevel@tonic-gate  *  16, 32 and 64-bit Address Descriptor resource types
1125*7c478bd9Sstevel@tonic-gate  */
1126*7c478bd9Sstevel@tonic-gate #define ACPI_MEMORY_RANGE               (UINT8) 0x00
1127*7c478bd9Sstevel@tonic-gate #define ACPI_IO_RANGE                   (UINT8) 0x01
1128*7c478bd9Sstevel@tonic-gate #define ACPI_BUS_NUMBER_RANGE           (UINT8) 0x02
1129*7c478bd9Sstevel@tonic-gate 
1130*7c478bd9Sstevel@tonic-gate #define ACPI_ADDRESS_NOT_FIXED          (UINT8) 0x00
1131*7c478bd9Sstevel@tonic-gate #define ACPI_ADDRESS_FIXED              (UINT8) 0x01
1132*7c478bd9Sstevel@tonic-gate 
1133*7c478bd9Sstevel@tonic-gate #define ACPI_POS_DECODE                 (UINT8) 0x00
1134*7c478bd9Sstevel@tonic-gate #define ACPI_SUB_DECODE                 (UINT8) 0x01
1135*7c478bd9Sstevel@tonic-gate 
1136*7c478bd9Sstevel@tonic-gate #define ACPI_PRODUCER                   (UINT8) 0x00
1137*7c478bd9Sstevel@tonic-gate #define ACPI_CONSUMER                   (UINT8) 0x01
1138*7c478bd9Sstevel@tonic-gate 
1139*7c478bd9Sstevel@tonic-gate 
1140*7c478bd9Sstevel@tonic-gate /*
1141*7c478bd9Sstevel@tonic-gate  *  Structures used to describe device resources
1142*7c478bd9Sstevel@tonic-gate  */
1143*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_irq
1144*7c478bd9Sstevel@tonic-gate {
1145*7c478bd9Sstevel@tonic-gate     UINT32                      EdgeLevel;
1146*7c478bd9Sstevel@tonic-gate     UINT32                      ActiveHighLow;
1147*7c478bd9Sstevel@tonic-gate     UINT32                      SharedExclusive;
1148*7c478bd9Sstevel@tonic-gate     UINT32                      NumberOfInterrupts;
1149*7c478bd9Sstevel@tonic-gate     UINT32                      Interrupts[1];
1150*7c478bd9Sstevel@tonic-gate 
1151*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_IRQ;
1152*7c478bd9Sstevel@tonic-gate 
1153*7c478bd9Sstevel@tonic-gate typedef struct ACPI_RESOURCE_DMA
1154*7c478bd9Sstevel@tonic-gate {
1155*7c478bd9Sstevel@tonic-gate     UINT32                      Type;
1156*7c478bd9Sstevel@tonic-gate     UINT32                      BusMaster;
1157*7c478bd9Sstevel@tonic-gate     UINT32                      Transfer;
1158*7c478bd9Sstevel@tonic-gate     UINT32                      NumberOfChannels;
1159*7c478bd9Sstevel@tonic-gate     UINT32                      Channels[1];
1160*7c478bd9Sstevel@tonic-gate 
1161*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_DMA;
1162*7c478bd9Sstevel@tonic-gate 
1163*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_start_dpf
1164*7c478bd9Sstevel@tonic-gate {
1165*7c478bd9Sstevel@tonic-gate     UINT32                      CompatibilityPriority;
1166*7c478bd9Sstevel@tonic-gate     UINT32                      PerformanceRobustness;
1167*7c478bd9Sstevel@tonic-gate 
1168*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_START_DPF;
1169*7c478bd9Sstevel@tonic-gate 
1170*7c478bd9Sstevel@tonic-gate /*
1171*7c478bd9Sstevel@tonic-gate  * END_DEPENDENT_FUNCTIONS_RESOURCE struct is not
1172*7c478bd9Sstevel@tonic-gate  * needed because it has no fields
1173*7c478bd9Sstevel@tonic-gate  */
1174*7c478bd9Sstevel@tonic-gate 
1175*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_io
1176*7c478bd9Sstevel@tonic-gate {
1177*7c478bd9Sstevel@tonic-gate     UINT32                      IoDecode;
1178*7c478bd9Sstevel@tonic-gate     UINT32                      MinBaseAddress;
1179*7c478bd9Sstevel@tonic-gate     UINT32                      MaxBaseAddress;
1180*7c478bd9Sstevel@tonic-gate     UINT32                      Alignment;
1181*7c478bd9Sstevel@tonic-gate     UINT32                      RangeLength;
1182*7c478bd9Sstevel@tonic-gate 
1183*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_IO;
1184*7c478bd9Sstevel@tonic-gate 
1185*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_fixed_io
1186*7c478bd9Sstevel@tonic-gate {
1187*7c478bd9Sstevel@tonic-gate     UINT32                      BaseAddress;
1188*7c478bd9Sstevel@tonic-gate     UINT32                      RangeLength;
1189*7c478bd9Sstevel@tonic-gate 
1190*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_FIXED_IO;
1191*7c478bd9Sstevel@tonic-gate 
1192*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_vendor
1193*7c478bd9Sstevel@tonic-gate {
1194*7c478bd9Sstevel@tonic-gate     UINT32                      Length;
1195*7c478bd9Sstevel@tonic-gate     UINT8                       Reserved[1];
1196*7c478bd9Sstevel@tonic-gate 
1197*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_VENDOR;
1198*7c478bd9Sstevel@tonic-gate 
1199*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_end_tag
1200*7c478bd9Sstevel@tonic-gate {
1201*7c478bd9Sstevel@tonic-gate     UINT8                       Checksum;
1202*7c478bd9Sstevel@tonic-gate 
1203*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_END_TAG;
1204*7c478bd9Sstevel@tonic-gate 
1205*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_mem24
1206*7c478bd9Sstevel@tonic-gate {
1207*7c478bd9Sstevel@tonic-gate     UINT32                      ReadWriteAttribute;
1208*7c478bd9Sstevel@tonic-gate     UINT32                      MinBaseAddress;
1209*7c478bd9Sstevel@tonic-gate     UINT32                      MaxBaseAddress;
1210*7c478bd9Sstevel@tonic-gate     UINT32                      Alignment;
1211*7c478bd9Sstevel@tonic-gate     UINT32                      RangeLength;
1212*7c478bd9Sstevel@tonic-gate 
1213*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_MEM24;
1214*7c478bd9Sstevel@tonic-gate 
1215*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_mem32
1216*7c478bd9Sstevel@tonic-gate {
1217*7c478bd9Sstevel@tonic-gate     UINT32                      ReadWriteAttribute;
1218*7c478bd9Sstevel@tonic-gate     UINT32                      MinBaseAddress;
1219*7c478bd9Sstevel@tonic-gate     UINT32                      MaxBaseAddress;
1220*7c478bd9Sstevel@tonic-gate     UINT32                      Alignment;
1221*7c478bd9Sstevel@tonic-gate     UINT32                      RangeLength;
1222*7c478bd9Sstevel@tonic-gate 
1223*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_MEM32;
1224*7c478bd9Sstevel@tonic-gate 
1225*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_fixed_mem32
1226*7c478bd9Sstevel@tonic-gate {
1227*7c478bd9Sstevel@tonic-gate     UINT32                      ReadWriteAttribute;
1228*7c478bd9Sstevel@tonic-gate     UINT32                      RangeBaseAddress;
1229*7c478bd9Sstevel@tonic-gate     UINT32                      RangeLength;
1230*7c478bd9Sstevel@tonic-gate 
1231*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_FIXED_MEM32;
1232*7c478bd9Sstevel@tonic-gate 
1233*7c478bd9Sstevel@tonic-gate typedef struct acpi_memory_attribute
1234*7c478bd9Sstevel@tonic-gate {
1235*7c478bd9Sstevel@tonic-gate     UINT16                      CacheAttribute;
1236*7c478bd9Sstevel@tonic-gate     UINT16                      ReadWriteAttribute;
1237*7c478bd9Sstevel@tonic-gate 
1238*7c478bd9Sstevel@tonic-gate } ACPI_MEMORY_ATTRIBUTE;
1239*7c478bd9Sstevel@tonic-gate 
1240*7c478bd9Sstevel@tonic-gate typedef struct acpi_io_attribute
1241*7c478bd9Sstevel@tonic-gate {
1242*7c478bd9Sstevel@tonic-gate     UINT16                      RangeAttribute;
1243*7c478bd9Sstevel@tonic-gate     UINT16                      TranslationAttribute;
1244*7c478bd9Sstevel@tonic-gate 
1245*7c478bd9Sstevel@tonic-gate } ACPI_IO_ATTRIBUTE;
1246*7c478bd9Sstevel@tonic-gate 
1247*7c478bd9Sstevel@tonic-gate typedef struct acpi_bus_attribute
1248*7c478bd9Sstevel@tonic-gate {
1249*7c478bd9Sstevel@tonic-gate     UINT16                      Reserved1;
1250*7c478bd9Sstevel@tonic-gate     UINT16                      Reserved2;
1251*7c478bd9Sstevel@tonic-gate 
1252*7c478bd9Sstevel@tonic-gate } ACPI_BUS_ATTRIBUTE;
1253*7c478bd9Sstevel@tonic-gate 
1254*7c478bd9Sstevel@tonic-gate typedef union acpi_resource_attribute
1255*7c478bd9Sstevel@tonic-gate {
1256*7c478bd9Sstevel@tonic-gate     ACPI_MEMORY_ATTRIBUTE       Memory;
1257*7c478bd9Sstevel@tonic-gate     ACPI_IO_ATTRIBUTE           Io;
1258*7c478bd9Sstevel@tonic-gate     ACPI_BUS_ATTRIBUTE          Bus;
1259*7c478bd9Sstevel@tonic-gate 
1260*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_ATTRIBUTE;
1261*7c478bd9Sstevel@tonic-gate 
1262*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_source
1263*7c478bd9Sstevel@tonic-gate {
1264*7c478bd9Sstevel@tonic-gate     UINT32                      Index;
1265*7c478bd9Sstevel@tonic-gate     UINT32                      StringLength;
1266*7c478bd9Sstevel@tonic-gate     char                        *StringPtr;
1267*7c478bd9Sstevel@tonic-gate 
1268*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_SOURCE;
1269*7c478bd9Sstevel@tonic-gate 
1270*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_address16
1271*7c478bd9Sstevel@tonic-gate {
1272*7c478bd9Sstevel@tonic-gate     UINT32                      ResourceType;
1273*7c478bd9Sstevel@tonic-gate     UINT32                      ProducerConsumer;
1274*7c478bd9Sstevel@tonic-gate     UINT32                      Decode;
1275*7c478bd9Sstevel@tonic-gate     UINT32                      MinAddressFixed;
1276*7c478bd9Sstevel@tonic-gate     UINT32                      MaxAddressFixed;
1277*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_ATTRIBUTE     Attribute;
1278*7c478bd9Sstevel@tonic-gate     UINT32                      Granularity;
1279*7c478bd9Sstevel@tonic-gate     UINT32                      MinAddressRange;
1280*7c478bd9Sstevel@tonic-gate     UINT32                      MaxAddressRange;
1281*7c478bd9Sstevel@tonic-gate     UINT32                      AddressTranslationOffset;
1282*7c478bd9Sstevel@tonic-gate     UINT32                      AddressLength;
1283*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_SOURCE        ResourceSource;
1284*7c478bd9Sstevel@tonic-gate 
1285*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_ADDRESS16;
1286*7c478bd9Sstevel@tonic-gate 
1287*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_address32
1288*7c478bd9Sstevel@tonic-gate {
1289*7c478bd9Sstevel@tonic-gate     UINT32                      ResourceType;
1290*7c478bd9Sstevel@tonic-gate     UINT32                      ProducerConsumer;
1291*7c478bd9Sstevel@tonic-gate     UINT32                      Decode;
1292*7c478bd9Sstevel@tonic-gate     UINT32                      MinAddressFixed;
1293*7c478bd9Sstevel@tonic-gate     UINT32                      MaxAddressFixed;
1294*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_ATTRIBUTE     Attribute;
1295*7c478bd9Sstevel@tonic-gate     UINT32                      Granularity;
1296*7c478bd9Sstevel@tonic-gate     UINT32                      MinAddressRange;
1297*7c478bd9Sstevel@tonic-gate     UINT32                      MaxAddressRange;
1298*7c478bd9Sstevel@tonic-gate     UINT32                      AddressTranslationOffset;
1299*7c478bd9Sstevel@tonic-gate     UINT32                      AddressLength;
1300*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_SOURCE        ResourceSource;
1301*7c478bd9Sstevel@tonic-gate 
1302*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_ADDRESS32;
1303*7c478bd9Sstevel@tonic-gate 
1304*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_address64
1305*7c478bd9Sstevel@tonic-gate {
1306*7c478bd9Sstevel@tonic-gate     UINT32                      ResourceType;
1307*7c478bd9Sstevel@tonic-gate     UINT32                      ProducerConsumer;
1308*7c478bd9Sstevel@tonic-gate     UINT32                      Decode;
1309*7c478bd9Sstevel@tonic-gate     UINT32                      MinAddressFixed;
1310*7c478bd9Sstevel@tonic-gate     UINT32                      MaxAddressFixed;
1311*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_ATTRIBUTE     Attribute;
1312*7c478bd9Sstevel@tonic-gate     UINT64                      Granularity;
1313*7c478bd9Sstevel@tonic-gate     UINT64                      MinAddressRange;
1314*7c478bd9Sstevel@tonic-gate     UINT64                      MaxAddressRange;
1315*7c478bd9Sstevel@tonic-gate     UINT64                      AddressTranslationOffset;
1316*7c478bd9Sstevel@tonic-gate     UINT64                      AddressLength;
1317*7c478bd9Sstevel@tonic-gate     UINT64                      TypeSpecificAttributes;
1318*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_SOURCE        ResourceSource;
1319*7c478bd9Sstevel@tonic-gate 
1320*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_ADDRESS64;
1321*7c478bd9Sstevel@tonic-gate 
1322*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource_ext_irq
1323*7c478bd9Sstevel@tonic-gate {
1324*7c478bd9Sstevel@tonic-gate     UINT32                      ProducerConsumer;
1325*7c478bd9Sstevel@tonic-gate     UINT32                      EdgeLevel;
1326*7c478bd9Sstevel@tonic-gate     UINT32                      ActiveHighLow;
1327*7c478bd9Sstevel@tonic-gate     UINT32                      SharedExclusive;
1328*7c478bd9Sstevel@tonic-gate     UINT32                      NumberOfInterrupts;
1329*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_SOURCE        ResourceSource;
1330*7c478bd9Sstevel@tonic-gate     UINT32                      Interrupts[1];
1331*7c478bd9Sstevel@tonic-gate 
1332*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_EXT_IRQ;
1333*7c478bd9Sstevel@tonic-gate 
1334*7c478bd9Sstevel@tonic-gate 
1335*7c478bd9Sstevel@tonic-gate /* ACPI_RESOURCE_TYPEs */
1336*7c478bd9Sstevel@tonic-gate 
1337*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_IRQ                 0
1338*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_DMA                 1
1339*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_START_DPF           2
1340*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_END_DPF             3
1341*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_IO                  4
1342*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_FIXED_IO            5
1343*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_VENDOR              6
1344*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_END_TAG             7
1345*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_MEM24               8
1346*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_MEM32               9
1347*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_FIXED_MEM32         10
1348*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_ADDRESS16           11
1349*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_ADDRESS32           12
1350*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_ADDRESS64           13
1351*7c478bd9Sstevel@tonic-gate #define ACPI_RSTYPE_EXT_IRQ             14
1352*7c478bd9Sstevel@tonic-gate 
1353*7c478bd9Sstevel@tonic-gate typedef UINT32                          ACPI_RESOURCE_TYPE;
1354*7c478bd9Sstevel@tonic-gate 
1355*7c478bd9Sstevel@tonic-gate typedef union acpi_resource_data
1356*7c478bd9Sstevel@tonic-gate {
1357*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_IRQ           Irq;
1358*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_DMA           Dma;
1359*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_START_DPF     StartDpf;
1360*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_IO            Io;
1361*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_FIXED_IO      FixedIo;
1362*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_VENDOR        VendorSpecific;
1363*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_END_TAG       EndTag;
1364*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_MEM24         Memory24;
1365*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_MEM32         Memory32;
1366*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_FIXED_MEM32   FixedMemory32;
1367*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_ADDRESS16     Address16;
1368*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_ADDRESS32     Address32;
1369*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_ADDRESS64     Address64;
1370*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_EXT_IRQ       ExtendedIrq;
1371*7c478bd9Sstevel@tonic-gate 
1372*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE_DATA;
1373*7c478bd9Sstevel@tonic-gate 
1374*7c478bd9Sstevel@tonic-gate typedef struct acpi_resource
1375*7c478bd9Sstevel@tonic-gate {
1376*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_TYPE          Id;
1377*7c478bd9Sstevel@tonic-gate     UINT32                      Length;
1378*7c478bd9Sstevel@tonic-gate     ACPI_RESOURCE_DATA          Data;
1379*7c478bd9Sstevel@tonic-gate 
1380*7c478bd9Sstevel@tonic-gate } ACPI_RESOURCE;
1381*7c478bd9Sstevel@tonic-gate 
1382*7c478bd9Sstevel@tonic-gate #define ACPI_RESOURCE_LENGTH                12
1383*7c478bd9Sstevel@tonic-gate #define ACPI_RESOURCE_LENGTH_NO_DATA        8       /* Id + Length fields */
1384*7c478bd9Sstevel@tonic-gate 
1385*7c478bd9Sstevel@tonic-gate #define ACPI_SIZEOF_RESOURCE(Type)          (ACPI_RESOURCE_LENGTH_NO_DATA + sizeof (Type))
1386*7c478bd9Sstevel@tonic-gate 
1387*7c478bd9Sstevel@tonic-gate #define ACPI_NEXT_RESOURCE(Res)             (ACPI_RESOURCE *)((UINT8 *) Res + Res->Length)
1388*7c478bd9Sstevel@tonic-gate 
1389*7c478bd9Sstevel@tonic-gate #ifdef ACPI_MISALIGNED_TRANSFERS
1390*7c478bd9Sstevel@tonic-gate #define ACPI_ALIGN_RESOURCE_SIZE(Length)    (Length)
1391*7c478bd9Sstevel@tonic-gate #else
1392*7c478bd9Sstevel@tonic-gate #define ACPI_ALIGN_RESOURCE_SIZE(Length)    ACPI_ROUND_UP_TO_NATIVE_WORD(Length)
1393*7c478bd9Sstevel@tonic-gate #endif
1394*7c478bd9Sstevel@tonic-gate 
1395*7c478bd9Sstevel@tonic-gate /*
1396*7c478bd9Sstevel@tonic-gate  * END: of definitions for Resource Attributes
1397*7c478bd9Sstevel@tonic-gate  */
1398*7c478bd9Sstevel@tonic-gate 
1399*7c478bd9Sstevel@tonic-gate 
1400*7c478bd9Sstevel@tonic-gate typedef struct acpi_pci_routing_table
1401*7c478bd9Sstevel@tonic-gate {
1402*7c478bd9Sstevel@tonic-gate     UINT32                      Length;
1403*7c478bd9Sstevel@tonic-gate     UINT32                      Pin;
1404*7c478bd9Sstevel@tonic-gate     ACPI_INTEGER                Address;        /* here for 64-bit alignment */
1405*7c478bd9Sstevel@tonic-gate     UINT32                      SourceIndex;
1406*7c478bd9Sstevel@tonic-gate     char                        Source[4];      /* pad to 64 bits so sizeof() works in all cases */
1407*7c478bd9Sstevel@tonic-gate 
1408*7c478bd9Sstevel@tonic-gate } ACPI_PCI_ROUTING_TABLE;
1409*7c478bd9Sstevel@tonic-gate 
1410*7c478bd9Sstevel@tonic-gate /*
1411*7c478bd9Sstevel@tonic-gate  * END: of definitions for PCI Routing tables
1412*7c478bd9Sstevel@tonic-gate  */
1413*7c478bd9Sstevel@tonic-gate 
1414*7c478bd9Sstevel@tonic-gate 
1415*7c478bd9Sstevel@tonic-gate #endif /* __ACTYPES_H__ */
1416