1 /*******************************************************************************
3 * Module Name: rsdump - Functions to display the resource structures.
5 ******************************************************************************/
8 * Copyright (C) 2000 - 2005, R. Byron Moore
11 * Redistribution and use in source and binary forms, with or without
12 * modification, are permitted provided that the following conditions
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.
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.
44 #include <acpi/acpi.h>
45 #include <acpi/acresrc.h>
47 #define _COMPONENT ACPI_RESOURCES
48 ACPI_MODULE_NAME("rsdump")
50 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
51 /* Local prototypes */
52 static void acpi_rs_dump_irq(union acpi_resource_data
*data
);
54 static void acpi_rs_dump_address16(union acpi_resource_data
*data
);
56 static void acpi_rs_dump_address32(union acpi_resource_data
*data
);
58 static void acpi_rs_dump_address64(union acpi_resource_data
*data
);
60 static void acpi_rs_dump_dma(union acpi_resource_data
*data
);
62 static void acpi_rs_dump_io(union acpi_resource_data
*data
);
64 static void acpi_rs_dump_extended_irq(union acpi_resource_data
*data
);
66 static void acpi_rs_dump_fixed_io(union acpi_resource_data
*data
);
68 static void acpi_rs_dump_fixed_memory32(union acpi_resource_data
*data
);
70 static void acpi_rs_dump_memory24(union acpi_resource_data
*data
);
72 static void acpi_rs_dump_memory32(union acpi_resource_data
*data
);
74 static void acpi_rs_dump_start_depend_fns(union acpi_resource_data
*data
);
76 static void acpi_rs_dump_vendor_specific(union acpi_resource_data
*data
);
78 /*******************************************************************************
80 * FUNCTION: acpi_rs_dump_irq
82 * PARAMETERS: Data - pointer to the resource structure to dump.
86 * DESCRIPTION: Prints out the various members of the Data structure type.
88 ******************************************************************************/
90 static void acpi_rs_dump_irq(union acpi_resource_data
*data
)
92 struct acpi_resource_irq
*irq_data
= (struct acpi_resource_irq
*)data
;
95 ACPI_FUNCTION_ENTRY();
97 acpi_os_printf("IRQ Resource\n");
99 acpi_os_printf(" %s Triggered\n",
100 ACPI_LEVEL_SENSITIVE
==
101 irq_data
->edge_level
? "Level" : "Edge");
103 acpi_os_printf(" Active %s\n",
105 irq_data
->active_high_low
? "Low" : "High");
107 acpi_os_printf(" %s\n",
109 irq_data
->shared_exclusive
? "Shared" : "Exclusive");
111 acpi_os_printf(" %X Interrupts ( ", irq_data
->number_of_interrupts
);
113 for (index
= 0; index
< irq_data
->number_of_interrupts
; index
++) {
114 acpi_os_printf("%X ", irq_data
->interrupts
[index
]);
117 acpi_os_printf(")\n");
121 /*******************************************************************************
123 * FUNCTION: acpi_rs_dump_dma
125 * PARAMETERS: Data - pointer to the resource structure to dump.
129 * DESCRIPTION: Prints out the various members of the Data structure type.
131 ******************************************************************************/
133 static void acpi_rs_dump_dma(union acpi_resource_data
*data
)
135 struct acpi_resource_dma
*dma_data
= (struct acpi_resource_dma
*)data
;
138 ACPI_FUNCTION_ENTRY();
140 acpi_os_printf("DMA Resource\n");
142 switch (dma_data
->type
) {
143 case ACPI_COMPATIBILITY
:
144 acpi_os_printf(" Compatibility mode\n");
148 acpi_os_printf(" Type A\n");
152 acpi_os_printf(" Type B\n");
156 acpi_os_printf(" Type F\n");
160 acpi_os_printf(" Invalid DMA type\n");
164 acpi_os_printf(" %sBus Master\n",
165 ACPI_BUS_MASTER
== dma_data
->bus_master
? "" : "Not a ");
167 switch (dma_data
->transfer
) {
168 case ACPI_TRANSFER_8
:
169 acpi_os_printf(" 8-bit only transfer\n");
172 case ACPI_TRANSFER_8_16
:
173 acpi_os_printf(" 8 and 16-bit transfer\n");
176 case ACPI_TRANSFER_16
:
177 acpi_os_printf(" 16 bit only transfer\n");
181 acpi_os_printf(" Invalid transfer preference\n");
185 acpi_os_printf(" Number of Channels: %X ( ",
186 dma_data
->number_of_channels
);
188 for (index
= 0; index
< dma_data
->number_of_channels
; index
++) {
189 acpi_os_printf("%X ", dma_data
->channels
[index
]);
192 acpi_os_printf(")\n");
196 /*******************************************************************************
198 * FUNCTION: acpi_rs_dump_start_depend_fns
200 * PARAMETERS: Data - pointer to the resource structure to dump.
204 * DESCRIPTION: Prints out the various members of the Data structure type.
206 ******************************************************************************/
208 static void acpi_rs_dump_start_depend_fns(union acpi_resource_data
*data
)
210 struct acpi_resource_start_dpf
*sdf_data
=
211 (struct acpi_resource_start_dpf
*)data
;
213 ACPI_FUNCTION_ENTRY();
215 acpi_os_printf("Start Dependent Functions Resource\n");
217 switch (sdf_data
->compatibility_priority
) {
218 case ACPI_GOOD_CONFIGURATION
:
219 acpi_os_printf(" Good configuration\n");
222 case ACPI_ACCEPTABLE_CONFIGURATION
:
223 acpi_os_printf(" Acceptable configuration\n");
226 case ACPI_SUB_OPTIMAL_CONFIGURATION
:
227 acpi_os_printf(" Sub-optimal configuration\n");
231 acpi_os_printf(" Invalid compatibility priority\n");
235 switch (sdf_data
->performance_robustness
) {
236 case ACPI_GOOD_CONFIGURATION
:
237 acpi_os_printf(" Good configuration\n");
240 case ACPI_ACCEPTABLE_CONFIGURATION
:
241 acpi_os_printf(" Acceptable configuration\n");
244 case ACPI_SUB_OPTIMAL_CONFIGURATION
:
245 acpi_os_printf(" Sub-optimal configuration\n");
249 acpi_os_printf(" Invalid performance robustness preference\n");
256 /*******************************************************************************
258 * FUNCTION: acpi_rs_dump_io
260 * PARAMETERS: Data - pointer to the resource structure to dump.
264 * DESCRIPTION: Prints out the various members of the Data structure type.
266 ******************************************************************************/
268 static void acpi_rs_dump_io(union acpi_resource_data
*data
)
270 struct acpi_resource_io
*io_data
= (struct acpi_resource_io
*)data
;
272 ACPI_FUNCTION_ENTRY();
274 acpi_os_printf("Io Resource\n");
276 acpi_os_printf(" %d bit decode\n",
277 ACPI_DECODE_16
== io_data
->io_decode
? 16 : 10);
279 acpi_os_printf(" Range minimum base: %08X\n",
280 io_data
->min_base_address
);
282 acpi_os_printf(" Range maximum base: %08X\n",
283 io_data
->max_base_address
);
285 acpi_os_printf(" Alignment: %08X\n", io_data
->alignment
);
287 acpi_os_printf(" Range Length: %08X\n", io_data
->range_length
);
292 /*******************************************************************************
294 * FUNCTION: acpi_rs_dump_fixed_io
296 * PARAMETERS: Data - pointer to the resource structure to dump.
300 * DESCRIPTION: Prints out the various members of the Data structure type.
302 ******************************************************************************/
304 static void acpi_rs_dump_fixed_io(union acpi_resource_data
*data
)
306 struct acpi_resource_fixed_io
*fixed_io_data
=
307 (struct acpi_resource_fixed_io
*)data
;
309 ACPI_FUNCTION_ENTRY();
311 acpi_os_printf("Fixed Io Resource\n");
312 acpi_os_printf(" Range base address: %08X",
313 fixed_io_data
->base_address
);
315 acpi_os_printf(" Range length: %08X", fixed_io_data
->range_length
);
320 /*******************************************************************************
322 * FUNCTION: acpi_rs_dump_vendor_specific
324 * PARAMETERS: Data - pointer to the resource structure to dump.
328 * DESCRIPTION: Prints out the various members of the Data structure type.
330 ******************************************************************************/
332 static void acpi_rs_dump_vendor_specific(union acpi_resource_data
*data
)
334 struct acpi_resource_vendor
*vendor_data
=
335 (struct acpi_resource_vendor
*)data
;
338 ACPI_FUNCTION_ENTRY();
340 acpi_os_printf("Vendor Specific Resource\n");
342 acpi_os_printf(" Length: %08X\n", vendor_data
->length
);
344 for (index
= 0; index
< vendor_data
->length
; index
++) {
345 acpi_os_printf(" Byte %X: %08X\n",
346 index
, vendor_data
->reserved
[index
]);
352 /*******************************************************************************
354 * FUNCTION: acpi_rs_dump_memory24
356 * PARAMETERS: Data - pointer to the resource structure to dump.
360 * DESCRIPTION: Prints out the various members of the Data structure type.
362 ******************************************************************************/
364 static void acpi_rs_dump_memory24(union acpi_resource_data
*data
)
366 struct acpi_resource_mem24
*memory24_data
=
367 (struct acpi_resource_mem24
*)data
;
369 ACPI_FUNCTION_ENTRY();
371 acpi_os_printf("24-Bit Memory Range Resource\n");
373 acpi_os_printf(" Read%s\n",
374 ACPI_READ_WRITE_MEMORY
==
375 memory24_data
->read_write_attribute
?
378 acpi_os_printf(" Range minimum base: %08X\n",
379 memory24_data
->min_base_address
);
381 acpi_os_printf(" Range maximum base: %08X\n",
382 memory24_data
->max_base_address
);
384 acpi_os_printf(" Alignment: %08X\n", memory24_data
->alignment
);
386 acpi_os_printf(" Range length: %08X\n", memory24_data
->range_length
);
391 /*******************************************************************************
393 * FUNCTION: acpi_rs_dump_memory32
395 * PARAMETERS: Data - pointer to the resource structure to dump.
399 * DESCRIPTION: Prints out the various members of the Data structure type.
401 ******************************************************************************/
403 static void acpi_rs_dump_memory32(union acpi_resource_data
*data
)
405 struct acpi_resource_mem32
*memory32_data
=
406 (struct acpi_resource_mem32
*)data
;
408 ACPI_FUNCTION_ENTRY();
410 acpi_os_printf("32-Bit Memory Range Resource\n");
412 acpi_os_printf(" Read%s\n",
413 ACPI_READ_WRITE_MEMORY
==
414 memory32_data
->read_write_attribute
?
417 acpi_os_printf(" Range minimum base: %08X\n",
418 memory32_data
->min_base_address
);
420 acpi_os_printf(" Range maximum base: %08X\n",
421 memory32_data
->max_base_address
);
423 acpi_os_printf(" Alignment: %08X\n", memory32_data
->alignment
);
425 acpi_os_printf(" Range length: %08X\n", memory32_data
->range_length
);
430 /*******************************************************************************
432 * FUNCTION: acpi_rs_dump_fixed_memory32
434 * PARAMETERS: Data - pointer to the resource structure to dump.
438 * DESCRIPTION: Prints out the various members of the Data structure type.
440 ******************************************************************************/
442 static void acpi_rs_dump_fixed_memory32(union acpi_resource_data
*data
)
444 struct acpi_resource_fixed_mem32
*fixed_memory32_data
=
445 (struct acpi_resource_fixed_mem32
*)data
;
447 ACPI_FUNCTION_ENTRY();
449 acpi_os_printf("32-Bit Fixed Location Memory Range Resource\n");
451 acpi_os_printf(" Read%s\n",
452 ACPI_READ_WRITE_MEMORY
==
453 fixed_memory32_data
->
454 read_write_attribute
? "/Write" : " Only");
456 acpi_os_printf(" Range base address: %08X\n",
457 fixed_memory32_data
->range_base_address
);
459 acpi_os_printf(" Range length: %08X\n",
460 fixed_memory32_data
->range_length
);
465 /*******************************************************************************
467 * FUNCTION: acpi_rs_dump_address16
469 * PARAMETERS: Data - pointer to the resource structure to dump.
473 * DESCRIPTION: Prints out the various members of the Data structure type.
475 ******************************************************************************/
477 static void acpi_rs_dump_address16(union acpi_resource_data
*data
)
479 struct acpi_resource_address16
*address16_data
=
480 (struct acpi_resource_address16
*)data
;
482 ACPI_FUNCTION_ENTRY();
484 acpi_os_printf("16-Bit Address Space Resource\n");
485 acpi_os_printf(" Resource Type: ");
487 switch (address16_data
->resource_type
) {
488 case ACPI_MEMORY_RANGE
:
490 acpi_os_printf("Memory Range\n");
492 switch (address16_data
->attribute
.memory
.cache_attribute
) {
493 case ACPI_NON_CACHEABLE_MEMORY
:
495 (" Type Specific: Noncacheable memory\n");
498 case ACPI_CACHABLE_MEMORY
:
499 acpi_os_printf(" Type Specific: Cacheable memory\n");
502 case ACPI_WRITE_COMBINING_MEMORY
:
504 (" Type Specific: Write-combining memory\n");
507 case ACPI_PREFETCHABLE_MEMORY
:
509 (" Type Specific: Prefetchable memory\n");
514 (" Type Specific: Invalid cache attribute\n");
518 acpi_os_printf(" Type Specific: Read%s\n",
519 ACPI_READ_WRITE_MEMORY
==
520 address16_data
->attribute
.memory
.
521 read_write_attribute
? "/Write" : " Only");
526 acpi_os_printf("I/O Range\n");
528 switch (address16_data
->attribute
.io
.range_attribute
) {
529 case ACPI_NON_ISA_ONLY_RANGES
:
531 (" Type Specific: Non-ISA Io Addresses\n");
534 case ACPI_ISA_ONLY_RANGES
:
535 acpi_os_printf(" Type Specific: ISA Io Addresses\n");
538 case ACPI_ENTIRE_RANGE
:
540 (" Type Specific: ISA and non-ISA Io Addresses\n");
545 (" Type Specific: Invalid range attribute\n");
549 acpi_os_printf(" Type Specific: %s Translation\n",
550 ACPI_SPARSE_TRANSLATION
==
551 address16_data
->attribute
.io
.
552 translation_attribute
? "Sparse" : "Dense");
555 case ACPI_BUS_NUMBER_RANGE
:
557 acpi_os_printf("Bus Number Range\n");
562 acpi_os_printf("0x%2.2X\n", address16_data
->resource_type
);
566 acpi_os_printf(" Resource %s\n",
567 ACPI_CONSUMER
== address16_data
->producer_consumer
?
568 "Consumer" : "Producer");
570 acpi_os_printf(" %s decode\n",
571 ACPI_SUB_DECODE
== address16_data
->decode
?
572 "Subtractive" : "Positive");
574 acpi_os_printf(" Min address is %s fixed\n",
575 ACPI_ADDRESS_FIXED
== address16_data
->min_address_fixed
?
578 acpi_os_printf(" Max address is %s fixed\n",
579 ACPI_ADDRESS_FIXED
== address16_data
->max_address_fixed
?
582 acpi_os_printf(" Granularity: %08X\n", address16_data
->granularity
);
584 acpi_os_printf(" Address range min: %08X\n",
585 address16_data
->min_address_range
);
587 acpi_os_printf(" Address range max: %08X\n",
588 address16_data
->max_address_range
);
590 acpi_os_printf(" Address translation offset: %08X\n",
591 address16_data
->address_translation_offset
);
593 acpi_os_printf(" Address Length: %08X\n",
594 address16_data
->address_length
);
596 if (0xFF != address16_data
->resource_source
.index
) {
597 acpi_os_printf(" Resource Source Index: %X\n",
598 address16_data
->resource_source
.index
);
600 acpi_os_printf(" Resource Source: %s\n",
601 address16_data
->resource_source
.string_ptr
);
607 /*******************************************************************************
609 * FUNCTION: acpi_rs_dump_address32
611 * PARAMETERS: Data - pointer to the resource structure to dump.
615 * DESCRIPTION: Prints out the various members of the Data structure type.
617 ******************************************************************************/
619 static void acpi_rs_dump_address32(union acpi_resource_data
*data
)
621 struct acpi_resource_address32
*address32_data
=
622 (struct acpi_resource_address32
*)data
;
624 ACPI_FUNCTION_ENTRY();
626 acpi_os_printf("32-Bit Address Space Resource\n");
628 switch (address32_data
->resource_type
) {
629 case ACPI_MEMORY_RANGE
:
631 acpi_os_printf(" Resource Type: Memory Range\n");
633 switch (address32_data
->attribute
.memory
.cache_attribute
) {
634 case ACPI_NON_CACHEABLE_MEMORY
:
636 (" Type Specific: Noncacheable memory\n");
639 case ACPI_CACHABLE_MEMORY
:
640 acpi_os_printf(" Type Specific: Cacheable memory\n");
643 case ACPI_WRITE_COMBINING_MEMORY
:
645 (" Type Specific: Write-combining memory\n");
648 case ACPI_PREFETCHABLE_MEMORY
:
650 (" Type Specific: Prefetchable memory\n");
655 (" Type Specific: Invalid cache attribute\n");
659 acpi_os_printf(" Type Specific: Read%s\n",
660 ACPI_READ_WRITE_MEMORY
==
661 address32_data
->attribute
.memory
.
662 read_write_attribute
? "/Write" : " Only");
667 acpi_os_printf(" Resource Type: Io Range\n");
669 switch (address32_data
->attribute
.io
.range_attribute
) {
670 case ACPI_NON_ISA_ONLY_RANGES
:
672 (" Type Specific: Non-ISA Io Addresses\n");
675 case ACPI_ISA_ONLY_RANGES
:
676 acpi_os_printf(" Type Specific: ISA Io Addresses\n");
679 case ACPI_ENTIRE_RANGE
:
681 (" Type Specific: ISA and non-ISA Io Addresses\n");
686 (" Type Specific: Invalid Range attribute");
690 acpi_os_printf(" Type Specific: %s Translation\n",
691 ACPI_SPARSE_TRANSLATION
==
692 address32_data
->attribute
.io
.
693 translation_attribute
? "Sparse" : "Dense");
696 case ACPI_BUS_NUMBER_RANGE
:
698 acpi_os_printf(" Resource Type: Bus Number Range\n");
703 acpi_os_printf(" Resource Type: 0x%2.2X\n",
704 address32_data
->resource_type
);
708 acpi_os_printf(" Resource %s\n",
709 ACPI_CONSUMER
== address32_data
->producer_consumer
?
710 "Consumer" : "Producer");
712 acpi_os_printf(" %s decode\n",
713 ACPI_SUB_DECODE
== address32_data
->decode
?
714 "Subtractive" : "Positive");
716 acpi_os_printf(" Min address is %s fixed\n",
717 ACPI_ADDRESS_FIXED
== address32_data
->min_address_fixed
?
720 acpi_os_printf(" Max address is %s fixed\n",
721 ACPI_ADDRESS_FIXED
== address32_data
->max_address_fixed
?
724 acpi_os_printf(" Granularity: %08X\n", address32_data
->granularity
);
726 acpi_os_printf(" Address range min: %08X\n",
727 address32_data
->min_address_range
);
729 acpi_os_printf(" Address range max: %08X\n",
730 address32_data
->max_address_range
);
732 acpi_os_printf(" Address translation offset: %08X\n",
733 address32_data
->address_translation_offset
);
735 acpi_os_printf(" Address Length: %08X\n",
736 address32_data
->address_length
);
738 if (0xFF != address32_data
->resource_source
.index
) {
739 acpi_os_printf(" Resource Source Index: %X\n",
740 address32_data
->resource_source
.index
);
742 acpi_os_printf(" Resource Source: %s\n",
743 address32_data
->resource_source
.string_ptr
);
749 /*******************************************************************************
751 * FUNCTION: acpi_rs_dump_address64
753 * PARAMETERS: Data - pointer to the resource structure to dump.
757 * DESCRIPTION: Prints out the various members of the Data structure type.
759 ******************************************************************************/
761 static void acpi_rs_dump_address64(union acpi_resource_data
*data
)
763 struct acpi_resource_address64
*address64_data
=
764 (struct acpi_resource_address64
*)data
;
766 ACPI_FUNCTION_ENTRY();
768 acpi_os_printf("64-Bit Address Space Resource\n");
770 switch (address64_data
->resource_type
) {
771 case ACPI_MEMORY_RANGE
:
773 acpi_os_printf(" Resource Type: Memory Range\n");
775 switch (address64_data
->attribute
.memory
.cache_attribute
) {
776 case ACPI_NON_CACHEABLE_MEMORY
:
778 (" Type Specific: Noncacheable memory\n");
781 case ACPI_CACHABLE_MEMORY
:
782 acpi_os_printf(" Type Specific: Cacheable memory\n");
785 case ACPI_WRITE_COMBINING_MEMORY
:
787 (" Type Specific: Write-combining memory\n");
790 case ACPI_PREFETCHABLE_MEMORY
:
792 (" Type Specific: Prefetchable memory\n");
797 (" Type Specific: Invalid cache attribute\n");
801 acpi_os_printf(" Type Specific: Read%s\n",
802 ACPI_READ_WRITE_MEMORY
==
803 address64_data
->attribute
.memory
.
804 read_write_attribute
? "/Write" : " Only");
809 acpi_os_printf(" Resource Type: Io Range\n");
811 switch (address64_data
->attribute
.io
.range_attribute
) {
812 case ACPI_NON_ISA_ONLY_RANGES
:
814 (" Type Specific: Non-ISA Io Addresses\n");
817 case ACPI_ISA_ONLY_RANGES
:
818 acpi_os_printf(" Type Specific: ISA Io Addresses\n");
821 case ACPI_ENTIRE_RANGE
:
823 (" Type Specific: ISA and non-ISA Io Addresses\n");
828 (" Type Specific: Invalid Range attribute");
832 acpi_os_printf(" Type Specific: %s Translation\n",
833 ACPI_SPARSE_TRANSLATION
==
834 address64_data
->attribute
.io
.
835 translation_attribute
? "Sparse" : "Dense");
838 case ACPI_BUS_NUMBER_RANGE
:
840 acpi_os_printf(" Resource Type: Bus Number Range\n");
845 acpi_os_printf(" Resource Type: 0x%2.2X\n",
846 address64_data
->resource_type
);
850 acpi_os_printf(" Resource %s\n",
851 ACPI_CONSUMER
== address64_data
->producer_consumer
?
852 "Consumer" : "Producer");
854 acpi_os_printf(" %s decode\n",
855 ACPI_SUB_DECODE
== address64_data
->decode
?
856 "Subtractive" : "Positive");
858 acpi_os_printf(" Min address is %s fixed\n",
859 ACPI_ADDRESS_FIXED
== address64_data
->min_address_fixed
?
862 acpi_os_printf(" Max address is %s fixed\n",
863 ACPI_ADDRESS_FIXED
== address64_data
->max_address_fixed
?
866 acpi_os_printf(" Granularity: %8.8X%8.8X\n",
867 ACPI_FORMAT_UINT64(address64_data
->granularity
));
869 acpi_os_printf(" Address range min: %8.8X%8.8X\n",
870 ACPI_FORMAT_UINT64(address64_data
->min_address_range
));
872 acpi_os_printf(" Address range max: %8.8X%8.8X\n",
873 ACPI_FORMAT_UINT64(address64_data
->max_address_range
));
875 acpi_os_printf(" Address translation offset: %8.8X%8.8X\n",
876 ACPI_FORMAT_UINT64(address64_data
->
877 address_translation_offset
));
879 acpi_os_printf(" Address Length: %8.8X%8.8X\n",
880 ACPI_FORMAT_UINT64(address64_data
->address_length
));
882 acpi_os_printf(" Type Specific Attributes: %8.8X%8.8X\n",
883 ACPI_FORMAT_UINT64(address64_data
->
884 type_specific_attributes
));
886 if (0xFF != address64_data
->resource_source
.index
) {
887 acpi_os_printf(" Resource Source Index: %X\n",
888 address64_data
->resource_source
.index
);
890 acpi_os_printf(" Resource Source: %s\n",
891 address64_data
->resource_source
.string_ptr
);
897 /*******************************************************************************
899 * FUNCTION: acpi_rs_dump_extended_irq
901 * PARAMETERS: Data - pointer to the resource structure to dump.
905 * DESCRIPTION: Prints out the various members of the Data structure type.
907 ******************************************************************************/
909 static void acpi_rs_dump_extended_irq(union acpi_resource_data
*data
)
911 struct acpi_resource_ext_irq
*ext_irq_data
=
912 (struct acpi_resource_ext_irq
*)data
;
915 ACPI_FUNCTION_ENTRY();
917 acpi_os_printf("Extended IRQ Resource\n");
919 acpi_os_printf(" Resource %s\n",
920 ACPI_CONSUMER
== ext_irq_data
->producer_consumer
?
921 "Consumer" : "Producer");
923 acpi_os_printf(" %s\n",
924 ACPI_LEVEL_SENSITIVE
== ext_irq_data
->edge_level
?
927 acpi_os_printf(" Active %s\n",
928 ACPI_ACTIVE_LOW
== ext_irq_data
->active_high_low
?
931 acpi_os_printf(" %s\n",
932 ACPI_SHARED
== ext_irq_data
->shared_exclusive
?
933 "Shared" : "Exclusive");
935 acpi_os_printf(" Interrupts : %X ( ",
936 ext_irq_data
->number_of_interrupts
);
938 for (index
= 0; index
< ext_irq_data
->number_of_interrupts
; index
++) {
939 acpi_os_printf("%X ", ext_irq_data
->interrupts
[index
]);
942 acpi_os_printf(")\n");
944 if (0xFF != ext_irq_data
->resource_source
.index
) {
945 acpi_os_printf(" Resource Source Index: %X",
946 ext_irq_data
->resource_source
.index
);
948 acpi_os_printf(" Resource Source: %s",
949 ext_irq_data
->resource_source
.string_ptr
);
955 /*******************************************************************************
957 * FUNCTION: acpi_rs_dump_resource_list
959 * PARAMETERS: Resource - pointer to the resource structure to dump.
963 * DESCRIPTION: Dispatches the structure to the correct dump routine.
965 ******************************************************************************/
967 void acpi_rs_dump_resource_list(struct acpi_resource
*resource
)
972 ACPI_FUNCTION_ENTRY();
974 if (acpi_dbg_level
& ACPI_LV_RESOURCES
&& _COMPONENT
& acpi_dbg_layer
) {
976 acpi_os_printf("Resource structure %X.\n", count
++);
978 switch (resource
->id
) {
979 case ACPI_RSTYPE_IRQ
:
980 acpi_rs_dump_irq(&resource
->data
);
983 case ACPI_RSTYPE_DMA
:
984 acpi_rs_dump_dma(&resource
->data
);
987 case ACPI_RSTYPE_START_DPF
:
988 acpi_rs_dump_start_depend_fns(&resource
->data
);
991 case ACPI_RSTYPE_END_DPF
:
993 ("end_dependent_functions Resource\n");
994 /* acpi_rs_dump_end_dependent_functions (Resource->Data); */
998 acpi_rs_dump_io(&resource
->data
);
1001 case ACPI_RSTYPE_FIXED_IO
:
1002 acpi_rs_dump_fixed_io(&resource
->data
);
1005 case ACPI_RSTYPE_VENDOR
:
1006 acpi_rs_dump_vendor_specific(&resource
->data
);
1009 case ACPI_RSTYPE_END_TAG
:
1010 /*rs_dump_end_tag (Resource->Data); */
1011 acpi_os_printf("end_tag Resource\n");
1015 case ACPI_RSTYPE_MEM24
:
1016 acpi_rs_dump_memory24(&resource
->data
);
1019 case ACPI_RSTYPE_MEM32
:
1020 acpi_rs_dump_memory32(&resource
->data
);
1023 case ACPI_RSTYPE_FIXED_MEM32
:
1024 acpi_rs_dump_fixed_memory32(&resource
->data
);
1027 case ACPI_RSTYPE_ADDRESS16
:
1028 acpi_rs_dump_address16(&resource
->data
);
1031 case ACPI_RSTYPE_ADDRESS32
:
1032 acpi_rs_dump_address32(&resource
->data
);
1035 case ACPI_RSTYPE_ADDRESS64
:
1036 acpi_rs_dump_address64(&resource
->data
);
1039 case ACPI_RSTYPE_EXT_IRQ
:
1040 acpi_rs_dump_extended_irq(&resource
->data
);
1044 acpi_os_printf("Invalid resource type\n");
1050 ACPI_PTR_ADD(struct acpi_resource
, resource
,
1058 /*******************************************************************************
1060 * FUNCTION: acpi_rs_dump_irq_list
1062 * PARAMETERS: route_table - pointer to the routing table to dump.
1066 * DESCRIPTION: Dispatches the structures to the correct dump routine.
1068 ******************************************************************************/
1070 void acpi_rs_dump_irq_list(u8
* route_table
)
1072 u8
*buffer
= route_table
;
1075 struct acpi_pci_routing_table
*prt_element
;
1077 ACPI_FUNCTION_ENTRY();
1079 if (acpi_dbg_level
& ACPI_LV_RESOURCES
&& _COMPONENT
& acpi_dbg_layer
) {
1081 ACPI_CAST_PTR(struct acpi_pci_routing_table
, buffer
);
1084 acpi_os_printf("PCI IRQ Routing Table structure %X.\n",
1087 acpi_os_printf(" Address: %8.8X%8.8X\n",
1088 ACPI_FORMAT_UINT64(prt_element
->
1091 acpi_os_printf(" Pin: %X\n", prt_element
->pin
);
1093 acpi_os_printf(" Source: %s\n", prt_element
->source
);
1095 acpi_os_printf(" source_index: %X\n",
1096 prt_element
->source_index
);
1098 buffer
+= prt_element
->length
;
1100 ACPI_CAST_PTR(struct acpi_pci_routing_table
,
1102 if (0 == prt_element
->length
) {