CppCon 2018: Morris Hafner 'UEFI Applications With Modern C++'

preview_player
Показать описание


Inside of every PC, there is an environment capable of running arbitrary software without an operating system: The Unified Extensible Firmware Interface, or UEFI. Introduced to replace BIOS as a high-level interface between hardware and the kernel, it features many advanced features such as networking right after pressing the power button of your mainboard with a relatively simple C API.
In this session, we explore how we can apply modern C++ idioms to a bare metal environment like UEFI. Armed with a working modern C++ compiler, we'll wrap the C API with some metaprogramming tricks. This grants us better type safety and a cleaner API with no runtime overhead. Along the way we'll introduce a clean exceptionless error-handling method, and finally write a small demo application.
Finally, we look at the some of the proposals for the next C++ standard and how it helps us writing more concise yet efficient code that is sill conformant.

Morris Hafner, Codeplay Software
Software Engineer

Morris is a Computer Science undergrad interested in computer graphics, the evolution of C++ and everything low level.
He tries to (ab)use the language and its tooling to prevent mistakes in software while keeping the code as general as possible.
On the GPU, he likes to play with shaders, lighting and bending the graphics pipeline.
When he is not programming, he enjoys travelling and watching movies.


*-----*
*-----*
Рекомендации по теме
Комментарии
Автор

Good talk, full with actual commands and code, and he explains all the pitfalls. Ive been meaning to get into this, this guy basically jumpstarted my whole process. I already compiled and used the Tianocore EDK2 and got it running. Freestanding COFF executable in Clang error is sad, hopefully they can fix that., because, Overall we need more and better EFI utility programs to run before the OS.

mrlithium
Автор

It's most definitely possible to use clang to create EFI applications.

TheChrisey
Автор

Code like this gives template metaprogramming a bad name. Do you honestly believe this is better than the actual C-based UEFI API? IMHO, the result is needlessly complex and fugly.

AnonEMuss-gwfm
Автор

Link to slide deck, blog posts or repository?

PatrickRoncagliolo