https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283877

--- Comment #4 from Brett <vbasi...@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 TPM"
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 the
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_resid);
      |                                           ~~          ^~~~~~~~~~~~~~
      |                                           %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);
      |                                                          ~~    
^~~~~~~~~~~~~~
      |                                                          %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 compile
completed successfully.  After rebooting, I did not find any debug statements
from "sysctl -a" or "dmesg -a".  I even did a full shutdown so the laptop can
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 tpm
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: 

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

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

Reply via email to