I'm still reasonably new to the osdev thing and i need to ask a question that has always been in the back of my mind.
Should a begginner use (U)EFI and/or x86-64 to make his OS instead of the old BIOS and x86?
I wanted to ask this question early on in my OS, so changing to UEFI and x86-64 isn't as hard as changing later on. I already have a semi-working shell with commands and some basic keyboard handling ,interrupts, and basic stuff like that.
So,should i stick with x86 and BIOS for learning and then i change,or is it not worth it now?
Thanks for the help ,
TheRussianFail
PS: I don't want to spark any BIOS vs UEFI discussion here, I'm just asking for an opinion about developing with UEFI instead of BIOS as a begginner.
UEFI and x86-64 for a begginner
UEFI and x86-64 for a begginner
If some of you people keep insisting on having backwards compatibitity with the stone age, we'll have stone tools forever.
My Hobby OS: https://github.com/heatd/Onyx
My Hobby OS: https://github.com/heatd/Onyx
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: UEFI and x86-64 for a begginner
The only "should" is that you should write software for what you intend to use.
Do you want to run on older machines? Do you want to run exclusively on newer machines? Do you want to use the benefits of newer features? Do you want it because you can? Do you want a single solution or multiple alternatives?
Do you want to run on older machines? Do you want to run exclusively on newer machines? Do you want to use the benefits of newer features? Do you want it because you can? Do you want a single solution or multiple alternatives?
Re: UEFI and x86-64 for a begginner
Hi,
However; for your first ever OS you're mostly learning, gaining experience and refining ideas; and it's very unlikely that your first OS will be your final OS, and much more likely that (eventually) you'll start "your OS version 2" to take advantage of what you've learned doing "version 1". With this in mind, I'd be tempted to suggest that a beginner should focus on gaining knowledge (and probably shouldn't be trying to create a serious modern OS on their very first attempt).
If your goal is "gaining knowledge faster", then it can make sense to cut corners (e.g. use something like multi-boot) instead of doing things properly.
Cheers,
Brendan
For a serious attempt at creating a modern OS (e.g. that is designed to have at least have some chance of success, for some unknown/random definition of "success"); I'd recommend designing some sort of "intermediate boot state", where all boot loaders put the computer into that "intermediate boot state", and later boot code relies on that "intermediate boot state" and nothing else (and doesn't know or care what the boot loader was). The idea is to allow you to write more boot loaders (BIOS, UEFI, OpenFirmware, "kexec", OS installed in ROM, etc) whenever you like, without having to change any other part of the OS at all.TheRussianFail wrote:I'm still reasonably new to the osdev thing and i need to ask a question that has always been in the back of my mind.
Should a begginner use (U)EFI and/or x86-64 to make his OS instead of the old BIOS and x86?
However; for your first ever OS you're mostly learning, gaining experience and refining ideas; and it's very unlikely that your first OS will be your final OS, and much more likely that (eventually) you'll start "your OS version 2" to take advantage of what you've learned doing "version 1". With this in mind, I'd be tempted to suggest that a beginner should focus on gaining knowledge (and probably shouldn't be trying to create a serious modern OS on their very first attempt).
If your goal is "gaining knowledge faster", then it can make sense to cut corners (e.g. use something like multi-boot) instead of doing things properly.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: UEFI and x86-64 for a begginner
Thanks to both of you for replying the topic.
Maybe the better option is for me to stay with BIOS and x86 until i gain enough knowlege, and then i should change to the better(arguably) and more recent tecnologies.
I will investigate a bit more into what Brendan said about an "intermediate boot state" and i will look into the linux kernel source code to see how it does the "intermediate boot state".
TheRussianFail
Maybe the better option is for me to stay with BIOS and x86 until i gain enough knowlege, and then i should change to the better(arguably) and more recent tecnologies.
I will investigate a bit more into what Brendan said about an "intermediate boot state" and i will look into the linux kernel source code to see how it does the "intermediate boot state".
TheRussianFail
If some of you people keep insisting on having backwards compatibitity with the stone age, we'll have stone tools forever.
My Hobby OS: https://github.com/heatd/Onyx
My Hobby OS: https://github.com/heatd/Onyx
Re: UEFI and x86-64 for a begginner
Hi,
Cheers,
Brendan
Linux kernel is always a good example (if you like to learn by other people's mistakes)...TheRussianFail wrote:I will investigate a bit more into what Brendan said about an "intermediate boot state" and i will look into the linux kernel source code to see how it does the "intermediate boot state".
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
Re: UEFI and x86-64 for a begginner
I'm biased, but I wouldn't recommend starting with legacy BIOS. There's too many "gotchas", too much variation between machines and between emulators, too many legacy features you have to understand, and ultimately you're developing for a platform in its last days. You'll spend two weeks learning about real mode just so you can put the system into long mode and never need all that legacy stuff again. For the modern PC architecture, UEFI is the standard firmware interface.