mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stuart Yoder <stuart.yoder@arm.com>
To: Sumit Garg <sumit.garg@linaro.org>
Cc: linux-integrity@vger.kernel.org, jarkko@kernel.org,
	peterhuewe@gmx.de, jgg@ziepe.ca, sudeep.holla@arm.com,
	rafael@kernel.org, lenb@kernel.org, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jens Wiklander <jens.wiklander@linaro.org>
Subject: Re: [PATCH 0/4] Add support for the TPM FF-A start method
Date: Wed, 12 Feb 2025 15:55:26 -0600	[thread overview]
Message-ID: <fdaa9a58-790f-4839-8db7-1b9a81eb8edf@arm.com> (raw)
In-Reply-To: <CAFA6WYM3UA9+TE8L2U5Qd8FZfaGZnbba=QzWU7fEu3LKQVm-tw@mail.gmail.com>



On 2/12/25 1:39 AM, Sumit Garg wrote:
> On Tue, 11 Feb 2025 at 21:39, Stuart Yoder <stuart.yoder@arm.com> wrote:
>>
>> Hi Sumit,
>>
>> On 2/11/25 12:45 AM, Sumit Garg wrote:
>>> + Jens
>>>
>>> Hi Stuart,
>>>
>>> On Tue, 11 Feb 2025 at 04:52, Stuart Yoder <stuart.yoder@arm.com> wrote:
>>>>
>>>> These patches add support for the CRB FF-A start method defined
>>>> in the TCG ACPI specification v1.4 and the FF-A ABI defined
>>>> in the Arm TPM Service CRB over FF-A (DEN0138) specification.
>>>> (https://developer.arm.com/documentation/den0138/latest/)
>>>
>>> Nice to have a specification standardizing interface to TPM
>>> managed/implemented by the firmware. Care to add corresponding kernel
>>> documentation under Documentation/security/tpm/.
>>
>> Yes, I can add some documentation there.
>>
>>> BTW, we already have drivers/char/tpm/tpm_ftpm_tee.c, so do you see
>>> possibilities for an abstraction layer on top of communication channel
>>> based on either FF-A or TEE or platform bus?
>>
>> I think the CRB and OP-TEE based messaging approaches for interacting
>> with a TZ-based TPM are fundamentally different and I don't see how
>> to harmonize them through some abstraction.
>>
>> The OP-TEE TPM protocol copies the TPM command into a temp shared memory
>> buffer and sends a message to the TPM referencing that buffer.
>>
>> The CRB uses a permanently shared memory carve-out that in addition
>> to the command/response data has other fields for locality control,
>> command control, status, TPM idle, etc. The only 'message' needed is
>> something to signal 'start'.  Any OS that is FF-A aware and has a
>> CRB driver can simply add a new start method, which is what this
>> patch series does.
> 
> Okay, I see how the CRB driver is closely tied to the ACPI based
> systems.

The CRB driver is currently probed based on ACPI, but it fundamentally
doesn't have to be.  If there was a DT binding for CRB-based
TPMs the different start methods would be defined there and the
CRB driver could support that.

> I was expecting the FF-A based TPM interface to be
> independent of ACPI or DT such that it's not constrained by the
> hardware description a platform chooses to use. I suppose there will
> be a different TPM FF-A driver or spec when someone wants to deploy it
> on DT based systems, right?

The CRB is just a shared memory buffer, with some architected semantics
defined by TCG. The basic CRB usage model is that a client puts
something in the CRB, such as the bytes of a TPM command, and then
notifies the TPM that a change was made to the CRB. The CRB over
FF-A spec just defines the message to perform that notification
when FF-A is used.

So, whether the fTPM was advertised via ACPI or DT, it doesn't matter.
The FF-A based interface is only about the the notification messages
needed for the OS driver to tell the TPM that something has changed
in the CRB.

Thanks,
Stuart

  reply	other threads:[~2025-02-12 21:55 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-10 23:22 Stuart Yoder
2025-02-10 23:22 ` [PATCH 1/4] tpm_crb: implement driver compliant to CRB over FF-A Stuart Yoder
2025-02-11 21:08   ` Jarkko Sakkinen
2025-02-11 23:21     ` Stuart Yoder
2025-02-10 23:22 ` [PATCH 2/4] tpm_crb: refactor check for idle support into TPM into inline function Stuart Yoder
2025-02-10 23:22 ` [PATCH 3/4] ACPICA: add start method for Arm FF-A Stuart Yoder
2025-02-11  9:57   ` Sudeep Holla
2025-02-11 21:50     ` Stuart Yoder
2025-02-10 23:22 ` [PATCH 4/4] tpm_crb: add support for the Arm FF-A start method Stuart Yoder
2025-02-11  6:45 ` [PATCH 0/4] Add support for the TPM " Sumit Garg
2025-02-11 16:09   ` Stuart Yoder
2025-02-12  7:39     ` Sumit Garg
2025-02-12 21:55       ` Stuart Yoder [this message]
2025-02-13  5:31         ` Sumit Garg
2025-02-13 15:19           ` Stuart Yoder
2025-02-17  5:17             ` Sumit Garg
2025-02-17 16:56               ` Stuart Yoder
2025-02-21 13:46                 ` Sumit Garg
2025-02-21 14:02                   ` Sudeep Holla
2025-02-21 18:29                     ` Stuart Yoder
2025-02-22 15:39                       ` Sudeep Holla
2025-02-11 10:12 ` Sudeep Holla
2025-02-11 21:07 ` Jarkko Sakkinen
2025-02-11 23:21   ` Stuart Yoder

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=fdaa9a58-790f-4839-8db7-1b9a81eb8edf@arm.com \
    --to=stuart.yoder@arm.com \
    --cc=jarkko@kernel.org \
    --cc=jens.wiklander@linaro.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 \
    --cc=sumit.garg@linaro.org \
    /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

all inboxes | Powered by JetHome®