]> git.proxmox.com Git - mirror_edk2.git/commit
DynamicTablesPkg: Set EndTag's Checksum if RdList is modified
authorPierre Gondois <Pierre.Gondois@arm.com>
Fri, 8 Oct 2021 14:46:17 +0000 (15:46 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 8 Oct 2021 15:39:42 +0000 (15:39 +0000)
commit7b2022d39e99b825a16c8805974c3366d6c7dd3b
tree552a800b98398ea8eecb05844fb54a204da84dfe
parent74addfeab6d7f66800e430be078d6560c4edda53
DynamicTablesPkg: Set EndTag's Checksum if RdList is modified

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>
DynamicTablesPkg/Library/Common/AmlLib/Tree/AmlNodeInterface.c
DynamicTablesPkg/Library/Common/AmlLib/Tree/AmlTree.c