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>
This commit is contained in:
Furquan Shaikh 2017-04-25 22:32:34 -07:00 committed by Martin Roth
parent 43c3109696
commit 00f360e3f1
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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;
}