Page MenuHomeFreeBSD

Fix bug in TPM 2.0 TIS driver.
ClosedPublic

Authored by darrick.freebsd_gmail.com on Jan 8 2020, 2:37 AM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 21 2024, 4:16 AM
Unknown Object (File)
Oct 14 2024, 1:45 PM
Unknown Object (File)
Oct 12 2024, 10:32 AM
Unknown Object (File)
Oct 9 2024, 5:28 PM
Unknown Object (File)
Sep 30 2024, 4:38 PM
Unknown Object (File)
Sep 29 2024, 8:47 AM
Unknown Object (File)
Sep 26 2024, 11:11 PM
Unknown Object (File)
Sep 7 2024, 6:08 PM
Subscribers

Details

Summary

tpmtis_go_ready() reads the value of the TPM_STS register and ORs TPM_STS_CMD_READY to the existing value and writes it back to the register. However, the TPM Profile (PTP) specification states that only one bit in the write request value may be set to 1, or else the entire write request is ignored.

Also removed call which clears the TPM_STS_CMD_READY flag in the same call. It was being ignored for the same reasons.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

(I suspect all of these AND4/OR4 constructs are dubious and should be removed in favor of explicit AND/ORing as necessary, but that's a larger cleanup than fixing the bug.)

This revision is now accepted and ready to land.Jan 8 2020, 2:55 AM
This revision was automatically updated to reflect the committed changes.