Branch: refs/heads/master
  Home:   https://github.com/tianocore/edk2
  Commit: 433bbe6e493adeb75d8799e01a84968aa97db1a0
      
https://github.com/tianocore/edk2/commit/433bbe6e493adeb75d8799e01a84968aa97db1a0
  Author: Sergii Dmytruk <[email protected]>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M BaseTools/Source/Python/Workspace/MetaFileParser.py

  Log Message:
  -----------
  BaseTools: DSC: fix processing !include in multiarch subsections

Commit f0a2015373 ("UefiPayloadPkg: Add AARCH64 support") changed
`[Components.X64]` to `[Components.X64, Components.AARCH64]` which
resulted in the following code within that section to not work as
expected (the code wasn't there, just providing a real world example
that uncovered the issue):

[Components.X64, Components.AARCH64]
    FmpDevicePkg/FmpDxe/FmpDxe.inf {
      ...
      <PcdsFixedAtBuild>
        !include .../...PcdFmpDevicePkcs7CertBufferXdr.inc
      ...
    }

At the same time `[Components.X64]` or even `[Components.AARCH64,
Components.X64]` (notice the swapped order) worked fine for X64 target.

The cause of the issue turned out to be skipping includes inside
`_PostProcess()` method of `DscParser` class.  This method processes
list of items stored in a database filled on the first pass through a
DSC file in `Start()` method.  One of the fields stored in each row
of a table is link to a parent object (owner).  A section like
`[Components.X64, Components.AARCH64]` creates two objects and all of
its subelements are duplicated for both X64 and AARCH64.  This was not
happening for !include statement in the example above.

Because `_PostProcess()` contracted a sequence of !include objects
disregarding their owner, it did not create instance for each of the
requested targets.  Codewise, `self._ContentIndex` was incremented more
than once, while `__ProcessDirective()` method (invoked indirectly as
`Processer[self._ItemType]()`) queried owner of the current directive
as:

    if self._InSubsection:
        Owner = self._Content[self._ContentIndex - 1][8]
    else: # not taken in this case

This is why order of targets made a difference, only the last was fully
initialized in this case.

An alternative fix is completely dropping merging of !include
directives, but hard to say whether it still has some utility (the code
is complex, hard to follow and barely documented).  Safer to keep it, in
the worst case it doesn't do anything now.

Signed-off-by: Sergii Dmytruk <[email protected]>


  Commit: 450784d3fd7f192bf48bb2c4d5548822825cc297
      
https://github.com/tianocore/edk2/commit/450784d3fd7f192bf48bb2c4d5548822825cc297
  Author: Sergii Dmytruk <[email protected]>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M UefiPayloadPkg/Library/SblParseLib/SblParseLib.inf

  Log Message:
  -----------
  UefiPayloadPkg/SblParseLib.inf: Add missing GUIDs

They are used in SblParseLib.c (ParseSmbiosTable() and
ParseAcpiTableInfo() functions) but weren't declared as such.

Signed-off-by: Sergii Dmytruk <[email protected]>


  Commit: f3a5772acac85e4ce8335d447ab4896054e73634
      
https://github.com/tianocore/edk2/commit/f3a5772acac85e4ce8335d447ab4896054e73634
  Author: Sergii Dmytruk <[email protected]>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M UefiPayloadPkg/Include/Coreboot.h
    A UefiPayloadPkg/Include/Guid/FirmwareInfoGuid.h
    M UefiPayloadPkg/Include/Library/BlParseLib.h
    M UefiPayloadPkg/Library/CbParseLib/CbParseLib.c
    M UefiPayloadPkg/Library/CbParseLib/CbParseLib.inf
    M UefiPayloadPkg/Library/SblParseLib/SblParseLib.c
    M UefiPayloadPkg/UefiPayloadPkg.dec

  Log Message:
  -----------
  UefiPayloadPkg/BlParseLib: Add parsing of firmware info

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 <[email protected]>


  Commit: 8b2433c2f5e07519a31057bc6acb2158acd9e5e3
      
https://github.com/tianocore/edk2/commit/8b2433c2f5e07519a31057bc6acb2158acd9e5e3
  Author: Sergii Dmytruk <[email protected]>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M UefiPayloadPkg/BlSupportDxe/BlSupportDxe.c
    M UefiPayloadPkg/BlSupportDxe/BlSupportDxe.h
    M UefiPayloadPkg/BlSupportDxe/BlSupportDxe.inf

  Log Message:
  -----------
  UefiPayloadPkg/BlSupportDxe: Publish ESRT with an entry for system firmware

Use firmware information passed by a bootloader and parsed by BlParseLib
to make a single-element ESRT.  This informs operating systems and EDK
itself about which capsules are applicable for the current firmware.

Signed-off-by: Sergii Dmytruk <[email protected]>


  Commit: cc149a8eaab5f09d021c035d81132bd6f21760e3
      
https://github.com/tianocore/edk2/commit/cc149a8eaab5f09d021c035d81132bd6f21760e3
  Author: Sergii Dmytruk <[email protected]>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M UefiPayloadPkg/Include/Coreboot.h
    M UefiPayloadPkg/Include/Library/BlParseLib.h
    M UefiPayloadPkg/Library/CbParseLib/CbParseLib.c
    M UefiPayloadPkg/Library/PayloadEntryHobLib/Hob.c
    M UefiPayloadPkg/Library/SblParseLib/SblParseLib.c
    M UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c

  Log Message:
  -----------
  UefiPayloadPkg/UefiPayloadEntry: Import update capsules from bootloader

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 <[email protected]>


  Commit: d43451b52003ec6eedf0db933d3419515809191e
      
https://github.com/tianocore/edk2/commit/d43451b52003ec6eedf0db933d3419515809191e
  Author: Sergii Dmytruk <[email protected]>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M MdeModulePkg/MdeModulePkg.dec
    M MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
    M MdeModulePkg/Universal/BdsDxe/BdsEntry.c

  Log Message:
  -----------
  MdeModulePkg: Add PcdCapsuleFmpSupport

When set to TRUE, bit EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED of
OsIndications is set.

At the moment EDK never sets this bit (there is only definition with no
uses), maybe nothing actually checks its value.  Whatever the reason is,
it seems like a good idea to make setting it possible.

Signed-off-by: Sergii Dmytruk <[email protected]>


  Commit: f53b19f6c8ff6bababee3063d1e4f14abd723709
      
https://github.com/tianocore/edk2/commit/f53b19f6c8ff6bababee3063d1e4f14abd723709
  Author: Sergii Dmytruk <[email protected]>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c
    M UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.h
    M UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
    M UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.c
    M UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.h
    M UefiPayloadPkg/UefiPayloadEntry/UefiPayloadEntry.inf
    M UefiPayloadPkg/UefiPayloadPkg.dsc
    M UefiPayloadPkg/UefiPayloadPkg.fdf

  Log Message:
  -----------
  UefiPayloadPkg: Enable processing of capsules

Make UefiPayloadPkg.dsc add required libraries/DXEs/PCDs when
CAPSULE_SUPPORT define is set to TRUE.

UefiPayloadEntry now parses firmware information from a bootloader and
switches boot mode to BOOT_ON_FLASH_UPDATE if there are any capsules.
It's not guarded by any PCD under the assumption that bootloader won't
pass capsules if EDK shouldn't be handling them.

EsrtDxe is enabled to manage ESRT entries and it consumes the firmware
information HOB created by UefiPayloadEntry.  ProcessCapsules()
internally looks up EsrtManagementProtocol and calls SyncEsrtFmp() to
import data from available FMP instances.

PlatformBootManagerLib was made to call ProcessCapsules() twice: before
and after end-of-DXE.

Signed-off-by: Sergii Dmytruk <[email protected]>


  Commit: e7a1b295532d7177ea390d3d4efc3b1a30cc58b6
      
https://github.com/tianocore/edk2/commit/e7a1b295532d7177ea390d3d4efc3b1a30cc58b6
  Author: Sergii Dmytruk <[email protected]>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M UefiPayloadPkg/UefiPayloadPkg.dsc

  Log Message:
  -----------
  UefiPayloadPkg/UefiPayloadPkg.dsc: Enable FMP updates

This is using test certificate stored in this repository.  Building
additionally requires setting CAPSULE_FIRMWARE_GUID to firmware GUID in
string form.

FDF file is not updated because FMP driver is to be embedded into update
capsule.

Signed-off-by: Sergii Dmytruk <[email protected]>


  Commit: 2736239acaa7eb6dd6866eab543d307f25ee4b56
      
https://github.com/tianocore/edk2/commit/2736239acaa7eb6dd6866eab543d307f25ee4b56
  Author: Sergii Dmytruk <[email protected]>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    M UefiPayloadPkg/Include/Library/SmmStoreLib.h
    M UefiPayloadPkg/Library/SmmStoreLib/SmmStore.c
    M UefiPayloadPkg/Library/SmmStoreLib/SmmStore.h

  Log Message:
  -----------
  UefiPayloadPkg/SmmStore: Add API to read/write/erase any flash block

This allows reusing SMMSTORE protocol for the purpose of firmware
updates.

Signed-off-by: Sergii Dmytruk <[email protected]>


  Commit: 68a7665250e814f4ce8dd10f4310ce27df21e495
      
https://github.com/tianocore/edk2/commit/68a7665250e814f4ce8dd10f4310ce27df21e495
  Author: Sergii Dmytruk <[email protected]>
  Date:   2025-08-25 (Mon, 25 Aug 2025)

  Changed paths:
    A UefiPayloadPkg/Library/FmpDeviceSmmLib/FmpDeviceSmmLib.c
    A UefiPayloadPkg/Library/FmpDeviceSmmLib/FmpDeviceSmmLib.inf
    A UefiPayloadPkg/Library/FmpDeviceSmmLib/FmpDeviceSmmLib.uni
    M UefiPayloadPkg/UefiPayloadPkg.dsc

  Log Message:
  -----------
  UefiPayloadPkg/FmpDeviceSmmLib: Add for full chip flashing via SMMSTOREv2

Part of the functions of the library are left unimplemented (return
EFI_UNSUPPORTED) the rest use information about current firmware
obtained from CBMEM (at this point available in a HOB) and SMMSTOREv2 to
perform flashing.

Flashing is slightly optimized: FmpDeviceSetImageWithStatus() first
reads a block and checks that it differs from the new contents before
initiating erase and write.

On successful flashing runtime APIs for dealing with EFI variables are
replaced with stubs to prevent accesses to SMMSTORE from the currently
running firmware.  The SMMSTORE region's contents and possibly location
and size have been changed as a result of the update and continued use
of it can have unpredictable consequences including corruption of the
newly written firmware image.  A capsule mode always ends with a reboot,
so the variable services are unavailable only for a very short period
after a successful flashing.

Signed-off-by: Sergii Dmytruk <[email protected]>


Compare: https://github.com/tianocore/edk2/compare/829e42d3a345...68a7665250e8

To unsubscribe from these emails, change your notification settings at 
https://github.com/tianocore/edk2/settings/notifications


_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits

Reply via email to