1 /*******************************************************************************
3 * Module Name: rsdump - Functions to display the resource structures.
6 ******************************************************************************/
8 /******************************************************************************
12 * Some or all of this work - Copyright (c) 1999 - 2003, Intel Corp.
13 * All rights reserved.
17 * 2.1. This is your license from Intel Corp. under its intellectual property
18 * rights. You may have additional license terms from the party that provided
19 * you this software, covering your right to use that party's intellectual
22 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
23 * copy of the source code appearing in this file ("Covered Code") an
24 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
25 * base code distributed originally by Intel ("Original Intel Code") to copy,
26 * make derivatives, distribute, use and display any portion of the Covered
27 * Code in any form, with the right to sublicense such rights; and
29 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
30 * license (with the right to sublicense), under only those claims of Intel
31 * patents that are infringed by the Original Intel Code, to make, use, sell,
32 * offer to sell, and import the Covered Code and derivative works thereof
33 * solely to the minimum extent necessary to exercise the above copyright
34 * license, and in no event shall the patent license extend to any additions
35 * to or modifications of the Original Intel Code. No other license or right
36 * is granted directly or by implication, estoppel or otherwise;
38 * The above copyright and patent license is granted only if the following
43 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
44 * Redistribution of source code of any substantial portion of the Covered
45 * Code or modification with rights to further distribute source must include
46 * the above Copyright Notice, the above License, this list of Conditions,
47 * and the following Disclaimer and Export Compliance provision. In addition,
48 * Licensee must cause all Covered Code to which Licensee contributes to
49 * contain a file documenting the changes Licensee made to create that Covered
50 * Code and the date of any change. Licensee must include in that file the
51 * documentation of any changes made by any predecessor Licensee. Licensee
52 * must include a prominent statement that the modification is derived,
53 * directly or indirectly, from Original Intel Code.
55 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
56 * Redistribution of source code of any substantial portion of the Covered
57 * Code or modification without rights to further distribute source must
58 * include the following Disclaimer and Export Compliance provision in the
59 * documentation and/or other materials provided with distribution. In
60 * addition, Licensee may not authorize further sublicense of source of any
61 * portion of the Covered Code, and must include terms to the effect that the
62 * license from Licensee to its licensee is limited to the intellectual
63 * property embodied in the software Licensee provides to its licensee, and
64 * not to intellectual property embodied in modifications its licensee may
67 * 3.3. Redistribution of Executable. Redistribution in executable form of any
68 * substantial portion of the Covered Code or modification must reproduce the
69 * above Copyright Notice, and the following Disclaimer and Export Compliance
70 * provision in the documentation and/or other materials provided with the
73 * 3.4. Intel retains all right, title, and interest in and to the Original
76 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
77 * Intel shall be used in advertising or otherwise to promote the sale, use or
78 * other dealings in products derived from or relating to the Covered Code
79 * without prior written authorization from Intel.
81 * 4. Disclaimer and Export Compliance
83 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
84 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
85 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
86 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
87 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
88 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
91 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
92 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
93 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
94 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
95 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
96 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
97 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
100 * 4.3. Licensee shall not export, either directly or indirectly, any of this
101 * software or system incorporating such software without first obtaining any
102 * required license or other approval from the U. S. Department of Commerce or
103 * any other agency or department of the United States Government. In the
104 * event Licensee exports any such software from the United States or
105 * re-exports any such software from a foreign destination, Licensee shall
106 * ensure that the distribution and export/re-export of the software is in
107 * compliance with all laws, regulations, orders, or other restrictions of the
108 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
109 * any of its subsidiaries will export/re-export any technical data, process,
110 * software, or service, directly or indirectly, to any country for which the
111 * United States government or any agency thereof requires an export license,
112 * other governmental approval, or letter of assurance, without first obtaining
113 * such license, approval or letter.
115 *****************************************************************************/
116 /* $DragonFly: src/sys/contrib/dev/acpica/Attic/rsdump.c,v 1.1 2003/09/24 03:32:16 drhodus Exp $ */
124 #define _COMPONENT ACPI_RESOURCES
125 ACPI_MODULE_NAME ("rsdump")
128 #if defined(ACPI_DEBUG_OUTPUT) || defined(ACPI_DEBUGGER)
130 /*******************************************************************************
132 * FUNCTION: AcpiRsDumpIrq
134 * PARAMETERS: Data - pointer to the resource structure to dump.
138 * DESCRIPTION: Prints out the various members of the Data structure type.
140 ******************************************************************************/
144 ACPI_RESOURCE_DATA *Data)
146 ACPI_RESOURCE_IRQ *IrqData = (ACPI_RESOURCE_IRQ *) Data;
150 ACPI_FUNCTION_ENTRY ();
153 AcpiOsPrintf ("IRQ Resource\n");
155 AcpiOsPrintf (" %s Triggered\n",
156 ACPI_LEVEL_SENSITIVE == IrqData->EdgeLevel ? "Level" : "Edge");
158 AcpiOsPrintf (" Active %s\n",
159 ACPI_ACTIVE_LOW == IrqData->ActiveHighLow ? "Low" : "High");
161 AcpiOsPrintf (" %s\n",
162 ACPI_SHARED == IrqData->SharedExclusive ? "Shared" : "Exclusive");
164 AcpiOsPrintf (" %X Interrupts ( ", IrqData->NumberOfInterrupts);
166 for (Index = 0; Index < IrqData->NumberOfInterrupts; Index++)
168 AcpiOsPrintf ("%X ", IrqData->Interrupts[Index]);
171 AcpiOsPrintf (")\n");
176 /*******************************************************************************
178 * FUNCTION: AcpiRsDumpDma
180 * PARAMETERS: Data - pointer to the resource structure to dump.
184 * DESCRIPTION: Prints out the various members of the Data structure type.
186 ******************************************************************************/
190 ACPI_RESOURCE_DATA *Data)
192 ACPI_RESOURCE_DMA *DmaData = (ACPI_RESOURCE_DMA *) Data;
196 ACPI_FUNCTION_ENTRY ();
199 AcpiOsPrintf ("DMA Resource\n");
201 switch (DmaData->Type)
203 case ACPI_COMPATIBILITY:
204 AcpiOsPrintf (" Compatibility mode\n");
208 AcpiOsPrintf (" Type A\n");
212 AcpiOsPrintf (" Type B\n");
216 AcpiOsPrintf (" Type F\n");
220 AcpiOsPrintf (" Invalid DMA type\n");
224 AcpiOsPrintf (" %sBus Master\n",
225 ACPI_BUS_MASTER == DmaData->BusMaster ? "" : "Not a ");
228 switch (DmaData->Transfer)
230 case ACPI_TRANSFER_8:
231 AcpiOsPrintf (" 8-bit only transfer\n");
234 case ACPI_TRANSFER_8_16:
235 AcpiOsPrintf (" 8 and 16-bit transfer\n");
238 case ACPI_TRANSFER_16:
239 AcpiOsPrintf (" 16 bit only transfer\n");
243 AcpiOsPrintf (" Invalid transfer preference\n");
247 AcpiOsPrintf (" Number of Channels: %X ( ", DmaData->NumberOfChannels);
249 for (Index = 0; Index < DmaData->NumberOfChannels; Index++)
251 AcpiOsPrintf ("%X ", DmaData->Channels[Index]);
254 AcpiOsPrintf (")\n");
259 /*******************************************************************************
261 * FUNCTION: AcpiRsDumpStartDependFns
263 * PARAMETERS: Data - pointer to the resource structure to dump.
267 * DESCRIPTION: Prints out the various members of the Data structure type.
269 ******************************************************************************/
272 AcpiRsDumpStartDependFns (
273 ACPI_RESOURCE_DATA *Data)
275 ACPI_RESOURCE_START_DPF *SdfData = (ACPI_RESOURCE_START_DPF *) Data;
278 ACPI_FUNCTION_ENTRY ();
281 AcpiOsPrintf ("Start Dependent Functions Resource\n");
283 switch (SdfData->CompatibilityPriority)
285 case ACPI_GOOD_CONFIGURATION:
286 AcpiOsPrintf (" Good configuration\n");
289 case ACPI_ACCEPTABLE_CONFIGURATION:
290 AcpiOsPrintf (" Acceptable configuration\n");
293 case ACPI_SUB_OPTIMAL_CONFIGURATION:
294 AcpiOsPrintf (" Sub-optimal configuration\n");
298 AcpiOsPrintf (" Invalid compatibility priority\n");
302 switch(SdfData->PerformanceRobustness)
304 case ACPI_GOOD_CONFIGURATION:
305 AcpiOsPrintf (" Good configuration\n");
308 case ACPI_ACCEPTABLE_CONFIGURATION:
309 AcpiOsPrintf (" Acceptable configuration\n");
312 case ACPI_SUB_OPTIMAL_CONFIGURATION:
313 AcpiOsPrintf (" Sub-optimal configuration\n");
317 AcpiOsPrintf (" Invalid performance "
318 "robustness preference\n");
326 /*******************************************************************************
328 * FUNCTION: AcpiRsDumpIo
330 * PARAMETERS: Data - pointer to the resource structure to dump.
334 * DESCRIPTION: Prints out the various members of the Data structure type.
336 ******************************************************************************/
340 ACPI_RESOURCE_DATA *Data)
342 ACPI_RESOURCE_IO *IoData = (ACPI_RESOURCE_IO *) Data;
345 ACPI_FUNCTION_ENTRY ();
348 AcpiOsPrintf ("Io Resource\n");
350 AcpiOsPrintf (" %d bit decode\n",
351 ACPI_DECODE_16 == IoData->IoDecode ? 16 : 10);
353 AcpiOsPrintf (" Range minimum base: %08X\n",
354 IoData->MinBaseAddress);
356 AcpiOsPrintf (" Range maximum base: %08X\n",
357 IoData->MaxBaseAddress);
359 AcpiOsPrintf (" Alignment: %08X\n",
362 AcpiOsPrintf (" Range Length: %08X\n",
363 IoData->RangeLength);
369 /*******************************************************************************
371 * FUNCTION: AcpiRsDumpFixedIo
373 * PARAMETERS: Data - pointer to the resource structure to dump.
377 * DESCRIPTION: Prints out the various members of the Data structure type.
379 ******************************************************************************/
383 ACPI_RESOURCE_DATA *Data)
385 ACPI_RESOURCE_FIXED_IO *FixedIoData = (ACPI_RESOURCE_FIXED_IO *) Data;
388 ACPI_FUNCTION_ENTRY ();
391 AcpiOsPrintf ("Fixed Io Resource\n");
392 AcpiOsPrintf (" Range base address: %08X",
393 FixedIoData->BaseAddress);
395 AcpiOsPrintf (" Range length: %08X",
396 FixedIoData->RangeLength);
402 /*******************************************************************************
404 * FUNCTION: AcpiRsDumpVendorSpecific
406 * PARAMETERS: Data - pointer to the resource structure to dump.
410 * DESCRIPTION: Prints out the various members of the Data structure type.
412 ******************************************************************************/
415 AcpiRsDumpVendorSpecific (
416 ACPI_RESOURCE_DATA *Data)
418 ACPI_RESOURCE_VENDOR *VendorData = (ACPI_RESOURCE_VENDOR *) Data;
422 ACPI_FUNCTION_ENTRY ();
425 AcpiOsPrintf ("Vendor Specific Resource\n");
427 AcpiOsPrintf (" Length: %08X\n", VendorData->Length);
429 for (Index = 0; Index < VendorData->Length; Index++)
431 AcpiOsPrintf (" Byte %X: %08X\n",
432 Index, VendorData->Reserved[Index]);
439 /*******************************************************************************
441 * FUNCTION: AcpiRsDumpMemory24
443 * PARAMETERS: Data - pointer to the resource structure to dump.
447 * DESCRIPTION: Prints out the various members of the Data structure type.
449 ******************************************************************************/
453 ACPI_RESOURCE_DATA *Data)
455 ACPI_RESOURCE_MEM24 *Memory24Data = (ACPI_RESOURCE_MEM24 *) Data;
458 ACPI_FUNCTION_ENTRY ();
461 AcpiOsPrintf ("24-Bit Memory Range Resource\n");
463 AcpiOsPrintf (" Read%s\n",
464 ACPI_READ_WRITE_MEMORY ==
465 Memory24Data->ReadWriteAttribute ?
468 AcpiOsPrintf (" Range minimum base: %08X\n",
469 Memory24Data->MinBaseAddress);
471 AcpiOsPrintf (" Range maximum base: %08X\n",
472 Memory24Data->MaxBaseAddress);
474 AcpiOsPrintf (" Alignment: %08X\n",
475 Memory24Data->Alignment);
477 AcpiOsPrintf (" Range length: %08X\n",
478 Memory24Data->RangeLength);
484 /*******************************************************************************
486 * FUNCTION: AcpiRsDumpMemory32
488 * PARAMETERS: Data - pointer to the resource structure to dump.
492 * DESCRIPTION: Prints out the various members of the Data structure type.
494 ******************************************************************************/
498 ACPI_RESOURCE_DATA *Data)
500 ACPI_RESOURCE_MEM32 *Memory32Data = (ACPI_RESOURCE_MEM32 *) Data;
503 ACPI_FUNCTION_ENTRY ();
506 AcpiOsPrintf ("32-Bit Memory Range Resource\n");
508 AcpiOsPrintf (" Read%s\n",
509 ACPI_READ_WRITE_MEMORY ==
510 Memory32Data->ReadWriteAttribute ?
513 AcpiOsPrintf (" Range minimum base: %08X\n",
514 Memory32Data->MinBaseAddress);
516 AcpiOsPrintf (" Range maximum base: %08X\n",
517 Memory32Data->MaxBaseAddress);
519 AcpiOsPrintf (" Alignment: %08X\n",
520 Memory32Data->Alignment);
522 AcpiOsPrintf (" Range length: %08X\n",
523 Memory32Data->RangeLength);
529 /*******************************************************************************
531 * FUNCTION: AcpiRsDumpFixedMemory32
533 * PARAMETERS: Data - pointer to the resource structure to dump.
537 * DESCRIPTION: Prints out the various members of the Data structure type.
539 ******************************************************************************/
542 AcpiRsDumpFixedMemory32 (
543 ACPI_RESOURCE_DATA *Data)
545 ACPI_RESOURCE_FIXED_MEM32 *FixedMemory32Data = (ACPI_RESOURCE_FIXED_MEM32 *) Data;
548 ACPI_FUNCTION_ENTRY ();
551 AcpiOsPrintf ("32-Bit Fixed Location Memory Range Resource\n");
553 AcpiOsPrintf (" Read%s\n",
554 ACPI_READ_WRITE_MEMORY ==
555 FixedMemory32Data->ReadWriteAttribute ?
558 AcpiOsPrintf (" Range base address: %08X\n",
559 FixedMemory32Data->RangeBaseAddress);
561 AcpiOsPrintf (" Range length: %08X\n",
562 FixedMemory32Data->RangeLength);
568 /*******************************************************************************
570 * FUNCTION: AcpiRsDumpAddress16
572 * PARAMETERS: Data - pointer to the resource structure to dump.
576 * DESCRIPTION: Prints out the various members of the Data structure type.
578 ******************************************************************************/
581 AcpiRsDumpAddress16 (
582 ACPI_RESOURCE_DATA *Data)
584 ACPI_RESOURCE_ADDRESS16 *Address16Data = (ACPI_RESOURCE_ADDRESS16 *) Data;
587 ACPI_FUNCTION_ENTRY ();
590 AcpiOsPrintf ("16-Bit Address Space Resource\n");
591 AcpiOsPrintf (" Resource Type: ");
593 switch (Address16Data->ResourceType)
595 case ACPI_MEMORY_RANGE:
597 AcpiOsPrintf ("Memory Range\n");
599 switch (Address16Data->Attribute.Memory.CacheAttribute)
601 case ACPI_NON_CACHEABLE_MEMORY:
602 AcpiOsPrintf (" Type Specific: "
603 "Noncacheable memory\n");
606 case ACPI_CACHABLE_MEMORY:
607 AcpiOsPrintf (" Type Specific: "
608 "Cacheable memory\n");
611 case ACPI_WRITE_COMBINING_MEMORY:
612 AcpiOsPrintf (" Type Specific: "
613 "Write-combining memory\n");
616 case ACPI_PREFETCHABLE_MEMORY:
617 AcpiOsPrintf (" Type Specific: "
618 "Prefetchable memory\n");
622 AcpiOsPrintf (" Type Specific: "
623 "Invalid cache attribute\n");
627 AcpiOsPrintf (" Type Specific: Read%s\n",
628 ACPI_READ_WRITE_MEMORY ==
629 Address16Data->Attribute.Memory.ReadWriteAttribute ?
635 AcpiOsPrintf ("I/O Range\n");
637 switch (Address16Data->Attribute.Io.RangeAttribute)
639 case ACPI_NON_ISA_ONLY_RANGES:
640 AcpiOsPrintf (" Type Specific: "
641 "Non-ISA Io Addresses\n");
644 case ACPI_ISA_ONLY_RANGES:
645 AcpiOsPrintf (" Type Specific: "
646 "ISA Io Addresses\n");
649 case ACPI_ENTIRE_RANGE:
650 AcpiOsPrintf (" Type Specific: "
651 "ISA and non-ISA Io Addresses\n");
655 AcpiOsPrintf (" Type Specific: "
656 "Invalid range attribute\n");
660 AcpiOsPrintf (" Type Specific: %s Translation\n",
661 ACPI_SPARSE_TRANSLATION ==
662 Address16Data->Attribute.Io.TranslationAttribute ?
666 case ACPI_BUS_NUMBER_RANGE:
668 AcpiOsPrintf ("Bus Number Range\n");
673 AcpiOsPrintf ("Invalid resource type. Exiting.\n");
677 AcpiOsPrintf (" Resource %s\n",
678 ACPI_CONSUMER == Address16Data->ProducerConsumer ?
679 "Consumer" : "Producer");
681 AcpiOsPrintf (" %s decode\n",
682 ACPI_SUB_DECODE == Address16Data->Decode ?
683 "Subtractive" : "Positive");
685 AcpiOsPrintf (" Min address is %s fixed\n",
686 ACPI_ADDRESS_FIXED == Address16Data->MinAddressFixed ?
689 AcpiOsPrintf (" Max address is %s fixed\n",
690 ACPI_ADDRESS_FIXED == Address16Data->MaxAddressFixed ?
693 AcpiOsPrintf (" Granularity: %08X\n",
694 Address16Data->Granularity);
696 AcpiOsPrintf (" Address range min: %08X\n",
697 Address16Data->MinAddressRange);
699 AcpiOsPrintf (" Address range max: %08X\n",
700 Address16Data->MaxAddressRange);
702 AcpiOsPrintf (" Address translation offset: %08X\n",
703 Address16Data->AddressTranslationOffset);
705 AcpiOsPrintf (" Address Length: %08X\n",
706 Address16Data->AddressLength);
708 if (0xFF != Address16Data->ResourceSource.Index)
710 AcpiOsPrintf (" Resource Source Index: %X\n",
711 Address16Data->ResourceSource.Index);
712 AcpiOsPrintf (" Resource Source: %s\n",
713 Address16Data->ResourceSource.StringPtr);
720 /*******************************************************************************
722 * FUNCTION: AcpiRsDumpAddress32
724 * PARAMETERS: Data - pointer to the resource structure to dump.
728 * DESCRIPTION: Prints out the various members of the Data structure type.
730 ******************************************************************************/
733 AcpiRsDumpAddress32 (
734 ACPI_RESOURCE_DATA *Data)
736 ACPI_RESOURCE_ADDRESS32 *Address32Data = (ACPI_RESOURCE_ADDRESS32 *) Data;
739 ACPI_FUNCTION_ENTRY ();
742 AcpiOsPrintf ("32-Bit Address Space Resource\n");
744 switch (Address32Data->ResourceType)
746 case ACPI_MEMORY_RANGE:
748 AcpiOsPrintf (" Resource Type: Memory Range\n");
750 switch (Address32Data->Attribute.Memory.CacheAttribute)
752 case ACPI_NON_CACHEABLE_MEMORY:
753 AcpiOsPrintf (" Type Specific: "
754 "Noncacheable memory\n");
757 case ACPI_CACHABLE_MEMORY:
758 AcpiOsPrintf (" Type Specific: "
759 "Cacheable memory\n");
762 case ACPI_WRITE_COMBINING_MEMORY:
763 AcpiOsPrintf (" Type Specific: "
764 "Write-combining memory\n");
767 case ACPI_PREFETCHABLE_MEMORY:
768 AcpiOsPrintf (" Type Specific: "
769 "Prefetchable memory\n");
773 AcpiOsPrintf (" Type Specific: "
774 "Invalid cache attribute\n");
778 AcpiOsPrintf (" Type Specific: Read%s\n",
779 ACPI_READ_WRITE_MEMORY ==
780 Address32Data->Attribute.Memory.ReadWriteAttribute ?
786 AcpiOsPrintf (" Resource Type: Io Range\n");
788 switch (Address32Data->Attribute.Io.RangeAttribute)
790 case ACPI_NON_ISA_ONLY_RANGES:
791 AcpiOsPrintf (" Type Specific: "
792 "Non-ISA Io Addresses\n");
795 case ACPI_ISA_ONLY_RANGES:
796 AcpiOsPrintf (" Type Specific: "
797 "ISA Io Addresses\n");
800 case ACPI_ENTIRE_RANGE:
801 AcpiOsPrintf (" Type Specific: "
802 "ISA and non-ISA Io Addresses\n");
806 AcpiOsPrintf (" Type Specific: "
807 "Invalid Range attribute");
811 AcpiOsPrintf (" Type Specific: %s Translation\n",
812 ACPI_SPARSE_TRANSLATION ==
813 Address32Data->Attribute.Io.TranslationAttribute ?
817 case ACPI_BUS_NUMBER_RANGE:
819 AcpiOsPrintf (" Resource Type: Bus Number Range\n");
824 AcpiOsPrintf (" Invalid Resource Type..exiting.\n");
828 AcpiOsPrintf (" Resource %s\n",
829 ACPI_CONSUMER == Address32Data->ProducerConsumer ?
830 "Consumer" : "Producer");
832 AcpiOsPrintf (" %s decode\n",
833 ACPI_SUB_DECODE == Address32Data->Decode ?
834 "Subtractive" : "Positive");
836 AcpiOsPrintf (" Min address is %s fixed\n",
837 ACPI_ADDRESS_FIXED == Address32Data->MinAddressFixed ?
840 AcpiOsPrintf (" Max address is %s fixed\n",
841 ACPI_ADDRESS_FIXED == Address32Data->MaxAddressFixed ?
844 AcpiOsPrintf (" Granularity: %08X\n",
845 Address32Data->Granularity);
847 AcpiOsPrintf (" Address range min: %08X\n",
848 Address32Data->MinAddressRange);
850 AcpiOsPrintf (" Address range max: %08X\n",
851 Address32Data->MaxAddressRange);
853 AcpiOsPrintf (" Address translation offset: %08X\n",
854 Address32Data->AddressTranslationOffset);
856 AcpiOsPrintf (" Address Length: %08X\n",
857 Address32Data->AddressLength);
859 if(0xFF != Address32Data->ResourceSource.Index)
861 AcpiOsPrintf (" Resource Source Index: %X\n",
862 Address32Data->ResourceSource.Index);
863 AcpiOsPrintf (" Resource Source: %s\n",
864 Address32Data->ResourceSource.StringPtr);
871 /*******************************************************************************
873 * FUNCTION: AcpiRsDumpAddress64
875 * PARAMETERS: Data - pointer to the resource structure to dump.
879 * DESCRIPTION: Prints out the various members of the Data structure type.
881 ******************************************************************************/
884 AcpiRsDumpAddress64 (
885 ACPI_RESOURCE_DATA *Data)
887 ACPI_RESOURCE_ADDRESS64 *Address64Data = (ACPI_RESOURCE_ADDRESS64 *) Data;
890 ACPI_FUNCTION_ENTRY ();
893 AcpiOsPrintf ("64-Bit Address Space Resource\n");
895 switch (Address64Data->ResourceType)
897 case ACPI_MEMORY_RANGE:
899 AcpiOsPrintf (" Resource Type: Memory Range\n");
901 switch (Address64Data->Attribute.Memory.CacheAttribute)
903 case ACPI_NON_CACHEABLE_MEMORY:
904 AcpiOsPrintf (" Type Specific: "
905 "Noncacheable memory\n");
908 case ACPI_CACHABLE_MEMORY:
909 AcpiOsPrintf (" Type Specific: "
910 "Cacheable memory\n");
913 case ACPI_WRITE_COMBINING_MEMORY:
914 AcpiOsPrintf (" Type Specific: "
915 "Write-combining memory\n");
918 case ACPI_PREFETCHABLE_MEMORY:
919 AcpiOsPrintf (" Type Specific: "
920 "Prefetchable memory\n");
924 AcpiOsPrintf (" Type Specific: "
925 "Invalid cache attribute\n");
929 AcpiOsPrintf (" Type Specific: Read%s\n",
930 ACPI_READ_WRITE_MEMORY ==
931 Address64Data->Attribute.Memory.ReadWriteAttribute ?
937 AcpiOsPrintf (" Resource Type: Io Range\n");
939 switch (Address64Data->Attribute.Io.RangeAttribute)
941 case ACPI_NON_ISA_ONLY_RANGES:
942 AcpiOsPrintf (" Type Specific: "
943 "Non-ISA Io Addresses\n");
946 case ACPI_ISA_ONLY_RANGES:
947 AcpiOsPrintf (" Type Specific: "
948 "ISA Io Addresses\n");
951 case ACPI_ENTIRE_RANGE:
952 AcpiOsPrintf (" Type Specific: "
953 "ISA and non-ISA Io Addresses\n");
957 AcpiOsPrintf (" Type Specific: "
958 "Invalid Range attribute");
962 AcpiOsPrintf (" Type Specific: %s Translation\n",
963 ACPI_SPARSE_TRANSLATION ==
964 Address64Data->Attribute.Io.TranslationAttribute ?
968 case ACPI_BUS_NUMBER_RANGE:
970 AcpiOsPrintf (" Resource Type: Bus Number Range\n");
975 AcpiOsPrintf (" Invalid Resource Type..exiting.\n");
979 AcpiOsPrintf (" Resource %s\n",
980 ACPI_CONSUMER == Address64Data->ProducerConsumer ?
981 "Consumer" : "Producer");
983 AcpiOsPrintf (" %s decode\n",
984 ACPI_SUB_DECODE == Address64Data->Decode ?
985 "Subtractive" : "Positive");
987 AcpiOsPrintf (" Min address is %s fixed\n",
988 ACPI_ADDRESS_FIXED == Address64Data->MinAddressFixed ?
991 AcpiOsPrintf (" Max address is %s fixed\n",
992 ACPI_ADDRESS_FIXED == Address64Data->MaxAddressFixed ?
995 AcpiOsPrintf (" Granularity: %8.8X%8.8X\n",
996 ACPI_HIDWORD (Address64Data->Granularity),
997 ACPI_LODWORD (Address64Data->Granularity));
999 AcpiOsPrintf (" Address range min: %8.8X%8.8X\n",
1000 ACPI_HIDWORD (Address64Data->MinAddressRange),
1001 ACPI_HIDWORD (Address64Data->MinAddressRange));
1003 AcpiOsPrintf (" Address range max: %8.8X%8.8X\n",
1004 ACPI_HIDWORD (Address64Data->MaxAddressRange),
1005 ACPI_HIDWORD (Address64Data->MaxAddressRange));
1007 AcpiOsPrintf (" Address translation offset: %8.8X%8.8X\n",
1008 ACPI_HIDWORD (Address64Data->AddressTranslationOffset),
1009 ACPI_HIDWORD (Address64Data->AddressTranslationOffset));
1011 AcpiOsPrintf (" Address Length: %8.8X%8.8X\n",
1012 ACPI_HIDWORD (Address64Data->AddressLength),
1013 ACPI_HIDWORD (Address64Data->AddressLength));
1015 if(0xFF != Address64Data->ResourceSource.Index)
1017 AcpiOsPrintf (" Resource Source Index: %X\n",
1018 Address64Data->ResourceSource.Index);
1019 AcpiOsPrintf (" Resource Source: %s\n",
1020 Address64Data->ResourceSource.StringPtr);
1027 /*******************************************************************************
1029 * FUNCTION: AcpiRsDumpExtendedIrq
1031 * PARAMETERS: Data - pointer to the resource structure to dump.
1035 * DESCRIPTION: Prints out the various members of the Data structure type.
1037 ******************************************************************************/
1040 AcpiRsDumpExtendedIrq (
1041 ACPI_RESOURCE_DATA *Data)
1043 ACPI_RESOURCE_EXT_IRQ *ExtIrqData = (ACPI_RESOURCE_EXT_IRQ *) Data;
1047 ACPI_FUNCTION_ENTRY ();
1050 AcpiOsPrintf ("Extended IRQ Resource\n");
1052 AcpiOsPrintf (" Resource %s\n",
1053 ACPI_CONSUMER == ExtIrqData->ProducerConsumer ?
1054 "Consumer" : "Producer");
1056 AcpiOsPrintf (" %s\n",
1057 ACPI_LEVEL_SENSITIVE == ExtIrqData->EdgeLevel ?
1060 AcpiOsPrintf (" Active %s\n",
1061 ACPI_ACTIVE_LOW == ExtIrqData->ActiveHighLow ?
1064 AcpiOsPrintf (" %s\n",
1065 ACPI_SHARED == ExtIrqData->SharedExclusive ?
1066 "Shared" : "Exclusive");
1068 AcpiOsPrintf (" Interrupts : %X ( ",
1069 ExtIrqData->NumberOfInterrupts);
1071 for (Index = 0; Index < ExtIrqData->NumberOfInterrupts; Index++)
1073 AcpiOsPrintf ("%X ", ExtIrqData->Interrupts[Index]);
1076 AcpiOsPrintf (")\n");
1078 if(0xFF != ExtIrqData->ResourceSource.Index)
1080 AcpiOsPrintf (" Resource Source Index: %X",
1081 ExtIrqData->ResourceSource.Index);
1082 AcpiOsPrintf (" Resource Source: %s",
1083 ExtIrqData->ResourceSource.StringPtr);
1090 /*******************************************************************************
1092 * FUNCTION: AcpiRsDumpResourceList
1094 * PARAMETERS: Data - pointer to the resource structure to dump.
1098 * DESCRIPTION: Dispatches the structure to the correct dump routine.
1100 ******************************************************************************/
1103 AcpiRsDumpResourceList (
1104 ACPI_RESOURCE *Resource)
1107 BOOLEAN Done = FALSE;
1110 ACPI_FUNCTION_ENTRY ();
1113 if (AcpiDbgLevel & ACPI_LV_RESOURCES && _COMPONENT & AcpiDbgLayer)
1117 AcpiOsPrintf ("Resource structure %X.\n", Count++);
1119 switch (Resource->Id)
1121 case ACPI_RSTYPE_IRQ:
1122 AcpiRsDumpIrq (&Resource->Data);
1125 case ACPI_RSTYPE_DMA:
1126 AcpiRsDumpDma (&Resource->Data);
1129 case ACPI_RSTYPE_START_DPF:
1130 AcpiRsDumpStartDependFns (&Resource->Data);
1133 case ACPI_RSTYPE_END_DPF:
1134 AcpiOsPrintf ("EndDependentFunctions Resource\n");
1135 /* AcpiRsDumpEndDependentFunctions (Resource->Data);*/
1138 case ACPI_RSTYPE_IO:
1139 AcpiRsDumpIo (&Resource->Data);
1142 case ACPI_RSTYPE_FIXED_IO:
1143 AcpiRsDumpFixedIo (&Resource->Data);
1146 case ACPI_RSTYPE_VENDOR:
1147 AcpiRsDumpVendorSpecific (&Resource->Data);
1150 case ACPI_RSTYPE_END_TAG:
1151 /*RsDumpEndTag (Resource->Data);*/
1152 AcpiOsPrintf ("EndTag Resource\n");
1156 case ACPI_RSTYPE_MEM24:
1157 AcpiRsDumpMemory24 (&Resource->Data);
1160 case ACPI_RSTYPE_MEM32:
1161 AcpiRsDumpMemory32 (&Resource->Data);
1164 case ACPI_RSTYPE_FIXED_MEM32:
1165 AcpiRsDumpFixedMemory32 (&Resource->Data);
1168 case ACPI_RSTYPE_ADDRESS16:
1169 AcpiRsDumpAddress16 (&Resource->Data);
1172 case ACPI_RSTYPE_ADDRESS32:
1173 AcpiRsDumpAddress32 (&Resource->Data);
1176 case ACPI_RSTYPE_ADDRESS64:
1177 AcpiRsDumpAddress64 (&Resource->Data);
1180 case ACPI_RSTYPE_EXT_IRQ:
1181 AcpiRsDumpExtendedIrq (&Resource->Data);
1185 AcpiOsPrintf ("Invalid resource type\n");
1190 Resource = ACPI_PTR_ADD (ACPI_RESOURCE, Resource, Resource->Length);
1197 /*******************************************************************************
1199 * FUNCTION: AcpiRsDumpIrqList
1201 * PARAMETERS: Data - pointer to the routing table to dump.
1205 * DESCRIPTION: Dispatches the structures to the correct dump routine.
1207 ******************************************************************************/
1213 UINT8 *Buffer = RouteTable;
1215 BOOLEAN Done = FALSE;
1216 ACPI_PCI_ROUTING_TABLE *PrtElement;
1219 ACPI_FUNCTION_ENTRY ();
1222 if (AcpiDbgLevel & ACPI_LV_RESOURCES && _COMPONENT & AcpiDbgLayer)
1224 PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, Buffer);
1228 AcpiOsPrintf ("PCI IRQ Routing Table structure %X.\n", Count++);
1230 AcpiOsPrintf (" Address: %8.8X%8.8X\n",
1231 ACPI_HIDWORD (PrtElement->Address),
1232 ACPI_LODWORD (PrtElement->Address));
1234 AcpiOsPrintf (" Pin: %X\n", PrtElement->Pin);
1236 AcpiOsPrintf (" Source: %s\n", PrtElement->Source);
1238 AcpiOsPrintf (" SourceIndex: %X\n",
1239 PrtElement->SourceIndex);
1241 Buffer += PrtElement->Length;
1243 PrtElement = ACPI_CAST_PTR (ACPI_PCI_ROUTING_TABLE, Buffer);
1245 if(0 == PrtElement->Length)