blob: 93c55ff5c237d4ada12ba71dd99e145d5b6aefbb [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/******************************************************************************
2 *
3 * Name: acresrc.h - Resource Manager function prototypes
4 *
5 *****************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44#ifndef __ACRESRC_H__
45#define __ACRESRC_H__
46
47
48/*
49 * Function prototypes called from Acpi* APIs
50 */
51
52acpi_status
53acpi_rs_get_prt_method_data (
54 acpi_handle handle,
55 struct acpi_buffer *ret_buffer);
56
57
58acpi_status
59acpi_rs_get_crs_method_data (
60 acpi_handle handle,
61 struct acpi_buffer *ret_buffer);
62
63#ifdef ACPI_FUTURE_USAGE
64acpi_status
65acpi_rs_get_prs_method_data (
66 acpi_handle handle,
67 struct acpi_buffer *ret_buffer);
68#endif
69
70acpi_status
71acpi_rs_get_method_data (
72 acpi_handle handle,
73 char *path,
74 struct acpi_buffer *ret_buffer);
75
76acpi_status
77acpi_rs_set_srs_method_data (
78 acpi_handle handle,
79 struct acpi_buffer *ret_buffer);
80
81acpi_status
82acpi_rs_create_resource_list (
83 union acpi_operand_object *byte_stream_buffer,
84 struct acpi_buffer *output_buffer);
85
86acpi_status
87acpi_rs_create_byte_stream (
88 struct acpi_resource *linked_list_buffer,
89 struct acpi_buffer *output_buffer);
90
91acpi_status
92acpi_rs_create_pci_routing_table (
93 union acpi_operand_object *package_object,
94 struct acpi_buffer *output_buffer);
95
96
97/*
98 * Function prototypes called from acpi_rs_create*
99 */
100#ifdef ACPI_FUTURE_USAGE
101void
102acpi_rs_dump_irq (
103 union acpi_resource_data *data);
104
105void
106acpi_rs_dump_address16 (
107 union acpi_resource_data *data);
108
109void
110acpi_rs_dump_address32 (
111 union acpi_resource_data *data);
112
113void
114acpi_rs_dump_address64 (
115 union acpi_resource_data *data);
116
117void
118acpi_rs_dump_dma (
119 union acpi_resource_data *data);
120
121void
122acpi_rs_dump_io (
123 union acpi_resource_data *data);
124
125void
126acpi_rs_dump_extended_irq (
127 union acpi_resource_data *data);
128
129void
130acpi_rs_dump_fixed_io (
131 union acpi_resource_data *data);
132
133void
134acpi_rs_dump_fixed_memory32 (
135 union acpi_resource_data *data);
136
137void
138acpi_rs_dump_memory24 (
139 union acpi_resource_data *data);
140
141void
142acpi_rs_dump_memory32 (
143 union acpi_resource_data *data);
144
145void
146acpi_rs_dump_start_depend_fns (
147 union acpi_resource_data *data);
148
149void
150acpi_rs_dump_vendor_specific (
151 union acpi_resource_data *data);
152
153void
154acpi_rs_dump_resource_list (
155 struct acpi_resource *resource);
156
157void
158acpi_rs_dump_irq_list (
159 u8 *route_table);
160#endif /* ACPI_FUTURE_USAGE */
161
162acpi_status
163acpi_rs_get_byte_stream_start (
164 u8 *byte_stream_buffer,
165 u8 **byte_stream_start,
166 u32 *size);
167
168acpi_status
169acpi_rs_get_list_length (
170 u8 *byte_stream_buffer,
171 u32 byte_stream_buffer_length,
172 acpi_size *size_needed);
173
174acpi_status
175acpi_rs_get_byte_stream_length (
176 struct acpi_resource *linked_list_buffer,
177 acpi_size *size_needed);
178
179acpi_status
180acpi_rs_get_pci_routing_table_length (
181 union acpi_operand_object *package_object,
182 acpi_size *buffer_size_needed);
183
184acpi_status
185acpi_rs_byte_stream_to_list (
186 u8 *byte_stream_buffer,
187 u32 byte_stream_buffer_length,
188 u8 *output_buffer);
189
190acpi_status
191acpi_rs_list_to_byte_stream (
192 struct acpi_resource *linked_list,
193 acpi_size byte_stream_size_needed,
194 u8 *output_buffer);
195
196acpi_status
197acpi_rs_io_resource (
198 u8 *byte_stream_buffer,
199 acpi_size *bytes_consumed,
200 u8 **output_buffer,
201 acpi_size *structure_size);
202
203acpi_status
204acpi_rs_fixed_io_resource (
205 u8 *byte_stream_buffer,
206 acpi_size *bytes_consumed,
207 u8 **output_buffer,
208 acpi_size *structure_size);
209
210acpi_status
211acpi_rs_io_stream (
212 struct acpi_resource *linked_list,
213 u8 **output_buffer,
214 acpi_size *bytes_consumed);
215
216acpi_status
217acpi_rs_fixed_io_stream (
218 struct acpi_resource *linked_list,
219 u8 **output_buffer,
220 acpi_size *bytes_consumed);
221
222acpi_status
223acpi_rs_irq_resource (
224 u8 *byte_stream_buffer,
225 acpi_size *bytes_consumed,
226 u8 **output_buffer,
227 acpi_size *structure_size);
228
229acpi_status
230acpi_rs_irq_stream (
231 struct acpi_resource *linked_list,
232 u8 **output_buffer,
233 acpi_size *bytes_consumed);
234
235acpi_status
236acpi_rs_dma_resource (
237 u8 *byte_stream_buffer,
238 acpi_size *bytes_consumed,
239 u8 **output_buffer,
240 acpi_size *structure_size);
241
242acpi_status
243acpi_rs_dma_stream (
244 struct acpi_resource *linked_list,
245 u8 **output_buffer,
246 acpi_size *bytes_consumed);
247
248acpi_status
249acpi_rs_address16_resource (
250 u8 *byte_stream_buffer,
251 acpi_size *bytes_consumed,
252 u8 **output_buffer,
253 acpi_size *structure_size);
254
255acpi_status
256acpi_rs_address16_stream (
257 struct acpi_resource *linked_list,
258 u8 **output_buffer,
259 acpi_size *bytes_consumed);
260
261acpi_status
262acpi_rs_address32_resource (
263 u8 *byte_stream_buffer,
264 acpi_size *bytes_consumed,
265 u8 **output_buffer,
266 acpi_size *structure_size);
267
268acpi_status
269acpi_rs_address32_stream (
270 struct acpi_resource *linked_list,
271 u8 **output_buffer,
272 acpi_size *bytes_consumed);
273
274acpi_status
275acpi_rs_address64_resource (
276 u8 *byte_stream_buffer,
277 acpi_size *bytes_consumed,
278 u8 **output_buffer,
279 acpi_size *structure_size);
280
281acpi_status
282acpi_rs_address64_stream (
283 struct acpi_resource *linked_list,
284 u8 **output_buffer,
285 acpi_size *bytes_consumed);
286
287acpi_status
288acpi_rs_start_depend_fns_resource (
289 u8 *byte_stream_buffer,
290 acpi_size *bytes_consumed,
291 u8 **output_buffer,
292 acpi_size *structure_size);
293
294acpi_status
295acpi_rs_end_depend_fns_resource (
296 u8 *byte_stream_buffer,
297 acpi_size *bytes_consumed,
298 u8 **output_buffer,
299 acpi_size *structure_size);
300
301acpi_status
302acpi_rs_start_depend_fns_stream (
303 struct acpi_resource *linked_list,
304 u8 **output_buffer,
305 acpi_size *bytes_consumed);
306
307acpi_status
308acpi_rs_end_depend_fns_stream (
309 struct acpi_resource *linked_list,
310 u8 **output_buffer,
311 acpi_size *bytes_consumed);
312
313acpi_status
314acpi_rs_memory24_resource (
315 u8 *byte_stream_buffer,
316 acpi_size *bytes_consumed,
317 u8 **output_buffer,
318 acpi_size *structure_size);
319
320acpi_status
321acpi_rs_memory24_stream (
322 struct acpi_resource *linked_list,
323 u8 **output_buffer,
324 acpi_size *bytes_consumed);
325
326acpi_status
327acpi_rs_memory32_range_resource (
328 u8 *byte_stream_buffer,
329 acpi_size *bytes_consumed,
330 u8 **output_buffer,
331 acpi_size *structure_size);
332
333acpi_status
334acpi_rs_fixed_memory32_resource (
335 u8 *byte_stream_buffer,
336 acpi_size *bytes_consumed,
337 u8 **output_buffer,
338 acpi_size *structure_size);
339
340acpi_status
341acpi_rs_memory32_range_stream (
342 struct acpi_resource *linked_list,
343 u8 **output_buffer,
344 acpi_size *bytes_consumed);
345
346acpi_status
347acpi_rs_fixed_memory32_stream (
348 struct acpi_resource *linked_list,
349 u8 **output_buffer,
350 acpi_size *bytes_consumed);
351
352acpi_status
353acpi_rs_extended_irq_resource (
354 u8 *byte_stream_buffer,
355 acpi_size *bytes_consumed,
356 u8 **output_buffer,
357 acpi_size *structure_size);
358
359acpi_status
360acpi_rs_extended_irq_stream (
361 struct acpi_resource *linked_list,
362 u8 **output_buffer,
363 acpi_size *bytes_consumed);
364
365acpi_status
366acpi_rs_end_tag_resource (
367 u8 *byte_stream_buffer,
368 acpi_size *bytes_consumed,
369 u8 **output_buffer,
370 acpi_size *structure_size);
371
372acpi_status
373acpi_rs_end_tag_stream (
374 struct acpi_resource *linked_list,
375 u8 **output_buffer,
376 acpi_size *bytes_consumed);
377
378acpi_status
379acpi_rs_vendor_resource (
380 u8 *byte_stream_buffer,
381 acpi_size *bytes_consumed,
382 u8 **output_buffer,
383 acpi_size *structure_size);
384
385acpi_status
386acpi_rs_vendor_stream (
387 struct acpi_resource *linked_list,
388 u8 **output_buffer,
389 acpi_size *bytes_consumed);
390
391u8
392acpi_rs_get_resource_type (
393 u8 resource_start_byte);
394
395#endif /* __ACRESRC_H__ */