From nobody Mon Nov 23 07:39:02 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 4jXyVt2kw4z72ByM for ; Mon, 23 Nov 2026 07:39:02 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jXyVt288kz4k8X for ; Mon, 23 Nov 2026 07:39:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795419542; 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=RQ23kWUm+uGIeYl3yHDHEantYDFOnURoDL0GgZ29ZuM=; b=yFfEpMFell5yCDIxtmlCWMNWJnS2aPhuOy7Vdbrn6itSPcfKnBqZipzKz0DLTV9j9cpaU0 JRfiq7oT+QPiBVDBN5gLBIx1+aiHYQsm/Mh3hnkFr43k14VPEzQ8YxkzA0oQeutG969YUo 6Grr5sLl6bJv8nDiyKi3LFGuf+OElL/+mDQOFFPfEfRAUVr1E2DE8FA1dIyQ+qV6jLL7ar 4rElt4R3NwPHz2Qyn4YOJ0W3gmOwGMS4PkImScG78HSvPjciZrkJ3TTSPK8kEXB9U+TA3X 0n9GVNgJm8OawswccXV7tnGTgRBX3wxbBrjv+Jcn76ENXLXC6N+ISImnp5qNIQ== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1795419542; b=gKByIjGxkFYcFKI3BeUJ7UVT+OJgyggJSb3pQihzY0X/P/Qy7T5DyAbgIWwiArLds9AbbZ iFrKzjMBY+TLmfeT+Wh2UYh3RB6X0kcnfvnGnYrkWbaTA4gwpqhX5j+I2+EpigMMTfAOUh kVWJR87wj0r84PI20N8jE0yoCI392RsX9fftypAcuGEgnCaT51lvqgIngCLh0NbgPmFmC1 BYM/dBuUNISiyqns8Kska8YhyFDfodXFtxQxddtSeKi/ySG3VLnnEb020rB694p17hmguM QqWfIGvuEGBbrKn+Cgj2wW8+ycwcS4pOTeb8d0Lsx+SxYD8QexXODH+2sTvbiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1795419542; 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=RQ23kWUm+uGIeYl3yHDHEantYDFOnURoDL0GgZ29ZuM=; b=ZdVsumNjNhmZwzhunr2Ck5qBUAw+b1EcrnYj8elu2idlFtek72Dr3rAuh3GcXg3ZvGI7dK vXcFMF8sDqHMRSfj5abwXkfnn4utmapwcZFXIsIES1ZJlAN2US7hYy9+0uadAVnIXr4o9L nc4ZvR9kyqMq/RilS+qg1/Rw5GcgsrZOCyMEucmoRAZelzjQOuTCGnb1MJQxurye22Etaj bI4llQ06DiPYc84gr+DrH6pyYphs7j/C+ht10z2aytYKLS35meahlAwSJ4Cp0lS6eV12KJ i3S1YX8oxTShC5NDvN+bpxDZWW4wPNnnu/m89RUgutBzqQsonIgO4wDNg8BMzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4jXyVt1ptTzhqJ for ; Mon, 23 Nov 2026 07:39:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id ba00 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 23 Nov 2026 07:39:02 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Cochard Subject: git: a343fc0ad029 - main - tpm: crb: Do not attach when no CRB interface answers 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 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: a343fc0ad029ad569919c8d500f72566acf9b66e Auto-Submitted: auto-generated Date: Mon, 23 Nov 2026 07:39:02 +0000 Message-Id: <6b03ed96.ba00.446f06ae@gitrepo.freebsd.org> The branch main has been updated by olivier: URL: https://cgit.FreeBSD.org/src/commit/?id=a343fc0ad029ad569919c8d500f72566acf9b66e commit a343fc0ad029ad569919c8d500f72566acf9b66e Author: Olivier Cochard AuthorDate: 2026-11-22 20:41:26 +0000 Commit: Olivier Cochard CommitDate: 2026-11-23 07:33:46 +0000 tpm: crb: Do not attach when no CRB interface answers Some firmware describes a CRB TPM that is not there: a Protectli FW6 with coreboot 4.12 publishes a TPM2 table at 0xfed40000, but no PTT answers and the Intel ME interface is absent too. Every register reads all-ones, so attach failed only after 0.6 s of state timeouts, with ready, idle and locality messages that hid the cause. Check INTF_ID once, as tpm_tis12_probe() does for TPM 1.2. Reviewed by: kbowling Approved by: kbowling MFC after: 1 week Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/128 --- sys/dev/tpm/tpm_crb.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/dev/tpm/tpm_crb.c b/sys/dev/tpm/tpm_crb.c index bf0ff1bae9d4..e846eee8196c 100644 --- a/sys/dev/tpm/tpm_crb.c +++ b/sys/dev/tpm/tpm_crb.c @@ -433,6 +433,15 @@ tpmcrb_attach(device_t dev) return (ENXIO); } + /* Firmware can describe a TPM that is absent, e.g. with the ME off. */ + if (crb_sc->has_locality && + rman_get_size(sc->mem_res) >= TPM_CRB_LOCALITY_SIZE && + bus_read_4(sc->mem_res, TPM_CRB_INTF_ID) == UINT32_MAX) { + device_printf(dev, "No CRB interface at the ACPI address\n"); + tpmcrb_detach(dev); + return (ENXIO); + } + if (!tpmcrb_request_locality(crb_sc, 0)) { device_printf(dev, "Failed to obtain locality\n"); tpmcrb_detach(dev);