Skip to content
Permalink
Browse files

DM: remove unused function swtpm_reset_tpm_established_flag

Change-Id: I8253df84ef490418e37ac3d565dcdc7bb8123f3b
Tracked-On: #3123
Signed-off-by: Ying Liu <ying2.liu@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
  • Loading branch information...
ying2liu authored and acrnsi committed May 22, 2019
1 parent 2a33d52 commit 4e7703161e75fe10b4210a86ab17457a34742a60
Showing with 0 additions and 28 deletions.
  1. +0 −25 devicemodel/hw/platform/tpm/tpm_emulator.c
  2. +0 −3 devicemodel/hw/platform/tpm/tpm_internal.h
@@ -762,31 +762,6 @@ bool swtpm_get_tpm_established_flag(void)
return tpm_context.established_flag;
}

int swtpm_reset_tpm_established_flag(void)
{
ptm_reset_est reset_est;
ptm_res res;

reset_est.u.req.loc = tpm_context.cur_locty_number;
if (swtpm_ctrlcmd(tpm_context.ctrl_chan_fd, CMD_RESET_TPMESTABLISHED,
&reset_est, sizeof(reset_est),
sizeof(reset_est), NULL, 0) < 0) {
printf("swtpm: Could not reset the establishment bit: %s",
strerror(errno));
return -1;
}

res = __builtin_bswap32(reset_est.u.resp.tpm_result);
if (res) {
printf("swtpm: TPM result for rest establixhed flag: 0x%x", res);
return -1;
}

tpm_context.established_flag_cached = 0;

return 0;
}

void swtpm_cancel_cmd(void)
{
ptm_res res = 0;
@@ -36,9 +36,6 @@ void deinit_tpm_emulator(void);
/* Send Ctrl channel command CMD_GET_TPMESTABLISHED to SWTPM */
bool swtpm_get_tpm_established_flag(void);

/* Send Ctrl channel command CMD_RESET_TPMESTABLISHED to SWTPM */
int swtpm_reset_tpm_established_flag(void);

/* Send TPM2 command request to SWTPM by using Cmd channel */
int swtpm_handle_request(TPMCommBuffer *cmd);

0 comments on commit 4e77031

Please sign in to comment.
You can’t perform that action at this time.