]> git.proxmox.com Git - mirror_edk2.git/commit
DynamicTablesPkg: Rework AmlResourceDataCodegen.c/h
authorPierre Gondois <Pierre.Gondois@arm.com>
Thu, 30 Sep 2021 07:48:21 +0000 (08:48 +0100)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Fri, 1 Oct 2021 10:57:43 +0000 (10:57 +0000)
commit22873f58c40c496d59a0553bee1c720192ac35c9
tree74627aa7e3b36acad9048f00b7ccc5b587fca302
parent691c5f776274d88b13113f67d8dbac0a3298150c
DynamicTablesPkg: Rework AmlResourceDataCodegen.c/h

Rework all the functions to to have a generic prototype:
 - First take take the resource data specific arguments.
   E.g.: for a Register(): the AddressSpace, BitWidth, ...
 - The penultimate parameter is a NameOpNode. The resource data
   created is appended to the ResourceTemplate() contained in the
   NameOpNode.
 - The last parameter is a pointer holding the created resource data.

A least one of the two last parameter must be provided. One of them can
be omitted. This generic interface allows to either:
 - Add the resource data to a NameOpNode. This is a common case for the
   Ssdt tables generator.
 - Get the created resource data and let the caller place it in an AML
   tree.

Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
DynamicTablesPkg/Include/Library/AmlLib/AmlLib.h
DynamicTablesPkg/Library/Acpi/Arm/AcpiSsdtCmn600LibArm/SsdtCmn600Generator.c
DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.c
DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.h