diff options
| author | Jung-uk Kim <jkim@FreeBSD.org> | 2016-08-31 21:40:51 +0000 |
|---|---|---|
| committer | Jung-uk Kim <jkim@FreeBSD.org> | 2016-08-31 21:40:51 +0000 |
| commit | be99e84498e91a5930864ef7b92b1a7ceb815e44 (patch) | |
| tree | 7f5a2883a75b1713bdfe7d36ffa6217bac9187e2 /source/components/parser/psxface.c | |
| parent | 8bc6ab62dbdb3e8b0d2253e0440f6f58ac9afd3d (diff) | |
Notes
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 |
