/*******************************************************************************
*
* Module Name: dmresrcl2.c - "Large" Resource Descriptor disassembly (#2)
*
******************************************************************************/
/*
* Copyright (C) 2000 - 2016, Intel Corp.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions, and the following disclaimer,
* without modification.
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
* substantially similar to the "NO WARRANTY" disclaimer below
* ("Disclaimer") and any redistribution must be conditioned upon
* including a substantially similar Disclaimer requirement for further
* binary redistribution.
* 3. Neither the names of the above-listed copyright holders nor the names
* of any contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* Alternatively, this software may be distributed under the terms of the
* GNU General Public License ("GPL") version 2 as published by the Free
* Software Foundation.
*
* NO WARRANTY
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGES.
*/
#include "acpi.h"
#include "accommon.h"
#include "acdisasm.h"
ACPI_MODULE_NAME ("dbresrcl2")
/* Local prototypes */
static void
static void
static void
static void
static void
/* Dispatch table for the serial bus descriptors */
{
NULL,
};
/*******************************************************************************
*
* 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
{
UINT32 i;
UINT32 j;
if (!Length)
{
return;
}
AcpiOsPrintf ("\n");
AcpiOsPrintf ("{\n");
for (i = 0; i < Length;)
{
for (j = 0; j < 8; j++)
{
Index = i + j;
{
goto Finish;
}
{
goto Finish;
}
AcpiOsPrintf (", ");
}
AcpiOsPrintf ("\n");
i += 8;
}
AcpiOsPrintf ("\n");
AcpiOsPrintf ("}");
}
/*******************************************************************************
*
* FUNCTION: AcpiDmGpioCommon
*
* PARAMETERS: Info - Extra resource info
* 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
{
UINT32 i;
/* ResourceSource, ResourceSourceIndex, ResourceType */
{
DeviceName = ACPI_ADD_PTR (char,
}
AcpiOsPrintf (", ");
AcpiOsPrintf ("%s, ",
/* Insert a descriptor name */
AcpiOsPrintf (",");
/* Dump the vendor data */
{
AcpiOsPrintf ("\n");
}
AcpiOsPrintf (")\n");
/* Dump the interrupt list */
AcpiOsPrintf ("{ // Pin list\n");
sizeof (UINT16);
for (i = 0; i < PinCount; i++)
{
}
AcpiOsPrintf ("}\n");
#ifdef ACPI_APPLICATION
#endif
}
/*******************************************************************************
*
* FUNCTION: AcpiDmGpioIntDescriptor
*
* PARAMETERS: Info - Extra resource info
* Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a GPIO Interrupt descriptor
*
******************************************************************************/
static void
{
/* Dump the GpioInt-specific portion of the descriptor */
/* EdgeLevel, ActiveLevel, Shared */
AcpiOsPrintf ("GpioInt (%s, %s, %s, ",
/* PinConfig, DebounceTimeout */
{
AcpiOsPrintf ("%s, ",
}
else
{
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDmGpioIoDescriptor
*
* PARAMETERS: Info - Extra resource info
* Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a GPIO I/O descriptor
*
******************************************************************************/
static void
{
/* Dump the GpioIo-specific portion of the descriptor */
/* Shared, PinConfig */
AcpiOsPrintf ("GpioIo (%s, ",
{
AcpiOsPrintf ("%s, ",
}
else
{
}
/* DebounceTimeout, DriveStrength, IoRestriction */
AcpiOsPrintf ("%s,\n",
}
/*******************************************************************************
*
* FUNCTION: AcpiDmGpioDescriptor
*
* PARAMETERS: Info - Extra resource info
* Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
*
******************************************************************************/
void
{
switch (ConnectionType)
{
break;
break;
default:
AcpiOsPrintf ("Unknown GPIO type\n");
break;
}
}
/*******************************************************************************
*
* FUNCTION: AcpiDmDumpSerialBusVendorData
*
* PARAMETERS: Resource - Pointer to the resource descriptor
*
* RETURN: None
*
* DESCRIPTION: Dump optional serial bus vendor data
*
******************************************************************************/
static void
{
/* Get the (optional) vendor data and length */
{
sizeof (AML_RESOURCE_I2C_SERIALBUS));
break;
sizeof (AML_RESOURCE_SPI_SERIALBUS));
break;
sizeof (AML_RESOURCE_UART_SERIALBUS));
break;
default:
return;
}
/* Dump the vendor bytes as a RawDataBuffer object */
}
/*******************************************************************************
*
* FUNCTION: AcpiDmI2cSerialBusDescriptor
*
* PARAMETERS: Info - Extra resource info
* Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a I2C serial bus descriptor
*
******************************************************************************/
static void
{
char *DeviceName;
/* SlaveAddress, SlaveMode, ConnectionSpeed, AddressingMode */
AcpiOsPrintf ("I2cSerialBusV2 (0x%4.4X, %s, 0x%8.8X,\n",
AcpiOsPrintf ("%s, ",
/* ResourceSource is a required field */
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
/* ResourceSourceIndex, ResourceUsage */
AcpiOsPrintf (",\n");
AcpiOsPrintf ("%s, ",
/* Insert a descriptor name */
/* Share */
AcpiOsPrintf (", %s,\n",
/* Dump the vendor data */
AcpiOsPrintf (")\n");
#ifdef ACPI_APPLICATION
#endif
}
/*******************************************************************************
*
* FUNCTION: AcpiDmSpiSerialBusDescriptor
*
* PARAMETERS: Info - Extra resource info
* Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a SPI serial bus descriptor
*
******************************************************************************/
static void
{
char *DeviceName;
/* DeviceSelection, DeviceSelectionPolarity, WireMode, DataBitLength */
AcpiOsPrintf ("SpiSerialBusV2 (0x%4.4X, %s, %s, 0x%2.2X,\n",
/* SlaveMode, ConnectionSpeed, ClockPolarity, ClockPhase */
AcpiOsPrintf ("%s, 0x%8.8X, %s,\n",
AcpiOsPrintf ("%s, ",
/* ResourceSource is a required field */
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
/* ResourceSourceIndex, ResourceUsage */
AcpiOsPrintf (",\n");
AcpiOsPrintf ("%s, ",
/* Insert a descriptor name */
/* Share */
AcpiOsPrintf (", %s,\n",
/* Dump the vendor data */
AcpiOsPrintf (")\n");
#ifdef ACPI_APPLICATION
#endif
}
/*******************************************************************************
*
* FUNCTION: AcpiDmUartSerialBusDescriptor
*
* PARAMETERS: Info - Extra resource info
* Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
* DESCRIPTION: Decode a UART serial bus descriptor
*
******************************************************************************/
static void
{
char *DeviceName;
/* ConnectionSpeed, BitsPerByte, StopBits */
AcpiOsPrintf ("UartSerialBusV2 (0x%8.8X, %s, %s,\n",
/* LinesInUse, IsBigEndian, Parity, FlowControl */
AcpiOsPrintf ("0x%2.2X, %s, %s, %s,\n",
/* ReceiveBufferSize, TransmitBufferSize */
AcpiOsPrintf ("0x%4.4X, 0x%4.4X, ",
/* ResourceSource is a required field */
ResourceSourceOffset = sizeof (AML_RESOURCE_COMMON_SERIALBUS) +
/* ResourceSourceIndex, ResourceUsage */
AcpiOsPrintf (",\n");
AcpiOsPrintf ("%s, ",
/* Insert a descriptor name */
/* Share */
AcpiOsPrintf (", %s,\n",
/* Dump the vendor data */
AcpiOsPrintf (")\n");
#ifdef ACPI_APPLICATION
#endif
}
/*******************************************************************************
*
* FUNCTION: AcpiDmSerialBusDescriptor
*
* PARAMETERS: Info - Extra resource info
* Resource - Pointer to the resource descriptor
* Length - Length of the descriptor in bytes
* Level - Current source code indentation level
*
* RETURN: None
*
*
******************************************************************************/
void
{
}