r/osdev • • Oct 27 '26

Best resources to learn UEFI from scratch?

Hey everyone! I want to learn UEFI from scratch, including the boot process, boot services, memory maps, and how UEFI loads an OS.

I'm working on a hobby OS project using C, x86-64, QEMU, and Limine. I want to understand the boot process beyond just using a bootloader.

What tutorials, books, or hands-on projects would you recommend except oswikidev?

5 Upvotes

13 comments sorted by

3

u/Objective-Swing6760 Oct 27 '26

I found the official documentation sufficient https://uefi.org/specs/UEFI/2.11 and I think gnu-efi is simpler to use than edk.

2

u/soundman32 Oct 27 '26

ChatGPT write me a simple bootloader for UEFI.

-1

u/Some-Comparison4863 Oct 27 '26

btw goodluck the bootloaders have a 512 bytes limit so if you trying to bypass it you gonna have more opportunities to breach your bootloader and make a bootkit that going to load first so I would not recommand doing it on C I think it is better on assembly because everything you write on NASM or GAS or Opcodes they all are great just opcode is not really comfortable

3

u/Objective-Swing6760 Oct 27 '26

UEFI has no 512 byte limit. That would be legacy BIOS.

1

u/Some-Comparison4863 Nov 01 '26

UEFI bypass the limit instead of doing the 512 bytes limit he bypassing it into onther line of code and just booting it and it is not good because more code equal more weakness the only thing that bootloader needs to do is to do this:

real mode(16 bit) -> Protect mode(32 bit) -> long mode(64 bit)

but most of the bootloader today trying to behavior like entire OS so telling you is good probably most of us but for security is really bad

2

u/IW0ntPickaName Nov 01 '26

This is not true at all for UEFI

1

u/Some-Comparison4863 Nov 01 '26

you are right there is a bypass for it like make him to jump into other sector but so you will know that is the type where grub comming here and prove you wrong because Grub is the bootloader in almost every pc and have a lot of weakness because he trying to be OS so telling you that limit of 512 is bad no it is so good that most of the time it is actually helping you optimaze it even better you can even create one in 400 less bytes!

1

u/Waste_Appearance5631 Oct 27 '26

remindme! 3 days

1

u/RemindMeBot Oct 27 '26 edited Oct 27 '26

I will be messaging you in 3 days on 2026-10-30 10:45:01 UTC to remind you of this link

1 OTHERS CLICKED THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.

RemindMeBot is switching to username summons. Instead of !RemindMe 1 day, use u/RemindMeBot 1 day. More info.


InfoCustomYour RemindersFeedback

0

u/Some-Comparison4863 Oct 27 '26

I'm using AI to learn and AI is greater with C because there are a lot more projects that he can use to teach you or building with you it is not always great but he doing good job and if you doing x86-64 so I would recommand also use Intel manual or AMD manual I dont know if you need it for OS but if you also ment on virtual machine so yes Intel or AMD manual gonna be useful

1

u/AnSkinStealer Oct 31 '26

OP asked for learning resources not slop, also AI isn't a "he", if you like calling it like that for roleplay or smth, why not keep that... for yourself?

1

u/Some-Comparison4863 26d ago

hey what helping you sleep tonight I'm just gave onther way to learn I dont know what the problem here but have fun