1 /*******************************************************************************
3 * Module Name: dmresrcl.c - "Large" Resource Descriptor disassembly
5 ******************************************************************************/
8 * Copyright (C) 2000 - 2015, Intel Corp.
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 <contrib/dev/acpica/include/acpi.h>
45 #include <contrib/dev/acpica/include/accommon.h>
46 #include <contrib/dev/acpica/include/acdisasm.h>
49 #ifdef ACPI_DISASSEMBLER
51 #define _COMPONENT ACPI_CA_DEBUGGER
52 ACPI_MODULE_NAME ("dbresrcl")
55 /* Common names for address and memory descriptors */
57 static char *AcpiDmAddressNames[] =
66 static char *AcpiDmMemoryNames[] =
75 /* Local prototypes */
99 AcpiDmResourceSource (
100 AML_RESOURCE *Resource,
101 ACPI_SIZE MinimumLength,
105 AcpiDmAddressFields (
111 AcpiDmAddressPrefix (
115 AcpiDmAddressCommon (
116 AML_RESOURCE *Resource,
122 AML_RESOURCE *Resource);
125 /*******************************************************************************
127 * FUNCTION: AcpiDmMemoryFields
129 * PARAMETERS: Source - Pointer to the contiguous data fields
130 * Type - 16 or 32 (bit)
131 * Level - Current source code indentation level
135 * DESCRIPTION: Decode fields common to Memory24 and Memory32 descriptors
137 ******************************************************************************/
148 for (i = 0; i < 4; i++)
150 AcpiDmIndent (Level + 1);
156 AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i],
157 AcpiDmMemoryNames[i]);
162 AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i],
163 AcpiDmMemoryNames[i]);
174 /*******************************************************************************
176 * FUNCTION: AcpiDmAddressFields
178 * PARAMETERS: Source - Pointer to the contiguous data fields
179 * Type - 16, 32, or 64 (bit)
180 * Level - Current source code indentation level
184 * DESCRIPTION: Decode fields common to address descriptors
186 ******************************************************************************/
189 AcpiDmAddressFields (
199 for (i = 0; i < 5; i++)
201 AcpiDmIndent (Level + 1);
207 AcpiDmDumpInteger16 (ACPI_CAST_PTR (UINT16, Source)[i],
208 AcpiDmAddressNames[i]);
213 AcpiDmDumpInteger32 (ACPI_CAST_PTR (UINT32, Source)[i],
214 AcpiDmAddressNames[i]);
219 AcpiDmDumpInteger64 (ACPI_CAST_PTR (UINT64, Source)[i],
220 AcpiDmAddressNames[i]);
231 /*******************************************************************************
233 * FUNCTION: AcpiDmAddressPrefix
235 * PARAMETERS: Type - Descriptor type
239 * DESCRIPTION: Emit name prefix representing the address descriptor type
241 ******************************************************************************/
244 AcpiDmAddressPrefix (
250 case ACPI_RESOURCE_TYPE_ADDRESS16:
252 AcpiOsPrintf ("Word");
255 case ACPI_RESOURCE_TYPE_ADDRESS32:
257 AcpiOsPrintf ("DWord");
260 case ACPI_RESOURCE_TYPE_ADDRESS64:
262 AcpiOsPrintf ("QWord");
265 case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
267 AcpiOsPrintf ("Extended");
277 /*******************************************************************************
279 * FUNCTION: AcpiDmAddressCommon
281 * PARAMETERS: Resource - Raw AML descriptor
282 * Type - Descriptor type
283 * Level - Current source code indentation level
287 * DESCRIPTION: Emit common name and flag fields common to address descriptors
289 ******************************************************************************/
292 AcpiDmAddressCommon (
293 AML_RESOURCE *Resource,
302 ResourceType = Resource->Address.ResourceType;
303 SpecificFlags = Resource->Address.SpecificFlags;
304 Flags = Resource->Address.Flags;
306 AcpiDmIndent (Level);
308 /* Validate ResourceType */
310 if ((ResourceType > 2) && (ResourceType < 0xC0))
312 AcpiOsPrintf ("/**** Invalid Resource Type: 0x%X ****/", ResourceType);
316 /* Prefix is either Word, DWord, QWord, or Extended */
318 AcpiDmAddressPrefix (Type);
320 /* Resource Types above 0xC0 are vendor-defined */
322 if (ResourceType > 2)
324 AcpiOsPrintf ("Space (0x%2.2X, ", ResourceType);
325 AcpiDmSpaceFlags (Flags);
326 AcpiOsPrintf (" 0x%2.2X,", SpecificFlags);
330 /* This is either a Memory, IO, or BusNumber descriptor (0,1,2) */
332 AcpiOsPrintf ("%s (", AcpiGbl_WordDecode [ACPI_GET_2BIT_FLAG (ResourceType)]);
334 /* Decode the general and type-specific flags */
336 if (ResourceType == ACPI_MEMORY_RANGE)
338 AcpiDmMemoryFlags (Flags, SpecificFlags);
340 else /* IO range or BusNumberRange */
342 AcpiDmIoFlags (Flags);
343 if (ResourceType == ACPI_IO_RANGE)
345 AcpiOsPrintf (" %s,", AcpiGbl_RngDecode [ACPI_GET_2BIT_FLAG (SpecificFlags)]);
351 /*******************************************************************************
353 * FUNCTION: AcpiDmAddressFlags
355 * PARAMETERS: Resource - Raw AML descriptor
359 * DESCRIPTION: Emit flags common to address descriptors
361 ******************************************************************************/
365 AML_RESOURCE *Resource)
368 if (Resource->Address.ResourceType == ACPI_IO_RANGE)
370 AcpiDmIoFlags2 (Resource->Address.SpecificFlags);
372 else if (Resource->Address.ResourceType == ACPI_MEMORY_RANGE)
374 AcpiDmMemoryFlags2 (Resource->Address.SpecificFlags);
379 /*******************************************************************************
381 * FUNCTION: AcpiDmSpaceFlags
383 * PARAMETERS: Flags - Flag byte to be decoded
387 * DESCRIPTION: Decode the flags specific to Space Address space descriptors
389 ******************************************************************************/
396 AcpiOsPrintf ("%s, %s, %s, %s,",
397 AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Flags)],
398 AcpiGbl_DecDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 1)],
399 AcpiGbl_MinDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 2)],
400 AcpiGbl_MaxDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 3)]);
404 /*******************************************************************************
406 * FUNCTION: AcpiDmIoFlags
408 * PARAMETERS: Flags - Flag byte to be decoded
412 * DESCRIPTION: Decode the flags specific to IO Address space descriptors
414 ******************************************************************************/
420 AcpiOsPrintf ("%s, %s, %s, %s,",
421 AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Flags)],
422 AcpiGbl_MinDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 2)],
423 AcpiGbl_MaxDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 3)],
424 AcpiGbl_DecDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 1)]);
428 /*******************************************************************************
430 * FUNCTION: AcpiDmIoFlags2
432 * PARAMETERS: SpecificFlags - "Specific" flag byte to be decoded
436 * DESCRIPTION: Decode the flags specific to IO Address space descriptors
438 ******************************************************************************/
445 AcpiOsPrintf (", %s",
446 AcpiGbl_TtpDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 4)]);
448 /* TRS is only used if TTP is TypeTranslation */
450 if (SpecificFlags & 0x10)
452 AcpiOsPrintf (", %s",
453 AcpiGbl_TrsDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 5)]);
458 /*******************************************************************************
460 * FUNCTION: AcpiDmMemoryFlags
462 * PARAMETERS: Flags - Flag byte to be decoded
463 * SpecificFlags - "Specific" flag byte to be decoded
467 * DESCRIPTION: Decode flags specific to Memory Address Space descriptors
469 ******************************************************************************/
477 AcpiOsPrintf ("%s, %s, %s, %s, %s, %s,",
478 AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Flags)],
479 AcpiGbl_DecDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 1)],
480 AcpiGbl_MinDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 2)],
481 AcpiGbl_MaxDecode [ACPI_EXTRACT_1BIT_FLAG (Flags, 3)],
482 AcpiGbl_MemDecode [ACPI_EXTRACT_2BIT_FLAG (SpecificFlags, 1)],
483 AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (SpecificFlags)]);
487 /*******************************************************************************
489 * FUNCTION: AcpiDmMemoryFlags2
491 * PARAMETERS: SpecificFlags - "Specific" flag byte to be decoded
495 * DESCRIPTION: Decode flags specific to Memory Address Space descriptors
497 ******************************************************************************/
504 AcpiOsPrintf (", %s, %s",
505 AcpiGbl_MtpDecode [ACPI_EXTRACT_2BIT_FLAG (SpecificFlags, 3)],
506 AcpiGbl_TtpDecode [ACPI_EXTRACT_1BIT_FLAG (SpecificFlags, 5)]);
510 /*******************************************************************************
512 * FUNCTION: AcpiDmResourceSource
514 * PARAMETERS: Resource - Raw AML descriptor
515 * MinimumLength - descriptor length without optional fields
520 * DESCRIPTION: Dump optional ResourceSource fields of an address descriptor
522 ******************************************************************************/
525 AcpiDmResourceSource (
526 AML_RESOURCE *Resource,
527 ACPI_SIZE MinimumTotalLength,
528 UINT32 ResourceLength)
530 UINT8 *AmlResourceSource;
534 TotalLength = ResourceLength + sizeof (AML_RESOURCE_LARGE_HEADER);
536 /* Check if the optional ResourceSource fields are present */
538 if (TotalLength <= MinimumTotalLength)
540 /* The two optional fields are not used */
542 AcpiOsPrintf (",, ");
546 /* Get a pointer to the ResourceSource */
548 AmlResourceSource = ACPI_ADD_PTR (UINT8, Resource, MinimumTotalLength);
551 * Always emit the ResourceSourceIndex (Byte)
553 * NOTE: Some ASL compilers always create a 0 byte (in the AML) for the
554 * Index even if the String does not exist. Although this is in violation
555 * of the ACPI specification, it is very important to emit ASL code that
556 * can be compiled back to the identical AML. There may be fields and/or
557 * indexes into the resource template buffer that are compiled to absolute
558 * offsets, and these will be broken if the AML length is changed.
560 AcpiOsPrintf ("0x%2.2X,", (UINT32) AmlResourceSource[0]);
562 /* Make sure that the ResourceSource string exists before dumping it */
564 if (TotalLength > (MinimumTotalLength + 1))
567 AcpiUtPrintString ((char *) &AmlResourceSource[1], ACPI_UINT16_MAX);
574 /*******************************************************************************
576 * FUNCTION: AcpiDmWordDescriptor
578 * PARAMETERS: Info - Extra resource info
579 * Resource - Pointer to the resource descriptor
580 * Length - Length of the descriptor in bytes
581 * Level - Current source code indentation level
585 * DESCRIPTION: Decode a Word Address Space descriptor
587 ******************************************************************************/
590 AcpiDmWordDescriptor (
591 ACPI_OP_WALK_INFO *Info,
592 AML_RESOURCE *Resource,
597 /* Dump resource name and flags */
599 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS16, Level);
601 /* Dump the 5 contiguous WORD values */
603 AcpiDmAddressFields (&Resource->Address16.Granularity, 16, Level);
605 /* The ResourceSource fields are optional */
607 AcpiDmIndent (Level + 1);
608 AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS16), Length);
610 /* Insert a descriptor name */
612 AcpiDmDescriptorName ();
614 /* Type-specific flags */
616 AcpiDmAddressFlags (Resource);
617 AcpiOsPrintf (")\n");
621 /*******************************************************************************
623 * FUNCTION: AcpiDmDwordDescriptor
625 * PARAMETERS: Info - Extra resource info
626 * Resource - Pointer to the resource descriptor
627 * Length - Length of the descriptor in bytes
628 * Level - Current source code indentation level
632 * DESCRIPTION: Decode a DWord Address Space descriptor
634 ******************************************************************************/
637 AcpiDmDwordDescriptor (
638 ACPI_OP_WALK_INFO *Info,
639 AML_RESOURCE *Resource,
644 /* Dump resource name and flags */
646 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS32, Level);
648 /* Dump the 5 contiguous DWORD values */
650 AcpiDmAddressFields (&Resource->Address32.Granularity, 32, Level);
652 /* The ResourceSource fields are optional */
654 AcpiDmIndent (Level + 1);
655 AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS32), Length);
657 /* Insert a descriptor name */
659 AcpiDmDescriptorName ();
661 /* Type-specific flags */
663 AcpiDmAddressFlags (Resource);
664 AcpiOsPrintf (")\n");
668 /*******************************************************************************
670 * FUNCTION: AcpiDmQwordDescriptor
672 * PARAMETERS: Info - Extra resource info
673 * Resource - Pointer to the resource descriptor
674 * Length - Length of the descriptor in bytes
675 * Level - Current source code indentation level
679 * DESCRIPTION: Decode a QWord Address Space descriptor
681 ******************************************************************************/
684 AcpiDmQwordDescriptor (
685 ACPI_OP_WALK_INFO *Info,
686 AML_RESOURCE *Resource,
691 /* Dump resource name and flags */
693 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_ADDRESS64, Level);
695 /* Dump the 5 contiguous QWORD values */
697 AcpiDmAddressFields (&Resource->Address64.Granularity, 64, Level);
699 /* The ResourceSource fields are optional */
701 AcpiDmIndent (Level + 1);
702 AcpiDmResourceSource (Resource, sizeof (AML_RESOURCE_ADDRESS64), Length);
704 /* Insert a descriptor name */
706 AcpiDmDescriptorName ();
708 /* Type-specific flags */
710 AcpiDmAddressFlags (Resource);
711 AcpiOsPrintf (")\n");
715 /*******************************************************************************
717 * FUNCTION: AcpiDmExtendedDescriptor
719 * PARAMETERS: Info - Extra resource info
720 * Resource - Pointer to the resource descriptor
721 * Length - Length of the descriptor in bytes
722 * Level - Current source code indentation level
726 * DESCRIPTION: Decode a Extended Address Space descriptor
728 ******************************************************************************/
731 AcpiDmExtendedDescriptor (
732 ACPI_OP_WALK_INFO *Info,
733 AML_RESOURCE *Resource,
738 /* Dump resource name and flags */
740 AcpiDmAddressCommon (Resource, ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64, Level);
742 /* Dump the 5 contiguous QWORD values */
744 AcpiDmAddressFields (&Resource->ExtAddress64.Granularity, 64, Level);
746 /* Extra field for this descriptor only */
748 AcpiDmIndent (Level + 1);
749 AcpiDmDumpInteger64 (Resource->ExtAddress64.TypeSpecific,
750 "Type-Specific Attributes");
752 /* Insert a descriptor name */
754 AcpiDmIndent (Level + 1);
755 AcpiDmDescriptorName ();
757 /* Type-specific flags */
759 AcpiDmAddressFlags (Resource);
760 AcpiOsPrintf (")\n");
764 /*******************************************************************************
766 * FUNCTION: AcpiDmMemory24Descriptor
768 * PARAMETERS: Info - Extra resource info
769 * Resource - Pointer to the resource descriptor
770 * Length - Length of the descriptor in bytes
771 * Level - Current source code indentation level
775 * DESCRIPTION: Decode a Memory24 descriptor
777 ******************************************************************************/
780 AcpiDmMemory24Descriptor (
781 ACPI_OP_WALK_INFO *Info,
782 AML_RESOURCE *Resource,
787 /* Dump name and read/write flag */
789 AcpiDmIndent (Level);
790 AcpiOsPrintf ("Memory24 (%s,\n",
791 AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->Memory24.Flags)]);
793 /* Dump the 4 contiguous WORD values */
795 AcpiDmMemoryFields (&Resource->Memory24.Minimum, 16, Level);
797 /* Insert a descriptor name */
799 AcpiDmIndent (Level + 1);
800 AcpiDmDescriptorName ();
801 AcpiOsPrintf (")\n");
805 /*******************************************************************************
807 * FUNCTION: AcpiDmMemory32Descriptor
809 * PARAMETERS: Info - Extra resource info
810 * Resource - Pointer to the resource descriptor
811 * Length - Length of the descriptor in bytes
812 * Level - Current source code indentation level
816 * DESCRIPTION: Decode a Memory32 descriptor
818 ******************************************************************************/
821 AcpiDmMemory32Descriptor (
822 ACPI_OP_WALK_INFO *Info,
823 AML_RESOURCE *Resource,
828 /* Dump name and read/write flag */
830 AcpiDmIndent (Level);
831 AcpiOsPrintf ("Memory32 (%s,\n",
832 AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->Memory32.Flags)]);
834 /* Dump the 4 contiguous DWORD values */
836 AcpiDmMemoryFields (&Resource->Memory32.Minimum, 32, Level);
838 /* Insert a descriptor name */
840 AcpiDmIndent (Level + 1);
841 AcpiDmDescriptorName ();
842 AcpiOsPrintf (")\n");
846 /*******************************************************************************
848 * FUNCTION: AcpiDmFixedMemory32Descriptor
850 * PARAMETERS: Info - Extra resource info
851 * Resource - Pointer to the resource descriptor
852 * Length - Length of the descriptor in bytes
853 * Level - Current source code indentation level
857 * DESCRIPTION: Decode a Fixed Memory32 descriptor
859 ******************************************************************************/
862 AcpiDmFixedMemory32Descriptor (
863 ACPI_OP_WALK_INFO *Info,
864 AML_RESOURCE *Resource,
869 /* Dump name and read/write flag */
871 AcpiDmIndent (Level);
872 AcpiOsPrintf ("Memory32Fixed (%s,\n",
873 AcpiGbl_RwDecode [ACPI_GET_1BIT_FLAG (Resource->FixedMemory32.Flags)]);
875 AcpiDmIndent (Level + 1);
876 AcpiDmDumpInteger32 (Resource->FixedMemory32.Address, "Address Base");
878 AcpiDmIndent (Level + 1);
879 AcpiDmDumpInteger32 (Resource->FixedMemory32.AddressLength, "Address Length");
881 /* Insert a descriptor name */
883 AcpiDmIndent (Level + 1);
884 AcpiDmDescriptorName ();
885 AcpiOsPrintf (")\n");
889 /*******************************************************************************
891 * FUNCTION: AcpiDmGenericRegisterDescriptor
893 * PARAMETERS: Info - Extra resource info
894 * Resource - Pointer to the resource descriptor
895 * Length - Length of the descriptor in bytes
896 * Level - Current source code indentation level
900 * DESCRIPTION: Decode a Generic Register descriptor
902 ******************************************************************************/
905 AcpiDmGenericRegisterDescriptor (
906 ACPI_OP_WALK_INFO *Info,
907 AML_RESOURCE *Resource,
912 AcpiDmIndent (Level);
913 AcpiOsPrintf ("Register (");
914 AcpiDmAddressSpace (Resource->GenericReg.AddressSpaceId);
917 AcpiDmIndent (Level + 1);
918 AcpiDmDumpInteger8 (Resource->GenericReg.BitWidth, "Bit Width");
920 AcpiDmIndent (Level + 1);
921 AcpiDmDumpInteger8 (Resource->GenericReg.BitOffset, "Bit Offset");
923 AcpiDmIndent (Level + 1);
924 AcpiDmDumpInteger64 (Resource->GenericReg.Address, "Address");
926 /* Optional field for ACPI 3.0 */
928 AcpiDmIndent (Level + 1);
929 if (Resource->GenericReg.AccessSize)
931 AcpiOsPrintf ("0x%2.2X, // %s\n",
932 Resource->GenericReg.AccessSize, "Access Size");
933 AcpiDmIndent (Level + 1);
940 /* DescriptorName was added for ACPI 3.0+ */
942 AcpiDmDescriptorName ();
943 AcpiOsPrintf (")\n");
947 /*******************************************************************************
949 * FUNCTION: AcpiDmInterruptDescriptor
951 * PARAMETERS: Info - Extra resource info
952 * Resource - Pointer to the resource descriptor
953 * Length - Length of the descriptor in bytes
954 * Level - Current source code indentation level
958 * DESCRIPTION: Decode a extended Interrupt descriptor
960 ******************************************************************************/
963 AcpiDmInterruptDescriptor (
964 ACPI_OP_WALK_INFO *Info,
965 AML_RESOURCE *Resource,
972 AcpiDmIndent (Level);
973 AcpiOsPrintf ("Interrupt (%s, %s, %s, %s, ",
974 AcpiGbl_ConsumeDecode [ACPI_GET_1BIT_FLAG (Resource->ExtendedIrq.Flags)],
975 AcpiGbl_HeDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->ExtendedIrq.Flags, 1)],
976 AcpiGbl_LlDecode [ACPI_EXTRACT_1BIT_FLAG (Resource->ExtendedIrq.Flags, 2)],
977 AcpiGbl_ShrDecode [ACPI_EXTRACT_2BIT_FLAG (Resource->ExtendedIrq.Flags, 3)]);
980 * The ResourceSource fields are optional and appear after the interrupt
981 * list. Must compute length based on length of the list. First xrupt
982 * is included in the struct (reason for -1 below)
984 AcpiDmResourceSource (Resource,
985 sizeof (AML_RESOURCE_EXTENDED_IRQ) +
986 ((UINT32) Resource->ExtendedIrq.InterruptCount - 1) * sizeof (UINT32),
987 Resource->ExtendedIrq.ResourceLength);
989 /* Insert a descriptor name */
991 AcpiDmDescriptorName ();
992 AcpiOsPrintf (")\n");
994 /* Dump the interrupt list */
996 AcpiDmIndent (Level);
997 AcpiOsPrintf ("{\n");
998 for (i = 0; i < Resource->ExtendedIrq.InterruptCount; i++)
1000 AcpiDmIndent (Level + 1);
1001 AcpiOsPrintf ("0x%8.8X,\n",
1002 (UINT32) Resource->ExtendedIrq.Interrupts[i]);
1005 AcpiDmIndent (Level);
1006 AcpiOsPrintf ("}\n");
1010 /*******************************************************************************
1012 * FUNCTION: AcpiDmVendorCommon
1014 * PARAMETERS: Name - Descriptor name suffix
1015 * ByteData - Pointer to the vendor byte data
1016 * Length - Length of the byte data
1017 * Level - Current source code indentation level
1021 * DESCRIPTION: Decode a Vendor descriptor, both Large and Small
1023 ******************************************************************************/
1026 AcpiDmVendorCommon (
1033 /* Dump macro name */
1035 AcpiDmIndent (Level);
1036 AcpiOsPrintf ("Vendor%s (", Name);
1038 /* Insert a descriptor name */
1040 AcpiDmDescriptorName ();
1041 AcpiOsPrintf (") // Length = 0x%.2X\n", Length);
1043 /* Dump the vendor bytes */
1045 AcpiDmIndent (Level);
1046 AcpiOsPrintf ("{\n");
1048 AcpiDmDisasmByteList (Level + 1, ByteData, Length);
1050 AcpiDmIndent (Level);
1051 AcpiOsPrintf ("}\n");
1055 /*******************************************************************************
1057 * FUNCTION: AcpiDmVendorLargeDescriptor
1059 * PARAMETERS: Info - Extra resource info
1060 * Resource - Pointer to the resource descriptor
1061 * Length - Length of the descriptor in bytes
1062 * Level - Current source code indentation level
1066 * DESCRIPTION: Decode a Vendor Large descriptor
1068 ******************************************************************************/
1071 AcpiDmVendorLargeDescriptor (
1072 ACPI_OP_WALK_INFO *Info,
1073 AML_RESOURCE *Resource,
1078 AcpiDmVendorCommon ("Long ",
1079 ACPI_ADD_PTR (UINT8, Resource, sizeof (AML_RESOURCE_LARGE_HEADER)),