acresrc.h revision 1.17 1 1.1 jruoho /******************************************************************************
2 1.1 jruoho *
3 1.1 jruoho * Name: acresrc.h - Resource Manager function prototypes
4 1.1 jruoho *
5 1.1 jruoho *****************************************************************************/
6 1.1 jruoho
7 1.17 christos /******************************************************************************
8 1.17 christos *
9 1.17 christos * 1. Copyright Notice
10 1.17 christos *
11 1.17 christos * Some or all of this work - Copyright (c) 1999 - 2024, Intel Corp.
12 1.1 jruoho * All rights reserved.
13 1.1 jruoho *
14 1.17 christos * 2. License
15 1.17 christos *
16 1.17 christos * 2.1. This is your license from Intel Corp. under its intellectual property
17 1.17 christos * rights. You may have additional license terms from the party that provided
18 1.17 christos * you this software, covering your right to use that party's intellectual
19 1.17 christos * property rights.
20 1.17 christos *
21 1.17 christos * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 1.17 christos * copy of the source code appearing in this file ("Covered Code") an
23 1.17 christos * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 1.17 christos * base code distributed originally by Intel ("Original Intel Code") to copy,
25 1.17 christos
26 1.17 christos * make derivatives, distribute, use and display any portion of the Covered
27 1.17 christos * Code in any form, with the right to sublicense such rights; and
28 1.17 christos *
29 1.17 christos * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30 1.17 christos * license (with the right to sublicense), under only those claims of Intel
31 1.17 christos * patents that are infringed by the Original Intel Code, to make, use, sell,
32 1.17 christos * offer to sell, and import the Covered Code and derivative works thereof
33 1.17 christos * solely to the minimum extent necessary to exercise the above copyright
34 1.17 christos * license, and in no event shall the patent license extend to any additions
35 1.17 christos * to or modifications of the Original Intel Code. No other license or right
36 1.17 christos * is granted directly or by implication, estoppel or otherwise;
37 1.17 christos *
38 1.17 christos * The above copyright and patent license is granted only if the following
39 1.17 christos * conditions are met:
40 1.17 christos *
41 1.17 christos * 3. Conditions
42 1.17 christos *
43 1.17 christos * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44 1.17 christos * Redistribution of source code of any substantial portion of the Covered
45 1.17 christos * Code or modification with rights to further distribute source must include
46 1.17 christos * the above Copyright Notice, the above License, this list of Conditions,
47 1.17 christos * and the following Disclaimer and Export Compliance provision. In addition,
48 1.17 christos * Licensee must cause all Covered Code to which Licensee contributes to
49 1.17 christos * contain a file documenting the changes Licensee made to create that Covered
50 1.17 christos * Code and the date of any change. Licensee must include in that file the
51 1.17 christos * documentation of any changes made by any predecessor Licensee. Licensee
52 1.17 christos * must include a prominent statement that the modification is derived,
53 1.17 christos * directly or indirectly, from Original Intel Code.
54 1.17 christos *
55 1.17 christos * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56 1.17 christos * Redistribution of source code of any substantial portion of the Covered
57 1.17 christos * Code or modification without rights to further distribute source must
58 1.17 christos * include the following Disclaimer and Export Compliance provision in the
59 1.17 christos * documentation and/or other materials provided with distribution. In
60 1.17 christos * addition, Licensee may not authorize further sublicense of source of any
61 1.17 christos * portion of the Covered Code, and must include terms to the effect that the
62 1.17 christos * license from Licensee to its licensee is limited to the intellectual
63 1.17 christos * property embodied in the software Licensee provides to its licensee, and
64 1.17 christos * not to intellectual property embodied in modifications its licensee may
65 1.17 christos * make.
66 1.17 christos *
67 1.17 christos * 3.3. Redistribution of Executable. Redistribution in executable form of any
68 1.17 christos * substantial portion of the Covered Code or modification must reproduce the
69 1.17 christos * above Copyright Notice, and the following Disclaimer and Export Compliance
70 1.17 christos * provision in the documentation and/or other materials provided with the
71 1.17 christos * distribution.
72 1.17 christos *
73 1.17 christos * 3.4. Intel retains all right, title, and interest in and to the Original
74 1.17 christos * Intel Code.
75 1.17 christos *
76 1.17 christos * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77 1.17 christos * Intel shall be used in advertising or otherwise to promote the sale, use or
78 1.17 christos * other dealings in products derived from or relating to the Covered Code
79 1.17 christos * without prior written authorization from Intel.
80 1.17 christos *
81 1.17 christos * 4. Disclaimer and Export Compliance
82 1.17 christos *
83 1.17 christos * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84 1.17 christos * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85 1.17 christos * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
86 1.17 christos * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
87 1.17 christos * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
88 1.17 christos * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
89 1.17 christos * PARTICULAR PURPOSE.
90 1.17 christos *
91 1.17 christos * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 1.17 christos * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 1.17 christos * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 1.17 christos * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 1.17 christos * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 1.17 christos * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
97 1.17 christos * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
98 1.17 christos * LIMITED REMEDY.
99 1.17 christos *
100 1.17 christos * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 1.17 christos * software or system incorporating such software without first obtaining any
102 1.17 christos * required license or other approval from the U. S. Department of Commerce or
103 1.17 christos * any other agency or department of the United States Government. In the
104 1.17 christos * event Licensee exports any such software from the United States or
105 1.17 christos * re-exports any such software from a foreign destination, Licensee shall
106 1.17 christos * ensure that the distribution and export/re-export of the software is in
107 1.17 christos * compliance with all laws, regulations, orders, or other restrictions of the
108 1.17 christos * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 1.17 christos * any of its subsidiaries will export/re-export any technical data, process,
110 1.17 christos * software, or service, directly or indirectly, to any country for which the
111 1.17 christos * United States government or any agency thereof requires an export license,
112 1.17 christos * other governmental approval, or letter of assurance, without first obtaining
113 1.17 christos * such license, approval or letter.
114 1.17 christos *
115 1.17 christos *****************************************************************************
116 1.17 christos *
117 1.17 christos * Alternatively, you may choose to be licensed under the terms of the
118 1.17 christos * following license:
119 1.17 christos *
120 1.3 jruoho * Redistribution and use in source and binary forms, with or without
121 1.3 jruoho * modification, are permitted provided that the following conditions
122 1.3 jruoho * are met:
123 1.3 jruoho * 1. Redistributions of source code must retain the above copyright
124 1.3 jruoho * notice, this list of conditions, and the following disclaimer,
125 1.3 jruoho * without modification.
126 1.3 jruoho * 2. Redistributions in binary form must reproduce at minimum a disclaimer
127 1.3 jruoho * substantially similar to the "NO WARRANTY" disclaimer below
128 1.3 jruoho * ("Disclaimer") and any redistribution must be conditioned upon
129 1.3 jruoho * including a substantially similar Disclaimer requirement for further
130 1.3 jruoho * binary redistribution.
131 1.3 jruoho * 3. Neither the names of the above-listed copyright holders nor the names
132 1.3 jruoho * of any contributors may be used to endorse or promote products derived
133 1.3 jruoho * from this software without specific prior written permission.
134 1.3 jruoho *
135 1.3 jruoho * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
136 1.3 jruoho * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
137 1.14 christos * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
138 1.3 jruoho * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
139 1.17 christos * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
140 1.17 christos * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
141 1.17 christos * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
142 1.17 christos * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
143 1.17 christos * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
144 1.17 christos * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
145 1.17 christos * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
146 1.17 christos *
147 1.17 christos * Alternatively, you may choose to be licensed under the terms of the
148 1.17 christos * GNU General Public License ("GPL") version 2 as published by the Free
149 1.17 christos * Software Foundation.
150 1.17 christos *
151 1.17 christos *****************************************************************************/
152 1.1 jruoho
153 1.1 jruoho #ifndef __ACRESRC_H__
154 1.1 jruoho #define __ACRESRC_H__
155 1.1 jruoho
156 1.1 jruoho /* Need the AML resource descriptor structs */
157 1.1 jruoho
158 1.1 jruoho #include "amlresrc.h"
159 1.1 jruoho
160 1.1 jruoho
161 1.1 jruoho /*
162 1.1 jruoho * If possible, pack the following structures to byte alignment, since we
163 1.1 jruoho * don't care about performance for debug output. Two cases where we cannot
164 1.1 jruoho * pack the structures:
165 1.1 jruoho *
166 1.1 jruoho * 1) Hardware does not support misaligned memory transfers
167 1.1 jruoho * 2) Compiler does not support pointers within packed structures
168 1.1 jruoho */
169 1.1 jruoho #if (!defined(ACPI_MISALIGNMENT_NOT_SUPPORTED) && !defined(ACPI_PACKED_POINTERS_NOT_SUPPORTED))
170 1.1 jruoho #pragma pack(1)
171 1.1 jruoho #endif
172 1.1 jruoho
173 1.1 jruoho /*
174 1.1 jruoho * Individual entry for the resource conversion tables
175 1.1 jruoho */
176 1.1 jruoho typedef const struct acpi_rsconvert_info
177 1.1 jruoho {
178 1.1 jruoho UINT8 Opcode;
179 1.1 jruoho UINT8 ResourceOffset;
180 1.1 jruoho UINT8 AmlOffset;
181 1.1 jruoho UINT8 Value;
182 1.1 jruoho
183 1.1 jruoho } ACPI_RSCONVERT_INFO;
184 1.1 jruoho
185 1.1 jruoho /* Resource conversion opcodes */
186 1.1 jruoho
187 1.4 christos typedef enum
188 1.4 christos {
189 1.4 christos ACPI_RSC_INITGET = 0,
190 1.4 christos ACPI_RSC_INITSET,
191 1.4 christos ACPI_RSC_FLAGINIT,
192 1.4 christos ACPI_RSC_1BITFLAG,
193 1.4 christos ACPI_RSC_2BITFLAG,
194 1.4 christos ACPI_RSC_3BITFLAG,
195 1.14 christos ACPI_RSC_6BITFLAG,
196 1.4 christos ACPI_RSC_ADDRESS,
197 1.4 christos ACPI_RSC_BITMASK,
198 1.4 christos ACPI_RSC_BITMASK16,
199 1.4 christos ACPI_RSC_COUNT,
200 1.4 christos ACPI_RSC_COUNT16,
201 1.4 christos ACPI_RSC_COUNT_GPIO_PIN,
202 1.4 christos ACPI_RSC_COUNT_GPIO_RES,
203 1.4 christos ACPI_RSC_COUNT_GPIO_VEN,
204 1.4 christos ACPI_RSC_COUNT_SERIAL_RES,
205 1.4 christos ACPI_RSC_COUNT_SERIAL_VEN,
206 1.4 christos ACPI_RSC_DATA8,
207 1.4 christos ACPI_RSC_EXIT_EQ,
208 1.4 christos ACPI_RSC_EXIT_LE,
209 1.4 christos ACPI_RSC_EXIT_NE,
210 1.4 christos ACPI_RSC_LENGTH,
211 1.4 christos ACPI_RSC_MOVE_GPIO_PIN,
212 1.4 christos ACPI_RSC_MOVE_GPIO_RES,
213 1.4 christos ACPI_RSC_MOVE_SERIAL_RES,
214 1.4 christos ACPI_RSC_MOVE_SERIAL_VEN,
215 1.4 christos ACPI_RSC_MOVE8,
216 1.4 christos ACPI_RSC_MOVE16,
217 1.4 christos ACPI_RSC_MOVE32,
218 1.4 christos ACPI_RSC_MOVE64,
219 1.4 christos ACPI_RSC_SET8,
220 1.4 christos ACPI_RSC_SOURCE,
221 1.4 christos ACPI_RSC_SOURCEX
222 1.4 christos
223 1.4 christos } ACPI_RSCONVERT_OPCODES;
224 1.1 jruoho
225 1.1 jruoho /* Resource Conversion sub-opcodes */
226 1.1 jruoho
227 1.1 jruoho #define ACPI_RSC_COMPARE_AML_LENGTH 0
228 1.1 jruoho #define ACPI_RSC_COMPARE_VALUE 1
229 1.1 jruoho
230 1.1 jruoho #define ACPI_RSC_TABLE_SIZE(d) (sizeof (d) / sizeof (ACPI_RSCONVERT_INFO))
231 1.1 jruoho
232 1.1 jruoho #define ACPI_RS_OFFSET(f) (UINT8) ACPI_OFFSET (ACPI_RESOURCE,f)
233 1.1 jruoho #define AML_OFFSET(f) (UINT8) ACPI_OFFSET (AML_RESOURCE,f)
234 1.1 jruoho
235 1.1 jruoho
236 1.4 christos /*
237 1.4 christos * Individual entry for the resource dump tables
238 1.4 christos */
239 1.1 jruoho typedef const struct acpi_rsdump_info
240 1.1 jruoho {
241 1.1 jruoho UINT8 Opcode;
242 1.1 jruoho UINT8 Offset;
243 1.2 jruoho const char *Name;
244 1.8 christos const char **Pointer;
245 1.1 jruoho
246 1.1 jruoho } ACPI_RSDUMP_INFO;
247 1.1 jruoho
248 1.1 jruoho /* Values for the Opcode field above */
249 1.1 jruoho
250 1.4 christos typedef enum
251 1.4 christos {
252 1.4 christos ACPI_RSD_TITLE = 0,
253 1.4 christos ACPI_RSD_1BITFLAG,
254 1.4 christos ACPI_RSD_2BITFLAG,
255 1.4 christos ACPI_RSD_3BITFLAG,
256 1.14 christos ACPI_RSD_6BITFLAG,
257 1.4 christos ACPI_RSD_ADDRESS,
258 1.4 christos ACPI_RSD_DWORDLIST,
259 1.4 christos ACPI_RSD_LITERAL,
260 1.4 christos ACPI_RSD_LONGLIST,
261 1.4 christos ACPI_RSD_SHORTLIST,
262 1.4 christos ACPI_RSD_SHORTLISTX,
263 1.4 christos ACPI_RSD_SOURCE,
264 1.4 christos ACPI_RSD_STRING,
265 1.4 christos ACPI_RSD_UINT8,
266 1.4 christos ACPI_RSD_UINT16,
267 1.4 christos ACPI_RSD_UINT32,
268 1.4 christos ACPI_RSD_UINT64,
269 1.10 christos ACPI_RSD_WORDLIST,
270 1.10 christos ACPI_RSD_LABEL,
271 1.10 christos ACPI_RSD_SOURCE_LABEL,
272 1.4 christos
273 1.4 christos } ACPI_RSDUMP_OPCODES;
274 1.1 jruoho
275 1.1 jruoho /* restore default alignment */
276 1.1 jruoho
277 1.1 jruoho #pragma pack()
278 1.1 jruoho
279 1.1 jruoho
280 1.1 jruoho /* Resource tables indexed by internal resource type */
281 1.1 jruoho
282 1.1 jruoho extern const UINT8 AcpiGbl_AmlResourceSizes[];
283 1.4 christos extern const UINT8 AcpiGbl_AmlResourceSerialBusSizes[];
284 1.1 jruoho extern ACPI_RSCONVERT_INFO *AcpiGbl_SetResourceDispatch[];
285 1.1 jruoho
286 1.1 jruoho /* Resource tables indexed by raw AML resource descriptor type */
287 1.1 jruoho
288 1.1 jruoho extern const UINT8 AcpiGbl_ResourceStructSizes[];
289 1.4 christos extern const UINT8 AcpiGbl_ResourceStructSerialBusSizes[];
290 1.1 jruoho extern ACPI_RSCONVERT_INFO *AcpiGbl_GetResourceDispatch[];
291 1.1 jruoho
292 1.4 christos extern ACPI_RSCONVERT_INFO *AcpiGbl_ConvertResourceSerialBusDispatch[];
293 1.1 jruoho
294 1.1 jruoho typedef struct acpi_vendor_walk_info
295 1.1 jruoho {
296 1.1 jruoho ACPI_VENDOR_UUID *Uuid;
297 1.1 jruoho ACPI_BUFFER *Buffer;
298 1.1 jruoho ACPI_STATUS Status;
299 1.1 jruoho
300 1.1 jruoho } ACPI_VENDOR_WALK_INFO;
301 1.1 jruoho
302 1.1 jruoho
303 1.1 jruoho /*
304 1.1 jruoho * rscreate
305 1.1 jruoho */
306 1.1 jruoho ACPI_STATUS
307 1.1 jruoho AcpiRsCreateResourceList (
308 1.1 jruoho ACPI_OPERAND_OBJECT *AmlBuffer,
309 1.1 jruoho ACPI_BUFFER *OutputBuffer);
310 1.1 jruoho
311 1.1 jruoho ACPI_STATUS
312 1.1 jruoho AcpiRsCreateAmlResources (
313 1.4 christos ACPI_BUFFER *ResourceList,
314 1.1 jruoho ACPI_BUFFER *OutputBuffer);
315 1.1 jruoho
316 1.1 jruoho ACPI_STATUS
317 1.1 jruoho AcpiRsCreatePciRoutingTable (
318 1.1 jruoho ACPI_OPERAND_OBJECT *PackageObject,
319 1.1 jruoho ACPI_BUFFER *OutputBuffer);
320 1.1 jruoho
321 1.1 jruoho
322 1.1 jruoho /*
323 1.1 jruoho * rsutils
324 1.1 jruoho */
325 1.1 jruoho ACPI_STATUS
326 1.1 jruoho AcpiRsGetPrtMethodData (
327 1.1 jruoho ACPI_NAMESPACE_NODE *Node,
328 1.1 jruoho ACPI_BUFFER *RetBuffer);
329 1.1 jruoho
330 1.1 jruoho ACPI_STATUS
331 1.1 jruoho AcpiRsGetCrsMethodData (
332 1.1 jruoho ACPI_NAMESPACE_NODE *Node,
333 1.1 jruoho ACPI_BUFFER *RetBuffer);
334 1.1 jruoho
335 1.1 jruoho ACPI_STATUS
336 1.1 jruoho AcpiRsGetPrsMethodData (
337 1.1 jruoho ACPI_NAMESPACE_NODE *Node,
338 1.1 jruoho ACPI_BUFFER *RetBuffer);
339 1.1 jruoho
340 1.1 jruoho ACPI_STATUS
341 1.1 jruoho AcpiRsGetMethodData (
342 1.1 jruoho ACPI_HANDLE Handle,
343 1.8 christos const char *Path,
344 1.1 jruoho ACPI_BUFFER *RetBuffer);
345 1.1 jruoho
346 1.1 jruoho ACPI_STATUS
347 1.1 jruoho AcpiRsSetSrsMethodData (
348 1.1 jruoho ACPI_NAMESPACE_NODE *Node,
349 1.1 jruoho ACPI_BUFFER *RetBuffer);
350 1.1 jruoho
351 1.4 christos ACPI_STATUS
352 1.4 christos AcpiRsGetAeiMethodData (
353 1.4 christos ACPI_NAMESPACE_NODE *Node,
354 1.4 christos ACPI_BUFFER *RetBuffer);
355 1.1 jruoho
356 1.1 jruoho /*
357 1.1 jruoho * rscalc
358 1.1 jruoho */
359 1.1 jruoho ACPI_STATUS
360 1.1 jruoho AcpiRsGetListLength (
361 1.1 jruoho UINT8 *AmlBuffer,
362 1.1 jruoho UINT32 AmlBufferLength,
363 1.1 jruoho ACPI_SIZE *SizeNeeded);
364 1.1 jruoho
365 1.1 jruoho ACPI_STATUS
366 1.1 jruoho AcpiRsGetAmlLength (
367 1.4 christos ACPI_RESOURCE *ResourceList,
368 1.4 christos ACPI_SIZE ResourceListSize,
369 1.1 jruoho ACPI_SIZE *SizeNeeded);
370 1.1 jruoho
371 1.1 jruoho ACPI_STATUS
372 1.1 jruoho AcpiRsGetPciRoutingTableLength (
373 1.1 jruoho ACPI_OPERAND_OBJECT *PackageObject,
374 1.1 jruoho ACPI_SIZE *BufferSizeNeeded);
375 1.1 jruoho
376 1.1 jruoho ACPI_STATUS
377 1.1 jruoho AcpiRsConvertAmlToResources (
378 1.1 jruoho UINT8 *Aml,
379 1.1 jruoho UINT32 Length,
380 1.1 jruoho UINT32 Offset,
381 1.1 jruoho UINT8 ResourceIndex,
382 1.4 christos void **Context);
383 1.1 jruoho
384 1.1 jruoho ACPI_STATUS
385 1.1 jruoho AcpiRsConvertResourcesToAml (
386 1.1 jruoho ACPI_RESOURCE *Resource,
387 1.1 jruoho ACPI_SIZE AmlSizeNeeded,
388 1.1 jruoho UINT8 *OutputBuffer);
389 1.1 jruoho
390 1.1 jruoho
391 1.1 jruoho /*
392 1.1 jruoho * rsaddr
393 1.1 jruoho */
394 1.1 jruoho void
395 1.1 jruoho AcpiRsSetAddressCommon (
396 1.1 jruoho AML_RESOURCE *Aml,
397 1.1 jruoho ACPI_RESOURCE *Resource);
398 1.1 jruoho
399 1.1 jruoho BOOLEAN
400 1.1 jruoho AcpiRsGetAddressCommon (
401 1.1 jruoho ACPI_RESOURCE *Resource,
402 1.1 jruoho AML_RESOURCE *Aml);
403 1.1 jruoho
404 1.1 jruoho
405 1.1 jruoho /*
406 1.1 jruoho * rsmisc
407 1.1 jruoho */
408 1.1 jruoho ACPI_STATUS
409 1.1 jruoho AcpiRsConvertAmlToResource (
410 1.1 jruoho ACPI_RESOURCE *Resource,
411 1.1 jruoho AML_RESOURCE *Aml,
412 1.1 jruoho ACPI_RSCONVERT_INFO *Info);
413 1.1 jruoho
414 1.1 jruoho ACPI_STATUS
415 1.1 jruoho AcpiRsConvertResourceToAml (
416 1.1 jruoho ACPI_RESOURCE *Resource,
417 1.1 jruoho AML_RESOURCE *Aml,
418 1.1 jruoho ACPI_RSCONVERT_INFO *Info);
419 1.1 jruoho
420 1.1 jruoho
421 1.1 jruoho /*
422 1.1 jruoho * rsutils
423 1.1 jruoho */
424 1.1 jruoho void
425 1.1 jruoho AcpiRsMoveData (
426 1.1 jruoho void *Destination,
427 1.1 jruoho void *Source,
428 1.1 jruoho UINT16 ItemCount,
429 1.1 jruoho UINT8 MoveType);
430 1.1 jruoho
431 1.1 jruoho UINT8
432 1.1 jruoho AcpiRsDecodeBitmask (
433 1.1 jruoho UINT16 Mask,
434 1.1 jruoho UINT8 *List);
435 1.1 jruoho
436 1.1 jruoho UINT16
437 1.1 jruoho AcpiRsEncodeBitmask (
438 1.1 jruoho UINT8 *List,
439 1.1 jruoho UINT8 Count);
440 1.1 jruoho
441 1.1 jruoho ACPI_RS_LENGTH
442 1.1 jruoho AcpiRsGetResourceSource (
443 1.1 jruoho ACPI_RS_LENGTH ResourceLength,
444 1.1 jruoho ACPI_RS_LENGTH MinimumLength,
445 1.1 jruoho ACPI_RESOURCE_SOURCE *ResourceSource,
446 1.1 jruoho AML_RESOURCE *Aml,
447 1.1 jruoho char *StringPtr);
448 1.1 jruoho
449 1.1 jruoho ACPI_RSDESC_SIZE
450 1.1 jruoho AcpiRsSetResourceSource (
451 1.1 jruoho AML_RESOURCE *Aml,
452 1.1 jruoho ACPI_RS_LENGTH MinimumLength,
453 1.1 jruoho ACPI_RESOURCE_SOURCE *ResourceSource);
454 1.1 jruoho
455 1.1 jruoho void
456 1.1 jruoho AcpiRsSetResourceHeader (
457 1.1 jruoho UINT8 DescriptorType,
458 1.1 jruoho ACPI_RSDESC_SIZE TotalLength,
459 1.1 jruoho AML_RESOURCE *Aml);
460 1.1 jruoho
461 1.1 jruoho void
462 1.1 jruoho AcpiRsSetResourceLength (
463 1.1 jruoho ACPI_RSDESC_SIZE TotalLength,
464 1.1 jruoho AML_RESOURCE *Aml);
465 1.1 jruoho
466 1.1 jruoho
467 1.1 jruoho /*
468 1.6 christos * rsdump - Debugger support
469 1.1 jruoho */
470 1.6 christos #ifdef ACPI_DEBUGGER
471 1.1 jruoho void
472 1.1 jruoho AcpiRsDumpResourceList (
473 1.1 jruoho ACPI_RESOURCE *Resource);
474 1.1 jruoho
475 1.1 jruoho void
476 1.1 jruoho AcpiRsDumpIrqList (
477 1.1 jruoho UINT8 *RouteTable);
478 1.6 christos #endif
479 1.1 jruoho
480 1.1 jruoho
481 1.1 jruoho /*
482 1.1 jruoho * Resource conversion tables
483 1.1 jruoho */
484 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertDma[];
485 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertEndDpf[];
486 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertIo[];
487 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertFixedIo[];
488 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertEndTag[];
489 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertMemory24[];
490 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertGenericReg[];
491 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertMemory32[];
492 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertFixedMemory32[];
493 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertAddress32[];
494 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertAddress16[];
495 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertExtIrq[];
496 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertAddress64[];
497 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsConvertExtAddress64[];
498 1.4 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertGpio[];
499 1.4 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertFixedDma[];
500 1.14 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertCsi2SerialBus[];
501 1.4 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertI2cSerialBus[];
502 1.4 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertSpiSerialBus[];
503 1.4 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertUartSerialBus[];
504 1.10 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertPinFunction[];
505 1.10 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertPinConfig[];
506 1.10 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertPinGroup[];
507 1.10 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertPinGroupFunction[];
508 1.10 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertPinGroupConfig[];
509 1.16 christos extern ACPI_RSCONVERT_INFO AcpiRsConvertClockInput[];
510 1.1 jruoho
511 1.1 jruoho /* These resources require separate get/set tables */
512 1.1 jruoho
513 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsGetIrq[];
514 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsGetStartDpf[];
515 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsGetVendorSmall[];
516 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsGetVendorLarge[];
517 1.1 jruoho
518 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsSetIrq[];
519 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsSetStartDpf[];
520 1.1 jruoho extern ACPI_RSCONVERT_INFO AcpiRsSetVendor[];
521 1.1 jruoho
522 1.1 jruoho
523 1.1 jruoho #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
524 1.1 jruoho /*
525 1.1 jruoho * rsinfo
526 1.1 jruoho */
527 1.1 jruoho extern ACPI_RSDUMP_INFO *AcpiGbl_DumpResourceDispatch[];
528 1.4 christos extern ACPI_RSDUMP_INFO *AcpiGbl_DumpSerialBusDispatch[];
529 1.1 jruoho
530 1.1 jruoho /*
531 1.4 christos * rsdumpinfo
532 1.1 jruoho */
533 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpIrq[];
534 1.4 christos extern ACPI_RSDUMP_INFO AcpiRsDumpPrt[];
535 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpDma[];
536 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpStartDpf[];
537 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpEndDpf[];
538 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpIo[];
539 1.4 christos extern ACPI_RSDUMP_INFO AcpiRsDumpIoFlags[];
540 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpFixedIo[];
541 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpVendor[];
542 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpEndTag[];
543 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpMemory24[];
544 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpMemory32[];
545 1.4 christos extern ACPI_RSDUMP_INFO AcpiRsDumpMemoryFlags[];
546 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpFixedMemory32[];
547 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpAddress16[];
548 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpAddress32[];
549 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpAddress64[];
550 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpExtAddress64[];
551 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpExtIrq[];
552 1.1 jruoho extern ACPI_RSDUMP_INFO AcpiRsDumpGenericReg[];
553 1.4 christos extern ACPI_RSDUMP_INFO AcpiRsDumpGpio[];
554 1.10 christos extern ACPI_RSDUMP_INFO AcpiRsDumpPinFunction[];
555 1.4 christos extern ACPI_RSDUMP_INFO AcpiRsDumpFixedDma[];
556 1.4 christos extern ACPI_RSDUMP_INFO AcpiRsDumpCommonSerialBus[];
557 1.14 christos extern ACPI_RSDUMP_INFO AcpiRsDumpCsi2SerialBus[];
558 1.4 christos extern ACPI_RSDUMP_INFO AcpiRsDumpI2cSerialBus[];
559 1.4 christos extern ACPI_RSDUMP_INFO AcpiRsDumpSpiSerialBus[];
560 1.4 christos extern ACPI_RSDUMP_INFO AcpiRsDumpUartSerialBus[];
561 1.4 christos extern ACPI_RSDUMP_INFO AcpiRsDumpGeneralFlags[];
562 1.10 christos extern ACPI_RSDUMP_INFO AcpiRsDumpPinConfig[];
563 1.10 christos extern ACPI_RSDUMP_INFO AcpiRsDumpPinGroup[];
564 1.10 christos extern ACPI_RSDUMP_INFO AcpiRsDumpPinGroupFunction[];
565 1.10 christos extern ACPI_RSDUMP_INFO AcpiRsDumpPinGroupConfig[];
566 1.16 christos extern ACPI_RSDUMP_INFO AcpiRsDumpClockInput[];
567 1.1 jruoho #endif
568 1.1 jruoho
569 1.1 jruoho #endif /* __ACRESRC_H__ */
570