<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/MdeModulePkg/Library/SmmLockBoxLib, branch dependabot/github_actions/actions/github-script-9</title>
<subtitle>EDK II (mirror)</subtitle>
<id>https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-9</id>
<link rel='self' href='https://git.radix-linux.su/Tianocore/edk2.git/atom?h=dependabot%2Fgithub_actions%2Factions%2Fgithub-script-9'/>
<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>MdeModulePkg: 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:48:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=7a934d0befca7d10f361c76af6d2fcb6eb48c835'/>
<id>urn:sha1:7a934d0befca7d10f361c76af6d2fcb6eb48c835</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>MdeModulePkg: 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:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=1436aea4d5707e672672a11bda72be2c63c936c3'/>
<id>urn:sha1:1436aea4d5707e672672a11bda72be2c63c936c3</id>
<content type='text'>
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the MdeModulePkg 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>MdeModulePkg: 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:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e3917e22e769898bb0d08d0112e768437f1ff9fb'/>
<id>urn:sha1:e3917e22e769898bb0d08d0112e768437f1ff9fb</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: Liming Gao &lt;gaoliming@byosoft.com.cn&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: SmmLockBoxSmmLib: Support StandaloneMm for SmmLockBoxLib</title>
<updated>2021-02-01T18:01:03+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kun.q@outlook.com</email>
</author>
<published>2020-12-17T21:18:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=e35fce8adadb4141c05d5365abc56e9bd96b9fce'/>
<id>urn:sha1:e35fce8adadb4141c05d5365abc56e9bd96b9fce</id>
<content type='text'>
This change added support of StandaloneMm for SmmLockBoxLib. It replaces
gSmst with gMmst to support both traditional MM and standalone MM. The
contructor and desctructor functions are abstracted to support different
function prototype definitions.

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Hao A Wu &lt;hao.a.wu@intel.com&gt;
Cc: Eric Dong &lt;eric.dong@intel.com&gt;

Signed-off-by: Kun Qin &lt;kun.q@outlook.com&gt;
Reviewed-by: Hao A Wu &lt;hao.a.wu@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Replace BSD License with BSD+Patent License</title>
<updated>2019-04-09T17:58:08+00:00</updated>
<author>
<name>Michael D Kinney</name>
<email>michael.d.kinney@intel.com</email>
</author>
<published>2019-04-03T23:05:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=9d510e61fceee7b92955ef9a3c20343752d8ce3f'/>
<id>urn:sha1:9d510e61fceee7b92955ef9a3c20343752d8ce3f</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: Hao Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Jian J Wang &lt;jian.j.wang@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/SmmLockBoxLib: Support LockBox enlarge in UpdateLockBox()</title>
<updated>2019-02-22T00:20:08+00:00</updated>
<author>
<name>Hao Wu</name>
<email>hao.a.wu@intel.com</email>
</author>
<published>2018-12-04T01:59:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=99383667abe1c2f83cc660f98fe7f3aa23bb7aa8'/>
<id>urn:sha1:99383667abe1c2f83cc660f98fe7f3aa23bb7aa8</id>
<content type='text'>
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=1409

This commit will add the support to enlarge a LockBox when using the
LockBoxLib API UpdateLockBox().

Please note that the new support will ONLY work for LockBox with attribute
LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY set.

The functional uni-test for the commit is available at:
https://github.com/hwu25/edk2/tree/lockbox_unitest

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Cc: Ray Ni &lt;ray.ni@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Acked-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Star Zeng &lt;star.zeng@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/SmmLockBox(PEI): Remove an ASSERT in RestoreLockBox()</title>
<updated>2019-02-22T00:20:08+00:00</updated>
<author>
<name>Hao Wu</name>
<email>hao.a.wu@intel.com</email>
</author>
<published>2018-12-24T06:49:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=4fa7306bf5cd46aa8f98331de4c364c4a5380384'/>
<id>urn:sha1:4fa7306bf5cd46aa8f98331de4c364c4a5380384</id>
<content type='text'>
This commit is out of the scope for BZ-1409. It is a refinement for the
PEI library instance within SmmLockBoxLib.

