All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiandi An <anjiandi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
To: Jason Gunthorpe
	<jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
Cc: rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	lv.zheng-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org,
	lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Subject: Re: [PATCH 3/3] tpm/tpm_crb: Enable TPM CRB interface for ARM64
Date: Fri, 10 Mar 2017 13:50:04 -0600	[thread overview]
Message-ID: <58C3036C.2050808@codeaurora.org> (raw)
In-Reply-To: <20170310170216.GD22960-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>

On 03/10/17 11:02, Jason Gunthorpe wrote:
> On Fri, Mar 10, 2017 at 03:58:09AM -0600, Jiandi An wrote:
>
>>   	tristate "TPM 2.0 CRB Interface"
>> -	depends on X86 && ACPI
>> +	depends on (X86 || ARM64) && ACPI
>
> Oh, and why is the X86 even here?
>
> Surely it should just be 'depends on ACPI'? I don't remember anything
> x86 specific in CRB?
>
> Jason
>

During testing of my patches on ARM64, I hit crb_cmd_ready() and
crb_go_idle() that fails.  Looking at the comment and commit history,
it was added for fixing Intel PTT hw bug in Skylake and Broxton.
The functions themselves do nothing if flag is CRB_FL_ACPI_START.
I added CRB_FL_CRB_SMC_START which is the new ARM64 start method for
those two functions to also do nothing.  So crb_cmd_ready() and
crb_go_idle() are only for when CRB_FL_ACPI_START.

And in crb_acpi_add(), there is also comments on what drives
CRB_FL_CRB_START to be set.  ACPI_TPM2_COMMAND_BUFFER or
ACPI_TPM2_MEMORY_MAPPED

/* The reason for the extra quirk is that the PTT in 4th Gen Core CPUs
  * report only ACPI start but in practice seems to require both
  * ACPI start and CRB start.
  */

I didn't have too much background on the CRB driver for X86.  I
thought to be safe just or in ARM64.  But if you see no issues,
I'll remove (X86 || ARM64) and just make it depend on ACPI.

Thanks.
- Jiandi

-- 
Qualcomm Datacenter Technologies, Inc.
as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.

------------------------------------------------------------------------------
Announcing the Oxford Dictionaries API! The API offers world-renowned
dictionary content that is easy and intuitive to access. Sign up for an
account today to start using our lexical data to power your apps and
projects. Get started today and enter our developer competition.
http://sdm.link/oxford

  parent reply	other threads:[~2017-03-10 19:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10  9:58 [PATCH 0/3] tpm/tpm_crb: Enable TPM CRB interface for ARM64 Jiandi An
     [not found] ` <1489139889-14376-1-git-send-email-anjiandi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-03-10  9:58   ` [PATCH 1/3] ACPICA: Update TPM2 ACPI table Jiandi An
     [not found]     ` <1489139889-14376-2-git-send-email-anjiandi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-03-10 15:35       ` Moore, Robert
     [not found]         ` <94F2FBAB4432B54E8AACC7DFDE6C92E37E56A917-8oqHQFITsIHTXloPLtfHfbfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2017-03-10 18:10           ` Jiandi An
2017-03-11  8:19       ` Jarkko Sakkinen
     [not found]         ` <20170311081914.k5qrbfwmjfb3fa7e-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-11 21:18           ` Jiandi An
     [not found]             ` <58C4698B.3030601-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-03-13 11:43               ` Jarkko Sakkinen
2017-03-10  9:58   ` [PATCH 2/3] tpm: Add start method for ARM Secure Monitor Call Jiandi An
     [not found]     ` <1489139889-14376-3-git-send-email-anjiandi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-03-10 17:00       ` Jason Gunthorpe
     [not found]         ` <20170310170017.GB22960-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-11  0:44           ` Jiandi An
2017-03-11  8:39       ` Jarkko Sakkinen
2017-03-10  9:58   ` [PATCH 3/3] tpm/tpm_crb: Enable TPM CRB interface for ARM64 Jiandi An
     [not found]     ` <1489139889-14376-4-git-send-email-anjiandi-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-03-10 17:01       ` Jason Gunthorpe
     [not found]         ` <20170310170113.GC22960-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-11  0:45           ` Jiandi An
2017-03-10 17:02       ` Jason Gunthorpe
     [not found]         ` <20170310170216.GD22960-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
2017-03-10 19:50           ` Jiandi An [this message]
2017-03-11  8:42           ` Jarkko Sakkinen
2017-03-11  8:42       ` Jarkko Sakkinen
     [not found]         ` <20170311084244.shypuhzdtvppscye-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-03-11 20:40           ` Jiandi An
     [not found]             ` <58C460BE.2090109-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
2017-03-13 11:42               ` Jarkko Sakkinen

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=58C3036C.2050808@codeaurora.org \
    --to=anjiandi-sgv2jx0feol9jmxxk+q4oq@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=lenb-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=lv.zheng-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=rafael.j.wysocki-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    --cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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 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.