<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdePkg/Include/Pi/PiFirmwareFile.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-27T07:15:11+00:00</updated>
<entry>
<title>MdePkg/Include/Uefi: Add back include guard</title>
<updated>2026-02-27T07:15:11+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2026-02-25T20:53:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=21e021ffbaa738956fb8142cf5cf215eeb71e50b'/>
<id>urn:sha1:21e021ffbaa738956fb8142cf5cf215eeb71e50b</id>
<content type='text'>
Add include guards back to include files that use the same
include guard macro in BaseTools/Source/C/Include/Common
and MdePkg or MdeModulePkg.

Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: 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-03T18:54:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7835e5802a2a70984333c054002e449bfd1f0a0d'/>
<id>urn:sha1:7835e5802a2a70984333c054002e449bfd1f0a0d</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>MdePkg: 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:54:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2f88bd3a1296c522317f1c21377876de63de5be7'/>
<id>urn:sha1:2f88bd3a1296c522317f1c21377876de63de5be7</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdePkg 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: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdePkg/PiFirmwareFile: fix undefined behavior in FFS_FILE_SIZE</title>
<updated>2019-04-24T15:31:00+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2019-04-12T13:43:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1fd227dd260792b6d12e2e00f74bbf6b9d90cdaf'/>
<id>urn:sha1:1fd227dd260792b6d12e2e00f74bbf6b9d90cdaf</id>
<content type='text'>
Accessing "EFI_FFS_FILE_HEADER.Size", which is of type UINT8[3], through a
(UINT32*), is undefined behavior. Fix it by accessing the array elements
individually.

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daude &lt;philmd@redhat.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Jordan Justen &lt;jordan.l.justen@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/PiFirmwareFile: fix undefined behavior in SECTION_SIZE</title>
<updated>2019-04-24T15:30:54+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2019-04-12T12:03:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=fc76bbd94df7f5a7f1f3939c7e93a113a6d36270'/>
<id>urn:sha1:fc76bbd94df7f5a7f1f3939c7e93a113a6d36270</id>
<content type='text'>
RH covscan justifiedly reports that accessing
"EFI_COMMON_SECTION_HEADER.Size", which is of type UINT8[3], through a
(UINT32*), is undefined behavior:

&gt; Error: OVERRUN (CWE-119):
&gt; edk2-89910a39dcfd/OvmfPkg/Sec/SecMain.c:178: overrun-local: Overrunning
&gt; array of 3 bytes at byte offset 3 by dereferencing pointer
&gt; "(UINT32 *)((EFI_COMMON_SECTION_HEADER *)(UINTN)Section)-&gt;Size".
&gt; #  176|       Section = (EFI_COMMON_SECTION_HEADER*)(UINTN) CurrentAddress;
&gt; #  177|
&gt; #  178|-&gt;     Size = SECTION_SIZE (Section);
&gt; #  179|       if (Size &lt; sizeof (*Section)) {
&gt; #  180|         return EFI_VOLUME_CORRUPTED;

Fix this by accessing the array elements individually.

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710
Issue: scan-1007.txt
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daude &lt;philmd@redhat.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Jordan Justen &lt;jordan.l.justen@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/PiFirmwareFile: express IS_SECTION2 in terms of SECTION_SIZE</title>
<updated>2019-04-24T15:30:46+00:00</updated>
<author>
<name>Laszlo Ersek</name>
<email>lersek@redhat.com</email>
</author>
<published>2019-04-12T11:56:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d976f09d99b738d3e0de173e3c77fceb0735cc69'/>
<id>urn:sha1:d976f09d99b738d3e0de173e3c77fceb0735cc69</id>
<content type='text'>
The IS_SECTION2() function-like macro duplicates the SECTION_SIZE()
calculation, just to compare the computed size against 0xFFFFFF. Invoke
SECTION_SIZE() instead; only preserve the comparison.

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Cc: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1710
Signed-off-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Acked-by: Ard Biesheuvel &lt;ard.biesheuvel@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Jordan Justen &lt;jordan.l.justen@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T17:58:13+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:06:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9344f0921518309295da89c221d10cbead8531aa'/>
<id>urn:sha1:9344f0921518309295da89c221d10cbead8531aa</id>
<content type='text'>
https://bugzilla.tianocore.org/show_bug.cgi?id=1373

