Re: git: bfe4be85a935 - main - tpm_crb: wait for idle and locality release after each command
Date: Tue, 10 Nov 2026 12:02:54 UTC
On Tue, Nov 10, 2026 at 11:28 AM Michael Tuexen <tuexen@freebsd.org> 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=0x83 last=0x83 LOC_STS=0 CTRL_REQ=0 CTRL_STS=0x2 > Thanks, so if my understanding is correct (Kevin will confirms if not): 0x83 in binary is 1000 0011: - bit 7 VALID = 1: the register contents are meaningful. - bit 1 ASSIGNED = 1: a locality is assigned. - bit 0 ESTB (tpmEstablished) = 1: a firmware flag, unrelated here. - bits 2 to 4 = 0: the assigned locality is locality 0, FreeBSD's. Reading each field: - before=0x83 last=0x83: 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=0: 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=0: no request is pending. The GO_IDLE sent just before was acknowledged. - CTRL_STS=0x2: idle bit set, error bit clear. The TPM is healthy and idle. 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’s 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