Page MenuHomeFreeBSD

tpm20: Correct 32-bit register helpers
ClosedPublic

Authored by kbowling on Fri, Aug 28, 1:16 AM.
Tags
None
Referenced Files
F172418301: D59244.diff
Fri, Sep 18, 8:23 AM
Unknown Object (File)
Thu, Sep 17, 4:18 PM
Unknown Object (File)
Thu, Sep 17, 1:02 PM
Unknown Object (File)
Tue, Sep 15, 7:16 AM
Unknown Object (File)
Tue, Sep 15, 1:41 AM
Unknown Object (File)
Mon, Sep 14, 11:08 PM
Unknown Object (File)
Mon, Sep 14, 6:19 PM
Unknown Object (File)
Mon, Sep 14, 5:00 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