Core APIs are the main APIs of the library. They allow to:
- Create an AML tree;
- Delete an AML tree;
- Clone an AML tree/node;
- Serialize an AML tree (convert the tree to a DSDT/SSDT table).
◆ AmlCloneNode()
Clone a node.
This function does not clone the children nodes. The cloned node returned is not attached to any tree.
- Parameters
-
[in] | Node | Pointer to a node. |
[out] | ClonedNode | Pointer holding the cloned node. |
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
◆ AmlSerializeTree()
Serialize a tree to create a DSDT/SSDT table.
If:
- the content of BufferSize is >= to the size needed to serialize the definition block;
- Buffer is not NULL; first serialize the ACPI DSDT/SSDT header from the root node, then serialize the AML blob from the rest of the tree.
The content of BufferSize is always updated to the size needed to serialize the definition block.
- Parameters
-
[in] | RootNode | Pointer to a root node. |
[in] | Buffer | Buffer to write the DSDT/SSDT table to. If Buffer is NULL, the size needed to serialize the DSDT/SSDT table is returned in BufferSize. |
[in,out] | BufferSize | Pointer holding the size of the Buffer. Its content is always updated to the size needed to serialize the DSDT/SSDT table. |
- Return values
-
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_BUFFER_TOO_SMALL | No space left in the buffer. |