tpm_ffa_crb.rst 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ========================
  3. TPM CRB over FF-A Driver
  4. ========================
  5. The TPM Command Response Buffer (CRB) interface is a standard TPM interface
  6. defined in the TCG PC Client Platform TPM Profile (PTP) Specification [1]_.
  7. The CRB provides a structured set of control registers a client uses when
  8. interacting with a TPM as well as a data buffer for storing TPM commands and
  9. responses. A CRB interface can be implemented in:
  10. - hardware registers in a discrete TPM chip
  11. - in memory for a TPM running in isolated environment where shared memory
  12. allows a client to interact with the TPM
  13. The Firmware Framework for Arm A-profile (FF-A) [2]_ is a specification
  14. that defines interfaces and protocols for the following purposes:
  15. - Compartmentalize firmware into software partitions that run in the Arm
  16. Secure world environment (also know as TrustZone)
  17. - Provide a standard interface for software components in the Non-secure
  18. state, for example OS and Hypervisors, to communicate with this firmware.
  19. A TPM can be implemented as an FF-A secure service. This could be a firmware
  20. TPM or could potentially be a TPM service that acts as a proxy to a discrete
  21. TPM chip. An FF-A based TPM abstracts hardware details (e.g. bus controller
  22. and chip selects) away from the OS and can protect locality 4 from access
  23. by an OS. The TCG-defined CRB interface is used by clients to interact
  24. with the TPM service.
  25. The Arm TPM Service Command Response Buffer Interface Over FF-A [3]_
  26. specification defines FF-A messages that can be used by a client to signal
  27. when updates have been made to the CRB.
  28. How the Linux CRB driver interacts with FF-A is summarized below:
  29. - The tpm_crb_ffa driver registers with the FF-A subsystem in the kernel
  30. with an architected TPM service UUID defined in the CRB over FF-A spec.
  31. - If a TPM service is discovered by FF-A, the probe() function in the
  32. tpm_crb_ffa driver runs, and the driver initializes.
  33. - The probing and initialization of the Linux CRB driver is triggered
  34. by the discovery of a TPM advertised via ACPI. The CRB driver can
  35. detect the type of TPM through the ACPI 'start' method. The start
  36. method for Arm FF-A was defined in TCG ACPI v1.4 [4]_.
  37. - When the CRB driver performs its normal functions such as signaling 'start'
  38. and locality request/relinquish it invokes the tpm_crb_ffa_start() funnction
  39. in the tpm_crb_ffa driver which handles the FF-A messaging to the TPM.
  40. References
  41. ==========
  42. .. [1] **TCG PC Client Platform TPM Profile (PTP) Specification**
  43. https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
  44. .. [2] **Arm Firmware Framework for Arm A-profile (FF-A)**
  45. https://developer.arm.com/documentation/den0077/latest/
  46. .. [3] **Arm TPM Service Command Response Buffer Interface Over FF-A**
  47. https://developer.arm.com/documentation/den0138/latest/
  48. .. [4] **TCG ACPI Specification**
  49. https://trustedcomputinggroup.org/resource/tcg-acpi-specification/