Hello Stefan,

I have my doubts. This will work fine as long as the toplevel function 
tpm_foo() in your example can be implemented to have a single API independent 
of the required support. If the API differs between the tpm 1.2 and tpm 2.0 
case I think it will only be confusing things.

Given the differences between tpm 1.2 and 2.0 do you think you will be able to 
maintain this single API?


Best Regards,
Wim Vervoorn

Eltan B.V.
Ambachtstraat 23
5481 SM Schijndel
The Netherlands

T : +31-(0)73-594 46 64
E : [email protected]
W : http://www.eltan.com
"THIS MESSAGE CONTAINS CONFIDENTIAL INFORMATION. UNLESS YOU ARE THE INTENDED 
RECIPIENT OF THIS MESSAGE, ANY USE OF THIS MESSAGE IS STRICTLY PROHIBITED. IF 
YOU HAVE RECEIVED THIS MESSAGE IN ERROR, PLEASE IMMEDIATELY NOTIFY THE SENDER 
BY TELEPHONE +31-(0)73-5944664 OR REPLY EMAIL, AND IMMEDIATELY DELETE THIS 
MESSAGE AND ALL COPIES."




From: Stefan Berger [mailto:[email protected]]
Sent: Monday, December 21, 2015 5:50 PM
To: Kevin O'Connor <[email protected]>
Cc: [email protected]; Wim Vervoorn <[email protected]>
Subject: Re: [SeaBIOS] SeaBIOS Digest, Vol 72, Issue 33

"Kevin O'Connor" <[email protected]<mailto:[email protected]>> wrote on 
12/17/2015 05:22:56 PM:

>
> On Mon, Nov 30, 2015 at 11:32:05AM +0000, Wim Vervoorn wrote:
> > Hello,
> >
> > I noticed that a lot of work is going on for the TPM support in SeaBIOS.
> >
> > All of this work is TPM 1.2 based. I was wondering if there are any
> > plans to support TPM 2.0 in the future.
>
> I'm not aware of any plans.

We're working on it...


So maybe you have some comments to the following:

There will be a patch for probing the TPM TIS hardware interface for whether 
there's a TPM 1.2 or a TPM 2.
We then have a patch for prefixing all TPM 1.2 functions with tpm12_ and then 
introduce functions like these ones here:

static ... tpm12_foo() { ... }
static ... tpm2_foo() { ... }

tpm_foo()
{
    [...]

    switch (tpmversion) {
    case TPM_VERSION_1_2:
        tpm12_foo()
        break;
    case TPM_VERSION_2:
        tpm2_foo();
        break;
    }

    [...]
}

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.

   Stefan
_______________________________________________
SeaBIOS mailing list
[email protected]
http://www.seabios.org/mailman/listinfo/seabios

Reply via email to