Skip to content

[major] Integrate UEFI Services with patina_performance and refactor the component [Rebase & FF] - #1798

Merged
makubacki merged 7 commits into
OpenDevicePartnership:majorfrom
makubacki:patina_uefi_services_major_3
Sep 25, 2026
Merged

makubacki merged 7 commits into
OpenDevicePartnership:majorfrom
makubacki:patina_uefi_services_major_3

Conversation

@makubacki

@makubacki makubacki commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator

Description

A series of commits to split patina_performance into more granular components that take dependencies relevant to that task they are performing and integrate UEFI Services in the process.


patina_performance: Migrate protocol.rs to MeasurementProtocolPublisher

Splits the protocol-installation responsibility out of the monolithic
Performance component into its own MeasurementProtocolPublisher, and
replaces the custom ServiceHolder (OnceCell + AtomicBool + manual
unsafe impl Sync) with ServiceCell, installing the protocol
through ProtocolServicesExt instead of a raw BootServices call.

The old Performance component is untouched and keeps working during
this incremental migration. It will be removed once the remaining
components are split out.


patina_performance: Add PropertyPublisher component

Splits performance property publishing out of the monolithic
Performance component. Depends only on ArchTimerFunctionality and
ConfigurationTableServices for its own work, plus PerformanceManager
as a dependency so this table is only published when performance
measurement is enabled.


patina_performance: Add FbptPublisher component

Splits FBPT (Firmware Basic Boot Performance Table) publishing out of
the monolithic Performance component.

Migrates the End-of-DXE event registration, protocol location, page
allocation, and configuration table installation from raw BootServices
calls to granular service calls to EventServices, ProtocolServices,
MemoryManager, and ConfigurationTableServices.

RuntimeServices is left as a generic parameter since there is not
a dedicated Patina service for Runtime Services at this time.

The old close_event() once-only guard is replaced with a captured
Cell<bool>, since the closure-based event API does not hand the
callback its own Event to close.


patina_performance: Add MmRecordCollector component

Splits MM performance record collection out of the monolithic
Performance component.

mm_comm_service is now a required Service<dyn MmCommunication>
rather than Option<Service<...>>, so the dispatcher itself skips
this component on platforms with no MM communication region instead
of branching on an Option<Service<...>> at runtime.

Also adds a core::error::Error impl for MmPerformanceError
while it is already being moved.


patina_performance: Remove the monolithic Performance component

The monolithic Performance component has now been split into separate
single-purpose components, each with its own responsibilities, so it
can be removed.


components/patina_performance: Add key log messages

Makes it easier to confirm key events happen in the patina_perforamnce
components by being able to track and verify important events in the
log.


Update docs for the patina_performance component split

Updates docs in the mdbook and the patina_performance component crate
to reflect the recent split of the monolithic patina_performance
component into separate components.


  • Impacts functionality?
  • Impacts security?
  • Breaking change?
  • Includes tests?
  • Includes documentation?

How This Was Tested

  • cargo make all
  • Add components to Q35 with PERF_TRACE_ENABLE=TRUE and check perf data is available

Integration Instructions

  • N/A

@makubacki makubacki self-assigned this Sep 22, 2026
@makubacki makubacki changed the title Integrate UEFI Services with patina_performance and refactor the component [Rebase & FF] [major] Integrate UEFI Services with patina_performance and refactor the component [Rebase & FF] Sep 22, 2026
@github-actions github-actions Bot added impact:breaking-change Requires integration attention impact:testing Affects testing type:documentation Improvements or additions to documentation labels Sep 22, 2026
@codecov

codecov Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

@patina-automation

patina-automation Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

ℹ️ QEMU Validation Skipped - Unsupported Target Branch

The Patina QEMU PR validation workflow did not run because the PR targets an unsupported branch.

Workflow run: https://github.com/OpenDevicePartnership/patina/actions/runs/36169581472

Note: Previous results are available in this comment's edit history.

This comment was automatically generated by the Patina QEMU PR Validation Post workflow.

Comment thread components/patina_performance/README.md Resolved
@makubacki
makubacki force-pushed the patina_uefi_services_major_3 branch from 177fe75 to 307d1b9 Compare September 24, 2026 16:57
Splits the protocol-installation responsibility out of the monolithic
Performance component into its own MeasurementProtocolPublisher, and
replaces the custom ServiceHolder (OnceCell + AtomicBool + manual
unsafe impl Sync) with ServiceCell, installing the protocol
through ProtocolServicesExt instead of a raw BootServices call.

The old Performance component is untouched and keeps working during
this incremental migration. It will be removed once the remaining
components are split out.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Splits performance property publishing out of the monolithic
Performance component. Depends only on `ArchTimerFunctionality` and
`ConfigurationTableServices` for its own work, plus `PerformanceManager`
as a dependency so this table is only published when performance
measurement is enabled.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Splits FBPT (Firmware Basic Boot Performance Table) publishing out of
the monolithic Performance component.

Migrates the End-of-DXE event registration, protocol location, page
allocation, and configuration table installation from raw `BootServices`
calls to granular service calls to `EventServices`, `ProtocolServices`,
`MemoryManager`, and `ConfigurationTableServices`.

`RuntimeServices` is left as a generic parameter since there is not
a dedicated Patina service for Runtime Services at this time.

The old `close_event()` once-only guard is replaced with a captured
`Cell<bool>`, since the closure-based event API does not hand the
callback its own `Event` to close.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Splits MM performance record collection out of the monolithic
Performance component.

`mm_comm_service` is now a required `Service<dyn MmCommunication>`
rather than `Option<Service<...>>`, so the dispatcher itself skips
this component on platforms with no MM communication region instead
of branching on an `Option<Service<...>>` at runtime.

Also adds a `core::error::Error` `impl` for `MmPerformanceError`
while it is already being moved.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
The monolithic Performance component has now been split into separate
single-purpose components, each with its own responsibilities, so it
can be removed.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Makes it easier to confirm key events happen in the patina_perforamnce
components by being able to track and verify important events in the
log.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
Updates docs in the mdbook and the patina_performance component crate
to reflect the recent split of the monolithic patina_performance
component into separate components.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@makubacki
makubacki force-pushed the patina_uefi_services_major_3 branch from 307d1b9 to 290d0d5 Compare September 25, 2026 17:34
@makubacki

Copy link
Copy Markdown
Collaborator Author

Two changes just pushed:

  1. Merged the latest main (at commit d3a15e7) into major and rebased the PR branch on it
  2. Added commit d15b815 to make it easier to observe key flow details during boot in the log

@makubacki
makubacki enabled auto-merge (rebase) September 25, 2026 17:39
@makubacki
makubacki merged commit f0c7e16 into OpenDevicePartnership:major Sep 25, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:breaking-change Requires integration attention impact:testing Affects testing type:documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants