FreeBSD/sys/contrib/dev/acpica/components/resources/rsaddr.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiRsGetAddressCommon
 *
 * PARAMETERS:  Resource            - Pointer to the internal resource struct
 *              Aml                 - Pointer to the AML resource descriptor
 *
 * RETURN:      TRUE if the ResourceType field is OK, FALSE otherwise
 *
 * DESCRIPTION: Convert common flag fields from a raw AML resource descriptor
 *              to an internal resource descriptor
 *
 ******************************************************************************/
AcpiRsGetAddressCommon
PARAMETERS:  Resource            - Pointer to the internal resource struct
Aml                 - Pointer to the AML resource descriptor

TRUE if the ResourceType field is OK, FALSE otherwise

Convert common flag fields from a raw AML resource descriptor
to an internal resource descriptor
AcpiRsGetAddressCommon PARAMETERS : Resource - Pointer to the internal resource struct Aml - Pointer to the AML resource descriptor TRUE if the ResourceType field is OK FALSE otherwise Convert common flag fields from a raw AML resource descriptor to an internal resource descriptor
BOOLEAN
AcpiRsGetAddressCommon (
    ACPI_RESOURCE           *Resource,
    AML_RESOURCE            *Aml)
{
    ACPI_FUNCTION_ENTRY ();
    if ((Aml->Address.ResourceType > 2) &&
        (Aml->Address.ResourceType < 0xC0))
    {
        return (FALSE);
    }
    (void) AcpiRsConvertAmlToResource (
        Resource, Aml, AcpiRsConvertGeneralFlags);
    if (Resource->Data.Address.ResourceType == ACPI_MEMORY_RANGE)
    {
        (void) AcpiRsConvertAmlToResource (
            Resource, Aml, AcpiRsConvertMemFlags);
    }
    else if (Resource->Data.Address.ResourceType == ACPI_IO_RANGE)
    {
        (void) AcpiRsConvertAmlToResource (
            Resource, Aml, AcpiRsConvertIoFlags);
    }
    else
    {
        Resource->Data.Address.Info.TypeSpecific =
            Aml->Address.SpecificFlags;
    }
    return (TRUE);
}
BOOLEAN AcpiRsGetAddressCommon ( ACPI_RESOURCE * Resource , AML_RESOURCE * Aml ) { ACPI_FUNCTION_ENTRY ( ) ; if ( ( Aml -> Address . ResourceType > 2 ) && ( Aml -> Address . ResourceType < 0xC0 ) ) { return ( FALSE ) ; } ( void ) AcpiRsConvertAmlToResource ( Resource , Aml , AcpiRsConvertGeneralFlags ) ; if ( Resource -> Data . Address . ResourceType == ACPI_MEMORY_RANGE ) { ( void ) AcpiRsConvertAmlToResource ( Resource , Aml , AcpiRsConvertMemFlags ) ; } else if ( Resource -> Data . Address . ResourceType == ACPI_IO_RANGE ) { ( void ) AcpiRsConvertAmlToResource ( Resource , Aml , AcpiRsConvertIoFlags ) ; } else { Resource -> Data . Address . Info . TypeSpecific = Aml -> Address . SpecificFlags ; } return ( TRUE ) ; }
FUNCTION:    AcpiRsGetAddressCommon
 PARAMETERS:  Resource            - Pointer to the internal resource struct
              Aml                 - Pointer to the AML resource descriptor
FUNCTION : AcpiRsGetAddressCommon PARAMETERS : Resource - Pointer to the internal resource struct Aml - Pointer to the AML resource descriptor
/* Validate the Resource Type */ /* Get the Resource Type and General Flags */ /* Get the Type-Specific Flags (Memory and I/O descriptors only) */ /* Generic resource type, just grab the TypeSpecific byte */