Hi Edhaya,
Yes, we could get rid of the TPM 2.0 definitions and include the MdePkg definition, but it will require rework of TCG2.h to remove duplicate definitions.
But, what is the general of philosophy of what source code
edk2-test should include from edk2? Since the purpose of
edk2-test is to test the firmware, for some things it seems better
for edk2-test to have it's own private definitions. Otherwise,
if there was an edk2 bug in something like a protocol definition,
and if edk2-test included the same .h file, then the bug may never
be discovered. It's better if edk2-test defines it's own structs
based on the specifications. That way it is independent of the
firmware and it's a better test.
In the case of Tpm20.h, that is probably not the case as those are TPM definitions, not protocol definitions.
Do you want me to try to get rid of the TPM definitions and use
Tpm20.h for this patch series? Or, as a separate patch?
Thanks,
Stuart
Update: We have the struct itself define here:
https://github.com/tianocore/edk2/blob/master/MdePkg/Include/IndustryStandard/Tpm20.h#L904