summaryrefslogtreecommitdiff
path: root/DynamicTablesPkg/Library/Common/AmlLib/AmlEncoding/Aml.c
AgeCommit message (Collapse)AuthorFilesLines
2024-10-07DynamicTablesPkg: AmlLib: Fix CodeQL IssueOliver Smith-Denny1-1/+1
Without the addition of this cast, the compiler promotes 1 to a UINT32, which leads CodeQL to complain that different size types are being compared. Signed-off-by: Oliver Smith-Denny <osde@linux.microsoft.com>
2021-12-07DynamicTablesPkg: Apply uncrustify changesMichael Kubacki1-221/+237
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: Helper function to compute package lengthPierre Gondois1-1/+86
Some AML object have a PkgLen which indicates the size of the AML object. The package length can be encoded in 1 to 4 bytes. The bytes used to encode the PkgLen is itself counted in the PkgLen value. So, if an AML object's size increments/decrements, the number of bytes used to encode the PkgLen value can itself increment/decrement. Therefore, a helper function AmlComputePkgLength() is introduced to simply computation of the PkgLen. Reviewed-by: Sami Mujawar <sami.mujawar@arm.com> Signed-off-by: Pierre Gondois <Pierre.Gondois@arm.com>
2020-10-21DynamicTablesPkg: AmlEncoding change debug macroSami Mujawar1-152/+152
Change the AML_DEBUG_STR() macro to AML_OPCODE_DEF() that takes a string and the AML OpCode as input so that the text description and the AML OpCode are grouped. The AML_OPCODE_DEF() macro also strips the string description for release builds. Signed-off-by: Sami Mujawar <sami.mujawar@arm.com> Reviewed-by: Alexei Fedorov <Alexei.Fedorov@arm.com>
2020-08-13DynamicTablesPkg: AML grammar definitionPierre Gondois1-0/+805
ASL is a source language for defining ACPI objects including writing ACPI control methods. An ASL file is compiled using an ASL compiler tool to generate ACPI Machine Language (AML). This AML bytecode is processed by the ACPI AML interpreter that runs as part of an Operating System (OS). Both ASL and AML are declarative languages. Although they are closely related they are different languages. ASL statements declare objects. Each object has three parts, two of which can be NULL: Object := ObjectType FixedList VariableList The AML grammar defines corresponding encodings that makes up the AML byte stream. This patch introduces the AML grammar definitions used by AmlLib for encoding/decoding AML byte streams. 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>