<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)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Mangal;
        panose-1:0 0 4 0 0 0 0 0 0 0;}
@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:Consolas;
        panose-1:2 11 6 9 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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:David;
        panose-1:2 14 5 2 6 4 1 1 1 1;}
@font-face
        {font-family:Kokila;}
@font-face
        {font-family:"Calibri Cyr";}
@font-face
        {font-family:Consolas-Bold;}
@font-face
        {font-family:Calibri-Italic;}
@font-face
        {font-family:Consolas-Italic;}
@font-face
        {font-family:Calibri-Bold;}
@font-face
        {font-family:Consolas-BoldItalic;}
@font-face
        {font-family:SymbolMT;}
@font-face
        {font-family:ArialMT;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.fontstyle01
        {mso-style-name:fontstyle01;
        font-family:Consolas-Bold;
        color:maroon;
        font-weight:bold;
        font-style:normal;}
.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;}
/* List Definitions */
@list l0
        {mso-list-id:185993486;
        mso-list-template-ids:-624765334;}
@list l0:level1
        {mso-level-style-link:"Heading 1";
        mso-level-text:%1;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:.3in;
        text-indent:-.3in;}
@list l0:level2
        {mso-level-start-at:12;
        mso-level-text:%2;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:.4in;
        text-indent:-.4in;}
@list l0:level3
        {mso-level-style-link:"Heading 3";
        mso-level-text:"%1\.%2\.%3";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:.5in;
        text-indent:-.5in;}
@list l0:level4
        {mso-level-style-link:"Heading 4";
        mso-level-text:"%1\.%2\.%3\.%4";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:.6in;
        text-indent:-.6in;}
@list l0:level5
        {mso-level-style-link:"Heading 5";
        mso-level-text:"%1\.%2\.%3\.%4\.%5";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:.7in;
        text-indent:-.7in;}
@list l0:level6
        {mso-level-style-link:"Heading 6";
        mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:.8in;
        text-indent:-.8in;}
@list l0:level7
        {mso-level-style-link:"Heading 7";
        mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:.9in;
        text-indent:-.9in;}
@list l0:level8
        {mso-level-style-link:"Heading 8";
        mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:1.0in;
        text-indent:-1.0in;}
