xref: /onnv-gate/usr/src/uts/intel/sys/acpi/amlresrc.h (revision 941:49d0d4c2eea8)
10Sstevel@tonic-gate 
20Sstevel@tonic-gate /******************************************************************************
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * Module Name: amlresrc.h - AML resource descriptors
5*941Smyers  *              $Revision: 1.32 $
60Sstevel@tonic-gate  *
70Sstevel@tonic-gate  *****************************************************************************/
80Sstevel@tonic-gate 
90Sstevel@tonic-gate /******************************************************************************
100Sstevel@tonic-gate  *
110Sstevel@tonic-gate  * 1. Copyright Notice
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
140Sstevel@tonic-gate  * All rights reserved.
150Sstevel@tonic-gate  *
160Sstevel@tonic-gate  * 2. License
170Sstevel@tonic-gate  *
180Sstevel@tonic-gate  * 2.1. This is your license from Intel Corp. under its intellectual property
190Sstevel@tonic-gate  * rights.  You may have additional license terms from the party that provided
200Sstevel@tonic-gate  * you this software, covering your right to use that party's intellectual
210Sstevel@tonic-gate  * property rights.
220Sstevel@tonic-gate  *
230Sstevel@tonic-gate  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
240Sstevel@tonic-gate  * copy of the source code appearing in this file ("Covered Code") an
250Sstevel@tonic-gate  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
260Sstevel@tonic-gate  * base code distributed originally by Intel ("Original Intel Code") to copy,
270Sstevel@tonic-gate  * make derivatives, distribute, use and display any portion of the Covered
280Sstevel@tonic-gate  * Code in any form, with the right to sublicense such rights; and
290Sstevel@tonic-gate  *
300Sstevel@tonic-gate  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
310Sstevel@tonic-gate  * license (with the right to sublicense), under only those claims of Intel
320Sstevel@tonic-gate  * patents that are infringed by the Original Intel Code, to make, use, sell,
330Sstevel@tonic-gate  * offer to sell, and import the Covered Code and derivative works thereof
340Sstevel@tonic-gate  * solely to the minimum extent necessary to exercise the above copyright
350Sstevel@tonic-gate  * license, and in no event shall the patent license extend to any additions
360Sstevel@tonic-gate  * to or modifications of the Original Intel Code.  No other license or right
370Sstevel@tonic-gate  * is granted directly or by implication, estoppel or otherwise;
380Sstevel@tonic-gate  *
390Sstevel@tonic-gate  * The above copyright and patent license is granted only if the following
400Sstevel@tonic-gate  * conditions are met:
410Sstevel@tonic-gate  *
420Sstevel@tonic-gate  * 3. Conditions
430Sstevel@tonic-gate  *
440Sstevel@tonic-gate  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
450Sstevel@tonic-gate  * Redistribution of source code of any substantial portion of the Covered
460Sstevel@tonic-gate  * Code or modification with rights to further distribute source must include
470Sstevel@tonic-gate  * the above Copyright Notice, the above License, this list of Conditions,
480Sstevel@tonic-gate  * and the following Disclaimer and Export Compliance provision.  In addition,
490Sstevel@tonic-gate  * Licensee must cause all Covered Code to which Licensee contributes to
500Sstevel@tonic-gate  * contain a file documenting the changes Licensee made to create that Covered
510Sstevel@tonic-gate  * Code and the date of any change.  Licensee must include in that file the
520Sstevel@tonic-gate  * documentation of any changes made by any predecessor Licensee.  Licensee
530Sstevel@tonic-gate  * must include a prominent statement that the modification is derived,
540Sstevel@tonic-gate  * directly or indirectly, from Original Intel Code.
550Sstevel@tonic-gate  *
560Sstevel@tonic-gate  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
570Sstevel@tonic-gate  * Redistribution of source code of any substantial portion of the Covered
580Sstevel@tonic-gate  * Code or modification without rights to further distribute source must
590Sstevel@tonic-gate  * include the following Disclaimer and Export Compliance provision in the
600Sstevel@tonic-gate  * documentation and/or other materials provided with distribution.  In
610Sstevel@tonic-gate  * addition, Licensee may not authorize further sublicense of source of any
620Sstevel@tonic-gate  * portion of the Covered Code, and must include terms to the effect that the
630Sstevel@tonic-gate  * license from Licensee to its licensee is limited to the intellectual
640Sstevel@tonic-gate  * property embodied in the software Licensee provides to its licensee, and
650Sstevel@tonic-gate  * not to intellectual property embodied in modifications its licensee may
660Sstevel@tonic-gate  * make.
670Sstevel@tonic-gate  *
680Sstevel@tonic-gate  * 3.3. Redistribution of Executable. Redistribution in executable form of any
690Sstevel@tonic-gate  * substantial portion of the Covered Code or modification must reproduce the
700Sstevel@tonic-gate  * above Copyright Notice, and the following Disclaimer and Export Compliance
710Sstevel@tonic-gate  * provision in the documentation and/or other materials provided with the
720Sstevel@tonic-gate  * distribution.
730Sstevel@tonic-gate  *
740Sstevel@tonic-gate  * 3.4. Intel retains all right, title, and interest in and to the Original
750Sstevel@tonic-gate  * Intel Code.
760Sstevel@tonic-gate  *
770Sstevel@tonic-gate  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
780Sstevel@tonic-gate  * Intel shall be used in advertising or otherwise to promote the sale, use or
790Sstevel@tonic-gate  * other dealings in products derived from or relating to the Covered Code
800Sstevel@tonic-gate  * without prior written authorization from Intel.
810Sstevel@tonic-gate  *
820Sstevel@tonic-gate  * 4. Disclaimer and Export Compliance
830Sstevel@tonic-gate  *
840Sstevel@tonic-gate  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
850Sstevel@tonic-gate  * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
860Sstevel@tonic-gate  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
870Sstevel@tonic-gate  * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
880Sstevel@tonic-gate  * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
890Sstevel@tonic-gate  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
900Sstevel@tonic-gate  * PARTICULAR PURPOSE.
910Sstevel@tonic-gate  *
920Sstevel@tonic-gate  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
930Sstevel@tonic-gate  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
940Sstevel@tonic-gate  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
950Sstevel@tonic-gate  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
960Sstevel@tonic-gate  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
970Sstevel@tonic-gate  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
980Sstevel@tonic-gate  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
990Sstevel@tonic-gate  * LIMITED REMEDY.
1000Sstevel@tonic-gate  *
1010Sstevel@tonic-gate  * 4.3. Licensee shall not export, either directly or indirectly, any of this
1020Sstevel@tonic-gate  * software or system incorporating such software without first obtaining any
1030Sstevel@tonic-gate  * required license or other approval from the U. S. Department of Commerce or
1040Sstevel@tonic-gate  * any other agency or department of the United States Government.  In the
1050Sstevel@tonic-gate  * event Licensee exports any such software from the United States or
1060Sstevel@tonic-gate  * re-exports any such software from a foreign destination, Licensee shall
1070Sstevel@tonic-gate  * ensure that the distribution and export/re-export of the software is in
1080Sstevel@tonic-gate  * compliance with all laws, regulations, orders, or other restrictions of the
1090Sstevel@tonic-gate  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
1100Sstevel@tonic-gate  * any of its subsidiaries will export/re-export any technical data, process,
1110Sstevel@tonic-gate  * software, or service, directly or indirectly, to any country for which the
1120Sstevel@tonic-gate  * United States government or any agency thereof requires an export license,
1130Sstevel@tonic-gate  * other governmental approval, or letter of assurance, without first obtaining
1140Sstevel@tonic-gate  * such license, approval or letter.
1150Sstevel@tonic-gate  *
1160Sstevel@tonic-gate  *****************************************************************************/
1170Sstevel@tonic-gate 
1180Sstevel@tonic-gate 
1190Sstevel@tonic-gate #ifndef __AMLRESRC_H
1200Sstevel@tonic-gate #define __AMLRESRC_H
1210Sstevel@tonic-gate 
1220Sstevel@tonic-gate 
1230Sstevel@tonic-gate #define ASL_RESNAME_ADDRESS                     "_ADR"
1240Sstevel@tonic-gate #define ASL_RESNAME_ALIGNMENT                   "_ALN"
1250Sstevel@tonic-gate #define ASL_RESNAME_ADDRESSSPACE                "_ASI"
1260Sstevel@tonic-gate #define ASL_RESNAME_ACCESSSIZE                  "_ASZ"
1270Sstevel@tonic-gate #define ASL_RESNAME_TYPESPECIFICATTRIBUTES      "_ATT"
1280Sstevel@tonic-gate #define ASL_RESNAME_BASEADDRESS                 "_BAS"
1290Sstevel@tonic-gate #define ASL_RESNAME_BUSMASTER                   "_BM_"  /* Master(1), Slave(0) */
1300Sstevel@tonic-gate #define ASL_RESNAME_DECODE                      "_DEC"
1310Sstevel@tonic-gate #define ASL_RESNAME_DMA                         "_DMA"
1320Sstevel@tonic-gate #define ASL_RESNAME_DMATYPE                     "_TYP"  /* Compatible(0), A(1), B(2), F(3) */
1330Sstevel@tonic-gate #define ASL_RESNAME_GRANULARITY                 "_GRA"
1340Sstevel@tonic-gate #define ASL_RESNAME_INTERRUPT                   "_INT"
1350Sstevel@tonic-gate #define ASL_RESNAME_INTERRUPTLEVEL              "_LL_"  /* ActiveLo(1), ActiveHi(0) */
1360Sstevel@tonic-gate #define ASL_RESNAME_INTERRUPTSHARE              "_SHR"  /* Shareable(1), NoShare(0) */
1370Sstevel@tonic-gate #define ASL_RESNAME_INTERRUPTTYPE               "_HE_"  /* Edge(1), Level(0) */
1380Sstevel@tonic-gate #define ASL_RESNAME_LENGTH                      "_LEN"
1390Sstevel@tonic-gate #define ASL_RESNAME_MEMATTRIBUTES               "_MTP"  /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
1400Sstevel@tonic-gate #define ASL_RESNAME_MEMTYPE                     "_MEM"  /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
1410Sstevel@tonic-gate #define ASL_RESNAME_MAXADDR                     "_MAX"
1420Sstevel@tonic-gate #define ASL_RESNAME_MINADDR                     "_MIN"
1430Sstevel@tonic-gate #define ASL_RESNAME_MAXTYPE                     "_MAF"
1440Sstevel@tonic-gate #define ASL_RESNAME_MINTYPE                     "_MIF"
1450Sstevel@tonic-gate #define ASL_RESNAME_REGISTERBITOFFSET           "_RBO"
1460Sstevel@tonic-gate #define ASL_RESNAME_REGISTERBITWIDTH            "_RBW"
1470Sstevel@tonic-gate #define ASL_RESNAME_RANGETYPE                   "_RNG"
1480Sstevel@tonic-gate #define ASL_RESNAME_READWRITETYPE               "_RW_"  /* ReadOnly(0), Writeable (1) */
1490Sstevel@tonic-gate #define ASL_RESNAME_TRANSLATION                 "_TRA"
1500Sstevel@tonic-gate #define ASL_RESNAME_TRANSTYPE                   "_TRS"  /* Sparse(1), Dense(0) */
1510Sstevel@tonic-gate #define ASL_RESNAME_TYPE                        "_TTP"  /* Translation(1), Static (0) */
1520Sstevel@tonic-gate #define ASL_RESNAME_XFERTYPE                    "_SIZ"  /* 8(0), 8And16(1), 16(2) */
1530Sstevel@tonic-gate 
1540Sstevel@tonic-gate 
1550Sstevel@tonic-gate /* Default sizes for "small" resource descriptors */
1560Sstevel@tonic-gate 
1570Sstevel@tonic-gate #define ASL_RDESC_IRQ_SIZE                      0x02
1580Sstevel@tonic-gate #define ASL_RDESC_DMA_SIZE                      0x02
1590Sstevel@tonic-gate #define ASL_RDESC_ST_DEPEND_SIZE                0x00
1600Sstevel@tonic-gate #define ASL_RDESC_END_DEPEND_SIZE               0x00
1610Sstevel@tonic-gate #define ASL_RDESC_IO_SIZE                       0x07
1620Sstevel@tonic-gate #define ASL_RDESC_FIXED_IO_SIZE                 0x03
1630Sstevel@tonic-gate #define ASL_RDESC_END_TAG_SIZE                  0x01
1640Sstevel@tonic-gate 
1650Sstevel@tonic-gate 
1660Sstevel@tonic-gate typedef struct asl_resource_node
1670Sstevel@tonic-gate {
1680Sstevel@tonic-gate     UINT32                      BufferLength;
1690Sstevel@tonic-gate     void                        *Buffer;
1700Sstevel@tonic-gate     struct asl_resource_node    *Next;
1710Sstevel@tonic-gate 
1720Sstevel@tonic-gate } ASL_RESOURCE_NODE;
1730Sstevel@tonic-gate 
1740Sstevel@tonic-gate 
1750Sstevel@tonic-gate /*
1760Sstevel@tonic-gate  * Resource descriptors defined in the ACPI specification.
1770Sstevel@tonic-gate  *
1780Sstevel@tonic-gate  * Packing/alignment must be BYTE because these descriptors
179*941Smyers  * are used to overlay the raw AML byte stream.
1800Sstevel@tonic-gate  */
1810Sstevel@tonic-gate #pragma pack(1)
1820Sstevel@tonic-gate 
183*941Smyers /*
184*941Smyers  * SMALL descriptors
185*941Smyers  */
186*941Smyers #define AML_RESOURCE_SMALL_HEADER_COMMON \
187*941Smyers     UINT8                       DescriptorType;
188*941Smyers 
189*941Smyers typedef struct aml_resource_small_header
1900Sstevel@tonic-gate {
191*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
192*941Smyers 
193*941Smyers } AML_RESOURCE_SMALL_HEADER;
194*941Smyers 
195*941Smyers 
196*941Smyers typedef struct aml_resource_irq
197*941Smyers {
198*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
1990Sstevel@tonic-gate     UINT16                      IrqMask;
2000Sstevel@tonic-gate     UINT8                       Flags;
2010Sstevel@tonic-gate 
202*941Smyers } AML_RESOURCE_IRQ;
2030Sstevel@tonic-gate 
2040Sstevel@tonic-gate 
205*941Smyers typedef struct aml_resource_irq_noflags
2060Sstevel@tonic-gate {
207*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
2080Sstevel@tonic-gate     UINT16                      IrqMask;
2090Sstevel@tonic-gate 
210*941Smyers } AML_RESOURCE_IRQ_NOFLAGS;
2110Sstevel@tonic-gate 
2120Sstevel@tonic-gate 
213*941Smyers typedef struct aml_resource_dma
2140Sstevel@tonic-gate {
215*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
2160Sstevel@tonic-gate     UINT8                       DmaChannelMask;
2170Sstevel@tonic-gate     UINT8                       Flags;
2180Sstevel@tonic-gate 
219*941Smyers } AML_RESOURCE_DMA;
2200Sstevel@tonic-gate 
2210Sstevel@tonic-gate 
222*941Smyers typedef struct aml_resource_start_dependent
2230Sstevel@tonic-gate {
224*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
2250Sstevel@tonic-gate     UINT8                       Flags;
2260Sstevel@tonic-gate 
227*941Smyers } AML_RESOURCE_START_DEPENDENT;
2280Sstevel@tonic-gate 
2290Sstevel@tonic-gate 
230*941Smyers typedef struct aml_resource_start_dependent_noprio
2310Sstevel@tonic-gate {
232*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
2330Sstevel@tonic-gate 
234*941Smyers } AML_RESOURCE_START_DEPENDENT_NOPRIO;
2350Sstevel@tonic-gate 
2360Sstevel@tonic-gate 
237*941Smyers typedef struct aml_resource_end_dependent
2380Sstevel@tonic-gate {
239*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
2400Sstevel@tonic-gate 
241*941Smyers } AML_RESOURCE_END_DEPENDENT;
2420Sstevel@tonic-gate 
2430Sstevel@tonic-gate 
244*941Smyers typedef struct aml_resource_io
2450Sstevel@tonic-gate {
246*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
2470Sstevel@tonic-gate     UINT8                       Information;
248*941Smyers     UINT16                      Minimum;
249*941Smyers     UINT16                      Maximum;
2500Sstevel@tonic-gate     UINT8                       Alignment;
251*941Smyers     UINT8                       AddressLength;
2520Sstevel@tonic-gate 
253*941Smyers } AML_RESOURCE_IO;
2540Sstevel@tonic-gate 
2550Sstevel@tonic-gate 
256*941Smyers typedef struct aml_resource_fixed_io
2570Sstevel@tonic-gate {
258*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
259*941Smyers     UINT16                      Address;
260*941Smyers     UINT8                       AddressLength;
2610Sstevel@tonic-gate 
262*941Smyers } AML_RESOURCE_FIXED_IO;
2630Sstevel@tonic-gate 
2640Sstevel@tonic-gate 
265*941Smyers typedef struct aml_resource_vendor_small
2660Sstevel@tonic-gate {
267*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
2680Sstevel@tonic-gate 
269*941Smyers } AML_RESOURCE_VENDOR_SMALL;
2700Sstevel@tonic-gate 
2710Sstevel@tonic-gate 
272*941Smyers typedef struct aml_resource_end_tag
2730Sstevel@tonic-gate {
274*941Smyers     AML_RESOURCE_SMALL_HEADER_COMMON
2750Sstevel@tonic-gate     UINT8                       Checksum;
2760Sstevel@tonic-gate 
277*941Smyers } AML_RESOURCE_END_TAG;
278*941Smyers 
279*941Smyers 
280*941Smyers /*
281*941Smyers  * LARGE descriptors
282*941Smyers  */
283*941Smyers #define AML_RESOURCE_LARGE_HEADER_COMMON \
284*941Smyers     UINT8                       DescriptorType;\
285*941Smyers     UINT16                      ResourceLength;
286*941Smyers 
287*941Smyers typedef struct aml_resource_large_header
288*941Smyers {
289*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
290*941Smyers 
291*941Smyers } AML_RESOURCE_LARGE_HEADER;
2920Sstevel@tonic-gate 
2930Sstevel@tonic-gate 
294*941Smyers typedef struct aml_resource_memory24
2950Sstevel@tonic-gate {
296*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
2970Sstevel@tonic-gate     UINT8                       Information;
298*941Smyers     UINT16                      Minimum;
299*941Smyers     UINT16                      Maximum;
3000Sstevel@tonic-gate     UINT16                      Alignment;
301*941Smyers     UINT16                      AddressLength;
3020Sstevel@tonic-gate 
303*941Smyers } AML_RESOURCE_MEMORY24;
3040Sstevel@tonic-gate 
3050Sstevel@tonic-gate 
306*941Smyers typedef struct aml_resource_vendor_large
3070Sstevel@tonic-gate {
308*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
3090Sstevel@tonic-gate 
310*941Smyers } AML_RESOURCE_VENDOR_LARGE;
3110Sstevel@tonic-gate 
3120Sstevel@tonic-gate 
313*941Smyers typedef struct aml_resource_memory32
3140Sstevel@tonic-gate {
315*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
3160Sstevel@tonic-gate     UINT8                       Information;
317*941Smyers     UINT32                      Minimum;
318*941Smyers     UINT32                      Maximum;
3190Sstevel@tonic-gate     UINT32                      Alignment;
320*941Smyers     UINT32                      AddressLength;
3210Sstevel@tonic-gate 
322*941Smyers } AML_RESOURCE_MEMORY32;
3230Sstevel@tonic-gate 
3240Sstevel@tonic-gate 
325*941Smyers typedef struct aml_resource_fixed_memory32
3260Sstevel@tonic-gate {
327*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
3280Sstevel@tonic-gate     UINT8                       Information;
329*941Smyers     UINT32                      Address;
330*941Smyers     UINT32                      AddressLength;
3310Sstevel@tonic-gate 
332*941Smyers } AML_RESOURCE_FIXED_MEMORY32;
3330Sstevel@tonic-gate 
3340Sstevel@tonic-gate 
335*941Smyers #define AML_RESOURCE_ADDRESS_COMMON \
336*941Smyers     UINT8                       ResourceType; \
337*941Smyers     UINT8                       Flags; \
338*941Smyers     UINT8                       SpecificFlags;
339*941Smyers 
340*941Smyers 
341*941Smyers typedef struct aml_resource_address
3420Sstevel@tonic-gate {
343*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
344*941Smyers     AML_RESOURCE_ADDRESS_COMMON
345*941Smyers 
346*941Smyers } AML_RESOURCE_ADDRESS;
347*941Smyers 
348*941Smyers 
349*941Smyers typedef struct aml_resource_extended_address64
350*941Smyers {
351*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
352*941Smyers     AML_RESOURCE_ADDRESS_COMMON
3530Sstevel@tonic-gate     UINT8                       RevisionID;
3540Sstevel@tonic-gate     UINT8                       Reserved;
3550Sstevel@tonic-gate     UINT64                      Granularity;
356*941Smyers     UINT64                      Minimum;
357*941Smyers     UINT64                      Maximum;
3580Sstevel@tonic-gate     UINT64                      TranslationOffset;
3590Sstevel@tonic-gate     UINT64                      AddressLength;
3600Sstevel@tonic-gate     UINT64                      TypeSpecificAttributes;
3610Sstevel@tonic-gate 
362*941Smyers } AML_RESOURCE_EXTENDED_ADDRESS64;
3630Sstevel@tonic-gate 
364*941Smyers #define AML_RESOURCE_EXTENDED_ADDRESS_REVISION          1       /* ACPI 3.0 */
3650Sstevel@tonic-gate 
3660Sstevel@tonic-gate 
367*941Smyers typedef struct aml_resource_address64
3680Sstevel@tonic-gate {
369*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
370*941Smyers     AML_RESOURCE_ADDRESS_COMMON
3710Sstevel@tonic-gate     UINT64                      Granularity;
372*941Smyers     UINT64                      Minimum;
373*941Smyers     UINT64                      Maximum;
3740Sstevel@tonic-gate     UINT64                      TranslationOffset;
3750Sstevel@tonic-gate     UINT64                      AddressLength;
3760Sstevel@tonic-gate 
377*941Smyers } AML_RESOURCE_ADDRESS64;
3780Sstevel@tonic-gate 
3790Sstevel@tonic-gate 
380*941Smyers typedef struct aml_resource_address32
3810Sstevel@tonic-gate {
382*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
383*941Smyers     AML_RESOURCE_ADDRESS_COMMON
3840Sstevel@tonic-gate     UINT32                      Granularity;
385*941Smyers     UINT32                      Minimum;
386*941Smyers     UINT32                      Maximum;
3870Sstevel@tonic-gate     UINT32                      TranslationOffset;
3880Sstevel@tonic-gate     UINT32                      AddressLength;
3890Sstevel@tonic-gate 
390*941Smyers } AML_RESOURCE_ADDRESS32;
3910Sstevel@tonic-gate 
3920Sstevel@tonic-gate 
393*941Smyers typedef struct aml_resource_address16
3940Sstevel@tonic-gate {
395*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
396*941Smyers     AML_RESOURCE_ADDRESS_COMMON
3970Sstevel@tonic-gate     UINT16                      Granularity;
398*941Smyers     UINT16                      Minimum;
399*941Smyers     UINT16                      Maximum;
4000Sstevel@tonic-gate     UINT16                      TranslationOffset;
4010Sstevel@tonic-gate     UINT16                      AddressLength;
4020Sstevel@tonic-gate 
403*941Smyers } AML_RESOURCE_ADDRESS16;
4040Sstevel@tonic-gate 
4050Sstevel@tonic-gate 
406*941Smyers typedef struct aml_resource_extended_irq
4070Sstevel@tonic-gate {
408*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
4090Sstevel@tonic-gate     UINT8                       Flags;
4100Sstevel@tonic-gate     UINT8                       TableLength;
4110Sstevel@tonic-gate     UINT32                      InterruptNumber[1];
4120Sstevel@tonic-gate     /* ResSourceIndex, ResSource optional fields follow */
4130Sstevel@tonic-gate 
414*941Smyers } AML_RESOURCE_EXTENDED_IRQ;
4150Sstevel@tonic-gate 
4160Sstevel@tonic-gate 
417*941Smyers typedef struct aml_resource_generic_register
4180Sstevel@tonic-gate {
419*941Smyers     AML_RESOURCE_LARGE_HEADER_COMMON
4200Sstevel@tonic-gate     UINT8                       AddressSpaceId;
4210Sstevel@tonic-gate     UINT8                       BitWidth;
4220Sstevel@tonic-gate     UINT8                       BitOffset;
423*941Smyers     UINT8                       AccessSize; /* ACPI 3.0, was previously Reserved */
4240Sstevel@tonic-gate     UINT64                      Address;
4250Sstevel@tonic-gate 
426*941Smyers } AML_RESOURCE_GENERIC_REGISTER;
4270Sstevel@tonic-gate 
4280Sstevel@tonic-gate /* restore default alignment */
4290Sstevel@tonic-gate 
4300Sstevel@tonic-gate #pragma pack()
4310Sstevel@tonic-gate 
4320Sstevel@tonic-gate /* Union of all resource descriptors, so we can allocate the worst case */
4330Sstevel@tonic-gate 
434*941Smyers typedef union aml_resource
4350Sstevel@tonic-gate {
436*941Smyers     /* Descriptor headers */
437*941Smyers 
438*941Smyers     AML_RESOURCE_SMALL_HEADER       SmallHeader;
439*941Smyers     AML_RESOURCE_LARGE_HEADER       LargeHeader;
440*941Smyers 
441*941Smyers     /* Small resource descriptors */
442*941Smyers 
443*941Smyers     AML_RESOURCE_IRQ                Irq;
444*941Smyers     AML_RESOURCE_DMA                Dma;
445*941Smyers     AML_RESOURCE_START_DEPENDENT    StartDpf;
446*941Smyers     AML_RESOURCE_END_DEPENDENT      EndDpf;
447*941Smyers     AML_RESOURCE_IO                 Io;
448*941Smyers     AML_RESOURCE_FIXED_IO           FixedIo;
449*941Smyers     AML_RESOURCE_VENDOR_SMALL       VendorSmall;
450*941Smyers     AML_RESOURCE_END_TAG            EndTag;
451*941Smyers 
452*941Smyers     /* Large resource descriptors */
4530Sstevel@tonic-gate 
454*941Smyers     AML_RESOURCE_MEMORY24           Memory24;
455*941Smyers     AML_RESOURCE_GENERIC_REGISTER   GenericReg;
456*941Smyers     AML_RESOURCE_VENDOR_LARGE       VendorLarge;
457*941Smyers     AML_RESOURCE_MEMORY32           Memory32;
458*941Smyers     AML_RESOURCE_FIXED_MEMORY32     FixedMemory32;
459*941Smyers     AML_RESOURCE_ADDRESS16          Address16;
460*941Smyers     AML_RESOURCE_ADDRESS32          Address32;
461*941Smyers     AML_RESOURCE_ADDRESS64          Address64;
462*941Smyers     AML_RESOURCE_EXTENDED_ADDRESS64 ExtAddress64;
463*941Smyers     AML_RESOURCE_EXTENDED_IRQ       ExtendedIrq;
4640Sstevel@tonic-gate 
465*941Smyers     /* Utility overlays */
466*941Smyers 
467*941Smyers     AML_RESOURCE_ADDRESS            Address;
468*941Smyers     UINT32                          U32Item;
469*941Smyers     UINT16                          U16Item;
470*941Smyers     UINT8                           U8Item;
471*941Smyers 
472*941Smyers } AML_RESOURCE;
4730Sstevel@tonic-gate 
4740Sstevel@tonic-gate 
4750Sstevel@tonic-gate #endif
4760Sstevel@tonic-gate 
477