Adding support for TPM over FF-A on ARM platforms#10874
Adding support for TPM over FF-A on ARM platforms#10874mergify[bot] merged 9 commits intotianocore:masterfrom
Conversation
4e75df4 to
f5f82ac
Compare
LeviYeoReum
left a comment
There was a problem hiding this comment.
Why do you make it with Tpm2DeviceLib?
Would It better to make it Tpm2InstanceLib so that Tpm2DeviceLibRouter can choise this FF-A CRB library?
I started with device lib because it is able to be tested by directly linking to the driver without jumping through hoops. But on the other hand, the router library is just picking among instance libraries using Can you please let me know your usage? |
5092015 to
52b3a75
Compare
But we can makes it with Tpm Service UUID right? |
I can add one library as instance lib if so desired. It should be minor update. |
217bc22 to
2aa9b4b
Compare
Actually, I went ahead and added it in a new commit. Please let me know if that looks reasonable to you. |
9a532ad to
029b215
Compare
|
Hello Shouldn't they go together? Either ArmPkg or SecurityPkg? |
Agreed. And ArmPkg is not it. |
@leiflindholm @jyao1 I do not disagree, either. But the Tpm2DeviceLib will depend on FFA lib directly, which seems inverted dependency. Any suggestions to avoid such entanglement? |
ArmFfaLib is an implementation of an industry standard specification, so belongs in MdePkg. |
966633d to
9e3d801
Compare
|
@kuqin12 , thanks for the update. I am OK with this patch. Since you are expert on ARM-FFA part, would you mind to add yourself to be the reviewer and help me maintain the ARM-FFA related module? If you agree, please add a section to https://github.com/tianocore/edk2/blob/master/Maintainers.txt, with following |
Thanks, @jyao1. I can't claim to be an expert but I'd be willing to help review the incoming changes to these functional components :) I will add change in the next push. |
This change adds a GUID for the physical presence interface. This is defined in TCG Physical Presence Interface v1.30, Rev. 00.52: Section 8.1 ACPI Functions. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change adds a new driver Tcg2StandaloneMmArm. It will register an MMI handler that is responsible for supporting the physical presence interface from ASL methods during OS runtime. Platforms need to expose the PPI ACPI function GUID in the Standalone MM secure partition. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
…tion This change adds a new library instance of SmmTcg2PhysicalPresenceLib. It will directly check on the PCD value instead of relying on the HOB value, which will require change on the TFA/SPMC side. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change adds a new driver Tcg2AcpiFfa. It will publish the TPM2 and the corresponding SSDT table that is responsible for supporting the physical presence interface through ASL methods during OS runtime. Co-authored-by: Raymond Diaz <raymonddiaz@microsoft.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
TPM over FF-A is a mechanism enabling the normal world to communicate with TPM devices offered as a FF-A service in the secure world. This update introduces a header file containing definitions from the TPM over FF-A specification, as detailed in the following documentation: https://developer.arm.com/documentation/den0138/latest/ Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change introduces a `Tpm2DeviceLibFfa` library to support TPM over FF-A. The implementation follows the TPM over FF-A spec v1.0 BET: https://developer.arm.com/documentation/den0138/latest/ The change is tested on QEMU SBSA virtual platform and proprietary hardware platforms. Co-authored-by: Raymond Diaz <raymonddiaz@microsoft.com> Signed-off-by: Kun Qin <kun.qin@microsoft.com>
This change introduces a `Tpm2InstanceLibFfa` library to support TPM over FF-A and works with Tpm2DeviceLibRouter* libraries. The implementation follows the TPM over FF-A spec v1.0 BET: https://developer.arm.com/documentation/den0138/latest/ The change is tested on QEMU SBSA virtual platform and proprietary hardware platforms. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
…ityPkg - Updated Maintainers.txt to include Kun Qin as a maintainer for the ARM- FFA sections in SecurityPkg. - Added his contact information: email and GitHub username. Signed-off-by: Kun Qin <kun.qin@microsoft.com>
Description
This change adds the support of TPM over FF-A. It covers the TPM device library to allow TCG2 modules to communicate with the TPM service in the secure world through FF-A commands. In addition, it also supports the publication of TPM2 and the corresponding SSDT table that is responsible for supporting the physical presence interface through ASL methods during OS runtime.
How This Was Tested
This change is tested on QEMU SBSA virtual platform and proprietary hardware platforms and booted on Windows platform.
Integration Instructions
Add the following modules to the platform DSC file:
SecurityPkg/Tcg/Tcg2StandaloneMmArm/Tcg2StandaloneMmArm.infSecurityPkg/Tcg/Tcg2AcpiFfa/Tcg2AcpiFfa.infLink the following TPM library for TCG2 modules:
Tpm2DeviceLib|ArmPkg/Library/Tpm2DeviceLibFfa/Tpm2DeviceLibFfa.inf