Skip to content

MdeModulePkg: Dxe: Skip FV Extraction When FV3 HOB Found#12671

Open
os-d wants to merge 1 commit into
tianocore:masterfrom
os-d:skip_fv3_hob
Open

MdeModulePkg: Dxe: Skip FV Extraction When FV3 HOB Found#12671
os-d wants to merge 1 commit into
tianocore:masterfrom
os-d:skip_fv3_hob

Conversation

@os-d

@os-d os-d commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

Description

Currently, the DXE dispatcher will skip extracting an FV file when an FV2 HOB is found for it, as that indicates pre-DXE extracted it.

However, the dispatcher does not check for FV3 HOBs, which also can describe extracted FVs. That can result in extracting the same FV in DXE that is already extracted, which can be a large performance hit.

This updates the DXE dispatcher to check for the existence of either an FV2 or FV3 HOB for this FV and skip extracting if either is found.

  • Breaking change?
    • Breaking change - Does this PR cause a break in build or boot behavior?
    • Examples: Does it add a new library class or move a module to a different repo.
  • Impacts security?
    • Security - Does this PR have a direct security impact?
    • Examples: Crypto algorithm change or buffer overflow fix.
  • Includes tests?
    • Tests - Does this PR include any explicit test code?
    • Examples: Unit tests or integration tests.

How This Was Tested

Tested on ArmVirtPkg/OvmfPkg by not producing FV2 HOBs for extracted regions, only FV3, and seeing DXE correctly skip re-extracting them.

Integration Instructions

N/A.

Currently, the DXE dispatcher will skip extracting an FV file
when an FV2 HOB is found for it, as that indicates pre-DXE
extracted it.

However, the dispatcher does not check for FV3 HOBs, which also
can describe extracted FVs. That can result in extracting the
same FV in DXE that is already extracted, which can be a large
performance hit.

This updates the DXE dispatcher to check for the existence of
either an FV2 or FV3 HOB for this FV and skip extracting if either
is found.

Signed-off-by: Oliver Smith-Denny <osde@microsoft.com>
@os-d

os-d commented Jun 18, 2026

Copy link
Copy Markdown
Contributor Author

@lgao4 can you please review?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants