summaryrefslogtreecommitdiff
path: root/DynamicTablesPkg/Library/Common/AmlLib/Serialize/AmlSerialize.c
AgeCommit message (Collapse)AuthorFilesLines
5 daysDynamicTablesPkg/AmlLib: Fix serialization buffer size handlingAmrathesh1-6/+8
AmlSerializeTree uses a reversed buffer size comparison. As a result, it returns success without serializing when the buffer is larger than needed and attempts serialization when the buffer is too small. Return EFI_BUFFER_TOO_SMALL when Buffer is NULL or the supplied buffer is too small, and always report the required size. Update AmlSerializeDefinitionBlock to handle the expected size query status. Signed-off-by: Amrathesh <amrathesh@arm.com>
2021-12-07DynamicTablesPkg: Apply uncrustify changesMichael Kubacki1-52/+59
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-12-07DynamicTablesPkg: Change OPTIONAL keyword usage styleMichael D Kinney1-2/+2
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760 Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params. Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael Kubacki <michael.kubacki@microsoft.com> Signed-off-by: Michael D Kinney <michael.d.kinney@intel.com> Reviewed-by: Sami Mujawar <sami.mujawar@arm.com>
2020-08-13DynamicTablesPkg: AML serialise interfacePierre Gondois1-0/+324
AML Fixup and AML Codegen facilitate dynamic generation of Definition Block tables. The AML byte stream that is generated is represented in an AML tree. Once the AML table generation is completed, the AML tree needs to be serialised for installing as an ACPI table. The AML serialise interface implements the functionality to iterate the nodes in the AML tree, collating the AML bytecode, computing the checksum and writing the AML byte stream to a buffer that represents the Definition Block table. Signed-off-by: Pierre Gondois <pierre.gondois@arm.com> Co-authored-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>