@list l0:level9
        {mso-level-style-link:"Heading 9";
        mso-level-text:"%1\.%2\.%3\.%4\.%5\.%6\.%7\.%8\.%9";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        margin-left:1.1in;
        text-indent:-1.1in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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">
<div class="WordSection1">
<p class="MsoNormal">I have some comments for the items below…. And a proposed solution, I think.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">Mike Rothman <o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt">(</span><span style="font-size:10.0pt;font-family:SimSun">迈克 罗斯曼 /
</span><span lang="HI" style="font-size:10.0pt;font-family:"Kokila",sans-serif">माइकल</span><span lang="HI" style="font-size:10.0pt;font-family:"Mangal",serif">
</span><span lang="HI" style="font-size:10.0pt;font-family:"Kokila",sans-serif">रोथ्मेन्</span><span style="font-size:10.0pt;font-family:"Mangal",serif"> /
</span><span style="font-size:10.0pt;font-family:"Calibri Cyr"">Михаил</span><span style="font-size:10.0pt">
</span><span style="font-size:10.0pt;font-family:"Calibri Cyr"">Ротман</span><span style="font-size:10.0pt;font-family:"Mangal",serif"> /
</span><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:"Arial",sans-serif">משה</span><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:"David",sans-serif">
</span><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:"Arial",sans-serif">רוטמן</span><span dir="LTR"></span><span dir="LTR"></span><span style="font-size:10.0pt;font-family:"Mangal",serif"><span dir="LTR"></span><span dir="LTR"></span>)</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="HE" dir="RTL" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:black;background:white">רועה עיקרי של חתולים</span><span style="font-family:"Mangal",serif"><o:p></o:p></span></p>
</div>
<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> Ni, Ray <ray.ni@intel.com> <br>
<b>Sent:</b> Thursday, September 17, 2020 9:28 PM<br>
<b>To:</b> devel@edk2.groups.io<br>
<b>Cc:</b> Wang, Sunny (HPS SW) <sunnywang@hpe.com>; Rothman, Michael A <michael.a.rothman@intel.com>; Aggarwal, Nivedita <nivedita.aggarwal@intel.com>; Desimone, Nathaniel L <nathaniel.l.desimone@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>;
 Dong, Eric <eric.dong@intel.com>; Wu, Hao A <hao.a.wu@intel.com>; Bi, Dandan <dandan.bi@intel.com><br>
<b>Subject:</b> TianoCore Community Design Meeting Minutes - Sep 18, 2020<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Topic: Sanitization Protocols for Option Cards (Sunny Wang / HPE)<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Slides: <a href="https://edk2.groups.io/g/devel/files/Designs/2020/0918/Sanitization%20Protocols%20for%20Option%20Cards_200918.pdf">
https://edk2.groups.io/g/devel/files/Designs/2020/0918/Sanitization%20Protocols%20for%20Option%20Cards_200918.pdf</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">More materials @ <a href="https://edk2.groups.io/g/devel/files/Designs/2020/0918/">
https://edk2.groups.io/g/devel/files/Designs/2020/0918/</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">1. Overview<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Sunny presented HPE's UEFI Spec change proposal to meet NIST SP 800-88 standard, sanitizing the firmware configuration and storage devices.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">NIST SP 800-88:  HPE as the server vendor should be compliant to this standard.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Option Card = PCI device that contains Option ROM.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">      2. Sanitizing firmware configuration<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@Liming: HII design provides mechanism to restore the default.<o:p></o:p></p>
<p class="MsoNormal">@Nickle: Problems in HII: 1). Cannot support cases like removing iSCSI attempt password. 2). Default value for some HII settings is not available.<o:p></o:p></p>
<p class="MsoNormal">@Liming: We should follow the principle that anyone that produces the data is responsible for clearing/sanitizing.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="background:yellow;mso-highlight:yellow">Agree with this.</span></b><b><o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@Nickle: The design aligns to this idea.<o:p></o:p></p>
<p class="MsoNormal">@Ray: The requirements of clear and purge are different. Purge cannot be recovered. Clear can.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="background:yellow;mso-highlight:yellow">Yes, but if we are talking about HII menuing features, such as through the setup browser, various action buttons could trigger custom responses via callbacks into the driver. This
 would be no different in concept to triggering the desire to Format a raid array. HII has no concept of that, but it’s supported via a cooperation between the browser triggering a callback based on the user selection of a custom action op-code and the driver
 that services that callback. So a menu could contain a clear and/or purge command, it’s just dependent on the design of the IFR pages and driver. I would also note that we have a standard EFI_RESET_BUTTON_OP which sounds like a Clear operation.
<br>
<br>
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="background:yellow;mso-highlight:yellow">I thought about the possibility of adding a purge operation as a new op-code, but it doesn’t really make sense to me since purging alone may very well leave the device’s configuration
 in an invalid state, and a restore to defaults would need to be done immediately after the purge so that we at least have a working configuration that has been purged. Both of those operations could be described and done via the EFI_RESET_BUTTON_OP operation.
 There might be some clarifications we could do to the spec, but I’m wondering – isn’t it the purview of the driver implementation that services the reset to actually KNOW what the policy is for that device and whether or not a reset actually means a clear
 and then reset, or a purge and then reset? I think it is. </span></b><b><o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@Nate: EFI_ is reserved prefix.<o:p></o:p></p>
<p class="MsoNormal">@Liming: Suggest to follow the code first process (<a href="https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-First-Process">https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Code-First-Process</a>) to use proper
 prefix. <o:p></o:p></p>
<p class="MsoNormal">@Ray: Let's firstly see how to enhance HII design to support such requirement.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">3. Sanitizing storage devices<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@Nivedita: Internal discussion in Intel prefers to reuse BlockErase.<o:p></o:p></p>
<p class="MsoNormal">@Sunny: Some non-block devices may also need to sanitize. BlockErase cannot meet the needs.<o:p></o:p></p>
<p class="MsoNormal">@Ray: An example of non-block device is the label storage in NVDIMM.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I agree – so, similar to what we did in EraseBlock, I would suggest we extend the label storage protocol – something such as:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon">#define EFI_NVDIMM_LABEL_PROTOCOL2_GUID \<br>
  {0xc2f67a65,0x9d98,0x4608, \<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon">   {0x98,0xe3,0x83,0x90,0x57,0x51,0xd1,0x04}}<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon">typedef struct _EFI_NVDIMM_LABEL_PROTOCOL<span style="background:yellow;mso-highlight:yellow">2</span> {<br>
   EFI_NVDIMM_LABEL_STORAGE_INFORMATION LabelStorageInformation;<br>
   EFI_NVDIMM_LABEL_STORAGE_READ        LabelStorageRead;<br>
   EFI_NVDIMM_LABEL_STORAGE_WRITE       LabelStorageWrite;<br>
   <span style="background:yellow;mso-highlight:yellow">EFI_NVDIMM_LABEL_STORAGE_ERASE       Erase;</span><br>
}<o:p></o:p></span></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><a name="_Toc474841551"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon">EFI_NVDIMM_LABEL_PROTOCOL.Erase()</span></b></a><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon"><o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:14.0pt">Summary<o:p></o:p></span></b></p>
<p class="MsoNormal">Erase the label data for the Label Storage Area that is associated with a specific NVDIMM Device Path.<o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:14.0pt">Prototype<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon">typedef
<br>
EFI_STATUS<br>
(EFIAPI *EFI_NVDIMM_LABEL_STORAGE_ERASE) (<br>
   IN  CONST  EFI_NVDIMM_LABEL_PROTOCOL        *This,<br>
   <span style="background:yellow;mso-highlight:yellow">IN        EFI_LABEL_ERASE_TYPE             EraseType</span><br>
   );<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:14.0pt">Parameters</span></b><b><span style="font-size:14.0pt"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="margin-left:2.0in;text-indent:-2.0in"><b>This</b>                                                        A pointer to the EFI_NVDIMM_LABEL_PROTOCOL instance.<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:2.0in;text-indent:-2.0in"><b><span style="background:yellow;mso-highlight:yellow">EraseType</span></b><span style="background:yellow;mso-highlight:yellow">                                           The type of erase that
 should be completed on the Label Storage Area for the NVDIMM.</span> <o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:14.0pt"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:14.0pt">Description</span></b><b><span style="font-size:14.0pt"><o:p></o:p></span></b></p>
<p class="MsoNormal">Erase the data per the method specified by EraseType for the Label Storage Area for the NVDIMM.   See the
<b>Label Index Block </b>and<b> Label Definitions </b>sections below for details on the contents of the label data.<o:p></o:p></p>
<b><span style="font-size:14.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><br clear="all" style="page-break-before:always">
</span></b>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">typedef enum {</span></b><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">      Overwrite,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">     BlockErase,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">      CryptoErase<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">} EFI_LABEL_ERASE_TYPE;<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><i><span style="font-family:Calibri-Italic;color:maroon;background:yellow;mso-highlight:yellow">Overwrite<br>
</span></i><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">The Overwrite sanitize operation alters user data by writing a fixed data pattern or related patterns to all locations on the label storage area
 within the NVM subsystem in which user data may be stored one or more times</span><span style="background:yellow;mso-highlight:yellow">.
</span><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">The parameters LBA and Size are ignored if this operation is used.</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><i><span style="font-family:Calibri-Italic;color:maroon;background:yellow;mso-highlight:yellow">BlockErase<br>
</span></i><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">The Block Erase sanitize operation alters user data with a low-level block erase method that is specific to all locations on the label storage area
 within the NVM subsystem in which user data may be stored. The parameters LBA and Size are ignored if this operation is used.</span><span style="color:black;background:yellow;mso-highlight:yellow">
</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><i><span style="font-family:Calibri-Italic;color:maroon;background:yellow;mso-highlight:yellow">CryptoErase<br>
</span></i><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">The Crypto Erase sanitize operation alters user data by changing the media encryption keys for all locations on the label storage area within the
 NVM subsystem in which user data may be stored</span><span style="background:yellow;mso-highlight:yellow">.
</span><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">The parameters LBA and Size are ignored if this operation is used.</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:14.0pt"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:14.0pt">Status Codes Returned<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:14.0pt"><o:p> </o:p></span></b></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td width="200" style="width:150.0pt;border:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;background:yellow;mso-highlight:yellow">EFI_UNSUPPORTED</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
</td>
<td width="200" style="width:150.0pt;border:solid windowtext 1.0pt;border-left:none;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;background:yellow;mso-highlight:yellow">The device cannot support the requested EraseType operation.</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@Nivedita: Existence of two protocols (BlockErase and proposed Sanitize) causes a load to consumer.<o:p></o:p></p>
<p class="MsoNormal">@Abner: Sanitize protocol is controller based, BlockErase is device based.<o:p></o:p></p>
<p class="MsoNormal">@Kevin: Is it a security risk that any driver/application can call the protocol to purge all data?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="background:yellow;mso-highlight:yellow">No current concept of privilege accesses – anyone can do anything.</span></b><b><o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@Ray: That's a good open! But even without this protocol, someone can call Passthru protocol to send the commands to purge data. More feedbacks are welcomed whether the security concern needs to be considered in design level. Option ROMs
 are dispatched after EndOfDxe so denying the purge/sanitize after EndOfDxe is not applicable.<o:p></o:p></p>
<p class="MsoNormal">@Abner: Another security risk is one option rom can call the protocol produced by the other option rom to purge storage not owned by itself.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="background:yellow;mso-highlight:yellow">See above.</span></b><b><o:p></o:p></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@Ray:  Two opens: 1). Let's discuss with Rothman Michael about how to consolidate the BlockErase and proposed Sanitize. 2). Should we consider security?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Below is what we came up with for EraseBlock:<o:p></o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon">typedef struct _EFI_ERASE_BLOCK_PROTOCOL {<br>
  UINT64                   </span></b><i><span style="font-family:Consolas-Italic;color:maroon">Revision</span></i><b><i><span style="font-size:10.0pt;font-family:Consolas-BoldItalic;color:maroon">;</span></i></b><span style="font-family:Symbol;color:maroon">
