From: Ning S. <nin...@in...> - 2017-07-24 21:40:26
|
changeset e57efe410a90 in /hg/p/tboot/code details: http://hg.code.sf.net/p/tboot/code/code?cmd=changeset;node=e57efe410a90 description: Reset debug PCR16 to zero. PCR16 is used to identify TPM2.0 supported banks and hash algorithms. Upon successful execution, TPM2_PCR_Event command will extend a hashed value in each discovered bank of PCR16. PCR16 needs to be reset to zero after this discovery. Signed-off-by: Ning Sun <nin...@in...> diffstat: tboot/common/tpm_20.c | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diffs (16 lines): diff -r cc6686dc24df -r e57efe410a90 tboot/common/tpm_20.c --- a/tboot/common/tpm_20.c Fri Jul 21 02:18:02 2017 -0700 +++ b/tboot/common/tpm_20.c Mon Jul 24 05:34:17 2017 -0700 @@ -2555,6 +2555,12 @@ for (unsigned int i=0; i<ti->alg_count; i++) printk(TBOOT_INFO"tboot: hash alg = %08X\n", ti->algs[i]); + /* reset debug PCR 16 */ + if (!tpm20_pcr_reset(ti, ti->cur_loc, 16)){ + printk(TBOOT_WARN"TPM: tpm20_pcr_reset failed...\n"); + return false; + } + if (handle2048 != 0) goto out; |