acresrc.h revision 316303
167754Smsmith/******************************************************************************
267754Smsmith *
367754Smsmith * Name: acresrc.h - Resource Manager function prototypes
467754Smsmith *
567754Smsmith *****************************************************************************/
667754Smsmith
7316303Sjkim/******************************************************************************
8316303Sjkim *
9316303Sjkim * 1. Copyright Notice
10316303Sjkim *
11316303Sjkim * Some or all of this work - Copyright (c) 1999 - 2017, Intel Corp.
1270243Smsmith * All rights reserved.
1367754Smsmith *
14316303Sjkim * 2. License
15316303Sjkim *
16316303Sjkim * 2.1. This is your license from Intel Corp. under its intellectual property
17316303Sjkim * rights. You may have additional license terms from the party that provided
18316303Sjkim * you this software, covering your right to use that party's intellectual
19316303Sjkim * property rights.
20316303Sjkim *
21316303Sjkim * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22316303Sjkim * copy of the source code appearing in this file ("Covered Code") an
23316303Sjkim * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24316303Sjkim * base code distributed originally by Intel ("Original Intel Code") to copy,
25316303Sjkim
26316303Sjkim * make derivatives, distribute, use and display any portion of the Covered
27316303Sjkim * Code in any form, with the right to sublicense such rights; and
28316303Sjkim *
29316303Sjkim * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30316303Sjkim * license (with the right to sublicense), under only those claims of Intel
31316303Sjkim * patents that are infringed by the Original Intel Code, to make, use, sell,
32316303Sjkim * offer to sell, and import the Covered Code and derivative works thereof
33316303Sjkim * solely to the minimum extent necessary to exercise the above copyright
34316303Sjkim * license, and in no event shall the patent license extend to any additions
35316303Sjkim * to or modifications of the Original Intel Code. No other license or right
36316303Sjkim * is granted directly or by implication, estoppel or otherwise;
37316303Sjkim *
38316303Sjkim * The above copyright and patent license is granted only if the following
39316303Sjkim * conditions are met:
40316303Sjkim *
41316303Sjkim * 3. Conditions
42316303Sjkim *
43316303Sjkim * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44316303Sjkim * Redistribution of source code of any substantial portion of the Covered
45316303Sjkim * Code or modification with rights to further distribute source must include
46316303Sjkim * the above Copyright Notice, the above License, this list of Conditions,
47316303Sjkim * and the following Disclaimer and Export Compliance provision. In addition,
48316303Sjkim * Licensee must cause all Covered Code to which Licensee contributes to
49316303Sjkim * contain a file documenting the changes Licensee made to create that Covered
50316303Sjkim * Code and the date of any change. Licensee must include in that file the
51316303Sjkim * documentation of any changes made by any predecessor Licensee. Licensee
52316303Sjkim * must include a prominent statement that the modification is derived,
53316303Sjkim * directly or indirectly, from Original Intel Code.
54316303Sjkim *
55316303Sjkim * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56316303Sjkim * Redistribution of source code of any substantial portion of the Covered
57316303Sjkim * Code or modification without rights to further distribute source must
58316303Sjkim * include the following Disclaimer and Export Compliance provision in the
59316303Sjkim * documentation and/or other materials provided with distribution. In
60316303Sjkim * addition, Licensee may not authorize further sublicense of source of any
61316303Sjkim * portion of the Covered Code, and must include terms to the effect that the
62316303Sjkim * license from Licensee to its licensee is limited to the intellectual
63316303Sjkim * property embodied in the software Licensee provides to its licensee, and
64316303Sjkim * not to intellectual property embodied in modifications its licensee may
65316303Sjkim * make.
66316303Sjkim *
67316303Sjkim * 3.3. Redistribution of Executable. Redistribution in executable form of any
68316303Sjkim * substantial portion of the Covered Code or modification must reproduce the
69316303Sjkim * above Copyright Notice, and the following Disclaimer and Export Compliance
70316303Sjkim * provision in the documentation and/or other materials provided with the
71316303Sjkim * distribution.
72316303Sjkim *
73316303Sjkim * 3.4. Intel retains all right, title, and interest in and to the Original
74316303Sjkim * Intel Code.
75316303Sjkim *
76316303Sjkim * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77316303Sjkim * Intel shall be used in advertising or otherwise to promote the sale, use or
78316303Sjkim * other dealings in products derived from or relating to the Covered Code
79316303Sjkim * without prior written authorization from Intel.
80316303Sjkim *
81316303Sjkim * 4. Disclaimer and Export Compliance
82316303Sjkim *
83316303Sjkim * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84316303Sjkim * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85316303Sjkim * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
86316303Sjkim * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
87316303Sjkim * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
88316303Sjkim * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89316303Sjkim * PARTICULAR PURPOSE.
90316303Sjkim *
91316303Sjkim * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92316303Sjkim * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93316303Sjkim * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94316303Sjkim * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95316303Sjkim * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96316303Sjkim * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
97316303Sjkim * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98316303Sjkim * LIMITED REMEDY.
99316303Sjkim *
100316303Sjkim * 4.3. Licensee shall not export, either directly or indirectly, any of this
101316303Sjkim * software or system incorporating such software without first obtaining any
102316303Sjkim * required license or other approval from the U. S. Department of Commerce or
103316303Sjkim * any other agency or department of the United States Government. In the
104316303Sjkim * event Licensee exports any such software from the United States or
105316303Sjkim * re-exports any such software from a foreign destination, Licensee shall
106316303Sjkim * ensure that the distribution and export/re-export of the software is in
107316303Sjkim * compliance with all laws, regulations, orders, or other restrictions of the
108316303Sjkim * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109316303Sjkim * any of its subsidiaries will export/re-export any technical data, process,
110316303Sjkim * software, or service, directly or indirectly, to any country for which the
111316303Sjkim * United States government or any agency thereof requires an export license,
112316303Sjkim * other governmental approval, or letter of assurance, without first obtaining
113316303Sjkim * such license, approval or letter.
114316303Sjkim *
115316303Sjkim *****************************************************************************
116316303Sjkim *
117316303Sjkim * Alternatively, you may choose to be licensed under the terms of the
118316303Sjkim * following license:
119316303Sjkim *
120217365Sjkim * Redistribution and use in source and binary forms, with or without
121217365Sjkim * modification, are permitted provided that the following conditions
122217365Sjkim * are met:
123217365Sjkim * 1. Redistributions of source code must retain the above copyright
124217365Sjkim *    notice, this list of conditions, and the following disclaimer,
125217365Sjkim *    without modification.
126217365Sjkim * 2. Redistributions in binary form must reproduce at minimum a disclaimer
127217365Sjkim *    substantially similar to the "NO WARRANTY" disclaimer below
128217365Sjkim *    ("Disclaimer") and any redistribution must be conditioned upon
129217365Sjkim *    including a substantially similar Disclaimer requirement for further
130217365Sjkim *    binary redistribution.
131217365Sjkim * 3. Neither the names of the above-listed copyright holders nor the names
132217365Sjkim *    of any contributors may be used to endorse or promote products derived
133217365Sjkim *    from this software without specific prior written permission.
13467754Smsmith *
135316303Sjkim * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
136316303Sjkim * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
137316303Sjkim * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
138316303Sjkim * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
139316303Sjkim * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
140316303Sjkim * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
141316303Sjkim * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
142316303Sjkim * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
143316303Sjkim * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
144316303Sjkim * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
145316303Sjkim * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146316303Sjkim *
147316303Sjkim * Alternatively, you may choose to be licensed under the terms of the
148217365Sjkim * GNU General Public License ("GPL") version 2 as published by the Free
149217365Sjkim * Software Foundation.
15067754Smsmith *
151316303Sjkim *****************************************************************************/
15267754Smsmith
15367754Smsmith#ifndef __ACRESRC_H__
15467754Smsmith#define __ACRESRC_H__
15567754Smsmith
156151937Sjkim/* Need the AML resource descriptor structs */
15767754Smsmith
158193341Sjkim#include <contrib/dev/acpica/include/amlresrc.h>
159151937Sjkim
160151937Sjkim
16167754Smsmith/*
162151937Sjkim * If possible, pack the following structures to byte alignment, since we
163167802Sjkim * don't care about performance for debug output. Two cases where we cannot
164167802Sjkim * pack the structures:
165167802Sjkim *
166167802Sjkim * 1) Hardware does not support misaligned memory transfers
167167802Sjkim * 2) Compiler does not support pointers within packed structures
16867754Smsmith */
169167802Sjkim#if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
170151937Sjkim#pragma pack(1)
171151937Sjkim#endif
17267754Smsmith
173151937Sjkim/*
174151937Sjkim * Individual entry for the resource conversion tables
175151937Sjkim */
176151937Sjkimtypedef const struct acpi_rsconvert_info
177151937Sjkim{
178151937Sjkim    UINT8                   Opcode;
179151937Sjkim    UINT8                   ResourceOffset;
180151937Sjkim    UINT8                   AmlOffset;
181151937Sjkim    UINT8                   Value;
18267754Smsmith
183151937Sjkim} ACPI_RSCONVERT_INFO;
18467754Smsmith
185151937Sjkim/* Resource conversion opcodes */
18667754Smsmith
187228110Sjkimtypedef enum
188228110Sjkim{
189228110Sjkim    ACPI_RSC_INITGET        = 0,
190228110Sjkim    ACPI_RSC_INITSET,
191228110Sjkim    ACPI_RSC_FLAGINIT,
192228110Sjkim    ACPI_RSC_1BITFLAG,
193228110Sjkim    ACPI_RSC_2BITFLAG,
194228110Sjkim    ACPI_RSC_3BITFLAG,
195228110Sjkim    ACPI_RSC_ADDRESS,
196228110Sjkim    ACPI_RSC_BITMASK,
197228110Sjkim    ACPI_RSC_BITMASK16,
198228110Sjkim    ACPI_RSC_COUNT,
199228110Sjkim    ACPI_RSC_COUNT16,
200228110Sjkim    ACPI_RSC_COUNT_GPIO_PIN,
201228110Sjkim    ACPI_RSC_COUNT_GPIO_RES,
202228110Sjkim    ACPI_RSC_COUNT_GPIO_VEN,
203228110Sjkim    ACPI_RSC_COUNT_SERIAL_RES,
204228110Sjkim    ACPI_RSC_COUNT_SERIAL_VEN,
205228110Sjkim    ACPI_RSC_DATA8,
206228110Sjkim    ACPI_RSC_EXIT_EQ,
207228110Sjkim    ACPI_RSC_EXIT_LE,
208228110Sjkim    ACPI_RSC_EXIT_NE,
209228110Sjkim    ACPI_RSC_LENGTH,
210228110Sjkim    ACPI_RSC_MOVE_GPIO_PIN,
211228110Sjkim    ACPI_RSC_MOVE_GPIO_RES,
212228110Sjkim    ACPI_RSC_MOVE_SERIAL_RES,
213228110Sjkim    ACPI_RSC_MOVE_SERIAL_VEN,
214228110Sjkim    ACPI_RSC_MOVE8,
215228110Sjkim    ACPI_RSC_MOVE16,
216228110Sjkim    ACPI_RSC_MOVE32,
217228110Sjkim    ACPI_RSC_MOVE64,
218228110Sjkim    ACPI_RSC_SET8,
219228110Sjkim    ACPI_RSC_SOURCE,
220228110Sjkim    ACPI_RSC_SOURCEX
22167754Smsmith
222228110Sjkim} ACPI_RSCONVERT_OPCODES;
223228110Sjkim
224151937Sjkim/* Resource Conversion sub-opcodes */
225114237Snjl
226151937Sjkim#define ACPI_RSC_COMPARE_AML_LENGTH     0
227151937Sjkim#define ACPI_RSC_COMPARE_VALUE          1
22867754Smsmith
229151937Sjkim#define ACPI_RSC_TABLE_SIZE(d)          (sizeof (d) / sizeof (ACPI_RSCONVERT_INFO))
23067754Smsmith
231151937Sjkim#define ACPI_RS_OFFSET(f)               (UINT8) ACPI_OFFSET (ACPI_RESOURCE,f)
232151937Sjkim#define AML_OFFSET(f)                   (UINT8) ACPI_OFFSET (AML_RESOURCE,f)
23367754Smsmith
23467754Smsmith
235228110Sjkim/*
236228110Sjkim * Individual entry for the resource dump tables
237228110Sjkim */
238151937Sjkimtypedef const struct acpi_rsdump_info
239151937Sjkim{
240151937Sjkim    UINT8                   Opcode;
241151937Sjkim    UINT8                   Offset;
242298714Sjkim    const char              *Name;
243167802Sjkim    const char              **Pointer;
24499679Siwasaki
245151937Sjkim} ACPI_RSDUMP_INFO;
246102550Siwasaki
247151937Sjkim/* Values for the Opcode field above */
24899679Siwasaki
249228110Sjkimtypedef enum
250228110Sjkim{
251228110Sjkim    ACPI_RSD_TITLE          = 0,
252228110Sjkim    ACPI_RSD_1BITFLAG,
253228110Sjkim    ACPI_RSD_2BITFLAG,
254228110Sjkim    ACPI_RSD_3BITFLAG,
255228110Sjkim    ACPI_RSD_ADDRESS,
256228110Sjkim    ACPI_RSD_DWORDLIST,
257228110Sjkim    ACPI_RSD_LITERAL,
258228110Sjkim    ACPI_RSD_LONGLIST,
259228110Sjkim    ACPI_RSD_SHORTLIST,
260228110Sjkim    ACPI_RSD_SHORTLISTX,
261228110Sjkim    ACPI_RSD_SOURCE,
262228110Sjkim    ACPI_RSD_STRING,
263228110Sjkim    ACPI_RSD_UINT8,
264228110Sjkim    ACPI_RSD_UINT16,
265228110Sjkim    ACPI_RSD_UINT32,
266228110Sjkim    ACPI_RSD_UINT64,
267228110Sjkim    ACPI_RSD_WORDLIST
26899679Siwasaki
269228110Sjkim} ACPI_RSDUMP_OPCODES;
270228110Sjkim
271151937Sjkim/* restore default alignment */
27299679Siwasaki
273151937Sjkim#pragma pack()
27499679Siwasaki
27599679Siwasaki
276151937Sjkim/* Resource tables indexed by internal resource type */
27799679Siwasaki
278151937Sjkimextern const UINT8              AcpiGbl_AmlResourceSizes[];
279228110Sjkimextern const UINT8              AcpiGbl_AmlResourceSerialBusSizes[];
280151937Sjkimextern ACPI_RSCONVERT_INFO      *AcpiGbl_SetResourceDispatch[];
28199679Siwasaki
282151937Sjkim/* Resource tables indexed by raw AML resource descriptor type */
28367754Smsmith
284167802Sjkimextern const UINT8              AcpiGbl_ResourceStructSizes[];
285228110Sjkimextern const UINT8              AcpiGbl_ResourceStructSerialBusSizes[];
286167802Sjkimextern ACPI_RSCONVERT_INFO      *AcpiGbl_GetResourceDispatch[];
28767754Smsmith
288228110Sjkimextern ACPI_RSCONVERT_INFO      *AcpiGbl_ConvertResourceSerialBusDispatch[];
28967754Smsmith
290167802Sjkimtypedef struct acpi_vendor_walk_info
291167802Sjkim{
292167802Sjkim    ACPI_VENDOR_UUID        *Uuid;
293167802Sjkim    ACPI_BUFFER             *Buffer;
294167802Sjkim    ACPI_STATUS             Status;
295167802Sjkim
296167802Sjkim} ACPI_VENDOR_WALK_INFO;
297167802Sjkim
298167802Sjkim
299151937Sjkim/*
300151937Sjkim * rscreate
301151937Sjkim */
30267754SmsmithACPI_STATUS
303151937SjkimAcpiRsCreateResourceList (
304151937Sjkim    ACPI_OPERAND_OBJECT     *AmlBuffer,
305151937Sjkim    ACPI_BUFFER             *OutputBuffer);
30667754Smsmith
30767754SmsmithACPI_STATUS
308151937SjkimAcpiRsCreateAmlResources (
309272444Sjkim    ACPI_BUFFER             *ResourceList,
310151937Sjkim    ACPI_BUFFER             *OutputBuffer);
31167754Smsmith
31267754SmsmithACPI_STATUS
313151937SjkimAcpiRsCreatePciRoutingTable (
31467754Smsmith    ACPI_OPERAND_OBJECT     *PackageObject,
315151937Sjkim    ACPI_BUFFER             *OutputBuffer);
31667754Smsmith
31767754Smsmith
318151937Sjkim/*
319151937Sjkim * rsutils
320151937Sjkim */
32167754SmsmithACPI_STATUS
322151937SjkimAcpiRsGetPrtMethodData (
323167802Sjkim    ACPI_NAMESPACE_NODE     *Node,
324151937Sjkim    ACPI_BUFFER             *RetBuffer);
32567754Smsmith
32667754SmsmithACPI_STATUS
327151937SjkimAcpiRsGetCrsMethodData (
328167802Sjkim    ACPI_NAMESPACE_NODE     *Node,
329151937Sjkim    ACPI_BUFFER             *RetBuffer);
33067754Smsmith
33167754SmsmithACPI_STATUS
332151937SjkimAcpiRsGetPrsMethodData (
333167802Sjkim    ACPI_NAMESPACE_NODE     *Node,
334151937Sjkim    ACPI_BUFFER             *RetBuffer);
33567754Smsmith
33667754SmsmithACPI_STATUS
337151937SjkimAcpiRsGetMethodData (
338151937Sjkim    ACPI_HANDLE             Handle,
339298714Sjkim    const char              *Path,
340151937Sjkim    ACPI_BUFFER             *RetBuffer);
34167754Smsmith
34267754SmsmithACPI_STATUS
343151937SjkimAcpiRsSetSrsMethodData (
344167802Sjkim    ACPI_NAMESPACE_NODE     *Node,
345151937Sjkim    ACPI_BUFFER             *RetBuffer);
34667754Smsmith
347228110SjkimACPI_STATUS
348228110SjkimAcpiRsGetAeiMethodData (
349228110Sjkim    ACPI_NAMESPACE_NODE     *Node,
350228110Sjkim    ACPI_BUFFER             *RetBuffer);
35167754Smsmith
352151937Sjkim/*
353151937Sjkim * rscalc
354151937Sjkim */
35567754SmsmithACPI_STATUS
356151937SjkimAcpiRsGetListLength (
357151937Sjkim    UINT8                   *AmlBuffer,
358151937Sjkim    UINT32                  AmlBufferLength,
359151937Sjkim    ACPI_SIZE               *SizeNeeded);
36067754Smsmith
36167754SmsmithACPI_STATUS
362151937SjkimAcpiRsGetAmlLength (
363272444Sjkim    ACPI_RESOURCE           *ResourceList,
364272444Sjkim    ACPI_SIZE               ResourceListSize,
365151937Sjkim    ACPI_SIZE               *SizeNeeded);
36667754Smsmith
36767754SmsmithACPI_STATUS
368151937SjkimAcpiRsGetPciRoutingTableLength (
369151937Sjkim    ACPI_OPERAND_OBJECT     *PackageObject,
370151937Sjkim    ACPI_SIZE               *BufferSizeNeeded);
37167754Smsmith
37267754SmsmithACPI_STATUS
373151937SjkimAcpiRsConvertAmlToResources (
374167802Sjkim    UINT8                   *Aml,
375167802Sjkim    UINT32                  Length,
376167802Sjkim    UINT32                  Offset,
377167802Sjkim    UINT8                   ResourceIndex,
378245582Sjkim    void                    **Context);
37967754Smsmith
38067754SmsmithACPI_STATUS
381151937SjkimAcpiRsConvertResourcesToAml (
382151937Sjkim    ACPI_RESOURCE           *Resource,
383151937Sjkim    ACPI_SIZE               AmlSizeNeeded,
384151937Sjkim    UINT8                   *OutputBuffer);
38567754Smsmith
38667754Smsmith
387151937Sjkim/*
388151937Sjkim * rsaddr
389151937Sjkim */
390151937Sjkimvoid
391151937SjkimAcpiRsSetAddressCommon (
392151937Sjkim    AML_RESOURCE            *Aml,
393151937Sjkim    ACPI_RESOURCE           *Resource);
39467754Smsmith
395151937SjkimBOOLEAN
396151937SjkimAcpiRsGetAddressCommon (
397151937Sjkim    ACPI_RESOURCE           *Resource,
398151937Sjkim    AML_RESOURCE            *Aml);
39977424Smsmith
40077424Smsmith
401151937Sjkim/*
402151937Sjkim * rsmisc
403151937Sjkim */
40477424SmsmithACPI_STATUS
405151937SjkimAcpiRsConvertAmlToResource (
406151937Sjkim    ACPI_RESOURCE           *Resource,
407151937Sjkim    AML_RESOURCE            *Aml,
408151937Sjkim    ACPI_RSCONVERT_INFO     *Info);
40967754Smsmith
41067754SmsmithACPI_STATUS
411151937SjkimAcpiRsConvertResourceToAml (
412151937Sjkim    ACPI_RESOURCE           *Resource,
413151937Sjkim    AML_RESOURCE            *Aml,
414151937Sjkim    ACPI_RSCONVERT_INFO     *Info);
41567754Smsmith
41667754Smsmith
417151937Sjkim/*
418151937Sjkim * rsutils
419151937Sjkim */
420151937Sjkimvoid
421151937SjkimAcpiRsMoveData (
422151937Sjkim    void                    *Destination,
423151937Sjkim    void                    *Source,
424151937Sjkim    UINT16                  ItemCount,
425151937Sjkim    UINT8                   MoveType);
42667754Smsmith
427151937SjkimUINT8
428151937SjkimAcpiRsDecodeBitmask (
429151937Sjkim    UINT16                  Mask,
430151937Sjkim    UINT8                   *List);
43167754Smsmith
432151937SjkimUINT16
433151937SjkimAcpiRsEncodeBitmask (
434151937Sjkim    UINT8                   *List,
435151937Sjkim    UINT8                   Count);
43667754Smsmith
437151937SjkimACPI_RS_LENGTH
438151937SjkimAcpiRsGetResourceSource (
439151937Sjkim    ACPI_RS_LENGTH          ResourceLength,
440151937Sjkim    ACPI_RS_LENGTH          MinimumLength,
441151937Sjkim    ACPI_RESOURCE_SOURCE    *ResourceSource,
442151937Sjkim    AML_RESOURCE            *Aml,
443151937Sjkim    char                    *StringPtr);
44467754Smsmith
445151937SjkimACPI_RSDESC_SIZE
446151937SjkimAcpiRsSetResourceSource (
447151937Sjkim    AML_RESOURCE            *Aml,
448151937Sjkim    ACPI_RS_LENGTH          MinimumLength,
449151937Sjkim    ACPI_RESOURCE_SOURCE    *ResourceSource);
45067754Smsmith
451151937Sjkimvoid
452151937SjkimAcpiRsSetResourceHeader (
453151937Sjkim    UINT8                   DescriptorType,
454151937Sjkim    ACPI_RSDESC_SIZE        TotalLength,
455151937Sjkim    AML_RESOURCE            *Aml);
45667754Smsmith
457151937Sjkimvoid
458151937SjkimAcpiRsSetResourceLength (
459151937Sjkim    ACPI_RSDESC_SIZE        TotalLength,
460151937Sjkim    AML_RESOURCE            *Aml);
46167754Smsmith
46267754Smsmith
463151937Sjkim/*
464281396Sjkim * rsdump - Debugger support
465151937Sjkim */
466281396Sjkim#ifdef ACPI_DEBUGGER
467151937Sjkimvoid
468151937SjkimAcpiRsDumpResourceList (
469151937Sjkim    ACPI_RESOURCE           *Resource);
47067754Smsmith
471151937Sjkimvoid
472151937SjkimAcpiRsDumpIrqList (
473151937Sjkim    UINT8                   *RouteTable);
474281396Sjkim#endif
47567754Smsmith
47667754Smsmith
477151937Sjkim/*
478151937Sjkim * Resource conversion tables
479151937Sjkim */
480151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertDma[];
481151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertEndDpf[];
482151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertIo[];
483151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertFixedIo[];
484151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertEndTag[];
485151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertMemory24[];
486151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertGenericReg[];
487151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertMemory32[];
488151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertFixedMemory32[];
489151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertAddress32[];
490151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertAddress16[];
491151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertExtIrq[];
492151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertAddress64[];
493151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertExtAddress64[];
494228110Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertGpio[];
495228110Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertFixedDma[];
496228110Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertI2cSerialBus[];
497228110Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertSpiSerialBus[];
498228110Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsConvertUartSerialBus[];
49967754Smsmith
500151937Sjkim/* These resources require separate get/set tables */
50167754Smsmith
502151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsGetIrq[];
503151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsGetStartDpf[];
504151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsGetVendorSmall[];
505151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsGetVendorLarge[];
506151937Sjkim
507151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsSetIrq[];
508151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsSetStartDpf[];
509151937Sjkimextern ACPI_RSCONVERT_INFO      AcpiRsSetVendor[];
510151937Sjkim
511151937Sjkim
512151937Sjkim#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
513151937Sjkim/*
514151937Sjkim * rsinfo
515151937Sjkim */
516151937Sjkimextern ACPI_RSDUMP_INFO         *AcpiGbl_DumpResourceDispatch[];
517228110Sjkimextern ACPI_RSDUMP_INFO         *AcpiGbl_DumpSerialBusDispatch[];
518151937Sjkim
519151937Sjkim/*
520245582Sjkim * rsdumpinfo
521151937Sjkim */
522151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpIrq[];
523245582Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpPrt[];
524151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpDma[];
525151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpStartDpf[];
526151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpEndDpf[];
527151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpIo[];
528245582Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpIoFlags[];
529151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpFixedIo[];
530151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpVendor[];
531151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpEndTag[];
532151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpMemory24[];
533151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpMemory32[];
534245582Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpMemoryFlags[];
535151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpFixedMemory32[];
536151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpAddress16[];
537151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpAddress32[];
538151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpAddress64[];
539151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpExtAddress64[];
540151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpExtIrq[];
541151937Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpGenericReg[];
542228110Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpGpio[];
543228110Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpFixedDma[];
544228110Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpCommonSerialBus[];
545228110Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpI2cSerialBus[];
546228110Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpSpiSerialBus[];
547228110Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpUartSerialBus[];
548245582Sjkimextern ACPI_RSDUMP_INFO         AcpiRsDumpGeneralFlags[];
549151937Sjkim#endif
550151937Sjkim
55167754Smsmith#endif  /* __ACRESRC_H__ */
552