<feed xmlns='http://www.w3.org/2005/Atom'>
<title>Tianocore/edk2.git/UefiPayloadPkg/Include/Library, 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-10-08T17:00:41+00:00</updated>
<entry>
<title>UefiPayloadPkg: Set bootmode from bootloader</title>
<updated>2026-10-08T17:00:41+00:00</updated>
<author>
<name>Patrick Rudolph</name>
<email>patrick.rudolph@9elements.com</email>
</author>
<published>2026-07-14T06:34:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c5dfd62aeeb0d4f24d3e41b4f6631f2bd934f654'/>
<id>urn:sha1:c5dfd62aeeb0d4f24d3e41b4f6631f2bd934f654</id>
<content type='text'>
The coreboot bootloader always passes information about the boot mode
since commit [1]. Use the new coreboot table when present to update
the bootmode. When the table is not present or contains unknown values
the bootmode is not updated.

This allows to support UEFI capsule updates that need the whole SPI flash
to be unlocked. Since this is also a security concern the payload
should never follow the regular boot flow, but reboot the system when done.

1: https://review.coreboot.org/c/coreboot/+/94094/

TEST=Can update the system using UEFI capsule on disk. coreboot detects the
     capsule and unlocks the SPI flash, sets the boot mode to
     LB_BOOT_MODE_FLASH_UPDATE and UefiPayload updates BootMode in the HOB
     handoff table allowing the capsule update code to run.

Signed-off-by: Patrick Rudolph &lt;patrick.rudolph@9elements.com&gt;
</content>
</entry>
<entry>
<title>UefiPayloadPkg: Fix use of uninitialized memory</title>
<updated>2026-09-28T17:54:30+00:00</updated>
<author>
<name>Patrick Rudolph</name>
<email>patrick.rudolph@9elements.com</email>
</author>
<published>2026-05-06T06:08:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6b045f8b9a76720180620b5cce31051e55eef9e8'/>
<id>urn:sha1:6b045f8b9a76720180620b5cce31051e55eef9e8</id>
<content type='text'>
In coreboot the SMBIOS table generation is optional. When no
SMBIOS tables where found UefiPayloadEntry creates a HOB, but
doesn't initialize the contents.
The gUniversalPayloadSmbiosTableGuid HOB is then used by SmbiosDxe
and it crashes when the pointer in the HOB doesn't point to mapped
DRAM.

Fix that by only creating gUniversalPayloadSmbiosTableGuid HOB
when SMBIOS tables where found.

TEST=Can boot using UEFIPayload when coreboot doesn't provide
     SMBIOS tables.

Signed-off-by: Patrick Rudolph &lt;patrick.rudolph@9elements.com&gt;
</content>
</entry>
<entry>
<title>UefiPayloadPkg: 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-03T19:34:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f3c45d2f0cb67dababcdf3b5041881d6cef1ed87'/>
<id>urn:sha1:f3c45d2f0cb67dababcdf3b5041881d6cef1ed87</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>UefiPayloadPkg: Fix build failure with GCC</title>
<updated>2026-01-21T05:03:45+00:00</updated>
<author>
<name>Khalid Ali</name>
<email>khaliidcaliy@gmail.com</email>
</author>
<published>2025-12-31T16:09:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=d53d0fd5c0513ed9e6ec1dbd2235fde6ef4277cb'/>
<id>urn:sha1:d53d0fd5c0513ed9e6ec1dbd2235fde6ef4277cb</id>
<content type='text'>
Add missing EFIAPI to BL_CAPSULE_CALLBACK to fix build issue.

Fixes: cc149a8e

Signed-off-by: Khalid Ali &lt;khaliidcaliy@gmail.com&gt;
</content>
</entry>
<entry>
<title>UefiPayloadPkg: PayloadEntryHelperLib: Adding new helper library</title>
<updated>2025-11-22T10:19:48+00:00</updated>
<author>
<name>Kun Qin</name>
<email>kuqin@microsoft.com</email>
</author>
<published>2025-10-15T00:22:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=6c81acabe25af676c2fb4ce1011ae1f347106d39'/>
<id>urn:sha1:6c81acabe25af676c2fb4ce1011ae1f347106d39</id>
<content type='text'>
This is a newly added helper library to help providing utilities common
to UefiPayloadPkg.

This change will pave ways to separating standard services such as
"MemoryAllocation" into its own library classes.

Signed-off-by: Kun Qin &lt;kun.qin@microsoft.com&gt;
</content>
</entry>
<entry>
<title>UefiPayloadPkg/SmmStore: Add API to read/write/erase any flash block</title>
<updated>2025-08-25T11:54:17+00:00</updated>
<author>
<name>Sergii Dmytruk</name>
<email>sergii.dmytruk@3mdeb.com</email>
</author>
<published>2024-07-20T08:30:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=2736239acaa7eb6dd6866eab543d307f25ee4b56'/>
<id>urn:sha1:2736239acaa7eb6dd6866eab543d307f25ee4b56</id>
<content type='text'>
This allows reusing SMMSTORE protocol for the purpose of firmware
updates.

