Received: by 2002:a89:2c3:0:b0:1ed:23cc:44d1 with SMTP id d3csp23482lqs; Mon, 4 Mar 2024 13:41:46 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXvJu6VPo60a4/f3uTT3Z/XcbfaEnLI3OcqsVQn0isfbribzDiSag60CnZR7s9hD8oQjoMkk73bXIB8vcOjWNcBNJ2yO58R4rOC6JNE9Q== X-Google-Smtp-Source: AGHT+IFJ7QvtH3SoI2eF0UW9E2NM7MI9PqBGt/jleHorbXvBdybV94qeENnRXaEcrIW4P3cWn9Nr X-Received: by 2002:a05:6a00:10c7:b0:6e6:1bd6:95ab with SMTP id d7-20020a056a0010c700b006e61bd695abmr5963373pfu.11.1709588505881; Mon, 04 Mar 2024 13:41:45 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709588505; cv=pass; d=google.com; s=arc-20160816; b=Uk8Uc8IX3mTQgVhRtyMLlRfrCfoo1KRtUq2WiquY8N5R82VenRBROIxUIb2z7NYB4K wU/H8XHlTOZxtjlJnToYSohisEaivS+7wZGD4Tz/ZZKSsmYlmHcfC+frOvVSfvT0nlxg Lw5jCj9m+WJgnqlFvu2B/T/9U9AwK+4y/cr28nn194y3YY9OxTJKhdnP1mNQl/wfqZoo hrcURymZrcPN3ypGHBtV/yhrQiAUMnU4wbwXaOFwa2L+D1k1YqYquaJi2LOgIc7Fbv2w mFsEfY6HmXskjggEga0WoBdC2n2LHcNx9KvmHywMNUJAAfmUrC8nYyADHsHZX1QJe9MB ZNdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from:dkim-signature; bh=hsUdRl8MbeCDD1Ld/9OThW4765xDr2yffljLPpWdRvw=; fh=1iIeCVQQswfPKG6gJH4SGlfzfdgvPLhYejNVEtVWGEg=; b=qhglUflz5XN+1/BHfdGJuW+hZhu/osGyN/p/NgS/pnCh5kLKLBCBCg67LTtioHJOdd ervHOwAFNkkJtjt3gfWHlfkVyhaLt2HrRPlAYB8ar3FZ4UmkbEBwPVnN4pSfWWnbtLFU /BFpWNco+DuC8lzUbzMF9cxcxebYR9/zNB+64kmjemVuzhnEJnyOn88/awROGegrY6yH tRB9UYqNkr1Mp5mP4kqvApuWOfiHDO9SiILwDtEOjWKZqouOoAYiZ/q4bhmFL7CLCL/y RO7f+Vnyrn8sJKQHysJvGUQZ1r0293KFzUqCavp3j3EqwIX4RW4ez+TV6oA4uzdFguDF XAbQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R3lsQydi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-91304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 12-20020a63194c000000b005cee9118a7asi9074332pgz.600.2024.03.04.13.41.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 13:41:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-91304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=R3lsQydi; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-91304-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-91304-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 80935288C7A for ; Mon, 4 Mar 2024 21:28:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F12221F92C; Mon, 4 Mar 2024 21:27:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="R3lsQydi" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1966D1F60A; Mon, 4 Mar 2024 21:27:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709587659; cv=none; b=UJTQjP6+Rq+EwaTC60wBFkQQVnoInR0P+0f58Qb8Ec9uqcB+OT8RUeu5N6EAYcaOAcQ3Kb2g88J9h4pdXNi2jwgl9GzA6Dp2AR/OhHGVWpRMgFFcBlcD+q+mNoG9bZL62qp/MtEyIMsynmTPBomRxqDVMR/g0xfpe5eVjMw+rMc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709587659; c=relaxed/simple; bh=UY6mUVzXU4C6/zwtBskI3ysdKqTN2J6STcG/R2urtLI=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=XREsXjMI1h2tKrZVzFKi7mPRbDjxTpirNHCoda38xh0w0gxx9ABsz0ckUpamWTdckC3r5alMtsIAFXTb58pJ3KxHcq7txelvXZJnk00Ml56yJsEwjYvuSsK4lYOSoxqYMltZJcAWPWVoEpYwESPAbiI4QkNfQpU/Q0JD86Wk17I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=R3lsQydi; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 75524C433C7; Mon, 4 Mar 2024 21:27:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709587658; bh=UY6mUVzXU4C6/zwtBskI3ysdKqTN2J6STcG/R2urtLI=; h=From:To:Cc:Subject:Date:From; b=R3lsQydiQPWi5DbHFUwZapv7I50IhUlpLYZSaKykoZ3dmPjxLt5XgfYVal0mIYicQ ZmzjtA5DRR6ua4surkSF3tWeFFMWgIQ91vYAzLqSkJB4m89NJSFKiKpO9vjkNpW2OQ elEvhcN3n47mWEm/EEN/W9e1h3K7g8DLnyQ28ffrXeNjCfAm0F0bvzsXNU+n/t1CsY oPXEpJHQ8PEYP3kJL5ZKF+4bcpsLZtl/E8sAcC3pJhfDyHB2ekNBXNvVSl83KuZ4NL 9SBqKMLJ8P46negLZTlVmXDfmb9ou8VxfhT7SqSX7rM+BFYC5YLVObHtQBxtbvQu3Y MOjPBv4m4sZdA== From: Jarkko Sakkinen To: linux-doc@vger.kernel.org Cc: Jarkko Sakkinen , Jonathan Corbet , "Daniel P . Smith" , Lino Sanfilippo , Jason Gunthorpe , Peter Huewe , James Bottomley , Alexander Steffen , keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, linux-integrity@vger.kernel.org Subject: [PATCH] Documentation: tpm_tis Date: Mon, 4 Mar 2024 23:27:34 +0200 Message-Id: <20240304212734.43213-1-jarkko@kernel.org> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Based recent discussions on LKML, provide preliminary bits of tpm_tis_core dependent drivers. Includes only bare essentials but can be extended later on case by case. This way some people may even want to read it later on. Cc: Jonathan Corbet CC: Daniel P. Smith Cc: Lino Sanfilippo Cc: Jason Gunthorpe Cc: Peter Huewe Cc: James Bottomley Cc: Alexander Steffen Cc: keyrings@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: linux-integrity@vger.kernel.org Signed-off-by: Jarkko Sakkinen --- Documentation/security/tpm/index.rst | 1 + Documentation/security/tpm/tpm_tis.rst | 30 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 Documentation/security/tpm/tpm_tis.rst diff --git a/Documentation/security/tpm/index.rst b/Documentation/security/tpm/index.rst index fc40e9f23c85..f27a17f60a96 100644 --- a/Documentation/security/tpm/index.rst +++ b/Documentation/security/tpm/index.rst @@ -5,6 +5,7 @@ Trusted Platform Module documentation .. toctree:: tpm_event_log + tpm_tis tpm_vtpm_proxy xen-tpmfront tpm_ftpm_tee diff --git a/Documentation/security/tpm/tpm_tis.rst b/Documentation/security/tpm/tpm_tis.rst new file mode 100644 index 000000000000..3cec0216a169 --- /dev/null +++ b/Documentation/security/tpm/tpm_tis.rst @@ -0,0 +1,30 @@ +.. SPDX-License-Identifier: GPL-2.0 + +========================= +TPM FIFO interface Driver +========================= + +FIFO (First-In-First-Out) is the name of the hardware interface used by the +`tpm_tis_core` dependent drivers. The prefix "tis" is named after TPM +Interface Specification, which is the hardware interface specification for +TPM 1.x chips. + +Communication is based on a 5 KiB buffer shared by the TPM chip through a +hardware bus or memory map. The buffer is further split to five equal size +buffers, which provide equivalent sets of registers for communication +between CPU and TPM. The communication end points are called *localities* +in the TCG terminology. + +When a kernel wants to send a commands to the TPM chip, it first reserves +locality 0 by setting `requestUse` bit in `TPM_ACCESS` register. The bit is +cleared by the chip when the access is granted. Once completed its +communication, it sets `activeLocity` bit in the same register. + +Pending localities are served in order by the chip descending orderm and +one at a time: + +- Locality 0 has the lowest priority. +- Locality 5 has the highest priotiy. + +Further information on purpose and meaning of the localities can be found +from section 3.2 of TCG PC Client Platform TPM Profile Specification. -- 2.40.1