Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp309121lqg; Thu, 11 Apr 2024 03:50:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/aHkLSCHk8rcVui1Sn43nelMi1rMM5Ku72oG7SFlEQ5Q67GNl0L5fuL34t1GwgYNWqrrFmPV7y06VXGOsto+OuHRTeb1+j7+m2Xmqvw== X-Google-Smtp-Source: AGHT+IEo4hUrWSWHXQQmyxZ+ENh54hLZsfOB2FwJdzv68b5Kkp9LCBW7ijVkyaOWBZodisJ/RfxZ X-Received: by 2002:a25:3109:0:b0:dcd:97f4:9943 with SMTP id x9-20020a253109000000b00dcd97f49943mr4881141ybx.19.1712832625557; Thu, 11 Apr 2024 03:50:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712832625; cv=pass; d=google.com; s=arc-20160816; b=bxIjiyZPGQbHEIK01S5HdpUDqLV5zVh9l165gKxWMoLPI0+3yHVokHqChMhwPaU/lS tb5EmfRKgBtXZDn/V7g/lrubEX2UyQAWevan4xYVEf+hM5XyQ2C7ZG4HJcmvmj53KLpk L/RezlvFEYSug+wu8mNWHXYPXqdqfq5hpgyVuibclF7J1uaMJrsxcJEmMoXnz5DcpOjx gZWT2zRoixx4yx3bq74qSrnyg2vaQ8eB9L+69LSl2pKiLABI8ZNcu4i4pWN02jr8LErf vXPhjIYNylR3uRmcAfk+V4HX2nzkehWuJAXYmbbs9QYqatM2vSm7IN1FwgrsfjVjBa54 pY+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=0V8AVI188fF5AbLDUaefOD559npRcC/Ay2FvGZtxQ64=; fh=zpu8gKlubga8se1zSLG0YCAJVqwADXdMYzWV1YS+934=; b=DEzUNNXRLa0GpmuhHVPjFhuPDlLxhRhD8RPGb1OygvlXofy9gdc19Yzv+zy9deUOgY HtkhW407XR6sCbMVCtUy6B6HI5BlO1cA3n5okF/hdCPYAJnWQNiy3Z4824Kb106vpasb aMixiOHvjk1AlIUXChj+/orKO7jACBICOclfOP304tHGH1Uw1KKphKnqz/76LuyJD6RV 1Awzx7ou1G6pOs0WJkMsC4XUYCjHZFDFD968MZJxQ63VDOuFDSuUBKBoKPIpNHo5x2Tt h5gLOjSvlICfGgpUcaeYmPhaPke04N6/kswrYkpSD+2R4jqC0C/ps7PjY03uBZxkDvuq v/Pw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="c/gF3M1M"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-140283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140283-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id fb17-20020ad44f11000000b0069b1a4b3a7asi1203032qvb.159.2024.04.11.03.50.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 03:50:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-140283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="c/gF3M1M"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-140283-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-140283-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 39EDE1C225E8 for ; Thu, 11 Apr 2024 10:50:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BA3B7146D79; Thu, 11 Apr 2024 10:50:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="c/gF3M1M" Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 670841E48E; Thu, 11 Apr 2024 10:50:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712832615; cv=none; b=rrfz0jqpIP0BhJKWvaFYu12kcAfnAiT4ZfcHkEGH4rv2lDa+AlIppd1pU9Gu9CGM2PqLdxuLVxSRS0QFsS6q5MkLmGFvjz84shXKwm/aRBbSIxf3FccwHHcvIH3/q0s8IrClPA9l2YPdw5HPL5KQRCtuTQj2xTDREsv9SjroCfg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712832615; c=relaxed/simple; bh=40G/2iJhs7b/9hSb3u6zcH2MWcwO6qO4lwKmJTuf4Ko=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Msn660BqckxQO9m0grJ049l6oZVktQ6Yj7mGzrp9gyek7xCS8ms5dX3S5g3sv0Jz0a/oe3KqDYOx0ia4sjpjNifcmqd4YihZyjcgUH/V5gAe/W1nLOf/oR/roBTR8uBUE3rJ8z+lcKSaMELpbAV95LonU91h0oJSANYRgjgRIF8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=c/gF3M1M; arc=none smtp.client-ip=209.85.214.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1e3c9300c65so48958875ad.0; Thu, 11 Apr 2024 03:50:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712832614; x=1713437414; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=0V8AVI188fF5AbLDUaefOD559npRcC/Ay2FvGZtxQ64=; b=c/gF3M1Mx8qsK02izeo+dBs3ax9p/1XTB/386WOg7gEipYGvlAqoV8oEk9RLPbILuY HPwz++6ftm+qM2UPAxJoB3wnV3Ex7pfxM3HDmIYP+9m6NKaHCyXxMu2XDyhMGn/R6mM+ hgjhu1cGczlNdveKsQvMdvVEmgPfx4yXxPFaNi1u4tUzEZLWJTuwEk/31a3bDox+zpqf V90fHoQTKI260UZZDbEmtXFmYqmT+N/4K0qUhB2WNXlSDeWNGuWSfh/M8yjt7ydzmNlP GSup/s0qRSo9U/gNNES5KPqIRpyovvUqLNJVO+Bjf8uisYKo09XQm0kuPx9yuOpOk7q0 9hzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712832614; x=1713437414; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=0V8AVI188fF5AbLDUaefOD559npRcC/Ay2FvGZtxQ64=; b=jdCKBvIbKfnn+mfFtRCgKCjMWtmPlQ5djPVtYHct7QoiOnmV5TRGgX5LUlcKsNlsXo W7SE48LTaXEcXuiOUwcPHJTPBieeDcIDne+jnhSc1VetQ0nEO7oniw6DVRjT7iWHCdIb xqwPulO9wyXr06kRSgdaXH45wh3yBCgmHuCl/JTqbiHKnA8N5pTIfAIMhfVzaLgwGu86 iwuMt0oDUSe9GNmkZwiqDv4cxlNQ8uWNkg3U8b2K0u0pUcmbRO0WBBABba5UH6/h3C1Z rNaaIqNXEMM0uhnXZ8Da1D6UZiY1zV37Zo0wlyS+9H2pVr7uhveGbEo/ITVFyjgzuHD1 g9rg== X-Forwarded-Encrypted: i=1; AJvYcCXpe7R9OYJamZrl6RrSVa3iP066RvJTRtZzFJGOR9rId4wKlcDJiecU2GEflKGOkgYVyPf/LEHrobhGEi1zSN6foR+zV0rTbJMSJBJK55n2iYWIF79oMAsAVvRw4xf59H2OuStSjsdjbrLx8x5+bq+9neaShT9DaEdIQVgXKlsOYT2tU/ZV1AjS X-Gm-Message-State: AOJu0YwsQ6Lv5/zL8ZU+mcANX5zrsXfHdokNKeFkpnQiqPu5GrscHZ3I OzkWDYhq15YtdH3/cUvS7/dpp5w4srvRA1MDZlQAjG40GvvdpASGyadVmg== X-Received: by 2002:a17:903:18d:b0:1e5:62:7ac0 with SMTP id z13-20020a170903018d00b001e500627ac0mr4509674plg.14.1712832613536; Thu, 11 Apr 2024 03:50:13 -0700 (PDT) Received: from archie.me ([103.124.138.155]) by smtp.gmail.com with ESMTPSA id l6-20020a170902d34600b001def175bbbfsm912997plk.251.2024.04.11.03.50.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Apr 2024 03:50:12 -0700 (PDT) Received: by archie.me (Postfix, from userid 1000) id 106E3184799FF; Thu, 11 Apr 2024 17:50:09 +0700 (WIB) Date: Thu, 11 Apr 2024 17:50:09 +0700 From: Bagas Sanjaya To: Jarkko Sakkinen , linux-integrity@vger.kernel.org Cc: Alexander Steffen , "Daniel P . Smith" , James Bottomley , Jason Gunthorpe , Jonathan Corbet , Lino Sanfilippo , Mimi Zohar , Peter Huewe , Randy Dunlap , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] Documentation: tpm_tis Message-ID: References: <20240409190847.10869-1-jarkko@kernel.org> <20240409190847.10869-3-jarkko@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="QQMkQKtETCXLqH/I" Content-Disposition: inline In-Reply-To: <20240409190847.10869-3-jarkko@kernel.org> --QQMkQKtETCXLqH/I Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 09, 2024 at 10:08:47PM +0300, Jarkko Sakkinen wrote: > diff --git a/Documentation/security/tpm/tpm_tis.rst b/Documentation/secur= ity/tpm/tpm_tis.rst > new file mode 100644 > index 000000000000..b448ea3db71d > --- /dev/null > +++ b/Documentation/security/tpm/tpm_tis.rst > @@ -0,0 +1,46 @@ > +.. SPDX-License-Identifier: GPL-2.0 > + > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > +TPM FIFO interface driver > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > + > +TCG PTP Specification defines two interface types: FIFO and CRB. The for= mer is > +based on sequenced read and write operations, and the latter is based o= n a > +buffer containing the full command or response. > + > +FIFO (First-In-First-Out) interface is used by the tpm_tis_core dependent > +drivers. Originally Linux had only a driver called tpm_tis, which covered > +memory mapped (aka MMIO) interface but it was later on extended to cover= other > +physical interfaces supported by the TCG standard. > + > +For legacy compliance the original MMIO driver is called tpm_tis and the Did you mean "For historical reasons above ..."? > +framework for FIFO drivers is named as tpm_tis_core. The postfix "tis" in > +tpm_tis comes from the TPM Interface Specification, which is the hardware > +interface specification for TPM 1.x chips. > + > +Communication is based on a 20 KiB buffer shared by the TPM chip through= a > +hardware bus or memory map, depending on the physical wiring. The buffer= is > +further split into five equal-size 4 KiB buffers, which provide equivale= nt > +sets of registers for communication between the CPU and TPM. These > +communication endpoints are called localities in the TCG terminology. > + > +When the kernel wants to send commands to the TPM chip, it first reserves > +locality 0 by setting the requestUse bit in the TPM_ACCESS register. The= bit is > +cleared by the chip when the access is granted. Once it completes its > +communication, the kernel writes the TPM_ACCESS.activeLocality bit. This > +informs the chip that the locality has been relinquished. > + > +Pending localities are served in order by the chip in descending order, = one at > +a time: > + > +- Locality 0 has the lowest priority. > +- Locality 5 has the highest priority. > + > +Further information on the purpose and meaning of the localities can be = found > +in section 3.2 of the TCG PC Client Platform TPM Profile Specification. > + > +References > +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > + > +TCG PC Client Platform TPM Profile (PTP) Specification > +https://trustedcomputinggroup.org/resource/pc-client-platform-tpm-profil= e-ptp-specification/ Other than that, Reviewed-by: Bagas Sanjaya --=20 An old man doll... just what I always wanted! - Clara --QQMkQKtETCXLqH/I Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSSYQ6Cy7oyFNCHrUH2uYlJVVFOowUCZhfAXQAKCRD2uYlJVVFO oyTWAQDDh/ybYEQfUhhhVix+XJRKnyJS+qX3oVhOtCnaV4rdbwD/T7FQM2fd19g6 yntkKwA+0kOawAxi5rYvOITeNGaiTwo= =eLHn -----END PGP SIGNATURE----- --QQMkQKtETCXLqH/I--