From: Ilias Apalodimas <ilias.apalodimas@linaro.org>
To: Simon Glass <sjg@chromium.org>
Cc: Heinrich Schuchardt <xypron.glpk@gmx.de>,
Johannes Holland <johannes.holland@infineon.com>,
Masahisa Kojima <masahisa.kojima@linaro.org>,
Dhananjay Phadke <dphadke@linux.microsoft.com>,
U-Boot Mailing List <u-boot@lists.denx.de>
Subject: Re: [PATCH 1/2 v2] tpm2: Introduce TIS tpm core
Date: Tue, 13 Jul 2021 08:51:37 +0300 [thread overview]
Message-ID: <YO0p6dOA0LriRwAK@enceladus> (raw)
In-Reply-To: <CAPnjgZ1o_dufsGbF0Mdf_KCMgNzOKtkgvmdOTAXL9D07hAavxA@mail.gmail.com>
Hi Simon,
> > >
[...]
> > > Yes, but I hope you see my point, that you have added a new interface.
> > > It is definitely better than adding a new driver and duplicating all
> > > the code, but it is still one more copy and in fact, the code is
> > > duplicated.
> > >
> >
> > I get the point but I don't exactly agree here. It's not duplicated code.
> > We need to plug in the mmio driver. The original code was just doing what
> > every TPM does. It carried the TIS relevant code in the new driver.
> > The new approach defines an API for everyone to use and the new driver uses it.
> > So I don't see the duplication here. You need the TIS code one way or the
> > other. Now it's on a common interface for everyone to use.
>
> Well how about converting a TPM blindly and then we'll find someone to test it?
Let's do the cr50
>
> >
> > > Can you get access to TPM hardware? I see that you have offered to be
> > > the maintainer for this subsystem, so I think that would be useful.
> > > Can sandbox use your new API?
> >
> > It depends, is the sandbox TIS compatible? If it is sure we could use it.
>
> At present sandbox implements the tpm_ops API. So if we did that we
> would need to tear it apart to insert this new API as well.
Ok then that might make too much sense for the sandbox.
>
> > I offered to maintain the drivers because I wrote the API and I have an
> > idea of how TPMs should work. If that means I'll have to go and get every
> > hardware we support, I'll just volunteer into maintaining the TIS layer.
> > Moreover I dont see why I should start porting drivers to use that API.
> > People decided to duplicate that code in every driver (in fact multiple times).
>
> See https://xkcd.com/927/ :-)
>
Yea I don't disagree with that. That's one of the points of adding myself
as a maintainer for the entire tpm/drivers/*. I can just reply 'no thanks'
at least for new drivers that don't use it. But frankly I don't see why,
adding a new drivers, while using the TIS API boils down to a few lines of
code defining the bus accesses
> >
> > I am happy to work with you on the cr50 i2c driver if that would help.
>
> Sure that might be easier as I can definitely test it.
Ok, let me have a look at that, I still think the patch should go in
regardless though. We can always send a follow up for cr50 once we are
done testing
Cheers
/Ilias
>
> Regards,
> Siomn
next prev parent reply other threads:[~2021-07-13 5:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-07 16:25 [PATCH 1/2 v2] tpm2: Introduce TIS tpm core Ilias Apalodimas
2021-07-07 16:25 ` [PATCH 2/2] tpm2: Add a TPMv2 MMIO TIS driver Ilias Apalodimas
2021-07-11 0:00 ` Simon Glass
2021-07-12 18:22 ` Ilias Apalodimas
2021-07-12 19:13 ` Heinrich Schuchardt
2021-07-12 19:43 ` Simon Glass
2021-07-12 22:46 ` Heinrich Schuchardt
2021-07-13 16:52 ` Simon Glass
2021-07-12 19:38 ` Simon Glass
2021-07-13 20:11 ` Ilias Apalodimas
2021-07-14 2:49 ` Simon Glass
2021-07-14 5:23 ` Ilias Apalodimas
2021-07-14 19:50 ` Simon Glass
2021-07-11 0:00 ` [PATCH 1/2 v2] tpm2: Introduce TIS tpm core Simon Glass
2021-07-12 6:24 ` Ilias Apalodimas
2021-07-12 11:42 ` Simon Glass
2021-07-12 14:03 ` Ilias Apalodimas
2021-07-12 19:43 ` Simon Glass
2021-07-13 5:51 ` Ilias Apalodimas [this message]
2021-07-13 20:17 ` Simon Glass
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=YO0p6dOA0LriRwAK@enceladus \
--to=ilias.apalodimas@linaro.org \
--cc=dphadke@linux.microsoft.com \
--cc=johannes.holland@infineon.com \
--cc=masahisa.kojima@linaro.org \
--cc=sjg@chromium.org \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/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