|
EAML_NODE_TYPE EFIAPI | AmlGetNodeType (IN AML_NODE_HANDLE Node) |
|
EFI_STATUS EFIAPI | AmlGetRootNodeInfo (IN AML_ROOT_NODE_HANDLE RootNode, OUT EFI_ACPI_DESCRIPTION_HEADER *SdtHeaderBuffer) |
|
EFI_STATUS EFIAPI | AmlGetObjectNodeInfo (IN AML_OBJECT_NODE_HANDLE ObjectNode, OUT UINT8 *OpCode OPTIONAL, OUT UINT8 *SubOpCode OPTIONAL, OUT UINT32 *PkgLen OPTIONAL, OUT BOOLEAN *IsNameSpaceNode OPTIONAL) |
|
UINT8 | AmlGetFixedArgumentCount (IN AML_OBJECT_NODE_HANDLE Node) |
|
EFI_STATUS EFIAPI | AmlGetNodeDataType (IN AML_DATA_NODE_HANDLE DataNode, OUT EAML_NODE_DATA_TYPE *DataType) |
|
EFI_STATUS EFIAPI | AmlGetResourceDataType (IN AML_DATA_NODE_HANDLE DataNode, OUT AML_RD_HEADER *ResourceDataType) |
|
EFI_STATUS EFIAPI | AmlGetDataNodeBuffer (IN AML_DATA_NODE_HANDLE DataNode, OUT UINT8 *Buffer OPTIONAL, IN OUT UINT32 *BufferSize) |
|
EFI_STATUS EFIAPI | AmlUpdateRootNode (IN AML_ROOT_NODE_HANDLE RootNode, IN CONST EFI_ACPI_DESCRIPTION_HEADER *SdtHeader) |
|
EFI_STATUS EFIAPI | AmlUpdateDataNode (IN AML_DATA_NODE_HANDLE DataNode, IN EAML_NODE_DATA_TYPE DataType, IN UINT8 *Buffer, IN UINT32 Size) |
|
Node Interface APIs allow to query information from a node. Some functions expect a specific node type among the root/object/data node types.
For instance, AmlGetRootNodeInfo expects to receive a root node.
E.g.: Query the node type, the ACPI header stored in the root node, the OpCode/SubOpCode/PkgLen of an object node, the type of data stored in a data node, etc.
These APIs also allow to update some information.
E.g.: The ACPI header stored in the root node, the buffer of a data node.
The information of object nodes and the data type of data nodes cannot be modified. This prevents the creation of an inconsistent tree.
It is however possible to remove a node from a variable list of arguments and replace it. Use the Tree modification APIs APIs for this.
◆ AmlGetDataNodeBuffer()
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:
- the content of BufferSize is >= to the DataNode's buffer size;
- Buffer is not NULL; then copy the content of the DataNode's buffer in Buffer.
- Parameters
-
[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:
- At entry, the size of the Buffer;
- At exit, the size of the DataNode's buffer size.
|
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
◆ AmlGetFixedArgumentCount()
Returns the count of the fixed arguments for the input Node.
- Parameters
-
[in] | Node | Pointer to an object node. |
- Returns
- Number of fixed arguments of the object node. Return 0 if the node is not an object node.
◆ AmlGetNodeDataType()
Get the data type of the DataNode. The Node must be a data node.
- Parameters
-
[in] | DataNode | Pointer to a data node. |
[out] | DataType | Pointer holding the data type of the data buffer. |
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
◆ AmlGetNodeType()
Returns the tree node type (Root/Object/Data).
- Parameters
-
[in] | Node | Pointer to a Node. |
- Returns
- The node type. EAmlNodeUnknown if invalid parameter.
◆ AmlGetObjectNodeInfo()
Get the ObjectNode information. The Node must be an object node.
- Parameters
-
[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. |
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
◆ AmlGetResourceDataType()
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.
- Parameters
-
[in] | DataNode | Pointer to a data node containing a resource data element. |
[out] | ResourceDataType | Pointer holding the descriptor Id of the resource data. |
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
◆ AmlGetRootNodeInfo()
Get the RootNode information. The Node must be a root node.
- Parameters
-
[in] | RootNode | Pointer to a root node. |
[out] | SdtHeaderBuffer | Buffer to copy the ACPI DSDT/SSDT header to. |
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
◆ AmlUpdateDataNode()
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.
- Parameters
-
[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. |
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_UNSUPPORTED | Operation not supporter. |
◆ AmlUpdateRootNode()
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.
- Parameters
-
[in] | RootNode | Pointer to a root node. |
[in] | SdtHeader | Pointer to an ACPI DSDT/SSDT table header. |
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |