ArmPkg/Library: optimise StandaloneMmMmuLib with FF-A v1.3#12430
Open
LeviYeoReum wants to merge 1 commit intotianocore:masterfrom
Open
ArmPkg/Library: optimise StandaloneMmMmuLib with FF-A v1.3#12430LeviYeoReum wants to merge 1 commit intotianocore:masterfrom
LeviYeoReum wants to merge 1 commit intotianocore:masterfrom
Conversation
samimujawar
requested changes
Apr 9, 2026
4f20720 to
4521642
Compare
samimujawar
approved these changes
Apr 10, 2026
Contributor
samimujawar
left a comment
There was a problem hiding this comment.
Minor suggestion, otherwise this patch looks good to me.
commit 4ca452c ("ArmPkg/Library: Update StandaloneMmuLib with FF-A v1.2 with page granularity") introduced page-granular memory permission updates to fix the StandaloneMm load failure. However, this approach results in issuing an SMC call per page when updating permissions over a region. Since FF-A Memory Management Protocol v1.3 [0], FFA_MEM_PERM_GET has been updated to return the number of contiguous pages that share the same memory permission starting from a base address. With this change, update memory permissions in bulk (per contiguous page range) to reduce the number of SMC calls, leveraging FF-A Memory Management Protocol v1.3 [0]. Link: https://developer.arm.com/documentation/den0140/latest [0] Signed-off-by: Yeoreum Yun <yeoreum.yun@arm.com>
4521642 to
49f5d15
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
commit 4ca452c ("ArmPkg/Library: Update StandaloneMmuLib with FF-A v1.2 with page granularity") introduced page-granular memory permission updates to fix the StandaloneMm load failure.
However, this approach results in issuing an SMC call per page when updating permissions over a region.
Since FF-A Memory Management Protocol v1.3 [0],
FFA_MEM_PERM_GET has been updated to return the number of contiguous pages that share the same memory permission starting from a base address.
With this change, update memory permissions in bulk (per contiguous page range) to reduce the number of SMC calls, leveraging FF-A Memory Management Protocol v1.3 [0].
Link: https://developer.arm.com/documentation/den0140/latest [0]
How This Was Tested
Boot testing StandaloneMm in FVP revC
Integration Instructions
N/A