* [PATCH v4 0/3] tpm: Add missing ACPI device identification objects
@ 2021-12-23 2:23 Stefan Berger
2021-12-23 2:23 ` [PATCH v4 1/3] tests: acpi: prepare for updated TPM related tables Stefan Berger
` (2 more replies)
0 siblings, 3 replies; 14+ messages in thread
From: Stefan Berger @ 2021-12-23 2:23 UTC (permalink / raw)
To: qemu-devel; +Cc: marcandre.lureau, Stefan Berger
This series of patches adds missing ACPI device identification objects _STR
and _UID to TPM 1.2 and TPM 2 ACPI tables.
Stefan
v4:
- Rebased on current master: regenerated binaries in patch 3
v3:
- Dropped replacement of ACPI tables with empty files in 1/3.
- Reduced ignored files
Stefan Berger (3):
tests: acpi: prepare for updated TPM related tables
acpi: tpm: Add missing device identification objects
tests: acpi: Add updated TPM related tables
hw/arm/virt-acpi-build.c | 1 +
hw/i386/acpi-build.c | 8 ++++++++
tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8894 -> 8900 bytes
tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8894 -> 8921 bytes
4 files changed, 9 insertions(+)
--
2.31.1
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH v4 1/3] tests: acpi: prepare for updated TPM related tables
2021-12-23 2:23 [PATCH v4 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
@ 2021-12-23 2:23 ` Stefan Berger
2021-12-23 7:15 ` Ani Sinha
2021-12-23 2:23 ` [PATCH v4 2/3] acpi: tpm: Add missing device identification objects Stefan Berger
2021-12-23 2:23 ` [PATCH v4 3/3] tests: acpi: Add updated TPM related tables Stefan Berger
2 siblings, 1 reply; 14+ messages in thread
From: Stefan Berger @ 2021-12-23 2:23 UTC (permalink / raw)
To: qemu-devel
Cc: Ani Sinha, marcandre.lureau, Igor Mammedov, Michael S . Tsirkin,
Stefan Berger
Replace existing TPM related tables, that are about to change, with
empty files.
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Ani Sinha <ani@anisinha.ca>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Message-id: 20211110133559.3370990-2-stefanb@linux.ibm.com
---
tests/qtest/bios-tables-test-allowed-diff.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index dfb8523c8b..5d80e408d4 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1 +1,3 @@
/* List of comma-separated changed AML files to ignore */
+"tests/data/acpi/q35/DSDT.tis.tpm12",
+"tests/data/acpi/q35/DSDT.tis.tpm2",
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 2/3] acpi: tpm: Add missing device identification objects
2021-12-23 2:23 [PATCH v4 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
2021-12-23 2:23 ` [PATCH v4 1/3] tests: acpi: prepare for updated TPM related tables Stefan Berger
@ 2021-12-23 2:23 ` Stefan Berger
2021-12-23 7:13 ` Ani Sinha
` (2 more replies)
2021-12-23 2:23 ` [PATCH v4 3/3] tests: acpi: Add updated TPM related tables Stefan Berger
2 siblings, 3 replies; 14+ messages in thread
From: Stefan Berger @ 2021-12-23 2:23 UTC (permalink / raw)
To: qemu-devel
Cc: Michael S . Tsirkin, Shannon Zhao, Igor Mammedov, Ani Sinha,
marcandre.lureau, Stefan Berger
Add missing device identification objects _STR and _UID. They will appear
as files 'description' and 'uid' under Linux sysfs.
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>
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Message-id: 20211110133559.3370990-3-stefanb@linux.ibm.com
---
hw/arm/virt-acpi-build.c | 1 +
hw/i386/acpi-build.c | 8 ++++++++
2 files changed, 9 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..2fb70847cb 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,6 +1848,8 @@ 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));
@@ -1851,6 +1857,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
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);
aml_append(sb_scope, dev);
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH v4 3/3] tests: acpi: Add updated TPM related tables
2021-12-23 2:23 [PATCH v4 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
2021-12-23 2:23 ` [PATCH v4 1/3] tests: acpi: prepare for updated TPM related tables Stefan Berger
2021-12-23 2:23 ` [PATCH v4 2/3] acpi: tpm: Add missing device identification objects Stefan Berger
@ 2021-12-23 2:23 ` Stefan Berger
2021-12-23 7:14 ` Ani Sinha
2 siblings, 1 reply; 14+ messages in thread
From: Stefan Berger @ 2021-12-23 2:23 UTC (permalink / raw)
To: qemu-devel
Cc: Ani Sinha, marcandre.lureau, Igor Mammedov, Michael S . Tsirkin,
Stefan Berger
The updated TPM related tables have the following additions:
Device (TPM)
{
Name (_HID, "MSFT0101" /* TPM 2.0 Security Device */) // _HID: Hardware ID
+ Name (_STR, "TPM 2.0 Device") // _STR: Description String
+ Name (_UID, One) // _UID: Unique ID
Name (_STA, 0x0F) // _STA: Status
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Ani Sinha <ani@anisinha.ca>
Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Message-id: 20211110133559.3370990-4-stefanb@linux.ibm.com
---
tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8894 -> 8900 bytes
tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8894 -> 8921 bytes
tests/qtest/bios-tables-test-allowed-diff.h | 2 --
3 files changed, 2 deletions(-)
diff --git a/tests/data/acpi/q35/DSDT.tis.tpm12 b/tests/data/acpi/q35/DSDT.tis.tpm12
index 0ebdf6fbd77967f1ab5d5337b7b1fed314cfaca8..fb9dd1f0599afd6b555ea570ecd00a3bb227aa84 100644
GIT binary patch
delta 50
zcmdnzdc>8>CD<k8h!O(><KvB7q6(a@S~2m#PVoZ1lQk6FnOs#T7b=LdgnGI#Zf;Sq
GVgdkr91X<)
delta 45
zcmX@&y3du%CD<iopArKDqxwcJQ3Xza&6xOLr+5MP$r=joO#Uj93l&5+_b6B}0RSYz
B3@!iw
diff --git a/tests/data/acpi/q35/DSDT.tis.tpm2 b/tests/data/acpi/q35/DSDT.tis.tpm2
index dcbb7f0af377425db53130e8ba1c62c09c22e006..00d732e46f5d9d056e557bd026fa30f9db3b8c30 100644
GIT binary patch
delta 70
zcmdnzdefE5CD<k8rV;}KBgaNAQ3Wn9?U?vrr+5J;?a7)7ZcJWklM5BZ#e;Z50(=#W
a^b8bSQp+-vQyDnoLp@y>H@7HQF#!OXcoHoD
delta 46
zcmccVy3du%CD<iopArKD<D-pSq6%F8nlbUgPVoZnnv*pZ+?f1TCKoD*Z(gim#smOL
C=M6sq
diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
index 5d80e408d4..dfb8523c8b 100644
--- a/tests/qtest/bios-tables-test-allowed-diff.h
+++ b/tests/qtest/bios-tables-test-allowed-diff.h
@@ -1,3 +1 @@
/* List of comma-separated changed AML files to ignore */
-"tests/data/acpi/q35/DSDT.tis.tpm12",
-"tests/data/acpi/q35/DSDT.tis.tpm2",
--
2.31.1
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects
2021-12-23 2:23 ` [PATCH v4 2/3] acpi: tpm: Add missing device identification objects Stefan Berger
@ 2021-12-23 7:13 ` Ani Sinha
2021-12-27 1:34 ` Shannon Zhao
2022-01-04 9:55 ` Igor Mammedov
2 siblings, 0 replies; 14+ messages in thread
From: Ani Sinha @ 2021-12-23 7:13 UTC (permalink / raw)
To: Stefan Berger
Cc: marcandre.lureau, Igor Mammedov, Michael S . Tsirkin, qemu-devel,
Shannon Zhao
On Wed, 22 Dec 2021, Stefan Berger wrote:
> Add missing device identification objects _STR and _UID. They will appear
> as files 'description' and 'uid' under Linux sysfs.
>
> 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>
> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
> Message-id: 20211110133559.3370990-3-stefanb@linux.ibm.com
> ---
> hw/arm/virt-acpi-build.c | 1 +
> hw/i386/acpi-build.c | 8 ++++++++
> 2 files changed, 9 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..2fb70847cb 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,6 +1848,8 @@ 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")));
Should we put a check here to make sure it is a 2.0 version like the code
hunk above for TIS_ISA? I looked around and it seems CRB is only
available for TPM
2.0 in which case it is probably ok but still making sure.
https://qemu.readthedocs.io/en/latest/specs/tpm.html
> crs = aml_resource_template();
> aml_append(crs, aml_memory32_fixed(TPM_CRB_ADDR_BASE,
> TPM_CRB_ADDR_SIZE, AML_READ_WRITE));
> @@ -1851,6 +1857,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
>
> 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);
>
> aml_append(sb_scope, dev);
> --
> 2.31.1
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 3/3] tests: acpi: Add updated TPM related tables
2021-12-23 2:23 ` [PATCH v4 3/3] tests: acpi: Add updated TPM related tables Stefan Berger
@ 2021-12-23 7:14 ` Ani Sinha
0 siblings, 0 replies; 14+ messages in thread
From: Ani Sinha @ 2021-12-23 7:14 UTC (permalink / raw)
To: Stefan Berger
Cc: marcandre.lureau, Igor Mammedov, qemu-devel, Michael S . Tsirkin
On Wed, 22 Dec 2021, Stefan Berger wrote:
> The updated TPM related tables have the following additions:
>
> Device (TPM)
> {
> Name (_HID, "MSFT0101" /* TPM 2.0 Security Device */) // _HID: Hardware ID
> + Name (_STR, "TPM 2.0 Device") // _STR: Description String
> + Name (_UID, One) // _UID: Unique ID
> Name (_STA, 0x0F) // _STA: Status
> Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Ani Sinha <ani@anisinha.ca>
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Acked-by: Ani Sinha <ani@anisinha.ca>
> Message-id: 20211110133559.3370990-4-stefanb@linux.ibm.com
> ---
> tests/data/acpi/q35/DSDT.tis.tpm12 | Bin 8894 -> 8900 bytes
> tests/data/acpi/q35/DSDT.tis.tpm2 | Bin 8894 -> 8921 bytes
> tests/qtest/bios-tables-test-allowed-diff.h | 2 --
> 3 files changed, 2 deletions(-)
>
> diff --git a/tests/data/acpi/q35/DSDT.tis.tpm12 b/tests/data/acpi/q35/DSDT.tis.tpm12
> index 0ebdf6fbd77967f1ab5d5337b7b1fed314cfaca8..fb9dd1f0599afd6b555ea570ecd00a3bb227aa84 100644
> GIT binary patch
> delta 50
> zcmdnzdc>8>CD<k8h!O(><KvB7q6(a@S~2m#PVoZ1lQk6FnOs#T7b=LdgnGI#Zf;Sq
> GVgdkr91X<)
>
> delta 45
> zcmX@&y3du%CD<iopArKDqxwcJQ3Xza&6xOLr+5MP$r=joO#Uj93l&5+_b6B}0RSYz
> B3@!iw
>
> diff --git a/tests/data/acpi/q35/DSDT.tis.tpm2 b/tests/data/acpi/q35/DSDT.tis.tpm2
> index dcbb7f0af377425db53130e8ba1c62c09c22e006..00d732e46f5d9d056e557bd026fa30f9db3b8c30 100644
> GIT binary patch
> delta 70
> zcmdnzdefE5CD<k8rV;}KBgaNAQ3Wn9?U?vrr+5J;?a7)7ZcJWklM5BZ#e;Z50(=#W
> a^b8bSQp+-vQyDnoLp@y>H@7HQF#!OXcoHoD
>
> delta 46
> zcmccVy3du%CD<iopArKD<D-pSq6%F8nlbUgPVoZnnv*pZ+?f1TCKoD*Z(gim#smOL
> C=M6sq
>
> diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
> index 5d80e408d4..dfb8523c8b 100644
> --- a/tests/qtest/bios-tables-test-allowed-diff.h
> +++ b/tests/qtest/bios-tables-test-allowed-diff.h
> @@ -1,3 +1 @@
> /* List of comma-separated changed AML files to ignore */
> -"tests/data/acpi/q35/DSDT.tis.tpm12",
> -"tests/data/acpi/q35/DSDT.tis.tpm2",
> --
> 2.31.1
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 1/3] tests: acpi: prepare for updated TPM related tables
2021-12-23 2:23 ` [PATCH v4 1/3] tests: acpi: prepare for updated TPM related tables Stefan Berger
@ 2021-12-23 7:15 ` Ani Sinha
0 siblings, 0 replies; 14+ messages in thread
From: Ani Sinha @ 2021-12-23 7:15 UTC (permalink / raw)
To: Stefan Berger
Cc: marcandre.lureau, Igor Mammedov, qemu-devel, Michael S . Tsirkin
On Wed, 22 Dec 2021, Stefan Berger wrote:
> Replace existing TPM related tables, that are about to change, with
> empty files.
>
> Cc: Michael S. Tsirkin <mst@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Ani Sinha <ani@anisinha.ca>
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
Acked-by: Ani Sinha <ani@anisinha.ca>
> Message-id: 20211110133559.3370990-2-stefanb@linux.ibm.com
> ---
> tests/qtest/bios-tables-test-allowed-diff.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h
> index dfb8523c8b..5d80e408d4 100644
> --- a/tests/qtest/bios-tables-test-allowed-diff.h
> +++ b/tests/qtest/bios-tables-test-allowed-diff.h
> @@ -1 +1,3 @@
> /* List of comma-separated changed AML files to ignore */
> +"tests/data/acpi/q35/DSDT.tis.tpm12",
> +"tests/data/acpi/q35/DSDT.tis.tpm2",
> --
> 2.31.1
>
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects
2021-12-23 2:23 ` [PATCH v4 2/3] acpi: tpm: Add missing device identification objects Stefan Berger
2021-12-23 7:13 ` Ani Sinha
@ 2021-12-27 1:34 ` Shannon Zhao
2022-01-04 9:55 ` Igor Mammedov
2 siblings, 0 replies; 14+ messages in thread
From: Shannon Zhao @ 2021-12-27 1:34 UTC (permalink / raw)
To: Stefan Berger, qemu-devel
Cc: Ani Sinha, marcandre.lureau, Igor Mammedov, Michael S . Tsirkin
On 2021/12/23 10:23, Stefan Berger wrote:
> Add missing device identification objects _STR and _UID. They will appear
> as files 'description' and 'uid' under Linux sysfs.
>
> 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>
> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> Message-id: 20211110133559.3370990-3-stefanb@linux.ibm.com
> ---
> hw/arm/virt-acpi-build.c | 1 +
> hw/i386/acpi-build.c | 8 ++++++++
> 2 files changed, 9 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)));
>
For ARM part
Reviewed-by: Shannon Zhao <shannon.zhaosl@gmail.com>
> Aml *crs = aml_resource_template();
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 8383b83ee3..2fb70847cb 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,6 +1848,8 @@ 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));
> @@ -1851,6 +1857,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
>
> 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);
>
> aml_append(sb_scope, dev);
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects
2021-12-23 2:23 ` [PATCH v4 2/3] acpi: tpm: Add missing device identification objects Stefan Berger
2021-12-23 7:13 ` Ani Sinha
2021-12-27 1:34 ` Shannon Zhao
@ 2022-01-04 9:55 ` Igor Mammedov
2022-01-04 14:48 ` Stefan Berger
2 siblings, 1 reply; 14+ messages in thread
From: Igor Mammedov @ 2022-01-04 9:55 UTC (permalink / raw)
To: Stefan Berger
Cc: Ani Sinha, marcandre.lureau, Michael S . Tsirkin, qemu-devel,
Shannon Zhao
On Wed, 22 Dec 2021 21:23:09 -0500
Stefan Berger <stefanb@linux.ibm.com> wrote:
> Add missing device identification objects _STR and _UID. They will appear
why, does it break anything or it's just cosmetic?
> as files 'description' and 'uid' under Linux sysfs.
>
> 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>
> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> Message-id: 20211110133559.3370990-3-stefanb@linux.ibm.com
> ---
> hw/arm/virt-acpi-build.c | 1 +
> hw/i386/acpi-build.c | 8 ++++++++
> 2 files changed, 9 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..2fb70847cb 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)));
why it's 1, and not 0 as in virt-arm?
>
> aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
> crs = aml_resource_template();
> @@ -1844,6 +1848,8 @@ 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));
> @@ -1851,6 +1857,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
>
> aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
>
no necessary ^^^ empty line
> + aml_append(dev, aml_name_decl("_UID", aml_int(1)));
> +
> tpm_build_ppi_acpi(tpm, dev);
>
> aml_append(sb_scope, dev);
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects
2022-01-04 9:55 ` Igor Mammedov
@ 2022-01-04 14:48 ` Stefan Berger
2022-01-04 15:15 ` Ani Sinha
2022-01-04 16:34 ` Igor Mammedov
0 siblings, 2 replies; 14+ messages in thread
From: Stefan Berger @ 2022-01-04 14:48 UTC (permalink / raw)
To: Igor Mammedov
Cc: Ani Sinha, marcandre.lureau, Michael S . Tsirkin, qemu-devel,
Shannon Zhao
On 1/4/22 04:55, Igor Mammedov wrote:
> On Wed, 22 Dec 2021 21:23:09 -0500
> Stefan Berger <stefanb@linux.ibm.com> wrote:
>
>> Add missing device identification objects _STR and _UID. They will appear
> why, does it break anything or it's just cosmetic?
I don't know about whether any software needs these entries but it's
driven by this:
https://gitlab.com/qemu-project/qemu/-/issues/708
>
>> as files 'description' and 'uid' under Linux sysfs.
>>
>> 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>
>> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
>> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>> Message-id: 20211110133559.3370990-3-stefanb@linux.ibm.com
>> ---
>> hw/arm/virt-acpi-build.c | 1 +
>> hw/i386/acpi-build.c | 8 ++++++++
>> 2 files changed, 9 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..2fb70847cb 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)));
> why it's 1, and not 0 as in virt-arm?
Marc-Andre and I looked at machines with hardware TPMs and that's what
we found there as well, a '1'.
>
>>
>> aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
>> crs = aml_resource_template();
>> @@ -1844,6 +1848,8 @@ 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));
>> @@ -1851,6 +1857,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
>>
>> aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
>>
> no necessary ^^^ empty line
fixed
>
>> + aml_append(dev, aml_name_decl("_UID", aml_int(1)));
>> +
>> tpm_build_ppi_acpi(tpm, dev);
>>
>> aml_append(sb_scope, dev);
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects
2022-01-04 14:48 ` Stefan Berger
@ 2022-01-04 15:15 ` Ani Sinha
2022-01-04 15:40 ` Stefan Berger
2022-01-04 16:34 ` Igor Mammedov
1 sibling, 1 reply; 14+ messages in thread
From: Ani Sinha @ 2022-01-04 15:15 UTC (permalink / raw)
To: Stefan Berger
Cc: Igor Mammedov, Shannon Zhao, Michael S . Tsirkin, qemu-devel,
marcandre.lureau
On Tue, 4 Jan 2022, Stefan Berger wrote:
>
> On 1/4/22 04:55, Igor Mammedov wrote:
> > On Wed, 22 Dec 2021 21:23:09 -0500
> > Stefan Berger <stefanb@linux.ibm.com> wrote:
> >
> > > Add missing device identification objects _STR and _UID. They will appear
> > why, does it break anything or it's just cosmetic?
>
> I don't know about whether any software needs these entries but it's driven by
> this:
>
> https://gitlab.com/qemu-project/qemu/-/issues/708
Ok so you might want to add
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/708
in the commit message. Please see:
https://www.qemu.org/docs/master/devel/submitting-a-patch.html#write-a-meaningful-commit-message
>
> >
> > > as files 'description' and 'uid' under Linux sysfs.
> > >
> > > 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>
> > > Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
> > > Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> > > Message-id: 20211110133559.3370990-3-stefanb@linux.ibm.com
> > > ---
> > > hw/arm/virt-acpi-build.c | 1 +
> > > hw/i386/acpi-build.c | 8 ++++++++
> > > 2 files changed, 9 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..2fb70847cb 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)));
> > why it's 1, and not 0 as in virt-arm?
>
> Marc-Andre and I looked at machines with hardware TPMs and that's what we
> found there as well, a '1'.
>
>
> >
> > > aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
> > > crs = aml_resource_template();
> > > @@ -1844,6 +1848,8 @@ 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));
> > > @@ -1851,6 +1857,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
> > > aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
> > >
> > no necessary ^^^ empty line
> fixed
> >
> > > + aml_append(dev, aml_name_decl("_UID", aml_int(1)));
> > > +
> > > tpm_build_ppi_acpi(tpm, dev);
> > > aml_append(sb_scope, dev);
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects
2022-01-04 15:15 ` Ani Sinha
@ 2022-01-04 15:40 ` Stefan Berger
0 siblings, 0 replies; 14+ messages in thread
From: Stefan Berger @ 2022-01-04 15:40 UTC (permalink / raw)
To: Ani Sinha
Cc: Igor Mammedov, Shannon Zhao, Michael S . Tsirkin, qemu-devel,
marcandre.lureau
On 1/4/22 10:15, Ani Sinha wrote:
>
> On Tue, 4 Jan 2022, Stefan Berger wrote:
>
>> On 1/4/22 04:55, Igor Mammedov wrote:
>>> On Wed, 22 Dec 2021 21:23:09 -0500
>>> Stefan Berger <stefanb@linux.ibm.com> wrote:
>>>
>>>> Add missing device identification objects _STR and _UID. They will appear
>>> why, does it break anything or it's just cosmetic?
>> I don't know about whether any software needs these entries but it's driven by
>> this:
>>
>> https://gitlab.com/qemu-project/qemu/-/issues/708
> Ok so you might want to add
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/708
>
> in the commit message. Please see:
> https://www.qemu.org/docs/master/devel/submitting-a-patch.html#write-a-meaningful-commit-message
Ooops, I will change this here to Resolves:
Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
>
>>>> as files 'description' and 'uid' under Linux sysfs.
>>>>
>>>> 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>
>>>> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
>>>> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>>>> Message-id: 20211110133559.3370990-3-stefanb@linux.ibm.com
>>>> ---
>>>> hw/arm/virt-acpi-build.c | 1 +
>>>> hw/i386/acpi-build.c | 8 ++++++++
>>>> 2 files changed, 9 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..2fb70847cb 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)));
>>> why it's 1, and not 0 as in virt-arm?
>> Marc-Andre and I looked at machines with hardware TPMs and that's what we
>> found there as well, a '1'.
>>
>>
>>>> aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
>>>> crs = aml_resource_template();
>>>> @@ -1844,6 +1848,8 @@ 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));
>>>> @@ -1851,6 +1857,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
>>>> aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
>>>>
>>> no necessary ^^^ empty line
>> fixed
>>>> + aml_append(dev, aml_name_decl("_UID", aml_int(1)));
>>>> +
>>>> tpm_build_ppi_acpi(tpm, dev);
>>>> aml_append(sb_scope, dev);
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects
2022-01-04 14:48 ` Stefan Berger
2022-01-04 15:15 ` Ani Sinha
@ 2022-01-04 16:34 ` Igor Mammedov
2022-01-04 17:58 ` Stefan Berger
1 sibling, 1 reply; 14+ messages in thread
From: Igor Mammedov @ 2022-01-04 16:34 UTC (permalink / raw)
To: Stefan Berger
Cc: Ani Sinha, marcandre.lureau, Michael S . Tsirkin, qemu-devel,
Shannon Zhao
On Tue, 4 Jan 2022 09:48:32 -0500
Stefan Berger <stefanb@linux.ibm.com> wrote:
> On 1/4/22 04:55, Igor Mammedov wrote:
> > On Wed, 22 Dec 2021 21:23:09 -0500
> > Stefan Berger <stefanb@linux.ibm.com> wrote:
> >
> >> Add missing device identification objects _STR and _UID. They will appear
> > why, does it break anything or it's just cosmetic?
>
> I don't know about whether any software needs these entries but it's
> driven by this:
>
> https://gitlab.com/qemu-project/qemu/-/issues/708
>
>
> >
> >> as files 'description' and 'uid' under Linux sysfs.
> >>
> >> 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>
> >> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
> >> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
> >> Message-id: 20211110133559.3370990-3-stefanb@linux.ibm.com
> >> ---
> >> hw/arm/virt-acpi-build.c | 1 +
> >> hw/i386/acpi-build.c | 8 ++++++++
> >> 2 files changed, 9 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..2fb70847cb 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)));
> > why it's 1, and not 0 as in virt-arm?
>
> Marc-Andre and I looked at machines with hardware TPMs and that's what
> we found there as well, a '1'.
perhaps mention that in commit message
>
>
> >
> >>
> >> aml_append(dev, aml_name_decl("_STA", aml_int(0xF)));
> >> crs = aml_resource_template();
> >> @@ -1844,6 +1848,8 @@ 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));
> >> @@ -1851,6 +1857,8 @@ build_dsdt(GArray *table_data, BIOSLinker *linker,
> >>
> >> aml_append(dev, aml_name_decl("_STA", aml_int(0xf)));
> >>
> > no necessary ^^^ empty line
> fixed
> >
> >> + aml_append(dev, aml_name_decl("_UID", aml_int(1)));
> >> +
> >> tpm_build_ppi_acpi(tpm, dev);
> >>
> >> aml_append(sb_scope, dev);
>
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects
2022-01-04 16:34 ` Igor Mammedov
@ 2022-01-04 17:58 ` Stefan Berger
0 siblings, 0 replies; 14+ messages in thread
From: Stefan Berger @ 2022-01-04 17:58 UTC (permalink / raw)
To: Igor Mammedov
Cc: Ani Sinha, marcandre.lureau, Michael S . Tsirkin, qemu-devel,
Shannon Zhao
On 1/4/22 11:34, Igor Mammedov wrote:
> On Tue, 4 Jan 2022 09:48:32 -0500
> Stefan Berger <stefanb@linux.ibm.com> wrote:
>
>> On 1/4/22 04:55, Igor Mammedov wrote:
>>> On Wed, 22 Dec 2021 21:23:09 -0500
>>> Stefan Berger <stefanb@linux.ibm.com> wrote:
>>>
>>>> Add missing device identification objects _STR and _UID. They will appear
>>> why, does it break anything or it's just cosmetic?
>> I don't know about whether any software needs these entries but it's
>> driven by this:
>>
>> https://gitlab.com/qemu-project/qemu/-/issues/708
>>
>>
>>>
>>>> as files 'description' and 'uid' under Linux sysfs.
>>>>
>>>> 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>
>>>> Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708
>>>> Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
>>>> Message-id: 20211110133559.3370990-3-stefanb@linux.ibm.com
>>>> ---
>>>> hw/arm/virt-acpi-build.c | 1 +
>>>> hw/i386/acpi-build.c | 8 ++++++++
>>>> 2 files changed, 9 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..2fb70847cb 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)));
>>> why it's 1, and not 0 as in virt-arm?
>> Marc-Andre and I looked at machines with hardware TPMs and that's what
>> we found there as well, a '1'.
> perhaps mention that in commit message
Added to v5 2/3.
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2022-01-04 18:02 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-23 2:23 [PATCH v4 0/3] tpm: Add missing ACPI device identification objects Stefan Berger
2021-12-23 2:23 ` [PATCH v4 1/3] tests: acpi: prepare for updated TPM related tables Stefan Berger
2021-12-23 7:15 ` Ani Sinha
2021-12-23 2:23 ` [PATCH v4 2/3] acpi: tpm: Add missing device identification objects Stefan Berger
2021-12-23 7:13 ` Ani Sinha
2021-12-27 1:34 ` Shannon Zhao
2022-01-04 9:55 ` Igor Mammedov
2022-01-04 14:48 ` Stefan Berger
2022-01-04 15:15 ` Ani Sinha
2022-01-04 15:40 ` Stefan Berger
2022-01-04 16:34 ` Igor Mammedov
2022-01-04 17:58 ` Stefan Berger
2021-12-23 2:23 ` [PATCH v4 3/3] tests: acpi: Add updated TPM related tables Stefan Berger
2021-12-23 7:14 ` Ani Sinha
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.