Hacker News (curated)new | past | comments | ask | show | jobs| show hidden

> It executes code before the operating system but doesn't really provide a hardware abstraction layer like BIOS does.

Yes it does? If anything, it provides way more; a .efi program can use firmware services to load files and print text. There's like 80% of a DOS in there.

> Most operating system don't use BIOS or any other software layer and configure the hardware themselves. Why is it there then?

Because we still want enough functionality to load the OS in the first place, which means e.g. nvme drivers, Ethernet drivers (for netboot), keyboard input and some display output (to let a user pick what to load), and of course filesystem drivers because loading an OS/bootloader from a single shared MBR was awful.



If you want an OS to handle edge cases like booting from the network (that can be arbitrarily complex), reusing an existing one makes a lot more sense than writing a custom one from scratch. Make a very basic bootloader that will init the minimal amount of hardware and then load a user-supplied boot image from the flash. That's it. Linux typically boots this way on non-embedded systems.

What operating system would you use, that is small enough to be burned into a flash chip on the motherboard, and capable of booting arbitrary target operating systems?

Linux, for example? 32MB is several times bigger than your average OpenWRT image. If you need more for the drivers or anything else then you already have more on your motherboard, and surely won't be limited by the OS overhead.

I said "and capable of booting arbitrary target operating systems" for a reason. Linux can kexec itself and I believe modded (but not mainline) FreeBSD. UEFI is rather more general.

they also provide device trees to the kernel on modern arm uefi environments. And in servers they provide an interface for the baseboard management controller to interact with the firmware directly.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact | github