Repository navigation
[CHERRY-PICK][Rebase & FF] Pick up FMMT related fixes from edk2 - #2002
Merged
Merged
Conversation
…peated replacement Current `ReplaceFfs` reuses the parsed replacement FFS tree for every matching target. However, `FvHandler` mutates the tree while attaching it to a target, causing later replacements inherit state from an earlier replaced instance and hang the process. This change uses deep-copy of the replacement tree for each target to avoid the failure case. Signed-off-by: Kun Qin <kun.qin@microsoft.com> (cherry picked from commit 26d6e1f5f26a7456f63011a3107d0ca577eed489)
Current FV resize routine assumes that the final child is always a free- space node. However, when no such node exists, these routines can remove or overwrite valid trailing FFS nodes. One replacement path also inserts the free-space byte count instead of the constructed tree node. This change centralizes free-space node creation, resizing, and removal, using the helper for direct replacements and recursive parent resizing. Signed-off-by: Kun Qin <kun.qin@microsoft.com> (cherry picked from commit 68360d273c9788e75b9aca13f839563a5a6cb498)
Contributor
✅ QEMU Validation PassedSource Dependencies
Results
Workflow run: https://github.com/microsoft/mu_basecore/actions/runs/40761632965 This comment was automatically generated by the Mu QEMU PR Validation workflow. |
kuqin12
requested review from
Aaron (apop5),
Chris Fernald (cfernald) and
Michael Kubacki (makubacki)
October 28, 2026 20:06
This change adds a few unit test cases to validate the FMMT tool. Signed-off-by: Kun Qin <kun.qin@microsoft.com> (cherry picked from commit ef03ae623f254e4914e99df21220cb7a00c68f08)
Aaron (apop5)
approved these changes
Oct 28, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## release/202608 #2002 +/- ##
=================================================
Coverage ? 1.90%
=================================================
Files ? 1675
Lines ? 423789
Branches ? 5224
=================================================
Hits ? 8083
Misses ? 415604
Partials ? 102
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kuqin12
enabled auto-merge (rebase)
October 28, 2026 21:49
Michael Kubacki (makubacki)
approved these changes
Oct 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This change cherry-picks 3 FMMT related commits from edk2 to better unblock the image patching.
How This Was Tested
This change resolves the hang when patching supervisor binaries into the UEFI image.
Integration Instructions
N/A