-
Notifications
You must be signed in to change notification settings - Fork 2.9k
MdeModulePkg/ArmFfaLib: add ArmFfaLibPartitionInfoGetRegs() #11420
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
base: master
Are you sure you want to change the base?
Conversation
|
⚠ WARNING: Cannot add some reviewers: A user specified as a reviewer for this PR is not a collaborator of the repository. Please add them as a collaborator to the repository so they can be requested in the future. Non-collaborators requested: Attn Admins: Admin Instructions:
|
49572cb to
4493e1e
Compare
4493e1e to
9617e3a
Compare
78d68cb to
849508f
Compare
eb86761 to
54e7417
Compare
54e7417 to
5c0be4d
Compare
5c0be4d to
7ce7b26
Compare
7ce7b26 to
1405033
Compare
|
Not entirely related to this PR, but I was thinking about the usage of this library earlier. And it seems that the main churn for this library class comes from the Rx/Tx buffer, i.e. whether is supported, whether we have it in the right environment, whether we can have the correct framework to support the memory allocation, whether we need to unregister it when handing off to the OS, etc.. I would think for a large collection of basic FFA functionalities, it is really monitor calls + interpretation. We probably can keep it simple, then we can use it anywhere, link to all modules. But for Tx/Rx, which is like a global, and will need memory usage, and pass on the information of those buffers, it might be better to be handled separately. TL;DR |
Well. I'll also take a time to think about it more (perhaps with Library? since for use in SEC phase too?) |
d5a764c to
4ffbb66
Compare
|
@samimujawar and @kuqin12. If you don't have anymore comment, Could you review and merge this patch series? Thanks |
4ffbb66 to
a16a11f
Compare
e4fa3da to
208279d
Compare
208279d to
5616e5d
Compare
3e5ac7f to
8eabf00
Compare
Starting from FF-A v1.2 [0], the FFA_PARTITION_INFO_GET_REGS interface was added to retrieve partition information through registers. This ABI is useful in environments where the Rx/Tx buffer does not need to be mapped, or where buffer mapping is not supported for retrieving partition information. To support this, two new APIs are introduced: ArmFfaLibPartitionInfoGetRegs() and ArmFfaLibPartitionCountGetRegs(). Link: https://developer.arm.com/documentation/den0077/latest [0] Continuous-integration-options: PatchCheck.ignore-multi-package Signed-off-by: Yeoreum Yun <[email protected]>
In the normal world, it is possible to communicate with a secure partition using the ARM_FFA_PARTITION_INFO_GET_REGS ABI, even when the Rx/Tx buffer ABI is not supported. Therefore, treat the EFI_UNSUPPORTED error returned during Rx/Tx buffer mapping as a valid result when the ARM_FFA_PARTITION_INFO_GET_REGS ABI is supported. Signed-off-by: Yeoreum Yun <[email protected]>
Most of platform doesn't have multi partitons realted with on service guid that's why it's enough to use the first partition info. Introduce ArmFfaGetPartitionInfo() which gets first partition info related with service guid. so that let's remove some duplicate code to get partition id. Signed-off-by: Yeoreum Yun <[email protected]> Continuous-integration-options: PatchCheck.ignore-multi-package
Use ArmFfaGetPartitionInfo() to get partition information. This simplifies the code to get partition information. Signed-off-by: Yeoreum Yun <[email protected]>
Use ArmFfaGetPartitionInfo() in Tpm2ServiceFfaLib. This simplifies the code line to get partition information. Signed-off-by: Yeoreum Yun <[email protected]>
…Peim Use ArmFfaGetPartitionInfo() in Tcg2ConfigFfaPeim. This simplifies the code line to get partition information. Signed-off-by: Yeoreum Yun <[email protected]>
8eabf00 to
988ff8f
Compare
This patch adds ArmFfaLibPartitionInfoGetRegs() in ArmFfaLib
As ArmFfaLibPartitionInfoGetRegs() is added, Normal world ArmFfLib Rx/Tx buffer is not a madatory.
That's why return EFI_UNSUPPORTED while Rx/Tx buffer mapping in ArmFfaLib constructor
can be consider as valid return If ARM_FFA_PARTITION_INFO_GET_REGS is supported by SPMC.
Patch #1 adds ArmFfaLibPartitionInfoGetRegs()
Patch #2 considers EFI_UNSUPPORTED while Rx/Tx buffer mapping in constrcutor as valid return
Patch #3 add helper function named ArmFfaLibGetPartitionInfo().
Patch #4-#6 applies ArmFfaLibGetPartitionInfo() in each modules.
Signed-off-by: Yeoreum Yun [email protected]