</span><span style="font-family:SymbolMT;color:maroon">  <br>
</span><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon">  UINT32                  
</span></b><i><span style="font-family:Consolas-Italic;color:maroon">EraseLengthGranularity</span></i><b><i><span style="font-size:10.0pt;font-family:Consolas-BoldItalic;color:maroon">;
</span></i></b><span style="color:maroon"> </span><span style="font-family:SymbolMT;color:maroon"><br>
</span><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon">  EFI_BLOCK_ERASE         
</span></b><i><span style="font-family:Consolas-Italic;color:maroon">EraseBlocks</span></i><b><i><span style="font-size:10.0pt;font-family:Consolas-BoldItalic;color:maroon">;
</span></i></b><span style="color:maroon"> </span><span style="font-family:SymbolMT;color:maroon"><br>
</span><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon">  <span style="background:yellow;mso-highlight:yellow">EFI_BLOCK_ERASE_EX       </span></span></b><i><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">EraseBlocksEx</span></i><b><i><span style="font-size:10.0pt;font-family:Consolas-BoldItalic;color:maroon;background:yellow;mso-highlight:yellow">;
</span></i></b><span style="color:maroon;background:yellow;mso-highlight:yellow"> </span><span style="font-family:SymbolMT;color:maroon"><br>
</span><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon">} EFI_ERASE_BLOCK_PROTOCOL;</span></b><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">typedef<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">EFI_STATUS<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">(EFIAPI *EFI_BLOCK_ERASE_EX) (<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">  IN EFI_ERASE_BLOCK_ PROTOCOL  
</span></b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">*This,<b><o:p></o:p></b></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">  IN UINT32                      
</span></b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">MediaId,<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">  IN EFI_LBA                     
</span></b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">LBA,<b><o:p></o:p></b></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">  IN OUT EFI_ERASE_BLOCK_TOKEN  
</span></b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">*Token,<b><o:p></o:p></b></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">  IN UINTN                       
</span></b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">Size,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">  IN EFI_ERASE_BLOCK_PROGRESS     Progress, OPTIONAL<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">  IN EFI_ERASE_TYPE               EraseType<b><o:p></o:p></b></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">);</span></b><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon"><o:p></o:p></span></b></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span class="fontstyle01"><span style="font-size:10.0pt;color:windowtext;font-weight:normal">Revision =
</span></span><span class="fontstyle01"><span style="font-size:10.0pt">#define EFI_ERASE_BLOCK_PROTOCOL_REVISION ((2<<16) | (<span style="background:yellow;mso-highlight:yellow">90</span>))</span></span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">IN EFI_ERASE_BLOCK_PROGRESS
</span></b><i><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">Progress</span></i><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow"><o:p> </o:p></span></p>
<p class="MsoNormal"><i><span style="font-family:Calibri-Italic;color:maroon;background:yellow;mso-highlight:yellow">Progress<br>
</span></i><span style="color:black;background:yellow;mso-highlight:yellow">A function used by the driver to report the progress of the firmware update.</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="background:yellow;mso-highlight:yellow"><o:p> </o:p></span></p>
<p class="MsoNormal"><i><span style="font-family:Calibri-Italic;color:maroon;background:yellow;mso-highlight:yellow">EraseType<br>
</span></i><span style="color:black;background:yellow;mso-highlight:yellow">The type of erase being requested.</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">typedef enum {<br>
</span></b><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">      Clear,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">      Overwrite,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">     BlockErase,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">      CryptoErase<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">} EFI_ERASE_TYPE;<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><i><span style="font-family:Calibri-Italic;color:maroon;background:yellow;mso-highlight:yellow">Clear<br>
</span></i><span style="background:yellow;mso-highlight:yellow">The Clear operation
</span><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">alters user data by writing a fixed data pattern or related patterns to a starting LBA location for Size number of bytes on the media within the NVM
 subsystem in which user data may be stored one or more times</span><span style="background:yellow;mso-highlight:yellow">.<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><i><span style="font-family:Calibri-Italic;color:maroon;background:yellow;mso-highlight:yellow">Overwrite<br>
</span></i><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">The Overwrite sanitize operation alters user data by writing a fixed data pattern or related patterns to all locations on the media within the NVM
 subsystem in which user data may be stored one or more times</span><span style="background:yellow;mso-highlight:yellow">.
</span><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">The parameters LBA and Size are ignored if this operation is used.</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><i><span style="font-family:Calibri-Italic;color:maroon;background:yellow;mso-highlight:yellow">BlockErase<br>
</span></i><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">The Block Erase sanitize operation alters user data with a low-level block erase method that is specific to the media for all locations on the media
 within the NVM subsystem in which user data may be stored. The parameters LBA and Size are ignored if this operation is used.</span><span style="color:black;background:yellow;mso-highlight:yellow">
</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><i><span style="font-family:Calibri-Italic;color:maroon;background:yellow;mso-highlight:yellow">CryptoErase<br>
</span></i><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">The Crypto Erase sanitize operation alters user data by changing the media encryption keys for all locations on the media within the NVM subsystem
 in which user data may be stored</span><span style="background:yellow;mso-highlight:yellow">.
</span><span style="font-size:10.0pt;font-family:ArialMT;color:black;background:yellow;mso-highlight:yellow">The parameters LBA and Size are ignored if this operation is used.</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></b></p>
<table class="MsoNormalTable" border="0" cellspacing="0" cellpadding="0" style="border-collapse:collapse">
<tbody>
<tr>
<td width="200" style="width:150.0pt;border:solid windowtext 1.0pt;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;background:yellow;mso-highlight:yellow">EFI_UNSUPPORTED</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
</td>
<td width="200" style="width:150.0pt;border:solid windowtext 1.0pt;border-left:none;padding:0in 5.4pt 0in 5.4pt">
<p class="MsoNormal"><span style="font-size:9.0pt;font-family:"Tahoma",sans-serif;color:black;background:yellow;mso-highlight:yellow">The device cannot support the requested EraseType operation.</span><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family:Calibri-Bold;color:black;background:yellow;mso-highlight:yellow"><br>
</span></b><b><span style="font-size:10.0pt;font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">typedef<br>
EFI_STATUS<br>
(EFIAPI *EFI_ERASE_BLOCK_PROGRESS) (</span></b><span style="background:yellow;mso-highlight:yellow"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">IN UINTN    Completion<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">);<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow"><o:p> </o:p></span></i></p>
<p class="MsoNormal"><i><span style="font-family:Consolas-Italic;color:maroon;background:yellow;mso-highlight:yellow">Completion<br>
</span></i><span style="color:black;background:yellow;mso-highlight:yellow">A value between 1 and 100 indicating the current completion progress of the<br>
erase operation. Completion progress is reported as from 1 to 100 percent. A value<br>
of 0 is used by the driver to indicate that progress reporting is not supported</span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:black;background:yellow;mso-highlight:yellow">On
</span><b><span style="font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">EFI_SUCCESS</span></b><span style="color:black;background:yellow;mso-highlight:yellow">,
</span><b><span style="font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">EraseBlocksEx ()
</span></b><span style="color:black;background:yellow;mso-highlight:yellow">continues to do the callback if supported. On NOT
</span><b><span style="font-family:Consolas-Bold;color:maroon;background:yellow;mso-highlight:yellow">EFI_SUCCESS,<br>
EraseBlocksEx () </span></b><span style="color:black;background:yellow;mso-highlight:yellow">discontinues the callback and completes the update and returns.</span><span style="color:black"><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</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/65573">View/Reply Online (#65573)</a> |    |  <a target="_blank" href="https://groups.io/mt/76925023/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>