diff options
author | Furquan Shaikh <furquan@chromium.org> | 2017-04-25 22:32:34 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2017-04-28 17:15:46 +0200 |
commit | 00f360e3f1411925e56676bc4b2ec1b961dcde25 (patch) | |
tree | f8cc2e94b5d9c009e8d5bff3d05e6be544e6787d /src/vboot | |
parent | 43c31096965a05bc5ac0da0a7fb701167e9fb68e (diff) |
vboot: Select CONFIG_{TPM,TPM2} only if MOCK_SECDATA is not selected
1. Select CONFIG_{TPM,TPM2} only when MOCK_SECDATA is not selected.
2. Provide tlcl_lib_init for mock TPM case.
BUG=b:37682566
TEST=Verified that when mock TPM is used, CONFIG_TPM is not set
anymore in coreboot config.
Change-Id: If3bdd1528e153b164e9d62ee9cbcc4c3666b8b66
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/19456
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'src/vboot')
-rw-r--r-- | src/vboot/Kconfig | 4 | ||||
-rw-r--r-- | src/vboot/secdata_mock.c | 6 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/vboot/Kconfig b/src/vboot/Kconfig index c5173239ef..4ddf3e3534 100644 --- a/src/vboot/Kconfig +++ b/src/vboot/Kconfig @@ -17,8 +17,8 @@ menu "Verified Boot (vboot)" config VBOOT bool "Verify firmware with vboot." default n - select TPM if !MAINBOARD_HAS_TPM2 - select TPM2 if MAINBOARD_HAS_TPM2 + select TPM if !MAINBOARD_HAS_TPM2 && !VBOOT_MOCK_SECDATA + select TPM2 if MAINBOARD_HAS_TPM2 && !VBOOT_MOCK_SECDATA select TPM_INIT_FAILURE_IS_FATAL if PC80_SYSTEM && LPC_TPM select SKIP_TPM_STARTUP_ON_NORMAL_BOOT if PC80_SYSTEM && LPC_TPM depends on HAVE_HARD_RESET diff --git a/src/vboot/secdata_mock.c b/src/vboot/secdata_mock.c index b53a1969ca..72ee5b3c11 100644 --- a/src/vboot/secdata_mock.c +++ b/src/vboot/secdata_mock.c @@ -34,6 +34,7 @@ #include <antirollback.h> #include <stdlib.h> +#include <tpm_lite/tlcl.h> #include <vb2_api.h> uint32_t tpm_extend_pcr(struct vb2_context *ctx, int pcr, @@ -77,3 +78,8 @@ uint32_t antirollback_write_space_rec_hash(const uint8_t *data, uint32_t size) { return TPM_SUCCESS; } + +uint32_t tlcl_lib_init(void) +{ + return VB2_SUCCESS; +} |