FreeBSD/sys/contrib/dev/acpica/components/namespace/nsparse.c
/*******************************************************************************
 *
 * FUNCTION:    AcpiNsParseTable
 *
 * PARAMETERS:  TableDesc       - An ACPI table descriptor for table to parse
 *              StartNode       - Where to enter the table into the namespace
 *
 * RETURN:      Status
 *
 * DESCRIPTION: Parse AML within an ACPI table and return a tree of ops
 *
 ******************************************************************************/
AcpiNsParseTable
PARAMETERS:  TableDesc       - An ACPI table descriptor for table to parse
StartNode       - Where to enter the table into the namespace

Status

Parse AML within an ACPI table and return a tree of ops
AcpiNsParseTable PARAMETERS : TableDesc - An ACPI table descriptor for table to parse StartNode - Where to enter the table into the namespace Status Parse AML within an ACPI table and return a tree of ops
ACPI_STATUS
AcpiNsParseTable (
    UINT32                  TableIndex,
    ACPI_NAMESPACE_NODE     *StartNode)
{
    ACPI_STATUS             Status;
    ACPI_FUNCTION_TRACE (NsParseTable);
    ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Start pass 1\n"));
    Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS1,
        TableIndex, StartNode);
    if (ACPI_FAILURE (Status))
    {
        return_ACPI_STATUS (Status);
    }
    ACPI_DEBUG_PRINT ((ACPI_DB_PARSE, "**** Start pass 2\n"));
    Status = AcpiNsOneCompleteParse (ACPI_IMODE_LOAD_PASS2,
        TableIndex, StartNode);
    if (ACPI_FAILURE (Status))
    {
        return_ACPI_STATUS (Status);
    }
    return_ACPI_STATUS (Status);
}
ACPI_STATUS AcpiNsParseTable ( UINT32 TableIndex , ACPI_NAMESPACE_NODE * StartNode ) { ACPI_STATUS Status ; ACPI_FUNCTION_TRACE ( NsParseTable ) ; ACPI_DEBUG_PRINT ( ( ACPI_DB_PARSE , " \n " ) ) ; Status = AcpiNsOneCompleteParse ( ACPI_IMODE_LOAD_PASS1 , TableIndex , StartNode ) ; if ( ACPI_FAILURE ( Status ) ) { return_ACPI_STATUS ( Status ) ; } ACPI_DEBUG_PRINT ( ( ACPI_DB_PARSE , " \n " ) ) ; Status = AcpiNsOneCompleteParse ( ACPI_IMODE_LOAD_PASS2 , TableIndex , StartNode ) ; if ( ACPI_FAILURE ( Status ) ) { return_ACPI_STATUS ( Status ) ; } return_ACPI_STATUS ( Status ) ; }
FUNCTION:    AcpiNsParseTable
 PARAMETERS:  TableDesc       - An ACPI table descriptor for table to parse
              StartNode       - Where to enter the table into the namespace
FUNCTION : AcpiNsParseTable PARAMETERS : TableDesc - An ACPI table descriptor for table to parse StartNode - Where to enter the table into the namespace
/*
     * AML Parse, pass 1
     *
     * In this pass, we load most of the namespace. Control methods
     * are not parsed until later. A parse tree is not created. Instead,
     * each Parser Op subtree is deleted when it is finished. This saves
     * a great deal of memory, and allows a small cache of parse objects
     * to service the entire parse. The second pass of the parse then
     * performs another complete parse of the AML.
     */ /*
     * AML Parse, pass 2
     *
     * In this pass, we resolve forward references and other things
     * that could not be completed during the first pass.
     * Another complete parse of the AML is performed, but the
     * overhead of this is compensated for by the fact that the
     * parse objects are all cached.
     */