You know, I thought UEFI actually was doing the same thing, but I am mistaken, at least for anything resembling modern UEFI.
Apparently, modern UEFI just doesn't bother supporting classic Video BIOS option ROMs at all, only supporting UEFI option ROMs. Then for those... you either need to hope your GPU has one for your host CPU architecture, or you can use X86EmulatorDxe, a Qemu-based LGPL module that can run AMD64 drivers on AArch64, which hasn't been updated in a few years, or Intel's MultiArchUefiPkg, a more modern solution using Unicorn Engine that supports both AArch64 and RISC-V. Which is also LGPL, but.. Unicorn Engine itself is GPL, which is obviously a potential licensing issue for any would-be users. And, Intel archived it (probably alongside tons of their other open source projects) earlier this year, so it is no longer being maintained by them. Or, finally, you can have an option ROM containing machine-independent EFI Byte Code... which is no longer required by the UEFI spec, was never really used (apparently, the primary toolchain was a proprietary Intel C compiler that is no longer updated.) So who knows how many UEFI implementations still support it. It was removed from EDK2 in 2023, so presumably newer firmwares won't handle it at all.
I'm sure most people don't care about the trainwreck that is UEFI, but I found this tangent to be surprisingly interesting. At this point, treating AMD64 as a lingua franca of PC-based computers might just be the best way forward rather than trying to invent virtual machines. If they wanted to go the VM route, they should've committed fully and only supported OpROMs that were architecture-independent from the gitgo.
All of this just so we can initialize the video card and display some messages at boot, huh.
Apparently, modern UEFI just doesn't bother supporting classic Video BIOS option ROMs at all, only supporting UEFI option ROMs. Then for those... you either need to hope your GPU has one for your host CPU architecture, or you can use X86EmulatorDxe, a Qemu-based LGPL module that can run AMD64 drivers on AArch64, which hasn't been updated in a few years, or Intel's MultiArchUefiPkg, a more modern solution using Unicorn Engine that supports both AArch64 and RISC-V. Which is also LGPL, but.. Unicorn Engine itself is GPL, which is obviously a potential licensing issue for any would-be users. And, Intel archived it (probably alongside tons of their other open source projects) earlier this year, so it is no longer being maintained by them. Or, finally, you can have an option ROM containing machine-independent EFI Byte Code... which is no longer required by the UEFI spec, was never really used (apparently, the primary toolchain was a proprietary Intel C compiler that is no longer updated.) So who knows how many UEFI implementations still support it. It was removed from EDK2 in 2023, so presumably newer firmwares won't handle it at all.
I'm sure most people don't care about the trainwreck that is UEFI, but I found this tangent to be surprisingly interesting. At this point, treating AMD64 as a lingua franca of PC-based computers might just be the best way forward rather than trying to invent virtual machines. If they wanted to go the VM route, they should've committed fully and only supported OpROMs that were architecture-independent from the gitgo.
All of this just so we can initialize the video card and display some messages at boot, huh.