<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:"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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        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:225536832;
        mso-list-type:hybrid;
        mso-list-template-ids:-1532560996 -1 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l1
        {mso-list-id:2114548508;
        mso-list-type:hybrid;
        mso-list-template-ids:249330502 -1 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
        {mso-level-start-at:0;
        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 l0:level1 lfo1
        {mso-level-start-at:0;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Hi Maciej,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I have updated and fixed build errors in branch CdePkg (<a href="https://github.com/tianocore/edk2-staging.git">https://github.com/tianocore/edk2-staging.git</a>).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Also a POST trace is recorded on my MinnowBoard and stored here:<o:p></o:p></p>
<p class="MsoNormal"><a href="https://raw.githubusercontent.com/tianocore/edk2-staging/CdePkg/UEFIBinaries/RELEASE.log">https://raw.githubusercontent.com/tianocore/edk2-staging/CdePkg/UEFIBinaries/RELEASE.log</a><o:p></o:p></p>
<p class="MsoNormal">All implemented Standard-C-functions from CdePkg/Torito C Library demonstrates<o:p></o:p></p>
<p class="MsoNormal">its basic behavior.<o:p></o:p></p>
<p class="MsoNormal">There are also a lot of WCHAR.H- and WCTYPE.H-functions.<o:p></o:p></p>
<p class="MsoNormal">For the wide-functions I just perform the characters 0..0x1FF instead of all 65536
<o:p></o:p></p>
<p class="MsoNormal">different wchar_t characters due to runtime regards…<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regrettably the MinnowBoard is deprecated <a href="https://www.silicom-usa.com/pr/eol/minnowboard-turbot/">
https://www.silicom-usa.com/pr/eol/minnowboard-turbot</a><o:p></o:p></p>
<p class="MsoNormal">but the CdePkg also runs in the EMULATOR: <a href="https://github.com/tianocore/edk2-staging/tree/CdePkg#howto">
https://github.com/tianocore/edk2-staging/tree/CdePkg#howto</a><o:p></o:p></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>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:kilian_kegel@outlook.com">Kilian Kegel</a><br>
<b>Sent: </b>Thursday, August 5, 2021 06:14 AM<br>
<b>To: </b><a href="mailto:devel@edk2.groups.io">devel@edk2.groups.io</a>; <a href="mailto:afish@apple.com">
afish@apple.com</a>; <a href="mailto:leif@nuviainc.com">Leif Lindholm</a><br>
<b>Cc: </b><a href="mailto:rebecca@nuviainc.com">Rebecca Cran</a>; <a href="mailto:tim.lewis@insyde.com">
tim.lewis@insyde.com</a>; <a href="mailto:maciej.rabeda@linux.intel.com">maciej.rabeda@linux.intel.com</a>;
<a href="mailto:michael.d.kinney@intel.com">Mike Kinney</a><br>
<b>Subject: </b>Re: [edk2-devel] "StdLibPkg" branch on edk2-staging</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Hi all,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I plan to come back with the <a href="https://github.com/tianocore/edk2-staging/tree/CdePkg">
https://github.com/tianocore/edk2-staging/tree/CdePkg</a> end of this year<o:p></o:p></p>
<p class="MsoNormal">and to unroll the source code of fundamental parts of my C Library and discuss that along<o:p></o:p></p>
<p class="MsoNormal">the 30. anniversary of “The C Book” <a href="https://publications.gbdirect.co.uk/c_book/chapter9">
https://publications.gbdirect.co.uk/c_book/chapter9</a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Additionally I will discuss the details you need to know:<o:p></o:p></p>
<ol style="margin-top:0in" start="0" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">about the differences C90/C95/C99 in language and library<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">how to get HOSTED ENVIRONMENT for UEFI POST drivers<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">how to get Intel/AMD TimeStampCounter based precise time calibration - platform,
<o:p></o:p></li></ol>
<p class="MsoListParagraph">processor  and chipset independent for x86 UEFI platforms</p>
<ol style="margin-top:0in" start="3" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">how to arrange space optimization for UEFI FW as an embedded platform<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">how to test and verify the compatibility of a Standard C Library implementation,<o:p></o:p></li></ol>
<p class="MsoListParagraph">since “CI“ won’t help at all in this regards</p>
<ol style="margin-top:0in" start="5" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">how to implement a printf-core that performs narrow and wide mode at once for space optimization<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">how to implement a scanf-core that performs narrow and wide mode at once for space optimization<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">how to implement realloc() sub-allocator on UEFI memory management functions for PEI and DXE<o:p></o:p></li></ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Note: If UEFI is going to provide Standard-C-Functions for all drivers, you will have soon e.g. “sprintf()”<o:p></o:p></p>
<p class="MsoNormal">in all drivers. The amount of code for a proper sprintf() + scanf() + wscanf() + strtok() + wcstok() + malloc() … implementation<o:p></o:p></p>
<p class="MsoNormal">that is not tailored for embedded FW, will overrun the BIOS FLASH space instantly.<o:p></o:p></p>
<p class="MsoNormal">I consider commercial BIOS implementations that runs really many drivers (> 100) to start a platform.<o:p></o:p></p>
<p class="MsoListParagraph"><o:p> </o:p></p>
<p class="MsoNormal">Currently I implement more feature to CdePkg/Torito C Library:<o:p></o:p></p>
<ol style="margin-top:0in" start="0" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2">Improve UEFI driver cross development for VisualStudio and EDK2
<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2">substitution of “DEBUG” traces by CdePkg-traces<o:p></o:p></li></ol>
<p class="MsoListParagraph">that allows usage of predefined DEBUG-messages to run in a CdePkg-based driver.</p>
<p class="MsoListParagraph"><o:p> </o:p></p>
<p class="MsoListParagraph">Sole purpose is to have DEBUG/RELEASE mode _NOT_ globally, but locally to get
</p>
<p class="MsoListParagraph">trace messages selectively for specific drivers only.</p>
<p class="MsoListParagraph">(to speed up POST with traces, that consumes a significant amount of time during</p>
<p class="MsoListParagraph">working hours of a BIOS developer)</p>
<p class="MsoListParagraph"><o:p> </o:p></p>
<ol style="margin-top:0in" start="2" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2">add SMM support.
<o:p></o:p></li></ol>
<p class="MsoListParagraph">Shell, DXE, PEI (pre and post memory) is already available for 2 years:</p>
<p class="MsoNormal" style="text-indent:.5in"><a href="https://edk2.groups.io/g/devel/message/51562?p=,,,20,0,0,0::Created,,CdePkg,20,2,0,65191785">https://edk2.groups.io/g/devel/message/51562?p=,,,20,0,0,0::Created,,CdePkg,20,2,0,65191785</a><o:p></o:p></p>
<p class="MsoListParagraph"><o:p> </o:p></p>
<ol style="margin-top:0in" start="3" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l1 level1 lfo2">get ACPICA tools
<a href="https://acpica.org/">https://acpica.org/</a> to UEFI Shell <o:p></o:p></li></ol>
<p class="MsoListParagraph"><o:p> </o:p></p>
<p class="MsoListParagraph">I need to implement some non-standard / Microsoft specific C functions
</p>
<p class="MsoListParagraph">to get that running for Andrew Fish.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">That time links from <a href="https://github.com/KilianKegel">
https://github.com/KilianKegel</a> are under construction and are <o:p></o:p></p>
<p class="MsoNormal">not necessarily  up-to-date.<o:p></o:p></p>
<p class="MsoNormal">Same for <a href="https://github.com/tianocore/edk2-staging/tree/CdePkg">
https://github.com/tianocore/edk2-staging/tree/CdePkg</a> that is not used for long …<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">But <a href="https://github.com/KilianKegel/CdePkg.git">https://github.com/KilianKegel/CdePkg.git</a> driver set and sample set runs instantly
<o:p></o:p></p>
<p class="MsoNormal">on the latest BIOS of a commercial vendor on a Intel IOTG TGL-H (Tiger Lake H) board using the Microsoft<o:p></o:p></p>
<p class="MsoNormal">build environment.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@Tim: I’d really appreciate if CdePkg could hold additionally Insyde BIOS support. Regrettably<o:p></o:p></p>
<p class="MsoNormal">I do not have access to Insyde source code.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">@Maciej<o:p></o:p></p>
<p class="MsoNormal">I can not see any “wide” functions here. <a href="https://github.com/DevSolar/pdclib%20from%20WCHAR.H">
https://github.com/DevSolar/pdclib</a><o:p></o:p></p>
<p class="MsoNormal">from WCHAR.H or WCTYPE.H. That is a serious limitation in the UEFI environment.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">To create UEFI-Shell programs for Personal Computers this link can be used.<o:p></o:p></p>
<p class="MsoNormal"><a href="https://github.com/KilianKegel/Visual-ANSI-C-for-UEFI-Shell#visual-ansi-c-for-uefi-shell">https://github.com/KilianKegel/Visual-ANSI-C-for-UEFI-Shell#visual-ansi-c-for-uefi-shell</a><o:p></o:p></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>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From: </b><a href="mailto:afish=apple.com@groups.io">Andrew Fish via groups.io</a><br>
<b>Sent: </b>Thursday, August 5, 2021 05:35 AM<br>
<b>To: </b><a href="mailto:devel@edk2.groups.io">edk2-devel-groups-io</a>; <a href="mailto:leif@nuviainc.com">
Leif Lindholm</a><br>
<b>Cc: </b><a href="mailto:rebecca@nuviainc.com">Rebecca Cran</a>; <a href="mailto:tim.lewis@insyde.com">
tim.lewis@insyde.com</a>; <a href="mailto:maciej.rabeda@linux.intel.com">maciej.rabeda@linux.intel.com</a>;
<a href="mailto:michael.d.kinney@intel.com">Mike Kinney</a><br>
<b>Subject: </b>Re: [edk2-devel] "StdLibPkg" branch on edk2-staging<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt">I’d guess I’d also ask the why not NewLib? Especially since Red Hat helps out with edk2….<br>
<br>
Thanks,<br>
<br>
Andrew Fish<br>
<br>
> On Aug 4, 2021, at 4:03 AM, Leif Lindholm <leif@nuviainc.com> wrote:<br>
> <br>
> Hi Rebecca,<br>
> <br>
> I think the truth is we're a bit resigned about edk2-libc in general.<br>
> My view is it should be either maintained or deprecated (or replaced).<br>
> <br>
> And maintainership *should* mean at least keeping it up to date with<br>
> security fixes.<br>
> <br>
> I personally have no enthusiasm for the topic, but if there existed:<br>
> - An up-to-date codebase.<br>
> - A plan for keeping the coodbase up-to-date (as opposed to a plan to<br>
>  keep the codebase up-to-date).<br>
> - At least a couple of maintainers.<br>
> I would have no objection to that existing under the TianoCore<br>
> umbrella.<br>
> <br>
> Best Regards,<br>
> <br>
> Leif<br>
> <br>
> On Wed, Jul 28, 2021 at 16:44:02 -0600, Rebecca Cran wrote:<br>
>> CC'ing the Tianocore stewards.<br>
>> <br>
>> <br>
>> I've had problems getting a recent patch committed just to make edk2-libc<br>
>> work against current edk2 master.<br>
>> <br>
>> Tianocore stewards: do we need new or additional maintainers for edk2-libc,<br>
>> or is there a plan to deprecate it?<br>
>> <br>
>> <br>
>> The current maintainers are listed as:<br>
>> <br>
>> StdLib, StdLibPrivateInternalFiles<br>
>> W: <a href="https://github.com/tianocore/tianocore.github.io/wiki/StdLib">https://github.com/tianocore/tianocore.github.io/wiki/StdLib</a><br>
>> M: Daryl McDaniel <edk2-lists@mc2research.org><br>
>> M: Jaben Carsey <jaben.carsey@intel.com><br>
>> <br>
>> <br>
>> -- <br>
>> Rebecca Cran<br>
>> <br>
>> <br>
>> On 7/28/21 4:25 PM, tim.lewis@insyde.com wrote:<br>
>>> I would point out that there was significant work on libc in the<br>
>> past (see <a href="https://github.com/andreiw/UefiToolsPkg">https://github.com/andreiw/UefiToolsPkg</a>) but never any<br>
>> help to upstream these fixes, including making sure that many Linux<br>
>> tools can easily be ported. I myself have used it to port several<br>
>> BSD utilities over, but each time there will little nits with the<br>
>> existing port and even small patches were returned with "no current<br>
>> maintainer"<br>
>>> <br>
>>> In terms of making other projects use libc, I think the other<br>
>>> objection was that it was never optimized for non-shell<br>
>>> usage. Other projects (lie<br>
>>> <a href="https://github.com/tianocore/edk2-staging/tree/CdePkg">https://github.com/tianocore/edk2-staging/tree/CdePkg</a> ) have tried<br>
>>> to remedy this, but never with source checked in. But it allows<br>
>>> support under PEI, DXE, etc.<br>
>>> <br>
>>> Tim<br>
>>> <br>
>>> -----Original Message-----<br>
>>> From: devel@edk2.groups.io <devel@edk2.groups.io> On Behalf Of Rebecca Cran<br>
>>> Sent: Wednesday, July 28, 2021 8:34 AM<br>
>>> To: devel@edk2.groups.io; maciej.rabeda@linux.intel.com<br>
>>> Subject: Re: [edk2-devel] "StdLibPkg" branch on edk2-staging<br>
>>> <br>
>>> Are you aware of the edk2-libc project at <a href="https://github.com/tianocore/edk2-libc">
https://github.com/tianocore/edk2-libc</a> ?<br>
>>> <br>
>>> <br>
> <br>
> <br>
> <br>
> <br>
> <br>
<br>
<br>
<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<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/79112">View/Reply Online (#79112)</a> |    |  <a target="_blank" href="https://groups.io/mt/84484790/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>