For the boards that intend to use mock tpm and have recovery mrc cache support enabled, provide mock functions to read and write mrc hash space. Reading MRC hash space returns TPM_SUCCESS as later checks take care of comparing the hash value and retraining if hash comparison fails. Thus, in case of mock tpm, device would always end up doing the memory retraining in recovery mode. BUG=chrome-os-partner:62413 BRANCH=None TEST=Verified that eve builds with mock tpm selected. Change-Id: I7817cda7821fadeea0e887cb9860804256dabfd9 Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://review.coreboot.org/18248 Tested-by: build bot (Jenkins) Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
54 lines
1.1 KiB
C
54 lines
1.1 KiB
C
/* Copyright (c) 2015 The Chromium OS Authors. All rights reserved.
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
* found in the LICENSE file.
|
|
*
|
|
* Functions for querying, manipulating and locking rollback indices
|
|
* stored in the TPM NVRAM.
|
|
*/
|
|
|
|
#include <antirollback.h>
|
|
#include <stdlib.h>
|
|
#include <vb2_api.h>
|
|
|
|
uint32_t tpm_extend_pcr(struct vb2_context *ctx, int pcr,
|
|
enum vb2_pcr_digest which_digest)
|
|
{
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
uint32_t tpm_clear_and_reenable(void)
|
|
{
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
uint32_t antirollback_read_space_firmware(struct vb2_context *ctx)
|
|
{
|
|
vb2api_secdata_create(ctx);
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
uint32_t antirollback_write_space_firmware(struct vb2_context *ctx)
|
|
{
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
uint32_t antirollback_lock_space_firmware()
|
|
{
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
uint32_t antirollback_lock_space_rec_hash(void)
|
|
{
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
uint32_t antirollback_read_space_rec_hash(uint8_t *data, uint32_t size)
|
|
{
|
|
return TPM_SUCCESS;
|
|
}
|
|
|
|
uint32_t antirollback_write_space_rec_hash(const uint8_t *data, uint32_t size)
|
|
{
|
|
return TPM_SUCCESS;
|
|
}
|