<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/DynamicTablesPkg/Library/Common/AmlLib/CodeGen/AmlResourceDataCodeGen.h, branch master</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/'/>
<updated>2026-02-23T21:01:28+00:00</updated>
<entry>
<title>DynamicTablesPkg: Replace include guards with #pragma once</title>
<updated>2026-02-23T21:01:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2026-02-03T17:36:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=01f75b3927b8d98fa0a6fbfb6a79420985f107f0'/>
<id>urn:sha1:01f75b3927b8d98fa0a6fbfb6a79420985f107f0</id>
<content type='text'>
Replace traditional `#ifndef`/`#define`/`#endif` include guards with
`#pragma` once.

`#pragma once` is a widely supported preprocessor directive that
prevents header files from being included multiple times. It is
supported by all toolchains used to build edk2: GCC, Clang/LLVM, and
MSVC.

Compared to macro-based include guards, `#pragma once`:

- Eliminates the risk of macro name collisions or copy/paste errors
  where two headers inadvertently use the same guard macro.
- Eliminate inconsistency in the way include guard macros are named
  (e.g., some files use `__FILE_H__`, others use `FILE_H_`, etc.).
- Reduces boilerplate (three lines replaced by one).
- Avoids polluting the macro namespace with guard symbols.
- Can improve build times as the preprocessor can skip re-opening the
  file entirely, rather than re-reading it to find the matching
  `#endif` ("multiple-include optimization").
  - Note that some compilers may already optimize traditional include
    guards, by recognzining the idiomatic pattern.

This change is made acknowledging that overall portability of the
code will technically be reduced, as `#pragma once` is not part of the
C/C++ standards.

However, this is considered acceptable given:

1. edk2 already defines a subset of supported compilers in
   BaseTools/Conf/tools_def.template, all of which have supported
   `#pragma once` for over two decades.
2. There have been concerns raised to the project about inconsistent
   include guard naming and potential macro collisions.

Approximate compiler support dates:

- MSVC: Supported since Visual C++ 4.2 (1996)
- GCC: Supported since 3.4 (2004)
  (http://gnu.ist.utl.pt/software/gcc/gcc-3.4/changes.html)
- Clang (LLVM based): Since initial release in 2007

Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
</content>
</entry>
<entry>
<title>DynamicTablesPkg: Apply uncrustify changes</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael Kubacki</name>
<email>michael.kubacki@microsoft.com</email>
</author>
<published>2021-12-05T22:53:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=731c67e1d77b7741a91762d17659fc9fbcb9e305'/>
<id>urn:sha1:731c67e1d77b7741a91762d17659fc9fbcb9e305</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the DynamicTablesPkg package

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Signed-off-by: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Reviewed-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
</content>
</entry>
<entry>
<title>DynamicTablesPkg: Change OPTIONAL keyword usage style</title>
<updated>2021-12-07T17:24:28+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2021-12-03T02:00:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=fe2d81892fec402067d30c34e779d0645a1e902b'/>
<id>urn:sha1:fe2d81892fec402067d30c34e779d0645a1e902b</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3760

Update all use of ', OPTIONAL' to ' OPTIONAL,' for function params.

Cc: Andrew Fish &lt;afish@apple.com&gt;
Cc: Leif Lindholm &lt;leif@nuviainc.com&gt;
Cc: Michael Kubacki &lt;michael.kubacki@microsoft.com&gt;
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
</content>
</entry>
<entry>
<title>DynamicTablesPkg: AML Code generation for Resource data EndTag</title>
<updated>2021-10-08T15:39:42+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>Pierre.Gondois@arm.com</email>
</author>
<published>2021-10-08T14:46:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9454d1ebcbee01ccf504ea7e8bf7d7e83a8e99e2'/>
<id>urn:sha1:9454d1ebcbee01ccf504ea7e8bf7d7e83a8e99e2</id>
<content type='text'>
Add a helper function AmlCodeGenEndTag() to generate AML Resource Data
EndTag. The EndTag resource data is automatically generated by the ASL
compiler at the end of a list of resource data elements. Therefore, an
equivalent function is not present in ASL.

However, AmlCodeGenEndTag() is useful when generating AML code for the
ResourceTemplate() macro.

Reviewed-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Signed-off-by: Pierre Gondois &lt;Pierre.Gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>DynamicTablesPkg: AML Code generation for Register()</title>
<updated>2021-10-08T15:39:42+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>Pierre.Gondois@arm.com</email>
</author>
<published>2021-10-08T14:46:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f995f8672b388a7a0f9ccb94e3af68469cb51ae8'/>
<id>urn:sha1:f995f8672b388a7a0f9ccb94e3af68469cb51ae8</id>
<content type='text'>
Add AmlCodeGenRegister() to generate AML code for the
Generic Register Resource Descriptor. This function is
equivalent to the ASL macro Register().

Reviewed-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Signed-off-by: Pierre Gondois &lt;Pierre.Gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>DynamicTablesPkg: Rework AmlResourceDataCodegen.c/h</title>
<updated>2021-10-01T10:57:43+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>Pierre.Gondois@arm.com</email>
</author>
<published>2021-09-30T07:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=22873f58c40c496d59a0553bee1c720192ac35c9'/>
<id>urn:sha1:22873f58c40c496d59a0553bee1c720192ac35c9</id>
<content type='text'>
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 &lt;sami.mujawar@arm.com&gt;
Signed-off-by: Pierre Gondois &lt;Pierre.Gondois@arm.com&gt;
</content>
</entry>
<entry>
<title>DynamicTablesPkg: AML Resource Data Codegen</title>
<updated>2020-08-13T18:00:06+00:00</updated>
<author>
<name>Pierre Gondois</name>
<email>pierre.gondois@arm.com</email>
</author>
<published>2020-08-05T13:54:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=01ea2ad59c26abbf72c7697e61c9e5fc4d757cfd'/>
<id>urn:sha1:01ea2ad59c26abbf72c7697e61c9e5fc4d757cfd</id>
<content type='text'>
AML Codegen is a Dynamic AML technique that facilitates
generation of small segments of AML code. The AML code
generated using AML Codegen is represented as nodes in
the AML Tree.

AML Resource Data Codegen implements interfaces required
for generating Resource Data elements that can be attached
to an AML tree.

Signed-off-by: Pierre Gondois &lt;pierre.gondois@arm.com&gt;
Signed-off-by: Sami Mujawar &lt;sami.mujawar@arm.com&gt;
Reviewed-by: Alexei Fedorov &lt;Alexei.Fedorov@arm.com&gt;
</content>
</entry>
</feed>
