FreeBSD/sys/contrib/dev/acpica/components/utilities/utresrc.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiUtGetResourceLength
 *
 * PARAMETERS:  Aml             - Pointer to the raw AML resource descriptor
 *
 * RETURN:      Byte Length
 *
 * DESCRIPTION: Get the "Resource Length" of a raw AML descriptor. By
 *              definition, this does not include the size of the descriptor
 *              header or the length field itself.
 *
 ******************************************************************************/
AcpiUtGetResourceLength
PARAMETERS:  Aml             - Pointer to the raw AML resource descriptor

Byte Length

Get the "Resource Length" of a raw AML descriptor. By
definition, this does not include the size of the descriptor
header or the length field itself.
AcpiUtGetResourceLength PARAMETERS : Aml - Pointer to the raw AML resource descriptor Byte Length Get the " Resource Length " of a raw AML descriptor . By definition this does not include the size of the descriptor header or the length field itself .
UINT16
AcpiUtGetResourceLength (
    void                    *Aml)
{
    ACPI_RS_LENGTH          ResourceLength;
    ACPI_FUNCTION_ENTRY ();
    if (ACPI_GET8 (Aml) & ACPI_RESOURCE_NAME_LARGE)
    {
        ACPI_MOVE_16_TO_16 (&ResourceLength, ACPI_ADD_PTR (UINT8, Aml, 1));
    }
    else
    {
        ResourceLength = (UINT16) (ACPI_GET8 (Aml) &
            ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK);
    }
    return (ResourceLength);
}
UINT16 AcpiUtGetResourceLength ( void * Aml ) { ACPI_RS_LENGTH ResourceLength ; ACPI_FUNCTION_ENTRY ( ) ; if ( ACPI_GET8 ( Aml ) & ACPI_RESOURCE_NAME_LARGE ) { ACPI_MOVE_16_TO_16 ( & ResourceLength , ACPI_ADD_PTR ( UINT8 , Aml , 1 ) ) ; } else { ResourceLength = ( UINT16 ) ( ACPI_GET8 ( Aml ) & ACPI_RESOURCE_NAME_SMALL_LENGTH_MASK ) ; } return ( ResourceLength ) ; }
FUNCTION:    AcpiUtGetResourceLength
 PARAMETERS:  Aml             - Pointer to the raw AML resource descriptor
FUNCTION : AcpiUtGetResourceLength PARAMETERS : Aml - Pointer to the raw AML resource descriptor
/*
     * Byte 0 contains the descriptor name (Resource Type)
     * Examine the large/small bit in the resource header
     */ /* Large Resource type -- bytes 1-2 contain the 16-bit length */ /* Small Resource type -- bits 2:0 of byte 0 contain the length */