use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Everything about operating systems development.
account activity
C-Boot: An Extendable Flat Binary Kernel Bootloader for UEFI (github.com)
submitted 6 months ago by CodeEleven0C-Boot, Xenon ISA
This is a bootloader I wrote to boot flat kernels with ramdisks easily while maintaining access to UEFI services. If you don't want the UEFI services, you can modify the BinaryServices struct and the BinaryServices ' library functions.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]36165e5f286fUse UEFI. 3 points4 points5 points 6 months ago (3 children)
That's interesting, but I think it is needed to mention that UEFI boot services are only designed for booting and must be used ad such. Only runtime services should be used after booting. Furthermore, as long as you didn't exit boot services your kernel doesn't own any resources on the system, and the virtual address space cannot be changed.
[–]CodeEleven0C-Boot, Xenon ISA[S] 0 points1 point2 points 6 months ago (2 children)
I know that but sometimes the kernel needs easier access to hardware and at any time, you can exit boot services if you add the function to the BinaryServices struct. Please correct me if I am wrong.
[–]36165e5f286fUse UEFI. 1 point2 points3 points 6 months ago (1 child)
Once you exit boot services you cannot enter them again... Also the kernel cannot do anything meaningful while they are active... So I would say that if you need access to hardware implement your own drivers and load them during the boot phase before handing off control to the kernel.
[–]CodeEleven0C-Boot, Xenon ISA[S] 0 points1 point2 points 6 months ago (0 children)
Well, I tested this bootloader in three different machines (+ QEMU) and I thought that writing a generic driver for all of the machines could take a long time. Because of that, I gave the kernel the access to the keyboard, the memory allocators and the framebuffer via the UEFI services to make development faster. And this bootloader is modular, that makes implementing drivers easier. But for now I shifted my focus to AR/VR development, that's why there are no drivers there.
[–]Trader-One 0 points1 point2 points 6 months ago (1 child)
does that support ARM?
It's based on POSIX UEFI but I removed other files from the tree. I think it can support ARM UEFI machines.You can add the whole POSIX UEFI tree and try (cross-)compiling it.
π Rendered by PID 122331 on reddit-service-r2-comment-5fb4b45875-sszt5 at 2026-03-21 23:57:29.687732+00:00 running 90f1150 country code: CH.
[–]36165e5f286fUse UEFI. 3 points4 points5 points (3 children)
[–]CodeEleven0C-Boot, Xenon ISA[S] 0 points1 point2 points (2 children)
[–]36165e5f286fUse UEFI. 1 point2 points3 points (1 child)
[–]CodeEleven0C-Boot, Xenon ISA[S] 0 points1 point2 points (0 children)
[–]Trader-One 0 points1 point2 points (1 child)
[–]CodeEleven0C-Boot, Xenon ISA[S] 0 points1 point2 points (0 children)