blob: 2c3bb8c35741041ab4c8a25d363911216eaa07f4 [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001/*******************************************************************************
2 *
3 * Module Name: rsdump - Functions to display the resource structures.
4 *
5 ******************************************************************************/
6
7/*
8 * Copyright (C) 2000 - 2005, R. Byron Moore
9 * All rights reserved.
10 *
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
13 * are met:
14 * 1. Redistributions of source code must retain the above copyright
15 * notice, this list of conditions, and the following disclaimer,
16 * without modification.
17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 * substantially similar to the "NO WARRANTY" disclaimer below
19 * ("Disclaimer") and any redistribution must be conditioned upon
20 * including a substantially similar Disclaimer requirement for further
21 * binary redistribution.
22 * 3. Neither the names of the above-listed copyright holders nor the names
23 * of any contributors may be used to endorse or promote products derived
24 * from this software without specific prior written permission.
25 *
26 * Alternatively, this software may be distributed under the terms of the
27 * GNU General Public License ("GPL") version 2 as published by the Free
28 * Software Foundation.
29 *
30 * NO WARRANTY
31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 * POSSIBILITY OF SUCH DAMAGES.
42 */
43
44
45#include <acpi/acpi.h>
46#include <acpi/acresrc.h>
47
48#define _COMPONENT ACPI_RESOURCES
49 ACPI_MODULE_NAME ("rsdump")
50
Robert Moore6f42ccf2005-05-13 00:00:00 -040051
52#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
53
Robert Moore44f6c012005-04-18 22:49:35 -040054/* Local prototypes */
55
56static void
57acpi_rs_dump_irq (
58 union acpi_resource_data *data);
59
60static void
61acpi_rs_dump_address16 (
62 union acpi_resource_data *data);
63
64static void
65acpi_rs_dump_address32 (
66 union acpi_resource_data *data);
67
68static void
69acpi_rs_dump_address64 (
70 union acpi_resource_data *data);
71
72static void
73acpi_rs_dump_dma (
74 union acpi_resource_data *data);
75
76static void
77acpi_rs_dump_io (
78 union acpi_resource_data *data);
79
80static void
81acpi_rs_dump_extended_irq (
82 union acpi_resource_data *data);
83
84static void
85acpi_rs_dump_fixed_io (
86 union acpi_resource_data *data);
87
88static void
89acpi_rs_dump_fixed_memory32 (
90 union acpi_resource_data *data);
91
92static void
93acpi_rs_dump_memory24 (
94 union acpi_resource_data *data);
95
96static void
97acpi_rs_dump_memory32 (
98 union acpi_resource_data *data);
99
100static void
101acpi_rs_dump_start_depend_fns (
102 union acpi_resource_data *data);
103
104static void
105acpi_rs_dump_vendor_specific (
106 union acpi_resource_data *data);
107
Linus Torvalds1da177e2005-04-16 15:20:36 -0700108
Linus Torvalds1da177e2005-04-16 15:20:36 -0700109/*******************************************************************************
110 *
111 * FUNCTION: acpi_rs_dump_irq
112 *
113 * PARAMETERS: Data - pointer to the resource structure to dump.
114 *
115 * RETURN: None
116 *
117 * DESCRIPTION: Prints out the various members of the Data structure type.
118 *
119 ******************************************************************************/
120
Robert Moore44f6c012005-04-18 22:49:35 -0400121static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700122acpi_rs_dump_irq (
123 union acpi_resource_data *data)
124{
125 struct acpi_resource_irq *irq_data = (struct acpi_resource_irq *) data;
126 u8 index = 0;
127
128
129 ACPI_FUNCTION_ENTRY ();
130
131
132 acpi_os_printf ("IRQ Resource\n");
133
134 acpi_os_printf (" %s Triggered\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400135 ACPI_LEVEL_SENSITIVE == irq_data->edge_level ? "Level" : "Edge");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700136
137 acpi_os_printf (" Active %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400138 ACPI_ACTIVE_LOW == irq_data->active_high_low ? "Low" : "High");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700139
140 acpi_os_printf (" %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400141 ACPI_SHARED == irq_data->shared_exclusive ? "Shared" : "Exclusive");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700142
143 acpi_os_printf (" %X Interrupts ( ", irq_data->number_of_interrupts);
144
145 for (index = 0; index < irq_data->number_of_interrupts; index++) {
146 acpi_os_printf ("%X ", irq_data->interrupts[index]);
147 }
148
149 acpi_os_printf (")\n");
150 return;
151}
152
153
154/*******************************************************************************
155 *
156 * FUNCTION: acpi_rs_dump_dma
157 *
158 * PARAMETERS: Data - pointer to the resource structure to dump.
159 *
160 * RETURN: None
161 *
162 * DESCRIPTION: Prints out the various members of the Data structure type.
163 *
164 ******************************************************************************/
165
Robert Moore44f6c012005-04-18 22:49:35 -0400166static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700167acpi_rs_dump_dma (
168 union acpi_resource_data *data)
169{
170 struct acpi_resource_dma *dma_data = (struct acpi_resource_dma *) data;
171 u8 index = 0;
172
173
174 ACPI_FUNCTION_ENTRY ();
175
176
177 acpi_os_printf ("DMA Resource\n");
178
179 switch (dma_data->type) {
180 case ACPI_COMPATIBILITY:
181 acpi_os_printf (" Compatibility mode\n");
182 break;
183
184 case ACPI_TYPE_A:
185 acpi_os_printf (" Type A\n");
186 break;
187
188 case ACPI_TYPE_B:
189 acpi_os_printf (" Type B\n");
190 break;
191
192 case ACPI_TYPE_F:
193 acpi_os_printf (" Type F\n");
194 break;
195
196 default:
197 acpi_os_printf (" Invalid DMA type\n");
198 break;
199 }
200
201 acpi_os_printf (" %sBus Master\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400202 ACPI_BUS_MASTER == dma_data->bus_master ? "" : "Not a ");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700203
204
205 switch (dma_data->transfer) {
206 case ACPI_TRANSFER_8:
207 acpi_os_printf (" 8-bit only transfer\n");
208 break;
209
210 case ACPI_TRANSFER_8_16:
211 acpi_os_printf (" 8 and 16-bit transfer\n");
212 break;
213
214 case ACPI_TRANSFER_16:
215 acpi_os_printf (" 16 bit only transfer\n");
216 break;
217
218 default:
219 acpi_os_printf (" Invalid transfer preference\n");
220 break;
221 }
222
Robert Moore44f6c012005-04-18 22:49:35 -0400223 acpi_os_printf (" Number of Channels: %X ( ",
224 dma_data->number_of_channels);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700225
226 for (index = 0; index < dma_data->number_of_channels; index++) {
227 acpi_os_printf ("%X ", dma_data->channels[index]);
228 }
229
230 acpi_os_printf (")\n");
231 return;
232}
233
234
235/*******************************************************************************
236 *
237 * FUNCTION: acpi_rs_dump_start_depend_fns
238 *
239 * PARAMETERS: Data - pointer to the resource structure to dump.
240 *
241 * RETURN: None
242 *
243 * DESCRIPTION: Prints out the various members of the Data structure type.
244 *
245 ******************************************************************************/
246
Robert Moore44f6c012005-04-18 22:49:35 -0400247static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700248acpi_rs_dump_start_depend_fns (
249 union acpi_resource_data *data)
250{
251 struct acpi_resource_start_dpf *sdf_data = (struct acpi_resource_start_dpf *) data;
252
253
254 ACPI_FUNCTION_ENTRY ();
255
256
257 acpi_os_printf ("Start Dependent Functions Resource\n");
258
259 switch (sdf_data->compatibility_priority) {
260 case ACPI_GOOD_CONFIGURATION:
261 acpi_os_printf (" Good configuration\n");
262 break;
263
264 case ACPI_ACCEPTABLE_CONFIGURATION:
265 acpi_os_printf (" Acceptable configuration\n");
266 break;
267
268 case ACPI_SUB_OPTIMAL_CONFIGURATION:
269 acpi_os_printf (" Sub-optimal configuration\n");
270 break;
271
272 default:
273 acpi_os_printf (" Invalid compatibility priority\n");
274 break;
275 }
276
277 switch(sdf_data->performance_robustness) {
278 case ACPI_GOOD_CONFIGURATION:
279 acpi_os_printf (" Good configuration\n");
280 break;
281
282 case ACPI_ACCEPTABLE_CONFIGURATION:
283 acpi_os_printf (" Acceptable configuration\n");
284 break;
285
286 case ACPI_SUB_OPTIMAL_CONFIGURATION:
287 acpi_os_printf (" Sub-optimal configuration\n");
288 break;
289
290 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400291 acpi_os_printf (" Invalid performance robustness preference\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700292 break;
293 }
294
295 return;
296}
297
298
299/*******************************************************************************
300 *
301 * FUNCTION: acpi_rs_dump_io
302 *
303 * PARAMETERS: Data - pointer to the resource structure to dump.
304 *
305 * RETURN: None
306 *
307 * DESCRIPTION: Prints out the various members of the Data structure type.
308 *
309 ******************************************************************************/
310
Robert Moore44f6c012005-04-18 22:49:35 -0400311static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700312acpi_rs_dump_io (
313 union acpi_resource_data *data)
314{
315 struct acpi_resource_io *io_data = (struct acpi_resource_io *) data;
316
317
318 ACPI_FUNCTION_ENTRY ();
319
320
321 acpi_os_printf ("Io Resource\n");
322
323 acpi_os_printf (" %d bit decode\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400324 ACPI_DECODE_16 == io_data->io_decode ? 16 : 10);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700325
Robert Moore44f6c012005-04-18 22:49:35 -0400326 acpi_os_printf (" Range minimum base: %08X\n", io_data->min_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700327
Robert Moore44f6c012005-04-18 22:49:35 -0400328 acpi_os_printf (" Range maximum base: %08X\n", io_data->max_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700329
Robert Moore44f6c012005-04-18 22:49:35 -0400330 acpi_os_printf (" Alignment: %08X\n", io_data->alignment);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700331
Robert Moore44f6c012005-04-18 22:49:35 -0400332 acpi_os_printf (" Range Length: %08X\n", io_data->range_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700333
334 return;
335}
336
337
338/*******************************************************************************
339 *
340 * FUNCTION: acpi_rs_dump_fixed_io
341 *
342 * PARAMETERS: Data - pointer to the resource structure to dump.
343 *
344 * RETURN: None
345 *
346 * DESCRIPTION: Prints out the various members of the Data structure type.
347 *
348 ******************************************************************************/
349
Robert Moore44f6c012005-04-18 22:49:35 -0400350static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700351acpi_rs_dump_fixed_io (
352 union acpi_resource_data *data)
353{
354 struct acpi_resource_fixed_io *fixed_io_data = (struct acpi_resource_fixed_io *) data;
355
356
357 ACPI_FUNCTION_ENTRY ();
358
359
360 acpi_os_printf ("Fixed Io Resource\n");
Robert Moore44f6c012005-04-18 22:49:35 -0400361 acpi_os_printf (" Range base address: %08X", fixed_io_data->base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700362
Robert Moore44f6c012005-04-18 22:49:35 -0400363 acpi_os_printf (" Range length: %08X", fixed_io_data->range_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700364
365 return;
366}
367
368
369/*******************************************************************************
370 *
371 * FUNCTION: acpi_rs_dump_vendor_specific
372 *
373 * PARAMETERS: Data - pointer to the resource structure to dump.
374 *
375 * RETURN: None
376 *
377 * DESCRIPTION: Prints out the various members of the Data structure type.
378 *
379 ******************************************************************************/
380
Robert Moore44f6c012005-04-18 22:49:35 -0400381static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700382acpi_rs_dump_vendor_specific (
383 union acpi_resource_data *data)
384{
385 struct acpi_resource_vendor *vendor_data = (struct acpi_resource_vendor *) data;
386 u16 index = 0;
387
388
389 ACPI_FUNCTION_ENTRY ();
390
391
392 acpi_os_printf ("Vendor Specific Resource\n");
393
394 acpi_os_printf (" Length: %08X\n", vendor_data->length);
395
396 for (index = 0; index < vendor_data->length; index++) {
397 acpi_os_printf (" Byte %X: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400398 index, vendor_data->reserved[index]);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700399 }
400
401 return;
402}
403
404
405/*******************************************************************************
406 *
407 * FUNCTION: acpi_rs_dump_memory24
408 *
409 * PARAMETERS: Data - pointer to the resource structure to dump.
410 *
411 * RETURN: None
412 *
413 * DESCRIPTION: Prints out the various members of the Data structure type.
414 *
415 ******************************************************************************/
416
Robert Moore44f6c012005-04-18 22:49:35 -0400417static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700418acpi_rs_dump_memory24 (
419 union acpi_resource_data *data)
420{
421 struct acpi_resource_mem24 *memory24_data = (struct acpi_resource_mem24 *) data;
422
423
424 ACPI_FUNCTION_ENTRY ();
425
426
427 acpi_os_printf ("24-Bit Memory Range Resource\n");
428
429 acpi_os_printf (" Read%s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400430 ACPI_READ_WRITE_MEMORY ==
431 memory24_data->read_write_attribute ?
432 "/Write" : " only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700433
434 acpi_os_printf (" Range minimum base: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400435 memory24_data->min_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700436
437 acpi_os_printf (" Range maximum base: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400438 memory24_data->max_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700439
Robert Moore44f6c012005-04-18 22:49:35 -0400440 acpi_os_printf (" Alignment: %08X\n", memory24_data->alignment);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700441
Robert Moore44f6c012005-04-18 22:49:35 -0400442 acpi_os_printf (" Range length: %08X\n", memory24_data->range_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700443
444 return;
445}
446
447
448/*******************************************************************************
449 *
450 * FUNCTION: acpi_rs_dump_memory32
451 *
452 * PARAMETERS: Data - pointer to the resource structure to dump.
453 *
454 * RETURN: None
455 *
456 * DESCRIPTION: Prints out the various members of the Data structure type.
457 *
458 ******************************************************************************/
459
Robert Moore44f6c012005-04-18 22:49:35 -0400460static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700461acpi_rs_dump_memory32 (
462 union acpi_resource_data *data)
463{
464 struct acpi_resource_mem32 *memory32_data = (struct acpi_resource_mem32 *) data;
465
466
467 ACPI_FUNCTION_ENTRY ();
468
469
470 acpi_os_printf ("32-Bit Memory Range Resource\n");
471
472 acpi_os_printf (" Read%s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400473 ACPI_READ_WRITE_MEMORY ==
474 memory32_data->read_write_attribute ?
475 "/Write" : " only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700476
477 acpi_os_printf (" Range minimum base: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400478 memory32_data->min_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700479
480 acpi_os_printf (" Range maximum base: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400481 memory32_data->max_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700482
Robert Moore44f6c012005-04-18 22:49:35 -0400483 acpi_os_printf (" Alignment: %08X\n", memory32_data->alignment);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700484
Robert Moore44f6c012005-04-18 22:49:35 -0400485 acpi_os_printf (" Range length: %08X\n", memory32_data->range_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700486
487 return;
488}
489
490
491/*******************************************************************************
492 *
493 * FUNCTION: acpi_rs_dump_fixed_memory32
494 *
495 * PARAMETERS: Data - pointer to the resource structure to dump.
496 *
497 * RETURN:
498 *
499 * DESCRIPTION: Prints out the various members of the Data structure type.
500 *
501 ******************************************************************************/
502
Robert Moore44f6c012005-04-18 22:49:35 -0400503static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700504acpi_rs_dump_fixed_memory32 (
505 union acpi_resource_data *data)
506{
Robert Moore44f6c012005-04-18 22:49:35 -0400507 struct acpi_resource_fixed_mem32 *fixed_memory32_data =
508 (struct acpi_resource_fixed_mem32 *) data;
Linus Torvalds1da177e2005-04-16 15:20:36 -0700509
510
511 ACPI_FUNCTION_ENTRY ();
512
513
514 acpi_os_printf ("32-Bit Fixed Location Memory Range Resource\n");
515
516 acpi_os_printf (" Read%s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400517 ACPI_READ_WRITE_MEMORY ==
518 fixed_memory32_data->read_write_attribute ? "/Write" : " Only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700519
520 acpi_os_printf (" Range base address: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400521 fixed_memory32_data->range_base_address);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700522
523 acpi_os_printf (" Range length: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400524 fixed_memory32_data->range_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700525
526 return;
527}
528
529
530/*******************************************************************************
531 *
532 * FUNCTION: acpi_rs_dump_address16
533 *
534 * PARAMETERS: Data - pointer to the resource structure to dump.
535 *
536 * RETURN: None
537 *
538 * DESCRIPTION: Prints out the various members of the Data structure type.
539 *
540 ******************************************************************************/
541
Robert Moore44f6c012005-04-18 22:49:35 -0400542static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700543acpi_rs_dump_address16 (
544 union acpi_resource_data *data)
545{
546 struct acpi_resource_address16 *address16_data = (struct acpi_resource_address16 *) data;
547
548
549 ACPI_FUNCTION_ENTRY ();
550
551
552 acpi_os_printf ("16-Bit Address Space Resource\n");
553 acpi_os_printf (" Resource Type: ");
554
555 switch (address16_data->resource_type) {
556 case ACPI_MEMORY_RANGE:
557
558 acpi_os_printf ("Memory Range\n");
559
560 switch (address16_data->attribute.memory.cache_attribute) {
561 case ACPI_NON_CACHEABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400562 acpi_os_printf (" Type Specific: Noncacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700563 break;
564
565 case ACPI_CACHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400566 acpi_os_printf (" Type Specific: Cacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700567 break;
568
569 case ACPI_WRITE_COMBINING_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400570 acpi_os_printf (" Type Specific: Write-combining memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700571 break;
572
573 case ACPI_PREFETCHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400574 acpi_os_printf (" Type Specific: Prefetchable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700575 break;
576
577 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400578 acpi_os_printf (" Type Specific: Invalid cache attribute\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700579 break;
580 }
581
582 acpi_os_printf (" Type Specific: Read%s\n",
583 ACPI_READ_WRITE_MEMORY ==
Robert Moore44f6c012005-04-18 22:49:35 -0400584 address16_data->attribute.memory.read_write_attribute ?
585 "/Write" : " Only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700586 break;
587
588 case ACPI_IO_RANGE:
589
590 acpi_os_printf ("I/O Range\n");
591
592 switch (address16_data->attribute.io.range_attribute) {
593 case ACPI_NON_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400594 acpi_os_printf (" Type Specific: Non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700595 break;
596
597 case ACPI_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400598 acpi_os_printf (" Type Specific: ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700599 break;
600
601 case ACPI_ENTIRE_RANGE:
Robert Moore44f6c012005-04-18 22:49:35 -0400602 acpi_os_printf (" Type Specific: ISA and non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700603 break;
604
605 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400606 acpi_os_printf (" Type Specific: Invalid range attribute\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700607 break;
608 }
609
610 acpi_os_printf (" Type Specific: %s Translation\n",
611 ACPI_SPARSE_TRANSLATION ==
Robert Moore44f6c012005-04-18 22:49:35 -0400612 address16_data->attribute.io.translation_attribute ?
613 "Sparse" : "Dense");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700614 break;
615
616 case ACPI_BUS_NUMBER_RANGE:
617
618 acpi_os_printf ("Bus Number Range\n");
619 break;
620
621 default:
622
623 acpi_os_printf ("0x%2.2X\n", address16_data->resource_type);
624 break;
625 }
626
627 acpi_os_printf (" Resource %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400628 ACPI_CONSUMER == address16_data->producer_consumer ?
Linus Torvalds1da177e2005-04-16 15:20:36 -0700629 "Consumer" : "Producer");
630
631 acpi_os_printf (" %s decode\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400632 ACPI_SUB_DECODE == address16_data->decode ?
633 "Subtractive" : "Positive");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700634
635 acpi_os_printf (" Min address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400636 ACPI_ADDRESS_FIXED == address16_data->min_address_fixed ?
637 "" : "not");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700638
639 acpi_os_printf (" Max address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400640 ACPI_ADDRESS_FIXED == address16_data->max_address_fixed ?
641 "" : "not");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700642
643 acpi_os_printf (" Granularity: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400644 address16_data->granularity);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700645
646 acpi_os_printf (" Address range min: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400647 address16_data->min_address_range);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700648
649 acpi_os_printf (" Address range max: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400650 address16_data->max_address_range);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700651
652 acpi_os_printf (" Address translation offset: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400653 address16_data->address_translation_offset);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700654
655 acpi_os_printf (" Address Length: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400656 address16_data->address_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700657
658 if (0xFF != address16_data->resource_source.index) {
659 acpi_os_printf (" Resource Source Index: %X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400660 address16_data->resource_source.index);
661
Linus Torvalds1da177e2005-04-16 15:20:36 -0700662 acpi_os_printf (" Resource Source: %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400663 address16_data->resource_source.string_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700664 }
665
666 return;
667}
668
669
670/*******************************************************************************
671 *
672 * FUNCTION: acpi_rs_dump_address32
673 *
674 * PARAMETERS: Data - pointer to the resource structure to dump.
675 *
676 * RETURN: None
677 *
678 * DESCRIPTION: Prints out the various members of the Data structure type.
679 *
680 ******************************************************************************/
681
Robert Moore44f6c012005-04-18 22:49:35 -0400682static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700683acpi_rs_dump_address32 (
684 union acpi_resource_data *data)
685{
686 struct acpi_resource_address32 *address32_data = (struct acpi_resource_address32 *) data;
687
688
689 ACPI_FUNCTION_ENTRY ();
690
691
692 acpi_os_printf ("32-Bit Address Space Resource\n");
693
694 switch (address32_data->resource_type) {
695 case ACPI_MEMORY_RANGE:
696
697 acpi_os_printf (" Resource Type: Memory Range\n");
698
699 switch (address32_data->attribute.memory.cache_attribute) {
700 case ACPI_NON_CACHEABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400701 acpi_os_printf (" Type Specific: Noncacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700702 break;
703
704 case ACPI_CACHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400705 acpi_os_printf (" Type Specific: Cacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700706 break;
707
708 case ACPI_WRITE_COMBINING_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400709 acpi_os_printf (" Type Specific: Write-combining memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700710 break;
711
712 case ACPI_PREFETCHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400713 acpi_os_printf (" Type Specific: Prefetchable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700714 break;
715
716 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400717 acpi_os_printf (" Type Specific: Invalid cache attribute\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700718 break;
719 }
720
721 acpi_os_printf (" Type Specific: Read%s\n",
722 ACPI_READ_WRITE_MEMORY ==
Robert Moore44f6c012005-04-18 22:49:35 -0400723 address32_data->attribute.memory.read_write_attribute ?
724 "/Write" : " Only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700725 break;
726
727 case ACPI_IO_RANGE:
728
729 acpi_os_printf (" Resource Type: Io Range\n");
730
731 switch (address32_data->attribute.io.range_attribute) {
732 case ACPI_NON_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400733 acpi_os_printf (" Type Specific: Non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700734 break;
735
736 case ACPI_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400737 acpi_os_printf (" Type Specific: ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700738 break;
739
740 case ACPI_ENTIRE_RANGE:
Robert Moore44f6c012005-04-18 22:49:35 -0400741 acpi_os_printf (" Type Specific: ISA and non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700742 break;
743
744 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400745 acpi_os_printf (" Type Specific: Invalid Range attribute");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700746 break;
747 }
748
749 acpi_os_printf (" Type Specific: %s Translation\n",
750 ACPI_SPARSE_TRANSLATION ==
Robert Moore44f6c012005-04-18 22:49:35 -0400751 address32_data->attribute.io.translation_attribute ?
752 "Sparse" : "Dense");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700753 break;
754
755 case ACPI_BUS_NUMBER_RANGE:
756
757 acpi_os_printf (" Resource Type: Bus Number Range\n");
758 break;
759
760 default:
761
Robert Moore44f6c012005-04-18 22:49:35 -0400762 acpi_os_printf (" Resource Type: 0x%2.2X\n",
763 address32_data->resource_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700764 break;
765 }
766
767 acpi_os_printf (" Resource %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400768 ACPI_CONSUMER == address32_data->producer_consumer ?
769 "Consumer" : "Producer");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700770
771 acpi_os_printf (" %s decode\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400772 ACPI_SUB_DECODE == address32_data->decode ?
773 "Subtractive" : "Positive");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700774
775 acpi_os_printf (" Min address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400776 ACPI_ADDRESS_FIXED == address32_data->min_address_fixed ?
777 "" : "not ");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700778
779 acpi_os_printf (" Max address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400780 ACPI_ADDRESS_FIXED == address32_data->max_address_fixed ?
781 "" : "not ");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700782
783 acpi_os_printf (" Granularity: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400784 address32_data->granularity);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700785
786 acpi_os_printf (" Address range min: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400787 address32_data->min_address_range);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700788
789 acpi_os_printf (" Address range max: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400790 address32_data->max_address_range);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700791
792 acpi_os_printf (" Address translation offset: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400793 address32_data->address_translation_offset);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700794
795 acpi_os_printf (" Address Length: %08X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400796 address32_data->address_length);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700797
798 if(0xFF != address32_data->resource_source.index) {
799 acpi_os_printf (" Resource Source Index: %X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400800 address32_data->resource_source.index);
801
Linus Torvalds1da177e2005-04-16 15:20:36 -0700802 acpi_os_printf (" Resource Source: %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400803 address32_data->resource_source.string_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700804 }
805
806 return;
807}
808
809
810/*******************************************************************************
811 *
812 * FUNCTION: acpi_rs_dump_address64
813 *
814 * PARAMETERS: Data - pointer to the resource structure to dump.
815 *
816 * RETURN: None
817 *
818 * DESCRIPTION: Prints out the various members of the Data structure type.
819 *
820 ******************************************************************************/
821
Robert Moore44f6c012005-04-18 22:49:35 -0400822static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700823acpi_rs_dump_address64 (
824 union acpi_resource_data *data)
825{
826 struct acpi_resource_address64 *address64_data = (struct acpi_resource_address64 *) data;
827
828
829 ACPI_FUNCTION_ENTRY ();
830
831
832 acpi_os_printf ("64-Bit Address Space Resource\n");
833
834 switch (address64_data->resource_type) {
835 case ACPI_MEMORY_RANGE:
836
837 acpi_os_printf (" Resource Type: Memory Range\n");
838
839 switch (address64_data->attribute.memory.cache_attribute) {
840 case ACPI_NON_CACHEABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400841 acpi_os_printf (" Type Specific: Noncacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700842 break;
843
844 case ACPI_CACHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400845 acpi_os_printf (" Type Specific: Cacheable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700846 break;
847
848 case ACPI_WRITE_COMBINING_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400849 acpi_os_printf (" Type Specific: Write-combining memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700850 break;
851
852 case ACPI_PREFETCHABLE_MEMORY:
Robert Moore44f6c012005-04-18 22:49:35 -0400853 acpi_os_printf (" Type Specific: Prefetchable memory\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700854 break;
855
856 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400857 acpi_os_printf (" Type Specific: Invalid cache attribute\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700858 break;
859 }
860
861 acpi_os_printf (" Type Specific: Read%s\n",
862 ACPI_READ_WRITE_MEMORY ==
Robert Moore44f6c012005-04-18 22:49:35 -0400863 address64_data->attribute.memory.read_write_attribute ?
864 "/Write" : " Only");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700865 break;
866
867 case ACPI_IO_RANGE:
868
869 acpi_os_printf (" Resource Type: Io Range\n");
870
871 switch (address64_data->attribute.io.range_attribute) {
872 case ACPI_NON_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400873 acpi_os_printf (" Type Specific: Non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700874 break;
875
876 case ACPI_ISA_ONLY_RANGES:
Robert Moore44f6c012005-04-18 22:49:35 -0400877 acpi_os_printf (" Type Specific: ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700878 break;
879
880 case ACPI_ENTIRE_RANGE:
Robert Moore44f6c012005-04-18 22:49:35 -0400881 acpi_os_printf (" Type Specific: ISA and non-ISA Io Addresses\n");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700882 break;
883
884 default:
Robert Moore44f6c012005-04-18 22:49:35 -0400885 acpi_os_printf (" Type Specific: Invalid Range attribute");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700886 break;
887 }
888
889 acpi_os_printf (" Type Specific: %s Translation\n",
890 ACPI_SPARSE_TRANSLATION ==
Robert Moore44f6c012005-04-18 22:49:35 -0400891 address64_data->attribute.io.translation_attribute ?
892 "Sparse" : "Dense");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700893 break;
894
895 case ACPI_BUS_NUMBER_RANGE:
896
897 acpi_os_printf (" Resource Type: Bus Number Range\n");
898 break;
899
900 default:
901
Robert Moore44f6c012005-04-18 22:49:35 -0400902 acpi_os_printf (" Resource Type: 0x%2.2X\n",
903 address64_data->resource_type);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700904 break;
905 }
906
907 acpi_os_printf (" Resource %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400908 ACPI_CONSUMER == address64_data->producer_consumer ?
909 "Consumer" : "Producer");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700910
911 acpi_os_printf (" %s decode\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400912 ACPI_SUB_DECODE == address64_data->decode ?
913 "Subtractive" : "Positive");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700914
915 acpi_os_printf (" Min address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400916 ACPI_ADDRESS_FIXED == address64_data->min_address_fixed ?
917 "" : "not ");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700918
919 acpi_os_printf (" Max address is %s fixed\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400920 ACPI_ADDRESS_FIXED == address64_data->max_address_fixed ?
921 "" : "not ");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700922
923 acpi_os_printf (" Granularity: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400924 ACPI_FORMAT_UINT64 (address64_data->granularity));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700925
926 acpi_os_printf (" Address range min: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400927 ACPI_FORMAT_UINT64 (address64_data->min_address_range));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700928
929 acpi_os_printf (" Address range max: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400930 ACPI_FORMAT_UINT64 (address64_data->max_address_range));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700931
932 acpi_os_printf (" Address translation offset: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400933 ACPI_FORMAT_UINT64 (address64_data->address_translation_offset));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700934
935 acpi_os_printf (" Address Length: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400936 ACPI_FORMAT_UINT64 (address64_data->address_length));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700937
938 acpi_os_printf (" Type Specific Attributes: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400939 ACPI_FORMAT_UINT64 (address64_data->type_specific_attributes));
Linus Torvalds1da177e2005-04-16 15:20:36 -0700940
941 if (0xFF != address64_data->resource_source.index) {
942 acpi_os_printf (" Resource Source Index: %X\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400943 address64_data->resource_source.index);
944
Linus Torvalds1da177e2005-04-16 15:20:36 -0700945 acpi_os_printf (" Resource Source: %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400946 address64_data->resource_source.string_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700947 }
948
949 return;
950}
951
952
953/*******************************************************************************
954 *
955 * FUNCTION: acpi_rs_dump_extended_irq
956 *
957 * PARAMETERS: Data - pointer to the resource structure to dump.
958 *
959 * RETURN: None
960 *
961 * DESCRIPTION: Prints out the various members of the Data structure type.
962 *
963 ******************************************************************************/
964
Robert Moore44f6c012005-04-18 22:49:35 -0400965static void
Linus Torvalds1da177e2005-04-16 15:20:36 -0700966acpi_rs_dump_extended_irq (
967 union acpi_resource_data *data)
968{
969 struct acpi_resource_ext_irq *ext_irq_data = (struct acpi_resource_ext_irq *) data;
970 u8 index = 0;
971
972
973 ACPI_FUNCTION_ENTRY ();
974
975
976 acpi_os_printf ("Extended IRQ Resource\n");
977
978 acpi_os_printf (" Resource %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400979 ACPI_CONSUMER == ext_irq_data->producer_consumer ?
980 "Consumer" : "Producer");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700981
982 acpi_os_printf (" %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400983 ACPI_LEVEL_SENSITIVE == ext_irq_data->edge_level ?
984 "Level" : "Edge");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700985
986 acpi_os_printf (" Active %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400987 ACPI_ACTIVE_LOW == ext_irq_data->active_high_low ?
988 "low" : "high");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700989
990 acpi_os_printf (" %s\n",
Robert Moore44f6c012005-04-18 22:49:35 -0400991 ACPI_SHARED == ext_irq_data->shared_exclusive ?
992 "Shared" : "Exclusive");
Linus Torvalds1da177e2005-04-16 15:20:36 -0700993
Robert Moore44f6c012005-04-18 22:49:35 -0400994 acpi_os_printf (" Interrupts : %X ( ", ext_irq_data->number_of_interrupts);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700995
996 for (index = 0; index < ext_irq_data->number_of_interrupts; index++) {
997 acpi_os_printf ("%X ", ext_irq_data->interrupts[index]);
998 }
999
1000 acpi_os_printf (")\n");
1001
1002 if(0xFF != ext_irq_data->resource_source.index) {
1003 acpi_os_printf (" Resource Source Index: %X",
Robert Moore44f6c012005-04-18 22:49:35 -04001004 ext_irq_data->resource_source.index);
1005
Linus Torvalds1da177e2005-04-16 15:20:36 -07001006 acpi_os_printf (" Resource Source: %s",
Robert Moore44f6c012005-04-18 22:49:35 -04001007 ext_irq_data->resource_source.string_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001008 }
1009
1010 return;
1011}
1012
1013
1014/*******************************************************************************
1015 *
1016 * FUNCTION: acpi_rs_dump_resource_list
1017 *
Robert Moore44f6c012005-04-18 22:49:35 -04001018 * PARAMETERS: Resource - pointer to the resource structure to dump.
Linus Torvalds1da177e2005-04-16 15:20:36 -07001019 *
1020 * RETURN: None
1021 *
1022 * DESCRIPTION: Dispatches the structure to the correct dump routine.
1023 *
1024 ******************************************************************************/
1025
1026void
1027acpi_rs_dump_resource_list (
1028 struct acpi_resource *resource)
1029{
1030 u8 count = 0;
1031 u8 done = FALSE;
1032
1033
1034 ACPI_FUNCTION_ENTRY ();
1035
1036
1037 if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
1038 while (!done) {
1039 acpi_os_printf ("Resource structure %X.\n", count++);
1040
1041 switch (resource->id) {
1042 case ACPI_RSTYPE_IRQ:
1043 acpi_rs_dump_irq (&resource->data);
1044 break;
1045
1046 case ACPI_RSTYPE_DMA:
1047 acpi_rs_dump_dma (&resource->data);
1048 break;
1049
1050 case ACPI_RSTYPE_START_DPF:
1051 acpi_rs_dump_start_depend_fns (&resource->data);
1052 break;
1053
1054 case ACPI_RSTYPE_END_DPF:
1055 acpi_os_printf ("end_dependent_functions Resource\n");
1056 /* acpi_rs_dump_end_dependent_functions (Resource->Data);*/
1057 break;
1058
1059 case ACPI_RSTYPE_IO:
1060 acpi_rs_dump_io (&resource->data);
1061 break;
1062
1063 case ACPI_RSTYPE_FIXED_IO:
1064 acpi_rs_dump_fixed_io (&resource->data);
1065 break;
1066
1067 case ACPI_RSTYPE_VENDOR:
1068 acpi_rs_dump_vendor_specific (&resource->data);
1069 break;
1070
1071 case ACPI_RSTYPE_END_TAG:
1072 /*rs_dump_end_tag (Resource->Data);*/
1073 acpi_os_printf ("end_tag Resource\n");
1074 done = TRUE;
1075 break;
1076
1077 case ACPI_RSTYPE_MEM24:
1078 acpi_rs_dump_memory24 (&resource->data);
1079 break;
1080
1081 case ACPI_RSTYPE_MEM32:
1082 acpi_rs_dump_memory32 (&resource->data);
1083 break;
1084
1085 case ACPI_RSTYPE_FIXED_MEM32:
1086 acpi_rs_dump_fixed_memory32 (&resource->data);
1087 break;
1088
1089 case ACPI_RSTYPE_ADDRESS16:
1090 acpi_rs_dump_address16 (&resource->data);
1091 break;
1092
1093 case ACPI_RSTYPE_ADDRESS32:
1094 acpi_rs_dump_address32 (&resource->data);
1095 break;
1096
1097 case ACPI_RSTYPE_ADDRESS64:
1098 acpi_rs_dump_address64 (&resource->data);
1099 break;
1100
1101 case ACPI_RSTYPE_EXT_IRQ:
1102 acpi_rs_dump_extended_irq (&resource->data);
1103 break;
1104
1105 default:
1106 acpi_os_printf ("Invalid resource type\n");
1107 break;
1108
1109 }
1110
1111 resource = ACPI_PTR_ADD (struct acpi_resource, resource, resource->length);
1112 }
1113 }
1114
1115 return;
1116}
1117
1118/*******************************************************************************
1119 *
1120 * FUNCTION: acpi_rs_dump_irq_list
1121 *
Robert Moore44f6c012005-04-18 22:49:35 -04001122 * PARAMETERS: route_table - pointer to the routing table to dump.
Linus Torvalds1da177e2005-04-16 15:20:36 -07001123 *
1124 * RETURN: None
1125 *
1126 * DESCRIPTION: Dispatches the structures to the correct dump routine.
1127 *
1128 ******************************************************************************/
1129
1130void
1131acpi_rs_dump_irq_list (
1132 u8 *route_table)
1133{
1134 u8 *buffer = route_table;
1135 u8 count = 0;
1136 u8 done = FALSE;
1137 struct acpi_pci_routing_table *prt_element;
1138
1139
1140 ACPI_FUNCTION_ENTRY ();
1141
1142
1143 if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
1144 prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
1145
1146 while (!done) {
1147 acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++);
1148
1149 acpi_os_printf (" Address: %8.8X%8.8X\n",
Robert Moore44f6c012005-04-18 22:49:35 -04001150 ACPI_FORMAT_UINT64 (prt_element->address));
Linus Torvalds1da177e2005-04-16 15:20:36 -07001151
1152 acpi_os_printf (" Pin: %X\n", prt_element->pin);
1153
1154 acpi_os_printf (" Source: %s\n", prt_element->source);
1155
Robert Moore44f6c012005-04-18 22:49:35 -04001156 acpi_os_printf (" source_index: %X\n", prt_element->source_index);
Linus Torvalds1da177e2005-04-16 15:20:36 -07001157
1158 buffer += prt_element->length;
Linus Torvalds1da177e2005-04-16 15:20:36 -07001159 prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
Robert Moore44f6c012005-04-18 22:49:35 -04001160 if (0 == prt_element->length) {
Linus Torvalds1da177e2005-04-16 15:20:36 -07001161 done = TRUE;
1162 }
1163 }
1164 }
1165
1166 return;
1167}
1168
1169#endif
1170