Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-25 Thread Jarkko Sakkinen
On Fri, Aug 25, 2017 at 12:28:21PM -0500, Jiandi An wrote: > > > On 08/25/2017 11:53 AM, Jason Gunthorpe wrote: > > On Fri, Aug 25, 2017 at 07:21:39PM +0300, Jarkko Sakkinen wrote: > > > As I said before it would make much more sense to make code always deal > > > with sm and remove flags complet

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-25 Thread Jiandi An
On 08/25/2017 11:53 AM, Jason Gunthorpe wrote: On Fri, Aug 25, 2017 at 07:21:39PM +0300, Jarkko Sakkinen wrote: As I said before it would make much more sense to make code always deal with sm and remove flags completely. That would help maintaining code easier as new logic for TZ is introduced

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-25 Thread Jason Gunthorpe
On Fri, Aug 25, 2017 at 07:21:39PM +0300, Jarkko Sakkinen wrote: > As I said before it would make much more sense to make code always deal > with sm and remove flags completely. That would help maintaining code > easier as new logic for TZ is introduced. Yes please Jason

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-25 Thread Jarkko Sakkinen
On Thu, Aug 24, 2017 at 12:20:35PM -0500, Jiandi An wrote: > I know they don't change the logic. This was to address comment from Jason. > He wanted to express the exact condition which crb_go_idle(), > crb_cmd_ready(), and the check for "Bad ACPI memory layout" in > crb_map_io() should run, inste

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-24 Thread Jiandi An
On 08/24/2017 07:26 AM, Jarkko Sakkinen wrote: On Tue, Aug 22, 2017 at 04:28:54PM -0500, Jiandi An wrote: > > { - if ((priv->flags & CRB_FL_ACPI_START) || - (priv->flags & CRB_FL_CRB_SMC_START)) - return 0; - - iowrite32(CRB_CTRL_REQ_GO_IDLE, &priv->regs_

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-24 Thread Jarkko Sakkinen
On Tue, Aug 22, 2017 at 04:28:54PM -0500, Jiandi An wrote: > > > { > > > - if ((priv->flags & CRB_FL_ACPI_START) || > > > - (priv->flags & CRB_FL_CRB_SMC_START)) > > > - return 0; > > > - > > > - iowrite32(CRB_CTRL_REQ_GO_IDLE, &priv->regs_t->ctrl_req); > > > - /* we don't really care

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-22 Thread Jason Gunthorpe
On Tue, Aug 22, 2017 at 04:28:54PM -0500, Jiandi An wrote: > I'm sorry perhaps I didn't fully understand the workaround specific to Intel > PPT. In previous patch thread, you mentioned the following where > a platform could report to require start method 2 (ACPI start) which is > sm = ACPI_TPM2_S

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-22 Thread Jiandi An
On 08/22/2017 12:39 PM, Jarkko Sakkinen wrote: On Thu, Aug 17, 2017 at 11:15:36PM -0500, Jiandi An wrote: For ARM64, the locality is handled by Trust Zone in FW. The layout does not have crb_regs_head. It is hitting the following line. dev_warn(dev, FW_BUG "Bad ACPI memory layout"); Current

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-22 Thread Jarkko Sakkinen
On Thu, Aug 17, 2017 at 11:15:36PM -0500, Jiandi An wrote: > For ARM64, the locality is handled by Trust Zone in FW. > The layout does not have crb_regs_head. It is hitting > the following line. > dev_warn(dev, FW_BUG "Bad ACPI memory layout"); > > Current code excludes CRB_FL_ACPI_START and when

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-22 Thread Jarkko Sakkinen
On Sun, Aug 20, 2017 at 10:41:38PM -0500, Jiandi An wrote: > > > On 08/19/2017 12:05 PM, Jarkko Sakkinen wrote: > > On Thu, Aug 17, 2017 at 11:15:36PM -0500, Jiandi An wrote: > > > For ARM64, the locality is handled by Trust Zone in FW. > > > The layout does not have crb_regs_head. It is hitting

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-20 Thread Jiandi An
On 08/19/2017 12:05 PM, Jarkko Sakkinen wrote: On Thu, Aug 17, 2017 at 11:15:36PM -0500, Jiandi An wrote: For ARM64, the locality is handled by Trust Zone in FW. The layout does not have crb_regs_head. It is hitting the following line. dev_warn(dev, FW_BUG "Bad ACPI memory layout"); Current

Re: [PATCH] tpm/tpm_crb: Access locality for non-ACPI and non-SMC start method

2017-08-19 Thread Jarkko Sakkinen
On Thu, Aug 17, 2017 at 11:15:36PM -0500, Jiandi An wrote: > For ARM64, the locality is handled by Trust Zone in FW. > The layout does not have crb_regs_head. It is hitting > the following line. > dev_warn(dev, FW_BUG "Bad ACPI memory layout"); > > Current code excludes CRB_FL_ACPI_START and when