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:
- Use digital signatures for security
- Setup long mode/64-bit in the boot loader (to avoid an ugly linker mess for the kernel)
- Setup paging in the boot loader (to avoid an ugly "kernel initialisation" mess)
- Let "kexec()" leave CPUs running (instead of shutting them all down before and then starting them all again after)
- Allowing boot loader to set up 2 or more framebuffers (for 2 or more monitors) that the kernel can use
- Get boot loader to tell your kernel the address of ACPI tables (so your kernel doesn't need to search for them on UEFI systems that give you the address)
- Get boot loader to tell your kernel the IP address of the computer (if it was booted from network) to avoid kernel having to use DHCP to get the same IP address a second time
Of course this is not an exhaustive list - there's no way to guess what you might want that Multiboot doesn't support.
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:
- Assuming that VBE exists and can be used to set a video mode after boot (it doesn't exist on UEFI)
- Assuming that values from the BIOS Data Area exist and can be used (they don't exist on UEFI)
- Assuming anything at all about the physical memory map (e.g. that there's usable RAM at 0x00100000 - UEFI makes no guarantees)
- Assuming that various legacy devices exist (PS/2 controller, PIC chips, PIT chip - these may not exist and may not be emulated via. SMM on UEFI)
- Assuming that various devices are in any kind of legacy emulation mode (video card, hard disk controller, etc)
- Assuming that you can use any "UEFI run-time service" (these don't exist for BIOS)
Cheers,
Brendan