Replace BSD 2-Clause License with BSD+Patent License.  This change is
based on the following emails:

  https://lists.01.org/pipermail/edk2-devel/2019-February/036260.html
  https://lists.01.org/pipermail/edk2-devel/2018-October/030385.html

RFCs with detailed process for the license change:

  V3: https://lists.01.org/pipermail/edk2-devel/2019-March/038116.html
  V2: https://lists.01.org/pipermail/edk2-devel/2019-March/037669.html
  V1: https://lists.01.org/pipermail/edk2-devel/2019-March/037500.html

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Michael D Kinney &lt;michael.d.kinney@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg/Include: Add management mode FV file type and depex.</title>
<updated>2018-02-09T06:41:03+00:00</updated>
<author>
<name>Supreeth Venkatesh</name>
<email>supreeth.venkatesh@arm.com</email>
</author>
<published>2018-02-08T20:25:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f412ecc3f45b8d9454d7a450cb67b05c6a6e2715'/>
<id>urn:sha1:f412ecc3f45b8d9454d7a450cb67b05c6a6e2715</id>
<content type='text'>
As per PI specification v1.6,
As per section 2.1.4.1,
The following file types exist:
Table 3. Defined File Types
Name                                   Value
EFI_FV_FILETYPE_RAW                    0x01
EFI_FV_FILETYPE_FREEFORM               0x02
EFI_FV_FILETYPE_SECURITY_CORE          0x03
EFI_FV_FILETYPE_PEI_CORE               0x04
EFI_FV_FILETYPE_DXE_CORE               0x05
EFI_FV_FILETYPE_PEIM                   0x06
EFI_FV_FILETYPE_DRIVER                 0x07
EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER   0x08
EFI_FV_FILETYPE_APPLICATION            0x09
EFI_FV_FILETYPE_MM                     0x0A
EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE  0x0B
EFI_FV_FILETYPE_COMBINED_MM_DXE        0x0C
EFI_FV_FILETYPE_MM_CORE                0x0D
EFI_FV_FILETYPE_MM_STANDALONE          0x0E
EFI_FV_FILETYPE_MM_CORE_STANDALONE     0x0F

The following new section type is added:
EFI_SECTION_MM_DEPEX

This patch adds the management mode FV file type and depex.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Achin Gupta &lt;achin.gupta@arm.com&gt;
Signed-off-by: Supreeth Venkatesh &lt;supreeth.venkatesh@arm.com&gt;
Reviewed-by: Jiewen Yao &lt;Jiewen.yao@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg PiFirmwareFile.h: Add FFS_ATTRIB_DATA_ALIGNMENT_2 definition</title>
<updated>2017-09-26T10:00:59+00:00</updated>
<author>
<name>Star Zeng</name>
<email>star.zeng@intel.com</email>
</author>
<published>2017-09-21T09:54:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c8a9f0693aa9042eed73aec7acbdd926e583dea2'/>
<id>urn:sha1:c8a9f0693aa9042eed73aec7acbdd926e583dea2</id>
<content type='text'>
Follow PI 1.6 spec to add FFS_ATTRIB_DATA_ALIGNMENT_2 definition for
FFS alignment extended to support maximum 16MB.

Cc: Liming Gao &lt;liming.gao@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng &lt;star.zeng@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;
</content>
</entry>
<entry>
<title>MdePkg: Follow PI spec to update ExtendedSize in EFI_FFS_FILE_HEADER2</title>
<updated>2015-08-24T01:43:20+00:00</updated>
<author>
<name>Star Zeng</name>
<email>star.zeng@intel.com</email>
</author>
<published>2015-08-24T01:43:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=28fc9f4730bc36d2a7f74c9ccf270c009a7641b8'/>
<id>urn:sha1:28fc9f4730bc36d2a7f74c9ccf270c009a7641b8</id>
<content type='text'>
for FFS data above 16 bytes alignment requirement.

PI spec requires FFS header to be at 8 bytes alignment to FV header.
And, FFS data alignment requires the beginning of the file data must
be aligned on a particular boundary, such as 1, 16, 128 bytes or above.
If FFS data alignment requires to be above 16 bytes, and FFS header
must be at 8 byte alignment, so FFS header size must be multiple of 8.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng &lt;star.zeng@intel.com&gt;
Reviewed-by: Liming Gao &lt;liming.gao@intel.com&gt;

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18263 6f19259b-4bc3-4df7-8a09-765794883524
</content>
</entry>
</feed>
