From: Stefan Berger <stefanb@us.ibm.com>
To: stefanb@linux.vnet.ibm.com, qemu-devel@nongnu.org, mst@redhat.com
Cc: imammedo@redhat.com, Stefan Berger <stefanb@us.ibm.com>,
crobinso@redhat.com
Subject: [Qemu-devel] [PATCH 1/2] acpi: tpm: Fix TPM ACPI description (BZ 1281413)
Date: Sun, 3 Apr 2016 21:37:55 -0400 [thread overview]
Message-ID: <1459733876-22908-2-git-send-email-stefanb@us.ibm.com> (raw)
In-Reply-To: <1459733876-22908-1-git-send-email-stefanb@us.ibm.com>
This patch addresses BZ 1281413.
https://bugzilla.redhat.com/show_bug.cgi?id=1281413
Fix the APCI description to make it work on operating systems that are
more strict about the contents of the TPM's ACPI description than Linux
is. The ACPI description was broken in commit 9e472263.
We roll back the ACPI description to where it was in QEMU 2.3.1 and
deactivate the interrupt, modify the scope to \_SB, and change the
name of the device back to 'TPM' from 'ISA.TPM'. Here's the ACPI
description from QEMU 2.3.1:
Scope(\_SB) {
/* TPM with emulated TPM TIS interface */
Device (TPM) {
Name (_HID, EisaID ("PNP0C31"))
Name (_CRS, ResourceTemplate ()
{
Memory32Fixed (ReadWrite, TPM_TIS_ADDR_BASE, TPM_TIS_ADDR_SIZE)
// older Linux tpm_tis drivers do not work with IRQ
//IRQNoFlags () {TPM_TIS_IRQ}
})
Method (_STA, 0, NotSerialized) {
Return (0x0F)
}
}
}
Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
---
hw/i386/acpi-build.c | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 35180ef..e11c721 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2335,22 +2335,20 @@ build_dsdt(GArray *table_data, GArray *linker,
Aml *scope = aml_scope("PCI0");
/* Scan all PCI buses. Generate tables to support hotplug. */
build_append_pci_bus_devices(scope, bus, pm->pcihp_bridge_en);
-
- if (misc->tpm_version != TPM_VERSION_UNSPEC) {
- 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,
- TPM_TIS_ADDR_SIZE, AML_READ_WRITE));
- aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ));
- aml_append(dev, aml_name_decl("_CRS", crs));
- aml_append(scope, dev);
- }
-
- aml_append(sb_scope, scope);
}
}
+
+ if (misc->tpm_version != TPM_VERSION_UNSPEC) {
+ dev = aml_device("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,
+ TPM_TIS_ADDR_SIZE, AML_READ_WRITE));
+ //aml_append(crs, aml_irq_no_flags(TPM_TIS_IRQ));
+ aml_append(dev, aml_name_decl("_CRS", crs));
+ aml_append(sb_scope, dev);
+ }
aml_append(dsdt, sb_scope);
}
--
2.5.5
next prev parent reply other threads:[~2016-04-04 1:38 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-04 1:37 [Qemu-devel] [PATCH 0/2] acpi: tpm: Fix TPM ACPI description Stefan Berger
2016-04-04 1:37 ` Stefan Berger [this message]
2016-04-04 9:04 ` [Qemu-devel] [PATCH 1/2] acpi: tpm: Fix TPM ACPI description (BZ 1281413) Michael S. Tsirkin
2016-04-04 10:17 ` Stefan Berger
2016-04-04 11:49 ` Igor Mammedov
2016-04-04 1:37 ` [Qemu-devel] [PATCH 2/2] acpi: tpm: Get the interrupt the device model is using Stefan Berger
2016-04-04 9:01 ` Michael S. Tsirkin
2016-04-04 10:10 ` Stefan Berger
2016-04-04 10:12 ` Michael S. Tsirkin
2016-04-04 12:08 ` Igor Mammedov
2016-04-04 9:04 ` [Qemu-devel] [PATCH 0/2] acpi: tpm: Fix TPM ACPI description Michael S. Tsirkin
2016-04-04 10:31 ` Stefan Berger
2016-04-04 12:11 ` Igor Mammedov
2016-04-08 7:51 ` Michael S. Tsirkin
2016-04-08 8:13 ` Igor Mammedov
2016-04-04 16:00 ` Michael S. Tsirkin
2016-04-06 0:13 ` 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=1459733876-22908-2-git-send-email-stefanb@us.ibm.com \
--to=stefanb@us.ibm.com \
--cc=crobinso@redhat.com \
--cc=imammedo@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=stefanb@linux.vnet.ibm.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 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).