For the below ASSERT statement within function RestoreLockBox():
  Status = SmmCommunicationPpi-&gt;Communicate (
                                  SmmCommunicationPpi,
                                  &amp;CommBuffer[0],
                                  &amp;CommSize
                                  );
  if (Status == EFI_NOT_STARTED) {
    //
    // Pei SMM communication not ready yet, so we access SMRAM directly
    //
    DEBUG ((DEBUG_INFO, "SmmLockBoxPeiLib Communicate - (%r)\n", Status));
    Status = InternalRestoreLockBoxFromSmram (Guid, Buffer, Length);
    LockBoxParameterRestore-&gt;Header.ReturnStatus = (UINT64)Status;
    if (Length != NULL) {
      LockBoxParameterRestore-&gt;Length = (UINT64)*Length;
    }
  }
  ASSERT_EFI_ERROR (Status);

It is possible for previous codes to return an error status that is
possible for happen. One example is that, when the 'if' statement
'if (Status == EFI_NOT_STARTED) {' is entered, function
InternalRestoreLockBoxFromSmram() is possible to return 'BUFFER_TOO_SMALL'
if the caller of RestoreLockBox() provides a buffer that is too small to
hold the content of LockBox.

Thus, this commit will remove the ASSERT here.

Please note that the current implementation of RestoreLockBox() is
handling the above-mentioned error case properly, so no additional error
handling codes are needed here.

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Reviewed-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Star Zeng &lt;star.zeng@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg/SmmLockBoxLib: Use 'DEBUG_' prefix instead of 'EFI_D_'</title>
<updated>2019-02-22T00:20:08+00:00</updated>
<author>
<name>Hao Wu</name>
<email>hao.a.wu@intel.com</email>
</author>
<published>2018-12-03T08:31:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=481ffd6f7604bc033282decf8fc964edb1bb31bc'/>
<id>urn:sha1:481ffd6f7604bc033282decf8fc964edb1bb31bc</id>
<content type='text'>
This commit is out of the scope for BZ-1409. It is a coding style
refinement for the SmmLockBoxLib.

More specifically, the commit will remove all the debug message display
level macros starting with 'EFI_D_' and replace them with macros starting
with 'DEBUG_'.

Cc: Jian J Wang &lt;jian.j.wang@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu &lt;hao.a.wu@intel.com&gt;
Reviewed-by: Ray Ni &lt;ray.ni@intel.com&gt;
Reviewed-by: Laszlo Ersek &lt;lersek@redhat.com&gt;
Reviewed-by: Star Zeng &lt;star.zeng@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg: Clean up source files</title>
<updated>2018-06-28T03:19:45+00:00</updated>
<author>
<name>Liming Gao</name>
<email>liming.gao@intel.com</email>
</author>
<published>2018-06-27T13:08:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d1102dba7210b95e41d06c2338a22ba6af248645'/>
<id>urn:sha1:d1102dba7210b95e41d06c2338a22ba6af248645</id>
<content type='text'>
1. Do not use tab characters
2. No trailing white space in one line
3. All files must end with CRLF

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Liming Gao &lt;liming.gao@intel.com&gt;
Reviewed-by: Star Zeng &lt;star.zeng@intel.com&gt;
</content>
</entry>
<entry>
<title>MdeModulePkg LockBoxLib: Support LOCK_BOX_ATTRIBUTE_RESTORE_IN_S3_ONLY</title>
<updated>2018-03-08T13:33:48+00:00</updated>
<author>
<name>Star Zeng</name>
<email>star.zeng@intel.com</email>
</author>
<published>2018-02-11T02:01:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6bd4af305d6851529e84e8781e1bbb42e31a151a'/>
<id>urn:sha1:6bd4af305d6851529e84e8781e1bbb42e31a151a</id>
<content type='text'>
With this flag, the LockBox can be restored in S3 resume only.
The LockBox can not be restored after SmmReadyToLock in normal boot
and after EndOfS3Resume in S3 resume.
It can not be set together with LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE.

Cc: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng &lt;star.zeng@intel.com&gt;
Reviewed-by: Jiewen Yao &lt;jiewen.yao@intel.com&gt;
</content>
</entry>
</feed>
