qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.ibm.com>
To: Auger Eric <eric.auger@redhat.com>,
	Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: "Michael S . Tsirkin" <mst@redhat.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	"Bonzini, Paolo" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Philippe Mathieu Daude" <philmd@redhat.com>,
	"Marek Kedzierski" <mkedzier@redhat.com>
Subject: Re: [PATCH v2 4/5] acpi: Enable TPM IRQ
Date: Tue, 16 Jun 2020 10:05:01 -0400	[thread overview]
Message-ID: <dd1175fb-a3af-8c33-c7d5-02dd1e29e2dd@linux.ibm.com> (raw)
In-Reply-To: <ab78ab4a-a3e3-64bb-ff81-413c17c21f24@redhat.com>

On 6/16/20 9:01 AM, Auger Eric wrote:
> Hi Stefan,
>
> On 6/15/20 7:11 PM, Stefan Berger wrote:
>> On 6/15/20 11:13 AM, Marc-André Lureau wrote:
>>>> diff --git a/include/hw/acpi/tpm.h b/include/hw/acpi/tpm.h
>>>> index 1a2a57a21f..063a9eb42a 100644
>>>> --- a/include/hw/acpi/tpm.h
>>>> +++ b/include/hw/acpi/tpm.h
>>>> @@ -24,7 +24,7 @@
>>>>    #define TPM_TIS_ADDR_BASE           0xFED40000
>>>>    #define TPM_TIS_ADDR_SIZE           0x5000
>>>>
>>>> -#define TPM_TIS_IRQ                 5
>>>> +#define TPM_TIS_IRQ                 13
>>
>> Eric,
>>
>>   does this change have any negative side effects on ARM? If you prefer,
>> we can split this part here up into TPM_TIS_ISA_IRQ and TPM_TIS_SYSBUS
>> IRQ and leave the latter at '5' because we know that this is working.
> The IRQ is not advertised in dt nor ACPI on ARM. However it is
> advertised in the capability reg and in the vector. reg So I think this
> should be fixed? I guess on ARM we will pick up a completely different
> IRQ num, allocated from the platform bus slot.


The specification

https://trustedcomputinggroup.org/wp-content/uploads/PC-Client-Specific-Platform-TPM-Profile-for-TPM-2p0-v1p04_r0p37_pub-1.pdf

declares several fields in the Interface Capability Register (table 23, 
pdf page 89) to be mandatory and they must be set to '1'. So I would not 
want to touch those. We can set the interrupt vector register to '0' in 
case interrupts are not supported. Following the spec 0 means that no 
interrupts are supported. I will now split TPM_TIS_IRQ into 
TPM_TIS_ISA_IRQ and TPM_TIS_SYSBUS_IRQ and will in the end set 
TPM_TIS_SYSBUS_IRQ to 'disabled', indicating that IRQs are not 
supported, though they should work even though on ARM there may not be a 
driver to test this with. Does this sound ok?


    Stefan


>
> Thanks
>
> Eric
>>     Stefan
>>
>>
>>>>    #define TPM_TIS_NUM_LOCALITIES      5     /* per spec */
>>>>    #define TPM_TIS_LOCALITY_SHIFT      12
>>>> -- 
>>>> 2.24.1
>>>>



  reply	other threads:[~2020-06-16 14:05 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-15 14:23 [PATCH v2 0/5] tpm: Enable usage of TPM TIS with interrupts Stefan Berger
2020-06-15 14:23 ` [PATCH v2 1/5] tpm_tis: Allow lowering of IRQ also when locality is not active Stefan Berger
2020-06-15 15:06   ` Marc-André Lureau
2020-06-15 15:35     ` Stefan Berger
2020-06-16 12:31   ` Auger Eric
2020-06-15 14:23 ` [PATCH v2 2/5] tpm: Extend TPMIfClass with get_irqnum() function Stefan Berger
2020-06-15 15:11   ` Marc-André Lureau
2020-06-15 15:44     ` Stefan Berger
2020-06-16 12:45       ` Auger Eric
2020-06-15 15:54   ` Philippe Mathieu-Daudé
2020-06-15 16:19     ` Stefan Berger
2020-06-15 14:23 ` [PATCH v2 3/5] tests: Temporarily ignore DSDT table differences Stefan Berger
2020-06-15 15:12   ` Marc-André Lureau
2020-06-16 12:46   ` Auger Eric
2020-06-15 14:23 ` [PATCH v2 4/5] acpi: Enable TPM IRQ Stefan Berger
2020-06-15 15:13   ` Marc-André Lureau
2020-06-15 17:11     ` Stefan Berger
2020-06-16  7:44       ` Auger Eric
2020-06-16 13:01       ` Auger Eric
2020-06-16 14:05         ` Stefan Berger [this message]
2020-06-16 14:36           ` Auger Eric
2020-06-15 14:23 ` [PATCH v2 5/5] tests: Add updated DSDT 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=dd1175fb-a3af-8c33-c7d5-02dd1e29e2dd@linux.ibm.com \
    --to=stefanb@linux.ibm.com \
    --cc=eric.auger@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=mkedzier@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@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).