TianoCore EDK2 master
Loading...
Searching...
No Matches
AmlParser.h File Reference
#include <AmlNodeDefines.h>
#include <Stream/AmlStream.h>

Go to the source code of this file.

Functions

EFI_STATUS EFIAPI AmlParseFixedArguments (IN AML_OBJECT_NODE *ObjectNode, IN AML_STREAM *FStream, IN LIST_ENTRY *NameSpaceRefList)
 
EFI_STATUS EFIAPI AmlParseVariableArguments (IN AML_NODE_HEADER *Node, IN AML_STREAM *FStream, IN LIST_ENTRY *NameSpaceRefList)
 

Detailed Description

AML Parser.

Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.

SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file AmlParser.h.

Function Documentation

◆ AmlParseFixedArguments()

EFI_STATUS EFIAPI AmlParseFixedArguments ( IN AML_OBJECT_NODE ObjectNode,
IN AML_STREAM FStream,
IN LIST_ENTRY NameSpaceRefList 
)

Parse the list of fixed arguments of the input ObjectNode.

For each argument, create a node and add it to the fixed argument list of the Node. If a fixed argument has children, parse them.

Parameters
[in]ObjectNodeObject node to parse the fixed arguments from.
[in]FStreamForward stream containing the AML bytecode to parse. The stream must not be at its end.
[in]NameSpaceRefListList of namespace reference nodes.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_BUFFER_TOO_SMALLNo space left in the buffer.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_OUT_OF_RESOURCESCould not allocate memory.

Definition at line 893 of file AmlParser.c.

◆ AmlParseVariableArguments()

EFI_STATUS EFIAPI AmlParseVariableArguments ( IN AML_NODE_HEADER Node,
IN AML_STREAM FStream,
IN LIST_ENTRY NameSpaceRefList 
)

Parse the variable list of arguments of the input ObjectNode.

For each variable argument, create a node and add it to the variable list of arguments of the Node. If a variable argument has children, parse them recursively.

The arguments of method invocation nodes are added to the variable list of arguments of the method invocation node. It is necessary to first get the number of arguments to parse for this kind of node. A method invocation can have at most 7 fixed arguments.

Parameters
[in]NodeNode to parse the variable arguments from.
[in]FStreamForward stream containing the AML bytecode to parse. The stream must not be at its end.
[in]NameSpaceRefListList of namespace reference nodes.
Return values
EFI_SUCCESSThe function completed successfully.
EFI_BUFFER_TOO_SMALLNo space left in the buffer.
EFI_INVALID_PARAMETERInvalid parameter.
EFI_OUT_OF_RESOURCESCould not allocate memory.

Definition at line 1031 of file AmlParser.c.