<tt><font size=2>Wim Vervoorn <wvervoorn@eltan.com> wrote on 12/22/2015
08:43:54 AM:<br><br>> <br>> Hello Stefan,</font></tt><br><tt><font size=2>>  </font></tt><br><tt><font size=2>> I have my doubts. This will work fine as long
as the toplevel <br>> function tpm_foo() in your example can be implemented to have a <br>> single API independent of the required support. If the API differs
<br>> between the tpm 1.2 and tpm 2.0 case I think it will only be confusing
things.</font></tt><br><tt><font size=2>>  </font></tt><br><tt><font size=2>> Given the differences between tpm 1.2 and 2.0
do you think you will <br>> be able to maintain this single API?</font></tt><br><br><tt><font size=2>The top level function tpm_foo() will be called by
other SeaBIOS code for doing TPM initialization, </font></tt><br><tt><font size=2>measurements, the menu, S3 resume, and for the BIOS
API. For the API we would support the same API</font></tt><br><tt><font size=2>for TPM 1.2 and for TPM 2. The difference between
the tpm12_foo and tpm2_foo functions are mainly</font></tt><br><tt><font size=2>that different TPM commands are created and sent to
the TIS. So far, this works fine.</font></tt><br><br><tt><font size=2>Do you have concrete concerns regarding this? How
else would you do it ?</font></tt><br><br><tt><font size=2>Regards,</font></tt><br><tt><font size=2>   Stefan</font></tt><br><br><tt><font size=2>>  </font></tt><br><tt><font size=2>>  </font></tt><br><tt><font size=2>> Best Regards,</font></tt><br><tt><font size=2>> Wim Vervoorn</font></tt><br><tt><font size=2>>  </font></tt><br><tt><font size=2>> Eltan B.V.</font></tt><br><tt><font size=2>> Ambachtstraat 23</font></tt><br><tt><font size=2>> 5481 SM Schijndel</font></tt><br><tt><font size=2>> The Netherlands</font></tt><br><tt><font size=2>>  </font></tt><br><tt><font size=2>> T : +31-(0)73-594 46 64</font></tt><br><tt><font size=2>> E : wvervoorn@eltan.com</font></tt><br><tt><font size=2>> W : </font></tt><a href=http://www.eltan.com/><tt><font size=2>http://www.eltan.com</font></tt></a><br><tt><font size=2>> "THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION.
UNLESS YOU ARE THE <br>> INTENDED RECIPIENT OF THIS MESSAGE, ANY USE OF THIS MESSAGE IS <br>> STRICTLY PROHIBITED. IF YOU HAVE RECEIVED THIS MESSAGE IN ERROR, <br>> PLEASE IMMEDIATELY NOTIFY THE SENDER BY TELEPHONE +31-(0)73-5944664
<br>> OR REPLY EMAIL, AND IMMEDIATELY DELETE THIS MESSAGE AND ALL COPIES."
</font></tt><br><tt><font size=2>>  </font></tt><br><tt><font size=2>>  </font></tt><br><tt><font size=2>>  </font></tt><br><tt><font size=2>>  </font></tt><br><tt><font size=2>> From: Stefan Berger [</font></tt><a href=mailto:stefanb@us.ibm.com><tt><font size=2>mailto:stefanb@us.ibm.com</font></tt></a><tt><font size=2>]
<br>> Sent: Monday, December 21, 2015 5:50 PM<br>> To: Kevin O'Connor <kevin@koconnor.net><br>> Cc: seabios@seabios.org; Wim Vervoorn <wvervoorn@eltan.com><br>> Subject: Re: [SeaBIOS] SeaBIOS Digest, Vol 72, Issue 33</font></tt><br><tt><font size=2>>  </font></tt><br><tt><font size=2>> "Kevin O'Connor" <kevin@koconnor.net>
wrote on 12/17/2015 05:22:56 PM:<br>> <br>> > <br>> > On Mon, Nov 30, 2015 at 11:32:05AM +0000, Wim Vervoorn wrote:<br>> > > Hello,<br>> > > <br>> > > I noticed that a lot of work is going on for the TPM support
in SeaBIOS.<br>> > > <br>> > > All of this work is TPM 1.2 based. I was wondering if there
are any<br>> > > plans to support TPM 2.0 in the future.<br>> > <br>> > I'm not aware of any plans.<br>> <br>> We're working on it...<br>> <br>> <br>> So maybe you have some comments to the following:<br>> <br>> There will be a patch for probing the TPM TIS hardware interface for<br>> whether there's a TPM 1.2 or a TPM 2.<br>> We then have a patch for prefixing all TPM 1.2 functions with tpm12_<br>> and then introduce functions like these ones here:<br>> <br>> static ... tpm12_foo() { ... }<br>> static ... tpm2_foo() { ... }<br>> <br>> tpm_foo()<br>> {<br>>     [...]<br>> <br>>     switch (tpmversion) {<br>>     case TPM_VERSION_1_2:<br>>         tpm12_foo()<br>>         break;<br>>     case TPM_VERSION_2:<br>>         tpm2_foo();<br>>         break;<br>>     }<br>> <br>>     [...]<br>> }<br>> <br>> That way the probing will lead us to use either TPM1.2 or TPM 2 <br>> specific code. There will be multiple such constructs in tcgbios.c
file.<br>> <br>>    Stefan</font></tt><BR>