From: Stuart Yoder <stuart.yoder@arm.com>
To: linux-integrity@vger.kernel.org, jarkko@kernel.org,
peterhuewe@gmx.de, jgg@ziepe.ca, sudeep.holla@arm.com,
rafael@kernel.org, lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v6 5/5] Documentation: tpm: add documentation for the CRB FF-A interface
Date: Wed, 5 Mar 2025 11:36:11 -0600 [thread overview]
Message-ID: <20250305173611.74548-6-stuart.yoder@arm.com> (raw)
In-Reply-To: <20250305173611.74548-1-stuart.yoder@arm.com>
Add documentation providing details of how the CRB driver interacts
with FF-A.
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Stuart Yoder <stuart.yoder@arm.com>
---
Documentation/security/tpm/tpm_ffa_crb.rst | 65 ++++++++++++++++++++++
1 file changed, 65 insertions(+)
create mode 100644 Documentation/security/tpm/tpm_ffa_crb.rst
diff --git a/Documentation/security/tpm/tpm_ffa_crb.rst b/Documentation/security/tpm/tpm_ffa_crb.rst
new file mode 100644
index 000000000000..0184193da3c7
--- /dev/null
+++ b/Documentation/security/tpm/tpm_ffa_crb.rst
@@ -0,0 +1,65 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+========================
+TPM CRB over FF-A Driver
+========================
+
+The TPM Command Response Buffer (CRB) interface is a standard TPM interface
+defined in the TCG PC Client Platform TPM Profile (PTP) Specification [1]_.
+The CRB provides a structured set of control registers a client uses when
+interacting with a TPM as well as a data buffer for storing TPM commands and
+responses. A CRB interface can be implemented in:
+
+- hardware registers in a discrete TPM chip
+
+- in memory for a TPM running in isolated environment where shared memory
+ allows a client to interact with the TPM
+
+The Firmware Framework for Arm A-profile (FF-A) [2]_ is a specification
+that defines interfaces and protocols for the following purposes:
+
+- Compartmentalize firmware into software partitions that run in the Arm
+ Secure world environment (also know as TrustZone)
+
+- Provide a standard interface for software components in the Non-secure
+ state, for example OS and Hypervisors, to communicate with this firmware.
+
+A TPM can be implemented as an FF-A secure service. This could be a firmware
+TPM or could potentially be a TPM service that acts as a proxy to a discrete
+TPM chip. An FF-A based TPM abstracts hardware details (e.g. bus controller
+and chip selects) away from the OS and can protect locality 4 from access
+by an OS. The TCG-defined CRB interface is used by clients to interact
+with the TPM service.
+
+The Arm TPM Service Command Response Buffer Interface Over FF-A [3]_
+specification defines FF-A messages that can be used by a client to signal
+when updates have been made to the CRB.
+
+How the Linux CRB driver interacts with FF-A is summarized below:
+
+- The tpm_crb_ffa driver registers with the FF-A subsystem in the kernel
+ with an architected TPM service UUID defined in the CRB over FF-A spec.
+
+- If a TPM service is discovered by FF-A, the probe() function in the
+ tpm_crb_ffa driver runs, and the driver initializes.
+
+- The probing and initialization of the Linux CRB driver is triggered
+ by the discovery of a TPM advertised via ACPI. The CRB driver can
+ detect the type of TPM through the ACPI 'start' method. The start
+ method for Arm FF-A was defined in TCG ACPI v1.4 [4]_.
+
+- When the CRB driver performs its normal functions such as signaling 'start'
+ and locality request/relinquish it invokes the tpm_crb_ffa_start() funnction
+ in the tpm_crb_ffa driver which handles the FF-A messaging to the TPM.
+
+References
+==========
+
+.. [1] **TCG PC Client Platform TPM Profile (PTP) Specification**
+ https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profile-ptp-specification/
+.. [2] **Arm Firmware Framework for Arm A-profile (FF-A)**
+ https://developer.arm.com/documentation/den0077/latest/
+.. [3] **Arm TPM Service Command Response Buffer Interface Over FF-A**
+ https://developer.arm.com/documentation/den0138/latest/
+.. [4] **TCG ACPI Specification**
+ https://trustedcomputinggroup.org/resource/tcg-acpi-specification/
--
2.34.1
next prev parent reply other threads:[~2025-03-05 17:36 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-05 17:36 [PATCH v6 0/5] Add support for the TPM FF-A start method Stuart Yoder
2025-03-05 17:36 ` [PATCH v6 1/5] tpm_crb: implement driver compliant to CRB over FF-A Stuart Yoder
2025-03-06 22:43 ` Jarkko Sakkinen
2025-03-05 17:36 ` [PATCH v6 2/5] tpm_crb: clean-up and refactor check for idle support Stuart Yoder
2025-03-05 17:36 ` [PATCH v6 3/5] ACPICA: add start method for Arm FF-A Stuart Yoder
2025-03-05 17:36 ` [PATCH v6 4/5] tpm_crb: add support for the Arm FF-A start method Stuart Yoder
2025-03-05 17:36 ` Stuart Yoder [this message]
2025-03-06 22:45 ` [PATCH v6 0/5] Add support for the TPM " Jarkko Sakkinen
2025-03-10 11:19 ` Jarkko Sakkinen
2025-03-11 15:28 ` Sudeep Holla
2025-03-12 6:06 ` Jarkko Sakkinen
2025-03-11 15:21 ` Build error on -next due to tpm_crb.c changes? (was: Re: [PATCH v6 0/5] Add support for the TPM FF-A start method) Thorsten Leemhuis
2025-03-11 15:53 ` Build error on -next due to tpm_crb.c changes? Stuart Yoder
2025-03-11 16:51 ` Thorsten Leemhuis
2025-03-11 18:25 ` Stuart Yoder
2025-03-11 21:17 ` Sudeep Holla
2025-03-12 20:47 ` Stuart Yoder
2025-03-12 2:51 ` Stuart Yoder
2025-03-12 6:48 ` Thorsten Leemhuis
2025-03-12 6:05 ` Jarkko Sakkinen
2025-03-12 6:00 ` Build error on -next due to tpm_crb.c changes? (was: Re: [PATCH v6 0/5] Add support for the TPM FF-A start method) Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250305173611.74548-6-stuart.yoder@arm.com \
--to=stuart.yoder@arm.com \
--cc=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).