<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.</font></tt><br><br><tt><font size=2>We're working on it...</font></tt><br><br><br><tt><font size=2>So maybe you have some comments to the following:</font></tt><br><br><tt><font size=2>There will be a patch for probing the TPM TIS hardware
interface for whether there's a TPM 1.2 or a TPM 2.</font></tt><br><tt><font size=2>We then have a patch for prefixing all TPM 1.2 functions
with tpm12_ and then introduce functions like these ones here:</font></tt><br><br><tt><font size=2>static ... tpm12_foo() { ... }</font></tt><br><tt><font size=2>static ... tpm2_foo() { ... }</font></tt><br><br><tt><font size=2>tpm_foo()</font></tt><br><tt><font size=2>{</font></tt><br><tt><font size=2>    [...]</font></tt><br><br><tt><font size=2>    switch (tpmversion) {</font></tt><br><tt><font size=2>    case TPM_VERSION_1_2:</font></tt><br><tt><font size=2>        tpm12_foo()</font></tt><br><tt><font size=2>        break;</font></tt><br><tt><font size=2>    case TPM_VERSION_2:</font></tt><br><tt><font size=2>        tpm2_foo();</font></tt><br><tt><font size=2>        break;</font></tt><br><tt><font size=2>    }</font></tt><br><br><tt><font size=2>    [...]</font></tt><br><tt><font size=2>}</font></tt><br><br><tt><font size=2>That way the probing will lead us to use either TPM1.2
or TPM 2 specific code. There will be multiple such constructs in tcgbios.c
file.</font></tt><br><br><tt><font size=2>   Stefan</font></tt><br><BR>