[PATCH] aic7xxx_osm build fix
[cris-mirror.git] / drivers / acpi / resources / rsdump.c
blobeef1b1f2c685969cf3018e465332b0c09b02f2f6
1 /*******************************************************************************
3 * Module Name: rsdump - Functions to display the resource structures.
5 ******************************************************************************/
7 /*
8 * Copyright (C) 2000 - 2005, R. Byron Moore
9 * All rights reserved.
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.
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.
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.
45 #include <acpi/acpi.h>
46 #include <acpi/acresrc.h>
48 #define _COMPONENT ACPI_RESOURCES
49 ACPI_MODULE_NAME ("rsdump")
52 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
54 /*******************************************************************************
56 * FUNCTION: acpi_rs_dump_irq
58 * PARAMETERS: Data - pointer to the resource structure to dump.
60 * RETURN: None
62 * DESCRIPTION: Prints out the various members of the Data structure type.
64 ******************************************************************************/
66 void
67 acpi_rs_dump_irq (
68 union acpi_resource_data *data)
70 struct acpi_resource_irq *irq_data = (struct acpi_resource_irq *) data;
71 u8 index = 0;
74 ACPI_FUNCTION_ENTRY ();
77 acpi_os_printf ("IRQ Resource\n");
79 acpi_os_printf (" %s Triggered\n",
80 ACPI_LEVEL_SENSITIVE == irq_data->edge_level ? "Level" : "Edge");
82 acpi_os_printf (" Active %s\n",
83 ACPI_ACTIVE_LOW == irq_data->active_high_low ? "Low" : "High");
85 acpi_os_printf (" %s\n",
86 ACPI_SHARED == irq_data->shared_exclusive ? "Shared" : "Exclusive");
88 acpi_os_printf (" %X Interrupts ( ", irq_data->number_of_interrupts);
90 for (index = 0; index < irq_data->number_of_interrupts; index++) {
91 acpi_os_printf ("%X ", irq_data->interrupts[index]);
94 acpi_os_printf (")\n");
95 return;
99 /*******************************************************************************
101 * FUNCTION: acpi_rs_dump_dma
103 * PARAMETERS: Data - pointer to the resource structure to dump.
105 * RETURN: None
107 * DESCRIPTION: Prints out the various members of the Data structure type.
109 ******************************************************************************/
111 void
112 acpi_rs_dump_dma (
113 union acpi_resource_data *data)
115 struct acpi_resource_dma *dma_data = (struct acpi_resource_dma *) data;
116 u8 index = 0;
119 ACPI_FUNCTION_ENTRY ();
122 acpi_os_printf ("DMA Resource\n");
124 switch (dma_data->type) {
125 case ACPI_COMPATIBILITY:
126 acpi_os_printf (" Compatibility mode\n");
127 break;
129 case ACPI_TYPE_A:
130 acpi_os_printf (" Type A\n");
131 break;
133 case ACPI_TYPE_B:
134 acpi_os_printf (" Type B\n");
135 break;
137 case ACPI_TYPE_F:
138 acpi_os_printf (" Type F\n");
139 break;
141 default:
142 acpi_os_printf (" Invalid DMA type\n");
143 break;
146 acpi_os_printf (" %sBus Master\n",
147 ACPI_BUS_MASTER == dma_data->bus_master ? "" : "Not a ");
150 switch (dma_data->transfer) {
151 case ACPI_TRANSFER_8:
152 acpi_os_printf (" 8-bit only transfer\n");
153 break;
155 case ACPI_TRANSFER_8_16:
156 acpi_os_printf (" 8 and 16-bit transfer\n");
157 break;
159 case ACPI_TRANSFER_16:
160 acpi_os_printf (" 16 bit only transfer\n");
161 break;
163 default:
164 acpi_os_printf (" Invalid transfer preference\n");
165 break;
168 acpi_os_printf (" Number of Channels: %X ( ", dma_data->number_of_channels);
170 for (index = 0; index < dma_data->number_of_channels; index++) {
171 acpi_os_printf ("%X ", dma_data->channels[index]);
174 acpi_os_printf (")\n");
175 return;
179 /*******************************************************************************
181 * FUNCTION: acpi_rs_dump_start_depend_fns
183 * PARAMETERS: Data - pointer to the resource structure to dump.
185 * RETURN: None
187 * DESCRIPTION: Prints out the various members of the Data structure type.
189 ******************************************************************************/
191 void
192 acpi_rs_dump_start_depend_fns (
193 union acpi_resource_data *data)
195 struct acpi_resource_start_dpf *sdf_data = (struct acpi_resource_start_dpf *) data;
198 ACPI_FUNCTION_ENTRY ();
201 acpi_os_printf ("Start Dependent Functions Resource\n");
203 switch (sdf_data->compatibility_priority) {
204 case ACPI_GOOD_CONFIGURATION:
205 acpi_os_printf (" Good configuration\n");
206 break;
208 case ACPI_ACCEPTABLE_CONFIGURATION:
209 acpi_os_printf (" Acceptable configuration\n");
210 break;
212 case ACPI_SUB_OPTIMAL_CONFIGURATION:
213 acpi_os_printf (" Sub-optimal configuration\n");
214 break;
216 default:
217 acpi_os_printf (" Invalid compatibility priority\n");
218 break;
221 switch(sdf_data->performance_robustness) {
222 case ACPI_GOOD_CONFIGURATION:
223 acpi_os_printf (" Good configuration\n");
224 break;
226 case ACPI_ACCEPTABLE_CONFIGURATION:
227 acpi_os_printf (" Acceptable configuration\n");
228 break;
230 case ACPI_SUB_OPTIMAL_CONFIGURATION:
231 acpi_os_printf (" Sub-optimal configuration\n");
232 break;
234 default:
235 acpi_os_printf (" Invalid performance "
236 "robustness preference\n");
237 break;
240 return;
244 /*******************************************************************************
246 * FUNCTION: acpi_rs_dump_io
248 * PARAMETERS: Data - pointer to the resource structure to dump.
250 * RETURN: None
252 * DESCRIPTION: Prints out the various members of the Data structure type.
254 ******************************************************************************/
256 void
257 acpi_rs_dump_io (
258 union acpi_resource_data *data)
260 struct acpi_resource_io *io_data = (struct acpi_resource_io *) data;
263 ACPI_FUNCTION_ENTRY ();
266 acpi_os_printf ("Io Resource\n");
268 acpi_os_printf (" %d bit decode\n",
269 ACPI_DECODE_16 == io_data->io_decode ? 16 : 10);
271 acpi_os_printf (" Range minimum base: %08X\n",
272 io_data->min_base_address);
274 acpi_os_printf (" Range maximum base: %08X\n",
275 io_data->max_base_address);
277 acpi_os_printf (" Alignment: %08X\n",
278 io_data->alignment);
280 acpi_os_printf (" Range Length: %08X\n",
281 io_data->range_length);
283 return;
287 /*******************************************************************************
289 * FUNCTION: acpi_rs_dump_fixed_io
291 * PARAMETERS: Data - pointer to the resource structure to dump.
293 * RETURN: None
295 * DESCRIPTION: Prints out the various members of the Data structure type.
297 ******************************************************************************/
299 void
300 acpi_rs_dump_fixed_io (
301 union acpi_resource_data *data)
303 struct acpi_resource_fixed_io *fixed_io_data = (struct acpi_resource_fixed_io *) data;
306 ACPI_FUNCTION_ENTRY ();
309 acpi_os_printf ("Fixed Io Resource\n");
310 acpi_os_printf (" Range base address: %08X",
311 fixed_io_data->base_address);
313 acpi_os_printf (" Range length: %08X",
314 fixed_io_data->range_length);
316 return;
320 /*******************************************************************************
322 * FUNCTION: acpi_rs_dump_vendor_specific
324 * PARAMETERS: Data - pointer to the resource structure to dump.
326 * RETURN: None
328 * DESCRIPTION: Prints out the various members of the Data structure type.
330 ******************************************************************************/
332 void
333 acpi_rs_dump_vendor_specific (
334 union acpi_resource_data *data)
336 struct acpi_resource_vendor *vendor_data = (struct acpi_resource_vendor *) data;
337 u16 index = 0;
340 ACPI_FUNCTION_ENTRY ();
343 acpi_os_printf ("Vendor Specific Resource\n");
345 acpi_os_printf (" Length: %08X\n", vendor_data->length);
347 for (index = 0; index < vendor_data->length; index++) {
348 acpi_os_printf (" Byte %X: %08X\n",
349 index, vendor_data->reserved[index]);
352 return;
356 /*******************************************************************************
358 * FUNCTION: acpi_rs_dump_memory24
360 * PARAMETERS: Data - pointer to the resource structure to dump.
362 * RETURN: None
364 * DESCRIPTION: Prints out the various members of the Data structure type.
366 ******************************************************************************/
368 void
369 acpi_rs_dump_memory24 (
370 union acpi_resource_data *data)
372 struct acpi_resource_mem24 *memory24_data = (struct acpi_resource_mem24 *) data;
375 ACPI_FUNCTION_ENTRY ();
378 acpi_os_printf ("24-Bit Memory Range Resource\n");
380 acpi_os_printf (" Read%s\n",
381 ACPI_READ_WRITE_MEMORY ==
382 memory24_data->read_write_attribute ?
383 "/Write" : " only");
385 acpi_os_printf (" Range minimum base: %08X\n",
386 memory24_data->min_base_address);
388 acpi_os_printf (" Range maximum base: %08X\n",
389 memory24_data->max_base_address);
391 acpi_os_printf (" Alignment: %08X\n",
392 memory24_data->alignment);
394 acpi_os_printf (" Range length: %08X\n",
395 memory24_data->range_length);
397 return;
401 /*******************************************************************************
403 * FUNCTION: acpi_rs_dump_memory32
405 * PARAMETERS: Data - pointer to the resource structure to dump.
407 * RETURN: None
409 * DESCRIPTION: Prints out the various members of the Data structure type.
411 ******************************************************************************/
413 void
414 acpi_rs_dump_memory32 (
415 union acpi_resource_data *data)
417 struct acpi_resource_mem32 *memory32_data = (struct acpi_resource_mem32 *) data;
420 ACPI_FUNCTION_ENTRY ();
423 acpi_os_printf ("32-Bit Memory Range Resource\n");
425 acpi_os_printf (" Read%s\n",
426 ACPI_READ_WRITE_MEMORY ==
427 memory32_data->read_write_attribute ?
428 "/Write" : " only");
430 acpi_os_printf (" Range minimum base: %08X\n",
431 memory32_data->min_base_address);
433 acpi_os_printf (" Range maximum base: %08X\n",
434 memory32_data->max_base_address);
436 acpi_os_printf (" Alignment: %08X\n",
437 memory32_data->alignment);
439 acpi_os_printf (" Range length: %08X\n",
440 memory32_data->range_length);
442 return;
446 /*******************************************************************************
448 * FUNCTION: acpi_rs_dump_fixed_memory32
450 * PARAMETERS: Data - pointer to the resource structure to dump.
452 * RETURN:
454 * DESCRIPTION: Prints out the various members of the Data structure type.
456 ******************************************************************************/
458 void
459 acpi_rs_dump_fixed_memory32 (
460 union acpi_resource_data *data)
462 struct acpi_resource_fixed_mem32 *fixed_memory32_data = (struct acpi_resource_fixed_mem32 *) data;
465 ACPI_FUNCTION_ENTRY ();
468 acpi_os_printf ("32-Bit Fixed Location Memory Range Resource\n");
470 acpi_os_printf (" Read%s\n",
471 ACPI_READ_WRITE_MEMORY ==
472 fixed_memory32_data->read_write_attribute ?
473 "/Write" : " Only");
475 acpi_os_printf (" Range base address: %08X\n",
476 fixed_memory32_data->range_base_address);
478 acpi_os_printf (" Range length: %08X\n",
479 fixed_memory32_data->range_length);
481 return;
485 /*******************************************************************************
487 * FUNCTION: acpi_rs_dump_address16
489 * PARAMETERS: Data - pointer to the resource structure to dump.
491 * RETURN: None
493 * DESCRIPTION: Prints out the various members of the Data structure type.
495 ******************************************************************************/
497 void
498 acpi_rs_dump_address16 (
499 union acpi_resource_data *data)
501 struct acpi_resource_address16 *address16_data = (struct acpi_resource_address16 *) data;
504 ACPI_FUNCTION_ENTRY ();
507 acpi_os_printf ("16-Bit Address Space Resource\n");
508 acpi_os_printf (" Resource Type: ");
510 switch (address16_data->resource_type) {
511 case ACPI_MEMORY_RANGE:
513 acpi_os_printf ("Memory Range\n");
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;
521 case ACPI_CACHABLE_MEMORY:
522 acpi_os_printf (" Type Specific: "
523 "Cacheable memory\n");
524 break;
526 case ACPI_WRITE_COMBINING_MEMORY:
527 acpi_os_printf (" Type Specific: "
528 "Write-combining memory\n");
529 break;
531 case ACPI_PREFETCHABLE_MEMORY:
532 acpi_os_printf (" Type Specific: "
533 "Prefetchable memory\n");
534 break;
536 default:
537 acpi_os_printf (" Type Specific: "
538 "Invalid cache attribute\n");
539 break;
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;
548 case ACPI_IO_RANGE:
550 acpi_os_printf ("I/O Range\n");
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;
558 case ACPI_ISA_ONLY_RANGES:
559 acpi_os_printf (" Type Specific: "
560 "ISA Io Addresses\n");
561 break;
563 case ACPI_ENTIRE_RANGE:
564 acpi_os_printf (" Type Specific: "
565 "ISA and non-ISA Io Addresses\n");
566 break;
568 default:
569 acpi_os_printf (" Type Specific: "
570 "Invalid range attribute\n");
571 break;
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;
580 case ACPI_BUS_NUMBER_RANGE:
582 acpi_os_printf ("Bus Number Range\n");
583 break;
585 default:
587 acpi_os_printf ("0x%2.2X\n", address16_data->resource_type);
588 break;
591 acpi_os_printf (" Resource %s\n",
592 ACPI_CONSUMER == address16_data->producer_consumer ?
593 "Consumer" : "Producer");
595 acpi_os_printf (" %s decode\n",
596 ACPI_SUB_DECODE == address16_data->decode ?
597 "Subtractive" : "Positive");
599 acpi_os_printf (" Min address is %s fixed\n",
600 ACPI_ADDRESS_FIXED == address16_data->min_address_fixed ?
601 "" : "not");
603 acpi_os_printf (" Max address is %s fixed\n",
604 ACPI_ADDRESS_FIXED == address16_data->max_address_fixed ?
605 "" : "not");
607 acpi_os_printf (" Granularity: %08X\n",
608 address16_data->granularity);
610 acpi_os_printf (" Address range min: %08X\n",
611 address16_data->min_address_range);
613 acpi_os_printf (" Address range max: %08X\n",
614 address16_data->max_address_range);
616 acpi_os_printf (" Address translation offset: %08X\n",
617 address16_data->address_translation_offset);
619 acpi_os_printf (" Address Length: %08X\n",
620 address16_data->address_length);
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);
629 return;
633 /*******************************************************************************
635 * FUNCTION: acpi_rs_dump_address32
637 * PARAMETERS: Data - pointer to the resource structure to dump.
639 * RETURN: None
641 * DESCRIPTION: Prints out the various members of the Data structure type.
643 ******************************************************************************/
645 void
646 acpi_rs_dump_address32 (
647 union acpi_resource_data *data)
649 struct acpi_resource_address32 *address32_data = (struct acpi_resource_address32 *) data;
652 ACPI_FUNCTION_ENTRY ();
655 acpi_os_printf ("32-Bit Address Space Resource\n");
657 switch (address32_data->resource_type) {
658 case ACPI_MEMORY_RANGE:
660 acpi_os_printf (" Resource Type: Memory Range\n");
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;
668 case ACPI_CACHABLE_MEMORY:
669 acpi_os_printf (" Type Specific: "
670 "Cacheable memory\n");
671 break;
673 case ACPI_WRITE_COMBINING_MEMORY:
674 acpi_os_printf (" Type Specific: "
675 "Write-combining memory\n");
676 break;
678 case ACPI_PREFETCHABLE_MEMORY:
679 acpi_os_printf (" Type Specific: "
680 "Prefetchable memory\n");
681 break;
683 default:
684 acpi_os_printf (" Type Specific: "
685 "Invalid cache attribute\n");
686 break;
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;
695 case ACPI_IO_RANGE:
697 acpi_os_printf (" Resource Type: Io Range\n");
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;
705 case ACPI_ISA_ONLY_RANGES:
706 acpi_os_printf (" Type Specific: "
707 "ISA Io Addresses\n");
708 break;
710 case ACPI_ENTIRE_RANGE:
711 acpi_os_printf (" Type Specific: "
712 "ISA and non-ISA Io Addresses\n");
713 break;
715 default:
716 acpi_os_printf (" Type Specific: "
717 "Invalid Range attribute");
718 break;
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;
727 case ACPI_BUS_NUMBER_RANGE:
729 acpi_os_printf (" Resource Type: Bus Number Range\n");
730 break;
732 default:
734 acpi_os_printf (" Resource Type: 0x%2.2X\n", address32_data->resource_type);
735 break;
738 acpi_os_printf (" Resource %s\n",
739 ACPI_CONSUMER == address32_data->producer_consumer ?
740 "Consumer" : "Producer");
742 acpi_os_printf (" %s decode\n",
743 ACPI_SUB_DECODE == address32_data->decode ?
744 "Subtractive" : "Positive");
746 acpi_os_printf (" Min address is %s fixed\n",
747 ACPI_ADDRESS_FIXED == address32_data->min_address_fixed ?
748 "" : "not ");
750 acpi_os_printf (" Max address is %s fixed\n",
751 ACPI_ADDRESS_FIXED == address32_data->max_address_fixed ?
752 "" : "not ");
754 acpi_os_printf (" Granularity: %08X\n",
755 address32_data->granularity);
757 acpi_os_printf (" Address range min: %08X\n",
758 address32_data->min_address_range);
760 acpi_os_printf (" Address range max: %08X\n",
761 address32_data->max_address_range);
763 acpi_os_printf (" Address translation offset: %08X\n",
764 address32_data->address_translation_offset);
766 acpi_os_printf (" Address Length: %08X\n",
767 address32_data->address_length);
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);
776 return;
780 /*******************************************************************************
782 * FUNCTION: acpi_rs_dump_address64
784 * PARAMETERS: Data - pointer to the resource structure to dump.
786 * RETURN: None
788 * DESCRIPTION: Prints out the various members of the Data structure type.
790 ******************************************************************************/
792 void
793 acpi_rs_dump_address64 (
794 union acpi_resource_data *data)
796 struct acpi_resource_address64 *address64_data = (struct acpi_resource_address64 *) data;
799 ACPI_FUNCTION_ENTRY ();
802 acpi_os_printf ("64-Bit Address Space Resource\n");
804 switch (address64_data->resource_type) {
805 case ACPI_MEMORY_RANGE:
807 acpi_os_printf (" Resource Type: Memory Range\n");
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;
815 case ACPI_CACHABLE_MEMORY:
816 acpi_os_printf (" Type Specific: "
817 "Cacheable memory\n");
818 break;
820 case ACPI_WRITE_COMBINING_MEMORY:
821 acpi_os_printf (" Type Specific: "
822 "Write-combining memory\n");
823 break;
825 case ACPI_PREFETCHABLE_MEMORY:
826 acpi_os_printf (" Type Specific: "
827 "Prefetchable memory\n");
828 break;
830 default:
831 acpi_os_printf (" Type Specific: "
832 "Invalid cache attribute\n");
833 break;
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;
842 case ACPI_IO_RANGE:
844 acpi_os_printf (" Resource Type: Io Range\n");
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;
852 case ACPI_ISA_ONLY_RANGES:
853 acpi_os_printf (" Type Specific: "
854 "ISA Io Addresses\n");
855 break;
857 case ACPI_ENTIRE_RANGE:
858 acpi_os_printf (" Type Specific: "
859 "ISA and non-ISA Io Addresses\n");
860 break;
862 default:
863 acpi_os_printf (" Type Specific: "
864 "Invalid Range attribute");
865 break;
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;
874 case ACPI_BUS_NUMBER_RANGE:
876 acpi_os_printf (" Resource Type: Bus Number Range\n");
877 break;
879 default:
881 acpi_os_printf (" Resource Type: 0x%2.2X\n", address64_data->resource_type);
882 break;
885 acpi_os_printf (" Resource %s\n",
886 ACPI_CONSUMER == address64_data->producer_consumer ?
887 "Consumer" : "Producer");
889 acpi_os_printf (" %s decode\n",
890 ACPI_SUB_DECODE == address64_data->decode ?
891 "Subtractive" : "Positive");
893 acpi_os_printf (" Min address is %s fixed\n",
894 ACPI_ADDRESS_FIXED == address64_data->min_address_fixed ?
895 "" : "not ");
897 acpi_os_printf (" Max address is %s fixed\n",
898 ACPI_ADDRESS_FIXED == address64_data->max_address_fixed ?
899 "" : "not ");
901 acpi_os_printf (" Granularity: %8.8X%8.8X\n",
902 ACPI_FORMAT_UINT64 (address64_data->granularity));
904 acpi_os_printf (" Address range min: %8.8X%8.8X\n",
905 ACPI_FORMAT_UINT64 (address64_data->min_address_range));
907 acpi_os_printf (" Address range max: %8.8X%8.8X\n",
908 ACPI_FORMAT_UINT64 (address64_data->max_address_range));
910 acpi_os_printf (" Address translation offset: %8.8X%8.8X\n",
911 ACPI_FORMAT_UINT64 (address64_data->address_translation_offset));
913 acpi_os_printf (" Address Length: %8.8X%8.8X\n",
914 ACPI_FORMAT_UINT64 (address64_data->address_length));
916 acpi_os_printf (" Type Specific Attributes: %8.8X%8.8X\n",
917 ACPI_FORMAT_UINT64 (address64_data->type_specific_attributes));
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);
926 return;
930 /*******************************************************************************
932 * FUNCTION: acpi_rs_dump_extended_irq
934 * PARAMETERS: Data - pointer to the resource structure to dump.
936 * RETURN: None
938 * DESCRIPTION: Prints out the various members of the Data structure type.
940 ******************************************************************************/
942 void
943 acpi_rs_dump_extended_irq (
944 union acpi_resource_data *data)
946 struct acpi_resource_ext_irq *ext_irq_data = (struct acpi_resource_ext_irq *) data;
947 u8 index = 0;
950 ACPI_FUNCTION_ENTRY ();
953 acpi_os_printf ("Extended IRQ Resource\n");
955 acpi_os_printf (" Resource %s\n",
956 ACPI_CONSUMER == ext_irq_data->producer_consumer ?
957 "Consumer" : "Producer");
959 acpi_os_printf (" %s\n",
960 ACPI_LEVEL_SENSITIVE == ext_irq_data->edge_level ?
961 "Level" : "Edge");
963 acpi_os_printf (" Active %s\n",
964 ACPI_ACTIVE_LOW == ext_irq_data->active_high_low ?
965 "low" : "high");
967 acpi_os_printf (" %s\n",
968 ACPI_SHARED == ext_irq_data->shared_exclusive ?
969 "Shared" : "Exclusive");
971 acpi_os_printf (" Interrupts : %X ( ",
972 ext_irq_data->number_of_interrupts);
974 for (index = 0; index < ext_irq_data->number_of_interrupts; index++) {
975 acpi_os_printf ("%X ", ext_irq_data->interrupts[index]);
978 acpi_os_printf (")\n");
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);
987 return;
991 /*******************************************************************************
993 * FUNCTION: acpi_rs_dump_resource_list
995 * PARAMETERS: Data - pointer to the resource structure to dump.
997 * RETURN: None
999 * DESCRIPTION: Dispatches the structure to the correct dump routine.
1001 ******************************************************************************/
1003 void
1004 acpi_rs_dump_resource_list (
1005 struct acpi_resource *resource)
1007 u8 count = 0;
1008 u8 done = FALSE;
1011 ACPI_FUNCTION_ENTRY ();
1014 if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
1015 while (!done) {
1016 acpi_os_printf ("Resource structure %X.\n", count++);
1018 switch (resource->id) {
1019 case ACPI_RSTYPE_IRQ:
1020 acpi_rs_dump_irq (&resource->data);
1021 break;
1023 case ACPI_RSTYPE_DMA:
1024 acpi_rs_dump_dma (&resource->data);
1025 break;
1027 case ACPI_RSTYPE_START_DPF:
1028 acpi_rs_dump_start_depend_fns (&resource->data);
1029 break;
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;
1036 case ACPI_RSTYPE_IO:
1037 acpi_rs_dump_io (&resource->data);
1038 break;
1040 case ACPI_RSTYPE_FIXED_IO:
1041 acpi_rs_dump_fixed_io (&resource->data);
1042 break;
1044 case ACPI_RSTYPE_VENDOR:
1045 acpi_rs_dump_vendor_specific (&resource->data);
1046 break;
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;
1054 case ACPI_RSTYPE_MEM24:
1055 acpi_rs_dump_memory24 (&resource->data);
1056 break;
1058 case ACPI_RSTYPE_MEM32:
1059 acpi_rs_dump_memory32 (&resource->data);
1060 break;
1062 case ACPI_RSTYPE_FIXED_MEM32:
1063 acpi_rs_dump_fixed_memory32 (&resource->data);
1064 break;
1066 case ACPI_RSTYPE_ADDRESS16:
1067 acpi_rs_dump_address16 (&resource->data);
1068 break;
1070 case ACPI_RSTYPE_ADDRESS32:
1071 acpi_rs_dump_address32 (&resource->data);
1072 break;
1074 case ACPI_RSTYPE_ADDRESS64:
1075 acpi_rs_dump_address64 (&resource->data);
1076 break;
1078 case ACPI_RSTYPE_EXT_IRQ:
1079 acpi_rs_dump_extended_irq (&resource->data);
1080 break;
1082 default:
1083 acpi_os_printf ("Invalid resource type\n");
1084 break;
1088 resource = ACPI_PTR_ADD (struct acpi_resource, resource, resource->length);
1092 return;
1095 /*******************************************************************************
1097 * FUNCTION: acpi_rs_dump_irq_list
1099 * PARAMETERS: Data - pointer to the routing table to dump.
1101 * RETURN: None
1103 * DESCRIPTION: Dispatches the structures to the correct dump routine.
1105 ******************************************************************************/
1107 void
1108 acpi_rs_dump_irq_list (
1109 u8 *route_table)
1111 u8 *buffer = route_table;
1112 u8 count = 0;
1113 u8 done = FALSE;
1114 struct acpi_pci_routing_table *prt_element;
1117 ACPI_FUNCTION_ENTRY ();
1120 if (acpi_dbg_level & ACPI_LV_RESOURCES && _COMPONENT & acpi_dbg_layer) {
1121 prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
1123 while (!done) {
1124 acpi_os_printf ("PCI IRQ Routing Table structure %X.\n", count++);
1126 acpi_os_printf (" Address: %8.8X%8.8X\n",
1127 ACPI_FORMAT_UINT64 (prt_element->address));
1129 acpi_os_printf (" Pin: %X\n", prt_element->pin);
1131 acpi_os_printf (" Source: %s\n", prt_element->source);
1133 acpi_os_printf (" source_index: %X\n",
1134 prt_element->source_index);
1136 buffer += prt_element->length;
1138 prt_element = ACPI_CAST_PTR (struct acpi_pci_routing_table, buffer);
1140 if(0 == prt_element->length) {
1141 done = TRUE;
1146 return;
1149 #endif