From: Stefan Berger <stefanb@linux.ibm.com>
To: qemu-devel@nongnu.org
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
Shannon Zhao <shannon.zhaosl@gmail.com>,
Igor Mammedov <imammedo@redhat.com>, Ani Sinha <ani@anisinha.ca>,
marcandre.lureau@redhat.com,
Stefan Berger <stefanb@linux.ibm.com>
Subject: [PATCH v5 2/3] acpi: tpm: Add missing device identification objects
Date: Tue, 4 Jan 2022 12:58:05 -0500 [thread overview]
Message-ID: <20220104175806.872996-3-stefanb@linux.ibm.com> (raw)
In-Reply-To: <20220104175806.872996-1-stefanb@linux.ibm.com>
Add missing TPM device identification objects _STR and _UID. They will
appear as files 'description' and 'uid' under Linux sysfs.
Following inspection of sysfs entries for hardware TPMs we chose
uid '1'.
Cc: Shannon Zhao <shannon.zhaosl@gmail.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Ani Sinha <ani@anisinha.ca>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/708
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
Reviewed-by: Shannon Zhao <shannon.zhaosl@gmail.com>
Message-id: 20211223022310.575496-3-stefanb@linux.ibm.com
---
hw/arm/virt-acpi-build.c | 1 +
hw/i386/acpi-build.c | 7 +++++++
2 files changed, 8 insertions(+)
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index d0f4867fdf..f2514ce77c 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -229,6 +229,7 @@ static void acpi_dsdt_add_tpm(Aml *scope, VirtMachineState *vms)
Aml *dev = aml_device("TPM0");
aml_append(dev, aml_name_decl("_HID", aml_string("MSFT0101")));
+ aml_append(dev, aml_name_decl("_STR", aml_string("TPM 2.0 Device")));
aml_append(dev, aml_name_decl("_UID", aml_int(0)));
Aml *crs = aml_resource_template();
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 8383b83ee3..05740b7f15 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -1812,11 +1812,15 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
dev = aml_device("TPM");
aml_append(dev, aml_name_decl("_HID",
aml_string("MSFT0101")));
+ aml_append(dev,
+ aml_name_decl("_STR",
+ aml_string("TPM 2.0 Device")));
} else {
dev = aml_device("ISA.TPM");
aml_append(dev, aml_name_decl("_HID",
aml_eisaid("PNP0C31")));
}
+ aml_append(dev, aml_name_decl("_UID", aml_int(1)));
aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
crs = aml_resource_template();
@@ -1844,12 +1848,15 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
if (TPM_IS_CRB(tpm)) {
dev = aml_device("TPM");
aml_append(dev, aml_name_decl("_HID", aml_string("MSFT0101")));
+ aml_append(dev, aml_name_decl("_STR",
+ aml_string("TPM 2.0 Device")));
crs = aml_resource_template();
aml_append(crs, aml_memory32_fixed(TPM_CRB_ADDR_BASE,
TPM_CRB_ADDR_SIZE, AML_READ_WRITE));
aml_append(dev, aml_name_decl("_CRS", crs));
aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
+ aml_append(dev, aml_name_decl("_UID", aml_int(1)));
tpm_build_ppi_acpi(tpm, dev);
--
2.31.1
next prev parent reply other threads:[~2022-01-04 18:01 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-04 17:58 [PATCH v5 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
2022-01-04 17:58 ` [PATCH v5 1/3] tests: acpi: prepare for updated TPM related tables Stefan Berger
2022-01-06 16:56 ` Igor Mammedov
2022-01-04 17:58 ` Stefan Berger [this message]
2022-01-06 8:36 ` [PATCH v5 2/3] acpi: tpm: Add missing device identification objects Igor Mammedov
2022-01-06 11:40 ` Michael S. Tsirkin
2022-01-06 13:53 ` Stefan Berger
2022-01-06 13:56 ` Michael S. Tsirkin
2022-01-06 14:01 ` Stefan Berger
2022-01-06 16:55 ` Igor Mammedov
2022-01-06 18:07 ` Stefan Berger
2022-01-06 17:38 ` Ani Sinha
2022-01-04 17:58 ` [PATCH v5 3/3] tests: acpi: Add updated TPM related tables Stefan Berger
2022-01-04 18:09 ` [PATCH v5 0/3] tpm: Add missing ACPI device identification objects Daniel P. Berrangé
2022-01-04 18:14 ` Stefan Berger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220104175806.872996-3-stefanb@linux.ibm.com \
--to=stefanb@linux.ibm.com \
--cc=ani@anisinha.ca \
--cc=imammedo@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=shannon.zhaosl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.