diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2018-02-14 19:51:48 -0500 |
---|---|---|
committer | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2018-02-21 07:24:50 -0500 |
commit | adb0e917e6ee93631e40265ca145bc31cd3b6c9a (patch) | |
tree | 4586a5c8e57d322cde0c44ff92a4bbc3ea414152 /tests/tpm-emu.c | |
parent | 0e6ca9547bd4f2735fa2b20f103a7aecd38e0abd (diff) |
tests: add test for TPM TIS device
Move the TPM TIS related register and flag #defines into
include/hw/acpi/tpm.h for access by the test case.
Write a test case that covers the TIS functionality.
Add the tests cases to the MAINTAINERS file.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Diffstat (limited to 'tests/tpm-emu.c')
-rw-r--r-- | tests/tpm-emu.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/tpm-emu.c b/tests/tpm-emu.c index cbb92afc8f..4dada76834 100644 --- a/tests/tpm-emu.c +++ b/tests/tpm-emu.c @@ -155,6 +155,13 @@ void *tpm_emu_ctrl_thread(void *data) qio_channel_write(ioc, (char *)&loc, sizeof(loc), &error_abort); break; } + case CMD_GET_TPMESTABLISHED: { + ptm_est est = { + .u.resp.bit = 0, + }; + qio_channel_write(ioc, (char *)&est, sizeof(est), &error_abort); + break; + } default: g_debug("unimplemented %u", cmd); g_assert_not_reached(); |