FreeBSD/sys/contrib/dev/acpica/compiler/aslrestype2.c
/*******************************************************************************
 *
 * FUNCTION:    RsDoVendorLargeDescriptor
 *
 * PARAMETERS:  Info                - Parse Op and resource template offset
 *
 * RETURN:      Completed resource node
 *
 * DESCRIPTION: Construct a long "VendorLong" descriptor
 *
 ******************************************************************************/
RsDoVendorLargeDescriptor
PARAMETERS:  Info                - Parse Op and resource template offset

Completed resource node

Construct a long "VendorLong" descriptor
RsDoVendorLargeDescriptor PARAMETERS : Info - Parse Op and resource template offset Completed resource node Construct a long " VendorLong " descriptor
ASL_RESOURCE_NODE *
RsDoVendorLargeDescriptor (
    ASL_RESOURCE_INFO       *Info)
{
    AML_RESOURCE            *Descriptor;
    ACPI_PARSE_OBJECT       *InitializerOp;
    ASL_RESOURCE_NODE       *Rnode;
    UINT8                   *VendorData;
    UINT32                  i;
    InitializerOp = Info->DescriptorTypeOp->Asl.Child;
    InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
    for (i = 0; InitializerOp; i++)
    {
        if (InitializerOp->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
        {
            break;
        }
        InitializerOp = InitializerOp->Asl.Next;
    }
    InitializerOp = Info->DescriptorTypeOp->Asl.Child;
    InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
    Rnode = RsAllocateResourceNode (sizeof (AML_RESOURCE_VENDOR_LARGE) + i);
    Descriptor = Rnode->Buffer;
    Descriptor->VendorLarge.DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE;
    Descriptor->VendorLarge.ResourceLength = (UINT16) i;
    VendorData = ((UINT8 *) Descriptor) + sizeof (AML_RESOURCE_LARGE_HEADER);
    for (i = 0; InitializerOp; i++)
    {
        if (InitializerOp->Asl.ParseOpcode == PARSEOP_DEFAULT_ARG)
        {
            break;
        }
        VendorData[i] = (UINT8) InitializerOp->Asl.Value.Integer;
        InitializerOp = RsCompleteNodeAndGetNext (InitializerOp);
    }
    return (Rnode);
}
ASL_RESOURCE_NODE * RsDoVendorLargeDescriptor ( ASL_RESOURCE_INFO * Info ) { AML_RESOURCE * Descriptor ; ACPI_PARSE_OBJECT * InitializerOp ; ASL_RESOURCE_NODE * Rnode ; UINT8 * VendorData ; UINT32 i ; InitializerOp = Info -> DescriptorTypeOp -> Asl . Child ; InitializerOp = RsCompleteNodeAndGetNext ( InitializerOp ) ; for ( i = 0 ; InitializerOp ; i ++ ) { if ( InitializerOp -> Asl . ParseOpcode == PARSEOP_DEFAULT_ARG ) { break ; } InitializerOp = InitializerOp -> Asl . Next ; } InitializerOp = Info -> DescriptorTypeOp -> Asl . Child ; InitializerOp = RsCompleteNodeAndGetNext ( InitializerOp ) ; Rnode = RsAllocateResourceNode ( sizeof ( AML_RESOURCE_VENDOR_LARGE ) + i ) ; Descriptor = Rnode -> Buffer ; Descriptor -> VendorLarge . DescriptorType = ACPI_RESOURCE_NAME_VENDOR_LARGE ; Descriptor -> VendorLarge . ResourceLength = ( UINT16 ) i ; VendorData = ( ( UINT8 * ) Descriptor ) + sizeof ( AML_RESOURCE_LARGE_HEADER ) ; for ( i = 0 ; InitializerOp ; i ++ ) { if ( InitializerOp -> Asl . ParseOpcode == PARSEOP_DEFAULT_ARG ) { break ; } VendorData [ i ] = ( UINT8 ) InitializerOp -> Asl . Value . Integer ; InitializerOp = RsCompleteNodeAndGetNext ( InitializerOp ) ; } return ( Rnode ) ; }
FUNCTION:    RsDoVendorLargeDescriptor
 PARAMETERS:  Info                - Parse Op and resource template offset
FUNCTION : RsDoVendorLargeDescriptor PARAMETERS : Info - Parse Op and resource template offset
/* Count the number of data bytes */ /* Point to end-of-descriptor for vendor data */ /* Process all child initialization nodes */