Page MenuHomeFreeBSD

tpm20: Correct 32-bit register helpers
Needs ReviewPublic

Authored by kbowling on Fri, Aug 28, 1:16 AM.

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

Lint
Lint Skipped
Unit
Tests Skipped