summaryrefslogtreecommitdiff
path: root/src/security/vboot
diff options
context:
space:
mode:
authorYu-Ping Wu <yupingso@chromium.org>2022-08-31 14:52:46 +0800
committerMartin L Roth <gaumless@gmail.com>2022-09-04 14:50:00 +0000
commit74a00b9cec6ce4f1a92d6ade4baa305dbe9e5ffb (patch)
treeaa3fea3174d122f74ad5977b9d26a86cb4707f4c /src/security/vboot
parent8b45c1244ef0ec0bcddbc5be75273043969161a9 (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/security/vboot')
-rw-r--r--src/security/vboot/secdata_tpm.c7
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");
/*