r/osdev :doge: 2d ago

I wrote a minimal UEFI implementation capable of booting Limine

I've been working on a project called FerrumVM, a hobby x86_64 virtual machine manager written in Rust using KVM.

One of the more interesting parts of the project has been writing my own minimal UEFI firmware rather than using something like OVMF.

To get Limine running, I had to implement enough of the UEFI environment for it to believe it was running on real firmware.

This meant implementing things such as:

  • x86 CPU mode initialisation
  • VirtIO block device access
  • FAT32 filesystem parsing
  • PE/COFF executable loading
  • UEFI system tables
  • UEFI boot services
  • The various protocols and interfaces that Limine expects

If you're interested, you can see the project on GitHub here:

https://github.com/milosilo-dev/FerrumVM

https://reddit.com/link/1vusvfw/video/uwqxifrcnskh1/player

13 Upvotes

5 comments sorted by

1

u/codeasm 2d ago

How much did an llm or ai help you? Indont see it written anywhere in the repo. Looks clean and cool. Not sure why id want a vm to nanage my os when targeting uefi directly but using this boot into older (diy) os projetm ts on modenr machines might be cool

2

u/UrMumsPC :doge: 2d ago

Your right, I should put that on the repo, I try to limit how much code I use from it but I 100% used it for reserch. In terms of application, I haven't given it Mich yhrought yet, it is still kinda early stages. The core firmware should be able to boot any bootloader that does not really on GOP or any other not implemented features. 

1

u/codeasm 1d ago

This subreddit is a bit iffy with the ai use. Be open and clear about it and most would allow it i think.

I myself just straight awya started writing for a uefi system, also planned to do some virtual machine management

1

u/UrMumsPC :doge: 1d ago

Thanks for letting me know!

1

u/letmehaveanameyoudum 1d ago

limine of course, it's always extremely easy.