From nobody Tue Nov 10 12:02:54 2026 X-Original-To: dev-commits-src-all@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 4jP4zb36xBz6yJ83 for ; Tue, 10 Nov 2026 12:03:07 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jP4zb1Bm2z4q23 for ; Tue, 10 Nov 2026 12:03:07 +0000 (UTC) (envelope-from olivier@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794312187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GOz2VEgnxYb3Jrg2S4ItitYZICsZE6iVHUF+qMlu11o=; b=tqdrETg5psZI/QjZNlKjj9vA4CT+hMiXsTSuJBeIIIf1tHTOQV4oOK0/JQ9Pnwczh9YxCk molFXjmjG6AmkTvrdJ3AP0WSP98KlhhOTe1+ZRd+9ytXZkppRNVmyNOgqsklP7mn4XSzh0 y0YQmK4w/6KC+qJTxLvH3Zqs73v93/UVy9Hd1Erbsg6Mac8wA2YRX29uZiNQku9dJUjtFx yZ6FNMLhXCZTag5AND9gRbK5gNmUL2WuS0ga9FOLc57mjkNkro95fl5WC2x6NtpX78r/BU kNLesSm3RtX5UOfYzv9ubUZTdfsOpA5TVmowzNDTy+Tw2nnavoU1G1JeqMJqVg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1794312187; b=hv/xfSKFOM1R0XGF9P0tXt+XgqMBVQ4yTIJyggelDMoLCTo1O0S+Uzojv6bO00SwnQ6NPH qLLgP8sgy1r/c1quTUNaLiOTg4ZMfnzyFskkN6YfV5ggTscxfR66Q7VrAY7QqF2pnCOqBL Po73tV4qobmUNgw/MNmIf4dQbB9nWoUvdHq1JroTEr+lD0xBkug/JkcRXnTb3ecMs6Kg2M RR0BFx6gpXTEEwkCYVYXCj+irrIXVVUuqy0jOkL3QRYvyaaIIVCXquDaTEr+0aE2wX/RYJ 9TQHMQSAfyjtZfREKSt1DveJ9Aak8lvv/Cp8MZxiKj2MAAqqgSekqiGKGWtVDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1794312187; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GOz2VEgnxYb3Jrg2S4ItitYZICsZE6iVHUF+qMlu11o=; b=LnAttI+/40pid+8DZBa8xKEq8MqcG7puQ1pyYjYLXZMVgLVFIwqnjFkpklIcyyA8LgJUe1 FyY5Di33mr9uTwCX/allkdYcpB9k+PXCjBrkEZr/Pnmcd0ga1lLeWEm0cpDwlmzG6jGWwa /R9HCar0MZ7N/N+SOoPrWuQmS/74xkeu5PiCMR9wRV2Qs5V7JMbNkC3hNAy+I/AKg9GODQ us5JlnVP3cDHjVJJIKakLQwRL1AGrYpU1l9tncV0vMQFuI1M+fUGWaq1o0pjzdRYKxbxR2 9rszzb0IkvdN6f8wS+d2U/x9RsW/5Kdcyuwqv57gCl8zmd3vnn4qjU3nx5RUhA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from mail-oi1-f169.google.com (mail-oi1-f169.google.com [209.85.167.169]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) (Authenticated sender: olivier/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4jP4zZ6Wfrzr0t for ; Tue, 10 Nov 2026 12:03:06 +0000 (UTC) (envelope-from olivier@freebsd.org) Received: by mail-oi1-f169.google.com with SMTP id 5614622812f47-55e02e89f78so567091b6e.0 for ; Tue, 10 Nov 2026 04:03:06 -0800 (PST) X-Forwarded-Encrypted: i=1; AL+hErGOGhzRXi8eoQCGwXIvrNknZOwiD103sWksO/qrVkKlO9bB5GVbTs8n0zoNY47XMU2FaosTj29IDf5GS4RpPsS5ty5Y@freebsd.org X-Gm-Message-State: APuU4Z9tdMyUICQP946KH6uw40Tc45goFhn2myrId2uVhyOXFaenDyte 5PI+MB7M29MfX7sR0AekHqavK7TOqcnpldcfqDOHryNOGEVXinnP/yj3jzNHLgLEj0BPY9virvr pblmSUGUAauPSMHQjCtP+5JUUhqN8zjg= X-Received: by 2002:a05:6808:2443:b0:53c:9db6:3586 with SMTP id 5614622812f47-5683cc0efaamr1669041b6e.17.1794312186223; Tue, 10 Nov 2026 04:03:06 -0800 (PST) List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6aecdfb7.18847.3d7dee3c@gitrepo.freebsd.org> <43e365e3-b9d4-4860-bf83-4790c16b7681@FreeBSD.org> In-Reply-To: <43e365e3-b9d4-4860-bf83-4790c16b7681@FreeBSD.org> From: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Date: Tue, 10 Nov 2026 13:02:54 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AclHuK-Vr_5IhOK_eS-YbNixBOAwudwqs-viR5rXFM03Ty_mZzRrlrjTIUQQBME Message-ID: Subject: Re: git: bfe4be85a935 - main - tpm_crb: wait for idle and locality release after each command To: Michael Tuexen Cc: Kevin Bowling , Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Nov 10, 2026 at 11:28=E2=80=AFAM Michael Tuexen wrote: > > Can you try the following to help dump what is going on? > > Sure. I get: > > Nov 10 11:23:06 fb13 kernel: tpmcrb0: Failed to relinquish locality: > LOC_STATE before=3D0x83 last=3D0x83 LOC_STS=3D0 CTRL_REQ=3D0 CTRL_STS=3D0= x2 > Thanks, so if my understanding is correct (Kevin will confirms if not): 0x83 in binary is 1000 0011: - bit 7 VALID =3D 1: the register contents are meaningful. - bit 1 ASSIGNED =3D 1: a locality is assigned. - bit 0 ESTB (tpmEstablished) =3D 1: a firmware flag, unrelated here. - bits 2 to 4 =3D 0: the assigned locality is locality 0, FreeBSD's. Reading each field: - before=3D0x83 last=3D0x83: the state is the same before the release and 200 ms after it. The TPM still says "locality 0 is assigned". The driver waits for ASSIGNED to clear, which never happens, hence the timeout and the log line every 10 s. - LOC_STS=3D0: the Granted bit is clear. From the per-locality status's point of view, FreeBSD no longer holds the locality. This contradicts LOC_STATE. - CTRL_REQ=3D0: no request is pending. The GO_IDLE sent just before was acknowledged. - CTRL_STS=3D0x2: idle bit set, error bit clear. The TPM is healthy and idl= e. The TPM works fine and handles the release. LOC_STS shows it, and the commands succeed. Only LOC_STATE, the register the driver polls, is never updated on this Pluton firmware. So waiting for LOC_STATE can't work on this hardware. The Linux driver was disabling it too, so let=E2=80=99s do the same on our = side. Here is a proposal of a patch: https://ron-dev.freebsd.org/FreeBSD/src/pulls/102 Sorry for spamming your console log :-( Olivier