acresrc.h revision 114237
1121614Sharti/******************************************************************************
2121614Sharti *
3121614Sharti * Name: acresrc.h - Resource Manager function prototypes
4121614Sharti *       $Revision: 37 $
5121614Sharti *
6121614Sharti *****************************************************************************/
7121614Sharti
8121614Sharti/******************************************************************************
9121614Sharti *
10121614Sharti * 1. Copyright Notice
11121614Sharti *
12121614Sharti * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
13121614Sharti * All rights reserved.
14121614Sharti *
15121614Sharti * 2. License
16121614Sharti *
17121614Sharti * 2.1. This is your license from Intel Corp. under its intellectual property
18121614Sharti * rights.  You may have additional license terms from the party that provided
19121614Sharti * you this software, covering your right to use that party's intellectual
20121614Sharti * property rights.
21121614Sharti *
22121614Sharti * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23121614Sharti * copy of the source code appearing in this file ("Covered Code") an
24121614Sharti * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25121614Sharti * base code distributed originally by Intel ("Original Intel Code") to copy,
26121614Sharti
27131861Sru * make derivatives, distribute, use and display any portion of the Covered
28121614Sharti * Code in any form, with the right to sublicense such rights; and
29121614Sharti *
30121614Sharti * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
31121614Sharti * license (with the right to sublicense), under only those claims of Intel
32121614Sharti * patents that are infringed by the Original Intel Code, to make, use, sell,
33121614Sharti * offer to sell, and import the Covered Code and derivative works thereof
34123943Sru * solely to the minimum extent necessary to exercise the above copyright
35131681Sru * license, and in no event shall the patent license extend to any additions
36121614Sharti * to or modifications of the Original Intel Code.  No other license or right
37121614Sharti * is granted directly or by implication, estoppel or otherwise;
38121614Sharti *
39121614Sharti * The above copyright and patent license is granted only if the following
40131861Sru * conditions are met:
41131861Sru *
42131861Sru * 3. Conditions
43131726Sru *
44121614Sharti * 3.1. Redistribution of Source with Rights to Further Distribute Source.
45131861Sru * Redistribution of source code of any substantial portion of the Covered
46131861Sru * Code or modification with rights to further distribute source must include
47121614Sharti * the above Copyright Notice, the above License, this list of Conditions,
48121614Sharti * and the following Disclaimer and Export Compliance provision.  In addition,
49121614Sharti * Licensee must cause all Covered Code to which Licensee contributes to
50121614Sharti * contain a file documenting the changes Licensee made to create that Covered
51121614Sharti * Code and the date of any change.  Licensee must include in that file the
52121614Sharti * documentation of any changes made by any predecessor Licensee.  Licensee
53121614Sharti * must include a prominent statement that the modification is derived,
54131861Sru * directly or indirectly, from Original Intel Code.
55121614Sharti *
56121614Sharti * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
57121614Sharti * Redistribution of source code of any substantial portion of the Covered
58131861Sru * Code or modification without rights to further distribute source must
59131861Sru * include the following Disclaimer and Export Compliance provision in the
60131861Sru * documentation and/or other materials provided with distribution.  In
61121614Sharti * addition, Licensee may not authorize further sublicense of source of any
62131861Sru * portion of the Covered Code, and must include terms to the effect that the
63121614Sharti * license from Licensee to its licensee is limited to the intellectual
64131861Sru * property embodied in the software Licensee provides to its licensee, and
65121614Sharti * not to intellectual property embodied in modifications its licensee may
66131861Sru * make.
67121614Sharti *
68121614Sharti * 3.3. Redistribution of Executable. Redistribution in executable form of any
69131861Sru * substantial portion of the Covered Code or modification must reproduce the
70121614Sharti * above Copyright Notice, and the following Disclaimer and Export Compliance
71131861Sru * provision in the documentation and/or other materials provided with the
72131861Sru * distribution.
73121614Sharti *
74121614Sharti * 3.4. Intel retains all right, title, and interest in and to the Original
75121614Sharti * Intel Code.
76121614Sharti *
77121614Sharti * 3.5. Neither the name Intel nor any other trademark owned or controlled by
78131861Sru * Intel shall be used in advertising or otherwise to promote the sale, use or
79131530Sru * other dealings in products derived from or relating to the Covered Code
80131530Sru * without prior written authorization from Intel.
81121614Sharti *
82121614Sharti * 4. Disclaimer and Export Compliance
83121614Sharti *
84121614Sharti * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
85121614Sharti * HERE.  ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
86121614Sharti * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT,  ASSISTANCE,
87121614Sharti * INSTALLATION, TRAINING OR OTHER SERVICES.  INTEL WILL NOT PROVIDE ANY
88131861Sru * UPDATES, ENHANCEMENTS OR EXTENSIONS.  INTEL SPECIFICALLY DISCLAIMS ANY
89131861Sru * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90131861Sru * PARTICULAR PURPOSE.
91121614Sharti *
92121614Sharti * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
93121614Sharti * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
94121614Sharti * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
95121614Sharti * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
96121614Sharti * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
97121614Sharti * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES.  THESE LIMITATIONS
98121614Sharti * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99121614Sharti * LIMITED REMEDY.
100121614Sharti *
101121614Sharti * 4.3. Licensee shall not export, either directly or indirectly, any of this
102121614Sharti * software or system incorporating such software without first obtaining any
103121614Sharti * required license or other approval from the U. S. Department of Commerce or
104121614Sharti * any other agency or department of the United States Government.  In the
105121614Sharti * event Licensee exports any such software from the United States or
106121614Sharti * re-exports any such software from a foreign destination, Licensee shall
107131861Sru * ensure that the distribution and export/re-export of the software is in
108121614Sharti * compliance with all laws, regulations, orders, or other restrictions of the
109131861Sru * U.S. Export Administration Regulations. Licensee agrees that neither it nor
110121614Sharti * any of its subsidiaries will export/re-export any technical data, process,
111131861Sru * software, or service, directly or indirectly, to any country for which the
112131861Sru * United States government or any agency thereof requires an export license,
113121614Sharti * other governmental approval, or letter of assurance, without first obtaining
114131861Sru * such license, approval or letter.
115121614Sharti *
116121614Sharti *****************************************************************************/
117121614Sharti
118121614Sharti#ifndef __ACRESRC_H__
119131861Sru#define __ACRESRC_H__
120131530Sru
121121614Sharti
122121614Sharti/*
123121614Sharti *  Function prototypes called from Acpi* APIs
124131861Sru */
125121614Sharti
126242997SjoelACPI_STATUS
127242997SjoelAcpiRsGetPrtMethodData (
128121614Sharti    ACPI_HANDLE             Handle,
129131861Sru    ACPI_BUFFER             *RetBuffer);
130121614Sharti
131121614Sharti
132121614ShartiACPI_STATUS
133121614ShartiAcpiRsGetCrsMethodData (
134121614Sharti    ACPI_HANDLE             Handle,
135242997Sjoel    ACPI_BUFFER             *RetBuffer);
136121614Sharti
137131861SruACPI_STATUS
138131861SruAcpiRsGetPrsMethodData (
139121614Sharti    ACPI_HANDLE             Handle,
140242997Sjoel    ACPI_BUFFER             *RetBuffer);
141121614Sharti
142131861SruACPI_STATUS
143242997SjoelAcpiRsGetMethodData (
144131861Sru    ACPI_HANDLE             Handle,
145121614Sharti    char                    *Path,
146242997Sjoel    ACPI_BUFFER             *RetBuffer);
147121614Sharti
148131861SruACPI_STATUS
149121614ShartiAcpiRsSetSrsMethodData (
150242997Sjoel    ACPI_HANDLE             Handle,
151131861Sru    ACPI_BUFFER             *RetBuffer);
152121614Sharti
153121614ShartiACPI_STATUS
154121614ShartiAcpiRsCreateResourceList (
155121614Sharti    ACPI_OPERAND_OBJECT     *ByteStreamBuffer,
156121614Sharti    ACPI_BUFFER             *OutputBuffer);
157121614Sharti
158121614ShartiACPI_STATUS
159121614ShartiAcpiRsCreateByteStream (
160121614Sharti    ACPI_RESOURCE           *LinkedListBuffer,
161131861Sru    ACPI_BUFFER             *OutputBuffer);
162
163ACPI_STATUS
164AcpiRsCreatePciRoutingTable (
165    ACPI_OPERAND_OBJECT     *PackageObject,
166    ACPI_BUFFER             *OutputBuffer);
167
168
169/*
170 * Function prototypes called from AcpiRsCreate*
171 */
172void
173AcpiRsDumpIrq (
174    ACPI_RESOURCE_DATA      *Data);
175
176void
177AcpiRsDumpAddress16 (
178    ACPI_RESOURCE_DATA      *Data);
179
180void
181AcpiRsDumpAddress32 (
182    ACPI_RESOURCE_DATA      *Data);
183
184void
185AcpiRsDumpAddress64 (
186    ACPI_RESOURCE_DATA      *Data);
187
188void
189AcpiRsDumpDma (
190    ACPI_RESOURCE_DATA      *Data);
191
192void
193AcpiRsDumpIo (
194    ACPI_RESOURCE_DATA      *Data);
195
196void
197AcpiRsDumpExtendedIrq (
198    ACPI_RESOURCE_DATA      *Data);
199
200void
201AcpiRsDumpFixedIo (
202    ACPI_RESOURCE_DATA      *Data);
203
204void
205AcpiRsDumpFixedMemory32 (
206    ACPI_RESOURCE_DATA      *Data);
207
208void
209AcpiRsDumpMemory24 (
210    ACPI_RESOURCE_DATA      *Data);
211
212void
213AcpiRsDumpMemory32 (
214    ACPI_RESOURCE_DATA      *Data);
215
216void
217AcpiRsDumpStartDependFns (
218    ACPI_RESOURCE_DATA      *Data);
219
220void
221AcpiRsDumpVendorSpecific (
222    ACPI_RESOURCE_DATA      *Data);
223
224void
225AcpiRsDumpResourceList (
226    ACPI_RESOURCE           *Resource);
227
228void
229AcpiRsDumpIrqList (
230    UINT8                   *RouteTable);
231
232ACPI_STATUS
233AcpiRsGetByteStreamStart (
234    UINT8                   *ByteStreamBuffer,
235    UINT8                   **ByteStreamStart,
236    UINT32                  *Size);
237
238ACPI_STATUS
239AcpiRsGetListLength (
240    UINT8                   *ByteStreamBuffer,
241    UINT32                  ByteStreamBufferLength,
242    ACPI_SIZE               *SizeNeeded);
243
244ACPI_STATUS
245AcpiRsGetByteStreamLength (
246    ACPI_RESOURCE           *LinkedListBuffer,
247    ACPI_SIZE               *SizeNeeded);
248
249ACPI_STATUS
250AcpiRsGetPciRoutingTableLength (
251    ACPI_OPERAND_OBJECT     *PackageObject,
252    ACPI_SIZE               *BufferSizeNeeded);
253
254ACPI_STATUS
255AcpiRsByteStreamToList (
256    UINT8                   *ByteStreamBuffer,
257    UINT32                  ByteStreamBufferLength,
258    UINT8                   *OutputBuffer);
259
260ACPI_STATUS
261AcpiRsListToByteStream (
262    ACPI_RESOURCE           *LinkedList,
263    ACPI_SIZE               ByteStreamSizeNeeded,
264    UINT8                   *OutputBuffer);
265
266ACPI_STATUS
267AcpiRsIoResource (
268    UINT8                   *ByteStreamBuffer,
269    ACPI_SIZE               *BytesConsumed,
270    UINT8                   **OutputBuffer,
271    ACPI_SIZE               *StructureSize);
272
273ACPI_STATUS
274AcpiRsFixedIoResource (
275    UINT8                   *ByteStreamBuffer,
276    ACPI_SIZE               *BytesConsumed,
277    UINT8                   **OutputBuffer,
278    ACPI_SIZE               *StructureSize);
279
280ACPI_STATUS
281AcpiRsIoStream (
282    ACPI_RESOURCE           *LinkedList,
283    UINT8                   **OutputBuffer,
284    ACPI_SIZE               *BytesConsumed);
285
286ACPI_STATUS
287AcpiRsFixedIoStream (
288    ACPI_RESOURCE           *LinkedList,
289    UINT8                   **OutputBuffer,
290    ACPI_SIZE               *BytesConsumed);
291
292ACPI_STATUS
293AcpiRsIrqResource (
294    UINT8                   *ByteStreamBuffer,
295    ACPI_SIZE               *BytesConsumed,
296    UINT8                   **OutputBuffer,
297    ACPI_SIZE               *StructureSize);
298
299ACPI_STATUS
300AcpiRsIrqStream (
301    ACPI_RESOURCE           *LinkedList,
302    UINT8                   **OutputBuffer,
303    ACPI_SIZE               *BytesConsumed);
304
305ACPI_STATUS
306AcpiRsDmaResource (
307    UINT8                   *ByteStreamBuffer,
308    ACPI_SIZE               *BytesConsumed,
309    UINT8                   **OutputBuffer,
310    ACPI_SIZE               *StructureSize);
311
312ACPI_STATUS
313AcpiRsDmaStream (
314    ACPI_RESOURCE           *LinkedList,
315    UINT8                   **OutputBuffer,
316    ACPI_SIZE               *BytesConsumed);
317
318ACPI_STATUS
319AcpiRsAddress16Resource (
320    UINT8                   *ByteStreamBuffer,
321    ACPI_SIZE               *BytesConsumed,
322    UINT8                   **OutputBuffer,
323    ACPI_SIZE               *StructureSize);
324
325ACPI_STATUS
326AcpiRsAddress16Stream (
327    ACPI_RESOURCE           *LinkedList,
328    UINT8                   **OutputBuffer,
329    ACPI_SIZE               *BytesConsumed);
330
331ACPI_STATUS
332AcpiRsAddress32Resource (
333    UINT8                   *ByteStreamBuffer,
334    ACPI_SIZE               *BytesConsumed,
335    UINT8                   **OutputBuffer,
336    ACPI_SIZE               *StructureSize);
337
338ACPI_STATUS
339AcpiRsAddress32Stream (
340    ACPI_RESOURCE           *LinkedList,
341    UINT8                   **OutputBuffer,
342    ACPI_SIZE               *BytesConsumed);
343
344ACPI_STATUS
345AcpiRsAddress64Resource (
346    UINT8                   *ByteStreamBuffer,
347    ACPI_SIZE               *BytesConsumed,
348    UINT8                   **OutputBuffer,
349    ACPI_SIZE               *StructureSize);
350
351ACPI_STATUS
352AcpiRsAddress64Stream (
353    ACPI_RESOURCE           *LinkedList,
354    UINT8                   **OutputBuffer,
355    ACPI_SIZE               *BytesConsumed);
356
357ACPI_STATUS
358AcpiRsStartDependFnsResource (
359    UINT8                   *ByteStreamBuffer,
360    ACPI_SIZE               *BytesConsumed,
361    UINT8                   **OutputBuffer,
362    ACPI_SIZE               *StructureSize);
363
364ACPI_STATUS
365AcpiRsEndDependFnsResource (
366    UINT8                   *ByteStreamBuffer,
367    ACPI_SIZE               *BytesConsumed,
368    UINT8                   **OutputBuffer,
369    ACPI_SIZE               *StructureSize);
370
371ACPI_STATUS
372AcpiRsStartDependFnsStream (
373    ACPI_RESOURCE           *LinkedList,
374    UINT8                   **OutputBuffer,
375    ACPI_SIZE               *BytesConsumed);
376
377ACPI_STATUS
378AcpiRsEndDependFnsStream (
379    ACPI_RESOURCE           *LinkedList,
380    UINT8                   **OutputBuffer,
381    ACPI_SIZE               *BytesConsumed);
382
383ACPI_STATUS
384AcpiRsMemory24Resource (
385    UINT8                   *ByteStreamBuffer,
386    ACPI_SIZE               *BytesConsumed,
387    UINT8                   **OutputBuffer,
388    ACPI_SIZE               *StructureSize);
389
390ACPI_STATUS
391AcpiRsMemory24Stream (
392    ACPI_RESOURCE           *LinkedList,
393    UINT8                   **OutputBuffer,
394    ACPI_SIZE               *BytesConsumed);
395
396ACPI_STATUS
397AcpiRsMemory32RangeResource (
398    UINT8                   *ByteStreamBuffer,
399    ACPI_SIZE               *BytesConsumed,
400    UINT8                   **OutputBuffer,
401    ACPI_SIZE               *StructureSize);
402
403ACPI_STATUS
404AcpiRsFixedMemory32Resource (
405    UINT8                   *ByteStreamBuffer,
406    ACPI_SIZE               *BytesConsumed,
407    UINT8                   **OutputBuffer,
408    ACPI_SIZE               *StructureSize);
409
410ACPI_STATUS
411AcpiRsMemory32RangeStream (
412    ACPI_RESOURCE           *LinkedList,
413    UINT8                   **OutputBuffer,
414    ACPI_SIZE               *BytesConsumed);
415
416ACPI_STATUS
417AcpiRsFixedMemory32Stream (
418    ACPI_RESOURCE           *LinkedList,
419    UINT8                   **OutputBuffer,
420    ACPI_SIZE               *BytesConsumed);
421
422ACPI_STATUS
423AcpiRsExtendedIrqResource (
424    UINT8                   *ByteStreamBuffer,
425    ACPI_SIZE               *BytesConsumed,
426    UINT8                   **OutputBuffer,
427    ACPI_SIZE               *StructureSize);
428
429ACPI_STATUS
430AcpiRsExtendedIrqStream (
431    ACPI_RESOURCE           *LinkedList,
432    UINT8                   **OutputBuffer,
433    ACPI_SIZE               *BytesConsumed);
434
435ACPI_STATUS
436AcpiRsEndTagResource (
437    UINT8                   *ByteStreamBuffer,
438    ACPI_SIZE               *BytesConsumed,
439    UINT8                   **OutputBuffer,
440    ACPI_SIZE               *StructureSize);
441
442ACPI_STATUS
443AcpiRsEndTagStream (
444    ACPI_RESOURCE           *LinkedList,
445    UINT8                   **OutputBuffer,
446    ACPI_SIZE               *BytesConsumed);
447
448ACPI_STATUS
449AcpiRsVendorResource (
450    UINT8                   *ByteStreamBuffer,
451    ACPI_SIZE               *BytesConsumed,
452    UINT8                   **OutputBuffer,
453    ACPI_SIZE               *StructureSize);
454
455ACPI_STATUS
456AcpiRsVendorStream (
457    ACPI_RESOURCE           *LinkedList,
458    UINT8                   **OutputBuffer,
459    ACPI_SIZE               *BytesConsumed);
460
461UINT8
462AcpiRsGetResourceType (
463    UINT8                   ResourceStartByte);
464
465#endif  /* __ACRESRC_H__ */
466