From aa30e22320cb5041358436827aface1f915b3b05 Mon Sep 17 00:00:00 2001 From: Robert Moore Date: Fri, 15 Jul 2011 13:44:32 -0700 Subject: [PATCH] ACPI 5.0/iASL & Disassembler: Implement new resource descriptors. All new resource descriptors as of this date are implemented. Lin Ming, Bob Moore. --- source/components/disassembler/dmresrc.c | 2 +- source/components/disassembler/dmresrcl.c | 450 +++++++++++++++------- source/components/disassembler/dmresrcs.c | 49 ++- source/components/utilities/utresrc.c | 24 +- source/include/acdisasm.h | 6 + source/include/acutils.h | 1 + source/include/amlresrc.h | 6 +- 7 files changed, 382 insertions(+), 156 deletions(-) diff --git a/source/components/disassembler/dmresrc.c b/source/components/disassembler/dmresrc.c index 98057d027..c01adf7a9 100644 --- a/source/components/disassembler/dmresrc.c +++ b/source/components/disassembler/dmresrc.c @@ -141,7 +141,7 @@ static ACPI_RESOURCE_HANDLER AcpiGbl_DmResourceDispatch [] = AcpiDmEndDependentDescriptor, /* 0x07, ACPI_RESOURCE_NAME_END_DEPENDENT */ AcpiDmIoDescriptor, /* 0x08, ACPI_RESOURCE_NAME_IO_PORT */ AcpiDmFixedIoDescriptor, /* 0x09, ACPI_RESOURCE_NAME_FIXED_IO_PORT */ - NULL, /* 0x0A, Reserved */ + AcpiDmFixedDmaDescriptor, /* 0x0A, ACPI_RESOURCE_NAME_FIXED_DMA */ NULL, /* 0x0B, Reserved */ NULL, /* 0x0C, Reserved */ NULL, /* 0x0D, Reserved */ diff --git a/source/components/disassembler/dmresrcl.c b/source/components/disassembler/dmresrcl.c index 4169580ea..56030563a 100644 --- a/source/components/disassembler/dmresrcl.c +++ b/source/components/disassembler/dmresrcl.c @@ -212,6 +212,17 @@ AcpiDmUartSerialBusDescriptor ( UINT32 Length, UINT32 Level); +static void +AcpiDmGpioCommon ( + AML_RESOURCE *Resource, + UINT32 Level); + +static void +AcpiDmDumpRawDataBuffer ( + UINT8 *Buffer, + UINT32 Length, + UINT32 Level); + static ACPI_RESOURCE_HANDLER SerialBusResourceDispatch [] = { NULL, @@ -1148,6 +1159,157 @@ AcpiDmVendorLargeDescriptor ( } +/******************************************************************************* + * + * FUNCTION: AcpiDmDumpRawDataBuffer + * + * PARAMETERS: Buffer - Pointer to the data bytes + * Length - Length of the descriptor in bytes + * Level - Current source code indentation level + * + * RETURN: None + * + * DESCRIPTION: Dump a data buffer as a RawDataBuffer() object. Used for + * vendor data bytes. + * + ******************************************************************************/ + +static void +AcpiDmDumpRawDataBuffer ( + UINT8 *Buffer, + UINT32 Length, + UINT32 Level) +{ + UINT32 Index; + UINT32 i; + UINT32 j; + + + if (!Length) + { + return; + } + + AcpiOsPrintf ("RawDataBuffer (0x%.2X) // Vendor Data", Length); + + AcpiOsPrintf ("\n"); + AcpiDmIndent (Level + 1); + AcpiOsPrintf ("{\n"); + AcpiDmIndent (Level + 2); + + for (i = 0; i < Length;) + { + for (j = 0; j < 8; j++) + { + Index = i + j; + if (Index >= Length) + { + goto Finish; + } + + AcpiOsPrintf ("0x%2.2X", Buffer[Index]); + if ((Index + 1) >= Length) + { + goto Finish; + } + + AcpiOsPrintf (", "); + } + AcpiOsPrintf ("\n"); + AcpiDmIndent (Level + 2); + + i += 8; + } + +Finish: + AcpiOsPrintf ("\n"); + AcpiDmIndent (Level + 1); + AcpiOsPrintf ("}"); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmGpioCommon + * + * PARAMETERS: Resource - Pointer to the resource descriptor + * Level - Current source code indentation level + * + * RETURN: None + * + * DESCRIPTION: Decode common parts of a GPIO Interrupt descriptor + * + ******************************************************************************/ + +static void +AcpiDmGpioCommon ( + AML_RESOURCE *Resource, + UINT32 Level) +{ + UINT32 PinCount; + UINT16 *PinList; + UINT8 *VendorData; + UINT32 i; + + + /* ResourceSource, ResourceSourceIndex, ResourceType */ + + AcpiDmIndent (Level + 1); + if (Resource->GpioInt.ResSourceOffset) + { + AcpiUtPrintString ( + ACPI_ADD_PTR (char, Resource, Resource->GpioInt.ResSourceOffset), + ACPI_UINT8_MAX); + } + + AcpiOsPrintf (", "); + AcpiOsPrintf ("0x%2.2X, ", Resource->GpioInt.ResSourceIndex); + AcpiOsPrintf ("%s, ", + AcpiGbl_ConsumeDecode [(Resource->GpioInt.Flags & 1)]); + + /* Insert a descriptor name */ + + AcpiDmDescriptorName (); + AcpiOsPrintf (","); + + /* Dump the vendor data */ + + if (Resource->GpioInt.VendorOffset) + { + AcpiOsPrintf ("\n"); + AcpiDmIndent (Level + 1); + VendorData = ACPI_ADD_PTR (UINT8, Resource, + Resource->GpioInt.VendorOffset); + + AcpiDmDumpRawDataBuffer (VendorData, + Resource->GpioInt.VendorLength, Level); + } + + AcpiOsPrintf (")\n"); + + /* Dump the interrupt list */ + + AcpiDmIndent (Level + 1); + AcpiOsPrintf ("{ // Pin list\n"); + + PinCount = ((UINT32) (Resource->GpioInt.ResSourceOffset - + Resource->GpioInt.PinTableOffset)) / + sizeof (UINT16); + + PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource, + Resource->GpioInt.PinTableOffset); + + for (i = 0; i < PinCount; i++) + { + AcpiDmIndent (Level + 2); + AcpiOsPrintf ("0x%4.4X%s\n", PinList[i], ((i + 1) < PinCount) ? "," : ""); + } + + AcpiDmIndent (Level + 1); + AcpiOsPrintf ("}\n"); +} + + /******************************************************************************* * * FUNCTION: AcpiDmGpioIntDescriptor @@ -1168,82 +1330,29 @@ AcpiDmGpioIntDescriptor ( UINT32 Length, UINT32 Level) { - UINT32 PinCount; - UINT16 *PinList; - UINT32 i; - UINT8 *VendorData; + /* Dump the GpioInt-specific portion of the descriptor */ AcpiDmIndent (Level); - - AcpiOsPrintf ("GpioInt ("); - - AcpiOsPrintf ("%s, %s, %s,\n", + AcpiOsPrintf ("GpioInt (%s, %s, %s, ", AcpiGbl_HeDecode [(Resource->GpioInt.IntFlags & 1)], AcpiGbl_LlDecode [(Resource->GpioInt.IntFlags >> 1) & 1], AcpiGbl_ShrDecode [(Resource->GpioInt.IntFlags >> 3) & 1]); - AcpiDmIndent (Level + 1); if (Resource->GpioInt.PinConfig <= 3) { - AcpiOsPrintf ("%s, ", AcpiGbl_PpcDecode[Resource->GpioInt.PinConfig]); + AcpiOsPrintf ("%s, ", + AcpiGbl_PpcDecode[Resource->GpioInt.PinConfig]); } else { AcpiOsPrintf ("0x%2.2X, ", Resource->GpioInt.PinConfig); } - AcpiOsPrintf ("0x%4.4X, ", Resource->GpioInt.DebounceTimeout); + AcpiOsPrintf ("0x%4.4X,\n", Resource->GpioInt.DebounceTimeout); - if (Resource->GpioInt.ResSourceOffset) - { - AcpiUtPrintString ( - ACPI_ADD_PTR (char, Resource, Resource->GpioInt.ResSourceOffset), - ACPI_UINT8_MAX); - } + /* Dump the GpioInt/GpioIo common portion of the descriptor */ - AcpiOsPrintf (", "); - AcpiOsPrintf ("0x%2.2X, ", Resource->GpioInt.ResSourceIndex); - AcpiOsPrintf ("%s, ", AcpiGbl_ConsumeDecode [(Resource->GpioInt.Flags & 1)]); - - /* Insert a descriptor name */ - - AcpiDmDescriptorName (); - AcpiOsPrintf (",\n"); - - AcpiDmIndent (Level + 1); - - /* Dump the vendor data */ - - if (Resource->GpioInt.VendorOffset) - { - VendorData = - ACPI_ADD_PTR (UINT8, Resource, Resource->GpioInt.VendorOffset); - - AcpiOsPrintf ("RawDataBuffer () {"); - for (i = 0; i < Resource->GpioInt.VendorLength; i++) - { - AcpiOsPrintf ("0x%2.2X, ", VendorData[i]); - } - AcpiOsPrintf ("}"); - } - - AcpiOsPrintf (")\n"); - - /* Dump the interrupt list */ - - AcpiDmIndent (Level); - AcpiOsPrintf ("{\n"); - - PinCount = (Resource->GpioInt.ResSourceOffset - Resource->GpioInt.PinTableOffset) / 2; - PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource, Resource->GpioInt.PinTableOffset); - for (i = 0; i < PinCount; i++) - { - AcpiDmIndent (Level + 1); - AcpiOsPrintf ("0x%4.4X,\n", PinList[i]); - } - - AcpiDmIndent (Level); - AcpiOsPrintf ("}\n"); + AcpiDmGpioCommon (Resource, Level); } @@ -1267,22 +1376,17 @@ AcpiDmGpioIoDescriptor ( UINT32 Length, UINT32 Level) { - UINT32 PinCount; - UINT16 *PinList; - UINT32 i; - UINT8 *VendorData; + /* Dump the GpioIo-specific portion of the descriptor */ AcpiDmIndent (Level); - - AcpiOsPrintf ("GpioIo ("); - - AcpiOsPrintf ("%s, ", + AcpiOsPrintf ("GpioIo (%s, ", AcpiGbl_ShrDecode [(Resource->GpioInt.IntFlags >> 3) & 1]); if (Resource->GpioInt.PinConfig <= 3) { - AcpiOsPrintf ("%s, ", AcpiGbl_PpcDecode[Resource->GpioInt.PinConfig]); + AcpiOsPrintf ("%s, ", + AcpiGbl_PpcDecode[Resource->GpioInt.PinConfig]); } else { @@ -1293,57 +1397,9 @@ AcpiDmGpioIoDescriptor ( AcpiOsPrintf ("%s,\n", AcpiGbl_IorDecode [Resource->GpioInt.IntFlags & 3]); - AcpiDmIndent (Level + 1); - if (Resource->GpioInt.ResSourceOffset) - { - AcpiUtPrintString ( - ACPI_ADD_PTR (char, Resource, Resource->GpioInt.ResSourceOffset), - ACPI_UINT8_MAX); - } + /* Dump the GpioInt/GpioIo common portion of the descriptor */ - AcpiOsPrintf (", "); - AcpiOsPrintf ("0x%2.2X, ", Resource->GpioInt.ResSourceIndex); - AcpiOsPrintf ("%s, ", AcpiGbl_ConsumeDecode [(Resource->GpioInt.Flags & 1)]); - - /* Insert a descriptor name */ - - AcpiDmDescriptorName (); - AcpiOsPrintf (",\n"); - - AcpiDmIndent (Level + 1); - - /* Dump the vendor data */ - - if (Resource->GpioInt.VendorOffset) - { - VendorData = - ACPI_ADD_PTR (UINT8, Resource, Resource->GpioInt.VendorOffset); - - AcpiOsPrintf ("RawDataBuffer () {"); - for (i = 0; i < Resource->GpioInt.VendorLength; i++) - { - AcpiOsPrintf ("0x%2.2X, ", VendorData[i]); - } - AcpiOsPrintf ("}"); - } - - AcpiOsPrintf (")\n"); - - /* Dump the interrupt list */ - - AcpiDmIndent (Level); - AcpiOsPrintf ("{\n"); - - PinCount = (Resource->GpioInt.ResSourceOffset - Resource->GpioInt.PinTableOffset) / 2; - PinList = (UINT16 *) ACPI_ADD_PTR (char, Resource, Resource->GpioInt.PinTableOffset); - for (i = 0; i < PinCount; i++) - { - AcpiDmIndent (Level + 1); - AcpiOsPrintf ("0x%4.4X,\n", PinList[i]); - } - - AcpiDmIndent (Level); - AcpiOsPrintf ("}\n"); + AcpiDmGpioCommon (Resource, Level); } @@ -1357,7 +1413,7 @@ AcpiDmGpioIoDescriptor ( * * RETURN: None * - * DESCRIPTION: Decode a GPIO Interrupt/IO descriptor + * DESCRIPTION: Decode a GpioInt/GpioIo GPIO Interrupt/IO descriptor * ******************************************************************************/ @@ -1389,6 +1445,68 @@ AcpiDmGpioDescriptor ( } +/******************************************************************************* + * + * FUNCTION: AcpiDmDumpSerialBusVendorData + * + * PARAMETERS: Resource - Pointer to the resource descriptor + * + * RETURN: None + * + * DESCRIPTION: Dump optional serial bus vendor data + * + ******************************************************************************/ + +static void +AcpiDmDumpSerialBusVendorData ( + AML_RESOURCE *Resource, + UINT32 Level) +{ + UINT8 *VendorData; + UINT32 VendorLength; + + + /* Get the (optional) vendor data and length */ + + switch (Resource->CommonSerialBus.Type) + { + case AML_RESOURCE_I2C_BUS_TYPE: + + VendorLength = Resource->CommonSerialBus.TypeDataLength - + AML_RESOURCE_I2C_MIN_DATA_LEN; + + VendorData = ACPI_ADD_PTR (UINT8, Resource, + sizeof (AML_RESOURCE_I2C_SERIALBUS)); + break; + + case AML_RESOURCE_SPI_BUS_TYPE: + + VendorLength = Resource->CommonSerialBus.TypeDataLength - + AML_RESOURCE_SPI_MIN_DATA_LEN; + + VendorData = ACPI_ADD_PTR (UINT8, Resource, + sizeof (AML_RESOURCE_SPI_SERIALBUS)); + break; + + case AML_RESOURCE_UART_BUS_TYPE: + + VendorLength = Resource->CommonSerialBus.TypeDataLength - + AML_RESOURCE_UART_MIN_DATA_LEN; + + VendorData = ACPI_ADD_PTR (UINT8, Resource, + sizeof (AML_RESOURCE_UART_SERIALBUS)); + break; + + default: + return; + } + + /* Dump the vendor bytes as a RawDataBuffer object */ + + AcpiDmDumpRawDataBuffer (VendorData, VendorLength, Level); +} + + /******************************************************************************* * * FUNCTION: AcpiDmI2cSerialBusDescriptor @@ -1414,14 +1532,14 @@ AcpiDmI2cSerialBusDescriptor ( AcpiDmIndent (Level); - AcpiOsPrintf ("I2cSerialBus (%s, 0x%8.8X, 0x%4.4X,\n", - AcpiGbl_AmDecode [(Resource->I2cSerialBus.TypeSpecificFlags & 1)], - Resource->I2cSerialBus.ConnectionSpeed, - Resource->I2cSerialBus.SlaveAddress); + AcpiOsPrintf ("I2cSerialBus (0x%4.4X, %s, 0x%8.8X,\n", + Resource->I2cSerialBus.SlaveAddress, + AcpiGbl_SmDecode [(Resource->I2cSerialBus.Flags & 1)], + Resource->I2cSerialBus.ConnectionSpeed); AcpiDmIndent (Level + 1); - AcpiOsPrintf ("%s,", - AcpiGbl_SmDecode [(Resource->I2cSerialBus.Flags & 1)]); + AcpiOsPrintf ("%s, ", + AcpiGbl_AmDecode [(Resource->I2cSerialBus.TypeSpecificFlags & 1)]); /* ResourceSource is a required field */ @@ -1432,8 +1550,22 @@ AcpiDmI2cSerialBusDescriptor ( ACPI_ADD_PTR (char, Resource, ResourceSourceOffset), ACPI_UINT8_MAX); + AcpiOsPrintf (",\n"); + AcpiDmIndent (Level + 1); + AcpiOsPrintf ("0x%2.2X, ", Resource->I2cSerialBus.ResSourceIndex); + + AcpiOsPrintf ("%s, ", + AcpiGbl_ConsumeDecode [(Resource->I2cSerialBus.Flags & 1)]); + /* Insert a descriptor name */ + AcpiDmDescriptorName (); + AcpiOsPrintf (",\n"); + + /* Dump the vendor data */ + + AcpiDmIndent (Level + 1); + AcpiDmDumpSerialBusVendorData (Resource, Level); AcpiOsPrintf (")\n"); } @@ -1463,21 +1595,21 @@ AcpiDmSpiSerialBusDescriptor ( AcpiDmIndent (Level); - AcpiOsPrintf ("SpiSerialBus (%s, 0x%8.8X, 0x%2.2X, %s,\n", + AcpiOsPrintf ("SpiSerialBus (0x%4.4X, %s, %s, 0x%2.2X,\n", + Resource->SpiSerialBus.DeviceSelection, + AcpiGbl_DpDecode [(Resource->SpiSerialBus.TypeSpecificFlags >> 1) & 1], AcpiGbl_WmDecode [(Resource->SpiSerialBus.TypeSpecificFlags & 1)], - Resource->SpiSerialBus.ConnectionSpeed, - Resource->SpiSerialBus.DataBitLength, - AcpiGbl_CphDecode [(Resource->SpiSerialBus.ClockPhase & 1)]); + Resource->SpiSerialBus.DataBitLength); AcpiDmIndent (Level + 1); - AcpiOsPrintf ("%s, 0x%4.4X, %s,\n", - AcpiGbl_CpoDecode [(Resource->SpiSerialBus.ClockPolarity & 1)], - Resource->SpiSerialBus.DeviceSelection, - AcpiGbl_DpDecode [(Resource->SpiSerialBus.TypeSpecificFlags >> 1) & 1]); + AcpiOsPrintf ("%s, 0x%8.8X, %s,\n", + AcpiGbl_SmDecode [(Resource->SpiSerialBus.Flags & 1)], + Resource->SpiSerialBus.ConnectionSpeed, + AcpiGbl_CpoDecode [(Resource->SpiSerialBus.ClockPolarity & 1)]); AcpiDmIndent (Level + 1); AcpiOsPrintf ("%s, ", - AcpiGbl_SmDecode [(Resource->SpiSerialBus.Flags & 1)]); + AcpiGbl_CphDecode [(Resource->SpiSerialBus.ClockPhase & 1)]); /* ResourceSource is a required field */ @@ -1488,8 +1620,22 @@ AcpiDmSpiSerialBusDescriptor ( ACPI_ADD_PTR (char, Resource, ResourceSourceOffset), ACPI_UINT8_MAX); + AcpiOsPrintf (",\n"); + AcpiDmIndent (Level + 1); + AcpiOsPrintf ("0x%2.2X, ", Resource->SpiSerialBus.ResSourceIndex); + + AcpiOsPrintf ("%s, ", + AcpiGbl_ConsumeDecode [(Resource->SpiSerialBus.Flags & 1)]); + /* Insert a descriptor name */ + AcpiDmDescriptorName (); + AcpiOsPrintf (",\n"); + + /* Dump the vendor data */ + + AcpiDmIndent (Level + 1); + AcpiDmDumpSerialBusVendorData (Resource, Level); AcpiOsPrintf (")\n"); } @@ -1519,22 +1665,22 @@ AcpiDmUartSerialBusDescriptor ( AcpiDmIndent (Level); - AcpiOsPrintf ("UartSerialBus (0x%2.2X, %s, %s, %s,\n", - Resource->UartSerialBus.TypeSpecificFlags & 0xFF, - AcpiGbl_EdDecode [(Resource->UartSerialBus.TypeSpecificFlags >> 15 )& 1], + AcpiOsPrintf ("UartSerialBus (0x%8.8X, %s, %s,\n", + Resource->UartSerialBus.DefaultBaudRate, AcpiGbl_BpbDecode [(Resource->UartSerialBus.TypeSpecificFlags >> 12 ) & 3], AcpiGbl_SbDecode [(Resource->UartSerialBus.TypeSpecificFlags >> 10 ) & 3]); AcpiDmIndent (Level + 1); - AcpiOsPrintf ("%s, 0x%8.8X, 0x%4.4X, 0x%4.4X,\n", - AcpiGbl_FcDecode [(Resource->UartSerialBus.TypeSpecificFlags >> 8 ) & 3], - Resource->UartSerialBus.DefaultBaudRate, - Resource->UartSerialBus.RxFifoSize, - Resource->UartSerialBus.TxFifoSize); + AcpiOsPrintf ("0x%2.2X, %s, %s, %s,\n", + Resource->UartSerialBus.TypeSpecificFlags & 0xFF, + AcpiGbl_EdDecode [(Resource->UartSerialBus.TypeSpecificFlags >> 15 ) & 1], + AcpiGbl_PtDecode [(Resource->UartSerialBus.Parity & 7)], + AcpiGbl_FcDecode [(Resource->UartSerialBus.TypeSpecificFlags >> 8 ) & 3]); AcpiDmIndent (Level + 1); - AcpiOsPrintf ("%s,", - AcpiGbl_PtDecode [(Resource->UartSerialBus.Parity & 7)]); + AcpiOsPrintf ("0x%4.4X, 0x%4.4X, ", + Resource->UartSerialBus.RxFifoSize, + Resource->UartSerialBus.TxFifoSize); /* ResourceSource is a required field */ @@ -1545,8 +1691,22 @@ AcpiDmUartSerialBusDescriptor ( ACPI_ADD_PTR (char, Resource, ResourceSourceOffset), ACPI_UINT8_MAX); + AcpiOsPrintf (",\n"); + AcpiDmIndent (Level + 1); + AcpiOsPrintf ("0x%2.2X, ", Resource->UartSerialBus.ResSourceIndex); + + AcpiOsPrintf ("%s, ", + AcpiGbl_ConsumeDecode [(Resource->UartSerialBus.Flags & 1)]); + /* Insert a descriptor name */ + AcpiDmDescriptorName (); + AcpiOsPrintf (",\n"); + + /* Dump the vendor data */ + + AcpiDmIndent (Level + 1); + AcpiDmDumpSerialBusVendorData (Resource, Level); AcpiOsPrintf (")\n"); } diff --git a/source/components/disassembler/dmresrcs.c b/source/components/disassembler/dmresrcs.c index 2bb1c91f8..2fed2ce89 100644 --- a/source/components/disassembler/dmresrcs.c +++ b/source/components/disassembler/dmresrcs.c @@ -193,9 +193,9 @@ AcpiDmDmaDescriptor ( AcpiDmIndent (Level); AcpiOsPrintf ("DMA (%s, %s, %s, ", - AcpiGbl_TypDecode [(Resource->Dma.Flags >> 5) & 3], - AcpiGbl_BmDecode [(Resource->Dma.Flags >> 2) & 1], - AcpiGbl_SizDecode [(Resource->Dma.Flags >> 0) & 3]); + AcpiGbl_TypDecode [(Resource->Dma.Flags >> 5) & 3], + AcpiGbl_BmDecode [(Resource->Dma.Flags >> 2) & 1], + AcpiGbl_SizDecode [(Resource->Dma.Flags >> 0) & 3]); /* Insert a descriptor name */ @@ -207,6 +207,49 @@ AcpiDmDmaDescriptor ( } +/******************************************************************************* + * + * FUNCTION: AcpiDmFixedDmaDescriptor + * + * PARAMETERS: Resource - Pointer to the resource descriptor + * Length - Length of the descriptor in bytes + * Level - Current source code indentation level + * + * RETURN: None + * + * DESCRIPTION: Decode a FixedDMA descriptor + * + ******************************************************************************/ + +void +AcpiDmFixedDmaDescriptor ( + AML_RESOURCE *Resource, + UINT32 Length, + UINT32 Level) +{ + + AcpiDmIndent (Level); + AcpiOsPrintf ("FixedDMA (0x%4.4X, 0x%4.4X, ", + Resource->FixedDma.RequestLines, + Resource->FixedDma.Channels); + + if (Resource->FixedDma.Width <= 5) + { + AcpiOsPrintf ("%s, ", + AcpiGbl_DtsDecode [Resource->FixedDma.Width]); + } + else + { + AcpiOsPrintf ("%X /* INVALID DMA WIDTH */, ", Resource->FixedDma.Width); + } + + /* Insert a descriptor name */ + + AcpiDmDescriptorName (); + AcpiOsPrintf (")\n"); +} + + /******************************************************************************* * * FUNCTION: AcpiDmIoDescriptor diff --git a/source/components/utilities/utresrc.c b/source/components/utilities/utresrc.c index 1620e60d3..dc9622af0 100644 --- a/source/components/utilities/utresrc.c +++ b/source/components/utilities/utresrc.c @@ -267,6 +267,16 @@ const char *AcpiGbl_IorDecode[] = "InvalidIoRestriction" }; +const char *AcpiGbl_DtsDecode[] = +{ + "8-bit", + "16-bit", + "32-bit", + "64-bit", + "128-bit", + "256-bit", +}; + /* I2C serial bus access mode */ const char *AcpiGbl_AmDecode[] = @@ -385,7 +395,7 @@ const UINT8 AcpiGbl_ResourceAmlSizes[] = ACPI_AML_SIZE_SMALL (AML_RESOURCE_END_DEPENDENT), ACPI_AML_SIZE_SMALL (AML_RESOURCE_IO), ACPI_AML_SIZE_SMALL (AML_RESOURCE_FIXED_IO), - 0, + ACPI_AML_SIZE_SMALL (AML_RESOURCE_FIXED_DMA), 0, 0, 0, @@ -405,7 +415,10 @@ const UINT8 AcpiGbl_ResourceAmlSizes[] = ACPI_AML_SIZE_LARGE (AML_RESOURCE_ADDRESS16), ACPI_AML_SIZE_LARGE (AML_RESOURCE_EXTENDED_IRQ), ACPI_AML_SIZE_LARGE (AML_RESOURCE_ADDRESS64), - ACPI_AML_SIZE_LARGE (AML_RESOURCE_EXTENDED_ADDRESS64) + ACPI_AML_SIZE_LARGE (AML_RESOURCE_EXTENDED_ADDRESS64), + ACPI_AML_SIZE_LARGE (AML_RESOURCE_GPIO_INT), + 0, + ACPI_AML_SIZE_LARGE (AML_RESOURCE_COMMON_SERIALBUS), }; @@ -429,7 +442,7 @@ static const UINT8 AcpiGbl_ResourceTypes[] = ACPI_FIXED_LENGTH, ACPI_FIXED_LENGTH, ACPI_FIXED_LENGTH, - 0, + ACPI_FIXED_LENGTH, /* FixedDMA */ 0, 0, 0, @@ -452,7 +465,10 @@ static const UINT8 AcpiGbl_ResourceTypes[] = ACPI_FIXED_LENGTH, ACPI_VARIABLE_LENGTH, ACPI_VARIABLE_LENGTH, - ACPI_VARIABLE_LENGTH + ACPI_VARIABLE_LENGTH, + ACPI_VARIABLE_LENGTH, /* GPIO */ + 0, + ACPI_VARIABLE_LENGTH /* SerialBus */ }; diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h index 6b4a78cbe..2eb122a2e 100644 --- a/source/include/acdisasm.h +++ b/source/include/acdisasm.h @@ -783,6 +783,12 @@ AcpiDmDmaDescriptor ( UINT32 Length, UINT32 Level); +void +AcpiDmFixedDmaDescriptor ( + AML_RESOURCE *Resource, + UINT32 Length, + UINT32 Level); + void AcpiDmIoDescriptor ( AML_RESOURCE *Resource, diff --git a/source/include/acutils.h b/source/include/acutils.h index e9a60e76d..314298d89 100644 --- a/source/include/acutils.h +++ b/source/include/acutils.h @@ -143,6 +143,7 @@ extern const char *AcpiGbl_TtpDecode[]; extern const char *AcpiGbl_TypDecode[]; extern const char *AcpiGbl_PpcDecode[]; extern const char *AcpiGbl_IorDecode[]; +extern const char *AcpiGbl_DtsDecode[]; extern const char *AcpiGbl_AmDecode[]; extern const char *AcpiGbl_SmDecode[]; extern const char *AcpiGbl_WmDecode[]; diff --git a/source/include/amlresrc.h b/source/include/amlresrc.h index 49eb574ff..94c70c511 100644 --- a/source/include/amlresrc.h +++ b/source/include/amlresrc.h @@ -560,7 +560,7 @@ typedef struct aml_resource_i2c_serialbus } AML_RESOURCE_I2C_SERIALBUS; #define AML_RESOURCE_I2C_REVISION 1 /* ACPI 5.0 */ -#define AML_RESOURCE_I2C_BUS_TYPE 1 /* ACPI 5.0 */ +#define AML_RESOURCE_I2C_BUS_TYPE 1 #define AML_RESOURCE_I2C_TYPE_REVISION 1 /* ACPI 5.0 */ #define AML_RESOURCE_I2C_MIN_DATA_LEN 7 @@ -583,7 +583,7 @@ typedef struct aml_resource_spi_serialbus } AML_RESOURCE_SPI_SERIALBUS; #define AML_RESOURCE_SPI_REVISION 1 /* ACPI 5.0 */ -#define AML_RESOURCE_SPI_BUS_TYPE 2 /* ACPI 5.0 */ +#define AML_RESOURCE_SPI_BUS_TYPE 2 #define AML_RESOURCE_SPI_TYPE_REVISION 1 /* ACPI 5.0 */ #define AML_RESOURCE_SPI_MIN_DATA_LEN 10 @@ -606,7 +606,7 @@ typedef struct aml_resource_uart_serialbus } AML_RESOURCE_UART_SERIALBUS; #define AML_RESOURCE_UART_REVISION 1 /* ACPI 5.0 */ -#define AML_RESOURCE_UART_BUS_TYPE 3 /* ACPI 5.0 */ +#define AML_RESOURCE_UART_BUS_TYPE 3 #define AML_RESOURCE_UART_TYPE_REVISION 1 /* ACPI 5.0 */ #define AML_RESOURCE_UART_MIN_DATA_LEN 10