Skip to content

Commit da086d4

Browse files
stuyod01jarkkojs
authored andcommitted
Documentation: tpm: Add documentation for the CRB FF-A interface
Add documentation providing details of how the CRB driver interacts with ARM FF-A. [jarkko: Fine-tuned the commit message.] Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Stuart Yoder <stuart.yoder@arm.com> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
1 parent 9afb9ea commit da086d4

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

Documentation/security/tpm/index.rst

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

0 commit comments

Comments
 (0)