Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Jan 2025 15:49:15 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 283877] Trusted Platform Module driver fails to initialize firmware TPM
Message-ID:  <bug-283877-227-a2D2BwADfk@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-283877-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-283877-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D283877

--- Comment #4 from Brett <vbasiccd@msn.com> ---
Using my Dell E7450, I uncommented the "define TPM_DEBUG" line and compiled=
 my
version of the GENERIC kernel.  The only change I made was to add "define T=
PM"
to the kernel config.  However, the compile failed with the following lines:

/usr/src/sys/dev/tpm/tpm.c:863:45: error: format specifies type 'int' but t=
he
argument has type 'size_t' (aka 'unsigned long') [-Werror,-Wformat]
  863 |         printf("tpm_tis12_write: wrote %d byte\n", cnt);
      |                                        ~~          ^~~
      |                                        %zu
/usr/src/sys/dev/tpm/tpm.c:1197:48: error: format specifies type 'int' but =
the
argument has type 'ssize_t' (aka 'long') [-Werror,-Wformat]
 1197 |         printf("tpmread: len %d, io count %d\n", len, uio->uio_resi=
d);
      |                                           ~~          ^~~~~~~~~~~~~~
      |                                           %zd
/usr/src/sys/dev/tpm/tpm.c:1203:51: error: format specifies type 'unsigned =
int'
but the argument has type 'ssize_t' (aka 'long') [-Werror,-Wformat]
 1203 |                 printf("tpmread: bad residual io count 0x%x\n",
uio->uio_resid);
      |                                                          ~~=20=20=
=20=20
^~~~~~~~~~~~~~
      |                                                          %zx
/usr/src/sys/dev/tpm/tpm.c:1254:36: error: format specifies type 'int' but =
the
argument has type 'ssize_t' (aka 'long') [-Werror,-Wformat]
 1254 |         printf("tpmwrite: io count %d\n", uio->uio_resid);
      |                                    ~~     ^~~~~~~~~~~~~~
      |                                    %zd


I made the requested changes to the printf statements, and the kernel compi=
le
completed successfully.  After rebooting, I did not find any debug statemen=
ts
from "sysctl -a" or "dmesg -a".  I even did a full shutdown so the laptop c=
an
boot cold, but that still did not produce any debug output.  Do note that in
the /boot/device.hints file, I commented out the lines recommended by the t=
pm
driver during my earlier troubleshooting.  When those were active, that was
causing the "tpm2" in my initial bug report.  Now that those lines are not
active, the output reports "tpm0".

sysctl -a | grep tpm
tpm0: <Trusted Platform Module> on acpi0
device_attach: tpm0 attach returned 6
tpm0: <Trusted Platform Module> on acpi0
device_attach: tpm0 attach returned 6
device  tpm
dev.tpm.%parent:=20

dmesg -a | grep tpm
tpm0: <Trusted Platform Module> on acpi0
device_attach: tpm0 attach returned 6
tpm0: <Trusted Platform Module> on acpi0
device_attach: tpm0 attach returned 6

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-283877-227-a2D2BwADfk>