Skip to content

Conversation

@kuqin12
Copy link
Contributor

@kuqin12 kuqin12 commented Nov 4, 2025

Description

This change cherry-picks 2 commits from EDK2 that could cause some platforms to not work with Standalone MM as expected.

The last commit is an add-on to resolve the feedback on this PR and will be taken to edk2.

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

How This Was Tested

This was tested on QEMU Q35 platform and booted to Windows desktop.

Integration Instructions

N/A

…ro Pages

There could be scenarios where the HOB producer does not create any HOBs.
In such cases, the buffer intended to be freed will have zero pages.

This update addresses the issue that could cause assertions during
runtime by ensuring that buffers with zero pages are not freed.

Signed-off-by: Kun Qin <[email protected]>
(cherry picked from commit c72d638)
…pen the regions

Current MM IPL in PEI phase does not open the MMRAM regions through MM
access PPI. This is causing some platforms like OVMF reading all `0xFF`s
when trying to relocate the Standalone MM core.

This change opens all the MMRAM regions provided by MM access PPI and
closes + locks the regions after initial MM foundation setup, when MM
Access PPI is available.

Platforms that require MM access PPI can inject depex through libraries.

Signed-off-by: Kun Qin <[email protected]>
(cherry picked from commit 73b0b5e)
@makubacki
Copy link
Member

I know this is a cherry-pick but I had a few questions before finishing the review.

@kuqin12 kuqin12 changed the title [CHERRY-PICK] Cherry-pick standalone MM IPL fixes [Rebase & FF] Standalone MM IPL fixes Nov 4, 2025
This change adds some logic to handle the MmAccess PPI failure and makes
effort to close and lock all regions when possible.

Signed-off-by: Kun Qin <[email protected]>
@kuqin12 kuqin12 enabled auto-merge (rebase) November 4, 2025 19:35
@kuqin12 kuqin12 merged commit 381bf9f into microsoft:release/202502 Nov 4, 2025
30 checks passed
@kuqin12 kuqin12 deleted the stmm_ipl branch November 4, 2025 23:38
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.

4 participants