amlresrc.h revision 207344
1100966Siwasaki
2100966Siwasaki/******************************************************************************
3100966Siwasaki *
4100966Siwasaki * Module Name: amlresrc.h - AML resource descriptors
5100966Siwasaki *
6100966Siwasaki *****************************************************************************/
7100966Siwasaki
8100966Siwasaki/******************************************************************************
9100966Siwasaki *
10100966Siwasaki * 1. Copyright Notice
11100966Siwasaki *
12202771Sjkim * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
13100966Siwasaki * All rights reserved.
14100966Siwasaki *
15100966Siwasaki * 2. License
16100966Siwasaki *
17100966Siwasaki * 2.1. This is your license from Intel Corp. under its intellectual property
18100966Siwasaki * rights.  You may have additional license terms from the party that provided
19100966Siwasaki * you this software, covering your right to use that party's intellectual
20100966Siwasaki * property rights.
21100966Siwasaki *
22100966Siwasaki * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23100966Siwasaki * copy of the source code appearing in this file ("Covered Code") an
24100966Siwasaki * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25100966Siwasaki * base code distributed originally by Intel ("Original Intel Code") to copy,
26100966Siwasaki * make derivatives, distribute, use and display any portion of the Covered
27100966Siwasaki * Code in any form, with the right to sublicense such rights; and
28100966Siwasaki *
29100966Siwasaki * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30100966Siwasaki * license (with the right to sublicense), under only those claims of Intel
31100966Siwasaki * patents that are infringed by the Original Intel Code, to make, use, sell,
32100966Siwasaki * offer to sell, and import the Covered Code and derivative works thereof
33100966Siwasaki * solely to the minimum extent necessary to exercise the above copyright
34100966Siwasaki * license, and in no event shall the patent license extend to any additions
35100966Siwasaki * to or modifications of the Original Intel Code.  No other license or right
36100966Siwasaki * is granted directly or by implication, estoppel or otherwise;
37100966Siwasaki *
38100966Siwasaki * The above copyright and patent license is granted only if the following
39100966Siwasaki * conditions are met:
40100966Siwasaki *
41100966Siwasaki * 3. Conditions
42100966Siwasaki *
43100966Siwasaki * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44100966Siwasaki * Redistribution of source code of any substantial portion of the Covered
45100966Siwasaki * Code or modification with rights to further distribute source must include
46100966Siwasaki * the above Copyright Notice, the above License, this list of Conditions,
47100966Siwasaki * and the following Disclaimer and Export Compliance provision.  In addition,
48100966Siwasaki * Licensee must cause all Covered Code to which Licensee contributes to
49100966Siwasaki * contain a file documenting the changes Licensee made to create that Covered
50100966Siwasaki * Code and the date of any change.  Licensee must include in that file the
51100966Siwasaki * documentation of any changes made by any predecessor Licensee.  Licensee
52100966Siwasaki * must include a prominent statement that the modification is derived,
53100966Siwasaki * directly or indirectly, from Original Intel Code.
54100966Siwasaki *
55100966Siwasaki * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56100966Siwasaki * Redistribution of source code of any substantial portion of the Covered
57100966Siwasaki * Code or modification without rights to further distribute source must
58100966Siwasaki * include the following Disclaimer and Export Compliance provision in the
59100966Siwasaki * documentation and/or other materials provided with distribution.  In
60100966Siwasaki * addition, Licensee may not authorize further sublicense of source of any
61100966Siwasaki * portion of the Covered Code, and must include terms to the effect that the
62100966Siwasaki * license from Licensee to its licensee is limited to the intellectual
63100966Siwasaki * property embodied in the software Licensee provides to its licensee, and
64100966Siwasaki * not to intellectual property embodied in modifications its licensee may
65100966Siwasaki * make.
66100966Siwasaki *
67100966Siwasaki * 3.3. Redistribution of Executable. Redistribution in executable form of any
68100966Siwasaki * substantial portion of the Covered Code or modification must reproduce the
69100966Siwasaki * above Copyright Notice, and the following Disclaimer and Export Compliance
70100966Siwasaki * provision in the documentation and/or other materials provided with the
71100966Siwasaki * distribution.
72100966Siwasaki *
73100966Siwasaki * 3.4. Intel retains all right, title, and interest in and to the Original
74100966Siwasaki * Intel Code.
75100966Siwasaki *
76100966Siwasaki * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77100966Siwasaki * Intel shall be used in advertising or otherwise to promote the sale, use or
78100966Siwasaki * other dealings in products derived from or relating to the Covered Code
79100966Siwasaki * without prior written authorization from Intel.
80100966Siwasaki *
81100966Siwasaki * 4. Disclaimer and Export Compliance
82100966Siwasaki *
83100966Siwasaki * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84100966Siwasaki * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85100966Siwasaki * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
86100966Siwasaki * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
87100966Siwasaki * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
88100966Siwasaki * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89100966Siwasaki * PARTICULAR PURPOSE.
90100966Siwasaki *
91100966Siwasaki * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92100966Siwasaki * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93100966Siwasaki * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94100966Siwasaki * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95100966Siwasaki * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96100966Siwasaki * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
97100966Siwasaki * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98100966Siwasaki * LIMITED REMEDY.
99100966Siwasaki *
100100966Siwasaki * 4.3. Licensee shall not export, either directly or indirectly, any of this
101100966Siwasaki * software or system incorporating such software without first obtaining any
102100966Siwasaki * required license or other approval from the U. S. Department of Commerce or
103100966Siwasaki * any other agency or department of the United States Government.  In the
104100966Siwasaki * event Licensee exports any such software from the United States or
105100966Siwasaki * re-exports any such software from a foreign destination, Licensee shall
106100966Siwasaki * ensure that the distribution and export/re-export of the software is in
107100966Siwasaki * compliance with all laws, regulations, orders, or other restrictions of the
108100966Siwasaki * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109100966Siwasaki * any of its subsidiaries will export/re-export any technical data, process,
110100966Siwasaki * software, or service, directly or indirectly, to any country for which the
111100966Siwasaki * United States government or any agency thereof requires an export license,
112100966Siwasaki * other governmental approval, or letter of assurance, without first obtaining
113100966Siwasaki * such license, approval or letter.
114100966Siwasaki *
115100966Siwasaki *****************************************************************************/
116100966Siwasaki
117167802Sjkim/* acpisrc:StructDefs -- for acpisrc conversion */
118100966Siwasaki
119100966Siwasaki#ifndef __AMLRESRC_H
120100966Siwasaki#define __AMLRESRC_H
121100966Siwasaki
122100966Siwasaki
123167802Sjkim/*
124167802Sjkim * Resource descriptor tags, as defined in the ACPI specification.
125167802Sjkim * Used to symbolically reference fields within a descriptor.
126167802Sjkim */
127167802Sjkim#define ACPI_RESTAG_ADDRESS                     "_ADR"
128167802Sjkim#define ACPI_RESTAG_ALIGNMENT                   "_ALN"
129167802Sjkim#define ACPI_RESTAG_ADDRESSSPACE                "_ASI"
130167802Sjkim#define ACPI_RESTAG_ACCESSSIZE                  "_ASZ"
131167802Sjkim#define ACPI_RESTAG_TYPESPECIFICATTRIBUTES      "_ATT"
132167802Sjkim#define ACPI_RESTAG_BASEADDRESS                 "_BAS"
133167802Sjkim#define ACPI_RESTAG_BUSMASTER                   "_BM_"  /* Master(1), Slave(0) */
134167802Sjkim#define ACPI_RESTAG_DECODE                      "_DEC"
135167802Sjkim#define ACPI_RESTAG_DMA                         "_DMA"
136167802Sjkim#define ACPI_RESTAG_DMATYPE                     "_TYP"  /* Compatible(0), A(1), B(2), F(3) */
137167802Sjkim#define ACPI_RESTAG_GRANULARITY                 "_GRA"
138167802Sjkim#define ACPI_RESTAG_INTERRUPT                   "_INT"
139167802Sjkim#define ACPI_RESTAG_INTERRUPTLEVEL              "_LL_"  /* ActiveLo(1), ActiveHi(0) */
140167802Sjkim#define ACPI_RESTAG_INTERRUPTSHARE              "_SHR"  /* Shareable(1), NoShare(0) */
141167802Sjkim#define ACPI_RESTAG_INTERRUPTTYPE               "_HE_"  /* Edge(1), Level(0) */
142167802Sjkim#define ACPI_RESTAG_LENGTH                      "_LEN"
143167802Sjkim#define ACPI_RESTAG_MEMATTRIBUTES               "_MTP"  /* Memory(0), Reserved(1), ACPI(2), NVS(3) */
144167802Sjkim#define ACPI_RESTAG_MEMTYPE                     "_MEM"  /* NonCache(0), Cacheable(1) Cache+combine(2), Cache+prefetch(3) */
145167802Sjkim#define ACPI_RESTAG_MAXADDR                     "_MAX"
146167802Sjkim#define ACPI_RESTAG_MINADDR                     "_MIN"
147167802Sjkim#define ACPI_RESTAG_MAXTYPE                     "_MAF"
148167802Sjkim#define ACPI_RESTAG_MINTYPE                     "_MIF"
149167802Sjkim#define ACPI_RESTAG_REGISTERBITOFFSET           "_RBO"
150167802Sjkim#define ACPI_RESTAG_REGISTERBITWIDTH            "_RBW"
151167802Sjkim#define ACPI_RESTAG_RANGETYPE                   "_RNG"
152167802Sjkim#define ACPI_RESTAG_READWRITETYPE               "_RW_"  /* ReadOnly(0), Writeable (1) */
153167802Sjkim#define ACPI_RESTAG_TRANSLATION                 "_TRA"
154167802Sjkim#define ACPI_RESTAG_TRANSTYPE                   "_TRS"  /* Sparse(1), Dense(0) */
155167802Sjkim#define ACPI_RESTAG_TYPE                        "_TTP"  /* Translation(1), Static (0) */
156167802Sjkim#define ACPI_RESTAG_XFERTYPE                    "_SIZ"  /* 8(0), 8And16(1), 16(2) */
157100966Siwasaki
158100966Siwasaki
159100966Siwasaki/* Default sizes for "small" resource descriptors */
160100966Siwasaki
161100966Siwasaki#define ASL_RDESC_IRQ_SIZE                      0x02
162100966Siwasaki#define ASL_RDESC_DMA_SIZE                      0x02
163100966Siwasaki#define ASL_RDESC_ST_DEPEND_SIZE                0x00
164100966Siwasaki#define ASL_RDESC_END_DEPEND_SIZE               0x00
165100966Siwasaki#define ASL_RDESC_IO_SIZE                       0x07
166100966Siwasaki#define ASL_RDESC_FIXED_IO_SIZE                 0x03
167100966Siwasaki#define ASL_RDESC_END_TAG_SIZE                  0x01
168100966Siwasaki
169100966Siwasaki
170100966Siwasakitypedef struct asl_resource_node
171100966Siwasaki{
172167802Sjkim    UINT32                          BufferLength;
173167802Sjkim    void                            *Buffer;
174167802Sjkim    struct asl_resource_node        *Next;
175100966Siwasaki
176100966Siwasaki} ASL_RESOURCE_NODE;
177100966Siwasaki
178100966Siwasaki
179167802Sjkim/* Macros used to generate AML resource length fields */
180167802Sjkim
181167802Sjkim#define ACPI_AML_SIZE_LARGE(r)      (sizeof (r) - sizeof (AML_RESOURCE_LARGE_HEADER))
182167802Sjkim#define ACPI_AML_SIZE_SMALL(r)      (sizeof (r) - sizeof (AML_RESOURCE_SMALL_HEADER))
183167802Sjkim
184100966Siwasaki/*
185100966Siwasaki * Resource descriptors defined in the ACPI specification.
186100966Siwasaki *
187138287Smarks * Packing/alignment must be BYTE because these descriptors
188151937Sjkim * are used to overlay the raw AML byte stream.
189100966Siwasaki */
190100966Siwasaki#pragma pack(1)
191100966Siwasaki
192151937Sjkim/*
193151937Sjkim * SMALL descriptors
194151937Sjkim */
195151937Sjkim#define AML_RESOURCE_SMALL_HEADER_COMMON \
196167802Sjkim    UINT8                           DescriptorType;
197151937Sjkim
198151937Sjkimtypedef struct aml_resource_small_header
199100966Siwasaki{
200151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
201151937Sjkim
202151937Sjkim} AML_RESOURCE_SMALL_HEADER;
203151937Sjkim
204151937Sjkim
205151937Sjkimtypedef struct aml_resource_irq
206151937Sjkim{
207151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
208167802Sjkim    UINT16                          IrqMask;
209167802Sjkim    UINT8                           Flags;
210100966Siwasaki
211151937Sjkim} AML_RESOURCE_IRQ;
212100966Siwasaki
213100966Siwasaki
214151937Sjkimtypedef struct aml_resource_irq_noflags
215100966Siwasaki{
216151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
217167802Sjkim    UINT16                          IrqMask;
218100966Siwasaki
219151937Sjkim} AML_RESOURCE_IRQ_NOFLAGS;
220100966Siwasaki
221100966Siwasaki
222151937Sjkimtypedef struct aml_resource_dma
223100966Siwasaki{
224151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
225167802Sjkim    UINT8                           DmaChannelMask;
226167802Sjkim    UINT8                           Flags;
227100966Siwasaki
228151937Sjkim} AML_RESOURCE_DMA;
229100966Siwasaki
230100966Siwasaki
231151937Sjkimtypedef struct aml_resource_start_dependent
232100966Siwasaki{
233151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
234167802Sjkim    UINT8                           Flags;
235100966Siwasaki
236151937Sjkim} AML_RESOURCE_START_DEPENDENT;
237100966Siwasaki
238100966Siwasaki
239151937Sjkimtypedef struct aml_resource_start_dependent_noprio
240100966Siwasaki{
241151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
242100966Siwasaki
243151937Sjkim} AML_RESOURCE_START_DEPENDENT_NOPRIO;
244100966Siwasaki
245100966Siwasaki
246151937Sjkimtypedef struct aml_resource_end_dependent
247100966Siwasaki{
248151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
249100966Siwasaki
250151937Sjkim} AML_RESOURCE_END_DEPENDENT;
251100966Siwasaki
252100966Siwasaki
253151937Sjkimtypedef struct aml_resource_io
254100966Siwasaki{
255151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
256167802Sjkim    UINT8                           Flags;
257167802Sjkim    UINT16                          Minimum;
258167802Sjkim    UINT16                          Maximum;
259167802Sjkim    UINT8                           Alignment;
260167802Sjkim    UINT8                           AddressLength;
261100966Siwasaki
262151937Sjkim} AML_RESOURCE_IO;
263100966Siwasaki
264100966Siwasaki
265151937Sjkimtypedef struct aml_resource_fixed_io
266100966Siwasaki{
267151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
268167802Sjkim    UINT16                          Address;
269167802Sjkim    UINT8                           AddressLength;
270100966Siwasaki
271151937Sjkim} AML_RESOURCE_FIXED_IO;
272100966Siwasaki
273100966Siwasaki
274151937Sjkimtypedef struct aml_resource_vendor_small
275100966Siwasaki{
276151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
277100966Siwasaki
278151937Sjkim} AML_RESOURCE_VENDOR_SMALL;
279100966Siwasaki
280100966Siwasaki
281151937Sjkimtypedef struct aml_resource_end_tag
282100966Siwasaki{
283151937Sjkim    AML_RESOURCE_SMALL_HEADER_COMMON
284167802Sjkim    UINT8                           Checksum;
285100966Siwasaki
286151937Sjkim} AML_RESOURCE_END_TAG;
287100966Siwasaki
288100966Siwasaki
289151937Sjkim/*
290151937Sjkim * LARGE descriptors
291151937Sjkim */
292151937Sjkim#define AML_RESOURCE_LARGE_HEADER_COMMON \
293167802Sjkim    UINT8                           DescriptorType;\
294167802Sjkim    UINT16                          ResourceLength;
295100966Siwasaki
296151937Sjkimtypedef struct aml_resource_large_header
297100966Siwasaki{
298151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
299151937Sjkim
300151937Sjkim} AML_RESOURCE_LARGE_HEADER;
301151937Sjkim
302151937Sjkim
303207344Sjkim/* General Flags for address space resource descriptors */
304207344Sjkim
305207344Sjkim#define ACPI_RESOURCE_FLAG_DEC      2
306207344Sjkim#define ACPI_RESOURCE_FLAG_MIF      4
307207344Sjkim#define ACPI_RESOURCE_FLAG_MAF      8
308207344Sjkim
309151937Sjkimtypedef struct aml_resource_memory24
310151937Sjkim{
311151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
312167802Sjkim    UINT8                           Flags;
313167802Sjkim    UINT16                          Minimum;
314167802Sjkim    UINT16                          Maximum;
315167802Sjkim    UINT16                          Alignment;
316167802Sjkim    UINT16                          AddressLength;
317100966Siwasaki
318151937Sjkim} AML_RESOURCE_MEMORY24;
319100966Siwasaki
320100966Siwasaki
321151937Sjkimtypedef struct aml_resource_vendor_large
322100966Siwasaki{
323151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
324100966Siwasaki
325151937Sjkim} AML_RESOURCE_VENDOR_LARGE;
326100966Siwasaki
327100966Siwasaki
328151937Sjkimtypedef struct aml_resource_memory32
329100966Siwasaki{
330151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
331167802Sjkim    UINT8                           Flags;
332167802Sjkim    UINT32                          Minimum;
333167802Sjkim    UINT32                          Maximum;
334167802Sjkim    UINT32                          Alignment;
335167802Sjkim    UINT32                          AddressLength;
336100966Siwasaki
337151937Sjkim} AML_RESOURCE_MEMORY32;
338100966Siwasaki
339100966Siwasaki
340151937Sjkimtypedef struct aml_resource_fixed_memory32
341100966Siwasaki{
342151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
343167802Sjkim    UINT8                           Flags;
344167802Sjkim    UINT32                          Address;
345167802Sjkim    UINT32                          AddressLength;
346100966Siwasaki
347151937Sjkim} AML_RESOURCE_FIXED_MEMORY32;
348100966Siwasaki
349100966Siwasaki
350151937Sjkim#define AML_RESOURCE_ADDRESS_COMMON \
351167802Sjkim    UINT8                           ResourceType; \
352167802Sjkim    UINT8                           Flags; \
353167802Sjkim    UINT8                           SpecificFlags;
354151937Sjkim
355151937Sjkim
356151937Sjkimtypedef struct aml_resource_address
357100966Siwasaki{
358151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
359151937Sjkim    AML_RESOURCE_ADDRESS_COMMON
360151937Sjkim
361151937Sjkim} AML_RESOURCE_ADDRESS;
362151937Sjkim
363151937Sjkim
364151937Sjkimtypedef struct aml_resource_extended_address64
365151937Sjkim{
366151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
367151937Sjkim    AML_RESOURCE_ADDRESS_COMMON
368167802Sjkim    UINT8                           RevisionID;
369167802Sjkim    UINT8                           Reserved;
370167802Sjkim    UINT64                          Granularity;
371167802Sjkim    UINT64                          Minimum;
372167802Sjkim    UINT64                          Maximum;
373167802Sjkim    UINT64                          TranslationOffset;
374167802Sjkim    UINT64                          AddressLength;
375167802Sjkim    UINT64                          TypeSpecific;
376100966Siwasaki
377151937Sjkim} AML_RESOURCE_EXTENDED_ADDRESS64;
378100966Siwasaki
379151937Sjkim#define AML_RESOURCE_EXTENDED_ADDRESS_REVISION          1       /* ACPI 3.0 */
380100966Siwasaki
381151937Sjkim
382151937Sjkimtypedef struct aml_resource_address64
383100966Siwasaki{
384151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
385151937Sjkim    AML_RESOURCE_ADDRESS_COMMON
386167802Sjkim    UINT64                          Granularity;
387167802Sjkim    UINT64                          Minimum;
388167802Sjkim    UINT64                          Maximum;
389167802Sjkim    UINT64                          TranslationOffset;
390167802Sjkim    UINT64                          AddressLength;
391151937Sjkim
392151937Sjkim} AML_RESOURCE_ADDRESS64;
393151937Sjkim
394151937Sjkim
395151937Sjkimtypedef struct aml_resource_address32
396151937Sjkim{
397151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
398151937Sjkim    AML_RESOURCE_ADDRESS_COMMON
399167802Sjkim    UINT32                          Granularity;
400167802Sjkim    UINT32                          Minimum;
401167802Sjkim    UINT32                          Maximum;
402167802Sjkim    UINT32                          TranslationOffset;
403167802Sjkim    UINT32                          AddressLength;
404100966Siwasaki
405151937Sjkim} AML_RESOURCE_ADDRESS32;
406100966Siwasaki
407100966Siwasaki
408151937Sjkimtypedef struct aml_resource_address16
409100966Siwasaki{
410151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
411151937Sjkim    AML_RESOURCE_ADDRESS_COMMON
412167802Sjkim    UINT16                          Granularity;
413167802Sjkim    UINT16                          Minimum;
414167802Sjkim    UINT16                          Maximum;
415167802Sjkim    UINT16                          TranslationOffset;
416167802Sjkim    UINT16                          AddressLength;
417100966Siwasaki
418151937Sjkim} AML_RESOURCE_ADDRESS16;
419100966Siwasaki
420100966Siwasaki
421151937Sjkimtypedef struct aml_resource_extended_irq
422100966Siwasaki{
423151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
424167802Sjkim    UINT8                           Flags;
425167802Sjkim    UINT8                           InterruptCount;
426167802Sjkim    UINT32                          Interrupts[1];
427100966Siwasaki    /* ResSourceIndex, ResSource optional fields follow */
428100966Siwasaki
429151937Sjkim} AML_RESOURCE_EXTENDED_IRQ;
430100966Siwasaki
431100966Siwasaki
432151937Sjkimtypedef struct aml_resource_generic_register
433100966Siwasaki{
434151937Sjkim    AML_RESOURCE_LARGE_HEADER_COMMON
435167802Sjkim    UINT8                           AddressSpaceId;
436167802Sjkim    UINT8                           BitWidth;
437167802Sjkim    UINT8                           BitOffset;
438167802Sjkim    UINT8                           AccessSize; /* ACPI 3.0, was previously Reserved */
439167802Sjkim    UINT64                          Address;
440100966Siwasaki
441151937Sjkim} AML_RESOURCE_GENERIC_REGISTER;
442100966Siwasaki
443100966Siwasaki/* restore default alignment */
444100966Siwasaki
445100966Siwasaki#pragma pack()
446100966Siwasaki
447138287Smarks/* Union of all resource descriptors, so we can allocate the worst case */
448100966Siwasaki
449151937Sjkimtypedef union aml_resource
450100966Siwasaki{
451151937Sjkim    /* Descriptor headers */
452100966Siwasaki
453167802Sjkim    UINT8                                   DescriptorType;
454167802Sjkim    AML_RESOURCE_SMALL_HEADER               SmallHeader;
455167802Sjkim    AML_RESOURCE_LARGE_HEADER               LargeHeader;
456100966Siwasaki
457151937Sjkim    /* Small resource descriptors */
458100966Siwasaki
459167802Sjkim    AML_RESOURCE_IRQ                        Irq;
460167802Sjkim    AML_RESOURCE_DMA                        Dma;
461167802Sjkim    AML_RESOURCE_START_DEPENDENT            StartDpf;
462167802Sjkim    AML_RESOURCE_END_DEPENDENT              EndDpf;
463167802Sjkim    AML_RESOURCE_IO                         Io;
464167802Sjkim    AML_RESOURCE_FIXED_IO                   FixedIo;
465167802Sjkim    AML_RESOURCE_VENDOR_SMALL               VendorSmall;
466167802Sjkim    AML_RESOURCE_END_TAG                    EndTag;
467100966Siwasaki
468151937Sjkim    /* Large resource descriptors */
469151937Sjkim
470167802Sjkim    AML_RESOURCE_MEMORY24                   Memory24;
471167802Sjkim    AML_RESOURCE_GENERIC_REGISTER           GenericReg;
472167802Sjkim    AML_RESOURCE_VENDOR_LARGE               VendorLarge;
473167802Sjkim    AML_RESOURCE_MEMORY32                   Memory32;
474167802Sjkim    AML_RESOURCE_FIXED_MEMORY32             FixedMemory32;
475167802Sjkim    AML_RESOURCE_ADDRESS16                  Address16;
476167802Sjkim    AML_RESOURCE_ADDRESS32                  Address32;
477167802Sjkim    AML_RESOURCE_ADDRESS64                  Address64;
478167802Sjkim    AML_RESOURCE_EXTENDED_ADDRESS64         ExtAddress64;
479167802Sjkim    AML_RESOURCE_EXTENDED_IRQ               ExtendedIrq;
480151937Sjkim
481151937Sjkim    /* Utility overlays */
482151937Sjkim
483167802Sjkim    AML_RESOURCE_ADDRESS                    Address;
484167802Sjkim    UINT32                                  DwordItem;
485167802Sjkim    UINT16                                  WordItem;
486167802Sjkim    UINT8                                   ByteItem;
487151937Sjkim
488151937Sjkim} AML_RESOURCE;
489151937Sjkim
490100966Siwasaki#endif
491100966Siwasaki
492