DM: Support TPM2 CRB device virtualization

Full virtualized TPM CRB device.

The TPM CRB module will handle TPM2 MMIO access. It will forward
the command/data to TPM emulator for command processing if there
is a valid TPM command.

Tracked-On: #1924
Signed-off-by: Qi Yadong <yadong.qi@intel.com>
Reviewed-by: Zhu Bing <bing.zhu@intel.com>
Reviewed-by: Jason Chen CJ <jason.cj.chen@intel.com>
Acked-by: Yin Fengwei <fengwei.yin@intel.com>
This commit is contained in:
Qi Yadong
2018-08-14 10:02:52 +08:00
committed by lijinxia
parent 4b83e37c7a
commit 7df90a2527
5 changed files with 610 additions and 0 deletions

View File

@@ -48,4 +48,11 @@ int swtpm_startup(size_t buffersize);
/* Cancellation of the current TPM2 command */
void swtpm_cancel_cmd(void);
/* APIs by tpm_crb.c */
/* Initialize TPM CRB Virtual Device */
int init_tpm_crb(struct vmctx *ctx);
/* Deinitialize TPM CRB Virtual Device */
void deinit_tpm_crb(struct vmctx *ctx);
#endif