>You probably don't want to put it in the bootloader. The kernel is easier to
upgrade than the bootloader, which is easier to upgrade than the firmware, so it
makes more sense for the kernel to be as self-sufficient as is possible, or at
least practical.
Regardless it would be nice if the efi implementation hacks were removed.
My favorite is this one in init/main.c #ifdef CONFIG_X86
if (efi_enabled)
efi_enter_virtual_mode();
#endif
Which pretty much guarantees efi won't be a distro supported feature
any time soon because it breaks kexec the ability of a kexec'd kernel
to boot and thus crash dump support. Or it does if you ever use efi
callbacks, and if you don't use efi callbacks there is no point in
calling that function. Why are efi callbacks not always done in
physical mode?