mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
tpm: move TpmIf in include/sysemu/tpm.h
This is a better location than hw/tpm, since we are going to use the interface from outside hw/tpm. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
This commit is contained in:
parent
8a37fc44c6
commit
67af320cd6
3 changed files with 20 additions and 22 deletions
|
@ -27,6 +27,25 @@ typedef enum TPMVersion {
|
|||
TPM_VERSION_2_0 = 2,
|
||||
} TPMVersion;
|
||||
|
||||
#define TYPE_TPM_IF "tpm-if"
|
||||
#define TPM_IF_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(TPMIfClass, (klass), TYPE_TPM_IF)
|
||||
#define TPM_IF_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(TPMIfClass, (obj), TYPE_TPM_IF)
|
||||
#define TPM_IF(obj) \
|
||||
INTERFACE_CHECK(TPMIf, (obj), TYPE_TPM_IF)
|
||||
|
||||
typedef struct TPMIf {
|
||||
Object parent_obj;
|
||||
} TPMIf;
|
||||
|
||||
typedef struct TPMIfClass {
|
||||
InterfaceClass parent_class;
|
||||
|
||||
/* run in thread pool by backend */
|
||||
void (*request_completed)(TPMIf *obj);
|
||||
} TPMIfClass;
|
||||
|
||||
TPMVersion tpm_tis_get_tpm_version(Object *obj);
|
||||
|
||||
#define TYPE_TPM_TIS "tpm-tis"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue