]> git.ipfire.org Git - thirdparty/systemd.git/commit
sd-boot: Get rid of uefi_call_wrapper
authorJan Janssen <medhefgo@web.de>
Thu, 30 Sep 2021 10:11:56 +0000 (12:11 +0200)
committerJan Janssen <medhefgo@web.de>
Sun, 17 Oct 2021 09:55:57 +0000 (11:55 +0200)
commit12f32748aa291db1e8c1305e7fb4310e9728aad4
treec19933452b62ff7de743eaea6765d75a34d6371e
parent70cd15e97bcce87e8843545ad44dc52a474e66a7
sd-boot: Get rid of uefi_call_wrapper

The uefi_call_wrapper exists to convert to the right calling convention
and presumably predates compilers that can do so natively. The only
architecture where this is even needed is x86_64.
But because we are building with GNU_EFI_USE_MS_ABI defined, the
EFIAPI macro tells the compiler to use the right calling convention
for EFI functions. Our shim callback (which is called by EFI itself)
already relies on this.

This also adds a safety check to make se we are compiling with
GNU_EFI_USE_MS_ABI defined and also adds it to the compiler args
unconditionally. It is only used with x86_64 anyways, so it should
be fine to do so. EFI_FUNCTION_WRAPPER is unused in gnu-efi, so
it is dropped.
19 files changed:
src/boot/efi/assert.c
src/boot/efi/boot.c
src/boot/efi/console.c
src/boot/efi/devicetree.c
src/boot/efi/drivers.c
src/boot/efi/graphics.c
src/boot/efi/initrd.c
src/boot/efi/linux.c
src/boot/efi/linux_x86.c
src/boot/efi/measure.c
src/boot/efi/meson.build
src/boot/efi/pe.c
src/boot/efi/random-seed.c
src/boot/efi/shim.c
src/boot/efi/splash.c
src/boot/efi/stub.c
src/boot/efi/util.c
src/boot/efi/util.h
src/boot/efi/xbootldr.c