]> git.baikalelectronics.ru Git - uboot.git/commit
sandbox: tpm: Correct handling of SANDBOX_TPM_PCR_NB
authorSimon Glass <sjg@chromium.org>
Sun, 18 Jul 2021 20:18:05 +0000 (14:18 -0600)
committerSimon Glass <sjg@chromium.org>
Sun, 1 Aug 2021 15:05:24 +0000 (09:05 -0600)
commite7f880354a7d0bc3d4817d8c3d5221c0d5adbed9
treed1df2ae2383a02c0f3313bdd4bc43b1e612708df
parenta3a9663c21d04b30ba431c79145bbab1fc7fe15a
sandbox: tpm: Correct handling of SANDBOX_TPM_PCR_NB

This is the number of PCRs, so the current check is off by one. Also the
map itself should not be checked, just the resulting pcr_index, to avoid
confusing people who read the code.

Fix these problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
drivers/tpm/tpm2_tis_sandbox.c