1 /*******************************************************************************
3 * Module Name: dmresrcl.c - "Large" Resource Descriptor disassembly
6 ******************************************************************************/
8 /******************************************************************************
12 * Some or all of this work - Copyright (c) 1999 - 2005, 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 *****************************************************************************/
118 #include <contrib/dev/acpica/acpi.h>
119 #include <contrib/dev/acpica/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[] =
132 "Address Space Granularity",
133 "Address Range Minimum",
134 "Address Range Maximum",
135 "Address Translation Offset",
139 static char *AcpiDmMemoryNames[] =
141 "Address Range Minimum",
142 "Address Range Maximum",
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 (((UINT16 *) Source)[i], AcpiDmMemoryNames[i]);
232 AcpiDmDumpInteger32 (((UINT32 *) Source)[i], AcpiDmMemoryNames[i]);
242 /*******************************************************************************
246 * PARAMETERS: Source - Pointer to the contiguous data fields
247 * Type - 16, 32, or 64 (bit)
248 * Level - Current source code indentation level
252 * DESCRIPTION: Decode fields common to address descriptors
254 ******************************************************************************/
257 AcpiDmAddressFields (
267 for (i = 0; i < 5; i++)
269 AcpiDmIndent (Level + 1);
274 AcpiDmDumpInteger16 (((UINT16 *) Source)[i], AcpiDmAddressNames[i]);
278 AcpiDmDumpInteger32 (((UINT32 *) Source)[i], AcpiDmAddressNames[i]);
282 AcpiDmDumpInteger64 (((UINT64 *) Source)[i], AcpiDmAddressNames[i]);
292 /*******************************************************************************
294 * FUNCTION: AcpiDmAddressPrefix
296 * PARAMETERS: Type - Descriptor type
300 * DESCRIPTION: Emit name prefix representing the address descriptor type
302 ******************************************************************************/
305 AcpiDmAddressPrefix (
311 case ACPI_RESOURCE_TYPE_ADDRESS16:
312 AcpiOsPrintf ("Word");
315 case ACPI_RESOURCE_TYPE_ADDRESS32:
316 AcpiOsPrintf ("DWord");
319 case ACPI_RESOURCE_TYPE_ADDRESS64:
320 AcpiOsPrintf ("QWord");
323 case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
324 AcpiOsPrintf ("Extended");
333 /*******************************************************************************
335 * FUNCTION: AcpiDmAddressCommon
337 * PARAMETERS: Resource - Raw AML descriptor
338 * Type - Descriptor type
339 * Level - Current source code indentation level
343 * DESCRIPTION: Emit common name and flag fields common to address descriptors
345 ******************************************************************************/
348 AcpiDmAddressCommon (
349 AML_RESOURCE *Resource,
358 ResourceType = Resource->Address.ResourceType;
359 SpecificFlags = Resource->Address.SpecificFlags;
360 Flags = Resource->Address.Flags;
362 AcpiDmIndent (Level);
364 /* Validate ResourceType */
366 if ((ResourceType > 2) && (ResourceType < 0xC0))
368 AcpiOsPrintf ("/**** Invalid Resource Type: 0x%X ****/", ResourceType);
372 /* Prefix is either Word, DWord, QWord, or Extended */
374 AcpiDmAddressPrefix (Type);
376 /* Resource Types above 0xC0 are vendor-defined */
378 if (ResourceType > 2)
380 AcpiOsPrintf ("Space (0x%2.2X, ", ResourceType);
381 AcpiDmSpaceFlags (Flags);
382 AcpiOsPrintf (" 0x%2.2X,", SpecificFlags);
386 /* This is either a Memory, IO, or BusNumber descriptor (0,1,2) */
388 AcpiOsPrintf ("%s (", AcpiGbl_WordDecode [ResourceType]);
390 /* Decode the general and type-specific flags */
392 if (ResourceType == ACPI_MEMORY_RANGE)
394 AcpiDmMemoryFlags (Flags, SpecificFlags);
396 else /* IO range or BusNumberRange */
398 AcpiDmIoFlags (Flags);
399 if (ResourceType == ACPI_IO_RANGE)
401 AcpiOsPrintf (" %s,", AcpiGbl_RNGDecode [SpecificFlags & 0x3]);
407 /*******************************************************************************
409 * FUNCTION: AcpiDmAddressFlags
411 * PARAMETERS: Resource - Raw AML descriptor
415 * DESCRIPTION: Emit flags common to address descriptors
417 ******************************************************************************/
421 AML_RESOURCE *Resource)
424 if (Resource->Address.ResourceType == ACPI_IO_RANGE)
426 AcpiDmIoFlags2 (Resource->Address.SpecificFlags);
428 else if (Resource->Address.ResourceType == ACPI_MEMORY_RANGE)
430 AcpiDmMemoryFlags2 (Resource->Address.SpecificFlags);
435 /*******************************************************************************
437 * FUNCTION: AcpiDmSpaceFlags
439 * PARAMETERS: Flags - Flag byte to be decoded
443 * DESCRIPTION: Decode the flags specific to Space Address space descriptors
445 ******************************************************************************/
452 AcpiOsPrintf ("%s, %s, %s, %s,",
453 AcpiGbl_ConsumeDecode [(Flags & 1)],
454 AcpiGbl_DECDecode [(Flags & 0x2) >> 1],
455 AcpiGbl_MinDecode [(Flags & 0x4) >> 2],
456 AcpiGbl_MaxDecode [(Flags & 0x8) >> 3]);
460 /*******************************************************************************
462 * FUNCTION: AcpiDmIoFlags
464 * PARAMETERS: Flags - Flag byte to be decoded
468 * DESCRIPTION: Decode the flags specific to IO Address space descriptors
470 ******************************************************************************/
476 AcpiOsPrintf ("%s, %s, %s, %s,",
477 AcpiGbl_ConsumeDecode [(Flags & 1)],
478 AcpiGbl_MinDecode [(Flags & 0x4) >> 2],
479 AcpiGbl_MaxDecode [(Flags & 0x8) >> 3],
480 AcpiGbl_DECDecode [(Flags & 0x2) >> 1]);
484 /*******************************************************************************
486 * FUNCTION: AcpiDmIoFlags2
488 * PARAMETERS: SpecificFlags - "Specific" flag byte to be decoded
492 * DESCRIPTION: Decode the flags specific to IO Address space descriptors
494 ******************************************************************************/
501 AcpiOsPrintf (", %s",
502 AcpiGbl_TTPDecode [(SpecificFlags & 0x10) >> 4]);
504 /* TRS is only used if TTP is TypeTranslation */
506 if (SpecificFlags & 0x10)
508 AcpiOsPrintf (", %s",
509 AcpiGbl_TRSDecode [(SpecificFlags & 0x20) >> 5]);
514 /*******************************************************************************
516 * FUNCTION: AcpiDmMemoryFlags
518 * PARAMETERS: Flags - Flag byte to be decoded
519 * SpecificFlags - "Specific" flag byte to be decoded
523 * DESCRIPTION: Decode flags specific to Memory Address Space descriptors
525 ******************************************************************************/
533 AcpiOsPrintf ("%s, %s, %s, %s, %s, %s,",
534 AcpiGbl_ConsumeDecode [(Flags & 1)],
535 AcpiGbl_DECDecode [(Flags & 0x2) >> 1],
536 AcpiGbl_MinDecode [(Flags & 0x4) >> 2],
537 AcpiGbl_MaxDecode [(Flags & 0x8) >> 3],
538 AcpiGbl_MEMDecode [(SpecificFlags & 0x6) >> 1],
539 AcpiGbl_RWDecode [(SpecificFlags & 0x1)]);
543 /*******************************************************************************
545 * FUNCTION: AcpiDmMemoryFlags2
547 * PARAMETERS: SpecificFlags - "Specific" flag byte to be decoded
551 * DESCRIPTION: Decode flags specific to Memory Address Space descriptors
553 ******************************************************************************/
560 AcpiOsPrintf (", %s, %s",
561 AcpiGbl_MTPDecode [(SpecificFlags & 0x18) >> 3],
562 AcpiGbl_TTPDecode [(SpecificFlags & 0x20) >> 5]);
566 /*******************************************************************************
568 * FUNCTION: AcpiDmResourceSource
570 * PARAMETERS: Resource - Raw AML descriptor
571 * MinimumLength - descriptor length without optional fields
576 * DESCRIPTION: Dump optional ResourceSource fields of an address descriptor
578 ******************************************************************************/
581 AcpiDmResourceSource (
582 AML_RESOURCE *Resource,
583 ACPI_SIZE MinimumTotalLength,
584 UINT32 ResourceLength)
586 UINT8 *AmlResourceSource;
590 TotalLength = ResourceLength + sizeof (AML_RESOURCE_LARGE_HEADER);
592 /* Check if the optional ResourceSource fields are present */
594 if (TotalLength <= MinimumTotalLength)
596 /* The two optional fields are not used */
602 /* Get a pointer to the ResourceSource */
604 AmlResourceSource = ((UINT8 *) Resource) + MinimumTotalLength;
607 * Always emit the ResourceSourceIndex (Byte)
609 * NOTE: Some ASL compilers always create a 0 byte (in the AML) for the
610 * Index even if the String does not exist. Although this is in violation
611 * of the ACPI specification, it is very important to emit ASL code that
612 * can be compiled back to the identical AML. There may be fields and/or
613 * indexes into the resource template buffer that are compiled to absolute
614 * offsets, and these will be broken if the AML length is changed.
616 AcpiOsPrintf ("0x%2.2X,", (UINT32) AmlResourceSource[0]);
618 /* Make sure that the ResourceSource string exists before dumping it */
620 if (TotalLength > (MinimumTotalLength + 1))
623 AcpiUtPrintString ((char *) &AmlResourceSource[1], ACPI_UINT8_MAX);
630 /*******************************************************************************
632 * FUNCTION: AcpiDmWordDescriptor
634 * PARAMETERS: Resource - Pointer to the resource descriptor
635 * Length - Length of the descriptor in bytes
636 * Level - Current source code indentation level
640 * DESCRIPTION: Decode a Word Address Space descriptor
642 ******************************************************************************/
645 AcpiDmWordDescriptor (
646 AML_RESOURCE *Resource,
651 /* Dump resource name and flags */
653 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS16, Level);
655 /* Dump the 5 contiguous WORD values */
657 AcpiDmAddressFields (&Resource->Address16.Granularity, 16, Level);
659 /* The ResourceSource fields are optional */
661 AcpiDmIndent (Level + 1);
662 AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS16), Length);
664 /* Type-specific flags */
666 AcpiDmAddressFlags (Resource);
667 AcpiOsPrintf (")\n");
671 /*******************************************************************************
673 * FUNCTION: AcpiDmDwordDescriptor
675 * PARAMETERS: Resource - Pointer to the resource descriptor
676 * Length - Length of the descriptor in bytes
677 * Level - Current source code indentation level
681 * DESCRIPTION: Decode a DWord Address Space descriptor
683 ******************************************************************************/
686 AcpiDmDwordDescriptor (
687 AML_RESOURCE *Resource,
692 /* Dump resource name and flags */
694 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS32, Level);
696 /* Dump the 5 contiguous DWORD values */
698 AcpiDmAddressFields (&Resource->Address32.Granularity, 32, Level);
700 /* The ResourceSource fields are optional */
702 AcpiDmIndent (Level + 1);
703 AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS32), Length);
705 /* Type-specific flags */
707 AcpiDmAddressFlags (Resource);
708 AcpiOsPrintf (")\n");
712 /*******************************************************************************
714 * FUNCTION: AcpiDmQwordDescriptor
716 * PARAMETERS: Resource - Pointer to the resource descriptor
717 * Length - Length of the descriptor in bytes
718 * Level - Current source code indentation level
722 * DESCRIPTION: Decode a QWord Address Space descriptor
724 ******************************************************************************/
727 AcpiDmQwordDescriptor (
728 AML_RESOURCE *Resource,
733 /* Dump resource name and flags */
735 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS64, Level);
737 /* Dump the 5 contiguous QWORD values */
739 AcpiDmAddressFields (&Resource->Address64.Granularity, 64, Level);
741 /* The ResourceSource fields are optional */
743 AcpiDmIndent (Level + 1);
744 AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS64), Length);
746 /* Type-specific flags */
748 AcpiDmAddressFlags (Resource);
749 AcpiOsPrintf (")\n");
753 /*******************************************************************************
755 * FUNCTION: AcpiDmExtendedDescriptor
757 * PARAMETERS: Resource - Pointer to the resource descriptor
758 * Length - Length of the descriptor in bytes
759 * Level - Current source code indentation level
763 * DESCRIPTION: Decode a Extended Address Space descriptor
765 ******************************************************************************/
768 AcpiDmExtendedDescriptor (
769 AML_RESOURCE *Resource,
774 /* Dump resource name and flags */
776 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64, Level);
778 /* Dump the 5 contiguous QWORD values */
780 AcpiDmAddressFields (&Resource->ExtAddress64.Granularity, 64, Level);
782 /* Extra field for this descriptor only */
784 AcpiDmIndent (Level + 1);
785 AcpiDmDumpInteger64 (Resource->ExtAddress64.TypeSpecific,
786 "Type-Specific Attributes");
788 /* Type-specific flags */
790 AcpiDmIndent (Level + 1);
791 AcpiDmAddressFlags (Resource);
792 AcpiOsPrintf (")\n");
796 /*******************************************************************************
798 * FUNCTION: AcpiDmMemory24Descriptor
800 * PARAMETERS: Resource - Pointer to the resource descriptor
801 * Length - Length of the descriptor in bytes
802 * Level - Current source code indentation level
806 * DESCRIPTION: Decode a Memory24 descriptor
808 ******************************************************************************/
811 AcpiDmMemory24Descriptor (
812 AML_RESOURCE *Resource,
817 /* Dump name and read/write flag */
819 AcpiDmIndent (Level);
820 AcpiOsPrintf ("Memory24 (%s,\n",
821 AcpiGbl_RWDecode [Resource->Memory24.Flags & 1]);
823 /* Dump the 4 contiguous WORD values */
825 AcpiDmMemoryFields (&Resource->Memory24.Minimum, 16, Level);
827 AcpiDmIndent (Level + 1);
828 AcpiOsPrintf (")\n");
832 /*******************************************************************************
834 * FUNCTION: AcpiDmMemory32Descriptor
836 * PARAMETERS: Resource - Pointer to the resource descriptor
837 * Length - Length of the descriptor in bytes
838 * Level - Current source code indentation level
842 * DESCRIPTION: Decode a Memory32 descriptor
844 ******************************************************************************/
847 AcpiDmMemory32Descriptor (
848 AML_RESOURCE *Resource,
853 /* Dump name and read/write flag */
855 AcpiDmIndent (Level);
856 AcpiOsPrintf ("Memory32 (%s,\n",
857 AcpiGbl_RWDecode [Resource->Memory32.Flags & 1]);
859 /* Dump the 4 contiguous DWORD values */
861 AcpiDmMemoryFields (&Resource->Memory32.Minimum, 32, Level);
863 AcpiDmIndent (Level + 1);
864 AcpiOsPrintf (")\n");
868 /*******************************************************************************
870 * FUNCTION: AcpiDmFixedMemory32Descriptor
872 * PARAMETERS: Resource - Pointer to the resource descriptor
873 * Length - Length of the descriptor in bytes
874 * Level - Current source code indentation level
878 * DESCRIPTION: Decode a Fixed Memory32 descriptor
880 ******************************************************************************/
883 AcpiDmFixedMemory32Descriptor (
884 AML_RESOURCE *Resource,
889 /* Dump name and read/write flag */
891 AcpiDmIndent (Level);
892 AcpiOsPrintf ("Memory32Fixed (%s,\n",
893 AcpiGbl_RWDecode [Resource->FixedMemory32.Flags & 1]);
895 AcpiDmIndent (Level + 1);
896 AcpiDmDumpInteger32 (Resource->FixedMemory32.Address, "Address Base");
898 AcpiDmIndent (Level + 1);
899 AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength, "Address Length");
901 AcpiDmIndent (Level + 1);
902 AcpiOsPrintf (")\n");
906 /*******************************************************************************
908 * FUNCTION: AcpiDmGenericRegisterDescriptor
910 * PARAMETERS: Resource - Pointer to the resource descriptor
911 * Length - Length of the descriptor in bytes
912 * Level - Current source code indentation level
916 * DESCRIPTION: Decode a Generic Register descriptor
918 ******************************************************************************/
921 AcpiDmGenericRegisterDescriptor (
922 AML_RESOURCE *Resource,
927 AcpiDmIndent (Level);
928 AcpiOsPrintf ("Register (");
929 AcpiDmAddressSpace (Resource->GenericReg.AddressSpaceId);
932 AcpiDmIndent (Level + 1);
933 AcpiDmDumpInteger8 (Resource->GenericReg.BitWidth, "Register Bit Width");
935 AcpiDmIndent (Level + 1);
936 AcpiDmDumpInteger8 (Resource->GenericReg.BitOffset, "Register Bit Offset");
938 AcpiDmIndent (Level + 1);
939 AcpiDmDumpInteger64 (Resource->GenericReg.Address, "Register Address");
941 /* Optional field for ACPI 3.0 */
943 if (Resource->GenericReg.AccessSize)
945 AcpiDmIndent (Level + 1);
946 AcpiOsPrintf ("0x%2.2X // %s\n",
947 Resource->GenericReg.AccessSize, "Access Size");
950 AcpiDmIndent (Level + 1);
951 AcpiOsPrintf (")\n");
955 /*******************************************************************************
957 * FUNCTION: AcpiDmInterruptDescriptor
959 * PARAMETERS: Resource - Pointer to the resource descriptor
960 * Length - Length of the descriptor in bytes
961 * Level - Current source code indentation level
965 * DESCRIPTION: Decode a extended Interrupt descriptor
967 ******************************************************************************/
970 AcpiDmInterruptDescriptor (
971 AML_RESOURCE *Resource,
978 AcpiDmIndent (Level);
979 AcpiOsPrintf ("Interrupt (%s, %s, %s, %s, ",
980 AcpiGbl_ConsumeDecode [(Resource->ExtendedIrq.Flags & 1)],
981 AcpiGbl_HEDecode [(Resource->ExtendedIrq.Flags >> 1) & 1],
982 AcpiGbl_LLDecode [(Resource->ExtendedIrq.Flags >> 2) & 1],
983 AcpiGbl_SHRDecode [(Resource->ExtendedIrq.Flags >> 3) & 1]);
986 * The ResourceSource fields are optional and appear after the interrupt
987 * list. Must compute length based on length of the list. First xrupt
988 * is included in the struct (reason for -1 below)
990 AcpiDmResourceSource (Resource,
991 sizeof (AML_RESOURCE_EXTENDED_IRQ) +
992 (Resource->ExtendedIrq.InterruptCount - 1) * sizeof (UINT32),
993 Resource->ExtendedIrq.ResourceLength);
995 /* Dump the interrupt list */
997 AcpiOsPrintf (")\n");
998 AcpiDmIndent (Level);
999 AcpiOsPrintf ("{\n");
1000 for (i = 0; i < Resource->ExtendedIrq.InterruptCount; i++)
1002 AcpiDmIndent (Level + 1);
1003 AcpiOsPrintf ("0x%8.8X,\n",
1004 (UINT32) Resource->ExtendedIrq.Interrupts[i]);
1007 AcpiDmIndent (Level);
1008 AcpiOsPrintf ("}\n");
1012 /*******************************************************************************
1014 * FUNCTION: AcpiDmVendorCommon
1016 * PARAMETERS: Name - Descriptor name suffix
1017 * ByteData - Pointer to the vendor byte data
1018 * Length - Length of the byte data
1019 * Level - Current source code indentation level
1023 * DESCRIPTION: Decode a Vendor descriptor, both Large and Small
1025 ******************************************************************************/
1028 AcpiDmVendorCommon (
1035 /* Dump descriptor name */
1037 AcpiDmIndent (Level);
1038 AcpiOsPrintf ("Vendor%s // Length = 0x%.2X\n", Name, Length);
1040 /* Dump the vendor bytes */
1042 AcpiDmIndent (Level);
1043 AcpiOsPrintf ("{\n");
1045 AcpiDmDisasmByteList (Level + 1, ByteData, Length);
1047 AcpiDmIndent (Level);
1048 AcpiOsPrintf ("}\n");
1052 /*******************************************************************************
1054 * FUNCTION: AcpiDmVendorLargeDescriptor
1056 * PARAMETERS: Resource - Pointer to the resource descriptor
1057 * Length - Length of the descriptor in bytes
1058 * Level - Current source code indentation level
1062 * DESCRIPTION: Decode a Vendor Large descriptor
1064 ******************************************************************************/
1067 AcpiDmVendorLargeDescriptor (
1068 AML_RESOURCE *Resource,
1073 AcpiDmVendorCommon ("Long () ",
1074 ((UINT8 *) Resource) + sizeof (AML_RESOURCE_LARGE_HEADER),