TianoCore EDK2 master
|
#include <AmlNodeDefines.h>
Go to the source code of this file.
Functions | |
EFI_STATUS EFIAPI | AcpiPlatformChecksum (IN EFI_ACPI_DESCRIPTION_HEADER *AcpiTable) |
EFI_STATUS EFIAPI | AmlComputeSize (IN CONST AML_NODE_HEADER *Node, IN OUT UINT32 *Size) |
EFI_STATUS EFIAPI | AmlNodeGetIntegerValue (IN AML_OBJECT_NODE *Node, OUT UINT64 *Value) |
EFI_STATUS EFIAPI | AmlNodeSetIntegerValue (IN AML_OBJECT_NODE *Node, IN UINT64 NewValue, OUT INT8 *ValueWidthDiff) |
EFI_STATUS EFIAPI | AmlPropagateInformation (IN AML_NODE_HEADER *Node, IN BOOLEAN IsIncrement, IN UINT32 Diff, IN UINT8 NodeCount) |
EFI_STATUS EFIAPI | AmlSetRdListCheckSum (IN AML_OBJECT_NODE *BufferOpNode, IN UINT8 CheckSum) |
AML Utility.
Copyright (c) 2019 - 2021, Arm Limited. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file AmlUtility.h.
EFI_STATUS EFIAPI AcpiPlatformChecksum | ( | IN EFI_ACPI_DESCRIPTION_HEADER * | AcpiTable | ) |
This function computes and updates the ACPI table checksum.
[in] | AcpiTable | Pointer to an Acpi table. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 24 of file AmlUtility.c.
EFI_STATUS EFIAPI AmlComputeSize | ( | IN CONST AML_NODE_HEADER * | Node, |
IN OUT UINT32 * | Size | ||
) |
Compute the size of a tree/sub-tree.
[in] | Node | Node to compute the size. |
[in,out] | Size | Pointer holding the computed size. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 169 of file AmlUtility.c.
EFI_STATUS EFIAPI AmlNodeGetIntegerValue | ( | IN AML_OBJECT_NODE * | Node, |
OUT UINT64 * | Value | ||
) |
Get the value contained in an integer node.
[in] | Node | Pointer to an integer node. Must be an object node. |
[out] | Value | Value contained in the integer node. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 206 of file AmlUtility.c.
EFI_STATUS EFIAPI AmlNodeSetIntegerValue | ( | IN AML_OBJECT_NODE * | Node, |
IN UINT64 | NewValue, | ||
OUT INT8 * | ValueWidthDiff | ||
) |
Set the value contained in an integer node.
The OpCode is updated accordingly to the new value (e.g.: If the original value was a UINT8 value, then the OpCode would be AML_BYTE_PREFIX. If it the new value is a UINT16 value then the OpCode will be updated to AML_WORD_PREFIX).
[in] | Node | Pointer to an integer node. Must be an object node. |
[in] | NewValue | New value to write in the integer node. |
[out] | ValueWidthDiff | Difference in number of bytes used to store the new value. Can be negative. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_OUT_OF_RESOURCES | Could not allocate memory. |
Definition at line 374 of file AmlUtility.c.
EFI_STATUS EFIAPI AmlPropagateInformation | ( | IN AML_NODE_HEADER * | Node, |
IN BOOLEAN | IsIncrement, | ||
IN UINT32 | Diff, | ||
IN UINT8 | NodeCount | ||
) |
Propagate information up the tree.
The information can be a new size, a new number of arguments.
[in] | Node | Pointer to a node. Must be a root node or an object node. |
[in] | IsIncrement | Choose the operation to do:
|
[in] | Diff | Value to add/subtract to the Node's size. |
[in] | NodeCount | Number of nodes added/removed. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
Definition at line 870 of file AmlUtility.c.
EFI_STATUS EFIAPI AmlSetRdListCheckSum | ( | IN AML_OBJECT_NODE * | BufferOpNode, |
IN UINT8 | CheckSum | ||
) |
Find and set the EndTag's Checksum of a list of Resource Data elements.
Lists of Resource Data elements end with an EndTag (most of the time). This function finds the EndTag (if present) in a list of Resource Data elements and sets the checksum.
ACPI 6.4, s6.4.2.9 "End Tag": "This checksum is generated such that adding it to the sum of all the data bytes will produce a zero sum." "If the checksum field is zero, the resource data is treated as if the checksum operation succeeded. Configuration proceeds normally."
To avoid re-computing checksums, if a new resource data elements is added/removed/modified in a list of resource data elements, the AmlLib resets the checksum to 0.
[in] | BufferOpNode | Node having a list of Resource Data elements. |
[in] | CheckSum | CheckSum to store in the EndTag. To ignore/avoid computing the checksum, give 0. |
EFI_SUCCESS | The function completed successfully. |
EFI_INVALID_PARAMETER | Invalid parameter. |
EFI_NOT_FOUND | No EndTag found. |
Definition at line 961 of file AmlUtility.c.