Skip to content

patina_performance: Fix get_variable() call - #1775

Merged
makubacki merged 1 commit into
OpenDevicePartnership:mainfrom
makubacki:perf_fix_var_name
Sep 14, 2026
Merged

makubacki merged 1 commit into
OpenDevicePartnership:mainfrom
makubacki:perf_fix_var_name

Conversation

@makubacki

@makubacki makubacki commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Description

The call should use a variable name, which is stored under "FirmwarePerformance". This updates the get_variable() call to use that name instead of an empty string.

Note that this was an issue in the initial implementation in f632988 and not a recent regression.

The variable data structure (FirmwarePerformanceVariable) should also be packed, so that is done here as well.

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

How This Was Tested

  • cargo make all (includes unit test changes)

Ran on patina-qemu with patina_performance enabled, log level set to log::LevelFilter::Info, and the following temporary message in report_fbpt_event():

    if let Some(address) = find_previous_table_address(&runtime_services) {
        log::info!("Performance: Previous FBPT table found at address {address:#x}");
    }

Verified the variable was found sucessfully:

INFO - Performance: Previous FBPT table found at address 0x7bef9000

Note that the actual variable (even with the Patina component) is set in FirmwarePerformanceDataTableDxe here:

  gRT->SetVariable (
         EFI_FIRMWARE_PERFORMANCE_VARIABLE_NAME,
         &gEfiFirmwarePerformanceGuid,
         EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS,
         sizeof (PerformanceVariable),
         &PerformanceVariable
         );

Integration Instructions

  • N/A

@makubacki makubacki self-assigned this Sep 11, 2026
@makubacki makubacki added the type:bug Something isn't working label Sep 11, 2026
@patina-automation

patina-automation Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

✅ QEMU Validation Passed

All QEMU validation jobs completed successfully.

Note: Q35 is only built on Windows hosts (QEMU boot is disabled due to a QEMU vfat issue).

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

Boot Time to EFI Shell

Platform Elapsed
ArmVirt (Linux Host) 24.5s
Q35 (Linux Host) 29.5s

Dependencies

Repository Ref
patina 64cf81a
patina-dxe-core-qemu 17620b3
patina-fw-patcher c28ab7d
patina-qemu firmware v4.0.5
patina-qemu build script 9d0aee6

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

@github-actions github-actions Bot added the impact:testing Affects testing label Sep 11, 2026
@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The call should use a variable name, which is stored under
"FirmwarePerformance". This updates the get_variable() call to use
that name instead of an empty string.

Note that was an issue since the initial implementation and not a
recent regression.

The variable data structure (`FirmwarePerformanceVariable`) should
also be packed, so that is done here as well.

Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com>
@makubacki
makubacki enabled auto-merge (squash) September 14, 2026 16:02
@makubacki
makubacki merged commit 134e367 into OpenDevicePartnership:main Sep 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

impact:testing Affects testing type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants