TianoCore EDK2 master
|
Go to the source code of this file.
AML Node.
Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AmlNode.h.
EFI_STATUS EFIAPI AmlCreateDataNode | ( | IN EAML_NODE_DATA_TYPE | DataType, |
IN CONST UINT8 * | Data, | ||
IN UINT32 | DataSize, | ||
OUT AML_DATA_NODE ** | NewDataNodePtr | ||
) |
Create an AML_DATA_NODE.
[in] | DataType | DataType of the node. |
[in] | Data | Pointer to the AML bytecode corresponding to this node. Data is copied from there. |
[in] | DataSize | Number of bytes to consider at the address pointed by Data. |
[out] | NewDataNodePtr | If success, contains the created AML_DATA_NODE. Otherwise reset to NULL. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
EFI_STATUS EFIAPI AmlCreateObjectNode | ( | IN CONST AML_BYTE_ENCODING * | AmlByteEncoding, |
IN UINT32 | PkgLength, | ||
OUT AML_OBJECT_NODE ** | NewObjectNodePtr | ||
) |
Create an AML_OBJECT_NODE.
[in] | AmlByteEncoding | Byte encoding entry. |
[in] | PkgLength | PkgLength of the node if the AmlByteEncoding has the PkgLen attribute. 0 otherwise. |
[out] | NewObjectNodePtr | If success, contains the created AML_OBJECT_NODE. Otherwise reset to NULL. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
EFI_STATUS EFIAPI AmlCreateRootNode | ( | IN CONST EFI_ACPI_DESCRIPTION_HEADER * | SdtHeader, |
OUT AML_ROOT_NODE ** | NewRootNodePtr | ||
) |
Create an AML_ROOT_NODE. This node will be the root of the tree.
[in] | SdtHeader | Pointer to an ACPI DSDT/SSDT header to copy the data from. |
[out] | NewRootNodePtr | If success, contains the created AML_ROOT_NODE. Otherwise reset to NULL. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
EFI_STATUS EFIAPI AmlDeleteNode | ( | IN AML_NODE_HEADER * | Node | ) |
BOOLEAN EFIAPI AmlIsMethodDefinitionNode | ( | IN CONST AML_OBJECT_NODE * | Node | ) |
Check whether Node corresponds to a method definition.
A method definition can be introduced:
Note: An alias node, having an AML_ALIAS_OP, can be resolved to a method definition. This function doesn't handle this case.
[in] | Node | Node to check whether it is a method definition. |
TRUE | The Node is a method definition. |
FALSE | Otherwise. |
BOOLEAN EFIAPI AmlNodeCompareOpCode | ( | IN CONST AML_OBJECT_NODE * | ObjectNode, |
IN UINT8 | OpCode, | ||
IN UINT8 | SubOpCode | ||
) |
Check whether ObjectNode has the input OpCode/SubOpcode couple.
[in] | ObjectNode | Pointer to an object node. |
[in] | OpCode | OpCode to check |
[in] | SubOpCode | SubOpCode to check |
TRUE | The node is an AML object and the Opcode and the SubOpCode match. |
FALSE | Otherwise. |
CHAR8 *EFIAPI AmlNodeGetName | ( | IN CONST AML_OBJECT_NODE * | ObjectNode | ) |
EFI_STATUS AmlNodeGetNameIndex | ( | IN CONST AML_OBJECT_NODE * | ObjectNode, |
OUT EAML_PARSE_INDEX * | Index | ||
) |
Get the index at which the name of the node is stored.
[in] | ObjectNode | Pointer to an object node. Must have the AML_IN_NAMESPACE attribute. |
[out] | Index | Index of the name in the fixed list of arguments. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
BOOLEAN EFIAPI AmlNodeHasAttribute | ( | IN CONST AML_OBJECT_NODE * | ObjectNode, |
IN AML_OP_ATTRIBUTE | Attribute | ||
) |
Check whether ObjectNode has the input attribute. This function can be used to check ObjectNode is an object node at the same time.
[in] | ObjectNode | Pointer to an object node. |
[in] | Attribute | Attribute to check for. |
TRUE | The node is an AML object and the attribute is present. |
FALSE | Otherwise. |
BOOLEAN EFIAPI IsIntegerNode | ( | IN AML_OBJECT_NODE * | Node | ) |
Check whether a Node is an integer node.
By integer node we mean an object node having one of the following opcode:
[in] | Node | The node to check. |
TRUE | The Node is an integer node. |
FALSE | Otherwise. |
BOOLEAN EFIAPI IsSpecialIntegerNode | ( | IN AML_OBJECT_NODE * | Node | ) |