I don't believe there are any POWER machines using UEFI. The standard POWER boot process uses OPAL (Open Power Abstraction Layer) instead. But POWER does use GPT disk partitioning, which is from the UEFI standard.
Someone has ported TianoCore to powerNV, but I've never looked into it. You could replace the hostboot payload with any binary, it's basically just an ELF file with a payload delivered, an initramfs in the case of skiboot/petitboot.
Not a lot of advantages in UEFI over petitboot, though.
Yeah, that's potentially compelling; if you've got UEFI enabled boards for those platforms. A quick search says maybe raspberry pi 4 supports uefi booting, which would be interesting.
Yeah I think Linux does all of this plus has a UEFI stub. I'd like to see a low-level breakdown of what goes into going from kernel -> bootable ISO (that works on BIOS and UEFI).
UEFI is much like MS-DOS. It is capable of loading programs from the FAT filesystem into memory and running them. The entry point, EFIMain() is passed a couple of pointers that point to system tables that can be queried to find the address of various services. These include things like reading or writing from the system console, get the system memory map, reading/writing files or even things like reading and writing from network adapters. It's really pretty elaborate. An EFI program runs in 64-bit long mode, with paging set up as an identity map (logical address X maps to physical address X).
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.
16 comments
[ 2.5 ms ] story [ 45.7 ms ] threadI 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.