The `UefiMain(ImageHandle, SystemTable)` entry point you write here is identical in shape to real bootloaders built against EDK2/TianoCore (the open-source reference implementation coreboot and most OEM firmware derive from), and GNU-EFI is the exact toolchain systemd-boot and rEFInd use to compile their .efi binaries. Getting the EFI_SYSTEM_TABLE plumbing wrong is the difference between a working UEFI app and a firmware hang.