<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 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:SimSun;
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:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Verdana;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
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;}
span.hoenzb
{mso-style-name:hoenzb;}
span.EmailStyle18
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Hi Alex & Jeffrey,
<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks for your comments, I don’t aware my mark solution not work in this mail list. Attach my change code for you to reference. I think the old code logic
not consistent. PS: 12345678<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I missed the latest 6.1 spec, I just check the 6.0 spec and not found this sentence.
</span><span style="font-family:"Verdana","sans-serif"">"If the X_PM1b_CNT_BLK field contains a non-zero value then this field must be zero."
</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">This is new added for 6.1 spec.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Eric<o:p></o:p></span></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 #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Alex Hung [mailto:alex.hung@canonical.com]
<br>
<b>Sent:</b> Thursday, December 08, 2016 1:38 AM<br>
<b>To:</b> Jeffrey Hugo<br>
<b>Cc:</b> Dong, Eric; fwts-devel@lists.ubuntu.com<br>
<b>Subject:</b> Re: Issues in fadt check item?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-family:"Verdana","sans-serif"">I agree with Jeffrey that's actually not a fix: ACPI 6.1 explicitly states PM1b_CNT_BLK to meet "If the X_PM1b_CNT_BLK field contains a non-zero value then this
field must be zero." The same also applies to PM2_CNT_BLK.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-family:"Verdana","sans-serif"">Many systems are shipped before ACPI 6.1's release, and this failure is odd for them. I think it is a case this error can be ignored. However, you should try to meet ACPI 6.1 spec if a
target system is being developed.<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Wed, Dec 7, 2016 at 7:36 AM, Jeffrey Hugo <<a href="mailto:jhugo@codeaurora.org" target="_blank">jhugo@codeaurora.org</a>> wrote:<o:p></o:p></p>
<p class="MsoNormal">Hi Eric<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
<br>
On 12/7/2016 5:51 AM, Dong, Eric wrote:<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">Hi,<br>
<br>
<br>
<br>
When I use fwts to check uefi bios code, it reports some issues related<br>
to fadt check item. After check the uefi code and acpi spec, I didn’t<br>
find error for uefi code. So I download fwts code (fwts_16.11.00) and i<br>
think some bugs in the fadt check item.<br>
<br>
One issue like below:<br>
<br>
static void acpi_table_check_fadt_pm2_cnt_blk(fwts_framework *fw)<br>
<br>
{<br>
<br>
if (fadt->pm2_cnt_blk == 0 && fadt->header.length < 208) {<br>
<br>
fwts_skipped(fw, "FADT PM2_CNT_BLK not<br>
being used.");<br>
<br>
return;<br>
<br>
}<br>
<br>
<br>
<br>
if (fadt->pm2_cnt_blk == 0 &&<br>
fadt->x_pm2_cnt_blk.address == 0) {<br>
<br>
fwts_skipped(fw, "FADT PM2_CNT_BLK not<br>
being used.");<br>
<br>
return;<br>
<br>
}<br>
<br>
<br>
<br>
if ((fadt->pm2_cnt_blk != 0 &&<br>
fadt->x_pm2_cnt_blk.address == 0) ||<br>
<br>
(fadt->pm2_cnt_blk == 0 &&<br>
fadt->x_pm2_cnt_blk.address != 0))<br>
<br>
fwts_passed(fw,<br>
<br>
"FADT only one of<br>
the 32-bit or 64-bit "<br>
<br>
"PM2_CNT_BLK fields<br>
is being used.");<br>
<br>
else<br>
<br>
fwts_failed(fw, LOG_LEVEL_MEDIUM,<br>
<br>
<br>
"FADTPm2CntBlkOnlyOneField",<br>
<br>
"FADT PM2_CNT_BLK<br>
field has both the 32-bit "<br>
<br>
"and the 64-bit<br>
field set.");<br>
<br>
{<br>
<br>
if ((uint64_t)fadt->pm2_cnt_blk ==<br>
fadt->x_pm2_cnt_blk.address) {<br>
<br>
fwts_passed(fw,<br>
<br>
"FADT 32- and 64-bit<br>
PM2_CNT_BLK fields are "<br>
<br>
"at least equal.");<br>
<br>
fwts_advice(fw,<br>
<br>
"Both FADT 32- and<br>
64-bit PM2_CNT_BLK "<br>
<br>
"fields are being<br>
used, but only one should be "<br>
<br>
"non-zero. However,<br>
they are at least equal so "<br>
<br>
"the kernel will at<br>
least have a usable value.");<br>
<br>
} else {<br>
<br>
fwts_failed(fw, LOG_LEVEL_MEDIUM,<br>
<br>
"FADTPm2CntBlkNotSet",<br>
<br>
"FADT PM2_CNT_BLK is<br>
a required field and must "<br>
<br>
"have either a<br>
32-bit or 64-bit address set.");<br>
<br>
fwts_advice(fw,<br>
<br>
"Both FADT 32- and<br>
64-bit PM2_CNT_BLK "<br>
<br>
"fields are being<br>
used, but only one should be "<br>
<br>
"non-zero. Since<br>
the fields value are not equal "<br>
<br>
"the kernel cannot<br>
unambiguously determine which "<br>
<br>
"value is the<br>
correct one.");<br>
<br>
}<br>
<br>
}<br>
<br>
}<br>
<br>
<br>
<br>
I think the fix is: remove the red mark code and add green mark code.<br>
what do you think?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">I'm curious, can you describe the scenario or scenarios in which you feel the current code fails?<br>
<br>
Having looked at the ACPI spec and the code you've identified in your mail, I don't yet see an issue with the current code that you've identified, and I actually think your "fix" is incorrect at this time.<o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
Thanks,<br>
<br>
Eric<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal"><span style="color:#888888"><br>
<br>
<span class="hoenzb">-- </span><br>
<span class="hoenzb">Jeffrey Hugo</span><br>
<span class="hoenzb">Qualcomm Datacenter Technologies as an affiliate of Qualcomm Technologies, Inc.</span><br>
<span class="hoenzb">Qualcomm Technologies, Inc. is a member of the</span><br>
<span class="hoenzb">Code Aurora Forum, a Linux Foundation Collaborative Project.</span><br>
<br>
<span class="hoenzb">-- </span><br>
<span class="hoenzb">fwts-devel mailing list</span><br>
<span class="hoenzb"><a href="mailto:fwts-devel@lists.ubuntu.com" target="_blank">fwts-devel@lists.ubuntu.com</a></span><br>
<span class="hoenzb">Modify settings or unsubscribe at: <a href="https://lists.ubuntu.com/mailman/listinfo/fwts-devel" target="_blank">
https://lists.ubuntu.com/mailman/listinfo/fwts-devel</a></span></span><o:p></o:p></p>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal">Cheers,<br>
Alex Hung<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>