Before the BSD Kernel Starts: Part One on AMD64
moritz.systems
moritz.systems
I suspect the downvotes were because your comment comes across as unreasonably negative.
I can see that secure boot is compelling to the right audience, but it doesn't add much for me.
Not a lot of advantages in UEFI over petitboot, though.
Edit: here it is. https://github.com/andreiw/ppc64le-edk2 mocks the presence of ACPI tables using the equivalent OPAL calls.
If the BIOS is sufficient and simpler... why not?
If it were possible would you use the BIOS?
It's simpler. That's sufficient reason for me.
An EFI program can exit and return control to the EFI shell. A kernel, however, makes an EFI call to terminate EFI services. After that, it can only call a tiny set of certain EFI functions, but the kernel is considered to have control of the machine. At that point, it will relocate itself from where EFI loaded it to where it wants to live, initialize new page tables, switch to those table, and proceed with its regular initialization.
The Linux EFI stub is a bunch bytes at the start of the kernel image that make it a legal EFI program.