1 /*******************************************************************************
3 * Module Name: dmresrcl.c - "Large" Resource Descriptor disassembly
5 ******************************************************************************/
7 /******************************************************************************
11 * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
12 * All rights reserved.
16 * 2.1. This is your license from Intel Corp. under its intellectual property
17 * rights. You may have additional license terms from the party that provided
18 * you this software, covering your right to use that party's intellectual
21 * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
22 * copy of the source code appearing in this file ("Covered Code") an
23 * irrevocable, perpetual, worldwide license under Intel's copyrights in the
24 * base code distributed originally by Intel ("Original Intel Code") to copy,
25 * make derivatives, distribute, use and display any portion of the Covered
26 * Code in any form, with the right to sublicense such rights; and
28 * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
29 * license (with the right to sublicense), under only those claims of Intel
30 * patents that are infringed by the Original Intel Code, to make, use, sell,
31 * offer to sell, and import the Covered Code and derivative works thereof
32 * solely to the minimum extent necessary to exercise the above copyright
33 * license, and in no event shall the patent license extend to any additions
34 * to or modifications of the Original Intel Code. No other license or right
35 * is granted directly or by implication, estoppel or otherwise;
37 * The above copyright and patent license is granted only if the following
42 * 3.1. Redistribution of Source with Rights to Further Distribute Source.
43 * Redistribution of source code of any substantial portion of the Covered
44 * Code or modification with rights to further distribute source must include
45 * the above Copyright Notice, the above License, this list of Conditions,
46 * and the following Disclaimer and Export Compliance provision. In addition,
47 * Licensee must cause all Covered Code to which Licensee contributes to
48 * contain a file documenting the changes Licensee made to create that Covered
49 * Code and the date of any change. Licensee must include in that file the
50 * documentation of any changes made by any predecessor Licensee. Licensee
51 * must include a prominent statement that the modification is derived,
52 * directly or indirectly, from Original Intel Code.
54 * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
55 * Redistribution of source code of any substantial portion of the Covered
56 * Code or modification without rights to further distribute source must
57 * include the following Disclaimer and Export Compliance provision in the
58 * documentation and/or other materials provided with distribution. In
59 * addition, Licensee may not authorize further sublicense of source of any
60 * portion of the Covered Code, and must include terms to the effect that the
61 * license from Licensee to its licensee is limited to the intellectual
62 * property embodied in the software Licensee provides to its licensee, and
63 * not to intellectual property embodied in modifications its licensee may
66 * 3.3. Redistribution of Executable. Redistribution in executable form of any
67 * substantial portion of the Covered Code or modification must reproduce the
68 * above Copyright Notice, and the following Disclaimer and Export Compliance
69 * provision in the documentation and/or other materials provided with the
72 * 3.4. Intel retains all right, title, and interest in and to the Original
75 * 3.5. Neither the name Intel nor any other trademark owned or controlled by
76 * Intel shall be used in advertising or otherwise to promote the sale, use or
77 * other dealings in products derived from or relating to the Covered Code
78 * without prior written authorization from Intel.
80 * 4. Disclaimer and Export Compliance
82 * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
83 * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
84 * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
85 * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
86 * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
87 * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
90 * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
91 * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
92 * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
93 * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
94 * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
95 * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
96 * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
99 * 4.3. Licensee shall not export, either directly or indirectly, any of this
100 * software or system incorporating such software without first obtaining any
101 * required license or other approval from the U. S. Department of Commerce or
102 * any other agency or department of the United States Government. In the
103 * event Licensee exports any such software from the United States or
104 * re-exports any such software from a foreign destination, Licensee shall
105 * ensure that the distribution and export/re-export of the software is in
106 * compliance with all laws, regulations, orders, or other restrictions of the
107 * U.S. Export Administration Regulations. Licensee agrees that neither it nor
108 * any of its subsidiaries will export/re-export any technical data, process,
109 * software, or service, directly or indirectly, to any country for which the
110 * United States government or any agency thereof requires an export license,
111 * other governmental approval, or letter of assurance, without first obtaining
112 * such license, approval or letter.
114 *****************************************************************************/
117 #include <contrib/dev/acpica/include/acpi.h>
118 #include <contrib/dev/acpica/include/accommon.h>
119 #include <contrib/dev/acpica/include/acdisasm.h>
122 #ifdef ACPI_DISASSEMBLER
124 #define _COMPONENT ACPI_CA_DEBUGGER
125 ACPI_MODULE_NAME ("dbresrcl")
128 /* Common names for address and memory descriptors */
130 static char *AcpiDmAddressNames[] =
135 "Translation Offset",
139 static char *AcpiDmMemoryNames[] =
148 /* Local prototypes */
160 UINT8 SpecificFlags);
165 UINT8 SpecificFlags);
169 UINT8 SpecificFlags);
172 AcpiDmResourceSource (
173 AML_RESOURCE *Resource,
174 ACPI_SIZE MinimumLength,
178 AcpiDmAddressFields (
184 AcpiDmAddressPrefix (
188 AcpiDmAddressCommon (
189 AML_RESOURCE *Resource,
195 AML_RESOURCE *Resource);
198 /*******************************************************************************
200 * FUNCTION: AcpiDmMemoryFields
202 * PARAMETERS: Source - Pointer to the contiguous data fields
203 * Type - 16 or 32 (bit)
204 * Level - Current source code indentation level
208 * DESCRIPTION: Decode fields common to Memory24 and Memory32 descriptors
210 ******************************************************************************/
221 for (i = 0; i < 4; i++)
223 AcpiDmIndent (Level + 1);
228 AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i],
229 AcpiDmMemoryNames[i]);
233 AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i],
234 AcpiDmMemoryNames[i]);
244 /*******************************************************************************
246 * FUNCTION: AcpiDmAddressFields
248 * PARAMETERS: Source - Pointer to the contiguous data fields
249 * Type - 16, 32, or 64 (bit)
250 * Level - Current source code indentation level
254 * DESCRIPTION: Decode fields common to address descriptors
256 ******************************************************************************/
259 AcpiDmAddressFields (
269 for (i = 0; i < 5; i++)
271 AcpiDmIndent (Level + 1);
276 AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i],
277 AcpiDmAddressNames[i]);
281 AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i],
282 AcpiDmAddressNames[i]);
286 AcpiDmDumpInteger64 (ACPI_CAST_PTR (UINT64, Source)[i],
287 AcpiDmAddressNames[i]);
297 /*******************************************************************************
299 * FUNCTION: AcpiDmAddressPrefix
301 * PARAMETERS: Type - Descriptor type
305 * DESCRIPTION: Emit name prefix representing the address descriptor type
307 ******************************************************************************/
310 AcpiDmAddressPrefix (
316 case ACPI_RESOURCE_TYPE_ADDRESS16:
317 AcpiOsPrintf ("Word");
320 case ACPI_RESOURCE_TYPE_ADDRESS32:
321 AcpiOsPrintf ("DWord");
324 case ACPI_RESOURCE_TYPE_ADDRESS64:
325 AcpiOsPrintf ("QWord");
328 case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
329 AcpiOsPrintf ("Extended");
338 /*******************************************************************************
340 * FUNCTION: AcpiDmAddressCommon
342 * PARAMETERS: Resource - Raw AML descriptor
343 * Type - Descriptor type
344 * Level - Current source code indentation level
348 * DESCRIPTION: Emit common name and flag fields common to address descriptors
350 ******************************************************************************/
353 AcpiDmAddressCommon (
354 AML_RESOURCE *Resource,
363 ResourceType = Resource->Address.ResourceType;
364 SpecificFlags = Resource->Address.SpecificFlags;
365 Flags = Resource->Address.Flags;
367 AcpiDmIndent (Level);
369 /* Validate ResourceType */
371 if ((ResourceType > 2) && (ResourceType < 0xC0))
373 AcpiOsPrintf ("/**** Invalid Resource Type: 0x%X ****/", ResourceType);
377 /* Prefix is either Word, DWord, QWord, or Extended */
379 AcpiDmAddressPrefix (Type);
381 /* Resource Types above 0xC0 are vendor-defined */
383 if (ResourceType > 2)
385 AcpiOsPrintf ("Space (0x%2.2X, ", ResourceType);
386 AcpiDmSpaceFlags (Flags);
387 AcpiOsPrintf (" 0x%2.2X,", SpecificFlags);
391 /* This is either a Memory, IO, or BusNumber descriptor (0,1,2) */
393 AcpiOsPrintf ("%s (", AcpiGbl_WordDecode [ResourceType & 0x3]);
395 /* Decode the general and type-specific flags */
397 if (ResourceType == ACPI_MEMORY_RANGE)
399 AcpiDmMemoryFlags (Flags, SpecificFlags);
401 else /* IO range or BusNumberRange */
403 AcpiDmIoFlags (Flags);
404 if (ResourceType == ACPI_IO_RANGE)
406 AcpiOsPrintf (" %s,", AcpiGbl_RngDecode [SpecificFlags & 0x3]);
412 /*******************************************************************************
414 * FUNCTION: AcpiDmAddressFlags
416 * PARAMETERS: Resource - Raw AML descriptor
420 * DESCRIPTION: Emit flags common to address descriptors
422 ******************************************************************************/
426 AML_RESOURCE *Resource)
429 if (Resource->Address.ResourceType == ACPI_IO_RANGE)
431 AcpiDmIoFlags2 (Resource->Address.SpecificFlags);
433 else if (Resource->Address.ResourceType == ACPI_MEMORY_RANGE)
435 AcpiDmMemoryFlags2 (Resource->Address.SpecificFlags);
440 /*******************************************************************************
442 * FUNCTION: AcpiDmSpaceFlags
444 * PARAMETERS: Flags - Flag byte to be decoded
448 * DESCRIPTION: Decode the flags specific to Space Address space descriptors
450 ******************************************************************************/
457 AcpiOsPrintf ("%s, %s, %s, %s,",
458 AcpiGbl_ConsumeDecode [(Flags & 1)],
459 AcpiGbl_DecDecode [(Flags & 0x2) >> 1],
460 AcpiGbl_MinDecode [(Flags & 0x4) >> 2],
461 AcpiGbl_MaxDecode [(Flags & 0x8) >> 3]);
465 /*******************************************************************************
467 * FUNCTION: AcpiDmIoFlags
469 * PARAMETERS: Flags - Flag byte to be decoded
473 * DESCRIPTION: Decode the flags specific to IO Address space descriptors
475 ******************************************************************************/
481 AcpiOsPrintf ("%s, %s, %s, %s,",
482 AcpiGbl_ConsumeDecode [(Flags & 1)],
483 AcpiGbl_MinDecode [(Flags & 0x4) >> 2],
484 AcpiGbl_MaxDecode [(Flags & 0x8) >> 3],
485 AcpiGbl_DecDecode [(Flags & 0x2) >> 1]);
489 /*******************************************************************************
491 * FUNCTION: AcpiDmIoFlags2
493 * PARAMETERS: SpecificFlags - "Specific" flag byte to be decoded
497 * DESCRIPTION: Decode the flags specific to IO Address space descriptors
499 ******************************************************************************/
506 AcpiOsPrintf (", %s",
507 AcpiGbl_TtpDecode [(SpecificFlags & 0x10) >> 4]);
509 /* TRS is only used if TTP is TypeTranslation */
511 if (SpecificFlags & 0x10)
513 AcpiOsPrintf (", %s",
514 AcpiGbl_TrsDecode [(SpecificFlags & 0x20) >> 5]);
519 /*******************************************************************************
521 * FUNCTION: AcpiDmMemoryFlags
523 * PARAMETERS: Flags - Flag byte to be decoded
524 * SpecificFlags - "Specific" flag byte to be decoded
528 * DESCRIPTION: Decode flags specific to Memory Address Space descriptors
530 ******************************************************************************/
538 AcpiOsPrintf ("%s, %s, %s, %s, %s, %s,",
539 AcpiGbl_ConsumeDecode [(Flags & 1)],
540 AcpiGbl_DecDecode [(Flags & 0x2) >> 1],
541 AcpiGbl_MinDecode [(Flags & 0x4) >> 2],
542 AcpiGbl_MaxDecode [(Flags & 0x8) >> 3],
543 AcpiGbl_MemDecode [(SpecificFlags & 0x6) >> 1],
544 AcpiGbl_RwDecode [(SpecificFlags & 0x1)]);
548 /*******************************************************************************
550 * FUNCTION: AcpiDmMemoryFlags2
552 * PARAMETERS: SpecificFlags - "Specific" flag byte to be decoded
556 * DESCRIPTION: Decode flags specific to Memory Address Space descriptors
558 ******************************************************************************/
565 AcpiOsPrintf (", %s, %s",
566 AcpiGbl_MtpDecode [(SpecificFlags & 0x18) >> 3],
567 AcpiGbl_TtpDecode [(SpecificFlags & 0x20) >> 5]);
571 /*******************************************************************************
573 * FUNCTION: AcpiDmResourceSource
575 * PARAMETERS: Resource - Raw AML descriptor
576 * MinimumLength - descriptor length without optional fields
581 * DESCRIPTION: Dump optional ResourceSource fields of an address descriptor
583 ******************************************************************************/
586 AcpiDmResourceSource (
587 AML_RESOURCE *Resource,
588 ACPI_SIZE MinimumTotalLength,
589 UINT32 ResourceLength)
591 UINT8 *AmlResourceSource;
595 TotalLength = ResourceLength + sizeof (AML_RESOURCE_LARGE_HEADER);
597 /* Check if the optional ResourceSource fields are present */
599 if (TotalLength <= MinimumTotalLength)
601 /* The two optional fields are not used */
603 AcpiOsPrintf (",, ");
607 /* Get a pointer to the ResourceSource */
609 AmlResourceSource = ACPI_ADD_PTR (UINT8, Resource, MinimumTotalLength);
612 * Always emit the ResourceSourceIndex (Byte)
614 * NOTE: Some ASL compilers always create a 0 byte (in the AML) for the
615 * Index even if the String does not exist. Although this is in violation
616 * of the ACPI specification, it is very important to emit ASL code that
617 * can be compiled back to the identical AML. There may be fields and/or
618 * indexes into the resource template buffer that are compiled to absolute
619 * offsets, and these will be broken if the AML length is changed.
621 AcpiOsPrintf ("0x%2.2X,", (UINT32) AmlResourceSource[0]);
623 /* Make sure that the ResourceSource string exists before dumping it */
625 if (TotalLength > (MinimumTotalLength + 1))
628 AcpiUtPrintString ((char *) &AmlResourceSource[1], ACPI_UINT8_MAX);
635 /*******************************************************************************
637 * FUNCTION: AcpiDmWordDescriptor
639 * PARAMETERS: Resource - Pointer to the resource descriptor
640 * Length - Length of the descriptor in bytes
641 * Level - Current source code indentation level
645 * DESCRIPTION: Decode a Word Address Space descriptor
647 ******************************************************************************/
650 AcpiDmWordDescriptor (
651 AML_RESOURCE *Resource,
656 /* Dump resource name and flags */
658 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS16, Level);
660 /* Dump the 5 contiguous WORD values */
662 AcpiDmAddressFields (&Resource->Address16.Granularity, 16, Level);
664 /* The ResourceSource fields are optional */
666 AcpiDmIndent (Level + 1);
667 AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS16), Length);
669 /* Insert a descriptor name */
671 AcpiDmDescriptorName ();
673 /* Type-specific flags */
675 AcpiDmAddressFlags (Resource);
676 AcpiOsPrintf (")\n");
680 /*******************************************************************************
682 * FUNCTION: AcpiDmDwordDescriptor
684 * PARAMETERS: Resource - Pointer to the resource descriptor
685 * Length - Length of the descriptor in bytes
686 * Level - Current source code indentation level
690 * DESCRIPTION: Decode a DWord Address Space descriptor
692 ******************************************************************************/
695 AcpiDmDwordDescriptor (
696 AML_RESOURCE *Resource,
701 /* Dump resource name and flags */
703 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS32, Level);
705 /* Dump the 5 contiguous DWORD values */
707 AcpiDmAddressFields (&Resource->Address32.Granularity, 32, Level);
709 /* The ResourceSource fields are optional */
711 AcpiDmIndent (Level + 1);
712 AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS32), Length);
714 /* Insert a descriptor name */
716 AcpiDmDescriptorName ();
718 /* Type-specific flags */
720 AcpiDmAddressFlags (Resource);
721 AcpiOsPrintf (")\n");
725 /*******************************************************************************
727 * FUNCTION: AcpiDmQwordDescriptor
729 * PARAMETERS: Resource - Pointer to the resource descriptor
730 * Length - Length of the descriptor in bytes
731 * Level - Current source code indentation level
735 * DESCRIPTION: Decode a QWord Address Space descriptor
737 ******************************************************************************/
740 AcpiDmQwordDescriptor (
741 AML_RESOURCE *Resource,
746 /* Dump resource name and flags */
748 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS64, Level);
750 /* Dump the 5 contiguous QWORD values */
752 AcpiDmAddressFields (&Resource->Address64.Granularity, 64, Level);
754 /* The ResourceSource fields are optional */
756 AcpiDmIndent (Level + 1);
757 AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS64), Length);
759 /* Insert a descriptor name */
761 AcpiDmDescriptorName ();
763 /* Type-specific flags */
765 AcpiDmAddressFlags (Resource);
766 AcpiOsPrintf (")\n");
770 /*******************************************************************************
772 * FUNCTION: AcpiDmExtendedDescriptor
774 * PARAMETERS: Resource - Pointer to the resource descriptor
775 * Length - Length of the descriptor in bytes
776 * Level - Current source code indentation level
780 * DESCRIPTION: Decode a Extended Address Space descriptor
782 ******************************************************************************/
785 AcpiDmExtendedDescriptor (
786 AML_RESOURCE *Resource,
791 /* Dump resource name and flags */
793 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64, Level);
795 /* Dump the 5 contiguous QWORD values */
797 AcpiDmAddressFields (&Resource->ExtAddress64.Granularity, 64, Level);
799 /* Extra field for this descriptor only */
801 AcpiDmIndent (Level + 1);
802 AcpiDmDumpInteger64 (Resource->ExtAddress64.TypeSpecific,
803 "Type-Specific Attributes");
805 /* Insert a descriptor name */
807 AcpiDmIndent (Level + 1);
808 AcpiDmDescriptorName ();
810 /* Type-specific flags */
812 AcpiDmAddressFlags (Resource);
813 AcpiOsPrintf (")\n");
817 /*******************************************************************************
819 * FUNCTION: AcpiDmMemory24Descriptor
821 * PARAMETERS: Resource - Pointer to the resource descriptor
822 * Length - Length of the descriptor in bytes
823 * Level - Current source code indentation level
827 * DESCRIPTION: Decode a Memory24 descriptor
829 ******************************************************************************/
832 AcpiDmMemory24Descriptor (
833 AML_RESOURCE *Resource,
838 /* Dump name and read/write flag */
840 AcpiDmIndent (Level);
841 AcpiOsPrintf ("Memory24 (%s,\n",
842 AcpiGbl_RwDecode [Resource->Memory24.Flags & 1]);
844 /* Dump the 4 contiguous WORD values */
846 AcpiDmMemoryFields (&Resource->Memory24.Minimum, 16, Level);
848 /* Insert a descriptor name */
850 AcpiDmIndent (Level + 1);
851 AcpiDmDescriptorName ();
852 AcpiOsPrintf (")\n");
856 /*******************************************************************************
858 * FUNCTION: AcpiDmMemory32Descriptor
860 * PARAMETERS: Resource - Pointer to the resource descriptor
861 * Length - Length of the descriptor in bytes
862 * Level - Current source code indentation level
866 * DESCRIPTION: Decode a Memory32 descriptor
868 ******************************************************************************/
871 AcpiDmMemory32Descriptor (
872 AML_RESOURCE *Resource,
877 /* Dump name and read/write flag */
879 AcpiDmIndent (Level);
880 AcpiOsPrintf ("Memory32 (%s,\n",
881 AcpiGbl_RwDecode [Resource->Memory32.Flags & 1]);
883 /* Dump the 4 contiguous DWORD values */
885 AcpiDmMemoryFields (&Resource->Memory32.Minimum, 32, Level);
887 /* Insert a descriptor name */
889 AcpiDmIndent (Level + 1);
890 AcpiDmDescriptorName ();
891 AcpiOsPrintf (")\n");
895 /*******************************************************************************
897 * FUNCTION: AcpiDmFixedMemory32Descriptor
899 * PARAMETERS: Resource - Pointer to the resource descriptor
900 * Length - Length of the descriptor in bytes
901 * Level - Current source code indentation level
905 * DESCRIPTION: Decode a Fixed Memory32 descriptor
907 ******************************************************************************/
910 AcpiDmFixedMemory32Descriptor (
911 AML_RESOURCE *Resource,
916 /* Dump name and read/write flag */
918 AcpiDmIndent (Level);
919 AcpiOsPrintf ("Memory32Fixed (%s,\n",
920 AcpiGbl_RwDecode [Resource->FixedMemory32.Flags & 1]);
922 AcpiDmIndent (Level + 1);
923 AcpiDmDumpInteger32 (Resource->FixedMemory32.Address, "Address Base");
925 AcpiDmIndent (Level + 1);
926 AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength, "Address Length");
928 /* Insert a descriptor name */
930 AcpiDmIndent (Level + 1);
931 AcpiDmDescriptorName ();
932 AcpiOsPrintf (")\n");
936 /*******************************************************************************
938 * FUNCTION: AcpiDmGenericRegisterDescriptor
940 * PARAMETERS: Resource - Pointer to the resource descriptor
941 * Length - Length of the descriptor in bytes
942 * Level - Current source code indentation level
946 * DESCRIPTION: Decode a Generic Register descriptor
948 ******************************************************************************/
951 AcpiDmGenericRegisterDescriptor (
952 AML_RESOURCE *Resource,
957 AcpiDmIndent (Level);
958 AcpiOsPrintf ("Register (");
959 AcpiDmAddressSpace (Resource->GenericReg.AddressSpaceId);
962 AcpiDmIndent (Level + 1);
963 AcpiDmDumpInteger8 (Resource->GenericReg.BitWidth, "Bit Width");
965 AcpiDmIndent (Level + 1);
966 AcpiDmDumpInteger8 (Resource->GenericReg.BitOffset, "Bit Offset");
968 AcpiDmIndent (Level + 1);
969 AcpiDmDumpInteger64 (Resource->GenericReg.Address, "Address");
971 /* Optional field for ACPI 3.0 */
973 AcpiDmIndent (Level + 1);
974 if (Resource->GenericReg.AccessSize)
976 AcpiOsPrintf ("0x%2.2X, // %s\n",
977 Resource->GenericReg.AccessSize, "Access Size");
978 AcpiDmIndent (Level + 1);
985 /* DescriptorName was added for ACPI 3.0+ */
987 AcpiDmDescriptorName ();
988 AcpiOsPrintf (")\n");
992 /*******************************************************************************
994 * FUNCTION: AcpiDmInterruptDescriptor
996 * PARAMETERS: Resource - Pointer to the resource descriptor
997 * Length - Length of the descriptor in bytes
998 * Level - Current source code indentation level
1002 * DESCRIPTION: Decode a extended Interrupt descriptor
1004 ******************************************************************************/
1007 AcpiDmInterruptDescriptor (
1008 AML_RESOURCE *Resource,
1015 AcpiDmIndent (Level);
1016 AcpiOsPrintf ("Interrupt (%s, %s, %s, %s, ",
1017 AcpiGbl_ConsumeDecode [(Resource->ExtendedIrq.Flags & 1)],
1018 AcpiGbl_HeDecode [(Resource->ExtendedIrq.Flags >> 1) & 1],
1019 AcpiGbl_LlDecode [(Resource->ExtendedIrq.Flags >> 2) & 1],
1020 AcpiGbl_ShrDecode [(Resource->ExtendedIrq.Flags >> 3) & 1]);
1023 * The ResourceSource fields are optional and appear after the interrupt
1024 * list. Must compute length based on length of the list. First xrupt
1025 * is included in the struct (reason for -1 below)
1027 AcpiDmResourceSource (Resource,
1028 sizeof (AML_RESOURCE_EXTENDED_IRQ) +
1029 ((UINT32) Resource->ExtendedIrq.InterruptCount - 1) * sizeof (UINT32),
1030 Resource->ExtendedIrq.ResourceLength);
1032 /* Insert a descriptor name */
1034 AcpiDmDescriptorName ();
1035 AcpiOsPrintf (")\n");
1037 /* Dump the interrupt list */
1039 AcpiDmIndent (Level);
1040 AcpiOsPrintf ("{\n");
1041 for (i = 0; i < Resource->ExtendedIrq.InterruptCount; i++)
1043 AcpiDmIndent (Level + 1);
1044 AcpiOsPrintf ("0x%8.8X,\n",
1045 (UINT32) Resource->ExtendedIrq.Interrupts[i]);
1048 AcpiDmIndent (Level);
1049 AcpiOsPrintf ("}\n");
1053 /*******************************************************************************
1055 * FUNCTION: AcpiDmVendorCommon
1057 * PARAMETERS: Name - Descriptor name suffix
1058 * ByteData - Pointer to the vendor byte data
1059 * Length - Length of the byte data
1060 * Level - Current source code indentation level
1064 * DESCRIPTION: Decode a Vendor descriptor, both Large and Small
1066 ******************************************************************************/
1069 AcpiDmVendorCommon (
1076 /* Dump macro name */
1078 AcpiDmIndent (Level);
1079 AcpiOsPrintf ("Vendor%s (", Name);
1081 /* Insert a descriptor name */
1083 AcpiDmDescriptorName ();
1084 AcpiOsPrintf (") // Length = 0x%.2X\n", Length);
1086 /* Dump the vendor bytes */
1088 AcpiDmIndent (Level);
1089 AcpiOsPrintf ("{\n");
1091 AcpiDmDisasmByteList (Level + 1, ByteData, Length);
1093 AcpiDmIndent (Level);
1094 AcpiOsPrintf ("}\n");
1098 /*******************************************************************************
1100 * FUNCTION: AcpiDmVendorLargeDescriptor
1102 * PARAMETERS: Resource - Pointer to the resource descriptor
1103 * Length - Length of the descriptor in bytes
1104 * Level - Current source code indentation level
1108 * DESCRIPTION: Decode a Vendor Large descriptor
1110 ******************************************************************************/
1113 AcpiDmVendorLargeDescriptor (
1114 AML_RESOURCE *Resource,
1119 AcpiDmVendorCommon ("Long ",
1120 ACPI_ADD_PTR (UINT8, Resource, sizeof (AML_RESOURCE_LARGE_HEADER)),