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 *resource);
54 static void acpi_rs_dump_address16(union acpi_resource_data *resource);
56 static void acpi_rs_dump_address32(union acpi_resource_data *resource);
58 static void acpi_rs_dump_address64(union acpi_resource_data *resource);
60 static void acpi_rs_dump_dma(union acpi_resource_data *resource);
62 static void acpi_rs_dump_io(union acpi_resource_data *resource);
64 static void acpi_rs_dump_extended_irq(union acpi_resource_data *resource);
66 static void acpi_rs_dump_fixed_io(union acpi_resource_data *resource);
68 static void acpi_rs_dump_fixed_memory32(union acpi_resource_data *resource);
70 static void acpi_rs_dump_memory24(union acpi_resource_data *resource);
72 static void acpi_rs_dump_memory32(union acpi_resource_data *resource);
74 static void acpi_rs_dump_start_depend_fns(union acpi_resource_data *resource);
76 static void acpi_rs_dump_vendor_specific(union acpi_resource_data *resource);
78 static void acpi_rs_dump_generic_reg(union acpi_resource_data *resource);
80 static void acpi_rs_dump_end_depend_fns(union acpi_resource_data *resource);
82 static void acpi_rs_dump_end_tag(union acpi_resource_data *resource);
84 static void acpi_rs_out_string(char *title, char *value);
86 static void acpi_rs_out_integer8(char *title, u8 value);
88 static void acpi_rs_out_integer16(char *title, u16 value);
90 static void acpi_rs_out_integer32(char *title, u32 value);
92 static void acpi_rs_out_integer64(char *title, u64 value);
94 static void acpi_rs_out_title(char *title);
96 static void acpi_rs_dump_byte_list(u32 length, u8 * data);
98 static void acpi_rs_dump_dword_list(u32 length, u32 * data);
100 static void acpi_rs_dump_short_byte_list(u32 length, u32 * data);
103 acpi_rs_dump_resource_source(struct acpi_resource_source *resource_source);
105 static void acpi_rs_dump_address_common(union acpi_resource_data *resource);
107 /* Dispatch table for resource dump functions */
110 void (*ACPI_DUMP_RESOURCE) (union acpi_resource_data * data);
112 static ACPI_DUMP_RESOURCE acpi_gbl_dump_resource_dispatch[] = {
113 acpi_rs_dump_irq, /* ACPI_RSTYPE_IRQ */
114 acpi_rs_dump_dma, /* ACPI_RSTYPE_DMA */
115 acpi_rs_dump_start_depend_fns, /* ACPI_RSTYPE_START_DPF */
116 acpi_rs_dump_end_depend_fns, /* ACPI_RSTYPE_END_DPF */
117 acpi_rs_dump_io, /* ACPI_RSTYPE_IO */
118 acpi_rs_dump_fixed_io, /* ACPI_RSTYPE_FIXED_IO */
119 acpi_rs_dump_vendor_specific, /* ACPI_RSTYPE_VENDOR */
120 acpi_rs_dump_end_tag, /* ACPI_RSTYPE_END_TAG */
121 acpi_rs_dump_memory24, /* ACPI_RSTYPE_MEM24 */
122 acpi_rs_dump_memory32, /* ACPI_RSTYPE_MEM32 */
123 acpi_rs_dump_fixed_memory32, /* ACPI_RSTYPE_FIXED_MEM32 */
124 acpi_rs_dump_address16, /* ACPI_RSTYPE_ADDRESS16 */
125 acpi_rs_dump_address32, /* ACPI_RSTYPE_ADDRESS32 */
126 acpi_rs_dump_address64, /* ACPI_RSTYPE_ADDRESS64 */
127 acpi_rs_dump_extended_irq, /* ACPI_RSTYPE_EXT_IRQ */
128 acpi_rs_dump_generic_reg /* ACPI_RSTYPE_GENERIC_REG */
131 /*******************************************************************************
133 * FUNCTION: acpi_rs_out*
135 * PARAMETERS: Title - Name of the resource field
136 * Value - Value of the resource field
140 * DESCRIPTION: Miscellaneous helper functions to consistently format the
141 * output of the resource dump routines
143 ******************************************************************************/
145 static void acpi_rs_out_string(char *title, char *value)
147 acpi_os_printf("%30s : %s\n", title, value);
150 static void acpi_rs_out_integer8(char *title, u8 value)
152 acpi_os_printf("%30s : %2.2X\n", title, value);
155 static void acpi_rs_out_integer16(char *title, u16 value)
157 acpi_os_printf("%30s : %4.4X\n", title, value);
160 static void acpi_rs_out_integer32(char *title, u32 value)
162 acpi_os_printf("%30s : %8.8X\n", title, value);
165 static void acpi_rs_out_integer64(char *title, u64 value)
167 acpi_os_printf("%30s : %8.8X%8.8X\n", title, ACPI_FORMAT_UINT64(value));
170 static void acpi_rs_out_title(char *title)
172 acpi_os_printf("%30s : ", title);
175 /*******************************************************************************
177 * FUNCTION: acpi_rs_dump*List
179 * PARAMETERS: Length - Number of elements in the list
180 * Data - Start of the list
184 * DESCRIPTION: Miscellaneous functions to dump lists of raw data
186 ******************************************************************************/
188 static void acpi_rs_dump_byte_list(u32 length, u8 * data)
192 for (i = 0; i < length; i++) {
193 acpi_os_printf("%28s%2.2X : %2.2X\n", "Byte", i, data[i]);
197 static void acpi_rs_dump_dword_list(u32 length, u32 * data)
201 for (i = 0; i < length; i++) {
202 acpi_os_printf("%28s%2.2X : %8.8X\n", "Dword", i, data[i]);
206 static void acpi_rs_dump_short_byte_list(u32 length, u32 * data)
210 for (i = 0; i < length; i++) {
211 acpi_os_printf("%X ", data[i]);
213 acpi_os_printf("\n");
216 /*******************************************************************************
218 * FUNCTION: acpi_rs_dump_resource_source
220 * PARAMETERS: resource_source - Pointer to a Resource Source struct
224 * DESCRIPTION: Common routine for dumping the optional resource_source and the
225 * corresponding resource_source_index.
227 ******************************************************************************/
230 acpi_rs_dump_resource_source(struct acpi_resource_source *resource_source)
233 if (resource_source->index == 0xFF) {
237 acpi_rs_out_integer8("Resource Source Index",
238 (u8) resource_source->index);
240 acpi_rs_out_string("Resource Source",
241 resource_source->string_ptr ?
242 resource_source->string_ptr : "[Not Specified]");
245 /*******************************************************************************
247 * FUNCTION: acpi_rs_dump_address_common
249 * PARAMETERS: Resource - Pointer to an internal resource descriptor
253 * DESCRIPTION: Dump the fields that are common to all Address resource
256 ******************************************************************************/
258 static void acpi_rs_dump_address_common(union acpi_resource_data *resource)
260 ACPI_FUNCTION_ENTRY();
262 /* Decode the type-specific flags */
264 switch (resource->address.resource_type) {
265 case ACPI_MEMORY_RANGE:
267 acpi_rs_out_string("Resource Type", "Memory Range");
269 acpi_rs_out_title("Type-Specific Flags");
271 switch (resource->address.attribute.memory.cache_attribute) {
272 case ACPI_NON_CACHEABLE_MEMORY:
273 acpi_os_printf("Noncacheable memory\n");
276 case ACPI_CACHABLE_MEMORY:
277 acpi_os_printf("Cacheable memory\n");
280 case ACPI_WRITE_COMBINING_MEMORY:
281 acpi_os_printf("Write-combining memory\n");
284 case ACPI_PREFETCHABLE_MEMORY:
285 acpi_os_printf("Prefetchable memory\n");
289 acpi_os_printf("Invalid cache attribute\n");
293 acpi_rs_out_string("Read/Write Attribute",
294 ACPI_READ_WRITE_MEMORY ==
295 resource->address.attribute.memory.
296 read_write_attribute ? "Read/Write" :
302 acpi_rs_out_string("Resource Type", "I/O Range");
304 acpi_rs_out_title("Type-Specific Flags");
306 switch (resource->address.attribute.io.range_attribute) {
307 case ACPI_NON_ISA_ONLY_RANGES:
308 acpi_os_printf("Non-ISA I/O Addresses\n");
311 case ACPI_ISA_ONLY_RANGES:
312 acpi_os_printf("ISA I/O Addresses\n");
315 case ACPI_ENTIRE_RANGE:
316 acpi_os_printf("ISA and non-ISA I/O Addresses\n");
320 acpi_os_printf("Invalid range attribute\n");
324 acpi_rs_out_string("Translation Attribute",
325 ACPI_SPARSE_TRANSLATION ==
326 resource->address.attribute.io.
327 translation_attribute ? "Sparse Translation"
328 : "Dense Translation");
331 case ACPI_BUS_NUMBER_RANGE:
333 acpi_rs_out_string("Resource Type", "Bus Number Range");
338 acpi_rs_out_integer8("Resource Type",
339 (u8) resource->address.resource_type);
343 /* Decode the general flags */
345 acpi_rs_out_string("Resource",
348 producer_consumer ? "Consumer" : "Producer");
350 acpi_rs_out_string("Decode",
351 ACPI_SUB_DECODE == resource->address.decode ?
352 "Subtractive" : "Positive");
354 acpi_rs_out_string("Min Address",
355 ACPI_ADDRESS_FIXED ==
357 min_address_fixed ? "Fixed" : "Not Fixed");
359 acpi_rs_out_string("Max Address",
360 ACPI_ADDRESS_FIXED ==
362 max_address_fixed ? "Fixed" : "Not Fixed");
365 /*******************************************************************************
367 * FUNCTION: acpi_rs_dump_resource_list
369 * PARAMETERS: resource_list - Pointer to a resource descriptor list
373 * DESCRIPTION: Dispatches the structure to the correct dump routine.
375 ******************************************************************************/
377 void acpi_rs_dump_resource_list(struct acpi_resource *resource_list)
381 ACPI_FUNCTION_ENTRY();
383 if (!(acpi_dbg_level & ACPI_LV_RESOURCES)
384 || !(_COMPONENT & acpi_dbg_layer)) {
388 /* Dump all resource descriptors in the list */
390 while (resource_list) {
391 acpi_os_printf("\n[%02X] ", count);
393 /* Validate Type before dispatch */
395 if (resource_list->type > ACPI_RSTYPE_MAX) {
397 ("Invalid descriptor type (%X) in resource list\n",
398 resource_list->type);
402 /* Dump the resource descriptor */
404 acpi_gbl_dump_resource_dispatch[resource_list->
405 type] (&resource_list->data);
407 /* Exit on end tag */
409 if (resource_list->type == ACPI_RSTYPE_END_TAG) {
413 /* Get the next resource structure */
416 ACPI_PTR_ADD(struct acpi_resource, resource_list,
417 resource_list->length);
422 /*******************************************************************************
424 * FUNCTION: acpi_rs_dump_irq
426 * PARAMETERS: Resource - Pointer to an internal resource descriptor
430 * DESCRIPTION: Dump the field names and values of the resource descriptor
432 ******************************************************************************/
434 static void acpi_rs_dump_irq(union acpi_resource_data *resource)
436 ACPI_FUNCTION_ENTRY();
438 acpi_os_printf("IRQ Resource\n");
440 acpi_rs_out_string("Triggering",
441 ACPI_LEVEL_SENSITIVE ==
442 resource->irq.edge_level ? "Level" : "Edge");
444 acpi_rs_out_string("Active",
446 resource->irq.active_high_low ? "Low" : "High");
448 acpi_rs_out_string("Sharing",
451 shared_exclusive ? "Shared" : "Exclusive");
453 acpi_rs_out_integer8("Interrupt Count",
454 (u8) resource->irq.number_of_interrupts);
456 acpi_rs_out_title("Interrupt List");
457 acpi_rs_dump_short_byte_list(resource->irq.number_of_interrupts,
458 resource->irq.interrupts);
461 /*******************************************************************************
463 * FUNCTION: acpi_rs_dump_dma
465 * PARAMETERS: Resource - Pointer to an internal resource descriptor
469 * DESCRIPTION: Dump the field names and values of the resource descriptor
471 ******************************************************************************/
473 static void acpi_rs_dump_dma(union acpi_resource_data *resource)
475 ACPI_FUNCTION_ENTRY();
477 acpi_os_printf("DMA Resource\n");
479 acpi_rs_out_title("DMA Type");
480 switch (resource->dma.type) {
481 case ACPI_COMPATIBILITY:
482 acpi_os_printf("Compatibility mode\n");
486 acpi_os_printf("Type A\n");
490 acpi_os_printf("Type B\n");
494 acpi_os_printf("Type F\n");
498 acpi_os_printf("**** Invalid DMA type\n");
502 acpi_rs_out_string("Bus Master",
504 resource->dma.bus_master ? "Yes" : "No");
506 acpi_rs_out_title("Transfer Type");
507 switch (resource->dma.transfer) {
508 case ACPI_TRANSFER_8:
509 acpi_os_printf("8-bit transfers only\n");
512 case ACPI_TRANSFER_8_16:
513 acpi_os_printf("8-bit and 16-bit transfers\n");
516 case ACPI_TRANSFER_16:
517 acpi_os_printf("16-bit transfers only\n");
521 acpi_os_printf("**** Invalid transfer preference\n");
525 acpi_rs_out_integer8("DMA Channel Count",
526 (u8) resource->dma.number_of_channels);
528 acpi_rs_out_title("Channel List");
529 acpi_rs_dump_short_byte_list(resource->dma.number_of_channels,
530 resource->dma.channels);
533 /*******************************************************************************
535 * FUNCTION: acpi_rs_dump_start_depend_fns
537 * PARAMETERS: Resource - Pointer to an internal resource descriptor
541 * DESCRIPTION: Dump the field names and values of the resource descriptor
543 ******************************************************************************/
545 static void acpi_rs_dump_start_depend_fns(union acpi_resource_data *resource)
547 ACPI_FUNCTION_ENTRY();
549 acpi_os_printf("Start Dependent Functions Resource\n");
551 acpi_rs_out_title("Compatibility Priority");
552 switch (resource->start_dpf.compatibility_priority) {
553 case ACPI_GOOD_CONFIGURATION:
554 acpi_os_printf("Good configuration\n");
557 case ACPI_ACCEPTABLE_CONFIGURATION:
558 acpi_os_printf("Acceptable configuration\n");
561 case ACPI_SUB_OPTIMAL_CONFIGURATION:
562 acpi_os_printf("Sub-optimal configuration\n");
566 acpi_os_printf("**** Invalid compatibility priority\n");
570 acpi_rs_out_title("Performance/Robustness");
571 switch (resource->start_dpf.performance_robustness) {
572 case ACPI_GOOD_CONFIGURATION:
573 acpi_os_printf("Good configuration\n");
576 case ACPI_ACCEPTABLE_CONFIGURATION:
577 acpi_os_printf("Acceptable configuration\n");
580 case ACPI_SUB_OPTIMAL_CONFIGURATION:
581 acpi_os_printf("Sub-optimal configuration\n");
586 ("**** Invalid performance robustness preference\n");
591 /*******************************************************************************
593 * FUNCTION: acpi_rs_dump_io
595 * PARAMETERS: Resource - Pointer to an internal resource descriptor
599 * DESCRIPTION: Dump the field names and values of the resource descriptor
601 ******************************************************************************/
603 static void acpi_rs_dump_io(union acpi_resource_data *resource)
605 ACPI_FUNCTION_ENTRY();
607 acpi_os_printf("I/O Resource\n");
609 acpi_rs_out_string("Decode",
611 resource->io.io_decode ? "16-bit" : "10-bit");
613 acpi_rs_out_integer32("Range Minimum Base",
614 resource->io.min_base_address);
616 acpi_rs_out_integer32("Range Maximum Base",
617 resource->io.max_base_address);
619 acpi_rs_out_integer32("Alignment", resource->io.alignment);
621 acpi_rs_out_integer32("Range Length", resource->io.range_length);
624 /*******************************************************************************
626 * FUNCTION: acpi_rs_dump_fixed_io
628 * PARAMETERS: Resource - Pointer to an internal resource descriptor
632 * DESCRIPTION: Dump the field names and values of the resource descriptor
634 ******************************************************************************/
636 static void acpi_rs_dump_fixed_io(union acpi_resource_data *resource)
638 ACPI_FUNCTION_ENTRY();
640 acpi_os_printf("Fixed I/O Resource\n");
642 acpi_rs_out_integer32("Range Base Address",
643 resource->fixed_io.base_address);
645 acpi_rs_out_integer32("Range Length", resource->fixed_io.range_length);
648 /*******************************************************************************
650 * FUNCTION: acpi_rs_dump_vendor_specific
652 * PARAMETERS: Resource - Pointer to an internal resource descriptor
656 * DESCRIPTION: Dump the field names and values of the resource descriptor
658 ******************************************************************************/
660 static void acpi_rs_dump_vendor_specific(union acpi_resource_data *resource)
662 ACPI_FUNCTION_ENTRY();
664 acpi_os_printf("Vendor Specific Resource\n");
666 acpi_rs_out_integer16("Length", (u16) resource->vendor_specific.length);
668 acpi_rs_dump_byte_list(resource->vendor_specific.length,
669 resource->vendor_specific.reserved);
672 /*******************************************************************************
674 * FUNCTION: acpi_rs_dump_memory24
676 * PARAMETERS: Resource - Pointer to an internal resource descriptor
680 * DESCRIPTION: Dump the field names and values of the resource descriptor
682 ******************************************************************************/
684 static void acpi_rs_dump_memory24(union acpi_resource_data *resource)
686 ACPI_FUNCTION_ENTRY();
688 acpi_os_printf("24-Bit Memory Range Resource\n");
690 acpi_rs_out_string("Attribute",
691 ACPI_READ_WRITE_MEMORY ==
692 resource->memory24.read_write_attribute ?
693 "Read/Write" : "Read Only");
695 acpi_rs_out_integer16("Range Minimum Base",
696 (u16) resource->memory24.min_base_address);
698 acpi_rs_out_integer16("Range Maximum Base",
699 (u16) resource->memory24.max_base_address);
701 acpi_rs_out_integer16("Alignment", (u16) resource->memory24.alignment);
703 acpi_rs_out_integer16("Range Length",
704 (u16) resource->memory24.range_length);
707 /*******************************************************************************
709 * FUNCTION: acpi_rs_dump_memory32
711 * PARAMETERS: Resource - Pointer to an internal resource descriptor
715 * DESCRIPTION: Dump the field names and values of the resource descriptor
717 ******************************************************************************/
719 static void acpi_rs_dump_memory32(union acpi_resource_data *resource)
721 ACPI_FUNCTION_ENTRY();
723 acpi_os_printf("32-Bit Memory Range Resource\n");
725 acpi_rs_out_string("Attribute",
726 ACPI_READ_WRITE_MEMORY ==
727 resource->memory32.read_write_attribute ?
728 "Read/Write" : "Read Only");
730 acpi_rs_out_integer32("Range Minimum Base",
731 resource->memory32.min_base_address);
733 acpi_rs_out_integer32("Range Maximum Base",
734 resource->memory32.max_base_address);
736 acpi_rs_out_integer32("Alignment", resource->memory32.alignment);
738 acpi_rs_out_integer32("Range Length", resource->memory32.range_length);
741 /*******************************************************************************
743 * FUNCTION: acpi_rs_dump_fixed_memory32
745 * PARAMETERS: Resource - Pointer to an internal resource descriptor
749 * DESCRIPTION: Dump the field names and values of the resource descriptor
751 ******************************************************************************/
753 static void acpi_rs_dump_fixed_memory32(union acpi_resource_data *resource)
755 ACPI_FUNCTION_ENTRY();
757 acpi_os_printf("32-Bit Fixed Location Memory Range Resource\n");
759 acpi_rs_out_string("Attribute",
760 ACPI_READ_WRITE_MEMORY ==
761 resource->fixed_memory32.read_write_attribute ?
762 "Read/Write" : "Read Only");
764 acpi_rs_out_integer32("Range Base Address",
765 resource->fixed_memory32.range_base_address);
767 acpi_rs_out_integer32("Range Length",
768 resource->fixed_memory32.range_length);
771 /*******************************************************************************
773 * FUNCTION: acpi_rs_dump_address16
775 * PARAMETERS: Resource - Pointer to an internal resource descriptor
779 * DESCRIPTION: Dump the field names and values of the resource descriptor
781 ******************************************************************************/
783 static void acpi_rs_dump_address16(union acpi_resource_data *resource)
785 ACPI_FUNCTION_ENTRY();
787 acpi_os_printf("16-Bit Address Space Resource\n");
789 acpi_rs_dump_address_common(resource);
791 acpi_rs_out_integer16("Granularity",
792 (u16) resource->address16.granularity);
794 acpi_rs_out_integer16("Address Range Min",
795 (u16) resource->address16.min_address_range);
797 acpi_rs_out_integer16("Address Range Max",
798 (u16) resource->address16.max_address_range);
800 acpi_rs_out_integer16("Address Translation Offset",
801 (u16) resource->address16.
802 address_translation_offset);
804 acpi_rs_out_integer16("Address Length",
805 (u16) resource->address16.address_length);
807 acpi_rs_dump_resource_source(&resource->address16.resource_source);
810 /*******************************************************************************
812 * FUNCTION: acpi_rs_dump_address32
814 * PARAMETERS: Resource - Pointer to an internal resource descriptor
818 * DESCRIPTION: Dump the field names and values of the resource descriptor
820 ******************************************************************************/
822 static void acpi_rs_dump_address32(union acpi_resource_data *resource)
824 ACPI_FUNCTION_ENTRY();
826 acpi_os_printf("32-Bit Address Space Resource\n");
828 acpi_rs_dump_address_common(resource);
830 acpi_rs_out_integer32("Granularity", resource->address32.granularity);
832 acpi_rs_out_integer32("Address Range Min",
833 resource->address32.min_address_range);
835 acpi_rs_out_integer32("Address Range Max",
836 resource->address32.max_address_range);
838 acpi_rs_out_integer32("Address Translation Offset",
839 resource->address32.address_translation_offset);
841 acpi_rs_out_integer32("Address Length",
842 resource->address32.address_length);
844 acpi_rs_dump_resource_source(&resource->address32.resource_source);
847 /*******************************************************************************
849 * FUNCTION: acpi_rs_dump_address64
851 * PARAMETERS: Resource - Pointer to an internal resource descriptor
855 * DESCRIPTION: Dump the field names and values of the resource descriptor
857 ******************************************************************************/
859 static void acpi_rs_dump_address64(union acpi_resource_data *resource)
861 ACPI_FUNCTION_ENTRY();
863 acpi_os_printf("64-Bit Address Space Resource\n");
865 acpi_rs_dump_address_common(resource);
867 acpi_rs_out_integer64("Granularity", resource->address64.granularity);
869 acpi_rs_out_integer64("Address Range Min",
870 resource->address64.min_address_range);
872 acpi_rs_out_integer64("Address Range Max",
873 resource->address64.max_address_range);
875 acpi_rs_out_integer64("Address Translation Offset",
876 resource->address64.address_translation_offset);
878 acpi_rs_out_integer64("Address Length",
879 resource->address64.address_length);
881 acpi_rs_out_integer64("Type Specific Attributes",
882 resource->address64.type_specific_attributes);
884 acpi_rs_dump_resource_source(&resource->address64.resource_source);
887 /*******************************************************************************
889 * FUNCTION: acpi_rs_dump_extended_irq
891 * PARAMETERS: Resource - Pointer to an internal resource descriptor
895 * DESCRIPTION: Dump the field names and values of the resource descriptor
897 ******************************************************************************/
899 static void acpi_rs_dump_extended_irq(union acpi_resource_data *resource)
901 ACPI_FUNCTION_ENTRY();
903 acpi_os_printf("Extended IRQ Resource\n");
905 acpi_rs_out_string("Resource",
907 resource->extended_irq.
908 producer_consumer ? "Consumer" : "Producer");
910 acpi_rs_out_string("Triggering",
911 ACPI_LEVEL_SENSITIVE ==
912 resource->extended_irq.
913 edge_level ? "Level" : "Edge");
915 acpi_rs_out_string("Active",
917 resource->extended_irq.
918 active_high_low ? "Low" : "High");
920 acpi_rs_out_string("Sharing",
922 resource->extended_irq.
923 shared_exclusive ? "Shared" : "Exclusive");
925 acpi_rs_dump_resource_source(&resource->extended_irq.resource_source);
927 acpi_rs_out_integer8("Interrupts",
928 (u8) resource->extended_irq.number_of_interrupts);
930 acpi_rs_dump_dword_list(resource->extended_irq.number_of_interrupts,
931 resource->extended_irq.interrupts);
934 /*******************************************************************************
936 * FUNCTION: acpi_rs_dump_generic_reg
938 * PARAMETERS: Resource - Pointer to an internal resource descriptor
942 * DESCRIPTION: Dump the field names and values of the resource descriptor
944 ******************************************************************************/
946 static void acpi_rs_dump_generic_reg(union acpi_resource_data *resource)
949 ACPI_FUNCTION_ENTRY();
951 acpi_os_printf("Generic Register Resource\n");
953 acpi_rs_out_integer8("Space ID", (u8) resource->generic_reg.space_id);
955 acpi_rs_out_integer8("Bit Width", (u8) resource->generic_reg.bit_width);
957 acpi_rs_out_integer8("Bit Offset",
958 (u8) resource->generic_reg.bit_offset);
960 acpi_rs_out_integer8("Address Size",
961 (u8) resource->generic_reg.address_size);
963 acpi_rs_out_integer64("Address", resource->generic_reg.address);
966 /*******************************************************************************
968 * FUNCTION: acpi_rs_dump_end_depend_fns
970 * PARAMETERS: Resource - Pointer to an internal resource descriptor
974 * DESCRIPTION: Print type, no data.
976 ******************************************************************************/
978 static void acpi_rs_dump_end_depend_fns(union acpi_resource_data *resource)
980 ACPI_FUNCTION_ENTRY();
982 acpi_os_printf("end_dependent_functions Resource\n");
985 /*******************************************************************************
987 * FUNCTION: acpi_rs_dump_end_tag
989 * PARAMETERS: Resource - Pointer to an internal resource descriptor
993 * DESCRIPTION: Print type, no data.
995 ******************************************************************************/
997 static void acpi_rs_dump_end_tag(union acpi_resource_data *resource)
999 ACPI_FUNCTION_ENTRY();
1001 acpi_os_printf("end_tag Resource\n");
1004 /*******************************************************************************
1006 * FUNCTION: acpi_rs_dump_irq_list
1008 * PARAMETERS: route_table - Pointer to the routing table to dump.
1012 * DESCRIPTION: Print IRQ routing table
1014 ******************************************************************************/
1016 void acpi_rs_dump_irq_list(u8 * route_table)
1018 u8 *buffer = route_table;
1020 struct acpi_pci_routing_table *prt_element;
1022 ACPI_FUNCTION_ENTRY();
1024 if (!(acpi_dbg_level & ACPI_LV_RESOURCES)
1025 || !(_COMPONENT & acpi_dbg_layer)) {
1029 prt_element = ACPI_CAST_PTR(struct acpi_pci_routing_table, buffer);
1031 /* Dump all table elements, Exit on null length element */
1033 while (prt_element->length) {
1034 acpi_os_printf("\n[%02X] PCI IRQ Routing Table Package\n",
1037 acpi_rs_out_integer64("Address", prt_element->address);
1039 acpi_rs_out_integer32("Pin", prt_element->pin);
1040 acpi_rs_out_string("Source", prt_element->source);
1041 acpi_rs_out_integer32("Source Index",
1042 prt_element->source_index);
1044 buffer += prt_element->length;
1046 ACPI_CAST_PTR(struct acpi_pci_routing_table, buffer);