116694c34a
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>
37 lines
769 B
C
37 lines
769 B
C
/*
|
|
* Public TPM functions
|
|
*
|
|
* Copyright (C) 2011-2013 IBM Corporation
|
|
*
|
|
* Authors:
|
|
* Stefan Berger <stefanb@us.ibm.com>
|
|
*
|
|
* This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
* See the COPYING file in the top-level directory.
|
|
*/
|
|
#ifndef QEMU_TPM_H
|
|
#define QEMU_TPM_H
|
|
|
|
#include "qemu/option.h"
|
|
|
|
typedef struct TPMState TPMState;
|
|
|
|
int tpm_config_parse(QemuOptsList *opts_list, const char *optarg);
|
|
int tpm_init(void);
|
|
void tpm_cleanup(void);
|
|
|
|
typedef enum TPMVersion {
|
|
TPM_VERSION_UNSPEC = 0,
|
|
TPM_VERSION_1_2 = 1,
|
|
TPM_VERSION_2_0 = 2,
|
|
} TPMVersion;
|
|
|
|
#define TYPE_TPM_TIS "tpm-tis"
|
|
|
|
static inline bool tpm_find(void)
|
|
{
|
|
return object_resolve_path_type("", TYPE_TPM_TIS, NULL);
|
|
}
|
|
|
|
#endif /* QEMU_TPM_H */
|