1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

tpm: Add a few new commands for v1

These are needed for the 2018 version of Chromium OS vboot. Add an
implementation for TPM v1, with v2 to come later.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2018-10-01 12:22:29 -06:00
parent 34a5e8a2f1
commit 6e64ec1256
3 changed files with 93 additions and 18 deletions

View File

@@ -62,14 +62,6 @@ static uint32_t tpm_get_flags(uint8_t *disable, uint8_t *deactivated,
return 0;
}
static uint32_t tpm_set_global_lock(void)
{
uint32_t x;
debug("TPM: Set global lock\n");
return tpm_nv_write_value(INDEX0, (uint8_t *)&x, 0);
}
static uint32_t tpm_nv_write_value_lock(uint32_t index)
{
debug("TPM: Write lock 0x%x\n", index);
@@ -77,13 +69,6 @@ static uint32_t tpm_nv_write_value_lock(uint32_t index)
return tpm_nv_write_value(index, NULL, 0);
}
static uint32_t tpm_nv_set_locked(void)
{
debug("TPM: Set NV locked\n");
return tpm_nv_define_space(TPM_NV_INDEX_LOCK, 0, 0);
}
static int tpm_is_owned(void)
{
uint8_t response[TPM_PUBEK_SIZE];