OSDev.org https://forum.osdev.org/ |
|
UEFI or Legacy BIOS Bootloader? https://forum.osdev.org/viewtopic.php?f=15&t=31419 |
Page 1 of 1 |
Author: | Cjreek [ Mon Mar 13, 2017 10:40 am ] |
Post subject: | UEFI or Legacy BIOS Bootloader? |
I might return to OS development with a slightly higher goal of making an OS that is somehow useable instead of being just "whatever". I'm developing on Windows and I always found it laborious to work with GRUB on Windows. So I'd like to make my own bootloader. I'm not planning on targeting ancient hardware that no one in the real world ever uses anymore. So I'm going to make an 64-Bit OS (instead 32-Bit) and now I'm thinking about whether I should make an UEFI bootloader or an Legacy BIOS bootloader. Are there any major disadvantages? Does virtually every laptop/desktop pc from 2010+ on support UEFI? Or should I rather stay with BIOS? |
Author: | Brendan [ Mon Mar 13, 2017 11:11 am ] |
Post subject: | Re: UEFI or Legacy BIOS Bootloader? |
Hi, Cjreek wrote: I might return to OS development with a slightly higher goal of making an OS that is somehow useable instead of being just "whatever". I'm developing on Windows and I always found it laborious to work with GRUB on Windows. So I'd like to make my own bootloader. I'm not planning on targeting ancient hardware that no one in the real world ever uses anymore. So I'm going to make an 64-Bit OS (instead 32-Bit) and now I'm thinking about whether I should make an UEFI bootloader or an Legacy BIOS bootloader. Are there any major disadvantages? Does virtually every laptop/desktop pc from 2010+ on support UEFI? Or should I rather stay with BIOS? I'd recommend designing your own specification that describes the state of everything when the boot loader passes control to the kernel; and ensuring that nothing in the kernel depends on firmware of any kind. That way anyone can create a boot loader that complies with your specification (and works for your kernel/OS); and your kernel/OS won't have any reason to care what the boot loader is (or if the boot loader happened to use BIOS or UEFI or OpenFirmware or CoreBoot or something else). In this case, it becomes "which boot loader should you implement first", where the only thing that really matters is your own personal convenience. Note: Eventually (not soon), I'd want:
Cheers, Brendan |
Author: | Cjreek [ Mon Mar 13, 2017 4:23 pm ] |
Post subject: | Re: UEFI or Legacy BIOS Bootloader? |
Hi Brendan, So you wouldn't recommend implementing the Multiboot specification? Also: In which way would the OS even be able to care or even depend on the firmware? (if it's not a real mode OS) I guess it's about which kind of bootloader to prioritize the highest for modern x86 environments. |
Author: | kzinti [ Mon Mar 13, 2017 5:19 pm ] |
Post subject: | Re: UEFI or Legacy BIOS Bootloader? |
I agree with Brendan about having your own protocol and write a bootloader for each type of firmware you want. That said, instead of writing 'x' bootloaders for the BIOS, I just wrote one using multiboot (grub). Nothing prevents me from adding a real BIOS bootloader down the road if I want to. The downside of multiboot is that you can't call the BIOS easily to retrieve EDID monitor data, change resolutions, and so on. But it's totally doable. Another problem is that if you are loaded by the multiboot protocol, you don't even know if the BIOS exists at all. |
Author: | Brendan [ Mon Mar 13, 2017 5:44 pm ] |
Post subject: | Re: UEFI or Legacy BIOS Bootloader? |
Hi, Cjreek wrote: So you wouldn't recommend implementing the Multiboot specification? If the Multiboot specification suits your OS, then it can act as a "specification that describes the state of everything when the boot loader passes control to the kernel" (even if you do write your own boot loader). Beyond that, it depends on the nature of your OS and its design. For examples; Multiboot specification won't suit your OS if you want to do things like:
Cjreek wrote: Also: In which way would the OS even be able to care or even depend on the firmware? (if it's not a real mode OS) This includes things like:
Cheers, Brendan |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |