qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] acpi: Make TPM 2.0 with TIS available as MSFT0101
@ 2019-01-25 21:00 Stefan Berger
  2019-01-28 14:45 ` Igor Mammedov
  2019-01-29  8:05 ` Igor Mammedov
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Berger @ 2019-01-25 21:00 UTC (permalink / raw)
  To: qemu-devel; +Cc: marcandre.lureau, imammedo, mst, Stefan Berger

This patch makes the a TPM 2.0 with TIS interface available under the
HID 'MSF0101'. This is supported by Linux and also Windows now
recognizes the TPM 2.0 with TIS interface. Leave the TPM 1.2 as before.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
---
 hw/i386/acpi-build.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 2e21a31f82..f51225b4a7 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2141,8 +2141,16 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
             build_append_pci_bus_devices(scope, bus, pm->pcihp_bridge_en);
 
             if (TPM_IS_TIS(tpm)) {
-                dev = aml_device("ISA.TPM");
-                aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0C31")));
+                if (misc->tpm_version == TPM_VERSION_2_0) {
+                    dev = aml_device("TPM");
+                    aml_append(dev, aml_name_decl("_HID",
+                                                  aml_string("MSFT0101")));
+                } else {
+                    dev = aml_device("ISA.TPM");
+                    aml_append(dev, aml_name_decl("_HID",
+                                                  aml_eisaid("PNP0C31")));
+                }
+
                 aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
                 crs = aml_resource_template();
                 aml_append(crs, aml_memory32_fixed(TPM_TIS_ADDR_BASE,
-- 
2.20.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-01-29  8:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-25 21:00 [Qemu-devel] [PATCH] acpi: Make TPM 2.0 with TIS available as MSFT0101 Stefan Berger
2019-01-28 14:45 ` Igor Mammedov
2019-01-28 15:15   ` Michael S. Tsirkin
2019-01-28 15:40     ` Igor Mammedov
2019-01-28 15:56       ` Michael S. Tsirkin
2019-01-28 16:14   ` Stefan Berger
2019-01-28 17:19     ` Stefan Berger
2019-01-28 17:49       ` Michael S. Tsirkin
2019-01-28 21:53         ` Stefan Berger
2019-01-29  8:05 ` Igor Mammedov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).