tpm2: implement tlcl_force_clear and use it before factory initialization
tlcl_force_clear() needs to be issued each time when the device mode
switches between normal/development/recovery.
This patch adds command implementation using TPM_Clear TPM2 command,
and also invokes it before factory initialization.
BRANCH=none
BUG=chrome-os-partner:50645
TEST=verified that TPM_Clear command succeeds at factory startup and
the boot proceeds normally.
Change-Id: I2a0e62527ad46f9dd060afe5e75c7e4d56752849
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/358095
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
This commit is contained in:
parent
36317f5e85
commit
347ff17b97
2 changed files with 10 additions and 1 deletions
|
|
@ -81,7 +81,15 @@ uint32_t tlcl_finalize_physical_presence(void)
|
|||
|
||||
uint32_t tlcl_force_clear(void)
|
||||
{
|
||||
printk(BIOS_INFO, "%s:%s:%d\n", __FILE__, __func__, __LINE__);
|
||||
struct tpm2_response *response;
|
||||
|
||||
response = tpm_process_command(TPM2_Clear, NULL);
|
||||
printk(BIOS_INFO, "%s: response is %x\n",
|
||||
__func__, response ? response->hdr.tpm_code : -1);
|
||||
|
||||
if (!response || response->hdr.tpm_code)
|
||||
return TPM_E_IOERROR;
|
||||
|
||||
return TPM_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue