FreeBSD/sys/contrib/dev/acpica/components/disassembler/dmresrcl2.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDmDumpSerialBusVendorData
 *
 * PARAMETERS:  Resource            - Pointer to the resource descriptor
 *
 * RETURN:      None
 *
 * DESCRIPTION: Dump optional serial bus vendor data
 *
 ******************************************************************************/
AcpiDmDumpSerialBusVendorData
PARAMETERS:  Resource            - Pointer to the resource descriptor

None

Dump optional serial bus vendor data
AcpiDmDumpSerialBusVendorData PARAMETERS : Resource - Pointer to the resource descriptor None Dump optional serial bus vendor data
static void
AcpiDmDumpSerialBusVendorData (
    AML_RESOURCE            *Resource,
    UINT32                  Level)
{
    UINT8                   *VendorData;
    UINT32                  VendorLength;
    switch (Resource->CommonSerialBus.Type)
    {
    case AML_RESOURCE_I2C_SERIALBUSTYPE:
        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_SERIALBUSTYPE:
        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_SERIALBUSTYPE:
        VendorLength = Resource->CommonSerialBus.TypeDataLength -
            AML_RESOURCE_UART_MIN_DATA_LEN;
        VendorData = ACPI_ADD_PTR (UINT8, Resource,
            sizeof (AML_RESOURCE_UART_SERIALBUS));
        break;
    default:
        return;
    }
    AcpiDmDumpRawDataBuffer (VendorData, VendorLength, Level);
}
static void AcpiDmDumpSerialBusVendorData ( AML_RESOURCE * Resource , UINT32 Level ) { UINT8 * VendorData ; UINT32 VendorLength ; switch ( Resource -> CommonSerialBus . Type ) { case AML_RESOURCE_I2C_SERIALBUSTYPE : 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_SERIALBUSTYPE : 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_SERIALBUSTYPE : VendorLength = Resource -> CommonSerialBus . TypeDataLength - AML_RESOURCE_UART_MIN_DATA_LEN ; VendorData = ACPI_ADD_PTR ( UINT8 , Resource , sizeof ( AML_RESOURCE_UART_SERIALBUS ) ) ; break ; default : return ; } AcpiDmDumpRawDataBuffer ( VendorData , VendorLength , Level ) ; }
FUNCTION:    AcpiDmDumpSerialBusVendorData
 PARAMETERS:  Resource            - Pointer to the resource descriptor
FUNCTION : AcpiDmDumpSerialBusVendorData PARAMETERS : Resource - Pointer to the resource descriptor
/* Get the (optional) vendor data and length */ /* Dump the vendor bytes as a RawDataBuffer object */