TianoCore EDK2 master
|
#include <AmlNodeDefines.h>
#include <AmlCoreInterface.h>
#include <ResourceData/AmlResourceData.h>
#include <String/AmlString.h>
#include <Tree/AmlNode.h>
#include <Tree/AmlTree.h>
#include <Utils/AmlUtility.h>
Go to the source code of this file.
AML Node Interface.
Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AmlNodeInterface.c.
EFI_STATUS EFIAPI AmlGetDataNodeBuffer | ( | IN AML_DATA_NODE * | DataNode, |
OUT UINT8 *Buffer | OPTIONAL, | ||
IN OUT UINT32 * | BufferSize | ||
) |
Get the data buffer and size of the DataNode. The Node must be a data node.
BufferSize is always updated to the size of buffer of the DataNode.
If:
[in] | DataNode | Pointer to a data node. |
[out] | Buffer | Buffer to write the data to. Optional, if NULL, only update BufferSize. |
[in,out] | BufferSize | Pointer holding:
|
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 236 of file AmlNodeInterface.c.
UINT8 AmlGetFixedArgumentCount | ( | IN AML_OBJECT_NODE * | Node | ) |
Returns the count of the fixed arguments for the input Node.
[in] | Node | Pointer to an object node. |
Definition at line 137 of file AmlNodeInterface.c.
EFI_STATUS EFIAPI AmlGetNodeDataType | ( | IN AML_DATA_NODE * | DataNode, |
OUT EAML_NODE_DATA_TYPE * | DataType | ||
) |
Get the data type of the DataNode. The Node must be a data node.
[in] | DataNode | Pointer to a data node. |
[out] | DataType | Pointer holding the data type of the data buffer. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 161 of file AmlNodeInterface.c.
EAML_NODE_TYPE EFIAPI AmlGetNodeType | ( | IN AML_NODE_HEADER * | Node | ) |
Returns the tree node type (Root/Object/Data).
[in] | Node | Pointer to a Node. |
Definition at line 27 of file AmlNodeInterface.c.
EFI_STATUS EFIAPI AmlGetObjectNodeInfo | ( | IN AML_OBJECT_NODE * | ObjectNode, |
OUT UINT8 *OpCode | OPTIONAL, | ||
OUT UINT8 *SubOpCode | OPTIONAL, | ||
OUT UINT32 *PkgLen | OPTIONAL, | ||
OUT BOOLEAN *IsNameSpaceNode | OPTIONAL | ||
) |
Get the ObjectNode information. The Node must be an object node.
[in] | ObjectNode | Pointer to an object node. |
[out] | OpCode | Pointer holding the OpCode. Optional, can be NULL. |
[out] | SubOpCode | Pointer holding the SubOpCode. Optional, can be NULL. |
[out] | PkgLen | Pointer holding the PkgLen. The PkgLen is 0 for nodes not having the Pkglen attribute. Optional, can be NULL. |
[out] | IsNameSpaceNode | Pointer holding TRUE if the node is defining or changing the NameSpace scope. E.g.: The "Name ()" and "Scope ()" ASL statements add/modify the NameSpace scope. Their corresponding node are NameSpace nodes. Optional, can be NULL. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 97 of file AmlNodeInterface.c.
EFI_STATUS EFIAPI AmlGetResourceDataType | ( | IN AML_DATA_NODE * | DataNode, |
OUT AML_RD_HEADER * | ResourceDataType | ||
) |
Get the descriptor Id of the resource data element contained in the DataNode.
The Node must be a data node. The Node must have the resource data type, i.e. have the EAmlNodeDataTypeResourceData data type.
[in] | DataNode | Pointer to a data node containing a resource data element. |
[out] | ResourceDataType | Pointer holding the descriptor Id of the resource data. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 195 of file AmlNodeInterface.c.
EFI_STATUS EFIAPI AmlGetRootNodeInfo | ( | IN AML_ROOT_NODE * | RootNode, |
OUT EFI_ACPI_DESCRIPTION_HEADER * | SdtHeaderBuffer | ||
) |
Get the RootNode information. The Node must be a root node.
[in] | RootNode | Pointer to a root node. |
[out] | SdtHeaderBuffer | Buffer to copy the ACPI DSDT/SSDT header to. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 50 of file AmlNodeInterface.c.
EFI_STATUS EFIAPI AmlUpdateDataNode | ( | IN AML_DATA_NODE * | DataNode, |
IN EAML_NODE_DATA_TYPE | DataType, | ||
IN UINT8 * | Buffer, | ||
IN UINT32 | Size | ||
) |
Update the buffer of a data node.
Note: The data type of the buffer's content must match the data type of the DataNode. This is a hard restriction to prevent undesired behaviour.
[in] | DataNode | Pointer to a data node. |
[in] | DataType | Data type of the Buffer's content. |
[in] | Buffer | Buffer containing the new data. The content of the Buffer is copied. |
[in] | Size | Size of the Buffer. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_UNSUPPORTED | Operation not supporter. |
Definition at line 393 of file AmlNodeInterface.c.
EFI_STATUS EFIAPI AmlUpdateInteger | ( | IN AML_OBJECT_NODE * | IntegerOpNode, |
IN UINT64 | NewInteger | ||
) |
Update an object node representing an integer with a new value.
The object node must have one of the following OpCodes:
The following OpCode is not supported:
[in] | IntegerOpNode | Pointer an object node containing an integer. Must not be an object node with an AML_ONES_OP OpCode. |
[in] | NewInteger | New integer value to set. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 335 of file AmlNodeInterface.c.
EFI_STATUS EFIAPI AmlUpdateRootNode | ( | IN AML_ROOT_NODE * | RootNode, |
IN CONST EFI_ACPI_DESCRIPTION_HEADER * | SdtHeader | ||
) |
Update the ACPI DSDT/SSDT table header.
The input SdtHeader information is copied to the tree RootNode. The table Length field is automatically updated. The checksum field is only updated when serializing the tree.
[in] | RootNode | Pointer to a root node. |
[in] | SdtHeader | Pointer to an ACPI DSDT/SSDT table header. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 274 of file AmlNodeInterface.c.