qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-devel@nongnu.org, marcandre.lureau@redhat.com, mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH] acpi: Make TPM 2.0 with TIS available as MSFT0101
Date: Mon, 28 Jan 2019 11:14:34 -0500	[thread overview]
Message-ID: <f7fc884b-0a7f-17d5-ada4-fc44c08bfba1@linux.ibm.com> (raw)
In-Reply-To: <20190128154553.583f79a3@redhat.com>

On 1/28/19 9:45 AM, Igor Mammedov wrote:
> On Fri, 25 Jan 2019 16:00:58 -0500
> Stefan Berger <stefanb@linux.ibm.com> wrote:
>
>> 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
> MSF0101 is relatively recent addition to Linux,
> are there in wild (old) kernels that worked with PNP0C31 but won't work
> with MSF0101?


Linux 4.3.4 and later references this HID here: 
https://elixir.bootlin.com/linux/v4.3.4/source/drivers/char/tpm/tpm_tis.c 
. I don't see it before that. A 3.10 kernel works with this patch as well.


>
>> 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,

  parent reply	other threads:[~2019-01-28 16:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=f7fc884b-0a7f-17d5-ada4-fc44c08bfba1@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=imammedo@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).