<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<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:PMingLiU;
        panose-1:2 1 6 1 0 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: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;}
@font-face
        {font-family:"\@SimSun";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"\@PMingLiU";
        panose-1:2 1 6 1 0 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:12.0pt;
        font-family:SimSun;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
        {mso-style-name:x_msonormal;
        margin:0cm;
        font-size:12.0pt;
        font-family:"PMingLiU",serif;}
span.EmailStyle24
        {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: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" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Hi Arvin,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">    This patch is scheduled to be submitted in master today.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">With Warm Regards,<br>
Edhay<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><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"> Chen, ArvinX <arvinx.chen@intel.com>
<br>
<b>Sent:</b> 24 November 2020 11:17<br>
<b>To:</b> devel@edk2.groups.io; Samer El-Haj-Mahmoud <Samer.El-Haj-Mahmoud@arm.com><br>
<b>Cc:</b> G Edhaya Chandran <Edhaya.Chandran@arm.com>; Jin, Eric <eric.jin@intel.com>; gaoliming@byosoft.com.cn; Chu, Maggie <maggie.chu@intel.com><br>
<b>Subject:</b> </span><span lang="ZH-CN" style="font-size:11.0pt">$B2sJ$(B</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">: [edk2-devel] [PATCH 2/2] uefi-sct/SctPkg: Correct BBTestEraseBlocks behavior (EFI_BLOCK_IO_PROTOCOL)<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Hi all,<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">   If this patch is OK to you guys~ maybe we can submit it into master ^^<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Thanks!<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Arvin<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 lang="ZH-CN" style="font-size:11.0pt;color:black">$B4s7o<T(B</span></b><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>>
</span><span lang="ZH-CN" style="font-size:11.0pt;color:black">$BBeI=(B</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> Samer El-Haj-Mahmoud <<a href="mailto:samer.el-haj-mahmoud@arm.com">samer.el-haj-mahmoud@arm.com</a>><br>
</span><b><span lang="ZH-CN" style="font-size:11.0pt;color:black">$B4s7oF|4|(B</span></b><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> 2020</span><span lang="ZH-CN" style="font-size:11.0pt;color:black">$BG/(B</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">11</span><span lang="ZH-CN" style="font-size:11.0pt;color:black">$B7n(B</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">17</span><span lang="ZH-CN" style="font-size:11.0pt;color:black">$BF|(B</span><span lang="ZH-CN" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">
</span><span lang="ZH-CN" style="font-size:11.0pt;color:black">$B2<8a(B</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> 09:53<br>
</span><b><span lang="ZH-CN" style="font-size:11.0pt;color:black">$BZ@7o<T(B</span></b><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>>; Chen, ArvinX <<a href="mailto:arvinx.chen@intel.com">arvinx.chen@intel.com</a>><br>
</span><b><span lang="ZH-CN" style="font-size:11.0pt;color:black">$BI{K\(B</span></b><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> G Edhaya Chandran
 <<a href="mailto:Edhaya.Chandran@arm.com">Edhaya.Chandran@arm.com</a>>; Jin, Eric <<a href="mailto:eric.jin@intel.com">eric.jin@intel.com</a>>;
<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a> <<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a>>; Chu, Maggie <<a href="mailto:maggie.chu@intel.com">maggie.chu@intel.com</a>>; Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>><br>
</span><b><span lang="ZH-CN" style="font-size:11.0pt;color:black">$B<g;](B</span></b><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> Re: [edk2-devel]
 [PATCH 2/2] uefi-sct/SctPkg: Correct BBTestEraseBlocks behavior (EFI_BLOCK_IO_PROTOCOL)</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="xmsonormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thanks for the explanation.</span><o:p></o:p></p>
<p class="xmsonormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<p class="xmsonormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">Reviewed-By: Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>></span><o:p></o:p></p>
<p class="xmsonormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<p class="xmsonormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="xmsonormal"><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">devel@edk2.groups.io</a>>
<b>On Behalf Of </b>Chen, ArvinX via groups.io<br>
<b>Sent:</b> Tuesday, November 17, 2020 12:51 AM<br>
<b>To:</b> Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>>;
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a><br>
<b>Cc:</b> G Edhaya Chandran <<a href="mailto:Edhaya.Chandran@arm.com">Edhaya.Chandran@arm.com</a>>; Jin, Eric <<a href="mailto:eric.jin@intel.com">eric.jin@intel.com</a>>;
<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a>; Chu, Maggie <<a href="mailto:maggie.chu@intel.com">maggie.chu@intel.com</a>><br>
<b>Subject:</b> </span><span lang="ZH-TW" style="font-size:11.0pt;mso-fareast-language:ZH-TW">$B2sJ$(B</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">: [edk2-devel] [PATCH 2/2] uefi-sct/SctPkg: Correct BBTestEraseBlocks behavior (EFI_BLOCK_IO_PROTOCOL)</span><o:p></o:p></p>
</div>
</div>
<p class="xmsonormal"> <o:p></o:p></p>
<div>
<p class="xmsonormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">HI Samer,</span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"> </span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">    Sorry for the slow reply, In EMMC's case, it allowed storage firmware erase to "1" to be a valid behavior (please reference the spec of emmc JESD84-B51/6.6.9),
 so once verification team use kind of this device, the test case will always failed. To avoid this problem, I think this change is required.</span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black"> </span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Thanks!!</span><o:p></o:p></p>
</div>
<div>
<p class="xmsonormal" style="background:white"><span style="font-family:"Calibri",sans-serif;color:black">Arvin</span><o:p></o:p></p>
</div>
<div>
<div>
<p class="xmsonormal"><span style="font-family:"Calibri",sans-serif;color:black"> </span><o:p></o:p></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center"><span style="font-family:"PMingLiU",serif">
<hr size="2" width="98%" align="center">
</span></div>
<div id="x_divRplyFwdMsg">
<p class="xmsonormal"><b><span lang="ZH-TW" style="font-size:11.0pt;color:black;mso-fareast-language:ZH-TW">$B4s7o<T(B</span></b><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">
 Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>><br>
</span><b><span lang="ZH-TW" style="font-size:11.0pt;color:black;mso-fareast-language:ZH-TW">$B4s7oF|4|(B</span></b><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">
 2020</span><span lang="ZH-TW" style="font-size:11.0pt;color:black;mso-fareast-language:ZH-TW">$BG/(B</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">11</span><span lang="ZH-TW" style="font-size:11.0pt;color:black;mso-fareast-language:ZH-TW">$B7n(B</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">12</span><span lang="ZH-TW" style="font-size:11.0pt;color:black;mso-fareast-language:ZH-TW">$BF|(B</span><span lang="ZH-TW" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:ZH-TW">
</span><span lang="ZH-TW" style="font-size:11.0pt;color:black;mso-fareast-language:ZH-TW">$B>e8a(B</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> 04:56<br>
</span><b><span lang="ZH-TW" style="font-size:11.0pt;color:black;mso-fareast-language:ZH-TW">$BZ@7o<T(B</span></b><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">
<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>>; Chen, ArvinX <<a href="mailto:arvinx.chen@intel.com">arvinx.chen@intel.com</a>><br>
</span><b><span lang="ZH-TW" style="font-size:11.0pt;color:black;mso-fareast-language:ZH-TW">$BI{K\(B</span></b><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">
 G Edhaya Chandran <<a href="mailto:Edhaya.Chandran@arm.com">Edhaya.Chandran@arm.com</a>>; Jin, Eric <<a href="mailto:eric.jin@intel.com">eric.jin@intel.com</a>>; Samer El-Haj-Mahmoud <<a href="mailto:Samer.El-Haj-Mahmoud@arm.com">Samer.El-Haj-Mahmoud@arm.com</a>>;
<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a> <<a href="mailto:gaoliming@byosoft.com.cn">gaoliming@byosoft.com.cn</a>><br>
</span><b><span lang="ZH-TW" style="font-size:11.0pt;color:black;mso-fareast-language:ZH-TW">$B<g;](B</span></b><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">
 RE: [edk2-devel] [PATCH 2/2] uefi-sct/SctPkg: Correct BBTestEraseBlocks behavior (EFI_BLOCK_IO_PROTOCOL)</span>
<o:p></o:p></p>
<div>
<p class="xmsonormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="xmsonormal"><span style="font-size:11.0pt">Hi Chen,<br>
<br>
The UEFI Specification 2.8ErrataB (page 575) states that " It is the intention of the EraseBlocks() operation to be at least as performant as writing zeroes to each of the specified LBA locations while ensuring the equivalent security."<br>
<br>
So while not explicitly saying that Erase should "erase to 0", it implies that at least is the intention. Do we know that erasing to "1" is a valid behavior?<br>
<br>
<br>
<br>
> -----Original Message-----<br>
> From: <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a> <<a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>> On Behalf Of Chen,<br>
> ArvinX via groups.io<br>
> Sent: Monday, November 2, 2020 5:00 AM<br>
> To: <a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a><br>
> Cc: G Edhaya Chandran <<a href="mailto:Edhaya.Chandran@arm.com">Edhaya.Chandran@arm.com</a>>; Eric Jin<br>
> <<a href="mailto:eric.jin@intel.com">eric.jin@intel.com</a>><br>
> Subject: [edk2-devel] [PATCH 2/2] uefi-sct/SctPkg: Correct<br>
> BBTestEraseBlocks behavior (EFI_BLOCK_IO_PROTOCOL)<br>
><br>
> REF: <a href="https://bugzilla.tianocore.org/show_bug.cgi?id=3022">https://bugzilla.tianocore.org/show_bug.cgi?id=3022</a><br>
><br>
><br>
><br>
> The storage device erase behavior may have two possibilities:<br>
><br>
>  1.Write all data into "0"<br>
><br>
>  2.Write all data into "1"<br>
><br>
> but now tool behavior can only check case 1 (Write all data into "0"),<br>
><br>
> so we need add the other case into SCT tool to correct the test behavior.<br>
><br>
><br>
><br>
> Cc: G Edhaya Chandran <<a href="mailto:Edhaya.Chandran@arm.com">Edhaya.Chandran@arm.com</a>><br>
><br>
> Cc: Eric Jin <<a href="mailto:eric.jin@intel.com">eric.jin@intel.com</a>><br>
><br>
> Signed-off-by: ArvinX Chen <<a href="mailto:arvinx.chen@intel.com">arvinx.chen@intel.com</a>><br>
><br>
> ---<br>
><br>
>  .../BlackBoxTest/EraseBlockBBTestFunction.c   | 55 +++++++++++++++----<br>
><br>
>  1 file changed, 43 insertions(+), 12 deletions(-)<br>
><br>
><br>
><br>
> diff --git a/uefi-<br>
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/EraseBlock/BlackBoxTest/EraseBlock<br>
> BBTestFunction.c b/uefi-<br>
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/EraseBlock/BlackBoxTest/EraseBlock<br>
> BBTestFunction.c<br>
><br>
> index cbf43e1d..dbbb70c6 100644<br>
><br>
> --- a/uefi-<br>
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/EraseBlock/BlackBoxTest/EraseBlock<br>
> BBTestFunction.c<br>
><br>
> +++ b/uefi-<br>
> sct/SctPkg/TestCase/UEFI/EFI/Protocol/EraseBlock/BlackBoxTest/EraseBlock<br>
> BBTestFunction.c<br>
><br>
> @@ -71,6 +71,7 @@ BBTestEraseBlocksFunctionTest (<br>
><br>
>    UINT64                                Index;<br>
><br>
>    UINTN                                 Index1;<br>
><br>
>    UINTN                                 Remainder;<br>
><br>
> +  UINT64                                EraseCounter;<br>
><br>
><br>
><br>
>    EFI_ERASE_BLOCK_TOKEN                 Token;<br>
><br>
>    EFI_BLOCK_IO2_TOKEN                   BlockIo2Token;<br>
><br>
> @@ -223,26 +224,41 @@ BBTestEraseBlocksFunctionTest (<br>
><br>
>          // Read the data with 0, the first/last block should not be erased<br>
><br>
>          ReadStatus = BlockIo->ReadBlocks (BlockIo, MediaId, Lba, BufferSize,<br>
> (VOID*)Buffer2);<br>
><br>
>          if (ReadStatus == EFI_SUCCESS) {<br>
><br>
> -          for (Index1 = 0; Index1 < BlockSize; Index1++) {<br>
><br>
> -            if (Buffer2[Index1] != 0) {<br>
><br>
> +          for (Index1 = 0, EraseCounter = 0; Index1 < BlockSize; Index1++) {<br>
><br>
> +            if (Buffer2[Index1] != 0x00 && Buffer2[Index1] != 0xFF) {<br>
><br>
>                IsZero1 = FALSE;<br>
><br>
>                break;<br>
><br>
> +            } else if (Buffer2[Index1] == 0x00) {<br>
><br>
> +              EraseCounter++;<br>
><br>
>              }<br>
><br>
>            }<br>
><br>
> +          if (EraseCounter!=0 && EraseCounter!=BlockSize) {<br>
><br>
> +            IsZero1 = FALSE;<br>
><br>
> +          }<br>
><br>
><br>
><br>
> -          for (Index1 = BlockSize; Index1 < BufferSize - BlockSize; Index1++) {<br>
><br>
> -            if (Buffer2[Index1] != 0) {<br>
><br>
> +          for (Index1 = BlockSize, EraseCounter = 0; Index1 < BufferSize -<br>
> BlockSize; Index1++) {<br>
><br>
> +            if (Buffer2[Index1] != 0x00 && Buffer2[Index1] != 0xFF) {<br>
><br>
>                IsZero2 = FALSE;<br>
><br>
>                break;<br>
><br>
> +            } else if (Buffer2[Index1] == 0x00) {<br>
><br>
> +              EraseCounter++;<br>
><br>
>              }<br>
><br>
>            }<br>
><br>
> +          if (EraseCounter!=0 && EraseCounter!=(BufferSize - (BlockSize*2))) {<br>
><br>
> +            IsZero2 = FALSE;<br>
><br>
> +          }<br>
><br>
><br>
><br>
> -          for (Index1 = BufferSize - BlockSize; Index1 < BufferSize; Index1++) {<br>
><br>
> -            if (Buffer2[Index1] != 0) {<br>
><br>
> +          for (Index1 = BufferSize - BlockSize, EraseCounter = 0; Index1 <<br>
> BufferSize; Index1++) {<br>
><br>
> +            if (Buffer2[Index1] != 0x00 && Buffer2[Index1] != 0xFF) {<br>
><br>
>                IsZero3 = FALSE;<br>
><br>
>                break;<br>
><br>
> +            } else if (Buffer2[Index1] == 0x00) {<br>
><br>
> +              EraseCounter++;<br>
><br>
>              }<br>
><br>
>            }<br>
><br>
> +          if (EraseCounter!=0 && EraseCounter!=BlockSize) {<br>
><br>
> +            IsZero3 = FALSE;<br>
><br>
> +          }<br>
><br>
><br>
><br>
>            if ((EraseStatus == EFI_SUCCESS) && (IsZero1 == FALSE) && (IsZero2 ==<br>
> TRUE) && ((IsZero3 == FALSE)))<br>
><br>
>              AssertionType = EFI_TEST_ASSERTION_PASSED;<br>
><br>
> @@ -492,26 +508,41 @@ BlockIo2:<br>
><br>
>          // Read the data with 0, the first/last block should not be erased<br>
><br>
>          ReadStatus = BlockIo2->ReadBlocksEx (BlockIo2, MediaId, Lba,<br>
> &BlockIo2Token, BufferSize, (VOID*)Buffer2);<br>
><br>
>          if (ReadStatus == EFI_SUCCESS) {<br>
><br>
> -          for (Index1 = 0; Index1 < BlockSize; Index1++) {<br>
><br>
> -            if (Buffer2[Index1] != 0) {<br>
><br>
> +          for (Index1 = 0, EraseCounter = 0; Index1 < BlockSize; Index1++) {<br>
><br>
> +            if (Buffer2[Index1] != 0x00 && Buffer2[Index1] != 0xFF) {<br>
><br>
>                IsZero1 = FALSE;<br>
><br>
>                break;<br>
><br>
> +            } else if (Buffer2[Index1] == 0x00) {<br>
><br>
> +              EraseCounter++;<br>
><br>
>              }<br>
><br>
>            }<br>
><br>
> +          if (EraseCounter!=0 && EraseCounter!=BlockSize) {<br>
><br>
> +            IsZero1 = FALSE;<br>
><br>
> +          }<br>
><br>
><br>
><br>
> -          for (Index1 = BlockSize; Index1 < BufferSize - BlockSize; Index1++) {<br>
><br>
> -            if (Buffer2[Index1] != 0) {<br>
><br>
> +          for (Index1 = BlockSize, EraseCounter = 0; Index1 < BufferSize -<br>
> BlockSize; Index1++) {<br>
><br>
> +            if (Buffer2[Index1] != 0x00 && Buffer2[Index1] != 0xFF) {<br>
><br>
>                IsZero2 = FALSE;<br>
><br>
>                break;<br>
><br>
> +            } else if (Buffer2[Index1] == 0x00) {<br>
><br>
> +              EraseCounter++;<br>
><br>
>              }<br>
><br>
>            }<br>
><br>
> +          if (EraseCounter!=0 && EraseCounter!=(BufferSize - (BlockSize*2))) {<br>
><br>
> +            IsZero2 = FALSE;<br>
><br>
> +          }<br>
><br>
><br>
><br>
> -          for (Index1 = BufferSize - BlockSize; Index1 < BufferSize; Index1++) {<br>
><br>
> -            if (Buffer2[Index1] != 0) {<br>
><br>
> +          for (Index1 = BufferSize - BlockSize, EraseCounter = 0; Index1 <<br>
> BufferSize; Index1++) {<br>
><br>
> +            if (Buffer2[Index1] != 0x00 && Buffer2[Index1] != 0xFF) {<br>
><br>
>                IsZero3 = FALSE;<br>
><br>
>                break;<br>
><br>
> +            } else if (Buffer2[Index1] == 0x00) {<br>
><br>
> +              EraseCounter++;<br>
><br>
>              }<br>
><br>
>            }<br>
><br>
> +          if (EraseCounter!=0 && EraseCounter!=BlockSize) {<br>
><br>
> +            IsZero3 = FALSE;<br>
><br>
> +          }<br>
><br>
><br>
><br>
>            if ((EraseStatus == EFI_SUCCESS) && (IsZero1 == FALSE) && (IsZero2 ==<br>
> TRUE) && ((IsZero3 == FALSE)))<br>
><br>
>              AssertionType = EFI_TEST_ASSERTION_PASSED;<br>
><br>
> --<br>
><br>
> 2.26.2.windows.1<br>
><br>
><br>
><br>
><br>
><br>
> -=-=-=-=-=-=<br>
> Groups.io Links: You receive all messages sent to this group.<br>
> View/Reply Online (#66857): <a href="https://edk2.groups.io/g/devel/message/66857">
https://edk2.groups.io/g/devel/message/66857</a><br>
> Mute This Topic: <a href="https://groups.io/mt/77977762/1945644">https://groups.io/mt/77977762/1945644</a><br>
> Group Owner: <a href="mailto:devel+owner@edk2.groups.io">devel+owner@edk2.groups.io</a><br>
> Unsubscribe: <a href="https://edk2.groups.io/g/devel/unsub">https://edk2.groups.io/g/devel/unsub</a> [samer.el-haj-<br>
> <a href="mailto:mahmoud@arm.com">mahmoud@arm.com</a>]<br>
> -=-=-=-=-=-=<br>
><br>
<br>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose,
 or store or copy the information in any medium. Thank you.</span><o:p></o:p></p>
</div>
</div>
</div>
</div>
<p class="MsoNormal">IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person,
 use it for any purpose, or store or copy the information in any medium. Thank you.
<o:p></o:p></p>
<div>
<p class="MsoNormal"></o:p></span></p>
</div>
</div>
</div>
</div>
IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose,
 or store or copy the information in any medium. Thank you.
</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/67868">View/Reply Online (#67868)</a> |    |  <a target="_blank" href="https://groups.io/mt/78471961/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>