Skip to content
/ edk2 Public

Improve capsule update progress bar#295

Merged
SergiiDmytruk merged 5 commits intocapsules-v2from
improve_capsule_progress
Mar 1, 2026
Merged

Improve capsule update progress bar#295
SergiiDmytruk merged 5 commits intocapsules-v2from
improve_capsule_progress

Conversation

@filipleple
Copy link
Member

@filipleple filipleple commented Jan 30, 2026

issue: Dasharo/dasharo-issues#1439
coreboot PR: Dasharo/coreboot#837
ref: DSH-1131

@filipleple filipleple self-assigned this Jan 30, 2026
@filipleple filipleple changed the title DasharoPayloadPkg/Library/FmpDeviceSmmLib: improve capsule update pro… Improve capsule update progress bar Jan 30, 2026
@filipleple filipleple marked this pull request as ready for review January 30, 2026 10:55
Copy link
Member

@SergiiDmytruk SergiiDmytruk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new functionality should be guarded by a PCD (assuming that all blocks differ when it's off should be good enough). And coreboot should enable it, so likely the PRs need to be based on Dasharo/coreboot#836 and #294 as those two change how new capsule features are controlled.

@filipleple filipleple force-pushed the improve_capsule_progress branch 3 times, most recently from d1114ea to 2759679 Compare February 4, 2026 09:23
@filipleple filipleple marked this pull request as draft February 4, 2026 09:28
@filipleple
Copy link
Member Author

OK, marking as draft and addressing the review

@filipleple filipleple marked this pull request as ready for review February 4, 2026 14:57
Copy link
Member Author

@filipleple filipleple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed the review

@filipleple filipleple marked this pull request as draft February 10, 2026 12:13
@filipleple filipleple force-pushed the improve_capsule_progress branch 4 times, most recently from f32e136 to 72960ed Compare February 10, 2026 13:49
MRC cache was being cleared on every capsule update, forcing a full
memory retraining cycle on the next boot. This is unnecessary because
the cache is versioned by FSP and will be invalidated automatically if
the FSP binary changes in the new firmware.

Migrate the {RECOVERY/RW}_MRC_CACHE FMAP regions the same way ROMHOLE,
BOOTSPLASH and SI_GBE are already handled. The region is not
offset-sensitive and its absence in either image is non-fatal.

Signed-off-by: Filip Lewinski <filip.lewinski@3mdeb.com>
…gress bar

Update the progress bar upon each block being read, not only after
reading the whole flash - and likewise for writing.

This improves the UX in the sense that the progress bar starts moving
at a steady pace right away, so that the update doesn't seem stuck.

The smooth progress bar feature is gated by a PCD that can
be passed by coreboot. It's autoenabled if CAPSULES_V2 is set.

Signed-off-by: Filip Lewinski <filip.lewinski@3mdeb.com>
Improve the Capsule Update flow, so that if the
`CONFIG_EDK2_GRAPHICAL_CAPSULE_PROGRESS` is set but no monitor is
detected, the update doesn't fail but rather falls back to serial
mode.

Signed-off-by: Filip Lewinski <filip.lewinski@3mdeb.com>
@filipleple filipleple force-pushed the improve_capsule_progress branch from d590860 to 847a160 Compare February 10, 2026 14:40
@filipleple filipleple marked this pull request as ready for review February 11, 2026 08:09
The PCD flag has been obsoleted by recent changes that provide a
fallback mechanism in the graphical path in case the GOP is not
available (monitor is not plugged in)

Signed-off-by: Filip Lewinski <filip.lewinski@3mdeb.com>
  - Scale per-block write weight (UPDATE_BLOCK_WEIGHT * BlockCount /
    DifferingBlocks) instead of shrinking TotalUnits; this keeps the
    denominator stable so progress advances smoothly rather than jumping
    when only a fraction of blocks differ
  - Non-writeable differing blocks no longer advance CurrentUnits in
    smooth mode; CountDifferingBlocks already excludes them, so adding
    UPDATE_BLOCK_WEIGHT would overshoot TotalUnits
  - CountDifferingBlocks: pass Image1 (current firmware) to
    IsRangeWriteable, not Image2; write protection reflects the running
    firmware's descriptor
  - Fix debug message typo: MigrateMrcCache -> MigrateRecoveryMrcCache

Signed-off-by: Filip Lewinski <filip.lewinski@3mdeb.com>
@SergiiDmytruk SergiiDmytruk merged commit 2664b4f into capsules-v2 Mar 1, 2026
1 check passed
@SergiiDmytruk SergiiDmytruk deleted the improve_capsule_progress branch March 1, 2026 16:28
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