<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.EmailStyle21
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">CI failed: <a href="https://github.com/tianocore/edk2/pull/2173">
https://github.com/tianocore/edk2/pull/2173</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Would you please try CI by yourself?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> devel@edk2.groups.io <devel@edk2.groups.io> <b>
On Behalf Of </b>Yao, Jiewen<br>
<b>Sent:</b> Thursday, November 4, 2021 9:40 PM<br>
<b>To:</b> Gonzalez Del Cueto, Rodrigo <rodrigo.gonzalez.del.cueto@intel.com>; devel@edk2.groups.io<br>
<b>Cc:</b> Wang, Jian J <jian.j.wang@intel.com><br>
<b>Subject:</b> Re: [edk2-devel] [PATCH] SecurityPkg: TPM must go to Idle state on CRB command completion.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Reviewed-by: Jiewen Yao <<a href="mailto:Jiewen.yao@intel.com">Jiewen.yao@intel.com</a>><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Gonzalez Del Cueto, Rodrigo <<a href="mailto:rodrigo.gonzalez.del.cueto@intel.com">rodrigo.gonzalez.del.cueto@intel.com</a>>
<br>
<b>Sent:</b> Saturday, October 30, 2021 5:34 AM<br>
<b>To:</b> Yao, Jiewen <<a href="mailto:jiewen.yao@intel.com">jiewen.yao@intel.com</a>>;
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a><br>
<b>Cc:</b> Wang, Jian J <<a href="mailto:jian.j.wang@intel.com">jian.j.wang@intel.com</a>><br>
<b>Subject:</b> Re: [PATCH] SecurityPkg: TPM must go to Idle state on CRB command completion.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Hi Jiewen,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">I have tested the proposed CRB protocol fix with three different TPM configurations I have available which support the CRB interface: Intel PTT, STMicro and Nuvoton. Under
these CRB configurations I didn't observe any issues arising from the proposed change aligning with the TCG CRB protocol definition.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">I verified the BIOS flows were unaffected and completed without errors and that the OS was still able to interact with the TPM.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Regards,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">-Rodrigo<o:p></o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="color:black">From:</span></b><span style="color:black"> Yao, Jiewen <<a href="mailto:jiewen.yao@intel.com">jiewen.yao@intel.com</a>><br>
<b>Sent:</b> Sunday, August 8, 2021 6:27 PM<br>
<b>To:</b> Gonzalez Del Cueto, Rodrigo <<a href="mailto:rodrigo.gonzalez.del.cueto@intel.com">rodrigo.gonzalez.del.cueto@intel.com</a>>;
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>><br>
<b>Cc:</b> Wang, Jian J <<a href="mailto:jian.j.wang@intel.com">jian.j.wang@intel.com</a>><br>
<b>Subject:</b> RE: [PATCH] SecurityPkg: TPM must go to Idle state on CRB command completion.</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Would you please tell us how many TPM2 chip you have tested?<br>
<br>
I think we need consider the compatibility of exiting TPM2 chips, to make sure the code still work.<br>
<br>
<br>
Thank you<br>
Yao Jiewen<br>
<br>
> -----Original Message-----<br>
> From: Gonzalez Del Cueto, Rodrigo <<a href="mailto:rodrigo.gonzalez.del.cueto@intel.com">rodrigo.gonzalez.del.cueto@intel.com</a>><br>
> Sent: Saturday, July 17, 2021 5:18 AM<br>
> To: <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a><br>
> Cc: Gonzalez Del Cueto, Rodrigo <<a href="mailto:rodrigo.gonzalez.del.cueto@intel.com">rodrigo.gonzalez.del.cueto@intel.com</a>>;<br>
> Wang, Jian J <<a href="mailto:jian.j.wang@intel.com">jian.j.wang@intel.com</a>>; Yao, Jiewen <<a href="mailto:jiewen.yao@intel.com">jiewen.yao@intel.com</a>><br>
> Subject: [PATCH] SecurityPkg: TPM must go to Idle state on CRB command<br>
> completion.<br>
> <br>
> To follow the TCG CRB protocol specification, on every CRB TPM command<br>
> completion the TPM should return to Idle state, regardless of the<br>
> CRB Idle Bypass capability reported by the TPM device.<br>
> <br>
> See: TCG PC Client Device Driver Design Principles for TPM 2.0,<br>
> Version 1.0, Rev 0.27<br>
> <br>
> Signed-off-by: Rodrigo Gonzalez del Cueto<br>
> <<a href="mailto:rodrigo.gonzalez.del.cueto@intel.com">rodrigo.gonzalez.del.cueto@intel.com</a>><br>
> Cc: Jian J Wang <<a href="mailto:jian.j.wang@intel.com">jian.j.wang@intel.com</a>><br>
> Cc: Jiewen Yao <<a href="mailto:jiewen.yao@intel.com">jiewen.yao@intel.com</a>><br>
> ---<br>
> SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c | 12 +-----------<br>
> 1 file changed, 1 insertion(+), 11 deletions(-)<br>
> <br>
> diff --git a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c<br>
> b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c<br>
> index f1f8091683..34e3874a5b 100644<br>
> --- a/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c<br>
> +++ b/SecurityPkg/Library/Tpm2DeviceLibDTpm/Tpm2Ptp.c<br>
> @@ -310,7 +310,7 @@ PtpCrbTpmCommand (<br>
> // Command completed, but buffer is not enough<br>
> //<br>
> Status = EFI_BUFFER_TOO_SMALL;<br>
> - goto GoReady_Exit;<br>
> + goto GoIdle_Exit;<br>
> }<br>
> *SizeOut = TpmOutSize;<br>
> //<br>
> @@ -328,16 +328,6 @@ PtpCrbTpmCommand (<br>
> DEBUG ((EFI_D_VERBOSE, "\n"));<br>
> );<br>
> <br>
> -GoReady_Exit:<br>
> - //<br>
> - // Goto Ready State if command is completed successfully and TPM support<br>
> IdleBypass<br>
> - // If not supported. flow down to GoIdle<br>
> - //<br>
> - if (GetCachedIdleByPass () == 1) {<br>
> - MmioWrite32((UINTN)&CrbReg->CrbControlRequest,<br>
> PTP_CRB_CONTROL_AREA_REQUEST_COMMAND_READY);<br>
> - return Status;<br>
> - }<br>
> -<br>
> //<br>
> // Do not wait for state transition for TIMEOUT_C<br>
> // This function will try to wait 2 TIMEOUT_C at the beginning in next call.<br>
> --<br>
> 2.31.1.windows.1<o:p></o:p></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal"></o:p></span></p>
</div>
</div>
</body>
</html>
<div width="1" style="color:white;clear:both">_._,_._,_</div> <hr> Groups.io Links:<p> You receive all messages sent to this group. <p> <a target="_blank" href="https://edk2.groups.io/g/devel/message/83344">View/Reply Online (#83344)</a> | | <a target="_blank" href="https://groups.io/mt/84258803/1813853">Mute This Topic</a> | <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br> <a href="https://edk2.groups.io/g/devel/editsub/1813853">Your Subscription</a> | <a href="mailto:devel+owner@edk2.groups.io">Contact Group Owner</a> | <a href="https://edk2.groups.io/g/devel/unsub">Unsubscribe</a> [edk2-devel-archive@redhat.com]<br> <div width="1" style="color:white;clear:both">_._,_._,_</div>