deps/acpica/source/common/dmrestag.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiDmFindResources
 *
 * PARAMETERS:  Root                - Root of the parse tree
 *
 * RETURN:      None
 *
 * DESCRIPTION: Add all ResourceTemplate declarations to the namespace. Each
 *              resource descriptor in each template is given a node -- used
 *              for later conversion of resource references to symbolic refs.
 *
 ******************************************************************************/
AcpiDmFindResources
PARAMETERS:  Root                - Root of the parse tree

None

Add all ResourceTemplate declarations to the namespace. Each
resource descriptor in each template is given a node -- used
for later conversion of resource references to symbolic refs.
AcpiDmFindResources PARAMETERS : Root - Root of the parse tree None Add all ResourceTemplate declarations to the namespace . Each resource descriptor in each template is given a node -- used for later conversion of resource references to symbolic refs .
void
AcpiDmFindResources (
    ACPI_PARSE_OBJECT       *Root)
{
    ACPI_PARSE_OBJECT       *Op = Root;
    ACPI_PARSE_OBJECT       *Parent;
    while (Op)
    {
        if (Op->Common.AmlOpcode == AML_BUFFER_OP)
        {
            Parent = Op->Common.Parent;
            if (Parent->Common.AmlOpcode == AML_NAME_OP)
            {
                if (ACPI_SUCCESS (AcpiDmIsResourceTemplate (NULL, Op)))
                {
                    Op->Common.DisasmOpcode = ACPI_DASM_RESOURCE;
                    AcpiDmAddResourcesToNamespace (Parent->Common.Node, Op);
                }
            }
        }
        Op = AcpiPsGetDepthNext (Root, Op);
    }
}
void AcpiDmFindResources ( ACPI_PARSE_OBJECT * Root ) { ACPI_PARSE_OBJECT * Op = Root ; ACPI_PARSE_OBJECT * Parent ; while ( Op ) { if ( Op -> Common . AmlOpcode == AML_BUFFER_OP ) { Parent = Op -> Common . Parent ; if ( Parent -> Common . AmlOpcode == AML_NAME_OP ) { if ( ACPI_SUCCESS ( AcpiDmIsResourceTemplate ( NULL , Op ) ) ) { Op -> Common . DisasmOpcode = ACPI_DASM_RESOURCE ; AcpiDmAddResourcesToNamespace ( Parent -> Common . Node , Op ) ; } } } Op = AcpiPsGetDepthNext ( Root , Op ) ; } }
FUNCTION:    AcpiDmFindResources
 PARAMETERS:  Root                - Root of the parse tree
FUNCTION : AcpiDmFindResources PARAMETERS : Root - Root of the parse tree
/* Walk the entire parse tree */ /* We are interested in Buffer() declarations */ /* And only declarations of the form Name (XXXX, Buffer()... ) */ /*
                 * If the buffer is a resource template, add the individual
                 * resource descriptors to the namespace, as children of the
                 * buffer node.
                 */