diff options
author | Stefan Berger <stefanb@linux.vnet.ibm.com> | 2015-05-26 16:51:05 -0400 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2015-05-31 20:29:02 +0200 |
commit | 116694c34aa794a994051fce55bfee418fe1521d (patch) | |
tree | a39a2b1c07f50854b990705b347b8e2f2f73a6d9 /backends | |
parent | 38d40ff10f71657ea913a63d1f8477be368b92c1 (diff) |
Extend TPM TIS interface to support TPM 2
Following the recent upgrade to version 1.3, extend the TPM TIS
interface with capabilities introduced for support of a TPM 2.
TPM TIS for TPM 2 introduced the following extensions beyond the
TPM TIS 1.3 (used for TPM 1.2):
- A new 32bit interface Id register was introduced.
- New flags for the status (STS) register were defined.
- New flags for the capability flags were defined.
Support the above if a TPM TIS 1.3 for TPM 2 is used with a TPM 2
on the backend side. Support the old TPM TIS 1.3 configuration if a
TPM 1.2 is being used. A subsequent patch will then determine which
TPM version is being used in the backend.
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'backends')
-rw-r--r-- | backends/tpm.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/backends/tpm.c b/backends/tpm.c index 36c5d46f0a..f3ab3b30bd 100644 --- a/backends/tpm.c +++ b/backends/tpm.c @@ -96,6 +96,20 @@ bool tpm_backend_get_tpm_established_flag(TPMBackend *s) return k->ops->get_tpm_established_flag(s); } +int tpm_backend_reset_tpm_established_flag(TPMBackend *s, uint8_t locty) +{ + TPMBackendClass *k = TPM_BACKEND_GET_CLASS(s); + + return k->ops->reset_tpm_established_flag(s, locty); +} + +TPMVersion tpm_backend_get_tpm_version(TPMBackend *s) +{ + TPMBackendClass *k = TPM_BACKEND_GET_CLASS(s); + + return k->ops->get_tpm_version(s); +} + static bool tpm_backend_prop_get_opened(Object *obj, Error **errp) { TPMBackend *s = TPM_BACKEND(obj); |