aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/resources/rsdump.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/acpi/resources/rsdump.c
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/acpi/resources/rsdump.c')
-rw-r--r--drivers/acpi/resources/rsdump.c1150
1 files changed, 1150 insertions, 0 deletions
diff --git a/drivers/acpi/resources/rsdump.c b/drivers/acpi/resources/rsdump.c
new file mode 100644
index 000000000000..eef1b1f2c685
--- /dev/null
+++ b/drivers/acpi/resources/rsdump.c
@@ -0,0 +1,1150 @@
1/*******************************************************************************
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
51
52#if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
53
54/*******************************************************************************
55 *
56 * FUNCTION: acpi_rs_dump_irq
57 *
58 * PARAMETERS: Data - pointer to the resource structure to dump.
59 *
60 * RETURN: None
61 *
62 * DESCRIPTION: Prints out the various members of the Data structure type.
63 *
64 ******************************************************************************/
65
66void
67acpi_rs_dump_irq (
68 union acpi_resource_data *data)
69{
70 struct acpi_resource_irq *irq_data = (struct acpi_resource_irq *) data;
71 u8 index = 0;
72
73
74 ACPI_FUNCTION_ENTRY ();
75
76
77 acpi_os_printf ("IRQ Resource\n");
78
79 acpi_os_printf (" %s Triggered\n",
80 ACPI_LEVEL_SENSITIVE == irq_data->edge_level ? "Level" : "Edge");
81
82 acpi_os_printf (" Active %s\n",
83 ACPI_ACTIVE_LOW == irq_data->active_high_low ? "Low" : "High");
84
85 acpi_os_printf (" %s\n",
86 ACPI_SHARED == irq_data->shared_exclusive ? "Shared" : "Exclusive");
87
88 acpi_os_printf (" %X Interrupts ( ", irq_data->number_of_interrupts);
89
90 for (index = 0; index < irq_data->number_of_interrupts; index++) {
91 acpi_os_printf ("%X ", irq_data->interrupts[index]);
92 }
93
94 acpi_os_printf (")\n");
95 return;
96}
97
98
99/*******************************************************************************
100 *
101 * FUNCTION: acpi_rs_dump_dma
102 *
103 * PARAMETERS: Data - pointer to the resource structure to dump.
104 *
105 * RETURN: None
106 *
107 * DESCRIPTION: Prints out the various members of the Data structure type.
108 *
109 ******************************************************************************/
110
111void
112acpi_rs_dump_dma (
113 union acpi_resource_data *data)
114{
115 struct acpi_resource_dma *dma_data = (struct acpi_resource_dma *) data;
116 u8 index = 0;
117
118
119 ACPI_FUNCTION_ENTRY ();
120
121
122 acpi_os_printf ("DMA Resource\n");
123
124 switch (dma_data->type) {
125 case ACPI_COMPATIBILITY:
126 acpi_os_printf (" Compatibility mode\n");
127 break;
128
129 case ACPI_TYPE_A:
130 acpi_os_printf (" Type A\n");
131 break;
132
133 case ACPI_TYPE_B:
134 acpi_os_printf (" Type B\n");
135 break;
136
137 case ACPI_TYPE_F:
138 acpi_os_printf (" Type F\n");
139 break;
140
141 default:
142 acpi_os_printf (" Invalid DMA type\n");
143 break;
144 }
145
146 acpi_os_printf (" %sBus Master\n",
147 ACPI_BUS_MASTER == dma_data->bus_master ? "" : "Not a ");
148
149
150 switch (dma_data->transfer) {
151 case ACPI_TRANSFER_8:
152 acpi_os_printf (" 8-bit only transfer\n");
153 break;
154
155 case ACPI_TRANSFER_8_16:
156 acpi_os_printf (" 8 and 16-bit transfer\n");
157 break;
158
159 case ACPI_TRANSFER_16:
160 acpi_os_printf (" 16 bit only transfer\n");
161 break;
162
163 default:
164 acpi_os_printf (" Invalid transfer preference\n");
165 break;
166 }
167
168 acpi_os_printf (" Number of Channels: %X ( ", dma_data->number_of_channels);
169
170 for (index = 0; index < dma_data->number_of_channels; index++) {
171 acpi_os_printf ("%X ", dma_data->channels[index]);
172 }
173
174 acpi_os_printf (")\n");
175 return;
176}
177
178
179/*******************************************************************************
180 *
181 * FUNCTION: acpi_rs_dump_start_depend_fns
182 *
183 * PARAMETERS: Data - pointer to the resource structure to dump.
184 *
185 * RETURN: None
186 *
187 * DESCRIPTION: Prints out the various members of the Data structure type.
188 *
189 ******************************************************************************/
190
191void
192acpi_rs_dump_start_depend_fns (
193 union acpi_resource_data *data)
194{
195 struct acpi_resource_start_dpf *sdf_data = (struct acpi_resource_start_dpf *) data;
196
197
198 ACPI_FUNCTION_ENTRY ();
199
200
201 acpi_os_printf ("Start Dependent Functions Resource\n");
202
203 switch (sdf_data->compatibility_priority) {
204 case ACPI_GOOD_CONFIGURATION:
205 acpi_os_printf (" Good configuration\n");
206 break;
207
208 case ACPI_ACCEPTABLE_CONFIGURATION:
209 acpi_os_printf (" Acceptable configuration\n");
210 break;
211
212 case ACPI_SUB_OPTIMAL_CONFIGURATION:
213 acpi_os_printf (" Sub-optimal configuration\n");
214 break;
215
216 default:
217 acpi_os_printf (" Invalid compatibility priority\n");
218 break;
219 }
220
221 switch(sdf_data->performance_robustness) {
222 case ACPI_GOOD_CONFIGURATION:
223 acpi_os_printf (" Good configuration\n");
224 break;
225
226 case ACPI_ACCEPTABLE_CONFIGURATION:
227 acpi_os_printf (" Acceptable configuration\n");
228 break;
229
230 case ACPI_SUB_OPTIMAL_CONFIGURATION:
231 acpi_os_printf (" Sub-optimal configuration\n");
232 break;
233
234 default:
235 acpi_os_printf (" Invalid performance "
236 "robustness preference\n");
237 break;
238 }
239
240 return;
241}
242
243
244/*******************************************************************************
245 *
246 * FUNCTION: acpi_rs_dump_io
247 *
248 * PARAMETERS: Data - pointer to the resource structure to dump.
249 *
250 * RETURN: None
251 *
252 * DESCRIPTION: Prints out the various members of the Data structure type.
253 *
254 ******************************************************************************/
255
256void
257acpi_rs_dump_io (
258 union acpi_resource_data *data)
259{
260 struct acpi_resource_io *io_data = (struct acpi_resource_io *) data;
261
262
263 ACPI_FUNCTION_ENTRY ();
264
265
266 acpi_os_printf ("Io Resource\n");
267
268 acpi_os_printf (" %d bit decode\n",
269 ACPI_DECODE_16 == io_data->io_decode ? 16 : 10);
270
271 acpi_os_printf (" Range minimum base: %08X\n",
272 io_data->min_base_address);
273
274 acpi_os_printf (" Range maximum base: %08X\n",
275 io_data->max_base_address);
276
277 acpi_os_printf (" Alignment: %08X\n",
278 io_data->alignment);
279
280 acpi_os_printf (" Range Length: %08X\n",
281 io_data->range_length);
282
283 return;
284}
285
286
287/*******************************************************************************
288 *
289 * FUNCTION: acpi_rs_dump_fixed_io
290 *
291 * PARAMETERS: Data - pointer to the resource structure to dump.
292 *
293 * RETURN: None
294 *
295 * DESCRIPTION: Prints out the various members of the Data structure type.
296 *
297 ******************************************************************************/
298
299void
300acpi_rs_dump_fixed_io (
301 union acpi_resource_data *data)
302{
303 struct acpi_resource_fixed_io *fixed_io_data = (struct acpi_resource_fixed_io *) data;
304
305
306 ACPI_FUNCTION_ENTRY ();
307
308
309 acpi_os_printf ("Fixed Io Resource\n");
310 acpi_os_printf (" Range base address: %08X",
311 fixed_io_data->base_address);
312
313 acpi_os_printf (" Range length: %08X",
314 fixed_io_data->range_length);
315
316 return;
317}
318
319
320/*******************************************************************************
321 *
322 * FUNCTION: acpi_rs_dump_vendor_specific
323 *
324 * PARAMETERS: Data - pointer to the resource structure to dump.
325 *
326 * RETURN: None
327 *
328 * DESCRIPTION: Prints out the various members of the Data structure type.
329 *
330 ******************************************************************************/
331
332void
333acpi_rs_dump_vendor_specific (
334 union acpi_resource_data *data)
335{
336 struct acpi_resource_vendor *vendor_data = (struct acpi_resource_vendor *) data;
337 u16 index = 0;
338
339
340 ACPI_FUNCTION_ENTRY ();
341
342
343 acpi_os_printf ("Vendor Specific Resource\n");
344
345 acpi_os_printf (" Length: %08X\n", vendor_data->length);
346
347 for (index = 0; index < vendor_data->length; index++) {
348 acpi_os_printf (" Byte %X: %08X\n",
349 index, vendor_data->reserved[index]);
350 }
351
352 return;
353}
354
355
356/*******************************************************************************
357 *
358 * FUNCTION: acpi_rs_dump_memory24
359 *
360 * PARAMETERS: Data - pointer to the resource structure to dump.
361 *
362 * RETURN: None
363 *
364 * DESCRIPTION: Prints out the various members of the Data structure type.
365 *
366 ******************************************************************************/
367
368void
369acpi_rs_dump_memory24 (
370 union acpi_resource_data *data)
371{
372 struct acpi_resource_mem24 *memory24_data = (struct acpi_resource_mem24 *) data;
373
374
375 ACPI_FUNCTION_ENTRY ();
376
377
378 acpi_os_printf ("24-Bit Memory Range Resource\n");
379
380 acpi_os_printf (" Read%s\n",
381 ACPI_READ_WRITE_MEMORY ==
382 memory24_data->read_write_attribute ?
383 "/Write" : " only");
384
385 acpi_os_printf (" Range minimum base: %08X\n",
386 memory24_data->min_base_address);
387
388 acpi_os_printf (" Range maximum base: %08X\n",
389 memory24_data->max_base_address);
390
391 acpi_os_printf (" Alignment: %08X\n",
392 memory24_data->alignment);
393
394 acpi_os_printf (" Range length: %08X\n",
395 memory24_data->range_length);
396
397 return;
398}
399
400
401/*******************************************************************************
402 *
403 * FUNCTION: acpi_rs_dump_memory32
404 *
405 * PARAMETERS: Data - pointer to the resource structure to dump.
406 *
407 * RETURN: None
408 *
409 * DESCRIPTION: Prints out the various members of the Data structure type.
410 *
411 ******************************************************************************/
412
413void
414acpi_rs_dump_memory32 (
415 union acpi_resource_data *data)
416{
417 struct acpi_resource_mem32 *memory32_data = (struct acpi_resource_mem32 *) data;
418
419
420 ACPI_FUNCTION_ENTRY ();
421
422
423 acpi_os_printf ("32-Bit Memory Range Resource\n");
424
425 acpi_os_printf (" Read%s\n",
426 ACPI_READ_WRITE_MEMORY ==
427 memory32_data->read_write_attribute ?
428 "/Write" : " only");
429
430 acpi_os_printf (" Range minimum base: %08X\n",
431 memory32_data->min_base_address);
432
433 acpi_os_printf (" Range maximum base: %08X\n",
434 memory32_data->max_base_address);
435
436 acpi_os_printf (" Alignment: %08X\n",
437 memory32_data->alignment);
438
439 acpi_os_printf (" Range length: %08X\n",
440 memory32_data->range_length);
441
442 return;
443}
444
445
446/*******************************************************************************
447 *
448 * FUNCTION: acpi_rs_dump_fixed_memory32
449 *
450 * PARAMETERS: Data - pointer to the resource structure to dump.
451 *
452 * RETURN:
453 *
454 * DESCRIPTION: Prints out the various members of the Data structure type.
455 *
456 ******************************************************************************/
457
458void
459acpi_rs_dump_fixed_memory32 (
460 union acpi_resource_data *data)
461{
462 struct acpi_resource_fixed_mem32 *fixed_memory32_data = (struct acpi_resource_fixed_mem32 *) data;
463
464
465 ACPI_FUNCTION_ENTRY ();
466
467
468 acpi_os_printf ("32-Bit Fixed Location Memory Range Resource\n");
469
470 acpi_os_printf (" Read%s\n",
471 ACPI_READ_WRITE_MEMORY ==
472 fixed_memory32_data->read_write_attribute ?
473 "/Write" : " Only");
474
475 acpi_os_printf (" Range base address: %08X\n",
476 fixed_memory32_data->range_base_address);
477
478 acpi_os_printf (" Range length: %08X\n",
479 fixed_memory32_data->range_length);
480
481 return;
482}
483
484
485/*******************************************************************************
486 *
487 * FUNCTION: acpi_rs_dump_address16
488 *
489 * PARAMETERS: Data - pointer to the resource structure to dump.
490 *
491 * RETURN: None
492 *
493 * DESCRIPTION: Prints out the various members of the Data structure type.
494 *
495 ******************************************************************************/
496
497void
498acpi_rs_dump_address16 (
499 union acpi_resource_data *data)
500{
501 struct acpi_resource_address16 *address16_data = (struct acpi_resource_address16 *) data;
502
503
504 ACPI_FUNCTION_ENTRY ();
505
506
507 acpi_os_printf ("16-Bit Address Space Resource\n");
508 acpi_os_printf (" Resource Type: ");
509
510 switch (address16_data->resource_type) {
511 case ACPI_MEMORY_RANGE:
512
513 acpi_os_printf ("Memory Range\n");
514
515 switch (address16_data->attribute.memory.cache_attribute) {
516 case ACPI_NON_CACHEABLE_MEMORY:
517 acpi_os_printf (" Type Specific: "
518 "Noncacheable memory\n");
519 break;
520
521 case ACPI_CACHABLE_MEMORY:
522 acpi_os_printf (" Type Specific: "
523 "Cacheable memory\n");
524 break;
525
526 case ACPI_WRITE_COMBINING_MEMORY:
527 acpi_os_printf (" Type Specific: "
528 "Write-combining memory\n");
529 break;
530
531 case ACPI_PREFETCHABLE_MEMORY:
532 acpi_os_printf (" Type Specific: "
533 "Prefetchable memory\n");
534 break;
535
536 default:
537 acpi_os_printf (" Type Specific: "
538 "Invalid cache attribute\n");
539 break;
540 }
541
542 acpi_os_printf (" Type Specific: Read%s\n",
543 ACPI_READ_WRITE_MEMORY ==
544 address16_data->attribute.memory.read_write_attribute ?
545 "/Write" : " Only");
546 break;
547
548 case ACPI_IO_RANGE:
549
550 acpi_os_printf ("I/O Range\n");
551
552 switch (address16_data->attribute.io.range_attribute) {
553 case ACPI_NON_ISA_ONLY_RANGES:
554 acpi_os_printf (" Type Specific: "
555 "Non-ISA Io Addresses\n");
556 break;
557
558 case ACPI_ISA_ONLY_RANGES:
559 acpi_os_printf (" Type Specific: "
560 "ISA Io Addresses\n");
561 break;
562
563 case ACPI_ENTIRE_RANGE:
564 acpi_os_printf (" Type Specific: "
565 "ISA and non-ISA Io Addresses\n");
566 break;
567
568 default:
569 acpi_os_printf (" Type Specific: "
570 "Invalid range attribute\n");
571 break;
572 }
573
574 acpi_os_printf (" Type Specific: %s Translation\n",
575 ACPI_SPARSE_TRANSLATION ==
576 address16_data->attribute.io.translation_attribute ?
577 "Sparse" : "Dense");
578 break;
579
580 case ACPI_BUS_NUMBER_RANGE:
581
582 acpi_os_printf ("Bus Number Range\n");
583 break;
584
585 default:
586
587 acpi_os_printf ("0x%2.2X\n", address16_data->resource_type);
588 break;
589 }
590
591 acpi_os_printf (" Resource %s\n",
592 ACPI_CONSUMER == address16_data->producer_consumer ?
593 "Consumer" : "Producer");
594
595 acpi_os_printf (" %s decode\n",
596 ACPI_SUB_DECODE == address16_data->decode ?
597 "Subtractive" : "Positive");
598
599 acpi_os_printf (" Min address is %s fixed\n",
600 ACPI_ADDRESS_FIXED == address16_data->min_address_fixed ?
601 "" : "not");
602
603 acpi_os_printf (" Max address is %s fixed\n",
604 ACPI_ADDRESS_FIXED == address16_data->max_address_fixed ?
605 "" : "not");
606
607 acpi_os_printf (" Granularity: %08X\n",
608 address16_data->granularity);
609
610 acpi_os_printf (" Address range min: %08X\n",
611 address16_data->min_address_range);
612
613 acpi_os_printf (" Address range max: %08X\n",
614 address16_data->max_address_range);
615
616 acpi_os_printf (" Address translation offset: %08X\n",
617 address16_data->address_translation_offset);
618
619 acpi_os_printf (" Address Length: %08X\n",
620 address16_data->address_length);
621
622 if (0xFF != address16_data->resource_source.index) {
623 acpi_os_printf (" Resource Source Index: %X\n",
624 address16_data->resource_source.index);
625 acpi_os_printf (" Resource Source: %s\n",
626 address16_data->resource_source.string_ptr);
627 }
628
629 return;
630}
631
632
633/*******************************************************************************
634 *
635 * FUNCTION: acpi_rs_dump_address32
636 *
637 * PARAMETERS: Data - pointer to the resource structure to dump.
638 *
639 * RETURN: None
640 *
641 * DESCRIPTION: Prints out the various members of the Data structure type.
642 *
643 ******************************************************************************/
644
645void
646acpi_rs_dump_address32 (
647 union acpi_resource_data *data)
648{
649 struct acpi_resource_address32 *address32_data = (struct acpi_resource_address32 *) data;
650
651
652 ACPI_FUNCTION_ENTRY ();
653
654
655 acpi_os_printf ("32-Bit Address Space Resource\n");
656
657 switch (address32_data->resource_type) {
658 case ACPI_MEMORY_RANGE:
659
660 acpi_os_printf (" Resource Type: Memory Range\n");
661
662 switch (address32_data->attribute.memory.cache_attribute) {
663 case ACPI_NON_CACHEABLE_MEMORY:
664 acpi_os_printf (" Type Specific: "
665 "Noncacheable memory\n");
666 break;
667
668 case ACPI_CACHABLE_MEMORY:
669 acpi_os_printf (" Type Specific: "
670 "Cacheable memory\n");
671 break;
672
673 case ACPI_WRITE_COMBINING_MEMORY:
674 acpi_os_printf (" Type Specific: "
675 "Write-combining memory\n");
676 break;
677
678 case ACPI_PREFETCHABLE_MEMORY:
679 acpi_os_printf (" Type Specific: "
680 "Prefetchable memory\n");
681 break;
682
683 default:
684 acpi_os_printf (" Type Specific: "
685 "Invalid cache attribute\n");
686 break;
687 }
688
689 acpi_os_printf (" Type Specific: Read%s\n",
690 ACPI_READ_WRITE_MEMORY ==
691 address32_data->attribute.memory.read_write_attribute ?
692 "/Write" : " Only");
693 break;
694
695 case ACPI_IO_RANGE:
696
697 acpi_os_printf (" Resource Type: Io Range\n");
698
699 switch (address32_data->attribute.io.range_attribute) {
700 case ACPI_NON_ISA_ONLY_RANGES:
701 acpi_os_printf (" Type Specific: "
702 "Non-ISA Io Addresses\n");
703 break;
704
705 case ACPI_ISA_ONLY_RANGES:
706 acpi_os_printf (" Type Specific: "
707 "ISA Io Addresses\n");
708 break;
709
710 case ACPI_ENTIRE_RANGE:
711 acpi_os_printf (" Type Specific: "
712 "ISA and non-ISA Io Addresses\n");
713 break;
714
715 default:
716 acpi_os_printf (" Type Specific: "
717 "Invalid Range attribute");
718 break;
719 }
720
721 acpi_os_printf (" Type Specific: %s Translation\n",
722 ACPI_SPARSE_TRANSLATION ==
723 address32_data->attribute.io.translation_attribute ?
724 "Sparse" : "Dense");
725 break;
726
727 case ACPI_BUS_NUMBER_RANGE:
728
729 acpi_os_printf (" Resource Type: Bus Number Range\n");
730 break;
731
732 default:
733
734 acpi_os_printf (" Resource Type: 0x%2.2X\n", address32_data->resource_type);
735 break;
736 }
737
738 acpi_os_printf (" Resource %s\n",
739 ACPI_CONSUMER == address32_data->producer_consumer ?
740 "Consumer" : "Producer");
741
742 acpi_os_printf (" %s decode\n",
743 ACPI_SUB_DECODE == address32_data->decode ?
744 "Subtractive" : "Positive");
745
746 acpi_os_printf (" Min address is %s fixed\n",
747 ACPI_ADDRESS_FIXED == address32_data->min_address_fixed ?
748 "" : "not ");
749
750 acpi_os_printf (" Max address is %s fixed\n",
751 ACPI_ADDRESS_FIXED == address32_data->max_address_fixed ?
752 "" : "not ");
753
754 acpi_os_printf (" Granularity: %08X\n",
755 address32_data->granularity);
756
757 acpi_os_printf (" Address range min: %08X\n",
758 address32_data->min_address_range);
759
760 acpi_os_printf (" Address range max: %08X\n",
761 address32_data->max_address_range);
762
763 acpi_os_printf (" Address translation offset: %08X\n",
764 address32_data->address_translation_offset);
765
766 acpi_os_printf (" Address Length: %08X\n",
767 address32_data->address_length);
768
769 if(0xFF != address32_data->resource_source.index) {
770 acpi_os_printf (" Resource Source Index: %X\n",
771 address32_data->resource_source.index);
772 acpi_os_printf (" Resource Source: %s\n",
773 address32_data->resource_source.string_ptr);
774 }
775
776 return;
777}
778
779
780/*******************************************************************************
781 *
782 * FUNCTION: acpi_rs_dump_address64
783 *
784 * PARAMETERS: Data - pointer to the resource structure to dump.
785 *
786 * RETURN: None
787 *
788 * DESCRIPTION: Prints out the various members of the Data structure type.
789 *
790 ******************************************************************************/
791
792void
793acpi_rs_dump_address64 (
794 union acpi_resource_data *data)
795{
796 struct acpi_resource_address64 *address64_data = (struct acpi_resource_address64 *) data;
797
798
799 ACPI_FUNCTION_ENTRY ();
800
801
802 acpi_os_printf ("64-Bit Address Space Resource\n");
803
804 switch (address64_data->resource_type) {
805 case ACPI_MEMORY_RANGE:
806
807 acpi_os_printf (" Resource Type: Memory Range\n");
808
809 switch (address64_data->attribute.memory.cache_attribute) {
810 case ACPI_NON_CACHEABLE_MEMORY:
811 acpi_os_printf (" Type Specific: "
812 "Noncacheable memory\n");
813 break;
814
815 case ACPI_CACHABLE_MEMORY:
816 acpi_os_printf (" Type Specific: "
817 "Cacheable memory\n");
818 break;
819
820 case ACPI_WRITE_COMBINING_MEMORY:
821 acpi_os_printf (" Type Specific: "
822 "Write-combining memory\n");
823 break;
824
825 case ACPI_PREFETCHABLE_MEMORY:
826 acpi_os_printf (" Type Specific: "
827 "Prefetchable memory\n");
828 break;
829
830 default:
831 acpi_os_printf (" Type Specific: "
832 "Invalid cache attribute\n");
833 break;
834 }
835
836 acpi_os_printf (" Type Specific: Read%s\n",
837 ACPI_READ_WRITE_MEMORY ==
838 address64_data->attribute.memory.read_write_attribute ?
839 "/Write" : " Only");
840 break;
841
842 case ACPI_IO_RANGE:
843
844 acpi_os_printf (" Resource Type: Io Range\n");
845
846 switch (address64_data->attribute.io.range_attribute) {
847 case ACPI_NON_ISA_ONLY_RANGES:
848 acpi_os_printf (" Type Specific: "
849 "Non-ISA Io Addresses\n");
850 break;
851
852 case ACPI_ISA_ONLY_RANGES:
853 acpi_os_printf (" Type Specific: "
854 "ISA Io Addresses\n");
855 break;
856
857 case ACPI_ENTIRE_RANGE:
858 acpi_os_printf (" Type Specific: "
859 "ISA and non-ISA Io Addresses\n");
860 break;
861
862 default:
863 acpi_os_printf (" Type Specific: "
864 "Invalid Range attribute");
865 break;
866 }
867
868 acpi_os_printf (" Type Specific: %s Translation\n",
869 ACPI_SPARSE_TRANSLATION ==
870 address64_data->attribute.io.translation_attribute ?
871 "Sparse" : "Dense");
872 break;
873
874 case ACPI_BUS_NUMBER_RANGE:
875
876 acpi_os_printf (" Resource Type: Bus Number Range\n");
877 break;
878
879 default:
880
881 acpi_os_printf (" Resource Type: 0x%2.2X\n", address64_data->resource_type);
882 break;
883 }
884
885 acpi_os_printf (" Resource %s\n",
886 ACPI_CONSUMER == address64_data->producer_consumer ?
887 "Consumer" : "Producer");
888
889 acpi_os_printf (" %s decode\n",
890 ACPI_SUB_DECODE == address64_data->decode ?
891 "Subtractive" : "Positive");
892
893 acpi_os_printf (" Min address is %s fixed\n",
894 ACPI_ADDRESS_FIXED == address64_data->min_address_fixed ?
895 "" : "not ");
896
897 acpi_os_printf (" Max address is %s fixed\n",
898 ACPI_ADDRESS_FIXED == address64_data->max_address_fixed ?
899 "" : "not ");
900
901 acpi_os_printf (" Granularity: %8.8X%8.8X\n",
902 ACPI_FORMAT_UINT64 (address64_data->granularity));
903
904 acpi_os_printf (" Address range min: %8.8X%8.8X\n",
905 ACPI_FORMAT_UINT64 (address64_data->min_address_range));
906
907 acpi_os_printf (" Address range max: %8.8X%8.8X\n",
908 ACPI_FORMAT_UINT64 (address64_data->max_address_range));
909
910 acpi_os_printf (" Address translation offset: %8.8X%8.8X\n",
911 ACPI_FORMAT_UINT64 (address64_data->address_translation_offset));
912
913 acpi_os_printf (" Address Length: %8.8X%8.8X\n",
914 ACPI_FORMAT_UINT64 (address64_data->address_length));
915
916 acpi_os_printf (" Type Specific Attributes: %8.8X%8.8X\n",
917 ACPI_FORMAT_UINT64 (address64_data->type_specific_attributes));
918
919 if (0xFF != address64_data->resource_source.index) {
920 acpi_os_printf (" Resource Source Index: %X\n",
921 address64_data->resource_source.index);
922 acpi_os_printf (" Resource Source: %s\n",
923 address64_data->resource_source.string_ptr);
924 }
925
926 return;
927}
928
929
930/*******************************************************************************
931 *
932 * FUNCTION: acpi_rs_dump_extended_irq
933 *
934 * PARAMETERS: Data - pointer to the resource structure to dump.
935 *
936 * RETURN: None
937 *
938 * DESCRIPTION: Prints out the various members of the Data structure type.
939 *
940 ******************************************************************************/
941
942void
943acpi_rs_dump_extended_irq (
944 union acpi_resource_data *data)
945{
946 struct acpi_resource_ext_irq *ext_irq_data = (struct acpi_resource_ext_irq *) data;
947 u8 index = 0;
948
949
950 ACPI_FUNCTION_ENTRY ();
951
952
953 acpi_os_printf ("Extended IRQ Resource\n");
954
955 acpi_os_printf (" Resource %s\n",
956 ACPI_CONSUMER == ext_irq_data->producer_consumer ?
957 "Consumer" : "Producer");
958
959 acpi_os_printf (" %s\n",
960 ACPI_LEVEL_SENSITIVE == ext_irq_data->edge_level ?
961 "Level" : "Edge");
962
963 acpi_os_printf (" Active %s\n",
964 ACPI_ACTIVE_LOW == ext_irq_data->active_high_low ?
965 "low" : "high");
966
967 acpi_os_printf (" %s\n",
968 ACPI_SHARED == ext_irq_data->shared_exclusive ?
969 "Shared" : "Exclusive");
970
971 acpi_os_printf (" Interrupts : %X ( ",
972 ext_irq_data->number_of_interrupts);
973
974 for (index = 0; index < ext_irq_data->number_of_interrupts; index++) {
975 acpi_os_printf ("%X ", ext_irq_data->interrupts[index]);
976 }
977
978 acpi_os_printf (")\n");
979
980 if(0xFF != ext_irq_data->resource_source.index) {
981 acpi_os_printf (" Resource Source Index: %X",
982 ext_irq_data->resource_source.index);
983 acpi_os_printf (" Resource Source: %s",
984 ext_irq_data->resource_source.string_ptr);
985 }
986
987 return;
988}
989
990
991/*******************************************************************************
992 *
993 * FUNCTION: acpi_rs_dump_resource_list
994 *
995 * PARAMETERS: Data - pointer to the resource structure to dump.
996 *
997 * RETURN: None
998 *
999 * DESCRIPTION: Dispatches the structure to the correct dump routine.
1000 *
1001 ******************************************************************************/
1002
1003void
1004acpi_rs_dump_resource_list (
1005 struct acpi_resource *resource)
1006{
1007 u8 count = 0;
1008 u8 done = FALSE;
1009
1010
1011 ACPI_FUNCTION_ENTRY ();
1012
1013
1014 if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
1015 while (!done) {
1016 acpi_os_printf ("Resource structure %X.\n", count++);
1017
1018 switch (resource->id) {
1019 case ACPI_RSTYPE_IRQ:
1020 acpi_rs_dump_irq (&resource->data);
1021 break;
1022
1023 case ACPI_RSTYPE_DMA:
1024 acpi_rs_dump_dma (&resource->data);
1025 break;
1026
1027 case ACPI_RSTYPE_START_DPF:
1028 acpi_rs_dump_start_depend_fns (&resource->data);
1029 break;
1030
1031 case ACPI_RSTYPE_END_DPF:
1032 acpi_os_printf ("end_dependent_functions Resource\n");
1033 /* acpi_rs_dump_end_dependent_functions (Resource->Data);*/
1034 break;
1035
1036 case ACPI_RSTYPE_IO:
1037 acpi_rs_dump_io (&resource->data);
1038 break;
1039
1040 case ACPI_RSTYPE_FIXED_IO:
1041 acpi_rs_dump_fixed_io (&resource->data);
1042 break;
1043
1044 case ACPI_RSTYPE_VENDOR:
1045 acpi_rs_dump_vendor_specific (&resource->data);
1046 break;
1047
1048 case ACPI_RSTYPE_END_TAG:
1049 /*rs_dump_end_tag (Resource->Data);*/
1050 acpi_os_printf ("end_tag Resource\n");
1051 done = TRUE;
1052 break;
1053
1054 case ACPI_RSTYPE_MEM24:
1055 acpi_rs_dump_memory24 (&resource->data);
1056 break;
1057
1058 case ACPI_RSTYPE_MEM32:
1059 acpi_rs_dump_memory32 (&resource->data);
1060 break;
1061
1062 case ACPI_RSTYPE_FIXED_MEM32:
1063 acpi_rs_dump_fixed_memory32 (&resource->data);
1064 break;
1065
1066 case ACPI_RSTYPE_ADDRESS16:
1067 acpi_rs_dump_address16 (&resource->data);
1068 break;
1069
1070 case ACPI_RSTYPE_ADDRESS32:
1071 acpi_rs_dump_address32 (&resource->data);
1072 break;
1073
1074 case ACPI_RSTYPE_ADDRESS64:
1075 acpi_rs_dump_address64 (&resource->data);
1076 break;
1077
1078 case ACPI_RSTYPE_EXT_IRQ:
1079 acpi_rs_dump_extended_irq (&resource->data);
1080 break;
1081
1082 default:
1083 acpi_os_printf ("Invalid resource type\n");
1084 break;
1085
1086 }
1087
1088 resource = ACPI_PTR_ADD (struct acpi_resource, resource, resource->length);
1089 }
1090 }
1091
1092 return;
1093}
1094
1095/*******************************************************************************
1096 *
1097 * FUNCTION: acpi_rs_dump_irq_list
1098 *
1099 * PARAMETERS: Data - pointer to the routing table to dump.
1100 *
1101 * RETURN: None
1102 *
1103 * DESCRIPTION: Dispatches the structures to the correct dump routine.
1104 *
1105 ******************************************************************************/
1106
1107void
1108acpi_rs_dump_irq_list (
1109 u8 *route_table)
1110{
1111 u8 *buffer = route_table;
1112 u8 count = 0;
1113 u8 done = FALSE;
1114 struct acpi_pci_routing_table *prt_element;
1115
1116
1117 ACPI_FUNCTION_ENTRY ();
1118
1119
1120 if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
1121 prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
1122
1123 while (!done) {
1124 acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++);
1125
1126 acpi_os_printf (" Address: %8.8X%8.8X\n",
1127 ACPI_FORMAT_UINT64 (prt_element->address));
1128
1129 acpi_os_printf (" Pin: %X\n", prt_element->pin);
1130
1131 acpi_os_printf (" Source: %s\n", prt_element->source);
1132
1133 acpi_os_printf (" source_index: %X\n",
1134 prt_element->source_index);
1135
1136 buffer += prt_element->length;
1137
1138 prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
1139
1140 if(0 == prt_element->length) {
1141 done = TRUE;
1142 }
1143 }
1144 }
1145
1146 return;
1147}
1148
1149#endif
1150