Skip to content

MmSupervisorPkg: MmSupervisorCore consume PcdMigrateTemporaryRamFirmwareVolumes. #489

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

apop5
Copy link
Collaborator

@apop5 apop5 commented Jun 11, 2025

Description

A platform has the ability to set PcdMigrateTemporaryRamFirmwareVolumes which tells the PEI core to migrate Firmware volumes from the flash part into system memory after gEfiPeiMemoryDiscoveredPpiGuid is installed.

When this happens, the platform may decide to leave the original EFI_HOB_TYPE_FVs in place, and expect consumers to switch to using EFI_HOB_TYPE_FV2.

Add the capability to consume EFI_HOB_TYPE_FV2 when this PCD is set. Also update the Hob consuming code to ensure that the length field of Length field of EFI_HOB_FIRMWARE_VOLUME/EFI_HOB_FIRMWARE_VOLUME2 is non zero before attempting to access/consume data from the hob.

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

How This Was Tested

Testing on a platform which set PcdMigrateTemporaryRamFirmwareVolumes to True.

Integration Instructions

No integration necessary.

@apop5 apop5 requested a review from kuqin12 June 11, 2025 22:19
@github-actions github-actions bot added the impact:non-functional Does not have a functional impact label Jun 11, 2025
…areVolumes.

A platform has the ability to set PcdMigrateTemporaryRamFirmwareVolumes
which tells the PEI core to migrate Firmware volumes from the flash
part into system memory after gEfiPeiMemoryDiscoveredPpiGuid is installed.

When this happens, the platform may decide to leave the original
EFI_HOB_TYPE_FVs in place, and expect consumers to switch to using
EFI_HOB_TYPE_FV2.

Add the capability to consume EFI_HOB_TYPE_FV2 when this PCD is set.
Also update the Hob consuming code to ensure that the length
field of Length field of EFI_HOB_FIRMWARE_VOLUME/EFI_HOB_FIRMWARE_VOLUME2
is non zero before attempting to access/consume data from the hob.
@apop5 apop5 force-pushed the personal/apop5/consumemigratetemp branch from 8a64a36 to 053cc5e Compare June 11, 2025 22:22
@github-actions github-actions bot removed the impact:non-functional Does not have a functional impact label Jun 11, 2025
@codecov-commenter
Copy link

codecov-commenter commented Jun 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 0.51%. Comparing base (a265cf7) to head (fe984a4).

Files with missing lines Patch % Lines
MmSupervisorPkg/Core/MmSupervisorCore.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##            main    #489      +/-   ##
========================================
- Coverage   0.51%   0.51%   -0.01%     
========================================
  Files        143     143              
  Lines      20709   20720      +11     
  Branches      60      60              
========================================
  Hits         106     106              
- Misses     20598   20609      +11     
  Partials       5       5              
Flag Coverage Δ
MmSupervisorPkg 0.51% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

3 participants