Rev 1498 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1498 | Rev 2216 | ||
---|---|---|---|
1 | /******************************************************************************* |
1 | /******************************************************************************* |
2 | * |
2 | * |
3 | * Module Name: dmresrcl.c - "Large" Resource Descriptor disassembly |
3 | * Module Name: dmresrcl.c - "Large" Resource Descriptor disassembly |
4 | * |
4 | * |
5 | ******************************************************************************/ |
5 | ******************************************************************************/ |
6 | 6 | ||
7 | /****************************************************************************** |
7 | /****************************************************************************** |
8 | * |
8 | * |
9 | * 1. Copyright Notice |
9 | * 1. Copyright Notice |
10 | * |
10 | * |
11 | * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp. |
11 | * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp. |
12 | * All rights reserved. |
12 | * All rights reserved. |
13 | * |
13 | * |
14 | * 2. License |
14 | * 2. License |
15 | * |
15 | * |
16 | * 2.1. This is your license from Intel Corp. under its intellectual property |
16 | * 2.1. This is your license from Intel Corp. under its intellectual property |
17 | * rights. You may have additional license terms from the party that provided |
17 | * rights. You may have additional license terms from the party that provided |
18 | * you this software, covering your right to use that party's intellectual |
18 | * you this software, covering your right to use that party's intellectual |
19 | * property rights. |
19 | * property rights. |
20 | * |
20 | * |
21 | * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a |
21 | * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a |
22 | * copy of the source code appearing in this file ("Covered Code") an |
22 | * copy of the source code appearing in this file ("Covered Code") an |
23 | * irrevocable, perpetual, worldwide license under Intel's copyrights in the |
23 | * irrevocable, perpetual, worldwide license under Intel's copyrights in the |
24 | * base code distributed originally by Intel ("Original Intel Code") to copy, |
24 | * base code distributed originally by Intel ("Original Intel Code") to copy, |
25 | * make derivatives, distribute, use and display any portion of the Covered |
25 | * make derivatives, distribute, use and display any portion of the Covered |
26 | * Code in any form, with the right to sublicense such rights; and |
26 | * Code in any form, with the right to sublicense such rights; and |
27 | * |
27 | * |
28 | * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent |
28 | * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent |
29 | * license (with the right to sublicense), under only those claims of Intel |
29 | * license (with the right to sublicense), under only those claims of Intel |
30 | * patents that are infringed by the Original Intel Code, to make, use, sell, |
30 | * patents that are infringed by the Original Intel Code, to make, use, sell, |
31 | * offer to sell, and import the Covered Code and derivative works thereof |
31 | * offer to sell, and import the Covered Code and derivative works thereof |
32 | * solely to the minimum extent necessary to exercise the above copyright |
32 | * solely to the minimum extent necessary to exercise the above copyright |
33 | * license, and in no event shall the patent license extend to any additions |
33 | * license, and in no event shall the patent license extend to any additions |
34 | * to or modifications of the Original Intel Code. No other license or right |
34 | * to or modifications of the Original Intel Code. No other license or right |
35 | * is granted directly or by implication, estoppel or otherwise; |
35 | * is granted directly or by implication, estoppel or otherwise; |
36 | * |
36 | * |
37 | * The above copyright and patent license is granted only if the following |
37 | * The above copyright and patent license is granted only if the following |
38 | * conditions are met: |
38 | * conditions are met: |
39 | * |
39 | * |
40 | * 3. Conditions |
40 | * 3. Conditions |
41 | * |
41 | * |
42 | * 3.1. Redistribution of Source with Rights to Further Distribute Source. |
42 | * 3.1. Redistribution of Source with Rights to Further Distribute Source. |
43 | * Redistribution of source code of any substantial portion of the Covered |
43 | * Redistribution of source code of any substantial portion of the Covered |
44 | * Code or modification with rights to further distribute source must include |
44 | * Code or modification with rights to further distribute source must include |
45 | * the above Copyright Notice, the above License, this list of Conditions, |
45 | * the above Copyright Notice, the above License, this list of Conditions, |
46 | * and the following Disclaimer and Export Compliance provision. In addition, |
46 | * and the following Disclaimer and Export Compliance provision. In addition, |
47 | * Licensee must cause all Covered Code to which Licensee contributes to |
47 | * Licensee must cause all Covered Code to which Licensee contributes to |
48 | * contain a file documenting the changes Licensee made to create that Covered |
48 | * contain a file documenting the changes Licensee made to create that Covered |
49 | * Code and the date of any change. Licensee must include in that file the |
49 | * Code and the date of any change. Licensee must include in that file the |
50 | * documentation of any changes made by any predecessor Licensee. Licensee |
50 | * documentation of any changes made by any predecessor Licensee. Licensee |
51 | * must include a prominent statement that the modification is derived, |
51 | * must include a prominent statement that the modification is derived, |
52 | * directly or indirectly, from Original Intel Code. |
52 | * directly or indirectly, from Original Intel Code. |
53 | * |
53 | * |
54 | * 3.2. Redistribution of Source with no Rights to Further Distribute Source. |
54 | * 3.2. Redistribution of Source with no Rights to Further Distribute Source. |
55 | * Redistribution of source code of any substantial portion of the Covered |
55 | * Redistribution of source code of any substantial portion of the Covered |
56 | * Code or modification without rights to further distribute source must |
56 | * Code or modification without rights to further distribute source must |
57 | * include the following Disclaimer and Export Compliance provision in the |
57 | * include the following Disclaimer and Export Compliance provision in the |
58 | * documentation and/or other materials provided with distribution. In |
58 | * documentation and/or other materials provided with distribution. In |
59 | * addition, Licensee may not authorize further sublicense of source of any |
59 | * addition, Licensee may not authorize further sublicense of source of any |
60 | * portion of the Covered Code, and must include terms to the effect that the |
60 | * portion of the Covered Code, and must include terms to the effect that the |
61 | * license from Licensee to its licensee is limited to the intellectual |
61 | * license from Licensee to its licensee is limited to the intellectual |
62 | * property embodied in the software Licensee provides to its licensee, and |
62 | * property embodied in the software Licensee provides to its licensee, and |
63 | * not to intellectual property embodied in modifications its licensee may |
63 | * not to intellectual property embodied in modifications its licensee may |
64 | * make. |
64 | * make. |
65 | * |
65 | * |
66 | * 3.3. Redistribution of Executable. Redistribution in executable form of any |
66 | * 3.3. Redistribution of Executable. Redistribution in executable form of any |
67 | * substantial portion of the Covered Code or modification must reproduce the |
67 | * substantial portion of the Covered Code or modification must reproduce the |
68 | * above Copyright Notice, and the following Disclaimer and Export Compliance |
68 | * above Copyright Notice, and the following Disclaimer and Export Compliance |
69 | * provision in the documentation and/or other materials provided with the |
69 | * provision in the documentation and/or other materials provided with the |
70 | * distribution. |
70 | * distribution. |
71 | * |
71 | * |
72 | * 3.4. Intel retains all right, title, and interest in and to the Original |
72 | * 3.4. Intel retains all right, title, and interest in and to the Original |
73 | * Intel Code. |
73 | * Intel Code. |
74 | * |
74 | * |
75 | * 3.5. Neither the name Intel nor any other trademark owned or controlled by |
75 | * 3.5. Neither the name Intel nor any other trademark owned or controlled by |
76 | * Intel shall be used in advertising or otherwise to promote the sale, use or |
76 | * Intel shall be used in advertising or otherwise to promote the sale, use or |
77 | * other dealings in products derived from or relating to the Covered Code |
77 | * other dealings in products derived from or relating to the Covered Code |
78 | * without prior written authorization from Intel. |
78 | * without prior written authorization from Intel. |
79 | * |
79 | * |
80 | * 4. Disclaimer and Export Compliance |
80 | * 4. Disclaimer and Export Compliance |
81 | * |
81 | * |
82 | * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED |
82 | * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED |
83 | * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE |
83 | * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE |
84 | * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, |
84 | * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, |
85 | * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY |
85 | * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY |
86 | * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY |
86 | * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY |
87 | * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A |
87 | * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A |
88 | * PARTICULAR PURPOSE. |
88 | * PARTICULAR PURPOSE. |
89 | * |
89 | * |
90 | * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES |
90 | * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES |
91 | * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR |
91 | * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR |
92 | * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, |
92 | * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, |
93 | * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY |
93 | * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY |
94 | * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL |
94 | * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL |
95 | * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS |
95 | * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS |
96 | * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY |
96 | * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY |
97 | * LIMITED REMEDY. |
97 | * LIMITED REMEDY. |
98 | * |
98 | * |
99 | * 4.3. Licensee shall not export, either directly or indirectly, any of this |
99 | * 4.3. Licensee shall not export, either directly or indirectly, any of this |
100 | * software or system incorporating such software without first obtaining any |
100 | * software or system incorporating such software without first obtaining any |
101 | * required license or other approval from the U. S. Department of Commerce or |
101 | * required license or other approval from the U. S. Department of Commerce or |
102 | * any other agency or department of the United States Government. In the |
102 | * any other agency or department of the United States Government. In the |
103 | * event Licensee exports any such software from the United States or |
103 | * event Licensee exports any such software from the United States or |
104 | * re-exports any such software from a foreign destination, Licensee shall |
104 | * re-exports any such software from a foreign destination, Licensee shall |
105 | * ensure that the distribution and export/re-export of the software is in |
105 | * ensure that the distribution and export/re-export of the software is in |
106 | * compliance with all laws, regulations, orders, or other restrictions of the |
106 | * compliance with all laws, regulations, orders, or other restrictions of the |
107 | * U.S. Export Administration Regulations. Licensee agrees that neither it nor |
107 | * U.S. Export Administration Regulations. Licensee agrees that neither it nor |
108 | * any of its subsidiaries will export/re-export any technical data, process, |
108 | * any of its subsidiaries will export/re-export any technical data, process, |
109 | * software, or service, directly or indirectly, to any country for which the |
109 | * software, or service, directly or indirectly, to any country for which the |
110 | * United States government or any agency thereof requires an export license, |
110 | * United States government or any agency thereof requires an export license, |
111 | * other governmental approval, or letter of assurance, without first obtaining |
111 | * other governmental approval, or letter of assurance, without first obtaining |
112 | * such license, approval or letter. |
112 | * such license, approval or letter. |
113 | * |
113 | * |
114 | *****************************************************************************/ |
114 | *****************************************************************************/ |
115 | 115 | ||
116 | 116 | ||
117 | #include "acpi.h" |
117 | #include "acpi.h" |
118 | #include "accommon.h" |
118 | #include "accommon.h" |
119 | #include "acdisasm.h" |
119 | #include "acdisasm.h" |
120 | 120 | ||
121 | 121 | ||
122 | #ifdef ACPI_DISASSEMBLER |
122 | #ifdef ACPI_DISASSEMBLER |
123 | 123 | ||
124 | #define _COMPONENT ACPI_CA_DEBUGGER |
124 | #define _COMPONENT ACPI_CA_DEBUGGER |
125 | ACPI_MODULE_NAME ("dbresrcl") |
125 | ACPI_MODULE_NAME ("dbresrcl") |
126 | 126 | ||
127 | 127 | ||
128 | /* Common names for address and memory descriptors */ |
128 | /* Common names for address and memory descriptors */ |
129 | 129 | ||
130 | static char *AcpiDmAddressNames[] = |
130 | static char *AcpiDmAddressNames[] = |
131 | { |
131 | { |
132 | "Granularity", |
132 | "Granularity", |
133 | "Range Minimum", |
133 | "Range Minimum", |
134 | "Range Maximum", |
134 | "Range Maximum", |
135 | "Translation Offset", |
135 | "Translation Offset", |
136 | "Length" |
136 | "Length" |
137 | }; |
137 | }; |
138 | 138 | ||
139 | static char *AcpiDmMemoryNames[] = |
139 | static char *AcpiDmMemoryNames[] = |
140 | { |
140 | { |
141 | "Range Minimum", |
141 | "Range Minimum", |
142 | "Range Maximum", |
142 | "Range Maximum", |
143 | "Alignment", |
143 | "Alignment", |
144 | "Length" |
144 | "Length" |
145 | }; |
145 | }; |
146 | 146 | ||
147 | 147 | ||
148 | /* Local prototypes */ |
148 | /* Local prototypes */ |
149 | 149 | ||
150 | static void |
150 | static void |
151 | AcpiDmSpaceFlags ( |
151 | AcpiDmSpaceFlags ( |
152 | UINT8 Flags); |
152 | UINT8 Flags); |
153 | 153 | ||
154 | static void |
154 | static void |
155 | AcpiDmIoFlags ( |
155 | AcpiDmIoFlags ( |
156 | UINT8 Flags); |
156 | UINT8 Flags); |
157 | 157 | ||
158 | static void |
158 | static void |
159 | AcpiDmIoFlags2 ( |
159 | AcpiDmIoFlags2 ( |
160 | UINT8 SpecificFlags); |
160 | UINT8 SpecificFlags); |
161 | 161 | ||
162 | static void |
162 | static void |
163 | AcpiDmMemoryFlags ( |
163 | AcpiDmMemoryFlags ( |
164 | UINT8 Flags, |
164 | UINT8 Flags, |
165 | UINT8 SpecificFlags); |
165 | UINT8 SpecificFlags); |
166 | 166 | ||
167 | static void |
167 | static void |
168 | AcpiDmMemoryFlags2 ( |
168 | AcpiDmMemoryFlags2 ( |
169 | UINT8 SpecificFlags); |
169 | UINT8 SpecificFlags); |
170 | 170 | ||
171 | static void |
171 | static void |
172 | AcpiDmResourceSource ( |
172 | AcpiDmResourceSource ( |
173 | AML_RESOURCE *Resource, |
173 | AML_RESOURCE *Resource, |
174 | ACPI_SIZE MinimumLength, |
174 | ACPI_SIZE MinimumLength, |
175 | UINT32 Length); |
175 | UINT32 Length); |
176 | 176 | ||
177 | static void |
177 | static void |
178 | AcpiDmAddressFields ( |
178 | AcpiDmAddressFields ( |
179 | void *Source, |
179 | void *Source, |
180 | UINT8 Type, |
180 | UINT8 Type, |
181 | UINT32 Level); |
181 | UINT32 Level); |
182 | 182 | ||
183 | static void |
183 | static void |
184 | AcpiDmAddressPrefix ( |
184 | AcpiDmAddressPrefix ( |
185 | UINT8 Type); |
185 | UINT8 Type); |
186 | 186 | ||
187 | static void |
187 | static void |
188 | AcpiDmAddressCommon ( |
188 | AcpiDmAddressCommon ( |
189 | AML_RESOURCE *Resource, |
189 | AML_RESOURCE *Resource, |
190 | UINT8 Type, |
190 | UINT8 Type, |
191 | UINT32 Level); |
191 | UINT32 Level); |
192 | 192 | ||
193 | static void |
193 | static void |
194 | AcpiDmAddressFlags ( |
194 | AcpiDmAddressFlags ( |
195 | AML_RESOURCE *Resource); |
195 | AML_RESOURCE *Resource); |
196 | 196 | ||
197 | 197 | ||
198 | /******************************************************************************* |
198 | /******************************************************************************* |
199 | * |
199 | * |
200 | * FUNCTION: AcpiDmMemoryFields |
200 | * FUNCTION: AcpiDmMemoryFields |
201 | * |
201 | * |
202 | * PARAMETERS: Source - Pointer to the contiguous data fields |
202 | * PARAMETERS: Source - Pointer to the contiguous data fields |
203 | * Type - 16 or 32 (bit) |
203 | * Type - 16 or 32 (bit) |
204 | * Level - Current source code indentation level |
204 | * Level - Current source code indentation level |
205 | * |
205 | * |
206 | * RETURN: None |
206 | * RETURN: None |
207 | * |
207 | * |
208 | * DESCRIPTION: Decode fields common to Memory24 and Memory32 descriptors |
208 | * DESCRIPTION: Decode fields common to Memory24 and Memory32 descriptors |
209 | * |
209 | * |
210 | ******************************************************************************/ |
210 | ******************************************************************************/ |
211 | 211 | ||
212 | static void |
212 | static void |
213 | AcpiDmMemoryFields ( |
213 | AcpiDmMemoryFields ( |
214 | void *Source, |
214 | void *Source, |
215 | UINT8 Type, |
215 | UINT8 Type, |
216 | UINT32 Level) |
216 | UINT32 Level) |
217 | { |
217 | { |
218 | UINT32 i; |
218 | UINT32 i; |
219 | 219 | ||
220 | 220 | ||
221 | for (i = 0; i < 4; i++) |
221 | for (i = 0; i < 4; i++) |
222 | { |
222 | { |
223 | AcpiDmIndent (Level + 1); |
223 | AcpiDmIndent (Level + 1); |
224 | 224 | ||
225 | switch (Type) |
225 | switch (Type) |
226 | { |
226 | { |
227 | case 16: |
227 | case 16: |
228 | AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i], |
228 | AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i], |
229 | AcpiDmMemoryNames[i]); |
229 | AcpiDmMemoryNames[i]); |
230 | break; |
230 | break; |
231 | 231 | ||
232 | case 32: |
232 | case 32: |
233 | AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i], |
233 | AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i], |
234 | AcpiDmMemoryNames[i]); |
234 | AcpiDmMemoryNames[i]); |
235 | break; |
235 | break; |
236 | 236 | ||
237 | default: |
237 | default: |
238 | return; |
238 | return; |
239 | } |
239 | } |
240 | } |
240 | } |
241 | } |
241 | } |
242 | 242 | ||
243 | 243 | ||
244 | /******************************************************************************* |
244 | /******************************************************************************* |
245 | * |
245 | * |
246 | * FUNCTION: AcpiDmAddressFields |
246 | * FUNCTION: AcpiDmAddressFields |
247 | * |
247 | * |
248 | * PARAMETERS: Source - Pointer to the contiguous data fields |
248 | * PARAMETERS: Source - Pointer to the contiguous data fields |
249 | * Type - 16, 32, or 64 (bit) |
249 | * Type - 16, 32, or 64 (bit) |
250 | * Level - Current source code indentation level |
250 | * Level - Current source code indentation level |
251 | * |
251 | * |
252 | * RETURN: None |
252 | * RETURN: None |
253 | * |
253 | * |
254 | * DESCRIPTION: Decode fields common to address descriptors |
254 | * DESCRIPTION: Decode fields common to address descriptors |
255 | * |
255 | * |
256 | ******************************************************************************/ |
256 | ******************************************************************************/ |
257 | 257 | ||
258 | static void |
258 | static void |
259 | AcpiDmAddressFields ( |
259 | AcpiDmAddressFields ( |
260 | void *Source, |
260 | void *Source, |
261 | UINT8 Type, |
261 | UINT8 Type, |
262 | UINT32 Level) |
262 | UINT32 Level) |
263 | { |
263 | { |
264 | UINT32 i; |
264 | UINT32 i; |
265 | 265 | ||
266 | 266 | ||
267 | AcpiOsPrintf ("\n"); |
267 | AcpiOsPrintf ("\n"); |
268 | 268 | ||
269 | for (i = 0; i < 5; i++) |
269 | for (i = 0; i < 5; i++) |
270 | { |
270 | { |
271 | AcpiDmIndent (Level + 1); |
271 | AcpiDmIndent (Level + 1); |
272 | 272 | ||
273 | switch (Type) |
273 | switch (Type) |
274 | { |
274 | { |
275 | case 16: |
275 | case 16: |
276 | AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i], |
276 | AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i], |
277 | AcpiDmAddressNames[i]); |
277 | AcpiDmAddressNames[i]); |
278 | break; |
278 | break; |
279 | 279 | ||
280 | case 32: |
280 | case 32: |
281 | AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i], |
281 | AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i], |
282 | AcpiDmAddressNames[i]); |
282 | AcpiDmAddressNames[i]); |
283 | break; |
283 | break; |
284 | 284 | ||
285 | case 64: |
285 | case 64: |
286 | AcpiDmDumpInteger64 (ACPI_CAST_PTR (UINT64, Source)[i], |
286 | AcpiDmDumpInteger64 (ACPI_CAST_PTR (UINT64, Source)[i], |
287 | AcpiDmAddressNames[i]); |
287 | AcpiDmAddressNames[i]); |
288 | break; |
288 | break; |
289 | 289 | ||
290 | default: |
290 | default: |
291 | return; |
291 | return; |
292 | } |
292 | } |
293 | } |
293 | } |
294 | } |
294 | } |
295 | 295 | ||
296 | 296 | ||
297 | /******************************************************************************* |
297 | /******************************************************************************* |
298 | * |
298 | * |
299 | * FUNCTION: AcpiDmAddressPrefix |
299 | * FUNCTION: AcpiDmAddressPrefix |
300 | * |
300 | * |
301 | * PARAMETERS: Type - Descriptor type |
301 | * PARAMETERS: Type - Descriptor type |
302 | * |
302 | * |
303 | * RETURN: None |
303 | * RETURN: None |
304 | * |
304 | * |
305 | * DESCRIPTION: Emit name prefix representing the address descriptor type |
305 | * DESCRIPTION: Emit name prefix representing the address descriptor type |
306 | * |
306 | * |
307 | ******************************************************************************/ |
307 | ******************************************************************************/ |
308 | 308 | ||
309 | static void |
309 | static void |
310 | AcpiDmAddressPrefix ( |
310 | AcpiDmAddressPrefix ( |
311 | UINT8 Type) |
311 | UINT8 Type) |
312 | { |
312 | { |
313 | 313 | ||
314 | switch (Type) |
314 | switch (Type) |
315 | { |
315 | { |
316 | case ACPI_RESOURCE_TYPE_ADDRESS16: |
316 | case ACPI_RESOURCE_TYPE_ADDRESS16: |
317 | AcpiOsPrintf ("Word"); |
317 | AcpiOsPrintf ("Word"); |
318 | break; |
318 | break; |
319 | 319 | ||
320 | case ACPI_RESOURCE_TYPE_ADDRESS32: |
320 | case ACPI_RESOURCE_TYPE_ADDRESS32: |
321 | AcpiOsPrintf ("DWord"); |
321 | AcpiOsPrintf ("DWord"); |
322 | break; |
322 | break; |
323 | 323 | ||
324 | case ACPI_RESOURCE_TYPE_ADDRESS64: |
324 | case ACPI_RESOURCE_TYPE_ADDRESS64: |
325 | AcpiOsPrintf ("QWord"); |
325 | AcpiOsPrintf ("QWord"); |
326 | break; |
326 | break; |
327 | 327 | ||
328 | case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64: |
328 | case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64: |
329 | AcpiOsPrintf ("Extended"); |
329 | AcpiOsPrintf ("Extended"); |
330 | break; |
330 | break; |
331 | 331 | ||
332 | default: |
332 | default: |
333 | return; |
333 | return; |
334 | } |
334 | } |
335 | } |
335 | } |
336 | 336 | ||
337 | 337 | ||
338 | /******************************************************************************* |
338 | /******************************************************************************* |
339 | * |
339 | * |
340 | * FUNCTION: AcpiDmAddressCommon |
340 | * FUNCTION: AcpiDmAddressCommon |
341 | * |
341 | * |
342 | * PARAMETERS: Resource - Raw AML descriptor |
342 | * PARAMETERS: Resource - Raw AML descriptor |
343 | * Type - Descriptor type |
343 | * Type - Descriptor type |
344 | * Level - Current source code indentation level |
344 | * Level - Current source code indentation level |
345 | * |
345 | * |
346 | * RETURN: None |
346 | * RETURN: None |
347 | * |
347 | * |
348 | * DESCRIPTION: Emit common name and flag fields common to address descriptors |
348 | * DESCRIPTION: Emit common name and flag fields common to address descriptors |
349 | * |
349 | * |
350 | ******************************************************************************/ |
350 | ******************************************************************************/ |
351 | 351 | ||
352 | static void |
352 | static void |
353 | AcpiDmAddressCommon ( |
353 | AcpiDmAddressCommon ( |
354 | AML_RESOURCE *Resource, |
354 | AML_RESOURCE *Resource, |
355 | UINT8 Type, |
355 | UINT8 Type, |
356 | UINT32 Level) |
356 | UINT32 Level) |
357 | { |
357 | { |
358 | UINT8 ResourceType; |
358 | UINT8 ResourceType; |
359 | UINT8 SpecificFlags; |
359 | UINT8 SpecificFlags; |
360 | UINT8 Flags; |
360 | UINT8 Flags; |
361 | 361 | ||
362 | 362 | ||
363 | ResourceType = Resource->Address.ResourceType; |
363 | ResourceType = Resource->Address.ResourceType; |
364 | SpecificFlags = Resource->Address.SpecificFlags; |
364 | SpecificFlags = Resource->Address.SpecificFlags; |
365 | Flags = Resource->Address.Flags; |
365 | Flags = Resource->Address.Flags; |
366 | 366 | ||
367 | AcpiDmIndent (Level); |
367 | AcpiDmIndent (Level); |
368 | 368 | ||
369 | /* Validate ResourceType */ |
369 | /* Validate ResourceType */ |
370 | 370 | ||
371 | if ((ResourceType > 2) && (ResourceType < 0xC0)) |
371 | if ((ResourceType > 2) && (ResourceType < 0xC0)) |
372 | { |
372 | { |
373 | AcpiOsPrintf ("/**** Invalid Resource Type: 0x%X ****/", ResourceType); |
373 | AcpiOsPrintf ("/**** Invalid Resource Type: 0x%X ****/", ResourceType); |
374 | return; |
374 | return; |
375 | } |
375 | } |
376 | 376 | ||
377 | /* Prefix is either Word, DWord, QWord, or Extended */ |
377 | /* Prefix is either Word, DWord, QWord, or Extended */ |
378 | 378 | ||
379 | AcpiDmAddressPrefix (Type); |
379 | AcpiDmAddressPrefix (Type); |
380 | 380 | ||
381 | /* Resource Types above 0xC0 are vendor-defined */ |
381 | /* Resource Types above 0xC0 are vendor-defined */ |
382 | 382 | ||
383 | if (ResourceType > 2) |
383 | if (ResourceType > 2) |
384 | { |
384 | { |
385 | AcpiOsPrintf ("Space (0x%2.2X, ", ResourceType); |
385 | AcpiOsPrintf ("Space (0x%2.2X, ", ResourceType); |
386 | AcpiDmSpaceFlags (Flags); |
386 | AcpiDmSpaceFlags (Flags); |
387 | AcpiOsPrintf (" 0x%2.2X,", SpecificFlags); |
387 | AcpiOsPrintf (" 0x%2.2X,", SpecificFlags); |
388 | return; |
388 | return; |
389 | } |
389 | } |
390 | 390 | ||
391 | /* This is either a Memory, IO, or BusNumber descriptor (0,1,2) */ |
391 | /* This is either a Memory, IO, or BusNumber descriptor (0,1,2) */ |
392 | 392 | ||
393 | AcpiOsPrintf ("%s (", AcpiGbl_WordDecode [ResourceType & 0x3]); |
393 | AcpiOsPrintf ("%s (", AcpiGbl_WordDecode [ResourceType & 0x3]); |
394 | 394 | ||
395 | /* Decode the general and type-specific flags */ |
395 | /* Decode the general and type-specific flags */ |
396 | 396 | ||
397 | if (ResourceType == ACPI_MEMORY_RANGE) |
397 | if (ResourceType == ACPI_MEMORY_RANGE) |
398 | { |
398 | { |
399 | AcpiDmMemoryFlags (Flags, SpecificFlags); |
399 | AcpiDmMemoryFlags (Flags, SpecificFlags); |
400 | } |
400 | } |
401 | else /* IO range or BusNumberRange */ |
401 | else /* IO range or BusNumberRange */ |
402 | { |
402 | { |
403 | AcpiDmIoFlags (Flags); |
403 | AcpiDmIoFlags (Flags); |
404 | if (ResourceType == ACPI_IO_RANGE) |
404 | if (ResourceType == ACPI_IO_RANGE) |
405 | { |
405 | { |
406 | AcpiOsPrintf (" %s,", AcpiGbl_RngDecode [SpecificFlags & 0x3]); |
406 | AcpiOsPrintf (" %s,", AcpiGbl_RngDecode [SpecificFlags & 0x3]); |
407 | } |
407 | } |
408 | } |
408 | } |
409 | } |
409 | } |
410 | 410 | ||
411 | 411 | ||
412 | /******************************************************************************* |
412 | /******************************************************************************* |
413 | * |
413 | * |
414 | * FUNCTION: AcpiDmAddressFlags |
414 | * FUNCTION: AcpiDmAddressFlags |
415 | * |
415 | * |
416 | * PARAMETERS: Resource - Raw AML descriptor |
416 | * PARAMETERS: Resource - Raw AML descriptor |
417 | * |
417 | * |
418 | * RETURN: None |
418 | * RETURN: None |
419 | * |
419 | * |
420 | * DESCRIPTION: Emit flags common to address descriptors |
420 | * DESCRIPTION: Emit flags common to address descriptors |
421 | * |
421 | * |
422 | ******************************************************************************/ |
422 | ******************************************************************************/ |
423 | 423 | ||
424 | static void |
424 | static void |
425 | AcpiDmAddressFlags ( |
425 | AcpiDmAddressFlags ( |
426 | AML_RESOURCE *Resource) |
426 | AML_RESOURCE *Resource) |
427 | { |
427 | { |
428 | 428 | ||
429 | if (Resource->Address.ResourceType == ACPI_IO_RANGE) |
429 | if (Resource->Address.ResourceType == ACPI_IO_RANGE) |
430 | { |
430 | { |
431 | AcpiDmIoFlags2 (Resource->Address.SpecificFlags); |
431 | AcpiDmIoFlags2 (Resource->Address.SpecificFlags); |
432 | } |
432 | } |
433 | else if (Resource->Address.ResourceType == ACPI_MEMORY_RANGE) |
433 | else if (Resource->Address.ResourceType == ACPI_MEMORY_RANGE) |
434 | { |
434 | { |
435 | AcpiDmMemoryFlags2 (Resource->Address.SpecificFlags); |
435 | AcpiDmMemoryFlags2 (Resource->Address.SpecificFlags); |
436 | } |
436 | } |
437 | } |
437 | } |
438 | 438 | ||
439 | 439 | ||
440 | /******************************************************************************* |
440 | /******************************************************************************* |
441 | * |
441 | * |
442 | * FUNCTION: AcpiDmSpaceFlags |
442 | * FUNCTION: AcpiDmSpaceFlags |
443 | * |
443 | * |
444 | * PARAMETERS: Flags - Flag byte to be decoded |
444 | * PARAMETERS: Flags - Flag byte to be decoded |
445 | * |
445 | * |
446 | * RETURN: None |
446 | * RETURN: None |
447 | * |
447 | * |
448 | * DESCRIPTION: Decode the flags specific to Space Address space descriptors |
448 | * DESCRIPTION: Decode the flags specific to Space Address space descriptors |
449 | * |
449 | * |
450 | ******************************************************************************/ |
450 | ******************************************************************************/ |
451 | 451 | ||
452 | static void |
452 | static void |
453 | AcpiDmSpaceFlags ( |
453 | AcpiDmSpaceFlags ( |
454 | UINT8 Flags) |
454 | UINT8 Flags) |
455 | { |
455 | { |
456 | 456 | ||
457 | AcpiOsPrintf ("%s, %s, %s, %s,", |
457 | AcpiOsPrintf ("%s, %s, %s, %s,", |
458 | AcpiGbl_ConsumeDecode [(Flags & 1)], |
458 | AcpiGbl_ConsumeDecode [(Flags & 1)], |
459 | AcpiGbl_DecDecode [(Flags & 0x2) >> 1], |
459 | AcpiGbl_DecDecode [(Flags & 0x2) >> 1], |
460 | AcpiGbl_MinDecode [(Flags & 0x4) >> 2], |
460 | AcpiGbl_MinDecode [(Flags & 0x4) >> 2], |
461 | AcpiGbl_MaxDecode [(Flags & 0x8) >> 3]); |
461 | AcpiGbl_MaxDecode [(Flags & 0x8) >> 3]); |
462 | } |
462 | } |
463 | 463 | ||
464 | 464 | ||
465 | /******************************************************************************* |
465 | /******************************************************************************* |
466 | * |
466 | * |
467 | * FUNCTION: AcpiDmIoFlags |
467 | * FUNCTION: AcpiDmIoFlags |
468 | * |
468 | * |
469 | * PARAMETERS: Flags - Flag byte to be decoded |
469 | * PARAMETERS: Flags - Flag byte to be decoded |
470 | * |
470 | * |
471 | * RETURN: None |
471 | * RETURN: None |
472 | * |
472 | * |
473 | * DESCRIPTION: Decode the flags specific to IO Address space descriptors |
473 | * DESCRIPTION: Decode the flags specific to IO Address space descriptors |
474 | * |
474 | * |
475 | ******************************************************************************/ |
475 | ******************************************************************************/ |
476 | 476 | ||
477 | static void |
477 | static void |
478 | AcpiDmIoFlags ( |
478 | AcpiDmIoFlags ( |
479 | UINT8 Flags) |
479 | UINT8 Flags) |
480 | { |
480 | { |
481 | AcpiOsPrintf ("%s, %s, %s, %s,", |
481 | AcpiOsPrintf ("%s, %s, %s, %s,", |
482 | AcpiGbl_ConsumeDecode [(Flags & 1)], |
482 | AcpiGbl_ConsumeDecode [(Flags & 1)], |
483 | AcpiGbl_MinDecode [(Flags & 0x4) >> 2], |
483 | AcpiGbl_MinDecode [(Flags & 0x4) >> 2], |
484 | AcpiGbl_MaxDecode [(Flags & 0x8) >> 3], |
484 | AcpiGbl_MaxDecode [(Flags & 0x8) >> 3], |
485 | AcpiGbl_DecDecode [(Flags & 0x2) >> 1]); |
485 | AcpiGbl_DecDecode [(Flags & 0x2) >> 1]); |
486 | } |
486 | } |
487 | 487 | ||
488 | 488 | ||
489 | /******************************************************************************* |
489 | /******************************************************************************* |
490 | * |
490 | * |
491 | * FUNCTION: AcpiDmIoFlags2 |
491 | * FUNCTION: AcpiDmIoFlags2 |
492 | * |
492 | * |
493 | * PARAMETERS: SpecificFlags - "Specific" flag byte to be decoded |
493 | * PARAMETERS: SpecificFlags - "Specific" flag byte to be decoded |
494 | * |
494 | * |
495 | * RETURN: None |
495 | * RETURN: None |
496 | * |
496 | * |
497 | * DESCRIPTION: Decode the flags specific to IO Address space descriptors |
497 | * DESCRIPTION: Decode the flags specific to IO Address space descriptors |
498 | * |
498 | * |
499 | ******************************************************************************/ |
499 | ******************************************************************************/ |
500 | 500 | ||
501 | static void |
501 | static void |
502 | AcpiDmIoFlags2 ( |
502 | AcpiDmIoFlags2 ( |
503 | UINT8 SpecificFlags) |
503 | UINT8 SpecificFlags) |
504 | { |
504 | { |
505 | 505 | ||
506 | AcpiOsPrintf (", %s", |
506 | AcpiOsPrintf (", %s", |
507 | AcpiGbl_TtpDecode [(SpecificFlags & 0x10) >> 4]); |
507 | AcpiGbl_TtpDecode [(SpecificFlags & 0x10) >> 4]); |
508 | 508 | ||
509 | /* TRS is only used if TTP is TypeTranslation */ |
509 | /* TRS is only used if TTP is TypeTranslation */ |
510 | 510 | ||
511 | if (SpecificFlags & 0x10) |
511 | if (SpecificFlags & 0x10) |
512 | { |
512 | { |
513 | AcpiOsPrintf (", %s", |
513 | AcpiOsPrintf (", %s", |
514 | AcpiGbl_TrsDecode [(SpecificFlags & 0x20) >> 5]); |
514 | AcpiGbl_TrsDecode [(SpecificFlags & 0x20) >> 5]); |
515 | } |
515 | } |
516 | } |
516 | } |
517 | 517 | ||
518 | 518 | ||
519 | /******************************************************************************* |
519 | /******************************************************************************* |
520 | * |
520 | * |
521 | * FUNCTION: AcpiDmMemoryFlags |
521 | * FUNCTION: AcpiDmMemoryFlags |
522 | * |
522 | * |
523 | * PARAMETERS: Flags - Flag byte to be decoded |
523 | * PARAMETERS: Flags - Flag byte to be decoded |
524 | * SpecificFlags - "Specific" flag byte to be decoded |
524 | * SpecificFlags - "Specific" flag byte to be decoded |
525 | * |
525 | * |
526 | * RETURN: None |
526 | * RETURN: None |
527 | * |
527 | * |
528 | * DESCRIPTION: Decode flags specific to Memory Address Space descriptors |
528 | * DESCRIPTION: Decode flags specific to Memory Address Space descriptors |
529 | * |
529 | * |
530 | ******************************************************************************/ |
530 | ******************************************************************************/ |
531 | 531 | ||
532 | static void |
532 | static void |
533 | AcpiDmMemoryFlags ( |
533 | AcpiDmMemoryFlags ( |
534 | UINT8 Flags, |
534 | UINT8 Flags, |
535 | UINT8 SpecificFlags) |
535 | UINT8 SpecificFlags) |
536 | { |
536 | { |
537 | 537 | ||
538 | AcpiOsPrintf ("%s, %s, %s, %s, %s, %s,", |
538 | AcpiOsPrintf ("%s, %s, %s, %s, %s, %s,", |
539 | AcpiGbl_ConsumeDecode [(Flags & 1)], |
539 | AcpiGbl_ConsumeDecode [(Flags & 1)], |
540 | AcpiGbl_DecDecode [(Flags & 0x2) >> 1], |
540 | AcpiGbl_DecDecode [(Flags & 0x2) >> 1], |
541 | AcpiGbl_MinDecode [(Flags & 0x4) >> 2], |
541 | AcpiGbl_MinDecode [(Flags & 0x4) >> 2], |
542 | AcpiGbl_MaxDecode [(Flags & 0x8) >> 3], |
542 | AcpiGbl_MaxDecode [(Flags & 0x8) >> 3], |
543 | AcpiGbl_MemDecode [(SpecificFlags & 0x6) >> 1], |
543 | AcpiGbl_MemDecode [(SpecificFlags & 0x6) >> 1], |
544 | AcpiGbl_RwDecode [(SpecificFlags & 0x1)]); |
544 | AcpiGbl_RwDecode [(SpecificFlags & 0x1)]); |
545 | } |
545 | } |
546 | 546 | ||
547 | 547 | ||
548 | /******************************************************************************* |
548 | /******************************************************************************* |
549 | * |
549 | * |
550 | * FUNCTION: AcpiDmMemoryFlags2 |
550 | * FUNCTION: AcpiDmMemoryFlags2 |
551 | * |
551 | * |
552 | * PARAMETERS: SpecificFlags - "Specific" flag byte to be decoded |
552 | * PARAMETERS: SpecificFlags - "Specific" flag byte to be decoded |
553 | * |
553 | * |
554 | * RETURN: None |
554 | * RETURN: None |
555 | * |
555 | * |
556 | * DESCRIPTION: Decode flags specific to Memory Address Space descriptors |
556 | * DESCRIPTION: Decode flags specific to Memory Address Space descriptors |
557 | * |
557 | * |
558 | ******************************************************************************/ |
558 | ******************************************************************************/ |
559 | 559 | ||
560 | static void |
560 | static void |
561 | AcpiDmMemoryFlags2 ( |
561 | AcpiDmMemoryFlags2 ( |
562 | UINT8 SpecificFlags) |
562 | UINT8 SpecificFlags) |
563 | { |
563 | { |
564 | 564 | ||
565 | AcpiOsPrintf (", %s, %s", |
565 | AcpiOsPrintf (", %s, %s", |
566 | AcpiGbl_MtpDecode [(SpecificFlags & 0x18) >> 3], |
566 | AcpiGbl_MtpDecode [(SpecificFlags & 0x18) >> 3], |
567 | AcpiGbl_TtpDecode [(SpecificFlags & 0x20) >> 5]); |
567 | AcpiGbl_TtpDecode [(SpecificFlags & 0x20) >> 5]); |
568 | } |
568 | } |
569 | 569 | ||
570 | 570 | ||
571 | /******************************************************************************* |
571 | /******************************************************************************* |
572 | * |
572 | * |
573 | * FUNCTION: AcpiDmResourceSource |
573 | * FUNCTION: AcpiDmResourceSource |
574 | * |
574 | * |
575 | * PARAMETERS: Resource - Raw AML descriptor |
575 | * PARAMETERS: Resource - Raw AML descriptor |
576 | * MinimumLength - descriptor length without optional fields |
576 | * MinimumLength - descriptor length without optional fields |
577 | * ResourceLength |
577 | * ResourceLength |
578 | * |
578 | * |
579 | * RETURN: None |
579 | * RETURN: None |
580 | * |
580 | * |
581 | * DESCRIPTION: Dump optional ResourceSource fields of an address descriptor |
581 | * DESCRIPTION: Dump optional ResourceSource fields of an address descriptor |
582 | * |
582 | * |
583 | ******************************************************************************/ |
583 | ******************************************************************************/ |
584 | 584 | ||
585 | static void |
585 | static void |
586 | AcpiDmResourceSource ( |
586 | AcpiDmResourceSource ( |
587 | AML_RESOURCE *Resource, |
587 | AML_RESOURCE *Resource, |
588 | ACPI_SIZE MinimumTotalLength, |
588 | ACPI_SIZE MinimumTotalLength, |
589 | UINT32 ResourceLength) |
589 | UINT32 ResourceLength) |
590 | { |
590 | { |
591 | UINT8 *AmlResourceSource; |
591 | UINT8 *AmlResourceSource; |
592 | UINT32 TotalLength; |
592 | UINT32 TotalLength; |
593 | 593 | ||
594 | 594 | ||
595 | TotalLength = ResourceLength + sizeof (AML_RESOURCE_LARGE_HEADER); |
595 | TotalLength = ResourceLength + sizeof (AML_RESOURCE_LARGE_HEADER); |
596 | 596 | ||
597 | /* Check if the optional ResourceSource fields are present */ |
597 | /* Check if the optional ResourceSource fields are present */ |
598 | 598 | ||
599 | if (TotalLength <= MinimumTotalLength) |
599 | if (TotalLength <= MinimumTotalLength) |
600 | { |
600 | { |
601 | /* The two optional fields are not used */ |
601 | /* The two optional fields are not used */ |
602 | 602 | ||
603 | AcpiOsPrintf (",, "); |
603 | AcpiOsPrintf (",, "); |
604 | return; |
604 | return; |
605 | } |
605 | } |
606 | 606 | ||
607 | /* Get a pointer to the ResourceSource */ |
607 | /* Get a pointer to the ResourceSource */ |
608 | 608 | ||
609 | AmlResourceSource = ACPI_ADD_PTR (UINT8, Resource, MinimumTotalLength); |
609 | AmlResourceSource = ACPI_ADD_PTR (UINT8, Resource, MinimumTotalLength); |
610 | 610 | ||
611 | /* |
611 | /* |
612 | * Always emit the ResourceSourceIndex (Byte) |
612 | * Always emit the ResourceSourceIndex (Byte) |
613 | * |
613 | * |
614 | * NOTE: Some ASL compilers always create a 0 byte (in the AML) for the |
614 | * NOTE: Some ASL compilers always create a 0 byte (in the AML) for the |
615 | * Index even if the String does not exist. Although this is in violation |
615 | * Index even if the String does not exist. Although this is in violation |
616 | * of the ACPI specification, it is very important to emit ASL code that |
616 | * of the ACPI specification, it is very important to emit ASL code that |
617 | * can be compiled back to the identical AML. There may be fields and/or |
617 | * can be compiled back to the identical AML. There may be fields and/or |
618 | * indexes into the resource template buffer that are compiled to absolute |
618 | * indexes into the resource template buffer that are compiled to absolute |
619 | * offsets, and these will be broken if the AML length is changed. |
619 | * offsets, and these will be broken if the AML length is changed. |
620 | */ |
620 | */ |
621 | AcpiOsPrintf ("0x%2.2X,", (UINT32) AmlResourceSource[0]); |
621 | AcpiOsPrintf ("0x%2.2X,", (UINT32) AmlResourceSource[0]); |
622 | 622 | ||
623 | /* Make sure that the ResourceSource string exists before dumping it */ |
623 | /* Make sure that the ResourceSource string exists before dumping it */ |
624 | 624 | ||
625 | if (TotalLength > (MinimumTotalLength + 1)) |
625 | if (TotalLength > (MinimumTotalLength + 1)) |
626 | { |
626 | { |
627 | AcpiOsPrintf (" "); |
627 | AcpiOsPrintf (" "); |
628 | AcpiUtPrintString ((char *) &AmlResourceSource[1], ACPI_UINT8_MAX); |
628 | AcpiUtPrintString ((char *) &AmlResourceSource[1], ACPI_UINT8_MAX); |
629 | } |
629 | } |
630 | 630 | ||
631 | AcpiOsPrintf (", "); |
631 | AcpiOsPrintf (", "); |
632 | } |
632 | } |
633 | 633 | ||
634 | 634 | ||
635 | /******************************************************************************* |
635 | /******************************************************************************* |
636 | * |
636 | * |
637 | * FUNCTION: AcpiDmWordDescriptor |
637 | * FUNCTION: AcpiDmWordDescriptor |
638 | * |
638 | * |
639 | * PARAMETERS: Resource - Pointer to the resource descriptor |
639 | * PARAMETERS: Resource - Pointer to the resource descriptor |
640 | * Length - Length of the descriptor in bytes |
640 | * Length - Length of the descriptor in bytes |
641 | * Level - Current source code indentation level |
641 | * Level - Current source code indentation level |
642 | * |
642 | * |
643 | * RETURN: None |
643 | * RETURN: None |
644 | * |
644 | * |
645 | * DESCRIPTION: Decode a Word Address Space descriptor |
645 | * DESCRIPTION: Decode a Word Address Space descriptor |
646 | * |
646 | * |
647 | ******************************************************************************/ |
647 | ******************************************************************************/ |
648 | 648 | ||
649 | void |
649 | void |
650 | AcpiDmWordDescriptor ( |
650 | AcpiDmWordDescriptor ( |
651 | AML_RESOURCE *Resource, |
651 | AML_RESOURCE *Resource, |
652 | UINT32 Length, |
652 | UINT32 Length, |
653 | UINT32 Level) |
653 | UINT32 Level) |
654 | { |
654 | { |
655 | 655 | ||
656 | /* Dump resource name and flags */ |
656 | /* Dump resource name and flags */ |
657 | 657 | ||
658 | AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS16, Level); |
658 | AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS16, Level); |
659 | 659 | ||
660 | /* Dump the 5 contiguous WORD values */ |
660 | /* Dump the 5 contiguous WORD values */ |
661 | 661 | ||
662 | AcpiDmAddressFields (&Resource->Address16.Granularity, 16, Level); |
662 | AcpiDmAddressFields (&Resource->Address16.Granularity, 16, Level); |
663 | 663 | ||
664 | /* The ResourceSource fields are optional */ |
664 | /* The ResourceSource fields are optional */ |
665 | 665 | ||
666 | AcpiDmIndent (Level + 1); |
666 | AcpiDmIndent (Level + 1); |
667 | AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS16), Length); |
667 | AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS16), Length); |
668 | 668 | ||
669 | /* Insert a descriptor name */ |
669 | /* Insert a descriptor name */ |
670 | 670 | ||
671 | AcpiDmDescriptorName (); |
671 | AcpiDmDescriptorName (); |
672 | 672 | ||
673 | /* Type-specific flags */ |
673 | /* Type-specific flags */ |
674 | 674 | ||
675 | AcpiDmAddressFlags (Resource); |
675 | AcpiDmAddressFlags (Resource); |
676 | AcpiOsPrintf (")\n"); |
676 | AcpiOsPrintf (")\n"); |
677 | } |
677 | } |
678 | 678 | ||
679 | 679 | ||
680 | /******************************************************************************* |
680 | /******************************************************************************* |
681 | * |
681 | * |
682 | * FUNCTION: AcpiDmDwordDescriptor |
682 | * FUNCTION: AcpiDmDwordDescriptor |
683 | * |
683 | * |
684 | * PARAMETERS: Resource - Pointer to the resource descriptor |
684 | * PARAMETERS: Resource - Pointer to the resource descriptor |
685 | * Length - Length of the descriptor in bytes |
685 | * Length - Length of the descriptor in bytes |
686 | * Level - Current source code indentation level |
686 | * Level - Current source code indentation level |
687 | * |
687 | * |
688 | * RETURN: None |
688 | * RETURN: None |
689 | * |
689 | * |
690 | * DESCRIPTION: Decode a DWord Address Space descriptor |
690 | * DESCRIPTION: Decode a DWord Address Space descriptor |
691 | * |
691 | * |
692 | ******************************************************************************/ |
692 | ******************************************************************************/ |
693 | 693 | ||
694 | void |
694 | void |
695 | AcpiDmDwordDescriptor ( |
695 | AcpiDmDwordDescriptor ( |
696 | AML_RESOURCE *Resource, |
696 | AML_RESOURCE *Resource, |
697 | UINT32 Length, |
697 | UINT32 Length, |
698 | UINT32 Level) |
698 | UINT32 Level) |
699 | { |
699 | { |
700 | 700 | ||
701 | /* Dump resource name and flags */ |
701 | /* Dump resource name and flags */ |
702 | 702 | ||
703 | AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS32, Level); |
703 | AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS32, Level); |
704 | 704 | ||
705 | /* Dump the 5 contiguous DWORD values */ |
705 | /* Dump the 5 contiguous DWORD values */ |
706 | 706 | ||
707 | AcpiDmAddressFields (&Resource->Address32.Granularity, 32, Level); |
707 | AcpiDmAddressFields (&Resource->Address32.Granularity, 32, Level); |
708 | 708 | ||
709 | /* The ResourceSource fields are optional */ |
709 | /* The ResourceSource fields are optional */ |
710 | 710 | ||
711 | AcpiDmIndent (Level + 1); |
711 | AcpiDmIndent (Level + 1); |
712 | AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS32), Length); |
712 | AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS32), Length); |
713 | 713 | ||
714 | /* Insert a descriptor name */ |
714 | /* Insert a descriptor name */ |
715 | 715 | ||
716 | AcpiDmDescriptorName (); |
716 | AcpiDmDescriptorName (); |
717 | 717 | ||
718 | /* Type-specific flags */ |
718 | /* Type-specific flags */ |
719 | 719 | ||
720 | AcpiDmAddressFlags (Resource); |
720 | AcpiDmAddressFlags (Resource); |
721 | AcpiOsPrintf (")\n"); |
721 | AcpiOsPrintf (")\n"); |
722 | } |
722 | } |
723 | 723 | ||
724 | 724 | ||
725 | /******************************************************************************* |
725 | /******************************************************************************* |
726 | * |
726 | * |
727 | * FUNCTION: AcpiDmQwordDescriptor |
727 | * FUNCTION: AcpiDmQwordDescriptor |
728 | * |
728 | * |
729 | * PARAMETERS: Resource - Pointer to the resource descriptor |
729 | * PARAMETERS: Resource - Pointer to the resource descriptor |
730 | * Length - Length of the descriptor in bytes |
730 | * Length - Length of the descriptor in bytes |
731 | * Level - Current source code indentation level |
731 | * Level - Current source code indentation level |
732 | * |
732 | * |
733 | * RETURN: None |
733 | * RETURN: None |
734 | * |
734 | * |
735 | * DESCRIPTION: Decode a QWord Address Space descriptor |
735 | * DESCRIPTION: Decode a QWord Address Space descriptor |
736 | * |
736 | * |
737 | ******************************************************************************/ |
737 | ******************************************************************************/ |
738 | 738 | ||
739 | void |
739 | void |
740 | AcpiDmQwordDescriptor ( |
740 | AcpiDmQwordDescriptor ( |
741 | AML_RESOURCE *Resource, |
741 | AML_RESOURCE *Resource, |
742 | UINT32 Length, |
742 | UINT32 Length, |
743 | UINT32 Level) |
743 | UINT32 Level) |
744 | { |
744 | { |
745 | 745 | ||
746 | /* Dump resource name and flags */ |
746 | /* Dump resource name and flags */ |
747 | 747 | ||
748 | AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS64, Level); |
748 | AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS64, Level); |
749 | 749 | ||
750 | /* Dump the 5 contiguous QWORD values */ |
750 | /* Dump the 5 contiguous QWORD values */ |
751 | 751 | ||
752 | AcpiDmAddressFields (&Resource->Address64.Granularity, 64, Level); |
752 | AcpiDmAddressFields (&Resource->Address64.Granularity, 64, Level); |
753 | 753 | ||
754 | /* The ResourceSource fields are optional */ |
754 | /* The ResourceSource fields are optional */ |
755 | 755 | ||
756 | AcpiDmIndent (Level + 1); |
756 | AcpiDmIndent (Level + 1); |
757 | AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS64), Length); |
757 | AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS64), Length); |
758 | 758 | ||
759 | /* Insert a descriptor name */ |
759 | /* Insert a descriptor name */ |
760 | 760 | ||
761 | AcpiDmDescriptorName (); |
761 | AcpiDmDescriptorName (); |
762 | 762 | ||
763 | /* Type-specific flags */ |
763 | /* Type-specific flags */ |
764 | 764 | ||
765 | AcpiDmAddressFlags (Resource); |
765 | AcpiDmAddressFlags (Resource); |
766 | AcpiOsPrintf (")\n"); |
766 | AcpiOsPrintf (")\n"); |
767 | } |
767 | } |
768 | 768 | ||
769 | 769 | ||
770 | /******************************************************************************* |
770 | /******************************************************************************* |
771 | * |
771 | * |
772 | * FUNCTION: AcpiDmExtendedDescriptor |
772 | * FUNCTION: AcpiDmExtendedDescriptor |
773 | * |
773 | * |
774 | * PARAMETERS: Resource - Pointer to the resource descriptor |
774 | * PARAMETERS: Resource - Pointer to the resource descriptor |
775 | * Length - Length of the descriptor in bytes |
775 | * Length - Length of the descriptor in bytes |
776 | * Level - Current source code indentation level |
776 | * Level - Current source code indentation level |
777 | * |
777 | * |
778 | * RETURN: None |
778 | * RETURN: None |
779 | * |
779 | * |
780 | * DESCRIPTION: Decode a Extended Address Space descriptor |
780 | * DESCRIPTION: Decode a Extended Address Space descriptor |
781 | * |
781 | * |
782 | ******************************************************************************/ |
782 | ******************************************************************************/ |
783 | 783 | ||
784 | void |
784 | void |
785 | AcpiDmExtendedDescriptor ( |
785 | AcpiDmExtendedDescriptor ( |
786 | AML_RESOURCE *Resource, |
786 | AML_RESOURCE *Resource, |
787 | UINT32 Length, |
787 | UINT32 Length, |
788 | UINT32 Level) |
788 | UINT32 Level) |
789 | { |
789 | { |
790 | 790 | ||
791 | /* Dump resource name and flags */ |
791 | /* Dump resource name and flags */ |
792 | 792 | ||
793 | AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64, Level); |
793 | AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64, Level); |
794 | 794 | ||
795 | /* Dump the 5 contiguous QWORD values */ |
795 | /* Dump the 5 contiguous QWORD values */ |
796 | 796 | ||
797 | AcpiDmAddressFields (&Resource->ExtAddress64.Granularity, 64, Level); |
797 | AcpiDmAddressFields (&Resource->ExtAddress64.Granularity, 64, Level); |
798 | 798 | ||
799 | /* Extra field for this descriptor only */ |
799 | /* Extra field for this descriptor only */ |
800 | 800 | ||
801 | AcpiDmIndent (Level + 1); |
801 | AcpiDmIndent (Level + 1); |
802 | AcpiDmDumpInteger64 (Resource->ExtAddress64.TypeSpecific, |
802 | AcpiDmDumpInteger64 (Resource->ExtAddress64.TypeSpecific, |
803 | "Type-Specific Attributes"); |
803 | "Type-Specific Attributes"); |
804 | 804 | ||
805 | /* Insert a descriptor name */ |
805 | /* Insert a descriptor name */ |
806 | 806 | ||
807 | AcpiDmIndent (Level + 1); |
807 | AcpiDmIndent (Level + 1); |
808 | AcpiDmDescriptorName (); |
808 | AcpiDmDescriptorName (); |
809 | 809 | ||
810 | /* Type-specific flags */ |
810 | /* Type-specific flags */ |
811 | 811 | ||
812 | AcpiDmAddressFlags (Resource); |
812 | AcpiDmAddressFlags (Resource); |
813 | AcpiOsPrintf (")\n"); |
813 | AcpiOsPrintf (")\n"); |
814 | } |
814 | } |
815 | 815 | ||
816 | 816 | ||
817 | /******************************************************************************* |
817 | /******************************************************************************* |
818 | * |
818 | * |
819 | * FUNCTION: AcpiDmMemory24Descriptor |
819 | * FUNCTION: AcpiDmMemory24Descriptor |
820 | * |
820 | * |
821 | * PARAMETERS: Resource - Pointer to the resource descriptor |
821 | * PARAMETERS: Resource - Pointer to the resource descriptor |
822 | * Length - Length of the descriptor in bytes |
822 | * Length - Length of the descriptor in bytes |
823 | * Level - Current source code indentation level |
823 | * Level - Current source code indentation level |
824 | * |
824 | * |
825 | * RETURN: None |
825 | * RETURN: None |
826 | * |
826 | * |
827 | * DESCRIPTION: Decode a Memory24 descriptor |
827 | * DESCRIPTION: Decode a Memory24 descriptor |
828 | * |
828 | * |
829 | ******************************************************************************/ |
829 | ******************************************************************************/ |
830 | 830 | ||
831 | void |
831 | void |
832 | AcpiDmMemory24Descriptor ( |
832 | AcpiDmMemory24Descriptor ( |
833 | AML_RESOURCE *Resource, |
833 | AML_RESOURCE *Resource, |
834 | UINT32 Length, |
834 | UINT32 Length, |
835 | UINT32 Level) |
835 | UINT32 Level) |
836 | { |
836 | { |
837 | 837 | ||
838 | /* Dump name and read/write flag */ |
838 | /* Dump name and read/write flag */ |
839 | 839 | ||
840 | AcpiDmIndent (Level); |
840 | AcpiDmIndent (Level); |
841 | AcpiOsPrintf ("Memory24 (%s,\n", |
841 | AcpiOsPrintf ("Memory24 (%s,\n", |
842 | AcpiGbl_RwDecode [Resource->Memory24.Flags & 1]); |
842 | AcpiGbl_RwDecode [Resource->Memory24.Flags & 1]); |
843 | 843 | ||
844 | /* Dump the 4 contiguous WORD values */ |
844 | /* Dump the 4 contiguous WORD values */ |
845 | 845 | ||
846 | AcpiDmMemoryFields (&Resource->Memory24.Minimum, 16, Level); |
846 | AcpiDmMemoryFields (&Resource->Memory24.Minimum, 16, Level); |
847 | 847 | ||
848 | /* Insert a descriptor name */ |
848 | /* Insert a descriptor name */ |
849 | 849 | ||
850 | AcpiDmIndent (Level + 1); |
850 | AcpiDmIndent (Level + 1); |
851 | AcpiDmDescriptorName (); |
851 | AcpiDmDescriptorName (); |
852 | AcpiOsPrintf (")\n"); |
852 | AcpiOsPrintf (")\n"); |
853 | } |
853 | } |
854 | 854 | ||
855 | 855 | ||
856 | /******************************************************************************* |
856 | /******************************************************************************* |
857 | * |
857 | * |
858 | * FUNCTION: AcpiDmMemory32Descriptor |
858 | * FUNCTION: AcpiDmMemory32Descriptor |
859 | * |
859 | * |
860 | * PARAMETERS: Resource - Pointer to the resource descriptor |
860 | * PARAMETERS: Resource - Pointer to the resource descriptor |
861 | * Length - Length of the descriptor in bytes |
861 | * Length - Length of the descriptor in bytes |
862 | * Level - Current source code indentation level |
862 | * Level - Current source code indentation level |
863 | * |
863 | * |
864 | * RETURN: None |
864 | * RETURN: None |
865 | * |
865 | * |
866 | * DESCRIPTION: Decode a Memory32 descriptor |
866 | * DESCRIPTION: Decode a Memory32 descriptor |
867 | * |
867 | * |
868 | ******************************************************************************/ |
868 | ******************************************************************************/ |
869 | 869 | ||
870 | void |
870 | void |
871 | AcpiDmMemory32Descriptor ( |
871 | AcpiDmMemory32Descriptor ( |
872 | AML_RESOURCE *Resource, |
872 | AML_RESOURCE *Resource, |
873 | UINT32 Length, |
873 | UINT32 Length, |
874 | UINT32 Level) |
874 | UINT32 Level) |
875 | { |
875 | { |
876 | 876 | ||
877 | /* Dump name and read/write flag */ |
877 | /* Dump name and read/write flag */ |
878 | 878 | ||
879 | AcpiDmIndent (Level); |
879 | AcpiDmIndent (Level); |
880 | AcpiOsPrintf ("Memory32 (%s,\n", |
880 | AcpiOsPrintf ("Memory32 (%s,\n", |
881 | AcpiGbl_RwDecode [Resource->Memory32.Flags & 1]); |
881 | AcpiGbl_RwDecode [Resource->Memory32.Flags & 1]); |
882 | 882 | ||
883 | /* Dump the 4 contiguous DWORD values */ |
883 | /* Dump the 4 contiguous DWORD values */ |
884 | 884 | ||
885 | AcpiDmMemoryFields (&Resource->Memory32.Minimum, 32, Level); |
885 | AcpiDmMemoryFields (&Resource->Memory32.Minimum, 32, Level); |
886 | 886 | ||
887 | /* Insert a descriptor name */ |
887 | /* Insert a descriptor name */ |
888 | 888 | ||
889 | AcpiDmIndent (Level + 1); |
889 | AcpiDmIndent (Level + 1); |
890 | AcpiDmDescriptorName (); |
890 | AcpiDmDescriptorName (); |
891 | AcpiOsPrintf (")\n"); |
891 | AcpiOsPrintf (")\n"); |
892 | } |
892 | } |
893 | 893 | ||
894 | 894 | ||
895 | /******************************************************************************* |
895 | /******************************************************************************* |
896 | * |
896 | * |
897 | * FUNCTION: AcpiDmFixedMemory32Descriptor |
897 | * FUNCTION: AcpiDmFixedMemory32Descriptor |
898 | * |
898 | * |
899 | * PARAMETERS: Resource - Pointer to the resource descriptor |
899 | * PARAMETERS: Resource - Pointer to the resource descriptor |
900 | * Length - Length of the descriptor in bytes |
900 | * Length - Length of the descriptor in bytes |
901 | * Level - Current source code indentation level |
901 | * Level - Current source code indentation level |
902 | * |
902 | * |
903 | * RETURN: None |
903 | * RETURN: None |
904 | * |
904 | * |
905 | * DESCRIPTION: Decode a Fixed Memory32 descriptor |
905 | * DESCRIPTION: Decode a Fixed Memory32 descriptor |
906 | * |
906 | * |
907 | ******************************************************************************/ |
907 | ******************************************************************************/ |
908 | 908 | ||
909 | void |
909 | void |
910 | AcpiDmFixedMemory32Descriptor ( |
910 | AcpiDmFixedMemory32Descriptor ( |
911 | AML_RESOURCE *Resource, |
911 | AML_RESOURCE *Resource, |
912 | UINT32 Length, |
912 | UINT32 Length, |
913 | UINT32 Level) |
913 | UINT32 Level) |
914 | { |
914 | { |
915 | 915 | ||
916 | /* Dump name and read/write flag */ |
916 | /* Dump name and read/write flag */ |
917 | 917 | ||
918 | AcpiDmIndent (Level); |
918 | AcpiDmIndent (Level); |
919 | AcpiOsPrintf ("Memory32Fixed (%s,\n", |
919 | AcpiOsPrintf ("Memory32Fixed (%s,\n", |
920 | AcpiGbl_RwDecode [Resource->FixedMemory32.Flags & 1]); |
920 | AcpiGbl_RwDecode [Resource->FixedMemory32.Flags & 1]); |
921 | 921 | ||
922 | AcpiDmIndent (Level + 1); |
922 | AcpiDmIndent (Level + 1); |
923 | AcpiDmDumpInteger32 (Resource->FixedMemory32.Address, "Address Base"); |
923 | AcpiDmDumpInteger32 (Resource->FixedMemory32.Address, "Address Base"); |
924 | 924 | ||
925 | AcpiDmIndent (Level + 1); |
925 | AcpiDmIndent (Level + 1); |
926 | AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength, "Address Length"); |
926 | AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength, "Address Length"); |
927 | 927 | ||
928 | /* Insert a descriptor name */ |
928 | /* Insert a descriptor name */ |
929 | 929 | ||
930 | AcpiDmIndent (Level + 1); |
930 | AcpiDmIndent (Level + 1); |
931 | AcpiDmDescriptorName (); |
931 | AcpiDmDescriptorName (); |
932 | AcpiOsPrintf (")\n"); |
932 | AcpiOsPrintf (")\n"); |
933 | } |
933 | } |
934 | 934 | ||
935 | 935 | ||
936 | /******************************************************************************* |
936 | /******************************************************************************* |
937 | * |
937 | * |
938 | * FUNCTION: AcpiDmGenericRegisterDescriptor |
938 | * FUNCTION: AcpiDmGenericRegisterDescriptor |
939 | * |
939 | * |
940 | * PARAMETERS: Resource - Pointer to the resource descriptor |
940 | * PARAMETERS: Resource - Pointer to the resource descriptor |
941 | * Length - Length of the descriptor in bytes |
941 | * Length - Length of the descriptor in bytes |
942 | * Level - Current source code indentation level |
942 | * Level - Current source code indentation level |
943 | * |
943 | * |
944 | * RETURN: None |
944 | * RETURN: None |
945 | * |
945 | * |
946 | * DESCRIPTION: Decode a Generic Register descriptor |
946 | * DESCRIPTION: Decode a Generic Register descriptor |
947 | * |
947 | * |
948 | ******************************************************************************/ |
948 | ******************************************************************************/ |
949 | 949 | ||
950 | void |
950 | void |
951 | AcpiDmGenericRegisterDescriptor ( |
951 | AcpiDmGenericRegisterDescriptor ( |
952 | AML_RESOURCE *Resource, |
952 | AML_RESOURCE *Resource, |
953 | UINT32 Length, |
953 | UINT32 Length, |
954 | UINT32 Level) |
954 | UINT32 Level) |
955 | { |
955 | { |
956 | 956 | ||
957 | AcpiDmIndent (Level); |
957 | AcpiDmIndent (Level); |
958 | AcpiOsPrintf ("Register ("); |
958 | AcpiOsPrintf ("Register ("); |
959 | AcpiDmAddressSpace (Resource->GenericReg.AddressSpaceId); |
959 | AcpiDmAddressSpace (Resource->GenericReg.AddressSpaceId); |
960 | AcpiOsPrintf ("\n"); |
960 | AcpiOsPrintf ("\n"); |
961 | 961 | ||
962 | AcpiDmIndent (Level + 1); |
962 | AcpiDmIndent (Level + 1); |
963 | AcpiDmDumpInteger8 (Resource->GenericReg.BitWidth, "Bit Width"); |
963 | AcpiDmDumpInteger8 (Resource->GenericReg.BitWidth, "Bit Width"); |
964 | 964 | ||
965 | AcpiDmIndent (Level + 1); |
965 | AcpiDmIndent (Level + 1); |
966 | AcpiDmDumpInteger8 (Resource->GenericReg.BitOffset, "Bit Offset"); |
966 | AcpiDmDumpInteger8 (Resource->GenericReg.BitOffset, "Bit Offset"); |
967 | 967 | ||
968 | AcpiDmIndent (Level + 1); |
968 | AcpiDmIndent (Level + 1); |
969 | AcpiDmDumpInteger64 (Resource->GenericReg.Address, "Address"); |
969 | AcpiDmDumpInteger64 (Resource->GenericReg.Address, "Address"); |
970 | 970 | ||
971 | /* Optional field for ACPI 3.0 */ |
971 | /* Optional field for ACPI 3.0 */ |
972 | 972 | ||
973 | AcpiDmIndent (Level + 1); |
973 | AcpiDmIndent (Level + 1); |
974 | if (Resource->GenericReg.AccessSize) |
974 | if (Resource->GenericReg.AccessSize) |
975 | { |
975 | { |
976 | AcpiOsPrintf ("0x%2.2X, // %s\n", |
976 | AcpiOsPrintf ("0x%2.2X, // %s\n", |
977 | Resource->GenericReg.AccessSize, "Access Size"); |
977 | Resource->GenericReg.AccessSize, "Access Size"); |
978 | AcpiDmIndent (Level + 1); |
978 | AcpiDmIndent (Level + 1); |
979 | } |
979 | } |
980 | else |
980 | else |
981 | { |
981 | { |
982 | AcpiOsPrintf (","); |
982 | AcpiOsPrintf (","); |
983 | } |
983 | } |
984 | 984 | ||
985 | /* DescriptorName was added for ACPI 3.0+ */ |
985 | /* DescriptorName was added for ACPI 3.0+ */ |
986 | 986 | ||
987 | AcpiDmDescriptorName (); |
987 | AcpiDmDescriptorName (); |
988 | AcpiOsPrintf (")\n"); |
988 | AcpiOsPrintf (")\n"); |
989 | } |
989 | } |
990 | 990 | ||
991 | 991 | ||
992 | /******************************************************************************* |
992 | /******************************************************************************* |
993 | * |
993 | * |
994 | * FUNCTION: AcpiDmInterruptDescriptor |
994 | * FUNCTION: AcpiDmInterruptDescriptor |
995 | * |
995 | * |
996 | * PARAMETERS: Resource - Pointer to the resource descriptor |
996 | * PARAMETERS: Resource - Pointer to the resource descriptor |
997 | * Length - Length of the descriptor in bytes |
997 | * Length - Length of the descriptor in bytes |
998 | * Level - Current source code indentation level |
998 | * Level - Current source code indentation level |
999 | * |
999 | * |
1000 | * RETURN: None |
1000 | * RETURN: None |
1001 | * |
1001 | * |
1002 | * DESCRIPTION: Decode a extended Interrupt descriptor |
1002 | * DESCRIPTION: Decode a extended Interrupt descriptor |
1003 | * |
1003 | * |
1004 | ******************************************************************************/ |
1004 | ******************************************************************************/ |
1005 | 1005 | ||
1006 | void |
1006 | void |
1007 | AcpiDmInterruptDescriptor ( |
1007 | AcpiDmInterruptDescriptor ( |
1008 | AML_RESOURCE *Resource, |
1008 | AML_RESOURCE *Resource, |
1009 | UINT32 Length, |
1009 | UINT32 Length, |
1010 | UINT32 Level) |
1010 | UINT32 Level) |
1011 | { |
1011 | { |
1012 | UINT32 i; |
1012 | UINT32 i; |
1013 | 1013 | ||
1014 | 1014 | ||
1015 | AcpiDmIndent (Level); |
1015 | AcpiDmIndent (Level); |
1016 | AcpiOsPrintf ("Interrupt (%s, %s, %s, %s, ", |
1016 | AcpiOsPrintf ("Interrupt (%s, %s, %s, %s, ", |
1017 | AcpiGbl_ConsumeDecode [(Resource->ExtendedIrq.Flags & 1)], |
1017 | AcpiGbl_ConsumeDecode [(Resource->ExtendedIrq.Flags & 1)], |
1018 | AcpiGbl_HeDecode [(Resource->ExtendedIrq.Flags >> 1) & 1], |
1018 | AcpiGbl_HeDecode [(Resource->ExtendedIrq.Flags >> 1) & 1], |
1019 | AcpiGbl_LlDecode [(Resource->ExtendedIrq.Flags >> 2) & 1], |
1019 | AcpiGbl_LlDecode [(Resource->ExtendedIrq.Flags >> 2) & 1], |
1020 | AcpiGbl_ShrDecode [(Resource->ExtendedIrq.Flags >> 3) & 1]); |
1020 | AcpiGbl_ShrDecode [(Resource->ExtendedIrq.Flags >> 3) & 1]); |
1021 | 1021 | ||
1022 | /* |
1022 | /* |
1023 | * The ResourceSource fields are optional and appear after the interrupt |
1023 | * The ResourceSource fields are optional and appear after the interrupt |
1024 | * list. Must compute length based on length of the list. First xrupt |
1024 | * list. Must compute length based on length of the list. First xrupt |
1025 | * is included in the struct (reason for -1 below) |
1025 | * is included in the struct (reason for -1 below) |
1026 | */ |
1026 | */ |
1027 | AcpiDmResourceSource (Resource, |
1027 | AcpiDmResourceSource (Resource, |
1028 | sizeof (AML_RESOURCE_EXTENDED_IRQ) + |
1028 | sizeof (AML_RESOURCE_EXTENDED_IRQ) + |
1029 | ((UINT32) Resource->ExtendedIrq.InterruptCount - 1) * sizeof (UINT32), |
1029 | ((UINT32) Resource->ExtendedIrq.InterruptCount - 1) * sizeof (UINT32), |
1030 | Resource->ExtendedIrq.ResourceLength); |
1030 | Resource->ExtendedIrq.ResourceLength); |
1031 | 1031 | ||
1032 | /* Insert a descriptor name */ |
1032 | /* Insert a descriptor name */ |
1033 | 1033 | ||
1034 | AcpiDmDescriptorName (); |
1034 | AcpiDmDescriptorName (); |
1035 | AcpiOsPrintf (")\n"); |
1035 | AcpiOsPrintf (")\n"); |
1036 | 1036 | ||
1037 | /* Dump the interrupt list */ |
1037 | /* Dump the interrupt list */ |
1038 | 1038 | ||
1039 | AcpiDmIndent (Level); |
1039 | AcpiDmIndent (Level); |
1040 | AcpiOsPrintf ("{\n"); |
1040 | AcpiOsPrintf ("{\n"); |
1041 | for (i = 0; i < Resource->ExtendedIrq.InterruptCount; i++) |
1041 | for (i = 0; i < Resource->ExtendedIrq.InterruptCount; i++) |
1042 | { |
1042 | { |
1043 | AcpiDmIndent (Level + 1); |
1043 | AcpiDmIndent (Level + 1); |
1044 | AcpiOsPrintf ("0x%8.8X,\n", |
1044 | AcpiOsPrintf ("0x%8.8X,\n", |
1045 | (UINT32) Resource->ExtendedIrq.Interrupts[i]); |
1045 | (UINT32) Resource->ExtendedIrq.Interrupts[i]); |
1046 | } |
1046 | } |
1047 | 1047 | ||
1048 | AcpiDmIndent (Level); |
1048 | AcpiDmIndent (Level); |
1049 | AcpiOsPrintf ("}\n"); |
1049 | AcpiOsPrintf ("}\n"); |
1050 | } |
1050 | } |
1051 | 1051 | ||
1052 | 1052 | ||
1053 | /******************************************************************************* |
1053 | /******************************************************************************* |
1054 | * |
1054 | * |
1055 | * FUNCTION: AcpiDmVendorCommon |
1055 | * FUNCTION: AcpiDmVendorCommon |
1056 | * |
1056 | * |
1057 | * PARAMETERS: Name - Descriptor name suffix |
1057 | * PARAMETERS: Name - Descriptor name suffix |
1058 | * ByteData - Pointer to the vendor byte data |
1058 | * ByteData - Pointer to the vendor byte data |
1059 | * Length - Length of the byte data |
1059 | * Length - Length of the byte data |
1060 | * Level - Current source code indentation level |
1060 | * Level - Current source code indentation level |
1061 | * |
1061 | * |
1062 | * RETURN: None |
1062 | * RETURN: None |
1063 | * |
1063 | * |
1064 | * DESCRIPTION: Decode a Vendor descriptor, both Large and Small |
1064 | * DESCRIPTION: Decode a Vendor descriptor, both Large and Small |
1065 | * |
1065 | * |
1066 | ******************************************************************************/ |
1066 | ******************************************************************************/ |
1067 | 1067 | ||
1068 | void |
1068 | void |
1069 | AcpiDmVendorCommon ( |
1069 | AcpiDmVendorCommon ( |
1070 | char *Name, |
1070 | char *Name, |
1071 | UINT8 *ByteData, |
1071 | UINT8 *ByteData, |
1072 | UINT32 Length, |
1072 | UINT32 Length, |
1073 | UINT32 Level) |
1073 | UINT32 Level) |
1074 | { |
1074 | { |
1075 | 1075 | ||
1076 | /* Dump macro name */ |
1076 | /* Dump macro name */ |
1077 | 1077 | ||
1078 | AcpiDmIndent (Level); |
1078 | AcpiDmIndent (Level); |
1079 | AcpiOsPrintf ("Vendor%s (", Name); |
1079 | AcpiOsPrintf ("Vendor%s (", Name); |
1080 | 1080 | ||
1081 | /* Insert a descriptor name */ |
1081 | /* Insert a descriptor name */ |
1082 | 1082 | ||
1083 | AcpiDmDescriptorName (); |
1083 | AcpiDmDescriptorName (); |
1084 | AcpiOsPrintf (") // Length = 0x%.2X\n", Length); |
1084 | AcpiOsPrintf (") // Length = 0x%.2X\n", Length); |
1085 | 1085 | ||
1086 | /* Dump the vendor bytes */ |
1086 | /* Dump the vendor bytes */ |
1087 | 1087 | ||
1088 | AcpiDmIndent (Level); |
1088 | AcpiDmIndent (Level); |
1089 | AcpiOsPrintf ("{\n"); |
1089 | AcpiOsPrintf ("{\n"); |
1090 | 1090 | ||
1091 | AcpiDmDisasmByteList (Level + 1, ByteData, Length); |
1091 | AcpiDmDisasmByteList (Level + 1, ByteData, Length); |
1092 | 1092 | ||
1093 | AcpiDmIndent (Level); |
1093 | AcpiDmIndent (Level); |
1094 | AcpiOsPrintf ("}\n"); |
1094 | AcpiOsPrintf ("}\n"); |
1095 | } |
1095 | } |
1096 | 1096 | ||
1097 | 1097 | ||
1098 | /******************************************************************************* |
1098 | /******************************************************************************* |
1099 | * |
1099 | * |
1100 | * FUNCTION: AcpiDmVendorLargeDescriptor |
1100 | * FUNCTION: AcpiDmVendorLargeDescriptor |
1101 | * |
1101 | * |
1102 | * PARAMETERS: Resource - Pointer to the resource descriptor |
1102 | * PARAMETERS: Resource - Pointer to the resource descriptor |
1103 | * Length - Length of the descriptor in bytes |
1103 | * Length - Length of the descriptor in bytes |
1104 | * Level - Current source code indentation level |
1104 | * Level - Current source code indentation level |
1105 | * |
1105 | * |
1106 | * RETURN: None |
1106 | * RETURN: None |
1107 | * |
1107 | * |
1108 | * DESCRIPTION: Decode a Vendor Large descriptor |
1108 | * DESCRIPTION: Decode a Vendor Large descriptor |
1109 | * |
1109 | * |
1110 | ******************************************************************************/ |
1110 | ******************************************************************************/ |
1111 | 1111 | ||
1112 | void |
1112 | void |
1113 | AcpiDmVendorLargeDescriptor ( |
1113 | AcpiDmVendorLargeDescriptor ( |
1114 | AML_RESOURCE *Resource, |
1114 | AML_RESOURCE *Resource, |
1115 | UINT32 Length, |
1115 | UINT32 Length, |
1116 | UINT32 Level) |
1116 | UINT32 Level) |
1117 | { |
1117 | { |
1118 | 1118 | ||
1119 | AcpiDmVendorCommon ("Long ", |
1119 | AcpiDmVendorCommon ("Long ", |
1120 | ACPI_ADD_PTR (UINT8, Resource, sizeof (AML_RESOURCE_LARGE_HEADER)), |
1120 | ACPI_ADD_PTR (UINT8, Resource, sizeof (AML_RESOURCE_LARGE_HEADER)), |
1121 | Length, Level); |
1121 | Length, Level); |
1122 | } |
1122 | } |
1123 | 1123 | ||
1124 | #endif>=>>>> |
1124 | #endif>=>>>> |