bellezzasolo wrote:So, I've been writing a UEFI OS. Of course, we all want our OSes to run on all systems, not just UEFI.
However, I've been thinking. GRUB2 has a nice set of drivers and module support. It even provides the same flat memory model as UEFI.
So, what's to prevent GRUB2 emulating UEFI firmware? OK, not the full runtime service thing, but I don't see a significant subset being too difficult.
Thoughts?
Runtime services are a tiny portion of UEFI, probably you meant Boot Services (and bunch of protocols for doing things like various I/O for storage and overall peripheralls (SATA, USB and PCIe are alone a monstrous thing each, but there are a lot yet - SD/MMC, NAND for example), graphics, consoles, driver binding, device paths, various networking things like TCP/IP, TFTP, iSCSI, PXE, etc etc)?
And why "emulating"? Is it religiously forbidden for it to even think it could "implement" it?
Who knows better than the GRUB developers? I think they know better. Since I am working with mips and arm SBCs I have no idea about GRUB, but I heard it is able to play role a UEFI OsLoader, so maybe this is their way - they don't think it's needed for them to compete with Tianocore, which already supplies a base ground, massive framework, in fact, for traditional BIOS makers, now making UEFI? They just don't want. How does that idea look to you?
Personally, I don't see any reason for hobby OSes aiming at x86 to support legacy protocols like BIOS. It's just work for the past, not future. UEFI is getting widespread, so if you ever will have users for your OS, they most probably will be more comfortable with UEFI than BIOS.
It's like learning assembly by books talking about 16-bit real mode and DOS. Somehow it's often seen even now.