1 /******************************************************************************
3 * Name: acresrc.h - Resource Manager function prototypes
5 *****************************************************************************/
8 * Copyright (C) 2000 - 2005, R. Byron Moore
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
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.
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.
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.
49 * Function prototypes called from Acpi* APIs
53 acpi_rs_get_prt_method_data (
55 struct acpi_buffer
*ret_buffer
);
59 acpi_rs_get_crs_method_data (
61 struct acpi_buffer
*ret_buffer
);
63 #ifdef ACPI_FUTURE_USAGE
65 acpi_rs_get_prs_method_data (
67 struct acpi_buffer
*ret_buffer
);
71 acpi_rs_get_method_data (
74 struct acpi_buffer
*ret_buffer
);
77 acpi_rs_set_srs_method_data (
79 struct acpi_buffer
*ret_buffer
);
82 acpi_rs_create_resource_list (
83 union acpi_operand_object
*byte_stream_buffer
,
84 struct acpi_buffer
*output_buffer
);
87 acpi_rs_create_byte_stream (
88 struct acpi_resource
*linked_list_buffer
,
89 struct acpi_buffer
*output_buffer
);
92 acpi_rs_create_pci_routing_table (
93 union acpi_operand_object
*package_object
,
94 struct acpi_buffer
*output_buffer
);
98 * Function prototypes called from acpi_rs_create*
100 #ifdef ACPI_FUTURE_USAGE
103 union acpi_resource_data
*data
);
106 acpi_rs_dump_address16 (
107 union acpi_resource_data
*data
);
110 acpi_rs_dump_address32 (
111 union acpi_resource_data
*data
);
114 acpi_rs_dump_address64 (
115 union acpi_resource_data
*data
);
119 union acpi_resource_data
*data
);
123 union acpi_resource_data
*data
);
126 acpi_rs_dump_extended_irq (
127 union acpi_resource_data
*data
);
130 acpi_rs_dump_fixed_io (
131 union acpi_resource_data
*data
);
134 acpi_rs_dump_fixed_memory32 (
135 union acpi_resource_data
*data
);
138 acpi_rs_dump_memory24 (
139 union acpi_resource_data
*data
);
142 acpi_rs_dump_memory32 (
143 union acpi_resource_data
*data
);
146 acpi_rs_dump_start_depend_fns (
147 union acpi_resource_data
*data
);
150 acpi_rs_dump_vendor_specific (
151 union acpi_resource_data
*data
);
154 acpi_rs_dump_resource_list (
155 struct acpi_resource
*resource
);
158 acpi_rs_dump_irq_list (
160 #endif /* ACPI_FUTURE_USAGE */
163 acpi_rs_get_byte_stream_start (
164 u8
*byte_stream_buffer
,
165 u8
**byte_stream_start
,
169 acpi_rs_get_list_length (
170 u8
*byte_stream_buffer
,
171 u32 byte_stream_buffer_length
,
172 acpi_size
*size_needed
);
175 acpi_rs_get_byte_stream_length (
176 struct acpi_resource
*linked_list_buffer
,
177 acpi_size
*size_needed
);
180 acpi_rs_get_pci_routing_table_length (
181 union acpi_operand_object
*package_object
,
182 acpi_size
*buffer_size_needed
);
185 acpi_rs_byte_stream_to_list (
186 u8
*byte_stream_buffer
,
187 u32 byte_stream_buffer_length
,
191 acpi_rs_list_to_byte_stream (
192 struct acpi_resource
*linked_list
,
193 acpi_size byte_stream_size_needed
,
197 acpi_rs_io_resource (
198 u8
*byte_stream_buffer
,
199 acpi_size
*bytes_consumed
,
201 acpi_size
*structure_size
);
204 acpi_rs_fixed_io_resource (
205 u8
*byte_stream_buffer
,
206 acpi_size
*bytes_consumed
,
208 acpi_size
*structure_size
);
212 struct acpi_resource
*linked_list
,
214 acpi_size
*bytes_consumed
);
217 acpi_rs_fixed_io_stream (
218 struct acpi_resource
*linked_list
,
220 acpi_size
*bytes_consumed
);
223 acpi_rs_irq_resource (
224 u8
*byte_stream_buffer
,
225 acpi_size
*bytes_consumed
,
227 acpi_size
*structure_size
);
231 struct acpi_resource
*linked_list
,
233 acpi_size
*bytes_consumed
);
236 acpi_rs_dma_resource (
237 u8
*byte_stream_buffer
,
238 acpi_size
*bytes_consumed
,
240 acpi_size
*structure_size
);
244 struct acpi_resource
*linked_list
,
246 acpi_size
*bytes_consumed
);
249 acpi_rs_address16_resource (
250 u8
*byte_stream_buffer
,
251 acpi_size
*bytes_consumed
,
253 acpi_size
*structure_size
);
256 acpi_rs_address16_stream (
257 struct acpi_resource
*linked_list
,
259 acpi_size
*bytes_consumed
);
262 acpi_rs_address32_resource (
263 u8
*byte_stream_buffer
,
264 acpi_size
*bytes_consumed
,
266 acpi_size
*structure_size
);
269 acpi_rs_address32_stream (
270 struct acpi_resource
*linked_list
,
272 acpi_size
*bytes_consumed
);
275 acpi_rs_address64_resource (
276 u8
*byte_stream_buffer
,
277 acpi_size
*bytes_consumed
,
279 acpi_size
*structure_size
);
282 acpi_rs_address64_stream (
283 struct acpi_resource
*linked_list
,
285 acpi_size
*bytes_consumed
);
288 acpi_rs_start_depend_fns_resource (
289 u8
*byte_stream_buffer
,
290 acpi_size
*bytes_consumed
,
292 acpi_size
*structure_size
);
295 acpi_rs_end_depend_fns_resource (
296 u8
*byte_stream_buffer
,
297 acpi_size
*bytes_consumed
,
299 acpi_size
*structure_size
);
302 acpi_rs_start_depend_fns_stream (
303 struct acpi_resource
*linked_list
,
305 acpi_size
*bytes_consumed
);
308 acpi_rs_end_depend_fns_stream (
309 struct acpi_resource
*linked_list
,
311 acpi_size
*bytes_consumed
);
314 acpi_rs_memory24_resource (
315 u8
*byte_stream_buffer
,
316 acpi_size
*bytes_consumed
,
318 acpi_size
*structure_size
);
321 acpi_rs_memory24_stream (
322 struct acpi_resource
*linked_list
,
324 acpi_size
*bytes_consumed
);
327 acpi_rs_memory32_range_resource (
328 u8
*byte_stream_buffer
,
329 acpi_size
*bytes_consumed
,
331 acpi_size
*structure_size
);
334 acpi_rs_fixed_memory32_resource (
335 u8
*byte_stream_buffer
,
336 acpi_size
*bytes_consumed
,
338 acpi_size
*structure_size
);
341 acpi_rs_memory32_range_stream (
342 struct acpi_resource
*linked_list
,
344 acpi_size
*bytes_consumed
);
347 acpi_rs_fixed_memory32_stream (
348 struct acpi_resource
*linked_list
,
350 acpi_size
*bytes_consumed
);
353 acpi_rs_extended_irq_resource (
354 u8
*byte_stream_buffer
,
355 acpi_size
*bytes_consumed
,
357 acpi_size
*structure_size
);
360 acpi_rs_extended_irq_stream (
361 struct acpi_resource
*linked_list
,
363 acpi_size
*bytes_consumed
);
366 acpi_rs_end_tag_resource (
367 u8
*byte_stream_buffer
,
368 acpi_size
*bytes_consumed
,
370 acpi_size
*structure_size
);
373 acpi_rs_end_tag_stream (
374 struct acpi_resource
*linked_list
,
376 acpi_size
*bytes_consumed
);
379 acpi_rs_vendor_resource (
380 u8
*byte_stream_buffer
,
381 acpi_size
*bytes_consumed
,
383 acpi_size
*structure_size
);
386 acpi_rs_vendor_stream (
387 struct acpi_resource
*linked_list
,
389 acpi_size
*bytes_consumed
);
392 acpi_rs_get_resource_type (
393 u8 resource_start_byte
);
395 #endif /* __ACRESRC_H__ */