mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
TPM2 ACPI table support
Add a TPM2 ACPI table if a TPM 2 is used in the backend. Also add an SSDT for the TPM 2. Rename tpm_find() to tpm_get_version() and have this function return the version of the TPM found, TPMVersion_Unspec if no TPM is found. Use the version number to build version specific ACPI tables. 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>
This commit is contained in:
parent
56a3c24ffc
commit
5cb18b3d7b
10 changed files with 237 additions and 28 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue