xref: /onnv-gate/usr/src/uts/intel/sys/acpi/acresrc.h (revision 941:49d0d4c2eea8)
10Sstevel@tonic-gate /******************************************************************************
20Sstevel@tonic-gate  *
30Sstevel@tonic-gate  * Name: acresrc.h - Resource Manager function prototypes
4*941Smyers  *       $Revision: 1.48 $
50Sstevel@tonic-gate  *
60Sstevel@tonic-gate  *****************************************************************************/
70Sstevel@tonic-gate 
80Sstevel@tonic-gate /******************************************************************************
90Sstevel@tonic-gate  *
100Sstevel@tonic-gate  * 1. Copyright Notice
110Sstevel@tonic-gate  *
120Sstevel@tonic-gate  * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
130Sstevel@tonic-gate  * All rights reserved.
140Sstevel@tonic-gate  *
150Sstevel@tonic-gate  * 2. License
160Sstevel@tonic-gate  *
170Sstevel@tonic-gate  * 2.1. This is your license from Intel Corp. under its intellectual property
180Sstevel@tonic-gate  * rights.  You may have additional license terms from the party that provided
190Sstevel@tonic-gate  * you this software, covering your right to use that party's intellectual
200Sstevel@tonic-gate  * property rights.
210Sstevel@tonic-gate  *
220Sstevel@tonic-gate  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
230Sstevel@tonic-gate  * copy of the source code appearing in this file ("Covered Code") an
240Sstevel@tonic-gate  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
250Sstevel@tonic-gate  * base code distributed originally by Intel ("Original Intel Code") to copy,
260Sstevel@tonic-gate 
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 #ifndef __ACRESRC_H__
1190Sstevel@tonic-gate #define __ACRESRC_H__
1200Sstevel@tonic-gate 
121*941Smyers /* Need the AML resource descriptor structs */
122*941Smyers 
123*941Smyers #include "amlresrc.h"
124*941Smyers 
125*941Smyers 
126*941Smyers /*
127*941Smyers  * Resource dispatch and info tables
128*941Smyers  */
129*941Smyers typedef struct acpi_resource_info
130*941Smyers {
131*941Smyers     UINT8                   LengthType;
132*941Smyers     UINT8                   MinimumAmlResourceLength;
133*941Smyers     UINT8                   MinimumInternalStructLength;
134*941Smyers 
135*941Smyers } ACPI_RESOURCE_INFO;
136*941Smyers 
137*941Smyers /* Types for LengthType above */
138*941Smyers 
139*941Smyers #define ACPI_FIXED_LENGTH           0
140*941Smyers #define ACPI_VARIABLE_LENGTH        1
141*941Smyers #define ACPI_SMALL_VARIABLE_LENGTH  2
142*941Smyers 
143*941Smyers /* Handlers */
144*941Smyers 
145*941Smyers typedef ACPI_STATUS (*ACPI_SET_RESOURCE_HANDLER) (
146*941Smyers     ACPI_RESOURCE           *Resource,
147*941Smyers     AML_RESOURCE            *Aml);
148*941Smyers 
149*941Smyers typedef ACPI_STATUS (*ACPI_GET_RESOURCE_HANDLER) (
150*941Smyers     AML_RESOURCE            *Aml,
151*941Smyers     UINT16                  AmlResourceLength,
152*941Smyers     ACPI_RESOURCE           *Resource);
153*941Smyers 
154*941Smyers typedef void (*ACPI_DUMP_RESOURCE_HANDLER) (
155*941Smyers     ACPI_RESOURCE_DATA      *Data);
156*941Smyers 
157*941Smyers /* Tables indexed by internal resource type */
158*941Smyers 
159*941Smyers extern UINT8                        AcpiGbl_AmlResourceSizes[];
160*941Smyers extern ACPI_SET_RESOURCE_HANDLER    AcpiGbl_SetResourceDispatch[];
161*941Smyers extern ACPI_DUMP_RESOURCE_HANDLER   AcpiGbl_DumpResourceDispatch[];
162*941Smyers 
163*941Smyers /* Tables indexed by raw AML resource descriptor type */
164*941Smyers 
165*941Smyers extern ACPI_RESOURCE_INFO           AcpiGbl_SmResourceInfo[];
166*941Smyers extern ACPI_RESOURCE_INFO           AcpiGbl_LgResourceInfo[];
167*941Smyers extern ACPI_GET_RESOURCE_HANDLER    AcpiGbl_SmGetResourceDispatch[];
168*941Smyers extern ACPI_GET_RESOURCE_HANDLER    AcpiGbl_LgGetResourceDispatch[];
169*941Smyers 
1700Sstevel@tonic-gate 
1710Sstevel@tonic-gate /*
1720Sstevel@tonic-gate  *  Function prototypes called from Acpi* APIs
1730Sstevel@tonic-gate  */
1740Sstevel@tonic-gate ACPI_STATUS
1750Sstevel@tonic-gate AcpiRsGetPrtMethodData (
1760Sstevel@tonic-gate     ACPI_HANDLE             Handle,
1770Sstevel@tonic-gate     ACPI_BUFFER             *RetBuffer);
1780Sstevel@tonic-gate 
1790Sstevel@tonic-gate ACPI_STATUS
1800Sstevel@tonic-gate AcpiRsGetCrsMethodData (
1810Sstevel@tonic-gate     ACPI_HANDLE             Handle,
1820Sstevel@tonic-gate     ACPI_BUFFER             *RetBuffer);
1830Sstevel@tonic-gate 
1840Sstevel@tonic-gate ACPI_STATUS
1850Sstevel@tonic-gate AcpiRsGetPrsMethodData (
1860Sstevel@tonic-gate     ACPI_HANDLE             Handle,
1870Sstevel@tonic-gate     ACPI_BUFFER             *RetBuffer);
1880Sstevel@tonic-gate 
1890Sstevel@tonic-gate ACPI_STATUS
1900Sstevel@tonic-gate AcpiRsGetMethodData (
1910Sstevel@tonic-gate     ACPI_HANDLE             Handle,
1920Sstevel@tonic-gate     char                    *Path,
1930Sstevel@tonic-gate     ACPI_BUFFER             *RetBuffer);
1940Sstevel@tonic-gate 
1950Sstevel@tonic-gate ACPI_STATUS
1960Sstevel@tonic-gate AcpiRsSetSrsMethodData (
1970Sstevel@tonic-gate     ACPI_HANDLE             Handle,
1980Sstevel@tonic-gate     ACPI_BUFFER             *RetBuffer);
1990Sstevel@tonic-gate 
2000Sstevel@tonic-gate ACPI_STATUS
2010Sstevel@tonic-gate AcpiRsCreateResourceList (
202*941Smyers     ACPI_OPERAND_OBJECT     *AmlBuffer,
2030Sstevel@tonic-gate     ACPI_BUFFER             *OutputBuffer);
2040Sstevel@tonic-gate 
2050Sstevel@tonic-gate ACPI_STATUS
206*941Smyers AcpiRsCreateAmlResources (
2070Sstevel@tonic-gate     ACPI_RESOURCE           *LinkedListBuffer,
2080Sstevel@tonic-gate     ACPI_BUFFER             *OutputBuffer);
2090Sstevel@tonic-gate 
2100Sstevel@tonic-gate ACPI_STATUS
2110Sstevel@tonic-gate AcpiRsCreatePciRoutingTable (
2120Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *PackageObject,
2130Sstevel@tonic-gate     ACPI_BUFFER             *OutputBuffer);
2140Sstevel@tonic-gate 
2150Sstevel@tonic-gate 
2160Sstevel@tonic-gate /*
2170Sstevel@tonic-gate  * rsdump
2180Sstevel@tonic-gate  */
2190Sstevel@tonic-gate void
2200Sstevel@tonic-gate AcpiRsDumpResourceList (
2210Sstevel@tonic-gate     ACPI_RESOURCE           *Resource);
2220Sstevel@tonic-gate 
2230Sstevel@tonic-gate void
2240Sstevel@tonic-gate AcpiRsDumpIrqList (
2250Sstevel@tonic-gate     UINT8                   *RouteTable);
2260Sstevel@tonic-gate 
2270Sstevel@tonic-gate 
2280Sstevel@tonic-gate /*
2290Sstevel@tonic-gate  * rscalc
2300Sstevel@tonic-gate  */
2310Sstevel@tonic-gate ACPI_STATUS
2320Sstevel@tonic-gate AcpiRsGetListLength (
233*941Smyers     UINT8                   *AmlBuffer,
234*941Smyers     UINT32                  AmlBufferLength,
2350Sstevel@tonic-gate     ACPI_SIZE               *SizeNeeded);
2360Sstevel@tonic-gate 
2370Sstevel@tonic-gate ACPI_STATUS
238*941Smyers AcpiRsGetAmlLength (
2390Sstevel@tonic-gate     ACPI_RESOURCE           *LinkedListBuffer,
2400Sstevel@tonic-gate     ACPI_SIZE               *SizeNeeded);
2410Sstevel@tonic-gate 
2420Sstevel@tonic-gate ACPI_STATUS
2430Sstevel@tonic-gate AcpiRsGetPciRoutingTableLength (
2440Sstevel@tonic-gate     ACPI_OPERAND_OBJECT     *PackageObject,
2450Sstevel@tonic-gate     ACPI_SIZE               *BufferSizeNeeded);
2460Sstevel@tonic-gate 
2470Sstevel@tonic-gate ACPI_STATUS
248*941Smyers AcpiRsConvertAmlToResources (
249*941Smyers     UINT8                   *AmlBuffer,
250*941Smyers     UINT32                  AmlBufferLength,
2510Sstevel@tonic-gate     UINT8                   *OutputBuffer);
2520Sstevel@tonic-gate 
2530Sstevel@tonic-gate ACPI_STATUS
254*941Smyers AcpiRsConvertResourcesToAml (
255*941Smyers     ACPI_RESOURCE           *Resource,
256*941Smyers     ACPI_SIZE               AmlSizeNeeded,
257*941Smyers     UINT8                   *OutputBuffer);
258*941Smyers 
259*941Smyers 
260*941Smyers /*
261*941Smyers  * rsio
262*941Smyers  */
263*941Smyers ACPI_STATUS
264*941Smyers AcpiRsGetIo (
265*941Smyers     AML_RESOURCE            *Aml,
266*941Smyers     UINT16                  AmlResourceLength,
267*941Smyers     ACPI_RESOURCE           *Resource);
2680Sstevel@tonic-gate 
2690Sstevel@tonic-gate ACPI_STATUS
270*941Smyers AcpiRsSetIo (
271*941Smyers     ACPI_RESOURCE           *Resource,
272*941Smyers     AML_RESOURCE            *Aml);
2730Sstevel@tonic-gate 
2740Sstevel@tonic-gate ACPI_STATUS
275*941Smyers AcpiRsGetFixedIo (
276*941Smyers     AML_RESOURCE            *Aml,
277*941Smyers     UINT16                  AmlResourceLength,
278*941Smyers     ACPI_RESOURCE           *Resource);
2790Sstevel@tonic-gate 
2800Sstevel@tonic-gate ACPI_STATUS
281*941Smyers AcpiRsSetFixedIo (
282*941Smyers     ACPI_RESOURCE           *Resource,
283*941Smyers     AML_RESOURCE            *Aml);
2840Sstevel@tonic-gate 
2850Sstevel@tonic-gate ACPI_STATUS
286*941Smyers AcpiRsGetDma (
287*941Smyers     AML_RESOURCE            *Aml,
288*941Smyers     UINT16                  AmlResourceLength,
289*941Smyers     ACPI_RESOURCE           *Resource);
2900Sstevel@tonic-gate 
2910Sstevel@tonic-gate ACPI_STATUS
292*941Smyers AcpiRsSetDma (
293*941Smyers     ACPI_RESOURCE           *Resource,
294*941Smyers     AML_RESOURCE            *Aml);
295*941Smyers 
296*941Smyers 
297*941Smyers /*
298*941Smyers  * rsirq
299*941Smyers  */
300*941Smyers ACPI_STATUS
301*941Smyers AcpiRsGetIrq (
302*941Smyers     AML_RESOURCE            *Aml,
303*941Smyers     UINT16                  AmlResourceLength,
304*941Smyers     ACPI_RESOURCE           *Resource);
3050Sstevel@tonic-gate 
3060Sstevel@tonic-gate ACPI_STATUS
307*941Smyers AcpiRsSetIrq (
308*941Smyers     ACPI_RESOURCE           *Resource,
309*941Smyers     AML_RESOURCE            *Aml);
310*941Smyers 
311*941Smyers ACPI_STATUS
312*941Smyers AcpiRsGetExtIrq (
313*941Smyers     AML_RESOURCE            *Aml,
314*941Smyers     UINT16                  AmlResourceLength,
315*941Smyers     ACPI_RESOURCE           *Resource);
3160Sstevel@tonic-gate 
3170Sstevel@tonic-gate ACPI_STATUS
318*941Smyers AcpiRsSetExtIrq (
319*941Smyers     ACPI_RESOURCE           *Resource,
320*941Smyers     AML_RESOURCE            *Aml);
3210Sstevel@tonic-gate 
322*941Smyers 
323*941Smyers /*
324*941Smyers  * rsaddr
325*941Smyers  */
3260Sstevel@tonic-gate ACPI_STATUS
327*941Smyers AcpiRsGetAddress16 (
328*941Smyers     AML_RESOURCE            *Aml,
329*941Smyers     UINT16                  AmlResourceLength,
330*941Smyers     ACPI_RESOURCE           *Resource);
3310Sstevel@tonic-gate 
3320Sstevel@tonic-gate ACPI_STATUS
333*941Smyers AcpiRsSetAddress16 (
334*941Smyers     ACPI_RESOURCE           *Resource,
335*941Smyers     AML_RESOURCE            *Aml);
3360Sstevel@tonic-gate 
3370Sstevel@tonic-gate ACPI_STATUS
338*941Smyers AcpiRsGetAddress32 (
339*941Smyers     AML_RESOURCE            *Aml,
340*941Smyers     UINT16                  AmlResourceLength,
341*941Smyers     ACPI_RESOURCE           *Resource);
342*941Smyers 
343*941Smyers ACPI_STATUS
344*941Smyers AcpiRsSetAddress32 (
345*941Smyers     ACPI_RESOURCE           *Resource,
346*941Smyers     AML_RESOURCE            *Aml);
3470Sstevel@tonic-gate 
3480Sstevel@tonic-gate ACPI_STATUS
349*941Smyers AcpiRsGetAddress64 (
350*941Smyers     AML_RESOURCE            *Aml,
351*941Smyers     UINT16                  AmlResourceLength,
352*941Smyers     ACPI_RESOURCE           *Resource);
3530Sstevel@tonic-gate 
3540Sstevel@tonic-gate ACPI_STATUS
355*941Smyers AcpiRsSetAddress64 (
356*941Smyers     ACPI_RESOURCE           *Resource,
357*941Smyers     AML_RESOURCE            *Aml);
3580Sstevel@tonic-gate 
3590Sstevel@tonic-gate ACPI_STATUS
360*941Smyers AcpiRsGetExtAddress64 (
361*941Smyers     AML_RESOURCE            *Aml,
362*941Smyers     UINT16                  AmlResourceLength,
363*941Smyers     ACPI_RESOURCE           *Resource);
3640Sstevel@tonic-gate 
3650Sstevel@tonic-gate ACPI_STATUS
366*941Smyers AcpiRsSetExtAddress64 (
367*941Smyers     ACPI_RESOURCE           *Resource,
368*941Smyers     AML_RESOURCE            *Aml);
369*941Smyers 
370*941Smyers 
371*941Smyers /*
372*941Smyers  * rsmemory
373*941Smyers  */
374*941Smyers ACPI_STATUS
375*941Smyers AcpiRsGetMemory24 (
376*941Smyers     AML_RESOURCE            *Aml,
377*941Smyers     UINT16                  AmlResourceLength,
378*941Smyers     ACPI_RESOURCE           *Resource);
3790Sstevel@tonic-gate 
3800Sstevel@tonic-gate ACPI_STATUS
381*941Smyers AcpiRsSetMemory24 (
382*941Smyers     ACPI_RESOURCE           *Resource,
383*941Smyers     AML_RESOURCE            *Aml);
3840Sstevel@tonic-gate 
3850Sstevel@tonic-gate ACPI_STATUS
386*941Smyers AcpiRsGetMemory32 (
387*941Smyers     AML_RESOURCE            *Aml,
388*941Smyers     UINT16                  AmlResourceLength,
389*941Smyers     ACPI_RESOURCE           *Resource);
390*941Smyers 
391*941Smyers ACPI_STATUS
392*941Smyers AcpiRsSetMemory32 (
393*941Smyers     ACPI_RESOURCE           *Resource,
394*941Smyers     AML_RESOURCE            *Aml);
3950Sstevel@tonic-gate 
3960Sstevel@tonic-gate ACPI_STATUS
397*941Smyers AcpiRsGetFixedMemory32 (
398*941Smyers     AML_RESOURCE            *Aml,
399*941Smyers     UINT16                  AmlResourceLength,
400*941Smyers     ACPI_RESOURCE           *Resource);
4010Sstevel@tonic-gate 
4020Sstevel@tonic-gate ACPI_STATUS
403*941Smyers AcpiRsSetFixedMemory32 (
404*941Smyers     ACPI_RESOURCE           *Resource,
405*941Smyers     AML_RESOURCE            *Aml);
406*941Smyers 
407*941Smyers 
408*941Smyers /*
409*941Smyers  * rsmisc
410*941Smyers  */
411*941Smyers ACPI_STATUS
412*941Smyers AcpiRsGetGenericReg (
413*941Smyers     AML_RESOURCE            *Aml,
414*941Smyers     UINT16                  AmlResourceLength,
415*941Smyers     ACPI_RESOURCE           *Resource);
4160Sstevel@tonic-gate 
4170Sstevel@tonic-gate ACPI_STATUS
418*941Smyers AcpiRsSetGenericReg (
419*941Smyers     ACPI_RESOURCE           *Resource,
420*941Smyers     AML_RESOURCE            *Aml);
4210Sstevel@tonic-gate 
4220Sstevel@tonic-gate ACPI_STATUS
423*941Smyers AcpiRsGetVendor (
424*941Smyers     AML_RESOURCE            *Aml,
425*941Smyers     UINT16                  AmlResourceLength,
426*941Smyers     ACPI_RESOURCE           *Resource);
4270Sstevel@tonic-gate 
4280Sstevel@tonic-gate ACPI_STATUS
429*941Smyers AcpiRsSetVendor (
430*941Smyers     ACPI_RESOURCE           *Resource,
431*941Smyers     AML_RESOURCE            *Aml);
432*941Smyers 
433*941Smyers ACPI_STATUS
434*941Smyers AcpiRsGetStartDpf (
435*941Smyers     AML_RESOURCE            *Aml,
436*941Smyers     UINT16                  AmlResourceLength,
437*941Smyers     ACPI_RESOURCE           *Resource);
438*941Smyers 
439*941Smyers ACPI_STATUS
440*941Smyers AcpiRsSetStartDpf (
441*941Smyers     ACPI_RESOURCE           *Resource,
442*941Smyers     AML_RESOURCE            *Aml);
4430Sstevel@tonic-gate 
4440Sstevel@tonic-gate ACPI_STATUS
445*941Smyers AcpiRsGetEndDpf (
446*941Smyers     AML_RESOURCE            *Aml,
447*941Smyers     UINT16                  AmlResourceLength,
448*941Smyers     ACPI_RESOURCE           *Resource);
4490Sstevel@tonic-gate 
4500Sstevel@tonic-gate ACPI_STATUS
451*941Smyers AcpiRsSetEndDpf (
452*941Smyers     ACPI_RESOURCE           *Resource,
453*941Smyers     AML_RESOURCE            *Aml);
4540Sstevel@tonic-gate 
4550Sstevel@tonic-gate ACPI_STATUS
456*941Smyers AcpiRsGetEndTag (
457*941Smyers     AML_RESOURCE            *Aml,
458*941Smyers     UINT16                  AmlResourceLength,
459*941Smyers     ACPI_RESOURCE           *Resource);
4600Sstevel@tonic-gate 
4610Sstevel@tonic-gate ACPI_STATUS
462*941Smyers AcpiRsSetEndTag (
463*941Smyers     ACPI_RESOURCE           *Resource,
464*941Smyers     AML_RESOURCE            *Aml);
4650Sstevel@tonic-gate 
466*941Smyers /*
467*941Smyers  * rsutils
468*941Smyers  */
469*941Smyers void
470*941Smyers AcpiRsMoveData (
471*941Smyers     void                    *Destination,
472*941Smyers     void                    *Source,
473*941Smyers     UINT16                  ItemCount,
474*941Smyers     UINT8                   MoveType);
475*941Smyers 
476*941Smyers /* Types used in MoveType above */
4770Sstevel@tonic-gate 
478*941Smyers #define ACPI_MOVE_TYPE_16_TO_32        0
479*941Smyers #define ACPI_MOVE_TYPE_32_TO_16        1
480*941Smyers #define ACPI_MOVE_TYPE_32_TO_32        2
481*941Smyers #define ACPI_MOVE_TYPE_64_TO_64        3
482*941Smyers 
4830Sstevel@tonic-gate 
484*941Smyers UINT16
485*941Smyers AcpiRsGetResourceSource (
486*941Smyers     UINT16                  ResourceLength,
487*941Smyers     ACPI_SIZE               MinimumLength,
488*941Smyers     ACPI_RESOURCE_SOURCE    *ResourceSource,
489*941Smyers     AML_RESOURCE            *Aml,
490*941Smyers     char                    *StringPtr);
4910Sstevel@tonic-gate 
492*941Smyers ACPI_SIZE
493*941Smyers AcpiRsSetResourceSource (
494*941Smyers     AML_RESOURCE            *Aml,
495*941Smyers     ACPI_SIZE               MinimumLength,
496*941Smyers     ACPI_RESOURCE_SOURCE    *ResourceSource);
4970Sstevel@tonic-gate 
4980Sstevel@tonic-gate UINT8
4990Sstevel@tonic-gate AcpiRsGetResourceType (
5000Sstevel@tonic-gate     UINT8                   ResourceStartByte);
5010Sstevel@tonic-gate 
502*941Smyers UINT32
503*941Smyers AcpiRsGetDescriptorLength (
504*941Smyers     AML_RESOURCE            *Aml);
505*941Smyers 
506*941Smyers UINT16
507*941Smyers AcpiRsGetResourceLength (
508*941Smyers     AML_RESOURCE            *Aml);
509*941Smyers 
510*941Smyers void
511*941Smyers AcpiRsSetResourceHeader (
512*941Smyers     UINT8                   DescriptorType,
513*941Smyers     ACPI_SIZE               TotalLength,
514*941Smyers     AML_RESOURCE            *Aml);
515*941Smyers 
516*941Smyers ACPI_RESOURCE_INFO *
517*941Smyers AcpiRsGetResourceInfo (
518*941Smyers     UINT8                   ResourceType);
519*941Smyers 
520*941Smyers 
521*941Smyers #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
522*941Smyers /*
523*941Smyers  * rsdump
524*941Smyers  */
525*941Smyers void
526*941Smyers AcpiRsDumpIrq (
527*941Smyers     ACPI_RESOURCE_DATA      *Resource);
528*941Smyers 
529*941Smyers void
530*941Smyers AcpiRsDumpAddress16 (
531*941Smyers     ACPI_RESOURCE_DATA      *Resource);
532*941Smyers 
533*941Smyers void
534*941Smyers AcpiRsDumpAddress32 (
535*941Smyers     ACPI_RESOURCE_DATA      *Resource);
536*941Smyers 
537*941Smyers void
538*941Smyers AcpiRsDumpAddress64 (
539*941Smyers     ACPI_RESOURCE_DATA      *Resource);
540*941Smyers 
541*941Smyers void
542*941Smyers AcpiRsDumpExtAddress64 (
543*941Smyers     ACPI_RESOURCE_DATA      *Resource);
544*941Smyers 
545*941Smyers void
546*941Smyers AcpiRsDumpDma (
547*941Smyers     ACPI_RESOURCE_DATA      *Resource);
548*941Smyers 
549*941Smyers void
550*941Smyers AcpiRsDumpIo (
551*941Smyers     ACPI_RESOURCE_DATA      *Resource);
552*941Smyers 
553*941Smyers void
554*941Smyers AcpiRsDumpExtIrq (
555*941Smyers     ACPI_RESOURCE_DATA      *Resource);
556*941Smyers 
557*941Smyers void
558*941Smyers AcpiRsDumpFixedIo (
559*941Smyers     ACPI_RESOURCE_DATA      *Resource);
560*941Smyers 
561*941Smyers void
562*941Smyers AcpiRsDumpFixedMemory32 (
563*941Smyers     ACPI_RESOURCE_DATA      *Resource);
564*941Smyers 
565*941Smyers void
566*941Smyers AcpiRsDumpMemory24 (
567*941Smyers     ACPI_RESOURCE_DATA      *Resource);
568*941Smyers 
569*941Smyers void
570*941Smyers AcpiRsDumpMemory32 (
571*941Smyers     ACPI_RESOURCE_DATA      *Resource);
572*941Smyers 
573*941Smyers void
574*941Smyers AcpiRsDumpStartDpf (
575*941Smyers     ACPI_RESOURCE_DATA      *Resource);
576*941Smyers 
577*941Smyers void
578*941Smyers AcpiRsDumpVendor (
579*941Smyers     ACPI_RESOURCE_DATA      *Resource);
580*941Smyers 
581*941Smyers void
582*941Smyers AcpiRsDumpGenericReg (
583*941Smyers     ACPI_RESOURCE_DATA      *Resource);
584*941Smyers 
585*941Smyers void
586*941Smyers AcpiRsDumpEndDpf (
587*941Smyers     ACPI_RESOURCE_DATA      *Resource);
588*941Smyers 
589*941Smyers void
590*941Smyers AcpiRsDumpEndTag (
591*941Smyers     ACPI_RESOURCE_DATA      *Resource);
592*941Smyers 
593*941Smyers #endif
594*941Smyers 
5950Sstevel@tonic-gate #endif  /* __ACRESRC_H__ */
596