tpm: report firmware version

Hardware / Coreboot - Vadim Bendebury [chromium.org] - 11 July 2016 17:26 UTC

Some devices allow to retrieve firmware version by reading the same 4 byte register repeatedly until the entire version string is read.

Let's print out TPM firmware version when available. Just in case something goes wrong limit the version string length to 200 bytes.

CQ-DEPEND=CL:355701 BRANCH=none BUG=chrome-os-partner:54723 TEST=built the new firmware and ran it on Gru, observed the following in the coreboot console log:

Connected to device vid:did:rid of 1ae0:0028:00 Firmware version: cr50_v1.1.4792-7a44484

Original-Commit-Id: 1f54a30cebe808abf1b09478b47924bb722a0ca6 Original-Change-Id: Idb069dabb80d34a0efdf04c3c40a42ab0c8a3f94

58826fc tpm: report firmware version
src/drivers/spi/tpm/tpm.c | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)

Upstream: review.coreboot.org


  • Share