* [staging/branch]: CdePkg - added unit test for clock() function [not found] <15D05F40761233FD.22068@groups.io> @ 2019-11-08 15:15 ` Kilian Kegel [not found] ` <15D538D913DB9115.9779@groups.io> 1 sibling, 0 replies; 4+ messages in thread From: Kilian Kegel @ 2019-11-08 15:15 UTC (permalink / raw) To: devel@edk2.groups.io; +Cc: Kinney, Michael D, Richardson, Brian [-- Attachment #1.1: Type: text/plain, Size: 7104 bytes --] Hi UEFI community, I’d like to inform you about an update in the CdePkg branch of edk2-staging. https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg The goal of the CdePkg is to provide an ANSI C Interface for UEFI POST drivers, that enables BIOS engineers to (more) easily port standard C programs or libraries (e.g. the openSSL library, already done) to POST drivers. Furthermore the ANSI C Interface is disseminated widely, also it’s bugs and pitfalls are known very well by a broad range of IT professionals and may help to be better supportable by the open source initiative compared to the proprietary interface that is available today in Tianocore UEFI. Now the ANSI C function clock() is introduced for PEI and DXE. Currently there are 4 examples implemented: 1. argvc: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/HOSTED_ENV/argcv/main.c#L57 argc/argv handling according to https://msdn.microsoft.com/en-us/library/a1y7w461.aspx 1. systeminterfacePEI: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfacePEI/main.c#L57 demonstration, how PeiServices and FileHandle are passed into main() 1. systeminterfaceDXE: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfaceDXE/main.c#L57 demonstration, how SystemTable and ImageHandle are passed into main() ANSI C LIBRARY functions: 1. NEW: time.h clock(): https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/TIME_H/clock/main.c#L1 for PEI and DXE phase. It provides TSC based, millisecond precise, exact and chipset independent clock() function. (NOTE: in emulation mode the TSC nominal frequency is supposed to be 1GHz) https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/clock?view=vs-2019 Best Regards, Kilian From: Kilian Kegel<mailto:KILIAN_KEGEL@OUTLOOK.COM> Sent: Wednesday, October 23, 2019 10:03 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> Cc: Kinney, Michael D<mailto:michael.d.kinney@intel.com>; Richardson, Brian<mailto:brian.richardson@intel.com> Subject: [edk2-devel] [staging/branch]: CdePkg - C Development Environment Package Hi UEFI community, I’d like to introduce the CdePkg to edk2-staging. Some time ago I decided to write my own ANSI C Library for UEFI Shell and POST. The UEFI Shell library (“Torito C Library”) has been production-ready for more than one year. The POST version of the library (“CdeLib”) is not yet fully tested. I will be demonstrating my verification procedure in the upcoming weeks on EDK2 STAGING https://github.com/tianocore/edk2-staging/tree/CdePkg Currently there are 3 examples implemented: 1. argvc: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/HOSTED_ENV/argcv/main.c#L57 argc/argv handling according to https://msdn.microsoft.com/en-us/library/a1y7w461.aspx 1. systeminterfacePEI: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfacePEI/main.c#L57 demonstration, how PeiServices and FileHandle are passed into main() 1. systeminterfaceDXE: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfaceDXE/main.c#L57 demonstration, how SystemTable and ImageHandle are passed into main() Upcoming next demonstration will be the clock() function end of this week The idea is to bring the ANSI C Library interface into POST drivers. This will: 1. ease porting tasks 2. allow cross development 3. allow developers to focus on their aims, because they aren’t forced to keep in mind a lot of additional info (e.g. RShiftU64) 4. provide all intrisics to allow the compiler to be a “C compiler” (e.g. char buffer[256] = { 1 };) What is CdePkg and Torito C Library? * CdePkg and Torito C Library are a one man show / after work party, that is owned and written solely by myself * CdePkg is a reference implementation only for Microsoft C compiler * CdePkg is a feasibility study * CdePkg is the successor of Torito C, based on the same source code * CdePkg C Development Environment is similar to MdePkg Module Development Environment but guarantees that the C compiler is always fully usable (all intrinsics available) and the C90/C95 standard library is always available What are the design goals? * to rewrite the whole thing from scratch, without using any public source code from GNU, BSD, Watcom * completeness: full blown C90 + C95 support, as lowest common denominator * tailored for UEFI: small code size, for UEFI-POST-driver uses a C-Library-Driver, that contains core/worker functions for realloc() == malloc() and free(), entire printf()-family, entire scanf()-family. UEFI-POST-driver just uses small wrapper functions to run the C-Library-Driver code. * stable, exact, chipset independent TSC based clock() with CLOCKS_PER_SEC == 1000 * complete set of the Microsoft C-compiler intrinsic functions * ROM-able! Runs with stack but w/o any static storage duration in .data segment, e.g. for rand(), strtok(), tmpfile() This is required for early PEI before memory sizing, when PEI-images run directly out of flash * Microsoft (bug) compatible (as far as possible) * use original Microsoft header files for UEFI Shell Apps created in VS2019 * allow expensive debugging tasks of ANSI C .EFI applications in Visual Studio in its Windows NT counter part * to save my lifetime writing a documentation https://github.com/tianocore/edk2-staging/tree/CdePkg/implemented.md#validation-status * all the above in one single C-Library CdeLib.lib CdePkg shall be adjusted to other compilers/tool chains too, once it is feature-complete and accepted by the UEFI community. As long as it is for Microsoft VS2019 only. CdePkg README.md is here: <https://github.com/MinnowWare/CdePkg#cdepkg> https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg CdePkg HOWTO is here: https://github.com/tianocore/edk2-staging/blob/CdePkg/README.md#howto CdeValidationPkg README.md is here: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md<https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md#cdevalidationpkg> CdeValidationPkg HOWTO is here: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md<https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md#howto> HOWTO: 1. clone the edk2-staging repository 2. checkout CdePkg 3. run LAUNCH.BAT 4. run build -p EmulatorPkg\EmulatorPkg.dsc -t VS2015x86 -a IA32 5. run DBGEMU.BAT to start emulation (EmulatorPkg) 6. run build -a IA32 -a X64 -n 5 -t VS2015x86 -b DEBUG -p Vlv2TbltDevicePkg\PlatformPkgX64.dsc 7. update MinnowBoard with Build/Vlv2TbltDevicePkgX64\DEBUG_VS2015x86\FV\VLV.fd Best regards, Kilian Kegel [-- Attachment #1.2: Type: text/html, Size: 31244 bytes --] [-- Attachment #2: 33369CBCB1E842509A6F7F2F2748CB1B.png --] [-- Type: image/png, Size: 132 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <15D538D913DB9115.9779@groups.io>]
* [staging/branch]: CdePkg - added unit test for remaining TIME.H functions - difftime(), mktime(), time(), asctime(), ctime(), gmtime(), localtime(), strftime() [not found] ` <15D538D913DB9115.9779@groups.io> @ 2019-11-11 19:02 ` Kilian Kegel [not found] ` <15D630F5419FB939.1274@groups.io> 1 sibling, 0 replies; 4+ messages in thread From: Kilian Kegel @ 2019-11-11 19:02 UTC (permalink / raw) To: devel@edk2.groups.io; +Cc: Kinney, Michael D, Richardson, Brian [-- Attachment #1.1: Type: text/plain, Size: 8695 bytes --] Hi UEFI community, I’d like to inform you about an update in the CdePkg branch of edk2-staging. https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg The goal of the CdePkg is to provide an ANSI C Interface for UEFI POST drivers, that enables BIOS engineers to (more) easily port standard C programs or libraries (e.g. the openSSL library, already done) to POST drivers. Furthermore the ANSI C Interface is disseminated widely, also it’s bugs and pitfalls are known very well by a broad range of IT professionals and may help to be better supportable by the open source initiative compared to the proprietary interface that is available today in Tianocore UEFI. Now the ANSI C functions difftime() mktime() time() asctime() ctime() gmtime() localtime() strftime() are introduced for PEI and DXE. Currently there are 4 examples implemented: 1. argvc: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/HOSTED_ENV/argcv/main.c#L57 argc/argv handling according to https://msdn.microsoft.com/en-us/library/a1y7w461.aspx 1. systeminterfacePEI: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfacePEI/main.c#L57 demonstration, how PeiServices and FileHandle are passed into main() 1. systeminterfaceDXE: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfaceDXE/main.c#L57 demonstration, how SystemTable and ImageHandle are passed into main() ANSI C LIBRARY functions: 1. time.h clock(): https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/TIME_H/clock/main.c#L1 for PEI and DXE phase. It provides TSC based, millisecond precise, exact and chipset independent clock() function. NOTE: in emulation mode the TSC nominal frequency is supposed to be 1GHz https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/clock?view=vs-2019 1. NEW: time.h difftime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/difftime-difftime32-difftime64?view=vs-2019 NEW: time.h mktime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/mktime-mktime32-mktime64?view=vs-2019<%20https:/docs.microsoft.com/en-us/cpp/c-runtime-library/reference/mktime-mktime32-mktime64?view=vs-2019> NEW: time.h time(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-time64?view=vs-2019<%20https:/docs.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-time64?view=vs-2019> NEW: time.h asctime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/asctime-wasctime?view=vs-2019 NEW: time.h ctime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64?view=vs-2019 NEW: time.h gmtime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/gmtime-gmtime32-gmtime64?view=vs-2019 NEW: time.h localtime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/localtime-localtime32-localtime64?view=vs-2019 NEW: time.h strftime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?view=vs-2019 NOTE: All TIME.H functions support UTC only. All functions are tested in one single driver PEI/DXE: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/TIME_H/timehfunctions/main.c#L52 Best Regards, Kilian From: Kilian Kegel<mailto:KILIAN_KEGEL@OUTLOOK.COM> Sent: Wednesday, October 23, 2019 10:03 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> Cc: Kinney, Michael D<mailto:michael.d.kinney@intel.com>; Richardson, Brian<mailto:brian.richardson@intel.com> Subject: [edk2-devel] [staging/branch]: CdePkg - C Development Environment Package Hi UEFI community, I’d like to introduce the CdePkg to edk2-staging. Some time ago I decided to write my own ANSI C Library for UEFI Shell and POST. The UEFI Shell library (“Torito C Library”) has been production-ready for more than one year. The POST version of the library (“CdeLib”) is not yet fully tested. I will be demonstrating my verification procedure in the upcoming weeks on EDK2 STAGING https://github.com/tianocore/edk2-staging/tree/CdePkg Currently there are 3 examples implemented: 1. argvc: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/HOSTED_ENV/argcv/main.c#L57 argc/argv handling according to https://msdn.microsoft.com/en-us/library/a1y7w461.aspx 1. systeminterfacePEI: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfacePEI/main.c#L57 demonstration, how PeiServices and FileHandle are passed into main() 1. systeminterfaceDXE: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfaceDXE/main.c#L57 demonstration, how SystemTable and ImageHandle are passed into main() Upcoming next demonstration will be the clock() function end of this week The idea is to bring the ANSI C Library interface into POST drivers. This will: 1. ease porting tasks 2. allow cross development 3. allow developers to focus on their aims, because they aren’t forced to keep in mind a lot of additional info (e.g. RShiftU64) 4. provide all intrisics to allow the compiler to be a “C compiler” (e.g. char buffer[256] = { 1 };) What is CdePkg and Torito C Library? * CdePkg and Torito C Library are a one man show / after work party, that is owned and written solely by myself * CdePkg is a reference implementation only for Microsoft C compiler * CdePkg is a feasibility study * CdePkg is the successor of Torito C, based on the same source code * CdePkg C Development Environment is similar to MdePkg Module Development Environment but guarantees that the C compiler is always fully usable (all intrinsics available) and the C90/C95 standard library is always available What are the design goals? * to rewrite the whole thing from scratch, without using any public source code from GNU, BSD, Watcom * completeness: full blown C90 + C95 support, as lowest common denominator * tailored for UEFI: small code size, for UEFI-POST-driver uses a C-Library-Driver, that contains core/worker functions for realloc() == malloc() and free(), entire printf()-family, entire scanf()-family. UEFI-POST-driver just uses small wrapper functions to run the C-Library-Driver code. * stable, exact, chipset independent TSC based clock() with CLOCKS_PER_SEC == 1000 * complete set of the Microsoft C-compiler intrinsic functions * ROM-able! Runs with stack but w/o any static storage duration in .data segment, e.g. for rand(), strtok(), tmpfile() This is required for early PEI before memory sizing, when PEI-images run directly out of flash * Microsoft (bug) compatible (as far as possible) * use original Microsoft header files for UEFI Shell Apps created in VS2019 * allow expensive debugging tasks of ANSI C .EFI applications in Visual Studio in its Windows NT counter part * to save my lifetime writing a documentation https://github.com/tianocore/edk2-staging/tree/CdePkg/implemented.md#validation-status * all the above in one single C-Library CdeLib.lib CdePkg shall be adjusted to other compilers/tool chains too, once it is feature-complete and accepted by the UEFI community. As long as it is for Microsoft VS2019 only. CdePkg README.md is here: <https://github.com/MinnowWare/CdePkg#cdepkg> https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg CdePkg HOWTO is here: https://github.com/tianocore/edk2-staging/blob/CdePkg/README.md#howto CdeValidationPkg README.md is here: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md<https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md#cdevalidationpkg> CdeValidationPkg HOWTO is here: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md<https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md#howto> HOWTO: 1. clone the edk2-staging repository 2. checkout CdePkg 3. run LAUNCH.BAT 4. run build -p EmulatorPkg\EmulatorPkg.dsc -t VS2015x86 -a IA32 5. run DBGEMU.BAT to start emulation (EmulatorPkg) 6. run build -a IA32 -a X64 -n 5 -t VS2015x86 -b DEBUG -p Vlv2TbltDevicePkg\PlatformPkgX64.dsc 7. update MinnowBoard with Build/Vlv2TbltDevicePkgX64\DEBUG_VS2015x86\FV\VLV.fd Best regards, Kilian Kegel [-- Attachment #1.2: Type: text/html, Size: 35613 bytes --] [-- Attachment #2: 36A4E3016B36494BBE07634081E4DE48.png --] [-- Type: image/png, Size: 132 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <15D630F5419FB939.1274@groups.io>]
* [staging/branch]: CdePkg - added unit test for remaining STRING.H functions - memcpy(), memmove(), strcpy(), strncpy(), strcat(), strncat(), memcmp(), strcmp(), strncmp(), memchr(), strchr(), strcspn(), strpbrk(), strrchr(), strspn(), strstr() etc... [not found] ` <15D630F5419FB939.1274@groups.io> @ 2019-11-19 14:19 ` Kilian Kegel 2019-11-19 14:26 ` [edk2-devel] " Ard Biesheuvel 0 siblings, 1 reply; 4+ messages in thread From: Kilian Kegel @ 2019-11-19 14:19 UTC (permalink / raw) To: devel@edk2.groups.io; +Cc: Kinney, Michael D, Richardson, Brian [-- Attachment #1: Type: text/plain, Size: 11864 bytes --] Hi UEFI community, I’d like to inform you about an update in the CdePkg branch of edk2-staging. https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg The goal of the CdePkg is to provide an ANSI C Interface for UEFI POST drivers, that enables BIOS engineers to (more) easily port standard C programs or libraries (e.g. the openSSL library, already done) to POST drivers. Furthermore the ANSI C Interface is disseminated widely, also it’s bugs and pitfalls are known very well by a broad range of IT professionals and may help to be better supportable by the open source initiative compared to the proprietary interface that is available today in Tianocore UEFI. Now 20 new ANSI C functions memcpy(), memmove(), strcpy(), strncpy(), strcat(), strncat(), memcmp(), strcmp(), strncmp(), memchr(), strchr(), strcspn(), strpbrk(), strrchr(), strspn(), strstr(), strtoc(), memset(), strerror() and strlen() are introduced for PEI and DXE. Currently there are 6 examples implemented: 1. argvc: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/HOSTED_ENV/argcv/main.c#L57 argc/argv handling according to https://msdn.microsoft.com/en-us/library/a1y7w461.aspx 1. systeminterfacePEI: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfacePEI/main.c#L57 demonstration, how PeiServices and FileHandle are passed into main() 1. systeminterfaceDXE: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfaceDXE/main.c#L57 demonstration, how SystemTable and ImageHandle are passed into main() ANSI C LIBRARY functions: 1. time.h clock(): https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/TIME_H/clock/main.c#L1 for PEI and DXE phase. It provides TSC based, millisecond precise, exact and chipset independent clock() function. NOTE: in emulation mode the TSC nominal frequency is supposed to be 1GHz https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/clock?view=vs-2019 1. time.h difftime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/difftime-difftime32-difftime64?view=vs-2019 time.h mktime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/mktime-mktime32-mktime64?view=vs-2019<%20https:/docs.microsoft.com/en-us/cpp/c-runtime-library/reference/mktime-mktime32-mktime64?view=vs-2019> time.h time(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-time64?view=vs-2019<%20https:/docs.microsoft.com/en-us/cpp/c-runtime-library/reference/time-time32-time64?view=vs-2019> time.h asctime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/asctime-wasctime?view=vs-2019 time.h ctime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/ctime-ctime32-ctime64-wctime-wctime32-wctime64?view=vs-2019 time.h gmtime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/gmtime-gmtime32-gmtime64?view=vs-2019 time.h localtime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/localtime-localtime32-localtime64?view=vs-2019 time.h strftime(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strftime-wcsftime-strftime-l-wcsftime-l?view=vs-2019 NOTE: All TIME.H functions support UTC only. All functions are tested in one single driver PEI/DXE: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/TIME_H/timehfunctions/main.c#L52 1. NEW: STRING.H memcpy(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcpy-wmemcpy?view=vs-2019 NEW: STRING.H memmove(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memmove-wmemmove?view=vs-2019 NEW: STRING.H strcpy(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcpy-wcscpy-mbscpy?view=vs-2019 NEW: STRING.H strncpy(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncpy-strncpy-l-wcsncpy-wcsncpy-l-mbsncpy-mbsncpy-l?view=vs-2019 NEW: STRING.H strcat(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcat-wcscat-mbscat?view=vs-2019 NEW: STRING.H strncat(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncat-strncat-l-wcsncat-wcsncat-l-mbsncat-mbsncat-l?view=vs-2019 NEW: STRING.H memcmp(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memcmp-wmemcmp?view=vs-2019 NEW: STRING.H strcmp(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcmp-wcscmp-mbscmp?view=vs-2019 NEW: STRING.H strncmp(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strncmp-wcsncmp-mbsncmp-mbsncmp-l?view=vs-2019 NEW: STRING.H memchr(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memchr-wmemchr?view=vs-2019 NEW: STRING.H strchr(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strchr-wcschr-mbschr-mbschr-l?view=vs-2019 NEW: STRING.H strcspn(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strcspn-wcscspn-mbscspn-mbscspn-l?view=vs-2019 NEW: STRING.H strpbrk(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strpbrk-wcspbrk-mbspbrk-mbspbrk-l?view=vs-2019 NEW: STRING.H strrchr(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strrchr-wcsrchr-mbsrchr-mbsrchr-l?view=vs-2019 NEW: STRING.H strspn(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strspn-wcsspn-mbsspn-mbsspn-l?view=vs-2019 NEW: STRING.H strstr(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l?view=vs-2019 NEW: STRING.H strtok(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strtok-strtok-l-wcstok-wcstok-l-mbstok-mbstok-l?view=vs-2019 NEW: STRING.H memset(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/memset-wmemset?view=vs-2019 NEW: STRING.H strerror(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strerror-strerror-wcserror-wcserror?view=vs-2019 NEW: STRING.H strlen(): https://docs.microsoft.com/en-us/cpp/c-runtime-library/reference/strlen-wcslen-mbslen-mbslen-l-mbstrlen-mbstrlen-l?view=vs-2019 NOTE: All STRING.H functions are completely available in PEI and DXE, except strcoll() and strxftm() All functions are tested in one single driver PEI/DXE: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/STRING_H/stringhfunctions/main.c#L52 Best Regards, Kilian From: Kilian Kegel<mailto:KILIAN_KEGEL@OUTLOOK.COM> Sent: Wednesday, October 23, 2019 10:03 PM To: devel@edk2.groups.io<mailto:devel@edk2.groups.io> Cc: Kinney, Michael D<mailto:michael.d.kinney@intel.com>; Richardson, Brian<mailto:brian.richardson@intel.com> Subject: [edk2-devel] [staging/branch]: CdePkg - C Development Environment Package Hi UEFI community, I’d like to introduce the CdePkg to edk2-staging. Some time ago I decided to write my own ANSI C Library for UEFI Shell and POST. The UEFI Shell library (“Torito C Library”) has been production-ready for more than one year. The POST version of the library (“CdeLib”) is not yet fully tested. I will be demonstrating my verification procedure in the upcoming weeks on EDK2 STAGING https://github.com/tianocore/edk2-staging/tree/CdePkg Currently there are 3 examples implemented: 1. argvc: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/HOSTED_ENV/argcv/main.c#L57 argc/argv handling according to https://msdn.microsoft.com/en-us/library/a1y7w461.aspx 1. systeminterfacePEI: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfacePEI/main.c#L57 demonstration, how PeiServices and FileHandle are passed into main() 1. systeminterfaceDXE: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/SYSTEM_IF/systeminterfaceDXE/main.c#L57 demonstration, how SystemTable and ImageHandle are passed into main() Upcoming next demonstration will be the clock() function end of this week The idea is to bring the ANSI C Library interface into POST drivers. This will: 1. ease porting tasks 2. allow cross development 3. allow developers to focus on their aims, because they aren’t forced to keep in mind a lot of additional info (e.g. RShiftU64) 4. provide all intrisics to allow the compiler to be a “C compiler” (e.g. char buffer[256] = { 1 };) What is CdePkg and Torito C Library? * CdePkg and Torito C Library are a one man show / after work party, that is owned and written solely by myself * CdePkg is a reference implementation only for Microsoft C compiler * CdePkg is a feasibility study * CdePkg is the successor of Torito C, based on the same source code * CdePkg C Development Environment is similar to MdePkg Module Development Environment but guarantees that the C compiler is always fully usable (all intrinsics available) and the C90/C95 standard library is always available What are the design goals? * to rewrite the whole thing from scratch, without using any public source code from GNU, BSD, Watcom * completeness: full blown C90 + C95 support, as lowest common denominator * tailored for UEFI: small code size, for UEFI-POST-driver uses a C-Library-Driver, that contains core/worker functions for realloc() == malloc() and free(), entire printf()-family, entire scanf()-family. UEFI-POST-driver just uses small wrapper functions to run the C-Library-Driver code. * stable, exact, chipset independent TSC based clock() with CLOCKS_PER_SEC == 1000 * complete set of the Microsoft C-compiler intrinsic functions * ROM-able! Runs with stack but w/o any static storage duration in .data segment, e.g. for rand(), strtok(), tmpfile() This is required for early PEI before memory sizing, when PEI-images run directly out of flash * Microsoft (bug) compatible (as far as possible) * use original Microsoft header files for UEFI Shell Apps created in VS2019 * allow expensive debugging tasks of ANSI C .EFI applications in Visual Studio in its Windows NT counter part * to save my lifetime writing a documentation https://github.com/tianocore/edk2-staging/tree/CdePkg/implemented.md#validation-status * all the above in one single C-Library CdeLib.lib CdePkg shall be adjusted to other compilers/tool chains too, once it is feature-complete and accepted by the UEFI community. As long as it is for Microsoft VS2019 only. CdePkg README.md is here: <https://github.com/MinnowWare/CdePkg#cdepkg> https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg CdePkg HOWTO is here: https://github.com/tianocore/edk2-staging/blob/CdePkg/README.md#howto CdeValidationPkg README.md is here: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md<https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md#cdevalidationpkg> CdeValidationPkg HOWTO is here: https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md<https://github.com/tianocore/edk2-staging/blob/CdePkg/CdeValidationPkg/README.md#howto> HOWTO: 1. clone the edk2-staging repository 2. checkout CdePkg 3. run LAUNCH.BAT 4. run build -p EmulatorPkg\EmulatorPkg.dsc -t VS2015x86 -a IA32 5. run DBGEMU.BAT to start emulation (EmulatorPkg) 6. run build -a IA32 -a X64 -n 5 -t VS2015x86 -b DEBUG -p Vlv2TbltDevicePkg\PlatformPkgX64.dsc 7. update MinnowBoard with Build/Vlv2TbltDevicePkgX64\DEBUG_VS2015x86\FV\VLV.fd Best regards, Kilian Kegel [-- Attachment #2: Type: text/html, Size: 47135 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [edk2-devel] [staging/branch]: CdePkg - added unit test for remaining STRING.H functions - memcpy(), memmove(), strcpy(), strncpy(), strcat(), strncat(), memcmp(), strcmp(), strncmp(), memchr(), strchr(), strcspn(), strpbrk(), strrchr(), strspn(), strstr() etc... 2019-11-19 14:19 ` [staging/branch]: CdePkg - added unit test for remaining STRING.H functions - memcpy(), memmove(), strcpy(), strncpy(), strcat(), strncat(), memcmp(), strcmp(), strncmp(), memchr(), strchr(), strcspn(), strpbrk(), strrchr(), strspn(), strstr() etc Kilian Kegel @ 2019-11-19 14:26 ` Ard Biesheuvel 0 siblings, 0 replies; 4+ messages in thread From: Ard Biesheuvel @ 2019-11-19 14:26 UTC (permalink / raw) To: edk2-devel-groups-io, KILIAN_KEGEL; +Cc: Kinney, Michael D, Richardson, Brian Hello Kilian. On Tue, 19 Nov 2019 at 15:19, Kilian Kegel <KILIAN_KEGEL@outlook.com> wrote: > > Hi UEFI community, > > > > I’d like to inform you about an update in the CdePkg branch of edk2-staging. > > https://github.com/tianocore/edk2-staging/tree/CdePkg#cdepkg > > > > The goal of the CdePkg is to provide an ANSI C Interface for UEFI POST drivers, I /think/ I know what 'POST driver' means, but it would help if you could clarify it. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-11-19 14:27 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <15D05F40761233FD.22068@groups.io> 2019-11-08 15:15 ` [staging/branch]: CdePkg - added unit test for clock() function Kilian Kegel [not found] ` <15D538D913DB9115.9779@groups.io> 2019-11-11 19:02 ` [staging/branch]: CdePkg - added unit test for remaining TIME.H functions - difftime(), mktime(), time(), asctime(), ctime(), gmtime(), localtime(), strftime() Kilian Kegel [not found] ` <15D630F5419FB939.1274@groups.io> 2019-11-19 14:19 ` [staging/branch]: CdePkg - added unit test for remaining STRING.H functions - memcpy(), memmove(), strcpy(), strncpy(), strcat(), strncat(), memcmp(), strcmp(), strncmp(), memchr(), strchr(), strcspn(), strpbrk(), strrchr(), strspn(), strstr() etc Kilian Kegel 2019-11-19 14:26 ` [edk2-devel] " Ard Biesheuvel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox