summaryrefslogtreecommitdiff
path: root/DynamicTablesPkg/Library/Common/AmlLib/Tree/AmlTree.c
AgeCommit message (Collapse)AuthorFilesLines
8 daysDynamicTablesPkg/AmlLib: Fix fixed argument bounds checkAmrathesh1-1/+1
AmlSetFixedArgument() accepts an index equal to the fixed argument count. The count is an exclusive upper bound, so this permits an out-of-bounds write to the FixedArgs array. Require the index to be strictly less than the fixed argument count. Signed-off-by: Amrathesh <amrathesh@arm.com>
2026-09-10DynamicTablesPkg: Validate fixed AML argument is detachedVarshitPandya1-2/+2
AmlSetFixedArgument() attaches NewNode to an AML object but does not currently verify that the node is detached. Passing an already attached node could leave the AML tree in an inconsistent state. Require non-NULL argument nodes to be detached before attaching them. Continue accepting NULL because callers use it to clear a fixed argument. Signed-off-by: Varshit Pandya <varshit.pandya@arm.com>
2021-12-07DynamicTablesPkg: Apply uncrustify changesMichael Kubacki1-129/+163
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the DynamicTablesPkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2021-10-08DynamicTablesPkg: Set EndTag's Checksum if RdList is modifiedPierre Gondois1-45/+27
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. This patch also refactors the AmlAppendRdNode() function by getting the last Resource Data node directly instead of iterating over all the elements of the list of Resource Data node. Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2020-10-21DynamicTablesPkg: AmlLib fix ECC errorsSami Mujawar1-1/+1
Fix the following ECC reported errors in AmlLib. - [1008] File has invalid Non-ACSII char. - [9002] The function headers should follow Doxygen special documentation blocks in section 2.3.5 Comment does NOT have tail **/ Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-08-13DynamicTablesPkg: AML tree interfacePierre Gondois1-0/+1047
The AML tree is composite and has the following node types: - Root node. - Object node. - Data node. These nodes are part of the Fixed Arguments or the Variable arguments list in the AML tree. The AML tree interface provides functions to manage the fixed and the variable argument nodes in the AML tree. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>