Attention is currently required from: Raul Rangel, Tim Wawrzynczak, Julius Werner, Andrey Pronin, Karthik Ramasubramanian. Karthik Ramasubramanian has uploaded a new patch set (#4) to the change originally created by Tim Wawrzynczak. ( https://review.coreboot.org/c/coreboot/+/58669 )
Change subject: security/vboot: Use default kernel secdata size ......................................................................
security/vboot: Use default kernel secdata size
When fetching antirollback information for the kernel, it is not always known ahead of time what the current size of the kernel secdata area is. If the incorrect size is passed, the TPM will return back the correct size, but at the cost of an extra transaction; when using cr50 over I2C, this can be as much as 20ms. Currently, the first attempt uses the minimium size (aka version 0 or 0.2), and if another size is used (which is the case for all modern cr50-based boards, version 1 or 1.0), then a transaction is wasted on every boot.
Therefore, change the default size sent to the TPM to be the default one used in the VB2 API instead of the minimum one.
BUG=b:201304784 TEST=verify TPM initialization time drops by ~20ms. Also the Kernel NV Index is read correctly in the BIOS logs.
src/security/tpm/tss/tcg-2.0/tss.c:231 index 0x1007 return code 0 src/security/tpm/tss/tcg-2.0/tss.c:231 index 0x1008 return code 0
504:finished TPM initialization 99,953 (65,606)
Change-Id: I22d9c0079bb1175f24ff7317d116e79aa5ba08ed Signed-off-by: Tim Wawrzynczak twawrzynczak@chromium.org Signed-off-by: Karthikeyan Ramasubramanian kramasub@google.com --- M src/security/vboot/secdata_tpm.c 1 file changed, 15 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/58669/4