From nobody Fri Jun 26 19:57:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gn5zl6kGGz6hndk for ; Fri, 26 Jun 2026 19:57:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gn5zl6CvMz3kCC for ; Fri, 26 Jun 2026 19:57:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782503827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gwQLJ3n6xTlxs4ukgfcO6x9rmjbXaSlla6GgqxhEfBw=; b=hbYszwKuKhRo16F+e1QrRePhuj0B3iN0PuPIw5+3Sobl4W/y1+k1haRTBWOjZeEaQM77jW te2rYAwcdfV7qpTv2zot759Sl6fjPGfWIayBOoSRM9uZ7Zdu1LgHiKcOJeo84iCIKgGPzN IbASdfdQVp1X8iOuhKZFGnaowyIahHTJk/i6KXy5hXezjgX3mg5avXatETqbu0HExj7wbc JHieb1bc8CHnMFTh8A+PXMBQNC0fIkGG6BjQ6zowhXweV09scJCwZTB17mfCDYb7uWLZ6M yoW1e/VRvxHjoOjb8wcXV0E3KsqmF4IleBUo54Au802f8CjfP0BWGZgjJiuK9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1782503827; a=rsa-sha256; cv=none; b=byUDiBleD9w7cDVZSa+P4k6YdgqIxnQT5xrTQkaPi0ssmSXn2qoGZjkbpAlsQL6qHY1h3C glPA1zoi+gvz5cdR3kAgk/fxR1cIHBwajINYpdxas3R1jtNWngz3Xk9OfNdkB1oKyVBOwH zEnuMCnmMNv5/Hhog9ApNTQbidx+8fjmHM+NqyZaLbHwW43Rstc181bidsTJ5/NB/AQMod zfEDt6wnMISwzmz4dixmgPfe9tZczvKOa2lXokXDNf2a1pdwFWritS+AMnImE9soEjIcqs bw3K//chkDMbuMJOGbHWUi4Ds6kYFZrFlADi94WHvH9K9eM5bNMasS6SsatHwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1782503827; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gwQLJ3n6xTlxs4ukgfcO6x9rmjbXaSlla6GgqxhEfBw=; b=qgqaAPxBzWy1bbfEQNB9fXkt+1pV8NHvT82mcx78aXl5U3xyA1bM12Jr5QGuopDnFtZ2xI ITaeJyypN1CjvFsyTn8HiydJkKZ/IoH5hFUEjAw+sdVdm9eS+ctBiVgrB/gl0XWtoSI79N H+d6ZDf8uPgEmfM6z+Wh3j3dxY05mo2rkR+OXR6HNwx63nvoowWaoIbPwDTF53w33/wO2W fR/UebqH+XE1Lq996tTXRgGGgPdg1e1aYMU5rFFMP9Tc8069/iTgx5hDBl6ps072fWL8G2 1f8zD1HkFRgg7lMzWLTyEA9bQPzGYZIiVZLbHiC9J99iVUUkqH+4kinBh05GVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gn5zl515FzsHJ for ; Fri, 26 Jun 2026 19:57:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 474a8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 26 Jun 2026 19:57:07 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: e4c50d86796d - main - tpm_tis: release TPM resources after reading response List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olivier X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4c50d86796d07cf90e6a683234e1c0e9ca5e03c Auto-Submitted: auto-generated Date: Fri, 26 Jun 2026 19:57:07 +0000 Message-Id: <6a3ed993.474a8.75a7d669@gitrepo.freebsd.org> The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=e4c50d86796d07cf90e6a683234e1c0e9ca5e03c commit e4c50d86796d07cf90e6a683234e1c0e9ca5e03c Author: Olivier Cochard AuthorDate: 2026-06-26 19:20:30 +0000 Commit: Olivier Cochard CommitDate: 2026-06-26 19:56:17 +0000 tpm_tis: release TPM resources after reading response Per TIS 1.3 section 5.6.12, write commandReady to TPM_STS after reading the response so the TPM can free its ReadFIFO and other internal resources. The subsequent tpmtis_go_ready() provides the second write the spec describes and waits for the state transition. PR: 295103 Reported by: Benoit Sansoni Reviewed by: kevans Approved by: kevans Differential Revision: https://reviews.freebsd.org/D57841 --- sys/dev/tpm/tpm_tis_core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/sys/dev/tpm/tpm_tis_core.c b/sys/dev/tpm/tpm_tis_core.c index f49a1f982e82..95e914fa570b 100644 --- a/sys/dev/tpm/tpm_tis_core.c +++ b/sys/dev/tpm/tpm_tis_core.c @@ -474,6 +474,16 @@ tpmtis_transmit(device_t dev, struct tpm_priv *priv, size_t length) "Failed to read response\n"); return (EIO); } + + /* + * Per TIS 1.3 section 5.6.12, write commandReady after reading the + * response so the TPM can free the ReadFIFO and other internal + * resources. The next tpmtis_go_ready() provides the second + * write the spec mentions, and waits for the state transition, + * so no wait is needed here. + */ + TPM_WRITE_4(sc->dev, TPM_STS, TPM_STS_CMD_RDY); + TPM_WRITE_BARRIER(sc->dev, TPM_STS, 4); tpmtis_relinquish_locality(sc); priv->offset = 0; priv->len = bytes_available;