<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=utf-8">
<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:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:BookmanOldStyle;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:SimSun;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:SimSun;}
p.defangedmsonormal, li.defangedmsonormal, div.defangedmsonormal
        {mso-style-name:defangedmsonormal;
        mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:SimSun;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:black;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Hi Jason:<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">   The behavior is defined in PFP spec v0.51 Chapter 8.   2 ACPI measuring points don’t  comply with PFP spec. All ACPI DATA for EV_POST_CODE must be measured before
 fixup.<o:p></o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">Tks for pointing it.
<o:p></o:p></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><a name="_____replyseparator"></a><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Yao, Jiewen
<br>
<b>Sent:</b> Wednesday, June 26, 2019 12:08 AM<br>
<b>To:</b> devel@edk2.groups.io; jason.spottswood@hpe.com<br>
<b>Cc:</b> Zhang, Chao B <chao.b.zhang@intel.com>; Yao, Jiewen <jiewen.yao@intel.com><br>
<b>Subject:</b> RE: [edk2-devel] TPM ACPI HID creation<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D">Thanks Jason.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D">I think we should NOT measure TPM2 table *<b>after</b>* ACPI table patch.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D">The measurement should happen *<b>before</b>* ACPI table patch.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D">Hi Chao<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D">Do you agree on that?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D">Thank you<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D">Yao Jiewen<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> [<a href="mailto:devel@edk2.groups.io">mailto:devel@edk2.groups.io</a>]
<b>On Behalf Of </b><a href="mailto:jason.spottswood@hpe.com">jason.spottswood@hpe.com</a><br>
<b>Sent:</b> Tuesday, June 25, 2019 11:58 PM<br>
<b>To:</b> <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a><br>
<b>Subject:</b> [edk2-devel] TPM ACPI HID creation<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Tcg2Smm.c has a function "UpdateHID to create the ACPI HID for the TPM.  This function uses the TPM vendor ID combined with the firmware version number to create the ACPI HID.  The use of the TPM firmware version is not specified in any
 spec from the TCG or otherwise that I have been able to find.  I believe this was a design choice specific to EDK2.  However, using the TPM firmware version does not match the intended use case from the TCG PC Client spec, where the HID should be comprised
 of the vendor ID and device ID.  See below.  One problem that arises from this design is that the ACPI tables will change when the TPM FW has been updated.  Since the ACPI tables are hashed into PCR[0], it consequently means that a TPM FW change will cause
 a change to PCR[0].  It is not intuitive nor spec'd that TPM FW be included in PCR[0] measurements.  In fact, PCR[0] is used only for system FW/UEFI code measurements.  If a user does not update UEFI, then there is no expectation of PCR[0] measurement changes. 
 I propose that EDK2 change the UpdateHID function to use the vendor ID and device ID read from register TPM_DID_VID_0 (locality 0 offset 0xF00) in the creation of the ACPI HID.<br>
<br>
The following was taken from the TCG PC Client Platform Firmware spec:<o:p></o:p></p>
<p class="defangedmsonormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-family:BookmanOldStyle">According to the ACPI Specification (version 5, Errata A, Section 6.1.5 and 6.1.3) a</span><o:p></o:p></p>
<p class="defangedmsonormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-family:BookmanOldStyle">hardware ID or compatibility ID is either a PNP ID with format “AAA####” or ACPI ID</span><o:p></o:p></p>
<p class="defangedmsonormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-family:BookmanOldStyle">with format “NNNN####”. The manufacturer ID returned by a TPM2_GetCapability</span><o:p></o:p></p>
<p class="defangedmsonormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-family:BookmanOldStyle">command can be used to set the “AAA” or “NNNN” portion of the ID. The remaining four</span><o:p></o:p></p>
<p class="defangedmsonormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-family:BookmanOldStyle">hexadecimal digits should be set to a
<span style="background:yellow;mso-highlight:yellow">value that allows software to differentiate different</span></span><o:p></o:p></p>
<p class="defangedmsonormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-family:BookmanOldStyle;background:yellow;mso-highlight:yellow">device classes built by the same manufacturer</span><span style="font-family:BookmanOldStyle">.</span><o:p></o:p></p>
<div>
<p class="MsoNormal"></o:p></span></p>
</div>
</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/42848">View/Reply Online (#42848)</a> |


  


|


  
    <a target="_blank" href="https://groups.io/mt/32205028/1813853">Mute This Topic</a>
  

| <a href="https://edk2.groups.io/g/devel/post">New Topic</a><br>



<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>