diff options
Diffstat (limited to 'source/components/parser/psxface.c')
| -rw-r--r-- | source/components/parser/psxface.c | 82 | 
1 files changed, 82 insertions, 0 deletions
| diff --git a/source/components/parser/psxface.c b/source/components/parser/psxface.c index a6fe31648ec2..c85f0e939f33 100644 --- a/source/components/parser/psxface.c +++ b/source/components/parser/psxface.c @@ -275,6 +275,88 @@ Cleanup:  /*******************************************************************************   * + * FUNCTION:    AcpiPsExecuteTable + * + * PARAMETERS:  Info            - Method info block, contains: + *              Node            - Node to where the is entered into the + *                                namespace + *              ObjDesc         - Pseudo method object describing the AML + *                                code of the entire table + *              PassNumber      - Parse or execute pass + * + * RETURN:      Status + * + * DESCRIPTION: Execute a table + * + ******************************************************************************/ + +ACPI_STATUS +AcpiPsExecuteTable ( +    ACPI_EVALUATE_INFO      *Info) +{ +    ACPI_STATUS             Status; +    ACPI_PARSE_OBJECT       *Op = NULL; +    ACPI_WALK_STATE         *WalkState = NULL; + + +    ACPI_FUNCTION_TRACE (PsExecuteTable); + + +    /* Create and init a Root Node */ + +    Op = AcpiPsCreateScopeOp (Info->ObjDesc->Method.AmlStart); +    if (!Op) +    { +        Status = AE_NO_MEMORY; +        goto Cleanup; +    } + +    /* Create and initialize a new walk state */ + +    WalkState = AcpiDsCreateWalkState ( +        Info->ObjDesc->Method.OwnerId, NULL, NULL, NULL); +    if (!WalkState) +    { +        Status = AE_NO_MEMORY; +        goto Cleanup; +    } + +    Status = AcpiDsInitAmlWalk (WalkState, Op, Info->Node, +        Info->ObjDesc->Method.AmlStart, +        Info->ObjDesc->Method.AmlLength, Info, Info->PassNumber); +    if (ACPI_FAILURE (Status)) +    { +        goto Cleanup; +    } + +    if (Info->ObjDesc->Method.InfoFlags & ACPI_METHOD_MODULE_LEVEL) +    { +        WalkState->ParseFlags |= ACPI_PARSE_MODULE_LEVEL; +    } + +    /* +     * Parse the AML, WalkState will be deleted by ParseAml +     */ +    AcpiExEnterInterpreter (); +    Status = AcpiPsParseAml (WalkState); +    AcpiExExitInterpreter (); +    WalkState = NULL; + +Cleanup: +    if (WalkState) +    { +        AcpiDsDeleteWalkState (WalkState); +    } +    if (Op) +    { +        AcpiPsDeleteParseTree (Op); +    } +    return_ACPI_STATUS (Status); +} + + +/******************************************************************************* + *   * FUNCTION:    AcpiPsUpdateParameterList   *   * PARAMETERS:  Info            - See ACPI_EVALUATE_INFO | 
