[CHERRY-PICK][REBASE & FF][FF-A]Remove Globals from ArmFfaCommon#1683
Merged
Raymond-MS merged 6 commits intomicrosoft:release/202502from Mar 7, 2026
Merged
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## release/202502 #1683 +/- ##
=================================================
Coverage ? 1.55%
=================================================
Files ? 636
Lines ? 234519
Branches ? 370
=================================================
Hits ? 3649
Misses ? 230857
Partials ? 13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Collaborator
|
can you add [Cherry-Pick] to each of the commits that you are going to merge? It will make it easier in the next rebase to be able to drop the commits that are already upstreamed. |
Added ArmFfaLibIsFfaSupported to ArmFfaCommon to allow for queries of FF-A support outside of ArmFfaCommonInit. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Removed global variables in ArmFfaCommon. Moved the globals to locals in each phase's ArmFfaLib implementation. SEC and PEI will query when necessary to avoid setting globals when memory is unavailable. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Removed the global variables in ArmFfaSecRxTxMap. Rx/Tx buffer HOB is now created within the Map function rather than in the constructor of ArmFfaSecLib. This allows for the use of the HOB to find the Rx/Tx buffer information. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
…TxMap Replaced all instances of PcdGet64 (PcdFfaTxRxPageCount) * EFI_PAGE_SIZE, with EFI_PAGES_TO_SIZE macro. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Cleaned various comments and debug messages as well as headers to either fix typos or for readability. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
Add Unmap callback for when PEI and SEC need to invalidate the Rx/Tx buffer HOB on a call to Unmap. Signed-off-by: Raymond Diaz <raymonddiaz@microsoft.com>
fe876a9 to
92c3a85
Compare
cfernald
approved these changes
Mar 7, 2026
kuqin12
approved these changes
Mar 7, 2026
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
Added ArmFfaLibIsFfaSupported to ArmFfaCommon to allow for queries of FF-A support outside of ArmFfaCommonInit. Removed global variables in ArmFfaCommon. Moved the globals to locals in each phase's ArmFfaLib implementation. SEC and PEI will query when necessary to avoid setting globals when memory is unavailable. Removed the global variables in ArmFfaSecRxTxMap. Rx/Tx buffer HOB is now created within the Map function rather than in the constructor of ArmFfaSecLib. This allows for the use of the HOB to find the Rx/Tx buffer information. Add Unmap callback for when PEI and SEC need to invalidate the Rx/Tx buffer HOB on a call to Unmap.
For details on how to complete these options and their meaning refer to CONTRIBUTING.md.
How This Was Tested
Built and ran QEMU SBSA with TPM enabled. Verified TPM communication and boot to shell.
Integration Instructions
N/A