Signed-off-by: Sergii Dmytruk &lt;sergii.dmytruk@3mdeb.com&gt;
</content>
</entry>
<entry>
<title>UefiPayloadPkg/UefiPayloadEntry: Import update capsules from bootloader</title>
<updated>2025-08-25T11:54:17+00:00</updated>
<author>
<name>Sergii Dmytruk</name>
<email>sergii.dmytruk@3mdeb.com</email>
</author>
<published>2024-04-29T22:13:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=cc149a8eaab5f09d021c035d81132bd6f21760e3'/>
<id>urn:sha1:cc149a8eaab5f09d021c035d81132bd6f21760e3</id>
<content type='text'>
The implementation is for CbParseLib, SblParseLib returns success while
doing nothing.

The HOBs created by BuildCvHob() will be eventually picked up and
processed in DXE phase by
MdeModulePkg/Library/DxeCapsuleLibFmp/DxeCapsuleProcessLib.c

Because multiple capsules can be chained (simply by placing them one
after another), coreboot passes them as a single memory range which can
provide tenths of capsules.

coreboot won't pass any capsules unless it finds CapsuleUpdateData*
EFI variables and is able to parse memory ranges they point to as
scatter-gather lists of pages containing capsules.

Signed-off-by: Sergii Dmytruk &lt;sergii.dmytruk@3mdeb.com&gt;
</content>
</entry>
<entry>
<title>UefiPayloadPkg/BlParseLib: Add parsing of firmware info</title>
<updated>2025-08-25T11:54:17+00:00</updated>
<author>
<name>Sergii Dmytruk</name>
<email>sergii.dmytruk@3mdeb.com</email>
</author>
<published>2024-07-09T15:13:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=f3a5772acac85e4ce8335d447ab4896054e73634'/>
<id>urn:sha1:f3a5772acac85e4ce8335d447ab4896054e73634</id>
<content type='text'>
The implementation is for CbParseLib, SblParseLib returns an error.

coreboot's CB_TAG_FW_INFO is a machine-friendly version of a system
firmware component.  A component is identified by a GUID.  This is meant
to be primarily a source of information for ESRT.

The following coreboot options translate directly into fields of the
structure with information:
 - CONFIG_DRIVERS_EFI_MAIN_FW_GUID
 - CONFIG_DRIVERS_EFI_MAIN_FW_VERSION
 - CONFIG_DRIVERS_EFI_MAIN_FW_LSV
 - CONFIG_ROM_SIZE

The first 3 options depend on CONFIG_DRIVERS_EFI_FW_INFO.

Version as a string depends on CONFIG_LOCALVERSION as well as version of
the code base (misnamed as KERNELVERSION in coreboot's build system).

Signed-off-by: Sergii Dmytruk &lt;sergii.dmytruk@3mdeb.com&gt;
</content>
</entry>
<entry>
<title>UefiPayloadPkg: Add SmmStoreLib</title>
<updated>2025-04-09T18:12:48+00:00</updated>
<author>
<name>Patrick Rudolph</name>
<email>patrick.rudolph@9elements.com</email>
</author>
<published>2022-02-25T11:16:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=034de59fb7a0048525109eeaba76d78d48b21ef5'/>
<id>urn:sha1:034de59fb7a0048525109eeaba76d78d48b21ef5</id>
<content type='text'>
Implement all of the FVB protocol functions on top of the SmmStore
as a library. The library consumes the introduced
gEfiSmmStoreInfoHobGuid.

The SMI handler uses a fixed communication buffer in reserved DRAM.
To initiate a transaction you must write to the I/O APM_CNT port.

Tests on Intel(R) Xeon(R) E-2288G CPU @ 3.70G showed that the SMI isn't
triggered with a probability of 1:40 of all cases when called in a tight
loop. The CPU continues running and the SMI is triggered asynchronously
a few clock cycles later. coreboot only handles synchronous APM request
and does nothing on asynchronous APM triggers.

As there's no livesign from SMM it's impossible to tell if the handler
has run. Just wait a bit and try again to trigger a synchronous SMI.

Tests confirmed that out of 5 million tries the SMI is now always
handled.

When a synchronous SMI happens with the correct write to the APM_CNT
port, the ebx register is checked first that it doesn't point to SMRAM.
If it doesn't it's used to read in the arguments that define an SmmStore
transaction.

The SMI handler will only operate on a predefined and memory mapped
region in the boot media.

Signed-off-by: Patrick Rudolph &lt;patrick.rudolph@9elements.com&gt;
Signed-off-by: Sergii Dmytruk &lt;sergii.dmytruk@3mdeb.com&gt;
</content>
</entry>
<entry>
<title>UefiPayloadPkg: Add SmmStoreInfoGuid</title>
<updated>2025-04-09T18:12:48+00:00</updated>
<author>
<name>Patrick Rudolph</name>
<email>patrick.rudolph@9elements.com</email>
</author>
<published>2022-02-25T10:58:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/Tianocore/edk2.git/commit/?id=c67d975cfca4ecefeba34b593ec35b29d5a313ec'/>
<id>urn:sha1:c67d975cfca4ecefeba34b593ec35b29d5a313ec</id>
<content type='text'>
Add a new InfoHob that contains the SmmStore information passed from
coreboot tables when the SMMSTOREV2 feature is enabled.

This will be used to implement the FVB on top of the SMI installed by
coreboot.

Signed-off-by: Patrick Rudolph &lt;patrick.rudolph@9elements.com&gt;
Signed-off-by: Sergii Dmytruk &lt;sergii.dmytruk@3mdeb.com&gt;
</content>
</entry>
</feed>
