diff options
author | Yu-Ping Wu <yupingso@chromium.org> | 2022-08-31 14:52:46 +0800 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-09-04 14:50:00 +0000 |
commit | 74a00b9cec6ce4f1a92d6ade4baa305dbe9e5ffb (patch) | |
tree | aa3fea3174d122f74ad5977b9d26a86cb4707f4c /src | |
parent | 8b45c1244ef0ec0bcddbc5be75273043969161a9 (diff) |
security/vboot/tpm: Avoid duplicate vb2api_secdata_firmware_create calls
For TPM2, vb2api_secdata_firmware_create() is already called from
setup_firmware_space() from _factory_initialize_tpm(). Therefore move
the duplicate call from factory_initialize_tpm() to TPM1's
_factory_initialize_tpm().
Change-Id: I892df65c847e1aeeabef8a7578bec743b639a127
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67219
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/security/vboot/secdata_tpm.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/security/vboot/secdata_tpm.c b/src/security/vboot/secdata_tpm.c index 450c681c06..3ad7fc8a75 100644 --- a/src/security/vboot/secdata_tpm.c +++ b/src/security/vboot/secdata_tpm.c @@ -488,6 +488,7 @@ static uint32_t _factory_initialize_tpm(struct vb2_context *ctx) TPM_PERMANENT_FLAGS pflags; uint32_t result; + vb2api_secdata_firmware_create(ctx); vb2api_secdata_kernel_create_v0(ctx); result = tlcl_get_permanent_flags(&pflags); @@ -558,12 +559,6 @@ static uint32_t factory_initialize_tpm(struct vb2_context *ctx) { uint32_t result; - /* - * Set initial values of secdata_firmware space. - * kernel space is created in _factory_initialize_tpm(). - */ - vb2api_secdata_firmware_create(ctx); - VBDEBUG("TPM: factory initialization\n"); /* |