TianoCore EDK2 master
|
#include <AmlNodeDefines.h>
#include <AmlCoreInterface.h>
#include <Stream/AmlStream.h>
#include <Tree/AmlNode.h>
#include <Tree/AmlTree.h>
#include <Utils/AmlUtility.h>
Go to the source code of this file.
Functions | |
STATIC BOOLEAN EFIAPI | AmlSerializeNodeCallback (IN AML_NODE_HEADER *Node, IN OUT VOID *Context OPTIONAL, IN OUT EFI_STATUS *Status OPTIONAL) |
EFI_STATUS EFIAPI | AmlSerializeTree (IN AML_ROOT_NODE *RootNode, IN UINT8 *Buffer OPTIONAL, IN OUT UINT32 *BufferSize) |
EFI_STATUS EFIAPI | AmlSerializeDefinitionBlock (IN AML_ROOT_NODE *RootNode, OUT EFI_ACPI_DESCRIPTION_HEADER **Table) |
AML Serialize.
Copyright (c) 2019 - 2020, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AmlSerialize.c.
EFI_STATUS EFIAPI AmlSerializeDefinitionBlock | ( | IN AML_ROOT_NODE * | RootNode, |
OUT EFI_ACPI_DESCRIPTION_HEADER ** | Table | ||
) |
Serialize an AML definition block.
This functions allocates memory with the "AllocateZeroPool ()" function. This memory is used to serialize the AML tree and is returned in the Table.
[in] | RootNode | Root node of the tree. |
[out] | Table | On return, hold the serialized definition block. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 275 of file AmlSerialize.c.
STATIC BOOLEAN EFIAPI AmlSerializeNodeCallback | ( | IN AML_NODE_HEADER * | Node, |
IN OUT VOID *Context | OPTIONAL, | ||
IN OUT EFI_STATUS *Status | OPTIONAL | ||
) |
Callback function to copy the AML bytecodes contained in a node to the Stream stored in the Context. The SDT header data contained in the root node is not serialized by this function.
[in] | Node | Pointer to the node to copy the AML bytecodes from. |
[in,out] | Context | Contains a forward Stream to write to. (AML_STREAM*)Context. |
[in,out] | Status | At entry, contains the status returned by the last call to this exact function during the enumeration. As exit, contains the returned status of the call to this function. Optional, can be NULL. |
TRUE | if the enumeration can continue or has finished without interruption. |
FALSE | if the enumeration needs to stopped or has stopped. |
Definition at line 40 of file AmlSerialize.c.
EFI_STATUS EFIAPI AmlSerializeTree | ( | IN AML_ROOT_NODE * | RootNode, |
IN UINT8 *Buffer | OPTIONAL, | ||
IN OUT UINT32 * | BufferSize | ||
) |
Serialize a tree to create an ACPI DSDT/SSDT table.
If:
The content of BufferSize is always updated to the size needed to serialize the definition block.
[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. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_BUFFER_TOO_SMALL | No space left in the buffer. |
Definition at line 176 of file AmlSerialize.c.