Hi Min,

Please find my response inline marked [SAMI].

Regards,

Sami Mujawar

On Tue, Oct 26, 2021 at 10:19 PM, Min Xu wrote:
+ if (TdProtocol != NULL) {
+ TdEvent = CreateTdEventFromTcg2Event (TdProtocol, Tcg2Event,
EventSize);
+ if (TdEvent == NULL) {
+ goto Exit;
[SAMI] I think Status should be set to reflect an appropriate error code here.
I am thinking if TCG2_PROTOCOL and TEE_PROTOCOL will be installed in the same time?
1) If these 2 protocols are NOT installed in the same time, then the returned status reflect the actual operation result of the protocol.
2) If these 2 protocols can be installed in the same time, then it will be a problem that the how to reflect the operation result of the protocols by the status?
I prefer 1) that these 2 protocols are NOT installed in the same time. Because it doesn't make sense to measure the boot in 2 times.
What's your suggestion?
[SAMI] I don't know if there is a use-case for both the protocols to be installed at the same time. But, I would agree it would not make sense to measure twice.
BTW, CreateTdEventFromTcg2Event will be updated to return a status to indicate the operation result. So that the status can reflect an appropriate error code.