diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2017-10-26 09:20:11 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2017-10-26 09:20:11 +0100 |
commit | 325a084c1ebccb265a3c8f1dd092ffbbfb448a00 (patch) | |
tree | cb94a661c36efc359ba4147d7d93493e4b3ca955 | |
parent | ae49fbbcd8e4e9d8bf7131add34773f579e1aff7 (diff) | |
parent | 298d8b81d45d2297f88d93604bd5eebfd653d6cf (diff) | |
download | qemu-325a084c1ebccb265a3c8f1dd092ffbbfb448a00.zip qemu-325a084c1ebccb265a3c8f1dd092ffbbfb448a00.tar.gz qemu-325a084c1ebccb265a3c8f1dd092ffbbfb448a00.tar.bz2 |
Merge remote-tracking branch 'remotes/stefanberger/tags/pull-tpm-2017-10-24-1' into staging
Merge tpm 2017/10/24 v1
# gpg: Signature made Wed 25 Oct 2017 06:06:55 BST
# gpg: using RSA key 0x75AD65802A0B4211
# gpg: Good signature from "Stefan Berger <stefanb@linux.vnet.ibm.com>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: B818 B9CA DF90 89C2 D5CE C66B 75AD 6580 2A0B 4211
* remotes/stefanberger/tags/pull-tpm-2017-10-24-1:
tpm: print buffers received from TPM when debugging
vl: remove unnecessary #ifdef CONFIG_TPM
tpm: remove unnecessary #ifdef CONFIG_TPM
tpm: add stubs
tpm: add missing include
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | MAINTAINERS | 1 | ||||
-rw-r--r-- | Makefile.objs | 2 | ||||
-rw-r--r-- | hw/tpm/tpm_tis.c | 2 | ||||
-rw-r--r-- | include/sysemu/tpm.h | 1 | ||||
-rw-r--r-- | stubs/Makefile.objs | 1 | ||||
-rw-r--r-- | stubs/tpm.c | 33 | ||||
-rw-r--r-- | tpm.c | 4 | ||||
-rw-r--r-- | vl.c | 2 |
8 files changed, 39 insertions, 7 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 1217542..2650063 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1544,6 +1544,7 @@ TPM M: Stefan Berger <stefanb@linux.vnet.ibm.com> S: Maintained F: tpm.c +F: stubs/tpm.c F: hw/tpm/* F: include/hw/acpi/tpm.h F: include/sysemu/tpm* diff --git a/Makefile.objs b/Makefile.objs index d4f973a..285c6f3 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -62,7 +62,7 @@ bt-host.o-cflags := $(BLUEZ_CFLAGS) common-obj-y += dma-helpers.o common-obj-y += vl.o vl.o-cflags := $(GPROF_CFLAGS) $(SDL_CFLAGS) -common-obj-y += tpm.o +common-obj-$(CONFIG_TPM) += tpm.o common-obj-$(CONFIG_SLIRP) += slirp/ diff --git a/hw/tpm/tpm_tis.c b/hw/tpm/tpm_tis.c index 8c5cac5..7402528 100644 --- a/hw/tpm/tpm_tis.c +++ b/hw/tpm/tpm_tis.c @@ -422,6 +422,8 @@ static void tpm_tis_receive_bh(void *opaque) s->loc[locty].r_offset = 0; s->loc[locty].w_offset = 0; + tpm_tis_show_buffer(&s->loc[locty].r_buffer, "tpm_tis: From TPM"); + if (TPM_TIS_IS_VALID_LOCTY(s->next_locty)) { tpm_tis_abort(s, locty); } diff --git a/include/sysemu/tpm.h b/include/sysemu/tpm.h index c8afa17..d7a2bd8 100644 --- a/include/sysemu/tpm.h +++ b/include/sysemu/tpm.h @@ -13,6 +13,7 @@ #define QEMU_TPM_H #include "qemu/option.h" +#include "qom/object.h" typedef struct TPMState TPMState; diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index c759479..8cfe343 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -28,6 +28,7 @@ stub-obj-y += runstate-check.o stub-obj-y += set-fd-handler.o stub-obj-y += slirp.o stub-obj-y += sysbus.o +stub-obj-y += tpm.o stub-obj-y += trace-control.o stub-obj-y += uuid.o stub-obj-y += vm-stop.o diff --git a/stubs/tpm.c b/stubs/tpm.c new file mode 100644 index 0000000..c18aac1 --- /dev/null +++ b/stubs/tpm.c @@ -0,0 +1,33 @@ +/* + * TPM stubs + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ +#include "qemu/osdep.h" +#include "sysemu/tpm.h" +#include "qmp-commands.h" + +int tpm_init(void) +{ + return 0; +} + +void tpm_cleanup(void) +{ +} + +TPMInfoList *qmp_query_tpm(Error **errp) +{ + return NULL; +} + +TpmTypeList *qmp_query_tpm_types(Error **errp) +{ + return NULL; +} + +TpmModelList *qmp_query_tpm_models(Error **errp) +{ + return NULL; +} @@ -30,8 +30,6 @@ void tpm_register_model(enum TpmModel model) tpm_models[model] = true; } -#ifdef CONFIG_TPM - static const TPMBackendClass * tpm_be_find_by_type(enum TpmType type) { @@ -192,8 +190,6 @@ int tpm_config_parse(QemuOptsList *opts_list, const char *optarg) return 0; } -#endif /* CONFIG_TPM */ - /* * Walk the list of active TPM backends and collect information about them * following the schema description in qapi-schema.json. @@ -4624,11 +4624,9 @@ int main(int argc, char **argv, char **envp) exit(1); } -#ifdef CONFIG_TPM if (tpm_init() < 0) { exit(1); } -#endif /* init the bluetooth world */ if (foreach_device_config(DEV_BT, bt_parse)) |