summaryrefslogtreecommitdiffstats
path: root/include/sysemu/tpm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sysemu/tpm.h')
-rw-r--r--include/sysemu/tpm.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h
index 848df41..c143890 100644
--- a/include/sysemu/tpm.h
+++ b/include/sysemu/tpm.h
@@ -26,11 +26,18 @@ typedef enum TPMVersion {
TPM_VERSION_2_0 = 2,
} TPMVersion;
+TPMVersion tpm_tis_get_tpm_version(Object *obj);
+
#define TYPE_TPM_TIS "tpm-tis"
-static inline bool tpm_find(void)
+static inline TPMVersion tpm_get_version(void)
{
- return object_resolve_path_type("", TYPE_TPM_TIS, NULL);
+ Object *obj = object_resolve_path_type("", TYPE_TPM_TIS, NULL);
+
+ if (obj) {
+ return tpm_tis_get_tpm_version(obj);
+ }
+ return TPM_VERSION_UNSPEC;
}
#endif /* QEMU_TPM_H */
OpenPOWER on IntegriCloud