<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=Windows-1252">
<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:Wingdings;
        panose-1:5 0 0 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:"Miriam Fixed";
        panose-1:2 11 5 9 5 1 1 1 1 1;}
/* 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:blue;
        text-decoration:underline;}
code
        {mso-style-priority:99;
        font-family:"Courier New";}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.xmsonormal, li.xmsonormal, div.xmsonormal
        {mso-style-name:x_msonormal;
        margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.xmsolistparagraph, li.xmsolistparagraph, div.xmsolistparagraph
        {mso-style-name:x_msolistparagraph;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;}
@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:915089966;
        mso-list-type:hybrid;
        mso-list-template-ids:-996627376 -1 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-start-at:5;
        mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;
        mso-fareast-font-family:"Times New Roman";
        mso-bidi-font-family:Calibri;}
@list l0:level2
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level3
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level4
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level5
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level6
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l0:level7
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Symbol;}
@list l0:level8
        {mso-level-number-format:bullet;
        mso-level-text:o;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Courier New";}
@list l0:level9
        {mso-level-number-format:bullet;
        mso-level-text:\F0A7;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:Wingdings;}
@list l1
        {mso-list-id:1164124908;
        mso-list-type:hybrid;
        mso-list-template-ids:343445362 -1 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l1:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2
        {mso-list-id:1277715651;
        mso-list-type:hybrid;
        mso-list-template-ids:-657294972 -1 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l2:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        color:windowtext;
        mso-ansi-font-weight:normal;
        mso-ansi-font-style:normal;}
@list l2:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l2:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l2:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l3
        {mso-list-id:1408308284;
        mso-list-template-ids:-1;}
@list l3:level1
        {mso-level-start-at:5;
        mso-level-tab-stop:.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:1.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level3
        {mso-level-tab-stop:1.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level4
        {mso-level-tab-stop:2.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level5
        {mso-level-tab-stop:2.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level6
        {mso-level-tab-stop:3.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level7
        {mso-level-tab-stop:3.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level8
        {mso-level-tab-stop:4.0in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l3:level9
        {mso-level-tab-stop:4.5in;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l4
        {mso-list-id:1808401681;
        mso-list-type:hybrid;
        mso-list-template-ids:343445362 -1 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l4:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l4:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l4:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l4:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l4:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l4:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l4:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l4:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l4:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:black">Hi UEFI community,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:black">I’d like to inform you about an update in the
<b>CdePkg</b> branch of  edk2-staging.<o:p></o:p></span></p>
<p class="MsoNormal"><a href="https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg">https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg</a><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"><span style="color:black">The goal of the <b>CdePkg</b> is to provide an
<b>ANSI C Interface</b> for UEFI POST drivers,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">that enables BIOS engineers to (more) easily port standard C programs or libraries<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">(e.g. the openSSL library, already done) to POST drivers.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:black">Furthermore the <b>ANSI C Interface</b> is
</span>disseminated widely, also it’s bugs and pitfalls are known very well<o:p></o:p></p>
<p class="MsoNormal">by a broad range of IT professionals and may help to be better supportable by the open source initiative<o:p></o:p></p>
<p class="MsoNormal">compared to the proprietary interface that is available today in Tianocore UEFI.<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"><span style="color:black">Now </span><b><span style="color:red">21</span></b><span style="color:black"> new ANSI C functions
</span><b><span style="font-family:"Miriam Fixed";color:red">wprintf(), swprintf(), vswprintf(), wcscpy(), wcsncpy(),
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family:"Miriam Fixed";color:red">wcscat(), wcsncat(), wcscmp(), wcsncmp(),wcschr(), wcscspn(), wcspbrk(), wcsrchr(),
<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-family:"Miriam Fixed";color:red">wcsspn(), wcsstr(), wcstok(), wcslen(), wmemcmp(), wmemcpy(), wmemmove(), wmemset()<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="color:black">are introduced for <b>PEI</b> and <b>
DXE</b>.<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="xmsonormal">Currently there are <b><span style="color:red">7</span></b> examples implemented:</p>
<ol style="margin-top:0in" start="1" type="1">
<li class="xmsonormal" style="color:black;mso-list:l2 level1 lfo1"><b><span style="color:windowtext">argvc:
</span></b><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/HOSTED_ENV/argcv/main.c#L57">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/HOSTED_ENV/argcv/main.c#L57</a><b><i><o:p></o:p></i></b></li></ol>
<p class="xmsonormal" style="text-indent:.5in">argc/argv handling according to <a href="https://msdn.microsoft.com/en-us/library/a1y7w461.aspx">
https://msdn.microsoft.com/en-us/library/a1y7w461.aspx</a></p>
<ol style="margin-top:0in" start="2" type="1">
<li class="xmsonormal" style="color:black;mso-list:l2 level1 lfo1"><b><span style="color:windowtext">systeminterfacePEI</span></b><span style="color:windowtext">:
</span><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfacePEI/main.c#L57">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfacePEI/main.c#L57</a><o:p></o:p></li></ol>
<p class="xmsonormal" style="margin-left:.5in"><span style="color:black">demonstration, how
</span><b><span style="font-family:"Miriam Fixed";color:black">PeiServices</span></b><span style="color:black"> and
</span><b><span style="font-family:"Miriam Fixed";color:black">FileHandle</span></b><span style="color:black"> are passed into
</span><b><span style="font-family:"Miriam Fixed";color:black">main()<o:p></o:p></span></b></p>
<ol style="margin-top:0in" start="3" type="1">
<li class="xmsonormal" style="color:black;mso-list:l2 level1 lfo1"><b><span style="color:windowtext">systeminterfaceDXE</span></b><span style="color:windowtext">:
</span><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfaceDXE/main.c#L57">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfaceDXE/main.c#L57</a><o:p></o:p></li></ol>
<p class="xmsonormal" style="margin-left:.5in"><span style="color:black">demonstration, how
</span><b><span style="font-family:"Miriam Fixed"">SystemTable</span></b><span style="color:black"> and
</span><b><span style="font-family:"Miriam Fixed";color:black">ImageHandle</span></b><span style="color:black"> are passed into
</span><b><span style="font-family:"Miriam Fixed";color:black">main()<o:p></o:p></span></b></p>
<p class="MsoListParagraph"><b><u><span style="color:red"><o:p><span style="text-decoration:none"> </span></o:p></span></u></b></p>
<p class="MsoListParagraph"><b><u><span style="color:red">ANSI C LIBRARY functions:<o:p></o:p></span></u></b></p>
<ol style="margin-top:0in" start="4" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l2 level1 lfo1"><b><span style="color:black">time.h
</span></b><b><span style="font-family:"Miriam Fixed";color:black">clock()</span></b><span style="color:black">:</span><span style="color:red">
</span><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/TIME_H/clock/main.c#L1">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/TIME_H/clock/main.c#L1</a><o:p></o:p></li></ol>
<p class="MsoListParagraph">for PEI and DXE phase. It provides TSC based, millisecond precise, exact and chipset independent
<b><span style="font-family:"Miriam Fixed";color:red">clock() </span></b>function.</p>
<p class="MsoListParagraph"><b><span style="color:#00B050">NOTE: in emulation mode the TSC nominal frequency is supposed to be 1GHz</span></b></p>
<p class="MsoListParagraph"><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/clock?view=vs-2019">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/clock?view=vs-2019</a></p>
<ol style="margin-top:0in" start="5" type="1">
<li class="MsoListParagraph" style="color:black;margin-left:0in;mso-list:l2 level1 lfo1">
<b>time.h  </b><b><span style="font-family:"Miriam Fixed"">difftime()</span></b>:
<a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/difftime-difftime32-difftime64?view=vs-2019">
<span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/difftime-difftime32-difftime64?view=vs-2019</span></a><o:p></o:p></li></ol>
<p class="MsoListParagraph"><b><span style="color:black">time.h  </span></b><b><span style="font-family:"Miriam Fixed";color:black">mktime()</span></b><span style="color:black">:
</span><a href="%20https:/docs.microsoft.com/en-us/cpp/c-runtime-library/reference/mktime-mktime32-mktime64?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/mktime-mktime32-mktime64?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">time.h </span></b><b><span style="font-family:"Miriam Fixed";color:black">time()</span></b><span style="color:black">:
</span><a href="%20https:/docs.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-time64?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-time64?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">time.h </span></b><b><span style="font-family:"Miriam Fixed";color:black">asctime()</span></b><span style="color:black">:
</span><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/asctime-wasctime?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/asctime-wasctime?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">time.h  c</span></b><b><span style="font-family:"Miriam Fixed";color:black">time()</span></b><span style="color:black">:
</span><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">time.h  gm</span></b><b><span style="font-family:"Miriam Fixed";color:black">time()</span></b><span style="color:black">:
</span><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/gmtime-gmtime32-gmtime64?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/gmtime-gmtime32-gmtime64?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">time.h  local</span></b><b><span style="font-family:"Miriam Fixed";color:black">time()</span></b><span style="color:black">:
</span><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/localtime-localtime32-localtime64?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/localtime-localtime32-localtime64?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">time.h  strf</span></b><b><span style="font-family:"Miriam Fixed";color:black">time()</span></b><span style="color:black">:
</span><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?view=vs-2019">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?view=vs-2019</a></p>
<p class="MsoListParagraph"><b><span style="color:#00B050">NOTE: All TIME.H functions support UTC only.<o:p></o:p></span></b></p>
<p class="MsoListParagraph"><span style="color:black">All functions are tested in one single driver PEI/DXE:
</span><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/TIME_H/timehfunctions/main.c#L52">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/TIME_H/timehfunctions/main.c#L52</a><span style="color:black"><o:p></o:p></span></p>
<ol style="margin-top:0in" start="6" type="1">
<li class="MsoListParagraph" style="color:black;margin-left:0in;mso-list:l2 level1 lfo1">
<b>STRING.H </b><b><span style="font-family:"Miriam Fixed"">memcpy():</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcpy-wmemcpy?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcpy-wmemcpy?view=vs-2019</span></a><o:p></o:p></li></ol>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">memmove():</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memmove-wmemmove?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memmove-wmemmove?view=vs-2019</span></a><b><span style="color:black"><o:p></o:p></span></b></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H strcpy(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcpy-wcscpy-mbscpy?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcpy-wcscpy-mbscpy?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strncpy():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strcat():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcat-wcscat-mbscat?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcat-wcscat-mbscat?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strncat():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">memcmp():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcmp-wmemcmp?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcmp-wmemcmp?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strcmp():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcmp-wcscmp-mbscmp?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcmp-wcscmp-mbscmp?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strncmp():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">memchr():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memchr-wmemchr?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memchr-wmemchr?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strchr():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strchr-wcschr-mbschr-mbschr-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strchr-wcschr-mbschr-mbschr-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strcspn():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcspn-wcscspn-mbscspn-mbscspn-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcspn-wcscspn-mbscspn-mbscspn-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strpbrk():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strrchr():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strspn():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strspn-wcsspn-mbsspn-mbsspn-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strspn-wcsspn-mbsspn-mbsspn-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strstr():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strtok():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">memset():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memset-wmemset?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memset-wmemset?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strerror():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strerror-strerror-wcserror-wcserror?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strerror-strerror-wcserror-wcserror?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:black">STRING.H </span></b><b><span style="font-family:"Miriam Fixed";color:black">strlen():
</span></b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l?view=vs-2019"><span style="color:black">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l?view=vs-2019</span></a><span style="color:black"><o:p></o:p></span></p>
<p class="MsoListParagraph"><b><span style="color:#00B050">NOTE: All STRING.H functions are completely available in PEI and DXE, except strcoll() and strxftm()<o:p></o:p></span></b></p>
<p class="MsoListParagraph"><span style="color:black">All functions are tested in one single driver PEI/DXE:
</span><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/STRING_H/stringhfunctions/main.c#L52">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/STRING_H/stringhfunctions/main.c#L52</a></p>
<ol style="margin-top:0in" start="7" type="1">
<li class="MsoListParagraph" style="color:red;margin-left:0in;mso-list:l2 level1 lfo1">
<b>NEW: WCHAR.H </b><b><span style="font-family:"Miriam Fixed"">wprintf(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/printf-printf-l-wprintf-wprintf-l?view=vs-2019</span></a><span style="font-family:"Miriam Fixed""><o:p></o:p></span></li></ol>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">swprintf(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/sprintf-sprintf-l-swprintf-swprintf-l-swprintf-l?view=vs-2019</span></a><b><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">vswprintf(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/vsprintf-vsprintf-l-vswprintf-vswprintf-l-vswprintf-l?view=vs-2019</span></a><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcscpy(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcpy-wcscpy-mbscpy?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcpy-wcscpy-mbscpy?view=vs-2019</span></a><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcsncpy(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l?view=vs-2019</span></a><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcscat(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcat-wcscat-mbscat?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcat-wcscat-mbscat?view=vs-2019</span></a><b><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcsncat(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l?view=vs-2019</span></a><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcscmp(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcmp-wcscmp-mbscmp?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcmp-wcscmp-mbscmp?view=vs-2019</span></a><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcsncmp(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l?view=vs-2019</span></a><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcschr(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strchr-wcschr-mbschr-mbschr-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strchr-wcschr-mbschr-mbschr-l?view=vs-2019</span></a><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcscspn(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcspn-wcscspn-mbscspn-mbscspn-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcspn-wcscspn-mbscspn-mbscspn-l?view=vs-2019</span></a><b><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcspbrk(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l?view=vs-2019</span></a><b><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcsrchr</span></b><span style="font-family:"Miriam Fixed";color:red">():
</span><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l?view=vs-2019</span></a><b><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcsspn(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strspn-wcsspn-mbsspn-mbsspn-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strspn-wcsspn-mbsspn-mbsspn-l?view=vs-2019</span></a><b><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcsstr(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strstr-wcsstr-mbsstr-mbsstr-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strstr-wcsstr-mbsstr-mbsstr-l?view=vs-2019</span></a><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcstok(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l?view=vs-2019</span></a><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wcslen(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l?view=vs-2019</span></a><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wmemcmp(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcmp-wmemcmp?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcmp-wmemcmp?view=vs-2019</span></a><b><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wmemcpy(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcpy-wmemcpy?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcpy-wmemcpy?view=vs-2019</span></a><b><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wmemmove(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memmove-wmemmove?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memmove-wmemmove?view=vs-2019</span></a><b><span style="font-family:"Miriam Fixed";color:red"><o:p></o:p></span></b></p>
<p class="MsoNormal" style="text-indent:.5in"><b><span style="color:red">NEW: WCHAR.H
</span></b><b><span style="font-family:"Miriam Fixed";color:red">wmemset(): </span>
</b><a href="https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memset-wmemset?view=vs-2019"><span style="font-family:"Miriam Fixed"">https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memset-wmemset?view=vs-2019</span></a></p>
<p class="MsoListParagraph"><b><span style="color:#00B050">NOTE: 21 WCHAR.H functions are available in PEI and DXE. 29 functions are not yet implemented, that are file and multi byte functions<o:p></o:p></span></b></p>
<p class="MsoListParagraph"><span style="color:black">All functions are tested in one single driver PEI/DXE:
</span><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/WCHAR_H/wcharhfunctions/main.c#L52">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/WCHAR_H/wcharhfunctions/main.c</a></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Best Regards,<o:p></o:p></p>
<p class="MsoNormal">Kilian<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From: </b><a href="mailto:KILIAN_KEGEL@OUTLOOK.COM">Kilian Kegel</a><br>
<b>Sent: </b>Wednesday, October 23, 2019 10:03 PM<br>
<b>To: </b><a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a><br>
<b>Cc: </b><a href="mailto:michael.d.kinney@intel.com">Kinney, Michael D</a>; <a href="mailto:brian.richardson@intel.com">
Richardson, Brian</a><br>
<b>Subject: </b>[edk2-devel] [staging/branch]: CdePkg - C Development Environment Package<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="color:black">Hi UEFI community,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:black">I’d like to introduce the CdePkg to edk2-staging.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="xmsonormal"><span style="color:black">Some time ago I decided to write my own ANSI C Library for UEFI Shell and POST.<o:p></o:p></span></p>
<p class="xmsonormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="xmsonormal"><span style="color:black">The UEFI Shell library (“Torito C Library”) has been production-ready for more than one year.<o:p></o:p></span></p>
<p class="xmsonormal"><span style="color:black">The POST version of the library (“CdeLib”) is not yet fully tested.<o:p></o:p></span></p>
<p class="xmsonormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="xmsonormal"><span style="color:black">I will be demonstrating my verification procedure in the upcoming weeks on EDK2 STAGING 
</span><a href="https://github.com/tianocore/edk2-staging/tree/CdePkg">https://github.com/tianocore/edk2-staging/tree/CdePkg</a></p>
<p class="xmsonormal"><o:p> </o:p></p>
<p class="xmsonormal">Currently there are 3 examples implemented:</p>
<ol style="margin-top:0in" start="8" type="1">
<li class="xmsonormal" style="color:black;mso-list:l2 level1 lfo1"><b><span style="color:windowtext">argvc:
</span></b><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/HOSTED_ENV/argcv/main.c#L57">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/HOSTED_ENV/argcv/main.c#L57</a><b><i><o:p></o:p></i></b></li></ol>
<p class="xmsonormal" style="text-indent:.5in">argc/argv handling according to <a href="https://msdn.microsoft.com/en-us/library/a1y7w461.aspx">
https://msdn.microsoft.com/en-us/library/a1y7w461.aspx</a></p>
<ol style="margin-top:0in" start="9" type="1">
<li class="xmsonormal" style="color:black;mso-list:l2 level1 lfo1"><b><span style="color:windowtext">systeminterfacePEI</span></b><span style="color:windowtext">:
</span><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfacePEI/main.c#L57">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfacePEI/main.c#L57</a><o:p></o:p></li></ol>
<p class="xmsonormal" style="margin-left:.5in"><span style="color:black">demonstration, how
</span><b><span style="font-family:"Miriam Fixed";color:black">PeiServices</span></b><span style="color:black"> and
</span><b><span style="font-family:"Miriam Fixed";color:black">FileHandle</span></b><span style="color:black"> are passed into
</span><b><span style="font-family:"Miriam Fixed";color:black">main()<o:p></o:p></span></b></p>
<ol style="margin-top:0in" start="10" type="1">
<li class="xmsonormal" style="color:black;mso-list:l2 level1 lfo1"><b><span style="color:windowtext">systeminterfaceDXE</span></b><span style="color:windowtext">:
</span><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfaceDXE/main.c#L57">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfaceDXE/main.c#L57</a><o:p></o:p></li></ol>
<p class="xmsonormal" style="margin-left:.5in"><span style="color:black">demonstration, how
</span><b><span style="font-family:"Miriam Fixed"">SystemTable</span></b><span style="color:black"> and
</span><b><span style="font-family:"Miriam Fixed";color:black">ImageHandle</span></b><span style="color:black"> are passed into
</span><b><span style="font-family:"Miriam Fixed";color:black">main()<o:p></o:p></span></b></p>
<p class="xmsonormal"><b><span style="font-family:"Miriam Fixed";color:black"><o:p> </o:p></span></b></p>
<p class="xmsonormal"><span style="color:black">Upcoming next demonstration will be the
</span><b><span style="font-family:"Miriam Fixed";color:black">clock()</span></b><span style="color:black"> function end of this week<o:p></o:p></span></p>
<p class="xmsonormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="xmsonormal"><span style="color:black">The idea is to bring the ANSI C Library interface into POST drivers.<o:p></o:p></span></p>
<p class="xmsonormal"><span style="color:black">This will:<o:p></o:p></span></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="xmsonormal" style="color:black;mso-list:l4 level1 lfo2">ease porting tasks<o:p></o:p></li><li class="xmsonormal" style="color:black;mso-list:l4 level1 lfo2">allow cross development<o:p></o:p></li><li class="xmsonormal" style="color:black;mso-list:l4 level1 lfo2">allow developers to focus on their aims, because
<span style="color:windowtext">they aren’t forced to keep in mind a lot of additional info (e.g.
</span><b><span style="font-family:"Miriam Fixed";color:windowtext">RShiftU64</span></b><span style="color:windowtext">)</span><o:p></o:p></li><li class="xmsonormal" style="color:black;mso-list:l4 level1 lfo2">provide all intrisics to allow the compiler to be a “C compiler”<o:p></o:p></li></ol>
<p class="xmsonormal" style="margin-left:.5in"><span style="color:black">(e.g. </span>
<b><span style="font-family:"Miriam Fixed";color:black">char buffer[256] = { 1</span></b><span style="font-family:"Miriam Fixed";color:black"> };</span><span style="color:black">)<o:p></o:p></span></p>
<p class="xmsonormal"><span style="color:black"><o:p> </o:p></span></p>
<p class="xmsonormal"><span style="color:black">What is CdePkg and Torito C Library?<o:p></o:p></span></p>
<ul style="margin-top:0in" type="disc">
<li class="xmsonormal" style="color:black;mso-list:l0 level1 lfo3">CdePkg and Torito C Library are a
<i>one man show / after work party</i>, that is owned and written solely by myself<o:p></o:p></li><li class="xmsonormal" style="color:black;mso-list:l0 level1 lfo3">CdePkg is a reference implementation only for Microsoft C compiler<o:p></o:p></li><li class="xmsonormal" style="color:black;mso-list:l0 level1 lfo3">CdePkg is a feasibility study<o:p></o:p></li><li class="xmsonormal" style="color:black;mso-list:l0 level1 lfo3">CdePkg is the successor of Torito C, based on the same source code<o:p></o:p></li><li class="xmsonormal" style="color:black;mso-list:l0 level1 lfo3">CdePkg C Development Environment is similar to  MdePkg Module Development Environment<o:p></o:p></li></ul>
<p class="xmsonormal" style="text-indent:.5in"><span style="color:black">but guarantees  that the C compiler is always fully usable (all intrinsics available) and the C90/C95 standard library is always available<o:p></o:p></span></p>
<p class="xmsonormal" style="margin-left:.5in"><span style="color:black"><o:p> </o:p></span></p>
<p class="xmsonormal"><span style="color:black">What are the design goals?<o:p></o:p></span></p>
<ul style="margin-top:0in" type="disc">
<li class="xmsolistparagraph" style="color:black;margin-left:0in;mso-list:l0 level1 lfo3">
to rewrite the whole thing from scratch, without using any public source code from GNU, BSD, Watcom<o:p></o:p></li><li class="xmsolistparagraph" style="color:black;margin-left:0in;mso-list:l0 level1 lfo3">
completeness: full blown C90 + C95 support, as lowest common denominator<o:p></o:p></li><li class="xmsolistparagraph" style="color:black;margin-left:0in;mso-list:l0 level1 lfo3">
tailored for UEFI: small code size, for UEFI-POST-driver uses a C-Library-Driver, that contains core/worker functions for
<b><span style="font-family:"Miriam Fixed"">realloc()</span></b> ==  <b><span style="font-family:"Miriam Fixed"">malloc()</span></b><span style="font-family:"Miriam Fixed"">
</span>and<span style="font-family:"Miriam Fixed""> <b>free()</b>, <o:p></o:p></span></li></ul>
<p class="xmsonormal" style="text-indent:.5in"><span style="color:black">entire</span><span style="font-family:"Miriam Fixed";color:black">
<b>printf()</b></span><span style="color:black">-family</span><span style="font-family:"Miriam Fixed";color:black">,
</span><span style="color:black">entire</span><span style="font-family:"Miriam Fixed";color:black">
<b>scanf()</b></span><span style="color:black">-family.</span><span style="font-family:"Miriam Fixed";color:black"><o:p></o:p></span></p>
<p class="xmsonormal" style="text-indent:.5in"><span style="color:black">UEFI-POST-driver just uses small wrapper functions to run the C-Library-Driver code.<o:p></o:p></span></p>
<ul style="margin-top:0in" type="disc">
<li class="xmsonormal" style="color:black;mso-list:l0 level1 lfo3">stable, exact, chipset independent TSC based
<b><span style="font-family:"Miriam Fixed"">clock()</span></b> with<span style="font-family:"Miriam Fixed"">
<b>CLOCKS_PER_SEC</b></span> == 1000 <o:p></o:p></li><li class="xmsonormal" style="color:black;mso-list:l0 level1 lfo3">complete set of the Microsoft C-compiler intrinsic functions
<o:p></o:p></li><li class="xmsolistparagraph" style="color:black;margin-left:0in;mso-list:l0 level1 lfo3">
<span style="color:red">ROM-able! Runs with stack but w/o any static storage duration in .data segment, e.g. for
</span><b><span style="font-family:"Miriam Fixed";color:red">rand(), strtok(), tmpfile()</span></b><b><span style="font-family:"Miriam Fixed""><o:p></o:p></span></b></li></ul>
<p class="xmsolistparagraph"><span style="color:black">This is required for early PEI before memory sizing, when PEI-images run directly out of flash<o:p></o:p></span></p>
<ul style="margin-top:0in" type="disc">
<li class="xmsolistparagraph" style="color:black;margin-left:0in;mso-list:l0 level1 lfo3">
Microsoft (bug) compatible (as far as possible)<o:p></o:p></li></ul>
<ol style="margin-top:0in" start="5" type="1">
<ol style="margin-top:0in" start="1" type="a">
<li class="xmsolistparagraph" style="color:black;margin-left:0in;mso-list:l3 level2 lfo4">
use original Microsoft header files for UEFI Shell Apps created in VS2019 <o:p></o:p></li><li class="xmsolistparagraph" style="color:black;margin-left:0in;mso-list:l3 level2 lfo4">
allow expensive debugging tasks of ANSI C .EFI applications in Visual Studio in its Windows NT counter part<o:p></o:p></li><li class="xmsolistparagraph" style="color:black;margin-left:0in;mso-list:l3 level2 lfo4">
to save my lifetime writing a documentation <a href="https://github.com/tianocore/edk2-staging/tree/CdePkg/implemented.md#validation-status">
https://github.com/tianocore/edk2-staging/tree/CdePkg/implemented.md#validation-status</a><o:p></o:p></li></ol>
</ol>
<ul style="margin-top:0in" type="disc">
<li class="MsoListParagraph" style="color:black;margin-left:0in;mso-list:l0 level1 lfo3">
all the above in one single C-Library CdeLib.lib<o:p></o:p></li></ul>
<p class="MsoListParagraph"><span style="color:black"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="color:black">CdePkg</span></b><span style="color:black"> shall be adjusted to other compilers/tool chains too, once it is feature-complete and accepted by the UEFI community.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:black">As long as it is for Microsoft VS2019 only.<o:p></o:p></span></p>
<p class="MsoNormal"><b><span style="color:black"><o:p> </o:p></span></b></p>
<p class="MsoNormal"><b><span style="color:black">CdePkg</span></b><span style="color:black"> README.md is here:
</span><a href="https://github.com/MinnowWare/CdePkg#cdepkg" title="https://github.com/MinnowWare/CdePkg#cdepkg
STRG + Klicken, um Verknüpfung zu folgen"><span style="color:windowtext;text-decoration:none"> </span></a> <a href="https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg">https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg</a><o:p></o:p></p>
<p class="MsoNormal"><b>CdePkg</b> <span style="color:black">HOWTO</span> is here:
<a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/README.md#howto">https://github.com/tianocore/edk2-staging/blob/CdePkg/README.md#howto</a><o:p></o:p></p>
<p class="MsoNormal"><b><span style="color:black">CdeValidationPkg</span></b><span style="color:black"> README.md is here:
</span><a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md#cdevalidationpkg">https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md</a><o:p></o:p></p>
<p class="MsoNormal"><b><span style="color:black">CdeValidationPkg</span></b> <span style="color:black">
HOWTO</span> is here: <a href="https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md#howto">
https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="xmsonormal"><span style="color:black">HOWTO:<o:p></o:p></span></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="xmsonormal" style="color:black;mso-list:l1 level1 lfo5">clone the <b>edk2-staging</b> repository<o:p></o:p></li><li class="xmsonormal" style="color:black;mso-list:l1 level1 lfo5">checkout <b>CdePkg</b><o:p></o:p></li><li class="xmsonormal" style="color:black;mso-list:l1 level1 lfo5">run <b>LAUNCH.BAT</b><o:p></o:p></li><li class="xmsonormal" style="mso-list:l1 level1 lfo5"><span style="color:black">run
</span><code><b><span style="font-size:10.0pt">build -p EmulatorPkg\EmulatorPkg.dsc -t VS2015x86 -a IA32</span></b></code><code><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></code></li><li class="xmsonormal" style="mso-list:l1 level1 lfo5"><code><span style="font-size:10.0pt">run<b> DBGEMU.BAT
</b>to start emulation<b> (EmulatorPkg)</b><o:p></o:p></span></code></li><li class="xmsonormal" style="mso-list:l1 level1 lfo5"><code><span style="font-size:10.0pt">run<b> build -a IA32 -a X64 -n 5 -t VS2015x86 -b DEBUG -p Vlv2TbltDevicePkg\PlatformPkgX64.dsc</b></span></code><code><b><span style="font-size:10.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></b></code></li><li class="xmsonormal" style="mso-list:l1 level1 lfo5"><code><span style="font-size:10.0pt">update MinnowBoard with<b> Build/Vlv2TbltDevicePkgX64\DEBUG_VS2015x86\FV\VLV.fd</b><o:p></o:p></span></code></li></ol>
<p class="xmsonormal"><code><b><span style="font-size:10.0pt"><o:p> </o:p></span></b></code></p>
<p class="xmsonormal"><code><span style="font-size:10.0pt">Best regards,<o:p></o:p></span></code></p>
<p class="xmsonormal"><code><span style="font-size:10.0pt">Kilian Kegel</span></code></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"></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/51220">View/Reply Online (#51220)</a> |


  


|


  
    <a target="_blank" href="https://groups.io/mt/61916424/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>