Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /****************************************************************************** |
| 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 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | /* |
| 48 | * Function prototypes called from Acpi* APIs |
| 49 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 50 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 51 | acpi_rs_get_prt_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 52 | |
| 53 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 54 | acpi_rs_get_crs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 56 | #ifdef ACPI_FUTURE_USAGE |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 58 | acpi_rs_get_prs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
| 59 | #endif /* ACPI_FUTURE_USAGE */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 60 | |
| 61 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 62 | acpi_rs_get_method_data(acpi_handle handle, |
| 63 | char *path, struct acpi_buffer *ret_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | |
| 65 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 66 | acpi_rs_set_srs_method_data(acpi_handle handle, struct acpi_buffer *ret_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 67 | |
| 68 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 69 | acpi_rs_create_resource_list(union acpi_operand_object *byte_stream_buffer, |
| 70 | struct acpi_buffer *output_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 71 | |
| 72 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 73 | acpi_rs_create_byte_stream(struct acpi_resource *linked_list_buffer, |
| 74 | struct acpi_buffer *output_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 75 | |
| 76 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 77 | acpi_rs_create_pci_routing_table(union acpi_operand_object *package_object, |
| 78 | struct acpi_buffer *output_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 79 | |
| 80 | /* |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 81 | * rsdump |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 82 | */ |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 83 | #ifdef ACPI_FUTURE_USAGE |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 84 | void acpi_rs_dump_resource_list(struct acpi_resource *resource); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 85 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 86 | void acpi_rs_dump_irq_list(u8 * route_table); |
| 87 | #endif /* ACPI_FUTURE_USAGE */ |
Robert Moore | 44f6c01 | 2005-04-18 22:49:35 -0400 | [diff] [blame] | 88 | |
| 89 | /* |
| 90 | * rscalc |
| 91 | */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 92 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 93 | acpi_rs_get_byte_stream_start(u8 * byte_stream_buffer, |
| 94 | u8 ** byte_stream_start, u32 * size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 95 | |
| 96 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 97 | acpi_rs_get_list_length(u8 * byte_stream_buffer, |
| 98 | u32 byte_stream_buffer_length, acpi_size * size_needed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 99 | |
| 100 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 101 | acpi_rs_get_byte_stream_length(struct acpi_resource *linked_list_buffer, |
| 102 | acpi_size * size_needed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 103 | |
| 104 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 105 | acpi_rs_get_pci_routing_table_length(union acpi_operand_object *package_object, |
| 106 | acpi_size * buffer_size_needed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 107 | |
| 108 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 109 | acpi_rs_byte_stream_to_list(u8 * byte_stream_buffer, |
| 110 | u32 byte_stream_buffer_length, u8 * output_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 111 | |
| 112 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 113 | acpi_rs_list_to_byte_stream(struct acpi_resource *linked_list, |
| 114 | acpi_size byte_stream_size_needed, |
| 115 | u8 * output_buffer); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 116 | |
| 117 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 118 | acpi_rs_io_resource(u8 * byte_stream_buffer, |
| 119 | acpi_size * bytes_consumed, |
| 120 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 121 | |
| 122 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 123 | acpi_rs_fixed_io_resource(u8 * byte_stream_buffer, |
| 124 | acpi_size * bytes_consumed, |
| 125 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 126 | |
| 127 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 128 | acpi_rs_io_stream(struct acpi_resource *linked_list, |
| 129 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 130 | |
| 131 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 132 | acpi_rs_fixed_io_stream(struct acpi_resource *linked_list, |
| 133 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 134 | |
| 135 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 136 | acpi_rs_irq_resource(u8 * byte_stream_buffer, |
| 137 | acpi_size * bytes_consumed, |
| 138 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 139 | |
| 140 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 141 | acpi_rs_irq_stream(struct acpi_resource *linked_list, |
| 142 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 143 | |
| 144 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 145 | acpi_rs_dma_resource(u8 * byte_stream_buffer, |
| 146 | acpi_size * bytes_consumed, |
| 147 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 148 | |
| 149 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 150 | acpi_rs_dma_stream(struct acpi_resource *linked_list, |
| 151 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 152 | |
| 153 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 154 | acpi_rs_address16_resource(u8 * byte_stream_buffer, |
| 155 | acpi_size * bytes_consumed, |
| 156 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 157 | |
| 158 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 159 | acpi_rs_address16_stream(struct acpi_resource *linked_list, |
| 160 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 161 | |
| 162 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 163 | acpi_rs_address32_resource(u8 * byte_stream_buffer, |
| 164 | acpi_size * bytes_consumed, |
| 165 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 166 | |
| 167 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 168 | acpi_rs_address32_stream(struct acpi_resource *linked_list, |
| 169 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 170 | |
| 171 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 172 | acpi_rs_address64_resource(u8 * byte_stream_buffer, |
| 173 | acpi_size * bytes_consumed, |
| 174 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 175 | |
| 176 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 177 | acpi_rs_address64_stream(struct acpi_resource *linked_list, |
| 178 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 179 | |
| 180 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 181 | acpi_rs_start_depend_fns_resource(u8 * byte_stream_buffer, |
| 182 | acpi_size * bytes_consumed, |
| 183 | u8 ** output_buffer, |
| 184 | acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 185 | |
| 186 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 187 | acpi_rs_end_depend_fns_resource(u8 * byte_stream_buffer, |
| 188 | acpi_size * bytes_consumed, |
| 189 | u8 ** output_buffer, |
| 190 | acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 191 | |
| 192 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 193 | acpi_rs_start_depend_fns_stream(struct acpi_resource *linked_list, |
| 194 | u8 ** output_buffer, |
| 195 | acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 196 | |
| 197 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 198 | acpi_rs_end_depend_fns_stream(struct acpi_resource *linked_list, |
| 199 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 200 | |
| 201 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 202 | acpi_rs_memory24_resource(u8 * byte_stream_buffer, |
| 203 | acpi_size * bytes_consumed, |
| 204 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 205 | |
| 206 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 207 | acpi_rs_memory24_stream(struct acpi_resource *linked_list, |
| 208 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 209 | |
| 210 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 211 | acpi_rs_memory32_range_resource(u8 * byte_stream_buffer, |
| 212 | acpi_size * bytes_consumed, |
| 213 | u8 ** output_buffer, |
| 214 | acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 215 | |
| 216 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 217 | acpi_rs_fixed_memory32_resource(u8 * byte_stream_buffer, |
| 218 | acpi_size * bytes_consumed, |
| 219 | u8 ** output_buffer, |
| 220 | acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 221 | |
| 222 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 223 | acpi_rs_memory32_range_stream(struct acpi_resource *linked_list, |
| 224 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 225 | |
| 226 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 227 | acpi_rs_fixed_memory32_stream(struct acpi_resource *linked_list, |
| 228 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 229 | |
| 230 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 231 | acpi_rs_extended_irq_resource(u8 * byte_stream_buffer, |
| 232 | acpi_size * bytes_consumed, |
| 233 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 234 | |
| 235 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 236 | acpi_rs_extended_irq_stream(struct acpi_resource *linked_list, |
| 237 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 238 | |
| 239 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 240 | acpi_rs_end_tag_resource(u8 * byte_stream_buffer, |
| 241 | acpi_size * bytes_consumed, |
| 242 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 243 | |
| 244 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 245 | acpi_rs_end_tag_stream(struct acpi_resource *linked_list, |
| 246 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 247 | |
| 248 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 249 | acpi_rs_vendor_resource(u8 * byte_stream_buffer, |
| 250 | acpi_size * bytes_consumed, |
| 251 | u8 ** output_buffer, acpi_size * structure_size); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 252 | |
| 253 | acpi_status |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 254 | acpi_rs_vendor_stream(struct acpi_resource *linked_list, |
| 255 | u8 ** output_buffer, acpi_size * bytes_consumed); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 256 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 257 | u8 acpi_rs_get_resource_type(u8 resource_start_byte); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 258 | |
Len Brown | 4be44fc | 2005-08-05 00:44:28 -0400 | [diff] [blame^] | 259 | #endif /* __ACRESRC_H__ */ |