Description
The UEFI firmware interface has some calling conventions which are documented in chapter 2.3 of the current spec.
For the most part, these are pretty close to the Windows ABI conventions ("cdecl" on IA-32, "win64" on AMD64...), which should come as no surprise given the strong influence that Microsoft has on the UEFI forum. However, the UEFI spec also defines calling conventions for hardware architectures like RISC-V where Windows has not been ported.
UEFI applications (such as OS loaders) must be extra careful to use the right ABI when calling into UEFI, since unless you are Windows, extern "C"
will not necessarily map into what the firmware expects.
In rust-osdev/uefi-rs#41 , @GabrielMajeri proposed to make the life of UEFI application developers easier by adding language-level support for the UEFI FFI in the form of an extern "uefi"
ABI. How open would you be to this idea?