tpm: Add missing ACPI device identification objects
v3 cover tpm: Add missing ACPI device identification objects
This series of patches adds missing ACPI device identification objects _STR and _UID to TPM 1.2 and TPM 2 ACPI tables.
Stefan
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(+)
Signature · 1 line
2.31.1
PATCH v3 1/3 tests: acpi: prepare for updated TPM related tables
Replace existing TPM related tables, that are about to change, with empty files.
--- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 1 file changed, 2 insertions(+)
tests/qtest/bios-tables-test-allowed-diff.h +2 -0
@@ -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",
Signature · 1 line
2.31.1
PATCH v3 2/3 acpi: tpm: Add missing device identification objects
In reply to Stefan BergerAdd missing device identification objects _STR and _UID. They will appear as files 'description' and 'uid' under Linux sysfs.
--- hw/arm/virt-acpi-build.c | 1 + hw/i386/acpi-build.c | 8 ++++++++ 2 files changed, 9 insertions(+)
hw/arm/virt-acpi-build.c +1 -0
@@ -228,6 +228,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 ();
hw/i386/acpi-build.c +8 -0
@@ -1808,11 +1808,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 ();
@@ -1840,6 +1844,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 ));
@@ -1847,6 +1853,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);
Signature · 1 line
2.31.1
PATCH v3 3/3 tests: acpi: Add updated TPM related tables
In reply to Stefan BergerThe 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
--- 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(-)
tests/data/acpi/q35/DSDT.tis.tpm12 binary +0 -0
tests/data/acpi/q35/DSDT.tis.tpm2 binary +0 -0
tests/qtest/bios-tables-test-allowed-diff.h +0 -2
@@ -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",
Signature · 1 line
2.31.1
Is this series now acceptable for 'after 6.2'?
Quoted 20 lines · Stefan Berger
This series of patches adds missing ACPI device identification objects
_STRand_UIDto TPM 1.2 and TPM 2 ACPI tables.Stefan
v3:
- Dropped replacement of ACPI tables with empty files in 1/3.
- Reduced ignored filesStefan Berger (3):
tests: acpi: prepare for updated TPM related tables
acpi: tpm: Add missing device identification objects
tests: acpi: Add updated TPM related tableshw/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(+)
Quoted 1 line · Stefan Berger
Is this series now acceptable for 'after 6.2'?
Sure. Tagged. Pls ping me aftre release to help make sure I don't lose it.
Quoted 22 lines · Stefan Berger
Quoted 20 lines
This series of patches adds missing ACPI device identification objects
_STRand_UIDto TPM 1.2 and TPM 2 ACPI tables.Stefan
v3:
- Dropped replacement of ACPI tables with empty files in 1/3.
- Reduced ignored filesStefan Berger (3):
tests: acpi: prepare for updated TPM related tables
acpi: tpm: Add missing device identification objects
tests: acpi: Add updated TPM related tableshw/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(+)