Page MenuHomeFreeBSD

tpm20: Correct 32-bit register helpers
ClosedPublic

Authored by kbowling on Aug 28 2026, 1:16 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Oct 8, 4:37 PM
Unknown Object (File)
Wed, Oct 7, 12:29 AM
Unknown Object (File)
Tue, Oct 6, 10:39 PM
Unknown Object (File)
Tue, Oct 6, 9:24 PM
Unknown Object (File)
Tue, Oct 6, 8:48 PM
Unknown Object (File)
Thu, Oct 1, 3:37 PM
Unknown Object (File)
Tue, Sep 29, 5:22 PM
Unknown Object (File)
Tue, Sep 29, 1:24 PM
Subscribers

Details

Summary
OR4() reads only the low byte before writing the complete 32-bit
register.  Preserve all register bits by using a matching 32-bit read.

Make BIT() produce an unsigned value so masks containing bit 31 do not
rely on a signed left shift into the sign bit.

MFC after:      2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable